text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket # UDP通信用 import threading # マルチスレッド用 import time # ウェイト時間用 import numpy as np # 画像データの配列用 # import libh264decoder # H.264のデコード用(自分でビルドしたlibh264decoder.so) class Tello: """Telloドローンと通信するラッパークラス""" def __init__(self,...
{"hexsha": "60868eb91d50a098ba4708a40949387b7096cd65", "size": 12804, "ext": "py", "lang": "Python", "max_stars_repo_path": "tello.py", "max_stars_repo_name": "uzumal/Tello_Keyboard", "max_stars_repo_head_hexsha": "1065b03be6ac72f0afd3d235b171888e8e0427e5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
"""Simple LSTM layer implementation. Source: Andrej Karpathy (https://gist.github.com/karpathy/587454dc0146a6ae21fc) """ import numpy as np class LSTM(object): def init(self, n_input, n_hidden): WLSTM = np.random.rand(n_input + n_hidden + 1, 4 * n_hidden) / np.sqrt(n_input + n_hidden) WLSTM[0, :] = 0 return W...
{"hexsha": "404b6860f30a1f32cb1305767a60753741ec2800", "size": 3590, "ext": "py", "lang": "Python", "max_stars_repo_path": "lstm.py", "max_stars_repo_name": "prasanna08/MachineLearning", "max_stars_repo_head_hexsha": "5ccd17db85946630730ee382b7cc258d4fa866e8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "...
import os import sys import glob import json import scipy.signal as signal import numpy.ma as ma import numpy as np import matplotlib import matplotlib.pylab as plt import matplotlib.dates as mdates import datetime import statsmodels.api as sm lowess = sm.nonparametric.lowess def savitzky_golay(y, window_size, order,...
{"hexsha": "b255acd0dcac5f174aa2904755980448a1a9bee3", "size": 7073, "ext": "py", "lang": "Python", "max_stars_repo_path": "time_series_scripts/tasks_generate_thumbs.py", "max_stars_repo_name": "openearth/eo-reservoir", "max_stars_repo_head_hexsha": "fab049d2a88fa59ebad682149b606e30c5e2f94c", "max_stars_repo_licenses":...
from tkinter import * import numpy as np def bomb(A,x): mine=0 if A[x]==1: mine=-1 else: if x+6<35: if A[x+6]==1: mine=mine+1 if x-6>0: if A[x-6]==1: mine=mine+1 if (x+1)%6!=0: if A[x+1]==1: mine=mine+1 if (x-1)%6!=5: if A[x-1]==1: mine=mine+1 return mine ...
{"hexsha": "855fd0a0416215779c4edd7f2084488b886ac585", "size": 17085, "ext": "py", "lang": "Python", "max_stars_repo_path": "minesweeper.py", "max_stars_repo_name": "preetam2030/Minesweeper", "max_stars_repo_head_hexsha": "e1be3cb985e7552a066fd09a492a2cd279d171ba", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
"""TODO(rpeloff) Author: Ryan Eloff Contact: ryan.peter.eloff@gmail.com Date: October 2019 """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np import tensorflow as tf from moonshot.baselines import fast_dtw from moonshot....
{"hexsha": "7e3272a041e13bbabf1ad1e11cc68fa904a6317e", "size": 10789, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/moonshot/baselines/dataset.py", "max_stars_repo_name": "rpeloff/moonshot", "max_stars_repo_head_hexsha": "f58ddaa15c2bea416731e3bd1f2c5de86d6aa115", "max_stars_repo_licenses": ["MIT"], "max_s...
"""Tools to Evaluate Recommendation models with Ranking Metrics.""" import numpy as np def calc_ndcg_at_k(y_true: np.ndarray, y_score: np.ndarray, k: int) -> float: """Calculate a nDCG score for a given user.""" y_max_sorted = y_true[y_true.argsort()[::-1]] y_true_sorted = y_true[y_score.argsort()[::-1]...
{"hexsha": "b68e1b974deb89e243861041fdf92710ed98a0d7", "size": 2191, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/evaluate/evaluator.py", "max_stars_repo_name": "usaito/asymmetric-tri-rec-real", "max_stars_repo_head_hexsha": "bd734362ffa498ba0ed44bdd536083246650949f", "max_stars_repo_licenses": ["Apache-2...
#!/ebio/ag-neher/share/programs/bin/python2.7 # #script that reads in precomputed repeated prediction of influenza and #and plots the average prediction quality as a function of the diffusion constant and the #scale parameter gamma. # # import glob,argparse,sys sys.path.append('/ebio/ag-neher/share/users/rneher/FluPred...
{"hexsha": "e839cd5cb31c3f4bae724482eba0f946f9ae27e0", "size": 5893, "ext": "py", "lang": "Python", "max_stars_repo_path": "flu/figure_scripts/fig4_s1_parameter_dependence.py", "max_stars_repo_name": "iosonofabio/FitnessInference", "max_stars_repo_head_hexsha": "3de97a9301733ac9e47ebc78f4e76f7530ccb538", "max_stars_rep...
[STATEMENT] lemma hd_sort_remdups: "hd (sort (remdups l)) = hd (sort l)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. hd (sort (remdups l)) = hd (sort l) [PROOF STEP] by (metis hd_sort_Min remdups_eq_nil_iff set_remdups)
{"llama_tokens": 107, "file": "Extended_Finite_State_Machines_FSet_Utils", "length": 1}
# -*- coding: utf-8 -*- """ Created on Mon Oct 25 22:35:56 2021 @author: innat """ # ref: https://github.com/VcampSoldiers/Swin-Transformer-Tensorflow # ref: https://keras.io/examples/vision/swin_transformers/ import numpy as np import tensorflow as tf from tensorflow import keras from tensorflow.ker...
{"hexsha": "d7c7bf47f010ce3fee0a0fef88c0ee7c967c3613", "size": 12486, "ext": "py", "lang": "Python", "max_stars_repo_path": "swin_blocks.py", "max_stars_repo_name": "zoeyingz/EfficientNet-Hybrid-Swin-Transformer", "max_stars_repo_head_hexsha": "6adbe312e6f2406077fe8234c3c0a25547b4eeb6", "max_stars_repo_licenses": ["Apa...
SUBROUTINE WGEOM(IA,IB,X,Y,Z,NM,NP,NAT,NSA,NPLA,VGA,BDSK, 2 ZLDA,NWG,VG,ZLD,WV,NFS1,NFS2) COMMON /DIPOLES/ H1,H2,S DIMENSION IA(1),IB(1),X(1),Y(1),Z(1),NSA(1),NPLA(1),BDSK(1) COMPLEX VGA(1),ZLDA(1),VG(1),ZLD(1) DATA H1,H2,S /1.,1.,.5/ C C GEOMETRY FOR WIND C PRINT*,'WGEOM5, FOR MONOPOLE MAG BOOM AND ONE ANT...
{"hexsha": "a5c54be7a8a574786da8296b6fd3a06d1908a486", "size": 1764, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "WAVES_VMS_Fortran/PJK_Fortran/wind_dir/wgeom5_2.for", "max_stars_repo_name": "lynnbwilsoniii/Wind_Decom_Code", "max_stars_repo_head_hexsha": "ef596644fe0ed3df5ff3b462602e7550a04323e2", "max_star...
import mdtraj as md import time import numpy as np """ A simple way to get conformations from a trajectory. Provide phi and psi angle pairs to get PDBs of the molecule in these conformations. These should correspond to energy wells on the free energy surface. You are much better at peak picking than any algorithm I co...
{"hexsha": "462a707ae7046a286321633e9f382edc6f583902", "size": 2457, "ext": "py", "lang": "Python", "max_stars_repo_path": "extract_conformations.py", "max_stars_repo_name": "meyresearch/ANI-Peptides", "max_stars_repo_head_hexsha": "84684b484119699cb5458f4c2aed5fa8a482c315", "max_stars_repo_licenses": ["Apache-2.0"], "...
import numpy as np from load_screens import load_screens from scipy.special import stdtr # Load batch-corrected screens screens = load_screens() # Remove cell lines with any missing genes # (not required for DepMap 18Q3, but is for more recent releases) # You can use other strategies to remove NaNs instead, like imp...
{"hexsha": "e88d049b942882fa1374fdd36567215a75d418d2", "size": 1736, "ext": "py", "lang": "Python", "max_stars_repo_path": "gene_pairs.py", "max_stars_repo_name": "kundajelab/coessentiality", "max_stars_repo_head_hexsha": "ae462f3073469245c84d85c7b49a4d5671f6b2a3", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
""" Prioritized Experience Replay implementations. 1. ProportionalSampler implements the proportional-based prioritization using the SumTree in `data_structures.py`. 2. RankSampler implements the rank-based prioritization using the PriorityQueue in `data_structures.py`. """ import torch import numpy ...
{"hexsha": "4cc5f79525ea912a536923517a32347a5c98fd94", "size": 5670, "ext": "py", "lang": "Python", "max_stars_repo_path": "wintermute/replay/prioritized_replay.py", "max_stars_repo_name": "floringogianu/wintermute", "max_stars_repo_head_hexsha": "097aed1017192dff616bcd9c5083bb74c4aa71f6", "max_stars_repo_licenses": ["...
from sklearn import linear_model import pandas as pd import numpy as np from sklearn.linear_model import LinearRegression import math import os from EnergyIntensityIndicators.pull_eia_api import GetEIAData from EnergyIntensityIndicators.Residential.residential_floorspace import ResidentialFloorspace from EnergyIntensi...
{"hexsha": "460e4970d0792e92b10c20113dcba627f279f00a", "size": 34359, "ext": "py", "lang": "Python", "max_stars_repo_path": "EnergyIntensityIndicators/weather_factors.py", "max_stars_repo_name": "NREL/EnergyIntensityIndicators", "max_stars_repo_head_hexsha": "6d5a6d528ecd27b930d82088055224473ba2d63e", "max_stars_repo_l...
from networkx import * z=[5,3,3,3,3,2,2,2,1,1,1] print is_valid_degree_sequence(z) print("Configuration model") G=configuration_model(z) # configuration model degree_sequence=list(degree(G).values()) # degree sequence print("Degree sequence %s" % degree_sequence) print("Degree histogram") hist={} for d in degree_seq...
{"hexsha": "feed33313bd4b5c0b922e55107819de224362aa6", "size": 462, "ext": "py", "lang": "Python", "max_stars_repo_path": "gra3.py", "max_stars_repo_name": "0x0mar/PyDetector", "max_stars_repo_head_hexsha": "e58e32c66c3972ceb0cbb65408e0ac797e896604", "max_stars_repo_licenses": ["CC-BY-3.0"], "max_stars_count": 1, "max_...
from keras.datasets import mnist from ocr_cnn import OCR_NeuralNetwork from keras.models import Sequential from keras.layers import Merge from preprocessing import preprocess_data import numpy as np class ensemble: def __init__(self, models=[]): self._models = [] for model in models: self._models.append(model...
{"hexsha": "6026d5bfbdb19c4d9b3c4d1df4841f0803a1eb07", "size": 3923, "ext": "py", "lang": "Python", "max_stars_repo_path": "Notebooks/ensemble.py", "max_stars_repo_name": "ieee820/In-Codice-Ratio-OCR-with-CNN", "max_stars_repo_head_hexsha": "7b616822fe98d871ae1bf485ff7d0455922c84a2", "max_stars_repo_licenses": ["Apache...
import pandas as pd import numpy as np import datetime import json import pickle from pathlib import Path from difflib import SequenceMatcher from pickle_functions import * from app_functions import * from process_functions import write_log path_input = Path.cwd() / 'input' Path.mkdir(path_input, exist_ok = True) path...
{"hexsha": "b177a7a686e568e7b1a45f5cc7371a2b4f0e6be8", "size": 15223, "ext": "py", "lang": "Python", "max_stars_repo_path": "df_process.py", "max_stars_repo_name": "Learning-from-the-curve/dashboard-belgium", "max_stars_repo_head_hexsha": "b8902a6347560ce622aef4e346e971b5b3a758ca", "max_stars_repo_licenses": ["MIT"], "...
from matplotlib import pyplot as plt from numpy import genfromtxt vel_data = genfromtxt('vel_log.csv', delimiter=',') accel_data = genfromtxt('accel_log.csv', delimiter=',')
{"hexsha": "49e39625b165d8e0397f2627b5489b3ba6a3d994", "size": 174, "ext": "py", "lang": "Python", "max_stars_repo_path": "igvc_ws/src/igvc_ekf/src/scripts/ekf_log_visual.py", "max_stars_repo_name": "SoonerRobotics/igvc_software_2022", "max_stars_repo_head_hexsha": "906e6a4fca22d2b0c06ef1b8a4a3a9df7f1d17dd", "max_stars...
import os import argparse import torch import torch.nn as nn from torch.utils.data import DataLoader from torchvision import transforms from src.dataset import CocoDataset, Resizer, Normalizer, Augmenter, collater from src.model import EfficientDet from tensorboardX import SummaryWriter import shutil import numpy as np...
{"hexsha": "1afcac5178aa399852d5ef4aadf82f1ebabb6e32", "size": 5852, "ext": "py", "lang": "Python", "max_stars_repo_path": "4_efficientdet/lib/infer_detector.py", "max_stars_repo_name": "deepchatterjeevns/Monk_Object_Detection", "max_stars_repo_head_hexsha": "861c6035e975ecdf3ea07273f7479dbf60fbf9b2", "max_stars_repo_l...
[STATEMENT] lemma axis_eq_0_iff [simp]: shows "axis m x = 0 \<longleftrightarrow> x = 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (axis m x = 0) = (x = (0::'a)) [PROOF STEP] by (simp add: axis_def vec_eq_iff)
{"llama_tokens": 101, "file": null, "length": 1}
#include "../include/sporkel.h" #include <condition_variable> #include <fstream> #include <functional> #include <map> #include <mutex> #include <numeric> #include <string> #include <thread> #include <iostream> #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <boost/iostreams/filtering_stream.hpp> #include <b...
{"hexsha": "3739bb8426f665ba2b99f0ee6d7272473b7d8f06", "size": 22756, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "sporkel/src/patch.cpp", "max_stars_repo_name": "kc5nra/sporkel", "max_stars_repo_head_hexsha": "842ed61f4262b20098545b58aeee4db487143361", "max_stars_repo_licenses": ["0BSD"], "max_stars_count": 2....
# lets try to optimize this import numpy as np import scipy.misc as sc import csv import itertools from itertools import combinations import random import pprint import sys import os from evaluators import payout from hand_scoring import get_hand_type import timeit start_time = timeit.default_timer() print_color =...
{"hexsha": "de6379deeb3d036372319aad8478ab442111fc0e", "size": 3477, "ext": "py", "lang": "Python", "max_stars_repo_path": "video_poker_sim/optimized.py", "max_stars_repo_name": "nickweinberg/Python-Video-Poker-Sim", "max_stars_repo_head_hexsha": "f5a71da5c2c7e4926bd8b5f20fb83aa44dda56de", "max_stars_repo_licenses": ["...
#include "test_qssintegrator.h" #include <boost/format.hpp> #include <iostream> #include <string> using std::cout; using std::endl; using boost::format; void QSSTestProblem::odefun(double t, const dvector& y, dvector& q, dvector& d) { // csdfe(y, q, d, t) // description: // derivative function evaluator...
{"hexsha": "a58379ed058327c4d579fc762eaf1a245d2fba1c", "size": 8104, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/old/test_qssintegrator.cpp", "max_stars_repo_name": "BangShiuh/ember", "max_stars_repo_head_hexsha": "f0a70c7e01ae0dd7b5bd5ee70c8fc5d3f7207388", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
input := FileTools:-Text:-ReadFile("AoC-2021-17-input.txt" ):
{"hexsha": "e4dbed639ecda1a5f2a33bb617d80b76e971fb6f", "size": 62, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "Day17/AoC17-Maple.mpl", "max_stars_repo_name": "johnpmay/AdventOfCode2021", "max_stars_repo_head_hexsha": "b51756bcebea662333072cf518cf040a962ef8b7", "max_stars_repo_licenses": ["CC0-1.0"], "max_sta...
[STATEMENT] lemma map_of_eq_None_iff: "(map_of xys x = None) = (x \<notin> fst ` (set xys))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (map_of xys x = None) = (x \<notin> fst ` set xys) [PROOF STEP] by (induct xys) simp_all
{"llama_tokens": 109, "file": null, "length": 1}
"""This module contains functions relating to function fitting""" import matplotlib import numpy as np import datetime from floodsystem.datafetcher import fetch, fetch_measure_levels ### TASK 2F def polyfit(dates, levels, p): """Given the water level time history, this function computes the least squares polyn...
{"hexsha": "a384dacbb6a19142dbf67758a05671f45b4a6517", "size": 1372, "ext": "py", "lang": "Python", "max_stars_repo_path": "floodsystem/analysis.py", "max_stars_repo_name": "ryrolio/IA_Lent_Project", "max_stars_repo_head_hexsha": "9023dfb199b5db7676fef61f0fca46ab69707461", "max_stars_repo_licenses": ["MIT"], "max_stars...
#ifndef DERIVATIVES_H_5CHQ89V7 #define DERIVATIVES_H_5CHQ89V7 #include <gsl/gsl> #include <tuple> #include <type_traits> namespace sens_loc::math { /// Calculate the first derivate with the central differential quotient. /// \tparam Real precision of the calculation /// \param y__1 \f$y_{i-1}\f$ /// \param y_1 \f$y_...
{"hexsha": "1df168888a06557143f36074a538a3f354f6a9df", "size": 3458, "ext": "h", "lang": "C", "max_stars_repo_path": "src/include/sens_loc/math/derivatives.h", "max_stars_repo_name": "JonasToth/depth-conversions", "max_stars_repo_head_hexsha": "5c8338276565d846c07673e83f94f6841006872b", "max_stars_repo_licenses": ["BSD...
import os import cv2 import numpy as np import tensorflow as tf from datasets.constants import DatasetName, DatasetType from datasets.constants import _N_TIME_STEPS from datasets.msasl.constants import N_CLASSES as MSASL_N_CLASSES from datasets.signum.constants import N_CLASSES as SIGNUM_N_CLASSES from datasets.utils...
{"hexsha": "7194f81ea30ec05e04bcc1f2e1c02ec4855032b6", "size": 7383, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/tf_record_utils.py", "max_stars_repo_name": "rtoengi/transfer-learning-for-sign-language-recognition", "max_stars_repo_head_hexsha": "e0627115e6b68d6b85244d484011bb3895ccf4ee", "max_stars...
import torch import numpy as np from typing import Optional, Tuple from src.data.data_transform import DataTransform import pywt from pytorch_wavelets import DWTForward, DWTInverse import pdb class UNetWavTransform(DataTransform): """Pre-processor and post-processor to convert T4C data to be compatible with Un...
{"hexsha": "586422c37c772638263cf14522cbb83d02349d8e", "size": 5051, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/transformwav.py", "max_stars_repo_name": "shehel/traffic_forecasting", "max_stars_repo_head_hexsha": "63c9fab665f7d48f621e8996290efd0d536dfc09", "max_stars_repo_licenses": ["MIT"], "max_s...
# -*- coding: utf-8 -*- # !/usr/bin/python """ Created on Mar 18th 10:58:37 2016 train a continuous-time sequential model @author: hongyuan """ import pickle import time import numpy import theano from theano import sandbox import theano.tensor as tensor import os import sys #import scipy.io from collections import ...
{"hexsha": "7379ab15419c309db01afec181a8134fe0e09b35", "size": 14698, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_models.py", "max_stars_repo_name": "ZhaozhiQIAN/neurawkes", "max_stars_repo_head_hexsha": "1a3caa837b34f77ac9d078bc9bf10ff10a3bf959", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import os import numpy as np import requests import boto3 import semver import json from requests.auth import HTTPBasicAuth from requests_toolbelt.multipart.encoder import MultipartEncoder from requests_toolbelt.utils import dump from zipfile import ZipFile from model import train from generate_datanpz import downloa...
{"hexsha": "8259a1b003dc4e57315a4ed5dff631dd86bd44a2", "size": 5693, "ext": "py", "lang": "Python", "max_stars_repo_path": "task-retrain/task.py", "max_stars_repo_name": "ingalls/ml-enabler", "max_stars_repo_head_hexsha": "efda973cb3fa9954cbe24cd0963a7b8f5be5ad6f", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_star...
import sys,os,re,time,cPickle import numpy as np from networkx import bidirectional_dijkstra,shortest_path_length import networkx as nx from scipy.cluster.vq import kmeans2 import scipy.stats as stats import matplotlib.pyplot as plt from scipy.spatial.distance import pdist,cdist,squareform #from SpectralMix import SilV...
{"hexsha": "60c436453a683ba7f2a065145461bffda87be825", "size": 13442, "ext": "py", "lang": "Python", "max_stars_repo_path": "spectralmix/ClusterBase.py", "max_stars_repo_name": "ksiomelo/cubix", "max_stars_repo_head_hexsha": "cd9e6dda6696b302a7c0d383259a9d60b15b0d55", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
# NB taken from the skimage docs import numpy as np import matplotlib.pyplot as plt from skimage.data import shepp_logan_phantom from skimage.transform import radon, rescale image = shepp_logan_phantom() image = rescale(image, scale=0.4, mode='reflect') fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(8, 4.5)) ax1.set_...
{"hexsha": "dd13e4fe27614b2cd78078725bf3f3925ac79dd4", "size": 1510, "ext": "py", "lang": "Python", "max_stars_repo_path": "shearlet_admm/radon_demo.py", "max_stars_repo_name": "AndiBraimllari/SDLX", "max_stars_repo_head_hexsha": "f4a7280d261c00970fd8ab427174fba871f18a6d", "max_stars_repo_licenses": ["MIT"], "max_stars...
program t 200 parameter(a=1) implicit integer(y) parameter(b=2) 100 format (f4.2) implicit real(kind=8)(i-k,r) j=3.14 print 100,j end program t
{"hexsha": "21bd828cfe97b6b858b188bcf48f56b9c4b9fff0", "size": 190, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "tests/t0136x/t.f", "max_stars_repo_name": "maddenp/ppp", "max_stars_repo_head_hexsha": "81956c0fc66ff742531817ac9028c4df940cc13e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 2, "...
@testset "DQNLearner" begin env = CartPoleEnv(; T = Float32, seed = 11) ns, na = length(rand(get_observation_space(env))), length(get_action_space(env)) agent = Agent( policy = QBasedPolicy( learner = DQNLearner( approximator = NeuralNetworkApproximator( ...
{"hexsha": "481c2344b5c02bf3b673ad968942808cfd4d8927", "size": 2017, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/dqn.jl", "max_stars_repo_name": "findmyway/ReinforcementLearningZoo.jl", "max_stars_repo_head_hexsha": "8868ed5e2f2c4dfe725bec82f2bd4b0d08f365f9", "max_stars_repo_licenses": ["MIT"], "max_star...
import settings import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable import numpy as np import torchvision from torchvision import datasets, models, transforms import matplotlib.pyplot as plt import time import copy import os, glob import cv2 import random import argparse i...
{"hexsha": "a73309591cc35128dd3f3cf9b1fc5e2a8d65c03b", "size": 8619, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "chicm/scene", "max_stars_repo_head_hexsha": "1a18ed92b45ab21a9ca40f2f8030df7a4849b956", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max_...
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2012 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2012 Bruno Lalande, Paris, France. // Copyright (c) 2012 Mateusz Loskot, London, UK. // This file was modified by Oracle on 2018, 2020. // Modifications copyright (c) 2018, 2020, Or...
{"hexsha": "5b399d235a67c69d8e1a8b5b520df24ffbd31696", "size": 6462, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "mysql-server/include/boost_1_73_0/patches/boost/geometry/util/calculation_type.hpp", "max_stars_repo_name": "silenc3502/MYSQL-Arch-Doc-Summary", "max_stars_repo_head_hexsha": "fcc6bb65f72a385b9f56de...
""" Visualize the transformations Matplotlib: quiver plot """ from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt import numpy as np # Function to plot a single transformation def plot_transformation(transformation): """ Plot Transformation matrix ... Parameters --- tran...
{"hexsha": "b2238dea446d005761b3bf93a06b262e8a264024", "size": 4032, "ext": "py", "lang": "Python", "max_stars_repo_path": "Part-15-QuinticInterpolation/tools/visualize.py", "max_stars_repo_name": "SakshayMahna/Robotics-Mechanics", "max_stars_repo_head_hexsha": "3fa4b5860c4c9b4e22bd8799c0edc08237707aef", "max_stars_rep...
#!/usr/bin/python ## ### ### ## # ### ### # # # # ### ### ### # # ### ### ### # # # # # # ## # # # ## import pandas as pd from pylab i...
{"hexsha": "649e65338a799159c1d4ebb006e6793f25c74f91", "size": 2721, "ext": "py", "lang": "Python", "max_stars_repo_path": "fit_INFEST.py", "max_stars_repo_name": "A02l01/INFEST", "max_stars_repo_head_hexsha": "6cb201a745ea8c780d2b00f68124f2ae892d3ef4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
module AwesomeQuantumStates using Yao # GHZ """ GHZ state """ GHZ(n) = register(bit"0"^n) + register(bit"1"^n) end # module
{"hexsha": "25b868350b72ecf6a827860b39ede5fb58ef1a18", "size": 132, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/AwesomeQuantumStates.jl", "max_stars_repo_name": "Roger-luo/AwesomeQuantumStates.jl", "max_stars_repo_head_hexsha": "5b98b70cc2d7da445995e61670f73e0ff605e58a", "max_stars_repo_licenses": ["Apach...
from __future__ import print_function, division, absolute_import import numpy as np from keras.preprocessing.image import Iterator from scipy import linalg from scipy.signal import resample import keras.backend as K import warnings from scipy.ndimage.interpolation import shift class NumpyArrayIterator(Iterator): ...
{"hexsha": "922d24206d67762a4d2612c778fb18988cb5ffeb", "size": 25575, "ext": "py", "lang": "Python", "max_stars_repo_path": "codes/AudioDataGenerator.py", "max_stars_repo_name": "sushmit0109/ASSC", "max_stars_repo_head_hexsha": "8beda6f3d055a35fff9ae2ff417b38a38e2a7fa5", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
from time import sleep import numpy as np from keras.callbacks import Callback class RussianRoulette(Callback): """Play a game of russian roulette. # Arguments rounds: int, number of bullets that will be loaded. chambers: int, number of bullet chambers. firings: int, number of time...
{"hexsha": "ebb6ace2ac0366d0f7009c3582195ff983a6c114", "size": 2936, "ext": "py", "lang": "Python", "max_stars_repo_path": "masochism/callbacks.py", "max_stars_repo_name": "simon-larsson/keras-masochism", "max_stars_repo_head_hexsha": "1d869d1a092b6c324f1183e292f95ccf235b3e4b", "max_stars_repo_licenses": ["MIT"], "max_...
import cvxpy as cvx import numpy as np from scipy.optimize import root, minimize from numpy.linalg import norm, inv, slogdet import scipy.linalg as sla from numpy import exp import scipy.linalg as sla import numpy.random as ra import numpy.linalg as la import scipy.stats import ipdb from Functions.objective_functions i...
{"hexsha": "9c83acd0a0813249c8ccb8160f28ceff9ecc00b1", "size": 42543, "ext": "py", "lang": "Python", "max_stars_repo_path": "blbandits3.py", "max_stars_repo_name": "kwangsungjun/lrbandit", "max_stars_repo_head_hexsha": "2f1f7ca4bbefe2bfd3e0bc50c4423a9791bfcde8", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
""" Change the reference of an EEG signal """ import numpy import warnings from pySPACE.missions.nodes.base_node import BaseNode from pySPACE.resources.data_types.time_series import TimeSeries from pySPACE.resources.dataset_defs.stream import StreamDataset class InvalidWindowException(Exception): pass class La...
{"hexsha": "5f7960417b1616d605a883827ac39d7a32e37304", "size": 12334, "ext": "py", "lang": "Python", "max_stars_repo_path": "pySPACE/missions/nodes/spatial_filtering/rereferencing.py", "max_stars_repo_name": "pyspace/pyspace", "max_stars_repo_head_hexsha": "763e62c0e7fa7cfcb19ccee1a0333c4f7e68ae62", "max_stars_repo_lic...
import evi import pandas as pd import numpy as np import scipy import harmonypy as hm from sklearn.preprocessing import MinMaxScaler def compute_lisi(adata, basis, batch_key, perplexity): X = adata.obsm[basis] metadata = pd.DataFrame(adata.obs[batch_key].values, columns = [batch_key]) lisi = hm.compute_lis...
{"hexsha": "6d7333631c2ee477380b3b9cb688d69fdb48f97b", "size": 2385, "ext": "py", "lang": "Python", "max_stars_repo_path": "evi/tools/evaluate.py", "max_stars_repo_name": "jranek/EVI", "max_stars_repo_head_hexsha": "7a4ec37dc847d02268241b464b296f00826c327d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
# Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
{"hexsha": "587237e5188dfdebffe4f878986c44d1d3c1db62", "size": 6164, "ext": "py", "lang": "Python", "max_stars_repo_path": "qa/L0_backend_python/lifecycle/lifecycle_test.py", "max_stars_repo_name": "Mu-L/triton-inference-server", "max_stars_repo_head_hexsha": "ec1881d491cc2d2bd89ad9383724118e7121280c", "max_stars_repo_...
from __future__ import print_function try: import h5py from h5py import defs, utils, h5ac, _proxy # for py2app except: print ('Missing the h5py library (hdf5 support)...') import gzip import scipy.io from scipy import sparse, stats, io import numpy as np import sys, string, os, csv, math import time sys.p...
{"hexsha": "f4244789d8fb3cf8a7178ed0e563cf1f011b73e5", "size": 17039, "ext": "py", "lang": "Python", "max_stars_repo_path": "stats_scripts/cell_collection.py", "max_stars_repo_name": "michalkouril/altanalyze", "max_stars_repo_head_hexsha": "e721c79c56f7b0022516ff5456ebaa14104c933b", "max_stars_repo_licenses": ["Apache-...
import logging from typing import Tuple from numpy.random import uniform from problems.test_case import TestCase, TestCaseTypeEnum from problems.solutions.rock_star_climate import rock_temperature logger = logging.getLogger(__name__) FUNCTION_NAME = "rock_temperature" INPUT_VARS = ['solar_constant', 'albedo', 'emis...
{"hexsha": "1ebb11702d95311dd1117b0e662087e0dbb25417", "size": 3059, "ext": "py", "lang": "Python", "max_stars_repo_path": "problems/rock_star_climate.py", "max_stars_repo_name": "benallan/lovelace-problems", "max_stars_repo_head_hexsha": "3780d2bfc58fe0531d60a92ae0a6c45e9814f58f", "max_stars_repo_licenses": ["MIT"], "...
[STATEMENT] lemma less_multiset\<^sub>H\<^sub>O: "M < N \<longleftrightarrow> M \<noteq> N \<and> (\<forall>y. count N y < count M y \<longrightarrow> (\<exists>x>y. count M x < count N x))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (M < N) = (M \<noteq> N \<and> (\<forall>y. count N y < count M y \<longright...
{"llama_tokens": 177, "file": null, "length": 1}
# -*- coding: utf-8 -*- # -*- mode: python -*- """ Python reference implementations of model code CODE ORIGINALLY FROM https://github.com/melizalab/mat-neuron/blob/master/mat_neuron/_pymodel.py """ from __future__ import division, print_function, absolute_import import numpy as np #from mat_neuron.core import impuls...
{"hexsha": "9ef4e7abf472f34c8d6941b6451c46b92445cfd5", "size": 5377, "ext": "py", "lang": "Python", "max_stars_repo_path": "jithub/models/mat.py", "max_stars_repo_name": "russelljjarvis/numba_reduced_neuronal_models", "max_stars_repo_head_hexsha": "bc500aefab267a1a1eaf2a1d8dac83da676d7ee6", "max_stars_repo_licenses": [...
{-# OPTIONS --cubical --no-import-sorts --safe #-} open import Cubical.Core.Everything open import Cubical.Relation.Binary.Raw module Cubical.Relation.Binary.Reasoning.PartialOrder {c ℓ} {A : Type c} (P : PartialOrder A ℓ) where open PartialOrder P import Cubical.Relation.Binary.Raw.Construct.NonStrictToStrict _≤_...
{"hexsha": "32ed96c8a648cd46fe2d8901e41ceb4a466dfa34", "size": 655, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Cubical/Relation/Binary/Reasoning/PartialOrder.agda", "max_stars_repo_name": "bijan2005/univalent-foundations", "max_stars_repo_head_hexsha": "737f922d925da0cd9a875cb0c97786179f1f4f61", "max_stars_...
function [nu, g] = orderedNoiseUpdateParams(noise, mu, varsigma, y, index) % ORDEREDNOISEUPDATEPARAMS Update parameters for ordered categorical noise model. % NOISE % NOISE [g, dlnZ_dvs] = orderedNoiseGradVals(noise, mu(index, :), ... varsigma(index, :), ... ...
{"author": "SheffieldML", "repo": "GPmat", "sha": "4b5914a38ecbad9fb7a13a3392970bfc28c9d911", "save_path": "github-repos/MATLAB/SheffieldML-GPmat", "path": "github-repos/MATLAB/SheffieldML-GPmat/GPmat-4b5914a38ecbad9fb7a13a3392970bfc28c9d911/noise/orderedNoiseUpdateParams.m"}
from scipy.io import loadmat import h5py import pandas as pd import seaborn as sns diag_kws = {'bins': 50, 'color': 'teal', 'alpha': 0.4, 'edgecolor':None} plot_kws = {'color': 'teal', 'edgecolor': None, 'alpha': 0.1} path = "/media/robbis/DATA/meg/reftep/derivatives/phastimate/" columns = ['phases32', 'hjort', 'p...
{"hexsha": "98e8177c3c678cc4d5e19d96398ec72468f06d8c", "size": 10490, "ext": "py", "lang": "Python", "max_stars_repo_path": "mvpa_itab/script/mambo/reftep/reftep_replica_results.py", "max_stars_repo_name": "robbisg/mvpa_itab_wu", "max_stars_repo_head_hexsha": "e3cdb198a21349672f601cd34381e0895fa6484c", "max_stars_repo_...
# coding: utf-8 # Script to demo scikit for tweet popular/unpopular classification. # In[1]: from __future__ import division from __future__ import print_function import csv import datetime as dt import os import platform import sys import numpy as np import pandas from sklearn import preprocessing from sklearn im...
{"hexsha": "44b8f61c42d74976e78f5ee63affd7071b113a41", "size": 5547, "ext": "py", "lang": "Python", "max_stars_repo_path": "public_talks/2016_02_26_columbia/do_ml_on_feature_tables (all.csv).py", "max_stars_repo_name": "kylepjohnson/ipython_notebooks", "max_stars_repo_head_hexsha": "7f77ec06a70169cc479a6f912b4888789bf2...
#!/usr/bin/env python3 # plotCsv - Create simple plots from a CSV file. # Dave McEwan 2020-04-29 # # Run like: # plotCsv mydata.csv # OR # cat mydata.csv | plotCsv -o myplot import argparse import functools import matplotlib matplotlib.use("Agg") # Don't require X11. import matplotlib.pyplot as plt import nu...
{"hexsha": "9be02203822770b513434c26b0b0e33ba95da0a4", "size": 8032, "ext": "py", "lang": "Python", "max_stars_repo_path": "dmppl/scripts/plotCsv.py", "max_stars_repo_name": "DaveMcEwan/dmppl", "max_stars_repo_head_hexsha": "68e8a121d4591360080cd40121add1796ae48a1b", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
using EzXML using DataStructures using LightGraphs using Vulkan_Headers_jll:vk_xml xdoc = readxml(vk_xml) xroot = xdoc.root include("utils.jl") include("handles.jl") include("graph.jl") base_types_exceptions = Dict( "CAMetalLayer" => "void", "ANativeWindow" => "void", "AHardwareBuffer" => "void", ) vk_...
{"hexsha": "bd1e24b81c8e0e0720e990572c779790d7e89e9b", "size": 1808, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/spec/dev2.jl", "max_stars_repo_name": "serenity4/VulkanGen.jl", "max_stars_repo_head_hexsha": "cc876405ac0158d288062ed1b96fa586a633be89", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# -*- coding: utf-8 -*- #!/usr/bin/python3 __author__ = "Richa Bharti" __copyright__ = "Copyright 2019-2022" __license__ = "MIT" __version__ = "0.1.0" __maintainer__ = "Richa Bharti, Dominik Grimm" __email__ = "richabharti74@gmail.com" __status__ = "Dev" import pandas as pd import numpy as np import argparse import m...
{"hexsha": "690539516871c8798af906595436c01cd5386c98", "size": 8161, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/occurrence_based_ranking_analysis.py", "max_stars_repo_name": "grimmlab/transcriptional-translational-coupling", "max_stars_repo_head_hexsha": "3dec2d7c25973b4c37f1810468d4778726f96f0f", "max_...
import numpy as np np.sin.nin + "foo" # E: Unsupported operand types np.sin(1, foo="bar") # E: Unexpected keyword argument np.sin(1, extobj=["foo", "foo", "foo"]) # E: incompatible type np.abs(None) # E: incompatible type
{"hexsha": "ae7833de6c1a5d004bc18964317bf3e8941c198d", "size": 235, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python_OCR_JE/venv/Lib/site-packages/numpy/typing/tests/data/fail/ufuncs.py", "max_stars_repo_name": "JE-Chen/je_old_repo", "max_stars_repo_head_hexsha": "a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5",...
/**********************************************************\ Original Author: Dan Weatherford Imported with permission by: Richard Bateman (taxilian) Imported: Aug 7, 2010 License: Dual license model; choose one of two: New BSD License http://www.opensource.org/licenses/bsd-license.php ...
{"hexsha": "e43b60a13b9b62b49f60a559a402853d8a10368f", "size": 1657, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "chrome/plugin/src/ScriptingCore/utf8_tools.cpp", "max_stars_repo_name": "Faham/bric-n-brac", "max_stars_repo_head_hexsha": "c886e0855869a794700eb385171bbf5bfd595aed", "max_stars_repo_licenses": ["Ap...
{"mathlib_filename": "Mathlib.Tactic.GuardGoalNums", "llama_tokens": 0}
# !/usr/bin/env python3 # -*-coding:utf-8-*- # @file: check_latex_label_ref.py # @brief: # @author: Changjiang Cai, ccai1@stevens.edu, caicj5351@gmail.com # @version: 0.0.1 # @creation date: 23-01-2021 # @last modified: Mon 25 Jan 2021 06:07:03 PM EST import numpy as np #from PIL import Image import glob imp...
{"hexsha": "853c5f481ff671d995eef1701488912636ae6942", "size": 3338, "ext": "py", "lang": "Python", "max_stars_repo_path": "check_latex_label_ref.py", "max_stars_repo_name": "ccj5351/func_utility", "max_stars_repo_head_hexsha": "95a7ab515433cd012c6ae34bb4f970f4ad66e3f1", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
"""canonical_test.py""" import numpy as np import pytest import scipy.linalg from control.tests.conftest import slycotonly from control import ss, tf, tf2ss from control.canonical import canonical_form, reachable_form, \ observable_form, modal_form, similarity_transform, bdschur from control.exception import Con...
{"hexsha": "0db6b924c0d8d2ee1795e290155fbf9f820dd0ce", "size": 17425, "ext": "py", "lang": "Python", "max_stars_repo_path": "control/tests/canonical_test.py", "max_stars_repo_name": "AI-App/Python-Control", "max_stars_repo_head_hexsha": "c2f6f8ab94bbc8b5ef1deb33c3d2df39e00d22bf", "max_stars_repo_licenses": ["BSD-3-Clau...
[STATEMENT] lemma interval_integral_eq_integral': fixes f :: "real \<Rightarrow> 'a::euclidean_space" shows "a \<le> b \<Longrightarrow> set_integrable lborel (einterval a b) f \<Longrightarrow> LBINT x=a..b. f x = integral (einterval a b) f" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>a \<le> b; set...
{"llama_tokens": 208, "file": null, "length": 1}
\section{Models} \label{sec:models} %A description of the models that you'll be using as baselines, and a preliminary description of the model or models that will be the focus of your investigation. At this early stage, some aspects of these models might not yet be worked out, so preliminary descriptions are fine. In...
{"hexsha": "58b731be699a7d9fa410a354dce67dd95d389d81", "size": 1469, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "writeup_cs224u_expprotocol/models.tex", "max_stars_repo_name": "abgoswam/cs224u", "max_stars_repo_head_hexsha": "33e1a22d1c9586b473f43b388163a74264e9258a", "max_stars_repo_licenses": ["Apache-2.0"],...
import numpy as np import src.coding.codelength as codelength import random import collections from infomap import Infomap def merge_modules(trajectories, module_assignments, scheme="Huffman", init_module=True, init_node=True, deterministic=False, n_trials=10, n_itr=1000): def smallest_module_pair(module_assignments_...
{"hexsha": "021188656a78573a0c336b8b2035abd577b281a9", "size": 3629, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/stMapEqn_Infomap.py", "max_stars_repo_name": "tatsuro-kawamoto/single-trajectory_map_equation", "max_stars_repo_head_hexsha": "5dbb4c564e9563a6f8f669319dce4842ce531736", "max_stars_repo_licens...
import numpy as np import nanotune as nt from nanotune.tests.mock_classifier import MockClassifer from nanotune.tuningstages.gatecharacterization1d import GateCharacterization1D atol = 1e-05 def test_gatecharacterizaton1D_run(gatecharacterization1D_settings, experiment): pinchoff = GateCharacterization1D( ...
{"hexsha": "ffcb77f4df4f112771b8bf09270d245e0464452b", "size": 622, "ext": "py", "lang": "Python", "max_stars_repo_path": "nanotune/tests/tuningstages/test_gatecharacterization1d.py", "max_stars_repo_name": "jenshnielsen/nanotune", "max_stars_repo_head_hexsha": "0f2a252d1986f9a5ff155fad626658f85aec3f3e", "max_stars_rep...
// Copyright (c) 2014-2020 The Gridcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "main.h" #include "gridcoin/support/block_finder.h" #include <boost/test/unit_test.hpp> #include <array> #include <...
{"hexsha": "40feac136eb68a3375688c8933f8fe3938dec18a", "size": 2850, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/test/gridcoin/block_finder_tests.cpp", "max_stars_repo_name": "sweede-se/Gridcoin-Research", "max_stars_repo_head_hexsha": "48eb9482bd978b67cf9e8a795048438acab980c2", "max_stars_repo_licenses": ...
.import cv2 import numpy as np from skimage.measure import compare_ssim def noiseCalibrate(cap,rob,bbLC,bbRC): diffPercent=0 for i in range(30): ret,frame=cap.read() roi=frame[bbLC[0]:bbRC[0], bbLC[1]:bbRC[1]] (score,diff)=compare_ssim(rob,roi,full=True,multichannel=True) diffPe...
{"hexsha": "6a6e2bdb0f4fc5f6e81c3dcc0e91cacdde69f31f", "size": 3097, "ext": "py", "lang": "Python", "max_stars_repo_path": "Cam Code/oldCam.py", "max_stars_repo_name": "MackQian/Robotics1Project", "max_stars_repo_head_hexsha": "ca611bbd71dcca397a46941d4d40d720c8faa58c", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. @doc raw"""a metric value for some object IoK8sApiCustomMetricsV1beta1MetricValue(; apiVersion=nothing, kind=nothing, describedObject=nothing, ...
{"hexsha": "63aaa23ac4bbb02d2dac85cc4f86046b51c2fa4d", "size": 5162, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ApiImpl/api/model_IoK8sApiCustomMetricsV1beta1MetricValue.jl", "max_stars_repo_name": "memetics19/Kuber.jl", "max_stars_repo_head_hexsha": "0834cab05d2b5733cb365594000be16f54345ddb", "max_stars...
import torch import torchvision import torchvision.transforms as transforms import json # import matplotlib.pyplot as plt import numpy as np import time import argparse import torch.optim as optim import torch.nn as nn import torch.nn.functional as F from probprec import Preconditioner torch.set_default_dtype(torch...
{"hexsha": "44ed6b4782d2bb4d9f7dd653370009da2c01b0e9", "size": 9295, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/cifar10_psgd.py", "max_stars_repo_name": "ludwigbald/probprec", "max_stars_repo_head_hexsha": "227a924a725551f4531cbe682da4830305f55277", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import sys import os import json import time import cantera as ct import shutil import copy from PyQt4 import uic from PyQt4.QtGui import * from PyQt4.QtCore import * from src.core.def_tools import * from src.ct.def_ct_tools import Xstr from src.ct.senkin import senkin from src.ct.psr import S_curve from src.ck.de...
{"hexsha": "a3b81690fc4f19d6c3d20683c01eb8bbfdb27217", "size": 30165, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/gui/def_run.py", "max_stars_repo_name": "haoxy97/GPS", "max_stars_repo_head_hexsha": "3da6d3a7410b7b7e5340373f206a1833759d5acf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max...
C TEST SUBROUTINE testos C INCLUDE 'VICMAIN_FOR' SUBROUTINE MAIN44 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C THIS IS A TEST FOR MODULE testos C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CALL TESTOS(IOS) IF (IOS .EQ. 0) CALL XVMESSAGE('THE OS IS VMS',' ') IF (IOS .EQ. 1) CALL XVME...
{"hexsha": "6b14e8edc8a147132fbe5098db2decb3cb7a3c95", "size": 433, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "vos/p2/sub/testos/test/ttestos.f", "max_stars_repo_name": "NASA-AMMOS/VICAR", "max_stars_repo_head_hexsha": "4504c1f558855d9c6eaef89f4460217aa4909f8e", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
! ! This is the test program for EXTRAP ! INCLUDE 'VICMAIN_FOR' SUBROUTINE MAIN44 C-----THIS IS A TEST PROGRAM FOR MODULE EXTRAP C-----EXTRAP WILL CALCULATE VALUES FOR THE DNS OF A LINE SEGMENT C-----BASED ON THE VALUES OF OTHER POINTS IN THE PICTURE. C-----THESE OTHER POINTS ARE STORED IN ARRAY PTS. C...
{"hexsha": "bac76c94a2b40cb00d12f0e6434835bd78704b64", "size": 2267, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "vos/p2/sub/extrap/test/textrap.f", "max_stars_repo_name": "NASA-AMMOS/VICAR", "max_stars_repo_head_hexsha": "4504c1f558855d9c6eaef89f4460217aa4909f8e", "max_stars_repo_licenses": ["BSD-3-Clause"],...
MODULE esn_I INTERFACE !...Generated by Pacific-Sierra Research 77to90 4.4G 10:47:13 03/09/06 SUBROUTINE esn ( AL, A, ESPI, OVL, CESPM2, CESPML, CESP, POTPT, ES& , ESPC, WORK1D, NORBS, NUMAT) USE vast_kind_param,ONLY: DOUBLE integer, INTENT(IN) :: NORBS inte...
{"hexsha": "692d41dbf67bb298ba1c78a41e0ff8303dedf9a8", "size": 799, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "2006_MOPAC7.1/src_interfaces/esn_I.f90", "max_stars_repo_name": "openmopac/MOPAC-archive", "max_stars_repo_head_hexsha": "01510e44246de34a991529297a10bcf831336038", "max_stars_repo_licenses": ["B...
-- Enumerated Types inductive weekday : Type | sunday : weekday | monday : weekday | tuesday : weekday | wednesday : weekday | thursday : weekday | friday : weekday | saturday : weekday #check weekday #print weekday #check weekday.sunday #check weekday.monday open weekday #check sunday #check monday #check weekda...
{"author": "agryman", "repo": "theorem-proving-in-lean", "sha": "cf5a3a19d0d9d9c0a4f178f79e9b0fa67c5cddb9", "save_path": "github-repos/lean/agryman-theorem-proving-in-lean", "path": "github-repos/lean/agryman-theorem-proving-in-lean/theorem-proving-in-lean-cf5a3a19d0d9d9c0a4f178f79e9b0fa67c5cddb9/src/07-Inductive-Types...
c !! This is used to get the error double precision function qexact(blockno,xc,yc,t) implicit none integer blockno double precision xc,yc,t double precision x0, y0, u0, v0 double precision q0,qc double precision u0_comm,v0_comm,revs_comm common /comm_velocity/ u0_co...
{"hexsha": "72cee8dca071ca8c13f780646187e2714c96f8ba", "size": 1241, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "applications/clawpack/advection/2d/torus/qexact.f", "max_stars_repo_name": "MelodyShih/forestclaw", "max_stars_repo_head_hexsha": "2abaab636e6e93f5507a6f231490144a3f805b59", "max_stars_repo_licens...
from typing import Any, Dict, List, Optional import ConfigSpace as CS import numpy as np from tpe.optimizer.base_optimizer import BaseOptimizer, ObjectiveFunc class RandomSearch(BaseOptimizer): def __init__( self, obj_func: ObjectiveFunc, config_space: CS.ConfigurationSpace, res...
{"hexsha": "bedd81337be87225c18fd37ba2d2219523caa731", "size": 1866, "ext": "py", "lang": "Python", "max_stars_repo_path": "tpe/optimizer/random_search.py", "max_stars_repo_name": "nabenabe0928/AIST_TPE", "max_stars_repo_head_hexsha": "0094043aed9e148ea817bcdbd5c61c7659f779e0", "max_stars_repo_licenses": ["Apache-2.0"]...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Oct 27 09:58:57 2020 @author: gao """ import numpy as np import matplotlib.pyplot as plt from matplotlib import colors from mpl_toolkits.axes_grid1 import AxesGrid import matplotlib as mpl import os from matplotlib.colors import LinearSegmentedColormap...
{"hexsha": "0427d648c870d7a9d365daf12a45f9e8f97edf96", "size": 7326, "ext": "py", "lang": "Python", "max_stars_repo_path": "figure/Figure2C_general_size_effect.py", "max_stars_repo_name": "YuanxiaoGao/Evolution_of_reproductive_strategies_in_incipient_multicellularity", "max_stars_repo_head_hexsha": "13eb51639fcee630a76...
import pyvisa import feeltech import time import numpy import matplotlib.pyplot as plt import math fichero = open('config.txt') ######################## timeDelay = 0.7 #Adjust the time delay between frequency increments (in seconds) ######################## startFreq = float(fichero.readline().split(',')[1]) #Read ...
{"hexsha": "8efa3dde410aff4aef7f0496146f4120ec706211", "size": 3817, "ext": "py", "lang": "Python", "max_stars_repo_path": "BodePlot.py", "max_stars_repo_name": "ailr16/BodePlot-DS1054Z", "max_stars_repo_head_hexsha": "1bb77b92b0c7249499e3d0748fff551210f5b81c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, ...
#Author : Dhaval Harish Sharma #Red ID : 824654344 #Assignment 3, Question A and B, Using user defined edge detection """Finding the edges in an image using user defined edge detection and changing the colors of edges of different objects. After that, adding salt and pepper noise to the image, again applying edge det...
{"hexsha": "47519676574cf6ac5b0b1998bc854e9fc0373fee", "size": 6250, "ext": "py", "lang": "Python", "max_stars_repo_path": "Assignment 3/QuestionAB_Sobel.py", "max_stars_repo_name": "dhavalsharma97/Computer-Vision", "max_stars_repo_head_hexsha": "75b39c9e5adb2a1a54854ed487fe750ad316a8fc", "max_stars_repo_licenses": ["M...
import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.rcParams['figure.figsize']=12,9 # make the chart wider import pycountry df=pd.read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2021/2021-01-05/transit_cost.csv') df.head() df.info() df.dropna(inplace=True) #...
{"hexsha": "2e9d48ccedb8f178c4e72deaeb6cac316f6594db", "size": 6117, "ext": "py", "lang": "Python", "max_stars_repo_path": "TidyTuesday/20210105-transit-cost.py", "max_stars_repo_name": "vivekparasharr/Challenges-and-Competitions", "max_stars_repo_head_hexsha": "c99d67838a0bb14762d5f4be4993dbcce6fe0c5a", "max_stars_rep...
#! /usr/bin/env python3 import rospy from geometry_msgs.msg import Point from sensor_msgs.msg import LaserScan from nav_msgs.msg import Odometry from tf import transformations from std_srvs.srv import * import math import numpy as np import matplotlib.pyplot as plt room_center_found_ = True active_ = False current_...
{"hexsha": "d057e37e22c0a686d2a8145693dac71817586889", "size": 4681, "ext": "py", "lang": "Python", "max_stars_repo_path": "ros_pkg/robot_function/scripts/find_room_center.py", "max_stars_repo_name": "Pallav1299/coppeliasim_ros", "max_stars_repo_head_hexsha": "3c4db53be7ea7d64c53c1d56066bb93dd212a476", "max_stars_repo_...
[STATEMENT] lemma var_assign_eval [intro!]: "(X x, s(x:=n)) -|-> (n, s(x:=n))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (X x, s(x := n)) -|-> (n, s(x := n)) [PROOF STEP] by (rule fun_upd_same [THEN subst]) fast
{"llama_tokens": 108, "file": null, "length": 1}
# Modified from https://github.com/MIC-DKFZ/nnunet import pickle import torch import tensorboardX import numpy as np from collections import OrderedDict import SimpleITK as sitk def pickle_load(in_file): with open(in_file, "rb") as opened_file: return pickle.load(opened_file) class AverageMeter(object): ...
{"hexsha": "9d1f0ca447a3da5ce6653365b13029d9c7eb054d", "size": 6262, "ext": "py", "lang": "Python", "max_stars_repo_path": "postprocess/utils.py", "max_stars_repo_name": "BruceResearch/BiTr-Unet", "max_stars_repo_head_hexsha": "d1f5ad5df7ff5e65c7797bfafd51a782f6114af3", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
#!/usr/bin/env python import sys import cv2 import numpy as np import matplotlib.pyplot as plt import copy import random import sift class Calibrate(): def main(): # get image from webcam for now just read it in img = cv2.imread("../images/saved.jpg", 1) # Select crop region crop_region = User_ROI_Se...
{"hexsha": "44b885f1b95edea64068ada3c7ba02614e68ea05", "size": 431, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pong_vision/src/calibrate.py", "max_stars_repo_name": "kekraft/golden_eye", "max_stars_repo_head_hexsha": "a857d9c31645451b09f68a148e996dfa213322ec", "max_stars_repo_licenses": ["BSD-2-Clause"]...
import cv2 import numpy as np class DrawingClass(object): def __init__(self): self.draw_command ='None' self.frame_count = 0 def drawing(self, frame, fps, num_egg, htc_egg, state): cv2.putText(frame, 'FPS: {:.2f}'.format(fps), (10, 30), cv2.FONT_HERSHEY_SIMP...
{"hexsha": "1cd41a80f04199f3be841ce38a8ac4428c343606", "size": 6620, "ext": "py", "lang": "Python", "max_stars_repo_path": "show/drawing.py", "max_stars_repo_name": "nohamanona/poke-auto-fuka", "max_stars_repo_head_hexsha": "9d355694efa0168738795afb403fc89264dcaeae", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
# This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. mutable struct DedicatedHostAvailableCapacity <: SwaggerModel allocatableVMs::Any # spec type: Union{ Nothing, Vector{DedicatedHostAllocatableVM} } # spec name: allocatableVM...
{"hexsha": "59490f850bf8b8c0988efb1cd6fa2103bb5f291e", "size": 1505, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Compute/ComputeManagementClient/model_DedicatedHostAvailableCapacity.jl", "max_stars_repo_name": "JuliaComputing/Azure.jl", "max_stars_repo_head_hexsha": "0e2b55e7602352d86bdf3579e547a74a9b5f44...
import scrapy import numpy import pandas as pd import csv from arania_noticias.items import ComercioNew from scrapy.loader import ItemLoader from scrapy.loader.processors import TakeFirst class SpiderNews(scrapy.Spider): name = 'news' urls = [] with open('urls.csv', 'r', encoding='utf-8') as urls_csv: ...
{"hexsha": "5508d6a5b28d0544913a0f2bae7ca4dfc01d08a2", "size": 2204, "ext": "py", "lang": "Python", "max_stars_repo_path": "proyecto-2b/ScrapyDataset/scrapy/arania_noticias/arania_noticias/spiders/spider_news.py", "max_stars_repo_name": "2020-A-JS-GR1/py-velasquez-revelo-jefferson-david", "max_stars_repo_head_hexsha": ...
#!/usr/bin/python3 import flask from flask import Flask, jsonify, request from waitress import serve import datetime import os import json import io import cld_steiner as process_cld from PIL import Image from pathutils import remove_consecutive_duplicates, resample_path, smooth_path import numpy as np import sys def...
{"hexsha": "4a74035cce8a8c3ab658141ba60372210bfce4f7", "size": 1741, "ext": "py", "lang": "Python", "max_stars_repo_path": "gce/server.py", "max_stars_repo_name": "kylemcdonald/bsp", "max_stars_repo_head_hexsha": "e33c71f5924bef61a15e2b87230ac27b8f8261aa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_...
/////////////////////////////////////////////////////////////////////////////// // // http://protoc.sourceforge.net/ // // Copyright (C) 2013 Bjorn Reese <breese@users.sourceforge.net> // // Permission to use, copy, modify, and distribute this software for any // purpose with or without fee is hereby granted, provided ...
{"hexsha": "07b435e24882607e8f7fe6ab6090e38231cefb3f", "size": 26099, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/transenc/oarchive_suite.cpp", "max_stars_repo_name": "skyformat99/protoc", "max_stars_repo_head_hexsha": "f0a72275c92bedc8492524cb98cc24c5821c4f11", "max_stars_repo_licenses": ["BSL-1.0"], "ma...
(* Author: Dmitriy Traytel *) header {* Normalization of WS1S Formulas *} (*<*) theory WS1S_Normalization imports WS1S begin (*>*) fun nNot where "nNot (FNot \<phi>) = \<phi>" | "nNot (FAnd \<phi>1 \<phi>2) = FOr (nNot \<phi>1) (nNot \<phi>2)" | "nNot (FOr \<phi>1 \<phi>2) = FAnd (nNot \<phi>1) (nNot \<phi>2)" | "...
{"author": "Josh-Tilles", "repo": "AFP", "sha": "f4bf1d502bde2a3469d482b62c531f1c3af3e881", "save_path": "github-repos/isabelle/Josh-Tilles-AFP", "path": "github-repos/isabelle/Josh-Tilles-AFP/AFP-f4bf1d502bde2a3469d482b62c531f1c3af3e881/thys/MSO_Regex_Equivalence/WS1S_Normalization.thy"}
import sys import json import time import torch import pickle import socket import logging import numbers import functools import subprocess import unicodedata from typing import List, Union from pathlib import Path import yaml import numpy as np import hickle import scipy.io as spio import msgpack_numpy as msgpack_np...
{"hexsha": "bd35eaf696d09a59f434fc7415fea2223583a2d5", "size": 18359, "ext": "py", "lang": "Python", "max_stars_repo_path": "zsvision/zs_utils.py", "max_stars_repo_name": "bjuncek/zsvision", "max_stars_repo_head_hexsha": "a84ecf93f334ecbdd99a8be7150fc767e732e6af", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap import numpy as np from sklearn.metrics import confusion_matrix from ninolearn.learn.skillMeasures import seasonal_correlation seismic = plt.cm.get_cmap('seismic', 256) newcolors = seismic(np.linspace(0, 1, 256)) grey = np.array([192/256, 19...
{"hexsha": "aa098c068b9c1cdb7be91afecaedef6abc399600", "size": 2924, "ext": "py", "lang": "Python", "max_stars_repo_path": "ninolearn/plot/evaluation.py", "max_stars_repo_name": "pjpetersik/ninolearn", "max_stars_repo_head_hexsha": "2a6912bbaaf3c5737f6dcda89e4d7d1fd885a35e", "max_stars_repo_licenses": ["MIT"], "max_sta...
import matplotlib.pyplot as plt import numpy as np from matplotlib.patches import Polygon from geometry_tools.projective import ProjectivePlane plane = ProjectivePlane() plane.set_hyperplane_coordinates(np.array([1.0, 1.0, 1.0])) plane.set_affine_origin([1.0, 1.0, 1.0]) plane.set_affine_direction([1.0, 0.0, 0.0], [0...
{"hexsha": "e21b7ee54a59334d85ace1a810cb104fc480f05b", "size": 1068, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/examples.py", "max_stars_repo_name": "tjweisman/geometry_tools", "max_stars_repo_head_hexsha": "9523dd86f68606d5297b228e874020d62663d3db", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] lemma bin_rsplit_len_le: "n \<noteq> 0 \<longrightarrow> ws = bin_rsplit n (nw, w) \<longrightarrow> length ws \<le> m \<longleftrightarrow> nw \<le> m * n" [PROOF STATE] proof (prove) goal (1 subgoal): 1. n \<noteq> 0 \<longrightarrow> ws = bin_rsplit n (nw, w) \<longrightarrow> (length ws \<le> m) = (nw ...
{"llama_tokens": 162, "file": "Word_Lib_Bits_Int", "length": 1}
import torch.nn as nn import numpy as np import torch from functools import reduce class MSSSIM(nn.Module): def __init__(self, width, batch_size, n_channel, cuda, c1=.01**2, c2=.02**2, n_sigmas=5): super(MSSSIM, self).__init__() self.c1 = c1 self.c2 = c2 sigm...
{"hexsha": "31f60078abc639ac4a9f90241a7a0d131521ba8f", "size": 2042, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/loss/msssim.py", "max_stars_repo_name": "muneebaadil/sisr-irl", "max_stars_repo_head_hexsha": "29ccf9ad970ade22fc8e158b83f952504db71a7b", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
// Copyright 2013-2015 Stanford University // // 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 ...
{"hexsha": "0866636090c1323793aefb50b3fbad5f11c7650d", "size": 7359, "ext": "cc", "lang": "C++", "max_stars_repo_path": "tools/apps/specgen_statistics.cc", "max_stars_repo_name": "sdasgup3/strata-stoke", "max_stars_repo_head_hexsha": "b9981a48a82a72069896d29863649cfad1b4d98c", "max_stars_repo_licenses": ["ECL-2.0", "Ap...
""" Helper Classes and Functions for docking fingerprint computation. """ from __future__ import division from __future__ import unicode_literals __author__ = "Bharath Ramsundar and Jacob Durrant" __license__ = "GNU General Public License" import logging import math import os import subprocess import numpy as np impo...
{"hexsha": "656aeae02526ae400d8b9f12fa0a8c0a5f15147c", "size": 17258, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepchem/feat/nnscore_utils.py", "max_stars_repo_name": "n3011/deepchem", "max_stars_repo_head_hexsha": "c316d998c462ce01032f0dae883856b400ea4765", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# In this example we do a few things to detect the edge # 1. We define two filers (aka sobel filters) called Hx, Hy # 2. We perform a convolution on Hx and Hy to get Gx, Gy # 3. From there we calculate the edge detection output and solve for G import numpy as np import matplotlib.pyplot as plt from PIL import Image f...
{"hexsha": "710ca87a479c8025b0291ed50568ec979bb5dfb8", "size": 959, "ext": "py", "lang": "Python", "max_stars_repo_path": "scipy/edge-detection.py", "max_stars_repo_name": "0w8States/numpy-stack-samples", "max_stars_repo_head_hexsha": "2fca4ee45cb532cc12d5646276ee53a7e4f0d0f2", "max_stars_repo_licenses": ["MIT"], "max_...
import os import torch import numpy as np import matplotlib.pyplot as plt from torchid.statespace.module.ssmodels_ct import NeuralStateSpaceModel from torchid.statespace.module.ss_simulator_ct import ForwardEulerSimulator import gpytorch import finite_ntk import loader from torchid import metrics class StateSpaceWrap...
{"hexsha": "cc9faf53f9cdae76f19a17386125ec6a3c986f1b", "size": 4080, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/RLC/RLC_SS_transfer_gp.py", "max_stars_repo_name": "forgi86/RNN-adaptation", "max_stars_repo_head_hexsha": "d32e8185c6a746060dd726a0f5080231e0c9439b", "max_stars_repo_licenses": ["MIT"], ...