text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# Copyright 2018 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
{"hexsha": "13528155d32f8d719529f9794ef2d4c0c7e14b8e", "size": 7020, "ext": "py", "lang": "Python", "max_stars_repo_path": "pennylane_sf/simulator.py", "max_stars_repo_name": "johannesjmeyer/pennylane-sf", "max_stars_repo_head_hexsha": "9c66d9a938c187c91f6c9569543c0a941bec5423", "max_stars_repo_licenses": ["Apache-2.0"...
from logs import logDecorator as lD import json, pprint import numpy as np from lib.databaseIO import pgIO from psycopg2 import sql config = json.load(open('../config/config.json')) logBase = config['logging']['logBase'] + '.modules.checkMedsUsage.utils' @lD.log( logBase + '.getUsers' ) def getUsers(logger): q...
{"hexsha": "867df240f007914c9ad5faaf0e5540f989b74dc4", "size": 2278, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/modules/checkMedsUsage/utils.py", "max_stars_repo_name": "sankhaMukherjee/dbCheck", "max_stars_repo_head_hexsha": "8bbd978d65092ff5f8d5fcaede437be431e53d70", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python from decimal import Decimal import os import string import sys import json import logging import asyncio import time import base64 # import pandas # import numpy as np # noqa # import pandas as pd # noqa # from pandas import DataFrame from terra_sdk.client.lcd import LCDClient from terra_sdk.k...
{"hexsha": "c1f8a2c4c6bb825337e4bbb85d386ee17db363e5", "size": 30195, "ext": "py", "lang": "Python", "max_stars_repo_path": "hummingbot/strategy/oracle_sniper_limit/oracle_sniper_limit.py", "max_stars_repo_name": "jspenc72/hummingbot", "max_stars_repo_head_hexsha": "8e9129a77b157eea4cee2c7e497b93a2704f1197", "max_stars...
import numpy as np import pickle class Journal: """The journal holds information created by the run of inference schemes. It can be configured to even hold intermediate. Attributes ---------- parameters : numpy.array a nxpxt matrix weights : numpy.array a nxt matrix opt_...
{"hexsha": "cb63aeb8642c72d6b32094fc5e0ecc5916959264", "size": 8220, "ext": "py", "lang": "Python", "max_stars_repo_path": "abcpy/output.py", "max_stars_repo_name": "shoshijak/abcpy", "max_stars_repo_head_hexsha": "ad12808782fa72c0428122fc659fd3ff22d3e854", "max_stars_repo_licenses": ["BSD-3-Clause-Clear"], "max_stars_...
import numpy as np import pandas as pd import os.path as path import abydos.distance as abd import abydos.phonetic as abp import pytest from scipy.sparse import csc_matrix from sklearn.feature_extraction.text import TfidfVectorizer import name_matching.name_matcher as nm @pytest.fixture def name_match(): package...
{"hexsha": "67cc334615da33b43cc91dce1c8d5fcb9a162b36", "size": 29914, "ext": "py", "lang": "Python", "max_stars_repo_path": "name_matching/test/test_name_matcher.py", "max_stars_repo_name": "DeNederlandscheBank/name_matching", "max_stars_repo_head_hexsha": "366a376596403a1fd912cbf130062016b82306bf", "max_stars_repo_lic...
// Copyright 2015-2019 Carnegie Mellon University. See LICENSE file for terms. #ifndef Pharos_Imports_H #define Pharos_Imports_H #include <boost/format.hpp> #include <rose.h> namespace pharos { // Forward declaration of mport descriptor for recursive includes. class ImportDescriptor; // Import name map (names to ...
{"hexsha": "e7040e827781b928ed651a7c307f267026b9d044", "size": 5799, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "libpharos/imports.hpp", "max_stars_repo_name": "tjschweizer/pharos", "max_stars_repo_head_hexsha": "4c5cea68c4489d798e341319d1d5e0d2fee71422", "max_stars_repo_licenses": ["RSA-MD"], "max_stars_count...
This section is intended to make the developer understand the inner workings of the Colletta backend, and to allow him or her to add more functionality to the software package. In order to fully understand the contents below, the developer must have a certain degree of familiarity with Java, the framework Spring Boot w...
{"hexsha": "ff797ebbe873ffa9ff1961b10d9f284f613de312", "size": 8572, "ext": "tex", "lang": "TeX", "max_stars_repo_path": ".RQ/ManualeSviluppatore/sez/springBoot.tex", "max_stars_repo_name": "SWEightgroup/Colletta", "max_stars_repo_head_hexsha": "f0df4839da36f43ef5558d0838fb0a033048f927", "max_stars_repo_licenses": ["MI...
# -*- coding:utf-8 -*- import json import math import numpy as np def dict_to_np(dc, aspect_ratio=1.0): np_pos = np.asanyarray([dc["x"] / aspect_ratio, dc["y"], dc["z"] / aspect_ratio]) return np_pos def dict_to_landmark(dc, aspect_ratio=1.0): np_pos = dict_to_np(dc, aspect_ratio=aspect_ratio) visib...
{"hexsha": "df0ea4c88496b840e2240c6a932cdb80b29733e3", "size": 816, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/data_conversion.py", "max_stars_repo_name": "hyaguchi947d/mediapipe_receiver_sample", "max_stars_repo_head_hexsha": "35f3b6610f420faa8e09df6da4109f0f6820ac01", "max_stars_repo_licenses": ["Ap...
The Gazebo is the most revered of Keever sacred sites. Located at Lucas Tabers former house on Schmeiser Avenue in South Davis. You may also have been looking for one of the many other http://daviswiki.org/Recent_Changes?actionsearch&inline_stringgazebo&x0&y0 gazebos in Davis.
{"hexsha": "065f7a140d7cab991376f9b88229f55c5534a31d", "size": 283, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/The_Gazebo.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
// Boost.Geometry (aka GGL, Generic Geometry Library) // Unit Test // Copyright (c) 2014, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html #ifndef BOOST_GEOMETR...
{"hexsha": "1d49dcc0036bea61856f5bdc6cd9368658228c2a", "size": 3647, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "3rdParty/boost/1.71.0/libs/geometry/test/test_geometries/custom_lon_lat_point.hpp", "max_stars_repo_name": "rajeev02101987/arangodb", "max_stars_repo_head_hexsha": "817e6c04cb82777d266f3b44449414067...
from PIL import Image import numpy as np from sklearn.cluster import KMeans import matplotlib.pyplot as plt im = Image.open("input.jpg") np_im = np.array(im) fig = plt.figure( figsize = (6,6)) plt.imshow(np_im) plt.show() height = np.shape(np_im)[0] width = np.shape(np_im)[1] for n_clusters in range(2, 100): X ...
{"hexsha": "2cd171be5a3e92bfd8162b8c32c21fc8641e31d6", "size": 785, "ext": "py", "lang": "Python", "max_stars_repo_path": "K_means_image_segmentation/color_cluster.py", "max_stars_repo_name": "tillaczel/Machin-learning-tutorials", "max_stars_repo_head_hexsha": "1792a0215731dbcca75bc0c36cb11b8ae65f5025", "max_stars_repo...
# -*- coding: utf-8 -*- ########## THIS FITTING PROGRAM IS MEANT TO ROUGHLY FOLLOW PRIYANKA'S ANALYSIS ########## This variant does not use an air kernel, rather a constant air rate. ## USAGE1: python2.6 fit_odor_pulses.py <../results/odor_pulses/pulseresult.pickle> 191.0 ## USAGE2: python2.6 fit_odor_pulses.py <../re...
{"hexsha": "655cdd55165a7c4ca3ea669fd279823ca688379a", "size": 28242, "ext": "py", "lang": "Python", "max_stars_repo_path": "prev_ob_models/exclude/GilraBhalla2015/analysis/fit_odor_pulses_constair.py", "max_stars_repo_name": "fameshpatel/olfactorybulb", "max_stars_repo_head_hexsha": "8d7a644b4560309ef177c0590ff73ed4c2...
import numpy as np from orthogonal_patterns import random_orthogonal_patterns # import added for python3 from functools import reduce class Layer: def __init__(self, name, shape, activator, coder): self.name = name self.shape = shape self.activator = activator self.coder = coder ...
{"hexsha": "b6df484c8c936024f2634dc37c1f87201ba034a8", "size": 1159, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/nvm/layer.py", "max_stars_repo_name": "khushbooG9/nvm", "max_stars_repo_head_hexsha": "c065af6ae1cb330cf0716d35bc4aebd46547888e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max...
import tensorflow as tf from PIL import Image import xml.dom.minidom as minidom import os import numpy as np class Predict_xml(object): def __init__(self, yolo, output_img_filename=None, output_xml_filename=None, save_originals=False): self.output_img_filename = output_img_filename self....
{"hexsha": "cea6ba5d987b7d42c839eb2652579ffb15ff1ae1", "size": 3796, "ext": "py", "lang": "Python", "max_stars_repo_path": "model_process/yolo/predict_xml.py", "max_stars_repo_name": "jease0502/baseball_video_to_txt", "max_stars_repo_head_hexsha": "179739b9776b66c3520b24a1e967aeee868fec44", "max_stars_repo_licenses": [...
import numpy as np import os import six.moves.urllib as urllib import sys import tarfile import tensorflow as tf import zipfile import cv2 import numpy as np import csv import time import sys import copy from collections import defaultdict from io import StringIO from matplotlib import pyplot as plt from PIL import Ima...
{"hexsha": "7137de9e14c8b22572830f22dcfb6f6d15b22973", "size": 7526, "ext": "py", "lang": "Python", "max_stars_repo_path": "vehicle_detection_main.py", "max_stars_repo_name": "kdkrkwhr/kdk_cv", "max_stars_repo_head_hexsha": "c00e0c9b9632b4a19497395b33208d3c9a08cc5f", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
// Copyright Oliver Kowalke 2009. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <stdio.h> #include <stdlib.h> #include <cmath> #include <cstdint> #include <cstdio> #...
{"hexsha": "8b25832d4c85db18264b4dc79a0a206ce1ad3148", "size": 14041, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "third_party/boost/libs/context/test/test_callcc.cpp", "max_stars_repo_name": "Jackarain/tinyrpc", "max_stars_repo_head_hexsha": "07060e3466776aa992df8574ded6c1616a1a31af", "max_stars_repo_licenses"...
import os import sys import h5py import numpy as np from pisa import ureg, Q_, FTYPE from pisa.core.binning import OneDimBinning, MultiDimBinning from pisa.core.map import Map, MapSet from pisa.core.stage import Stage from pisa.utils.comparisons import normQuant from pisa.utils.log import logging from pisa.utils.reso...
{"hexsha": "7c499b0d4774bcf7117c8f9656ab14b0606f4a84", "size": 11835, "ext": "py", "lang": "Python", "max_stars_repo_path": "pisa/stages/data/icc.py", "max_stars_repo_name": "austinschneider/pisa", "max_stars_repo_head_hexsha": "55a2e5461c7c29465b0f1309d6c4f5282f54d5ea", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
import pytest from numpy import random, ceil, array, clip from lightning import Lightning, Visualization from lightning.types.utils import mat_to_links class TestLightningPlots(object): @pytest.fixture(scope="module") def lgn(self, host): lgn = Lightning(host) lgn.create_session("test-plots")...
{"hexsha": "4a8c83dc5f72334e2ef2ec642945daf4de4c86c4", "size": 4045, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_plots.py", "max_stars_repo_name": "lightning-viz/lightning-python", "max_stars_repo_head_hexsha": "68563e1da82d162d204069d7586f7c695b8bd4a6", "max_stars_repo_licenses": ["MIT"], "max_sta...
import matplotlib.pyplot as plt import numpy as np import matplotlib.gridspec as gridspec from matplotlib.ticker import AutoMinorLocator import scipy.stats import matplotlib.lines as mlines def plotPdf(interval, values, rng, xlim=None): #### Colocar cor diferente nas áreas abaixo do gráfico fig, a...
{"hexsha": "60548c765eac48b6fca2d62442ea9cc5771fc496", "size": 6735, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/visuals.py", "max_stars_repo_name": "carlos-faria/Stochastic-Processes", "max_stars_repo_head_hexsha": "2ee57a1029566b606af781ec5d307eb33434fb79", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma lebesgue_measurable_imp_measurable_on_nnreal: fixes u :: "'a::euclidean_space \<Rightarrow> real" assumes "u \<in> borel_measurable lebesgue" "\<And>x. u x \<ge> 0""S \<in> sets lebesgue" shows "u measurable_on S" [PROOF STATE] proof (prove) goal (1 subgoal): 1. u measurable_on S [PROOF STEP] u...
{"llama_tokens": 329, "file": null, "length": 3}
\documentclass[a4]{article} \usepackage{graphicx} \usepackage{fullpage} \usepackage{code} \CodeNoNumber \newenvironment{codecase}[1]{\subsection{#1}}{} \usepackage[sort]{natbib} \newcommand{\citeasnoun}{\citet} \renewcommand{\cite}{\citep} %\emergencystretch=\hsize \lefthyphenmin=2 \righthyphenmin=2 %\tolerance=...
{"hexsha": "8b7c02a417ee93ea1819e9ab5d205f64de1417c7", "size": 41222, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/java/doc/main.tex", "max_stars_repo_name": "robotology-legacy/yarp1", "max_stars_repo_head_hexsha": "21434f5b776edea201b39a9644552dca59339dbc", "max_stars_repo_licenses": ["Artistic-1.0-Perl"],...
using ArgParse using BioSequences using CodecZlib using FASTX function dna_entropy(s) a, c, g, t = 0, 0, 0, 0 for nt in s if nt == 'A' a += 1 elseif nt == 'C' c += 1 elseif nt == 'G' g += 1 elseif nt == 'T' t += 1 end end total = a + c + g + t if total == 0 return 0 end h = 0 if a > 0 h -= a/tota...
{"hexsha": "319c2e41dba04437947b16424208653eeb8b7ccb", "size": 2411, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Ian/dust.jl", "max_stars_repo_name": "KorfLab/julie", "max_stars_repo_head_hexsha": "9a87778621d94fe2be6a578a59f3900007b5b186", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_...
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C11111111122222222223333333333444444444455555555556666666666777777777777 C23456789012345678901234567890123456789012345678901234567890123456789012 C C C UMAT_HIN.for Dama...
{"hexsha": "89556344a0eb9b702fe06c11af18a7b860040377", "size": 55297, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "UMATS/UMAT_HIN.for", "max_stars_repo_name": "kavi49/My-Repo", "max_stars_repo_head_hexsha": "cf6d719a5a348f19837fe9632f8173c0f3875cbb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 11...
import numpy as np from matplotlib import pyplot as plt import csv import math import pandas def plot_log(filename, show=True): data = pandas.read_csv(filename) fig = plt.figure(figsize=(4,6)) fig.subplots_adjust(top=0.95, bottom=0.05, right=0.95) fig.add_subplot(211) for key in data.keys(): ...
{"hexsha": "ad14a6f9854f3e727e888563bd3c73c8f5b01e14", "size": 879, "ext": "py", "lang": "Python", "max_stars_repo_path": "capsnet/utils.py", "max_stars_repo_name": "gsarti/cancer-detection", "max_stars_repo_head_hexsha": "a858a7c28e77da9ded9cdf6eb9abc5771183d848", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
\documentclass[10pt, a4paper, conference]{IEEEtran} %\IEEEoverridecommandlockouts % The preceding line is only needed to identify funding in the first footnote. If that is unneeded, please comment it out. \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} \usepackage{graphicx} \usepackage{textcomp} \usepackage{xco...
{"hexsha": "5f2bc95da8e08d310ed5633231fd7d988b171302", "size": 5040, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/a3-report/design-doc.tex", "max_stars_repo_name": "Matteas-Eden/kalah", "max_stars_repo_head_hexsha": "232694a6ed1646c385071d9654f4ca4f491d1947", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#ifdef _MSC_VER #define _SCL_SECURE_NO_WARNINGS #define ELFIO_NO_INTTYPES #endif #include <boost/test/unit_test.hpp> #include <boost/test/tools/output_test_stream.hpp> using boost::test_tools::output_test_stream; #include <elfio/elfio.hpp> using namespace ELFIO; /////////////////////////////////////////////////////...
{"hexsha": "1b771abe3d39accf6a1eee56e526e6c06c9eac14", "size": 4183, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/ELFIOTest2.cpp", "max_stars_repo_name": "QuasarApp/ELFIO", "max_stars_repo_head_hexsha": "71b6b9ba0ca8dab99392ca69ac0920f9818b8556", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
// Boost enable_if library // Copyright 2003 (c) The Trustees of Indiana University. // Use, modification, and distribution is 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) // Authors: Jaakko Jarvi (jajarvi at osl....
{"hexsha": "d5589aeab1f591dc5b7a2ecd87c63f35f08840a0", "size": 1274, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "venv/boost_1_73_0/libs/core/test/eif_namespace_disambiguation.cpp", "max_stars_repo_name": "uosorio/heroku_face", "max_stars_repo_head_hexsha": "7d6465e71dba17a15d8edaef520adb2fcd09d91e", "max_stars...
export FourRooms mutable struct FourRooms <: AbstractGridWorld world::GridWorldBase{Tuple{Empty,Wall,Goal}} agent_pos::CartesianIndex{2} agent::Agent end function FourRooms(;n=19, agent_start_pos=CartesianIndex(2,2)) objects = (EMPTY, WALL, GOAL) world = GridWorldBase(objects, n,n) world[EMPTY...
{"hexsha": "5de5897783bdc70cf62daf856e87564bd43eaeb7", "size": 1306, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/envs/fourrooms.jl", "max_stars_repo_name": "landrumb/GridWorlds.jl", "max_stars_repo_head_hexsha": "08c42e389098a85d408073a373475c9163cf1bab", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import numpy as np from helper import bezier, turnover_3d # helper function for view # compute cockpit array def compute_cockpit_arr(arg_class): """ compute cockpit numpy array(3D) :param arg_class: argument class :return: cockpit_arr(numpy ndarray) """ # set required parameters l1 = arg_...
{"hexsha": "14b8863c5ca7d27f67fe8a8d8eaf88937073aa57", "size": 28096, "ext": "py", "lang": "Python", "max_stars_repo_path": "component.py", "max_stars_repo_name": "muratataturo/AircraftPlot", "max_stars_repo_head_hexsha": "79cf8e264797beddfd5d9cf9ddaf29526020b8d6", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import sys import os import numpy as np import argparse import logging from sklearn.metrics import confusion_matrix import matplotlib.pyplot as plt import itertools import collections import torch import torch.nn as nn from torch.nn.functional import interpolate from torchvision import transforms, datasets, models, u...
{"hexsha": "7cef4637354544d88f0d9d29827fa8ec9dbfa5e3", "size": 28823, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/commons.py", "max_stars_repo_name": "kampta/PatchVAE", "max_stars_repo_head_hexsha": "816f4b49fd8b836641d7e1068c1e802ae0453742", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9, "m...
""" Created on 1/24/2017, 4:32 PM @author: jason.chen """ import datetime import os import pandas as pd import matplotlib.pyplot as plt import matplotlib from bs4 import BeautifulSoup from titlecase import titlecase from urllib2 import build_opener, HTTPCookieProcessor from matplotlib.ticker import FuncFormatter fro...
{"hexsha": "f8a97bc617d181c940d5cee1db61471d382bbe70", "size": 7428, "ext": "py", "lang": "Python", "max_stars_repo_path": "carstats.py", "max_stars_repo_name": "jaisenc/carstats", "max_stars_repo_head_hexsha": "0a5f70018f6f27758984761a8580e514a0afc8d9", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1, ...
function feat = spp_poolX_to_fcX(feat, layer, spp_model, use_gpu) % feat = spp_poolX_to_fcX(feat, layer, spp_model, use_gpu) % On-the-fly conversion of last pool features to fcX % using the weights and biases stored in spp_model.cnn.layers. % feat is transformed in columns for continuous memory access and fast % ...
{"author": "ShaoqingRen", "repo": "SPP_net", "sha": "ca9675907f8af6c02773571bc91147b3a2ddfcc1", "save_path": "github-repos/MATLAB/ShaoqingRen-SPP_net", "path": "github-repos/MATLAB/ShaoqingRen-SPP_net/SPP_net-ca9675907f8af6c02773571bc91147b3a2ddfcc1/spp_poolX_to_fcX.m"}
[STATEMENT] lemma scaleR_le_cancel_left: "c *\<^sub>R a \<le> c *\<^sub>R b \<longleftrightarrow> (0 < c \<longrightarrow> a \<le> b) \<and> (c < 0 \<longrightarrow> b \<le> a)" for b :: "'a::ordered_real_vector" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (c *\<^sub>R a \<le> c *\<^sub>R b) = ((0 < c \<longrig...
{"llama_tokens": 226, "file": null, "length": 1}
import numpy as np import tensorflow as tf def get_generator(input): net = tf.layers.dense(input, 7 * 7 * 256, activation=tf.nn.relu, kernel_initializer=tf.uniform_unit_scaling_initializer(1.43)) net = tf.reshape(net, [-1, 7, 7, 256]) net = tf.layers.conv2d_transpose(net, 128, [2...
{"hexsha": "f9b20093a4750ab614a1f4c107b57ecb6a31ee32", "size": 1721, "ext": "py", "lang": "Python", "max_stars_repo_path": "GAN-MNIST/models.py", "max_stars_repo_name": "mystic123/tensorflow-gan", "max_stars_repo_head_hexsha": "35c4a5e3f42a0d3100bd26fdb316ab8c041886ba", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#! /usr/bin/env python # Import required libraries from python import sys, os, struct import osgeo.gdal as gdal from numpy import interp # Define the class GDALCalcNDVI class GDALCalcNDVI (object): # A function to create the output image # @staticmethod # A function to create the output image def cr...
{"hexsha": "b4eae083537e57553e7449daf25d21662051e0b7", "size": 5595, "ext": "py", "lang": "Python", "max_stars_repo_path": "playground/Dockerfile-gdal-python/GDALCalcNDVI.py", "max_stars_repo_name": "Noumena-bcn/pointcloud-data-fusion", "max_stars_repo_head_hexsha": "02ba8bfa8510b530515529ade4baeeb7b7dc4eef", "max_star...
/* * This file is part of the CitizenFX project - http://citizen.re/ * * See LICENSE and MENTIONS in the root of the source tree for information * regarding licensing. */ #include "StdInc.h" #include "ResourceUI.h" #include <include/cef_origin_whitelist.h> #include <NUISchemeHandlerFactory.h> #incl...
{"hexsha": "8b2c097cf1508caa6a8eb160264938653eb2e1aa", "size": 4653, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "code/components/nui-resources/src/ResourceUI.cpp", "max_stars_repo_name": "ESX-Org/fivem", "max_stars_repo_head_hexsha": "1dd315b62c07d5571e0369e52b4987d01596d1b2", "max_stars_repo_licenses": ["MIT"...
import numpy as np import re class sourcemodel(object): "class representing finite fault model for an earthquake" def __init__(self, filename): """ Reads data from an fsp file (see Martin Mai's database online at equake-rc.info/SRCMOD/fileformats/) """ f = open(filename,...
{"hexsha": "0950381199c522103a399fe40063beb0de5949eb", "size": 7688, "ext": "py", "lang": "Python", "max_stars_repo_path": "seistools/source.py", "max_stars_repo_name": "egdaub/seistools", "max_stars_repo_head_hexsha": "9ec61de03c2231760dba6a42e7fa2018309a99f3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2,...
from sequence_generation.digest import tryptic, random_digest from math import ceil from random import choice, randint import numpy as np digest_functions = { 'random': random_digest, 'trypsin': tryptic } def length_dist(num_peptides: int, dist='beta', min_length=4, max_length=35, a=2.3, b=7) -> list: '''...
{"hexsha": "f4d887a4de6b410de19173e5b9ea02406dd87177", "size": 11961, "ext": "py", "lang": "Python", "max_stars_repo_path": "testing framework/sequence_generation/peptides.py", "max_stars_repo_name": "jamessdixon/hypedsearch", "max_stars_repo_head_hexsha": "e294208cd5e66b897527d7d819c337b61ea7dde8", "max_stars_repo_lic...
import os from argparse import ArgumentParser from collections import Counter from functools import partial from multiprocessing import Pool, Manager from os.path import exists, join import numpy as np from nltk.tokenize import word_tokenize from tqdm import tqdm import utils.data_utils as du import utils.func_utils ...
{"hexsha": "b1d6a5b054b088761038bc4aececddc48b50c912", "size": 8620, "ext": "py", "lang": "Python", "max_stars_repo_path": "process/text.py", "max_stars_repo_name": "Tommy-Liu/MovieQA_Contest", "max_stars_repo_head_hexsha": "4281bf4a731aa14a0d19f18adda31d59a4a297cb", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import cv2 import numpy as np OPENCV_MAJOR_VERSION = int(cv2.__version__.split('.')[0]) img = np.zeros((200, 200), dtype=np.uint8) img[50:150, 50:150] = 255 ret, thresh = cv2.threshold(img, 127, 255, 0) if OPENCV_MAJOR_VERSION >= 4: # OpenCV 4 or a later version is being used. contours, hier = cv2.findConto...
{"hexsha": "5be91488c031db1f584e8f4f4c0319393bbd587e", "size": 923, "ext": "py", "lang": "Python", "max_stars_repo_path": "chapter03/contours.py", "max_stars_repo_name": "ankona/Learning-OpenCV-4-Computer-Vision-with-Python-Third-Edition", "max_stars_repo_head_hexsha": "caa9326e310253fba1aab624b46ea899ce16a21f", "max_s...
import numpy import tensorflow as tf from . import settings as s import skimage.io import skimage.transform import tarfile from urllib.request import urlretrieve import threading import os import sys from functools import partial from contextlib import contextmanager import json import subprocess import zipfile def ...
{"hexsha": "dd4e67cfaa93f3cc3344d83e2faa29281f9ad54e", "size": 17732, "ext": "py", "lang": "Python", "max_stars_repo_path": "util/utils.py", "max_stars_repo_name": "PentaHiggs/fantastic-pancakes", "max_stars_repo_head_hexsha": "da8822a29397af20c2916fdd97c98f195833949a", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
[STATEMENT] lemma minimal_observable_code : assumes "observable M" shows "minimal M = (\<forall> q \<in> states M . ofsm_table_fix M (\<lambda>q . states M) 0 q = {q})" [PROOF STATE] proof (prove) goal (1 subgoal): 1. minimal M = (\<forall>q\<in>FSM.states M. ofsm_table_fix M (\<lambda>q. FSM.states M) 0 q = {q}) ...
{"llama_tokens": 2101, "file": "FSM_Tests_Minimisation", "length": 16}
import numpy as np from agents import QAgent from policies import Policy class SarsaAgent(QAgent): def __init__(self, env, policy: Policy, gamma=0.99, alpha=0.5): self.t = 0 # indicate we are at the beginning of the episode super().__init__(env, policy, gamma=gamma, alpha=alpha) def train(self...
{"hexsha": "f584adb1abfd749cbf7817d3c076062ea446edd6", "size": 784, "ext": "py", "lang": "Python", "max_stars_repo_path": "agents/SarsaAgent.py", "max_stars_repo_name": "ande765a/reinforcement-exploration", "max_stars_repo_head_hexsha": "2a41aebc4817e159861371370720f03f4471c3b7", "max_stars_repo_licenses": ["MIT"], "ma...
addpath('../src/') addpath('../src/utils/') % fix random seed rng(0); % make your own discrete linear system with disturbance A = [1 1; 0 1]; B = [0.5; 1]; Q = diag([1, 1]); R = 0.1; W_vertex = [0.15, 0.15; 0.15, -0.15; -0.15, -0.15; -0.15, 0.15]; % construct a convex set of disturbance (2dim here) W = Polyhedron(W...
{"author": "HiroIshida", "repo": "robust-tube-mpc", "sha": "427a181dd368f0b60b1ecfa81e33e062ff0359e0", "save_path": "github-repos/MATLAB/HiroIshida-robust-tube-mpc", "path": "github-repos/MATLAB/HiroIshida-robust-tube-mpc/robust-tube-mpc-427a181dd368f0b60b1ecfa81e33e062ff0359e0/example/example_tubeMPC.m"}
# -*- coding: utf-8 -*- # Author: Qitao Zhao # More info: https://github.com/streamlit/demo-self-driving import cv2 import psutil import pyowm import urllib from datetime import datetime, timedelta import numpy as np import pandas as pd import streamlit as st from streamlit_echarts import st_echarts from utils import...
{"hexsha": "f0ce2058db105068b4b98ad198ccde59bd355389", "size": 9712, "ext": "py", "lang": "Python", "max_stars_repo_path": "my_streamlit_app.py", "max_stars_repo_name": "QitaoZhao/Car-Detection-Streamlit", "max_stars_repo_head_hexsha": "50b794eba208c99f3b80b3b67b272dd4bd3f6627", "max_stars_repo_licenses": ["Apache-2.0"...
% !TEX root = main.tex %------------------------------------------------- \section{Non-negative variables}\label{sec:expe} Next we define the expectation for random variables that take only non-negative values. \begin{definition}[Expectation of non-negative random variables]\label{def:expe_non-negative} \ben \it T...
{"hexsha": "519715bb3f5139cdce04343fe1aa356a85e4cab2", "size": 2679, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "L5/MA2500/04B_nonnegative.tex", "max_stars_repo_name": "gillardjw/notes", "max_stars_repo_head_hexsha": "58b3f7e8e2c289a88905bda689c95483bee04490", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
-- build instructions: -- $ cd calc && idris2 --build calc.ipkg && idris2 --install calc.ipkg -- $ cd .. && idris2 --package calc CalcClient.idr --- module Main import Data.Strings import Calc %default total readNum : HasIO io => io (Maybe Int) readNum = do putStr "Enter a number: " ns <- getLine ...
{"hexsha": "ff4e022228381d059ae63bbde981ce8e51a6040a", "size": 998, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "getting_started/CalcClient.idr", "max_stars_repo_name": "timmyjose-study/idris-from-the-docs", "max_stars_repo_head_hexsha": "ea1b7af57245ddb29b5d9d24ae623e37ecc01d12", "max_stars_repo_licenses": [...
""" Functions to calculate different visualisations for 1D models """ from tensorflow.keras.models import Model from signal_screen_tools import add_zeros, change_last_activation_to_linear, normalise_array import numpy as np import tensorflow as tf def calculate_occlusion_sensitivity(model: Model, data: np.ndarray, ...
{"hexsha": "eb22a3b2b3cc6627aa18f7e7d4aedadf8f41e8d6", "size": 6591, "ext": "py", "lang": "Python", "max_stars_repo_path": "signal_screen.py", "max_stars_repo_name": "Foxpace/SignalScreen", "max_stars_repo_head_hexsha": "3c4bd9d5f4dbd7c7b570da00a501064c82f48453", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
function tagS = patient_module_tags %"patient_module_tags" % Return the tags used to represent a patient as specified by C.7.1.1 in % PS3.3 of 2006 DICOM specification. Tags are returned in a struct array % with 3 fields: % % Tag: String containing hex DICOM tag of a field. % Type: String describing type o...
{"author": "cerr", "repo": "CERR", "sha": "d320754abad9dcb78508ab69f33ae9f644202114", "save_path": "github-repos/MATLAB/cerr-CERR", "path": "github-repos/MATLAB/cerr-CERR/CERR-d320754abad9dcb78508ab69f33ae9f644202114/ML_Dicom/modules/module_tags/patient_module_tags.m"}
import numpy as np from ...functional import softmax class CrossEntropyLoss(): def __init__(self,): self.gradient = None self.previous_probabilities = None self.previous_targets = None def forward(self, prediction_logits : np.array, targets : np.array): """this function does: ...
{"hexsha": "59c35be56c2964a9e73030bbb012f1fa0f39d78d", "size": 1923, "ext": "py", "lang": "Python", "max_stars_repo_path": "LinearNN/Package/NumpyNN/blocks/losses/CrossEntropyLoss.py", "max_stars_repo_name": "SebChw/DL-Architectures", "max_stars_repo_head_hexsha": "dd3ac32908808383e98abfeb7498edf59b04c6d5", "max_stars_...
import itertools import warnings from enum import Enum from typing import List, Union, Tuple from typing import Set import numpy as np from commonroad.planning.planning_problem import PlanningProblem from commonroad.scenario.scenario import Scenario from SMP.route_planner.route_planner.utils_route import chaikins_cor...
{"hexsha": "805e1f8072ee88a8d725cbca01ba9599c7d8f413", "size": 16599, "ext": "py", "lang": "Python", "max_stars_repo_path": "Informatics/Artificial Intelligence/AI (IN2062) - TUM/CommonRoad - Search/SMP/route_planner/route_planner/route.py", "max_stars_repo_name": "MarcosSalib/Cocktail_MOOC", "max_stars_repo_head_hexsh...
#!/usr/bin/python # Copyright (c) 2019 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...
{"hexsha": "9121defb61945cae4cade362dbee1b1b6c95fa15", "size": 21859, "ext": "py", "lang": "Python", "max_stars_repo_path": "deprecated/examples/deepFM/distribute_base.py", "max_stars_repo_name": "hutuxian/FleetX", "max_stars_repo_head_hexsha": "843c7aa33f5a14680becf058a3aaf0327eefafd4", "max_stars_repo_licenses": ["Ap...
from abc import ABC, abstractmethod from collections.abc import MutableSequence from gym_socks.envs.core import BaseDynamicalObject import numpy as np from scipy.integrate import solve_ivp class _WorldObjectMeta(type): """_WorldObject meta class. The meta class defines a virtual interface for world objects...
{"hexsha": "682fef88707a005a21e0a38ff04727746e072539", "size": 5627, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym_socks/envs/world.py", "max_stars_repo_name": "ajthor/socks", "max_stars_repo_head_hexsha": "77063064ceb5a5da3f01733bef0885b00d4b2bed", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
import numpy as np import matplotlib.pyplot as plt kj = 160 # 单位veh/km uf = 87.84 # 单位 km/h def draw(): k1 = np.arange(150) u1 = uf*(1 - k1/kj) plt.subplot(221) plt.plot(k1, u1) plt.ylabel("speed") plt.xlabel("density") plt.title("density-speed") plt.subplot(222) u2 = np.arange(10...
{"hexsha": "51e3569f7e88341cf35eedf66f05f8c7ca156529", "size": 644, "ext": "py", "lang": "Python", "max_stars_repo_path": "mfd_model/green_shields.py", "max_stars_repo_name": "TwelveYC/road-network-modeling", "max_stars_repo_head_hexsha": "a55de12c6f11c7aa4b994fee9a8dd1f31e0775fb", "max_stars_repo_licenses": ["MIT"], "...
"""Helpers for formatting functionality.""" from typing import Any, Dict, Hashable import numpy from ..debugging.custom_assert import assert_true SPECIAL_OBJECT_MAPPING: Dict[Any, str] = { numpy.float32: "float32", numpy.float64: "float64", numpy.int8: "int8", numpy.int16: "int16", numpy.int32: ...
{"hexsha": "6121e444bc65162e15f79e8c20159abcf68a5d34", "size": 1386, "ext": "py", "lang": "Python", "max_stars_repo_path": "concrete/common/helpers/formatting_helpers.py", "max_stars_repo_name": "iciac/concrete-numpy", "max_stars_repo_head_hexsha": "debf888e9281263b731cfc4b31feb5de7ec7f47a", "max_stars_repo_licenses": ...
from pyautodiff.dual import Dual import inspect import numpy as np class AutoDiff: def __init__(self, fn, ndim=1,multivar=False): """ fn : function, the function of which we want to calculate the derivative ndim : float, the number of dimensions of the function l : the number of par...
{"hexsha": "d6c462eb7af585dd5a92bc56f8282699edd24b8b", "size": 5795, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyautodiff/interface.py", "max_stars_repo_name": "CS207-group2/cs207-FinalProject", "max_stars_repo_head_hexsha": "16f6cee5b7102bb66ede71805cc87db5f979229d", "max_stars_repo_licenses": ["MIT"], "m...
import math, os import numpy as np import torch def normal_entropy(std): var = std.pow(2) entropy = 0.5 + 0.5 * torch.log(2 * var * math.pi) return entropy.sum(1, keepdim=True) def normal_log_density(x, mean, log_std, std): var = std.pow(2) log_density = -(x - mean).pow(2) / ( 2 * var)...
{"hexsha": "217a0e5fe8827df172b0e60ba59ac7bf0157f82b", "size": 2719, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "Stanford-ILIAD/Learn-Imperfect-Varying-Dynamics", "max_stars_repo_head_hexsha": "25191f7b076033ac9dbe8fd08f2a92e3caa57cb3", "max_stars_repo_licenses": ["MIT"], "...
# ###################################################################### # Copyright (c) 2014, Brookhaven Science Associates, Brookhaven # # National Laboratory. All rights reserved. # # # # Redistribution and use in ...
{"hexsha": "d508b34db9a53e2eaa5397fea0a5be3b487a2dec", "size": 12765, "ext": "py", "lang": "Python", "max_stars_repo_path": "vttools/vtmods/utils.py", "max_stars_repo_name": "sameera2004/VTTools", "max_stars_repo_head_hexsha": "d51c8eee338fc7ffc9b86f8387e6e3c06606b412", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
[STATEMENT] lemma pos_minus_divideC_le_eq [field_simps]: "- (b /\<^sub>C c) \<le> a \<longleftrightarrow> - b \<le> c *\<^sub>C a" if "c > 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (- (b /\<^sub>C c) \<le> a) = (- b \<le> c *\<^sub>C a) [PROOF STEP] using that [PROOF STATE] proof (prove) using this: 0 < c ...
{"llama_tokens": 235, "file": "Complex_Bounded_Operators_Complex_Vector_Spaces0", "length": 2}
""" The MIT License (MIT) Copyright (c) 2017 Marvin Teichmann """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import numpy as np import scipy as scp import logging logging.basicConfig(format='%(asctime)s %(levelname)s %(message)...
{"hexsha": "67ac435bf4280093cbebdaa826a672745317d136", "size": 2762, "ext": "py", "lang": "Python", "max_stars_repo_path": "pydensecrf/tests/test_pycrf.py", "max_stars_repo_name": "MarvinTeichmann/pydensecrf", "max_stars_repo_head_hexsha": "52be6a56656cd0a7cc7a7111873eb0b622f0f15b", "max_stars_repo_licenses": ["MIT"], ...
# -------------- #Importing header files import pandas as pd import numpy as np import matplotlib.pyplot as plt #Path of the file data = pd.read_csv(path) data.rename(columns={'Total': 'Total_Medals'}, inplace=True) print(data.head(10)) #Code starts here # -------------- #Code starts here data['B...
{"hexsha": "02f1b02dcad0a7372a1d18a1be845b2b06b7e578", "size": 3283, "ext": "py", "lang": "Python", "max_stars_repo_path": "code.py", "max_stars_repo_name": "singhbipin2117/olympic-hero", "max_stars_repo_head_hexsha": "57715b73e4793d6fb1e196ca2265609906e9c919", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import numpy as np from matplotlib import cm import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from scipy.signal import welch from itertools import islice import matplotlib as mpl from scipy.spatial import distance from sklearn.linear_model import LinearRegression from scipy.ndimage import gaussia...
{"hexsha": "aa37547a625f793d77e3411e6a47ae84f150c19b", "size": 4974, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/features/helpers.py", "max_stars_repo_name": "oesst/HRTF_neural_model", "max_stars_repo_head_hexsha": "494d29c514eaad3aee575f77d08a59a9d011a415", "max_stars_repo_licenses": ["MIT"], "max_stars...
@blueprint struct License <: MustacheBlueprint template_dir::String = default_template("licenses") name::String = "MIT" end function src_file(bp::License, ctx::Context) return joinpath(bp.template_dir, bp.name) end function dst_file(::License, ctx::Context) return joinpath(ctx.kwargs.path, "LICENSE") ...
{"hexsha": "05e47ab5ba0a20010e85ccf95d4d5c1abf367ac3", "size": 487, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/blueprints/license.jl", "max_stars_repo_name": "Roger-luo/Ion.jl", "max_stars_repo_head_hexsha": "56ffaf366daf44a4baf1138e80bb658cbe2d0d9a", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
C-- File port_rand.F: Portable random number generator functions C-- Contents C-- o PORT_RAND C-- o PORT_RANARR C-- o PORT_RAND_NORM C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| CBOP C !ROUTINE: PORT_RAND C !INTERFACE: real*8 FUNCTION PORT_RAND(s...
{"hexsha": "7cc277e8a15f4c8b31690ef619c570196b11b9d8", "size": 3649, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "build/port_rand.f", "max_stars_repo_name": "ElizabethYankovsky/MITgcm", "max_stars_repo_head_hexsha": "9e3cbd9dd7b61dbea201517a5c776fc7748f82af", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
using Test using Mimi using MimiPAGE2009 using MimiPAGE2009: readpagedata, buildpage, initpage, load_parameters, setdistinctparameter function test_page_model() m = Model() set_dimension!(m, :time, [2009, 2010, 2020, 2030, 2040, 2050, 2075, 2100, 2150, 2200]) set_dimension!(m, :region, ["EU", "USA", "...
{"hexsha": "767e28952bcbc03b419d52b0b84cc89fd1b9ec1d", "size": 1563, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "gianeconomics/MimiPAGE2009.jl", "max_stars_repo_head_hexsha": "c21fda3a76c3ed3a4bfdfddaff7b56ac71cff0ec", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Utilities to keep track of performance """ import os import numpy as np import threading from time import time try: import psutil except ImportError as exc: psutil = Non...
{"hexsha": "9ed380eb0441e5adf659e4c21cf5a88307386cdf", "size": 12128, "ext": "py", "lang": "Python", "max_stars_repo_path": "nipype/utils/profiler.py", "max_stars_repo_name": "napoliamo/nipype", "max_stars_repo_head_hexsha": "a2b21f861af38f62490147030a65ebca4839e6c4", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
import unittest import numpy as np import torch import torch.optim as optim import horovod.torch as hvd from mpi4py import MPI from qmctorch.sampler import Metropolis from qmctorch.solver import SolverSlaterJastrowHorovod from qmctorch.scf import Molecule from qmctorch.wavefunction import SlaterJastrow from qmctorch....
{"hexsha": "a0b2543ca33c3c3848b87d62b20f62b94954177c", "size": 4339, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests_hvd/test_h2_hvd.py", "max_stars_repo_name": "NLESC-JCER/QMCTorch", "max_stars_repo_head_hexsha": "c56472cd3e9cc59f2e01a880e674b7270d2cdc2b", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
import stk import os from collections import namedtuple from os.path import join import numpy as np from ..._test_utilities import _test_dump_and_load test_dir = 'cof_topology_tests_output' if not os.path.exists(test_dir): os.mkdir(test_dir) def _alignment(vertex, building_block): fg_position = building_bl...
{"hexsha": "af65df103bf88b615259ec218c10ac9d5c9bb451", "size": 9775, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/molecular/topology_graphs/test_cof_topologies.py", "max_stars_repo_name": "fiszczyp/stk", "max_stars_repo_head_hexsha": "56e75c493a472d98ccbf3af14cc9ce7f12cbe3d7", "max_stars_repo_licenses":...
import requests import numpy as np import cv2 import pytesseract import re from datetime import datetime from bs4 import BeautifulSoup from apitizer.month_conversion import MONTHS class ImageParser: def __init__(self, config): self.url = config["url"] self.image = None self.resp_data = No...
{"hexsha": "3443a26733826c1e11038993309c4b51ae2d2443", "size": 4415, "ext": "py", "lang": "Python", "max_stars_repo_path": "apitizer/img_parser.py", "max_stars_repo_name": "incebellipipo/apitizer", "max_stars_repo_head_hexsha": "ab90822b03f9821ed7892129a83209ff533f2c50", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# Reference: http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/Python_html/300_Segmentation_Overview.html import brainlit import SimpleITK as sitk from sklearn.mixture import GaussianMixture import numpy as np def get_seed(voxel): """ Get a seed point for the center of a brain volume. Pa...
{"hexsha": "bec07bf7777234e0cadb0201046de9d2ac8b9b58", "size": 12592, "ext": "py", "lang": "Python", "max_stars_repo_path": "brainlit/algorithms/generate_fragments/adaptive_thresh.py", "max_stars_repo_name": "alishakodibagkar/brainlit", "max_stars_repo_head_hexsha": "2dc12eac3ea71412a36ecace3bab2deebd2ef29c", "max_star...
# See https://en.wikipedia.org/wiki/Grover%27s_algorithm from sympy.physics.quantum.qapply import qapply from sympy.physics.quantum.qubit import IntQubit from sympy.physics.quantum.grover import OracleGate, superposition_basis, grover_iteration if __name__ == "__main__": cases = [ "qapply(OracleGate(2, la...
{"hexsha": "95bded3ddc930e8f0e9c709b4a4cd5cf30b97379", "size": 771, "ext": "py", "lang": "Python", "max_stars_repo_path": "reasoning/python/grover.py", "max_stars_repo_name": "pmoura/eye", "max_stars_repo_head_hexsha": "03a4be110f5e9f8f21a6b1ac2756d79cc6518386", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
subroutine foo(*, i) print *, "foo is entered with ", i if(i.gt.0) then print *, 'RETURN 1 in FOO' return 1 endif i = i + 1 end
{"hexsha": "14346f8b51a259b3fbe8b3060044be866b62e019", "size": 182, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "packages/PIPS/validation/Syntax/altret09.src/foo.f", "max_stars_repo_name": "DVSR1966/par4all", "max_stars_repo_head_hexsha": "86b33ca9da736e832b568c5637a2381f360f1996", "max_stars_repo_licenses": ...
''' Tests for bdpy.stats Tested functions: - corrcoef - corrmat ''' import unittest import numpy as np import bdpy.stats as bdst class TestStats(unittest.TestCase): '''Tests for bdpy.stats''' def test_corrcoef_matrix_matrix_default(self): '''Test for corrcoef (matrix and matrix, default, va...
{"hexsha": "52da76860fd0df745b5fcfc5b3e9a5bc0366b096", "size": 4232, "ext": "py", "lang": "Python", "max_stars_repo_path": "bdpy/test/test_stats.py", "max_stars_repo_name": "miyosuda/bdpy", "max_stars_repo_head_hexsha": "c455504d8059e911c09b602fbbb9f01452a1ee1a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import numpy import cv2 import face_recognition as fr import time import encodes import message import requests from firebase import firebase from imutils.video import VideoStream webcam = VideoStream(src=0).start() prevTime = 0 # path = "Images" # image_list = os.listdir(path) # print(image_list) # image_names = [] ...
{"hexsha": "4cab1640460697ab88b69cc92ac7b8486dd9f7cd", "size": 2785, "ext": "py", "lang": "Python", "max_stars_repo_path": "Mask Detection/face_detection.py", "max_stars_repo_name": "aman162000/mask_detection", "max_stars_repo_head_hexsha": "fb5915eb287fc10acd075aa4571a0abe0f68983d", "max_stars_repo_licenses": ["MIT"],...
% !TEX encoding = UTF-8 % !TEX TS-program = pdflatex % !TEX root = ../tesi.tex % !TEX spellcheck = it-IT %************************************************************** \chapter{Source Code} \label{cap:source code} %************************************************************** \intro{In this chapter is reported the ...
{"hexsha": "5aebdea95f73313ef5a5d568ac359e9e336e3f02", "size": 10621, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "relation/capitoli/capitolo-3.tex", "max_stars_repo_name": "sirCamp/bioinformatics", "max_stars_repo_head_hexsha": "2609044c57eba1097263829f9db579cd1825b8bb", "max_stars_repo_licenses": ["MIT"], "ma...
C*********************************************************************** C Module: test.f (test routine for fonts in Xplot/sym) C C Copyright (C) 1996 Harold Youngren, Mark Drela C C This program is free software; you can redistribute it and/or modify C it under the terms of the GNU General Public Li...
{"hexsha": "da482b8d1c9b8a59113cdcb174441f6230d9d43d", "size": 5281, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "JVL1.06/Jvl/plotlib/sym/test.f", "max_stars_repo_name": "wcordelo/1682-jvl-matlab", "max_stars_repo_head_hexsha": "61eab16ba484da4e85099fe08d8ce3baf9f5beca", "max_stars_repo_licenses": ["MIT"], "m...
/- Copyright (c) 2018 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Jens Wagemaker ! This file was ported from Lean 3 source module algebra.associated ! leanprover-community/mathlib commit 2f3994e1b117b1e1da49bcfb67334f33460c3ce4 ! Ple...
{"author": "leanprover-community", "repo": "mathlib4", "sha": "b9a0a30342ca06e9817e22dbe46e75fc7f435500", "save_path": "github-repos/lean/leanprover-community-mathlib4", "path": "github-repos/lean/leanprover-community-mathlib4/mathlib4-b9a0a30342ca06e9817e22dbe46e75fc7f435500/Mathlib/Algebra/Associated.lean"}
#include "core.hpp" #include "FireControlSystem.hpp" #include <boost/range/adaptors.hpp> #include <boost/range/algorithm.hpp> glm::vec4 FireControlSystem::recalculate(const glm::vec4& pointInWS) { return pointInWS; } void FireControlSystem::updateTarget(const glm::vec4& pointInWS) { m_pointInWS = pointInWS; ...
{"hexsha": "8f8b3d9ca36b2be0b2fa8ed451b9a8febd686313", "size": 1152, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Vehicles/Systems/FireControlSystem.cpp", "max_stars_repo_name": "LazyFalcon/TechDemo-v4", "max_stars_repo_head_hexsha": "7b865e20beb7f04fde6e7df66be30f555e0aef5a", "max_stars_repo_licenses": ["M...
"""Implementation of sample defense. This defense loads inception v3 checkpoint and classifies all images using loaded checkpoint. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import glob import numpy as np from scipy.misc import imread i...
{"hexsha": "a9a08b46cc9c6077bb8058a2db182a706004241a", "size": 12386, "ext": "py", "lang": "Python", "max_stars_repo_path": "defense/defense.py", "max_stars_repo_name": "jaesik817/nips17_adv_attack", "max_stars_repo_head_hexsha": "41741e98a4c26185316f6bafa4a41c5f9f1e503b", "max_stars_repo_licenses": ["MIT"], "max_stars...
# -*- coding: utf-8 -*- import os import random import shutil import unittest from collections import defaultdict import six from six import StringIO import networkx as nx from networkx.algorithms.traversal.depth_first_search import dfs_edges import anadama2 import anadama2.grid.sge import anadama2.backends from anad...
{"hexsha": "6a83fc68ac4f0e67668223e18f88ffbb74c8484f", "size": 6853, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_sge.py", "max_stars_repo_name": "biobakery/anadama2_test", "max_stars_repo_head_hexsha": "46d06f7efc24ae067a1b6cc2841eda0c2a328daf", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers // // This file is part of Bytecoin. // // Bytecoin is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of ...
{"hexsha": "a50b896d6dd7fef9bd253da4005952adb620a67c", "size": 5717, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/BlockchainExplorer/BlockchainExplorerDataSerialization.cpp", "max_stars_repo_name": "ElSamaritan/blockchain-OLD", "max_stars_repo_head_hexsha": "ca3422c8873613226db99b7e6735c5ea1fac9f1a", "max_s...
#include <fstream> #include <boost/algorithm/string.hpp> #include <harp.hpp> #include <specex_fits.h> #include <specex_trace.h> #include <specex_gauss_hermite_psf.h> using namespace std ; static void AddRow2(specex::FitsTable& table,const string& PARAM, harp::vector_double& coeff, int legdegx, int legdegw) { std::v...
{"hexsha": "6b2c22d61c33f9b075a48022b3c4f0ec5c20cca8", "size": 21008, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/library/specex_psf_io_gauss_hermite_psf_fits_3.cc", "max_stars_repo_name": "marcelo-alvarez/specex", "max_stars_repo_head_hexsha": "809c5540e76dc1681453488732d5845078427ad1", "max_stars_repo_lic...
\docType{data} \name{millas} \alias{millas} \title{Datos de economía de combustible de 1999 y 2008 para 38 modelos populares de automóviles} \format{Un data.frame con 234 filas y 11 columnas \describe{ \item{fabricante}{fabricante} \item{modelo}{nombre del modelo} \item{motor}{tamaño del motor del automóvil, en litros}...
{"hexsha": "3addec3a9cbf79e65f0fea09cfbde3f6c4a43b7a", "size": 1155, "ext": "rd", "lang": "R", "max_stars_repo_path": "man/millas.rd", "max_stars_repo_name": "RubenMaier/datos", "max_stars_repo_head_hexsha": "c0606f7df0701d944cf0fe762cd29e821e53e75c", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count": 1, "max_s...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core, workspace import caffe2.python.hypothesis_test_util as hu import numpy as np from hypothesis import given import hypothesis.strategies as...
{"hexsha": "18d1e15a74eecbafe583d613197e93553853eb82", "size": 4322, "ext": "py", "lang": "Python", "max_stars_repo_path": "caffe2/python/lengths_reducer_fused_8bit_rowwise_ops_test.py", "max_stars_repo_name": "shigengtian/caffe2", "max_stars_repo_head_hexsha": "e19489d6acd17fea8ca98cd8e4b5b680e23a93c5", "max_stars_rep...
/* ** Copyright (C) 2019 SoftBank Robotics Europe ** See COPYING for the license */ #include <ka/scoped.hpp> #include <qi/os.hpp> #include <src/messaging/applicationsession_internal.hpp> #include <boost/algorithm/string/join.hpp> #include <boost/range/adaptor/transformed.hpp> #include <gmock/gmock.h> using namespac...
{"hexsha": "ada8162de2e2006564045937fc08f65e590904d7", "size": 8340, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/messaging/test_appsession_internal.cpp", "max_stars_repo_name": "arntanguy/libqi", "max_stars_repo_head_hexsha": "7f3e1394cb26126b26fa7ff54d2de1371a1c9f96", "max_stars_repo_licenses": ["BSD-3-...
from collections import deque import time import numpy as np import ray import copy import torch from . import utils class RemoteAgent(object): def __init__(self, policy_prototype, policy_kwargs, make_env_fn, params_server_handle, ...
{"hexsha": "05cc3a88488dc0d89d423123af71bb80aa26b72a", "size": 6363, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/workers.py", "max_stars_repo_name": "twoleggedeye/ray-ddpg", "max_stars_repo_head_hexsha": "5d9a69e4ad361d4dd5ad5b1a61957a1f73742073", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4...
/******************************************************************* Author: David Ge (dge893@gmail.com, aka Wei Ge) Last modified: 11/16/2020 Allrights reserved by David Ge ********************************************************************/ #include "Space.h" #include "Curl.h" #include "../MathTools/Matrix....
{"hexsha": "f595ffabea9ebf01a0f2be258f5d2158f2c0faa7", "size": 14890, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Source Code V2/Tss/Space.cpp", "max_stars_repo_name": "DavidGeUSA/TSS", "max_stars_repo_head_hexsha": "e364e324948c68efc6362a0db3aa51696227fa60", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np import pyglet from pyglet.gl import * # sphere stuff from ..sim.sphere_sim import getshader, resource_file from ..sim import sphere_sim from ..sphere import sphere from ..utils.shader import ShaderVBO, shader_from_file from ..utils.np_vbo import VBuf, IBuf from ..utils import transformations as tn ...
{"hexsha": "66cb430d34bff3b4f88b250458b13ed01d3edc08", "size": 2170, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyspheregl/demo/rotation_test.py", "max_stars_repo_name": "JosephOHagan/pyspheregl", "max_stars_repo_head_hexsha": "4258f8bb69372f0cb33ea1d859aaa1d8195e0167", "max_stars_repo_licenses": ["BSD-2-Cl...
#pragma once #include <gsl.h> #include "types/MT3_MathChar.h" #include "types/MT3_Radical.h" #include "types/MT3_Accent.h" #include "types/MT3_VCenter.h" #include "types/MT3_Overline.h" #include "types/MT3_Underline.h" #include "types/MT3_GenFraction.h" #include "types/MT3_LeftRight.h" #include "types/MT3_Script.h" #...
{"hexsha": "1e19dabf72f39b7274e11879c070a7aead30ad19", "size": 552, "ext": "h", "lang": "C", "max_stars_repo_path": "include/math/MathTypes.h", "max_stars_repo_name": "robin33n/formulae-cxx", "max_stars_repo_head_hexsha": "4b691e515b30508fb5e29c68426bad51d9629e72", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# -*- coding: UTF-8 -*- # Copyright (c) 2019 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 # ...
{"hexsha": "495bc598ae82bbfa77ad742130860e75ee5c1465", "size": 6871, "ext": "py", "lang": "Python", "max_stars_repo_path": "PaddleNLP/lexical_analysis/train.py", "max_stars_repo_name": "XiaoguangHu01/models", "max_stars_repo_head_hexsha": "a95d49323ed504e5a9164586f171f408954fd43a", "max_stars_repo_licenses": ["Apache-2...
#include <cstdlib> #include <algorithm> #include <iostream> #include <vector> #include <Eigen/Dense> #include <Eigen/Sparse> #include <gtest/gtest.h> #include "arpaca.hpp" namespace arpaca { template<typename T> struct PrecisionThreshold; template<> struct PrecisionThreshold<float> { static const float value; }; tem...
{"hexsha": "cc8a8abcee10c8ee7177a9b32e983564fb35e47a", "size": 4414, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "arpaca_test.cpp", "max_stars_repo_name": "meznom/arpaca", "max_stars_repo_head_hexsha": "91af2357a73ed7f5cd0d300e40283a59244c7c25", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1.0, "max_s...
from torch_geometric.nn import GATConv import torch.nn.functional as F import torch import time import argparse import dgl import GPUtil import scipy.sparse as sp class Net(torch.nn.Module): def __init__(self, edge_index, num_layers, in_dim, num_h...
{"hexsha": "d5ebfd7254ddb5cba728e552ea34f37aaa91bf1a", "size": 7118, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/perf_test/train_gat_pyg.py", "max_stars_repo_name": "dgSPARSE/dgNN", "max_stars_repo_head_hexsha": "3f8f2642d10210b5dfcb4d91034b6c008dd2213c", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
from collections import OrderedDict import datetime as dt import numpy as np import pandas as pd from sqlalchemy import Column, Float, DateTime from iotfunctions.bif import Coalesce, DateDifference from nose.tools import assert_true # constants Temperature = 'Temperature' kmeans = 'TemperatureKmeansScore' fft = 'Tempe...
{"hexsha": "b83e6cfb93952e78be55f6423d97b4b7e3e8d231", "size": 3109, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_base_functions.py", "max_stars_repo_name": "rojithakamal/functions", "max_stars_repo_head_hexsha": "3c13cd63fba38fa45523969295d9ece105522000", "max_stars_repo_licenses": ["Apache-2.0"],...
# Formatted Output (B.17) export @cuprintf """ Print a formatted string in device context on the host standard output: @cuprintf("%Fmt", args...) Note that this is not a fully C-compliant `printf` implementation; see the CUDA documentation for supported options and inputs. Also beware that it is an untyped, an...
{"hexsha": "3473a5dd22ee518570ec384b656fb1efff7abf57", "size": 2277, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/device/intrinsics/output.jl", "max_stars_repo_name": "floswald/CUDAnative.jl", "max_stars_repo_head_hexsha": "d999905dcf6eb6c060c3a50408aefd405326d3b5", "max_stars_repo_licenses": ["MIT"], "max...
""" Writing our first randomforest code. Author : NaHopayega Date : 18th dec 2016 """ import pandas as pd import numpy as np import random import csv as csv from sklearn.ensemble import RandomForestClassifier from sklearn import linear_model, decomposition, datasets from collections import Counter from sklearn.svm im...
{"hexsha": "e7c8a29e8290b2b350fe6796ecb0c87e8d5fbe55", "size": 7469, "ext": "py", "lang": "Python", "max_stars_repo_path": "titanic_1.py", "max_stars_repo_name": "amanpurwar/titanic_kaggle_2", "max_stars_repo_head_hexsha": "e181cb42ffc5c7097c84ea92644bab2ac2b0f7c5", "max_stars_repo_licenses": ["Unlicense"], "max_stars_...
# This work developed by NOAA/NWS/EMC under the Apache 2.0 license. import os import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import cartopy.crs as ccrs import cartopy.feature as cfeature from scipy.interpolate import interpn from cartopy.mpl.ticker import LongitudeFormatter, L...
{"hexsha": "3c2b72b990f8fed2daa43910bc94bcfdf3984419", "size": 22155, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/eva/plot_tools/figure.py", "max_stars_repo_name": "danholdaway/eva", "max_stars_repo_head_hexsha": "a5a784953479132080fa3a2ea5b9e9d3dc08cd68", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
""" % \documentclass[12pt]{article} \title{Merging a \LaTeX \, and an m-File to\\ Generate Professional Documentation\\ \textbf{merge2latex}\\ Version 1.0} \author{Matthew Harker and Paul O'Leary\\ Institute for Automation\\ University of Leoben\\ A-8700 Leoben, Austria\\ URL: automation.unileoben.ac.at\\ """ import...
{"hexsha": "e25ea8c3c5c4bffece94e67f9386e711c6801653", "size": 1031, "ext": "py", "lang": "Python", "max_stars_repo_path": "DisplayImages/LIDC-IDRI/show_images.py", "max_stars_repo_name": "rishidevc/stkovrflw", "max_stars_repo_head_hexsha": "c33dffbce887f32f609a10dd717d594390ceac8b", "max_stars_repo_licenses": ["MIT"],...
#!/usr/bin/env python # # Project Horus # CUSF Standalone Predictor Python Wrapper - GRIB Downloader & Parser # Copyright 2018 Mark Jessop <vk5qi@rfhead.net> # # Download GRIB files and convert them to predict-compatible GFS files. # # TODO: # [ ] Use HTTP Range requests instead of using the GRIB filter. ...
{"hexsha": "5da1182c763d2f3a6686e6c1a4063b68725bd5bf", "size": 20830, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/get_wind_data.py", "max_stars_repo_name": "projecthorus/oziplotter", "max_stars_repo_head_hexsha": "5dba95d3b018b7e5e3929136a00028c5a4a34871", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# https://github.com/WillKoehrsen/feature-selector/blob/master/Feature%20Selector%20Usage.ipynb import pandas as pd from datetime import datetime from buildsimdata.feature_selector import FeatureSelector import math from sklearn.neighbors import KNeighborsRegressor import numpy as np df = pd.read_csv('/Users/weilixu/...
{"hexsha": "67502813df10c3c585063dfe4c9af992718d8d6f", "size": 6913, "ext": "py", "lang": "Python", "max_stars_repo_path": "buildsimdata/missing_data_imputation.py", "max_stars_repo_name": "ruijis/buildsimhub_python_api", "max_stars_repo_head_hexsha": "67a88a421a5970b9134a97faf3d52a5a8a6c6258", "max_stars_repo_licenses...
""" Copyright (c) 2018, Johns Hopkins University 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 conditions...
{"hexsha": "79bb1f4cedbf66b0f3656318ac4f385fe7fd0c18", "size": 3244, "ext": "py", "lang": "Python", "max_stars_repo_path": "costar_models/python/costar_models/datasets/image.py", "max_stars_repo_name": "cpaxton/costar_plan", "max_stars_repo_head_hexsha": "be5c12f9d0e9d7078e6a5c283d3be059e7f3d040", "max_stars_repo_licen...