text
stringlengths
0
27.1M
meta
dict
import matplotlib.pyplot as plt import numpy as np x = np.linspace(-2, 2) plt.subplots(2, 2, sharex = True) plt.subplot(2, 2, 1) plt.ylabel("y") plt.xlabel("x") plt.yticks([1, 0, -1]) plt.plot(x, np.sin(4*x), color="red", label="sin(4x)") plt.legend(loc = "center right") plt.subplot(2, 2, 2) plt.xlabel("x") plt.yti...
{ "alphanum_fraction": 0.6226175349, "author": null, "avg_line_length": 22.4857142857, "converted": null, "ext": "py", "file": null, "hexsha": "59d0db270bf493e7e74da26d483d6eaf0f9a95cb", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
from flask import Flask, request, jsonify app = Flask(__name__) import pickle with open('../models/digitizer.pickle', 'rb') as fd: methods = pickle.load(fd) scale = methods['scale'] model = methods['model'] import numpy as np from json import loads @app.route('/', methods=['POST']) def index(): data = l...
{ "alphanum_fraction": 0.6095238095, "author": null, "avg_line_length": 21.724137931, "converted": null, "ext": "py", "file": null, "hexsha": "b168a09393a292e788037eaeefccba24b7b3be41", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import requests import json import sys import time import argparse import numpy as np parser = argparse.ArgumentParser() parser.add_argument('--datatransformer_provider', help='URL of the Data Transformer Provider') #parser.add_argument('--resource_type', help='Type of resource') parser.add_argument('--num_test', help=...
{ "alphanum_fraction": 0.7144508671, "author": null, "avg_line_length": 32.037037037, "converted": null, "ext": "py", "file": null, "hexsha": "ca7efde0a9b83a9d5a150d9d0d132501b67d6a00", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
[STATEMENT] lemma preal_add_less_cancel_left [simp]: "(t + (r::preal) < t + s) \<longleftrightarrow> (r < s)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (t + r < t + s) = (r < s) [PROOF STEP] by (blast intro: preal_add_less2_mono2 preal_add_left_less_cancel)
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Dedekind_Real_Dedekind_Real", "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 118, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_for...
\chapter{Overview} \noindent \CmdStan is the command-line interface for Stan. The next two chapters describe tools that are built as part of \CmdStan installation: \code{stanc} and \code{stansummary}. The process of building a \CmdStan executable from a Stan program is as follows: % \begin{enumerate} \item A Stan pr...
{ "alphanum_fraction": 0.702247191, "author": null, "avg_line_length": 33.6377952756, "converted": null, "ext": "tex", "file": null, "hexsha": "abeb184d1428b4b3cd8c52a34578a244e7f297ec", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_...
# Copyright 2019 AIST # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
{ "alphanum_fraction": 0.6703433923, "author": null, "avg_line_length": 35.5925925926, "converted": null, "ext": "py", "file": null, "hexsha": "2a7073b09c6734f5328d39372244934865d4e3b8", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
```python import sympy as sp ``` ```python s = sp.Symbol('s') ``` ```python V = sp.Symbol('V') ``` ```python top = (2*V*s)*(1/s+2*s/(4*s**2+1)) - 0 ``` ```python bottom = (1/s+(6*s+3)/(3*s+1))*(1/s+2*s/(4*s**2+1)) - (1/s)**2 ``` ```python sp.simplify(top/bottom) ``` 2*V*s*(18*s**3 + 6*s**2 + 3*s + 1)/...
{ "alphanum_fraction": 0.4562647754, "author": null, "avg_line_length": 17.2653061224, "converted": true, "ext": "ipynb", "file": null, "hexsha": "e178a047d949025d989cb87cbd398e8eacfef633", "include": null, "lang": "Jupyter Notebook", "length": null, "llama_tokens": null, "mathlib_filename": nul...
import os, argparse, torch, time import torch.optim as optim import torchvision.models as models import torch.nn.functional as F import torch.nn as nn import torch.utils.data as torchdata import numpy as np import torch.backends.cudnn as cudnn from torch.utils.data import DataLoader import torchvision.transforms as tra...
{ "alphanum_fraction": 0.6941560714, "author": null, "avg_line_length": 36.0210084034, "converted": null, "ext": "py", "file": null, "hexsha": "dc29f7fb0027c3ec18683b51076d0d9471fed8b5", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# -*- coding: UTF-8 -*- import numpy as np import math from faceemo.utils import FACIAL_LANDMARKS_68_IDXS def _distance_x(l1, l2): return (l2[0] - l1[0]) def _distance_y(l1, l2): return (l2[1] - l1[1]) def _distance_allpairs_xy(landmarks): allpairsX = [] allpairsY = [] for i in range(len(land...
{ "alphanum_fraction": 0.6546153846, "author": null, "avg_line_length": 29.7709923664, "converted": null, "ext": "py", "file": null, "hexsha": "57b51241899f9fa4407db1b8dae5edfac3f2218f", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#include <iostream> #include <functional> #include <armadillo> #include <string> // include code from b.cc (except main function) #define NO_MAIN #include "b.cc" #undef NO_MAIN using namespace std; using namespace arma; const std::string CHECK_MARK = "✓"; const std::string BALLOT_X = "✗"; struct test { std::functio...
{ "alphanum_fraction": 0.5841346154, "author": null, "avg_line_length": 26.2342342342, "converted": null, "ext": "cc", "file": null, "hexsha": "90a75352b9dae0c80fa059c4aae596420f8eb9b8", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_...
from sklearn.utils.class_weight import compute_class_weight from sklearn import metrics as skmetrics import matplotlib.pyplot as plt import pandas as pd import numpy as np import inspect def calc_metrics(metrics: list, y_true: np.array, y_pred: np.array or None = None, ...
{ "alphanum_fraction": 0.6057358645, "author": null, "avg_line_length": 35.6290909091, "converted": null, "ext": "py", "file": null, "hexsha": "0c922e8504fe8d8ef4d6d0b35023c93a9574edbe", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
\chapter{Conclusion} Conclusion
{ "alphanum_fraction": 0.84375, "author": null, "avg_line_length": 10.6666666667, "converted": null, "ext": "tex", "file": null, "hexsha": "a56125ce987f1cb9a5d1edd249e1036b42bd337b", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_coun...
MODULE grid ! Based on grid of femswe, with additional variables of other files IMPLICIT NONE ! COUNTING ! Number of grids in multigrid hierarchy INTEGER :: ngrids ! nface Number of faces on each grid ! nedge Number of edges on each grid ! nvert Number of vertices on each edge INTEGER, ALLOCA...
{ "alphanum_fraction": 0.6151699645, "author": null, "avg_line_length": 37.5428571429, "converted": null, "ext": "f90", "file": null, "hexsha": "4055bc0d626daa75f3249c34e1cfb8a4678e0916", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_f...
#include <stdio.h> #include <gsl/gsl_linalg.h> double A[] = { -1.0, 0.0, 2.0, 1.0, 0.0, -1.0, 3.0, 2.0, 1.0, 2.0, 3.0, 0.0, -3.0, 1.0, 4.0, 2.0 }; double y[] = { 0.0, 1.0, 2.0, 1.0 }; int main() { gsl_matrix_view m = gsl_matrix_view_array(A, 4, 4); gsl_vector_view b = gsl_vector_view_array(y, 4); gsl_v...
{ "alphanum_fraction": 0.6148969889, "author": null, "avg_line_length": 20.3548387097, "converted": null, "ext": "c", "file": null, "hexsha": "f466e06136b6eb53c937e32ddafe8500c5ad2c5e", "include": null, "lang": "C", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_cou...
c subroutine newtil(tilseq,ntill,iplane,oldind) c c on the first day of simulation and at the end of a tilage day c the next tilage date is found integer tilseq, ntill,iplane,oldind include 'pmxpln.inc' include 'pmxtil.inc' include 'pmxtls.inc' c include 'cupdate.inc' c c ol...
{ "alphanum_fraction": 0.5802861685, "author": null, "avg_line_length": 27.347826087, "converted": null, "ext": "for", "file": null, "hexsha": "adee22707ed507c013fba91758c4359f3680392d", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fo...
using Weave nkwds = (out_path = "notebooks/", jupyter_path = "$(homedir())/.julia/conda/3/bin/jupyter", nbconvert_options = "--allow-errors") skwds = (out_path = "sheets/", jupyter_path = "$(homedir())/.julia/conda/3/bin/jupyter", nbconvert_options = "--allow-errors") ## # notes ## notebook("src/Julia.jmd"; nkwds....
{ "alphanum_fraction": 0.6806153846, "author": null, "avg_line_length": 24.2537313433, "converted": null, "ext": "jl", "file": null, "hexsha": "6da19c39588851ba4ad0776e12274934694a4f28", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
r""" Bijection classes for type `A_{2n}^{(2)\dagger}` Part of the (internal) classes which runs the bijection between rigged configurations and KR tableaux of type `A_{2n}^{(2)\dagger}`. AUTHORS: - Travis Scrimshaw (2012-12-21): Initial version TESTS:: sage: KRT = crystals.TensorProductOfKirillovReshetikhinTab...
{ "alphanum_fraction": 0.5534527593, "author": null, "avg_line_length": 41.2023809524, "converted": null, "ext": "py", "file": null, "hexsha": "50533fbc842998027fb3fc161410432c0674050d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#pragma once #include <memory> #include <boost/serialization/access.hpp> #include <boost/serialization/base_object.hpp> #include "Layer.hpp" #include "../optimizer/NeuralNetworkOptimizer.hpp" #include "NoNeuronLayer.hpp" namespace snn::internal { class MaxPooling2D final : public NoNeuronLayer { private: ...
{ "alphanum_fraction": 0.6857697912, "author": null, "avg_line_length": 38.8490566038, "converted": null, "ext": "hpp", "file": null, "hexsha": "02e4ac668351b5ba1a0f93a41df97387a9eed1fb", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
[STATEMENT] lemma rGamma_complex_of_real: "rGamma (complex_of_real x) = complex_of_real (rGamma x)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. rGamma (complex_of_real x) = complex_of_real (rGamma x) [PROOF STEP] unfolding rGamma_real_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. rGamma (complex_of_real x...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": 3, "llama_tokens": 260, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": n...
""" """ import numpy as np from jax import random as jran from ..utils.galmatch import calculate_indx_correspondence def inherit_host_centric_posvel( ran_key, is_sat_source, is_sat_target, logmh_host_source, logmh_host_target, pos_host_source, pos_host_target, vel_host_source, vel_...
{ "alphanum_fraction": 0.7229122056, "author": null, "avg_line_length": 27.7976190476, "converted": null, "ext": "py", "file": null, "hexsha": "085c536234e2941b55f708754dd38bf24be8ee46", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
_make_left_env(ψ::CuMPS, k::Int) = CUDA.ones(eltype(ψ), 1, 1, k) _make_left_env_new(ψ::CuMPS, k::Int) = CUDA.ones(eltype(ψ), 1, k) _make_LL(ψ::CuMPS, b::Int, k::Int, d::Int) = CUDA.zeros(eltype(ψ), b, b, k, d) _make_LL_new(ψ::CuMPS, b::Int, k::Int, d::Int) = CUDA.zeros(eltype(ψ), b, k, d) function CuMPS(ig::MetaGraph,...
{ "alphanum_fraction": 0.581680831, "author": null, "avg_line_length": 29.8309859155, "converted": null, "ext": "jl", "file": null, "hexsha": "3a43c7694b12e9834fd218ba56f4abde77bf16e2", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
%\input{/Users/joshyv/Research/misc/latex_paper.tex} \documentclass{article} \usepackage{amsmath} \usepackage{graphicx} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsthm} %\usepackage{cite} \usepackage{algorithm} \usepackage{algorithmic} % \usepackage{times} \usepackage{fancyhdr} \usepackage{graphicx} \usep...
{ "alphanum_fraction": 0.7415397631, "author": null, "avg_line_length": 47.28, "converted": null, "ext": "tex", "file": null, "hexsha": "14f5691d735454d3ac5ea6554a9cdecb23a6f767", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count":...
import numpy as np from examples.example_utils import make_chainer_a3c from dacbench.benchmarks import CMAESBenchmark # Helper method to flatten observation space def flatten(li): return [value for sublist in li for value in sublist] # Make CMA-ES environment # We use the configuration from the "Learning to O...
{ "alphanum_fraction": 0.6779874214, "author": null, "avg_line_length": 29.4444444444, "converted": null, "ext": "py", "file": null, "hexsha": "fd25d8a2b6c80e8b63a69c0ae1782359595ac5fc", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#!/usr/bin/env python from __future__ import print_function import gzip import os import pickle import time import gym import numpy as np from util import DATA_DIR, DATA_FILE def key_press(key, mod): global human_agent_action, human_wants_restart, human_wants_exit, human_sets_pause, acceleration if key == ...
{ "alphanum_fraction": 0.60898636, "author": null, "avg_line_length": 25.0939597315, "converted": null, "ext": "py", "file": null, "hexsha": "0bfd598b347c29e68bd2a99c34ce1b4b67b563ef", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
""" Bifurcation point classes. Each class locates and processes bifurcation points. * _BranchPointFold is a version based on BranchPoint location algorithms * BranchPoint: Branch process is broken (can't find alternate branch -- see MATCONT notes) Drew LaMar, March 2006 """ from __future__ import absolu...
{ "alphanum_fraction": 0.5341793452, "author": null, "avg_line_length": 32.6384439359, "converted": null, "ext": "py", "file": null, "hexsha": "5338514dfbd12161e51e2cea2de687a8253338f8", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import networkx as nx from cStringIO import StringIO from Bio import Phylo import matplotlib.pyplot as plt import random import logging from tqdm import tqdm logger = logging.getLogger() logger.setLevel(logging.INFO) import numpy as np import trees from trees.ddt import DirichletDiffusionTree, Inverse, GaussianLikeliho...
{ "alphanum_fraction": 0.7382572076, "author": null, "avg_line_length": 27.8108108108, "converted": null, "ext": "py", "file": null, "hexsha": "df44038be7817e33a04df0a3950bbb630a81b95e", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma singular_simplex_empty: "topspace X = {} \<Longrightarrow> \<not> singular_simplex p X f" [PROOF STATE] proof (prove) goal (1 subgoal): 1. topspace X = {} \<Longrightarrow> \<not> singular_simplex p X f [PROOF STEP] by (simp add: singular_simplex_def continuous_map nonempty_standard_simplex)
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 109, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": n...
''' This file contains my implementation of the method to determine Stain Vector using SVD as outlined in the following paper:- Macenko, Marc, et al. "A method for normalizing histology slides for quantitative analysis." Biomedical Imaging: From Nano to Macro, 2009. ISBI'09. IEEE International Symposium on. IEEE, 2009....
{ "alphanum_fraction": 0.6259771497, "author": null, "avg_line_length": 35.3829787234, "converted": null, "ext": "py", "file": null, "hexsha": "609dbba606f3d54d89870d3f130a3ee6d6dfa052", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
library(ggplot2) library(dplyr) library(shiny) library(lubridate) library(stringr) library(gridExtra) library(RCurl) library(scales) shinyServer(function(input, output) { ########LOAD SONAR####### load("data/sonar.rda") ########GET REALTIME##### load("data/rt_dat.rda") ########TEST FISH######## load("d...
{ "alphanum_fraction": 0.5965824666, "author": null, "avg_line_length": 28.6382978723, "converted": null, "ext": "r", "file": null, "hexsha": "f69961f7341909363aef610861dbd7627321ab09", "include": null, "lang": "R", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_cou...
using Test using Plots function test_backwardpass_sqrt!(res::SolverIterResults,solver::Solver,bp::BackwardPass) # Get problem sizes res = results2 n,m,N = get_sizes(solver) m̄,mm = get_num_controls(solver) n̄,nn = get_num_states(solver) # Objective costfun = solver.obj.cost dt = solver...
{ "alphanum_fraction": 0.5873655914, "author": null, "avg_line_length": 27.1093117409, "converted": null, "ext": "jl", "file": null, "hexsha": "92b140643f84458f583997667a26b17e4a9ec7ef", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
# Cython compile instructions from setuptools import setup from setuptools import Extension, find_packages import numpy import os import glob from sys import platform import sys import sysconfig # py_modules = ['alphaimpute2'] # py_modules += [os.path.join('src','General', 'InputOutput')] # py_modules += [os.path.jo...
{ "alphanum_fraction": 0.6735143067, "author": null, "avg_line_length": 27.26, "converted": null, "ext": "py", "file": null, "hexsha": "80579bbeb51a444af72162d9b2ccae3e34e4224c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count...
/* Copyright (c) 2014, Project OSRM contributors 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 and the f...
{ "alphanum_fraction": 0.7353673724, "author": null, "avg_line_length": 33.1134020619, "converted": null, "ext": "cpp", "file": null, "hexsha": "27dc7dc68f29ce08a85516358a029799d3b4faeb", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
#!/bin/python import numpy as np def binary_step(x): return np.where(x < 0, 0, 1) def binary_step_(x): return np.where(x != 0, 0, np.inf) def linear(x, a=1): return a * x def linear_(x, a=1): return a def sigmoid(x): return 1 / (1 + np.exp(-x)) def sigmoid_(x): return sigmoid(x) * (1-...
{ "alphanum_fraction": 0.5881612091, "author": null, "avg_line_length": 23.3529411765, "converted": null, "ext": "py", "file": null, "hexsha": "0821fe8e944f666d6fb944b172f6ec793382c375", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
"""sfh dataset.""" import os import glob from astropy.table import Table, vstack import tensorflow as tf import tensorflow_datasets as tfds import numpy as np # TODO(sfh): Markdown description that will appear on the catalog page. _DESCRIPTION = """ # SFH Dataset Dataset for generative models. Data is extracted fr...
{ "alphanum_fraction": 0.5751691032, "author": null, "avg_line_length": 38.1916666667, "converted": null, "ext": "py", "file": null, "hexsha": "f432a07009769640a85d374a09b9c7a7034cd21f", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import train_synth.config as config from src.utils.data_manipulation import generate_target_others, denormalize_mean_variance from train_synth.dataloader import DataLoaderEval from src.utils.parallel import DataParallelModel from src.utils.utils import generate_word_bbox, get_weighted_character_target, calculate_fscore...
{ "alphanum_fraction": 0.7137092316, "author": null, "avg_line_length": 33.8130841121, "converted": null, "ext": "py", "file": null, "hexsha": "773563ccb7f3e24ad3cd0e770a63503f5bc473fa", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
Address(Decatur Court) is a residential Culdesacs culdesac in South Davis. Intersecting Streets Concord Avenue
{ "alphanum_fraction": 0.7966101695, "author": null, "avg_line_length": 16.8571428571, "converted": null, "ext": "f", "file": null, "hexsha": "5e11fb49272aaa99eafe3a2be10715ac60515c0d", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
{ "alphanum_fraction": 0.6184533333, "author": null, "avg_line_length": 34.9813432836, "converted": null, "ext": "py", "file": null, "hexsha": "cf258429ebf930cd2b527e7584e2045e7a9afae7", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np import tensorflow as tf from sklearn.neighbors import NearestNeighbors import matplotlib.pyplot as plt from keras.preprocessing.image import load_img, img_to_array from keras.applications.vgg16 import preprocess_input def cosim(x,y): # a=np.sum(x*y.T) # b=np.sqrt(np.sum(x*x.T))*np.sqrt(np.s...
{ "alphanum_fraction": 0.696735106, "author": null, "avg_line_length": 31.9462365591, "converted": null, "ext": "py", "file": null, "hexsha": "c74a4000398786babced83f7b897381a04d75ab2", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
#! /usr/bin/python3 TCP_IP = "localhost" TCP_PORT = 6100 from pyspark import SparkContext from pyspark.sql.session import SparkSession from pyspark.streaming import StreamingContext from sparknlp.annotator import * from sparknlp.base import * import json from pyspark.sql.functions import * from pyspark.sql.types impo...
{ "alphanum_fraction": 0.7448364888, "author": null, "avg_line_length": 26.4090909091, "converted": null, "ext": "py", "file": null, "hexsha": "4b04652466f3e0e82e7121b9febbaec585a460f2", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import numpy as np import sys import os BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) ROOT_DIR = os.path.di...
{ "alphanum_fraction": 0.6235294118, "author": null, "avg_line_length": 47.5196850394, "converted": null, "ext": "py", "file": null, "hexsha": "beaac2037df8f8d7f71a1531452c5c328d008b0d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#include "InetAddress.h" #include <strings.h> // bzero #include <netinet/in.h> #include <arpa/inet.h> #include <boost/static_assert.hpp> using namespace Reactor; static const in_addr_t kInaddrAny = INADDR_ANY; InetAddress::InetAddress(uint16_t port) { bzero(&addr_, sizeof addr_); addr_.sin_family = AF_INET; ...
{ "alphanum_fraction": 0.7153502235, "author": null, "avg_line_length": 21.6451612903, "converted": null, "ext": "cc", "file": null, "hexsha": "817a85da42fe7658e3967cf7a8b207765f2be0cf", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_...
import mediapipe as mp import cv2 import numpy as np import uuid import os mp_drawing = mp.solutions.drawing_utils mp_hands = mp.solutions.hands cap = cv2.VideoCapture(0) with mp_hands.Hands(min_detection_confidence=0.8, min_tracking_confidence=0.5) as hands: while cap.isOpened(): ret, frame = cap.read() ...
{ "alphanum_fraction": 0.6145662848, "author": null, "avg_line_length": 35.9411764706, "converted": null, "ext": "py", "file": null, "hexsha": "46090c35b7fa3437d287302ae00b895c137cd28d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np import subprocess, sys, os.path from itertools import * import pandas as pd import logging from .pstreader import PstReader def _default_empty_creator(count): return np.empty([count or 0, 0],dtype=str) def _default_empty_creator_val(row_count,col_count): return np.empty([row_count,col_coun...
{ "alphanum_fraction": 0.6322514319, "author": null, "avg_line_length": 42.0308641975, "converted": null, "ext": "py", "file": null, "hexsha": "4d810f74a9decd87e263ac8c103c29dcc767cca9", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# -*- coding: utf-8 -*- # # # This source file is part of the FabSim software toolkit, which is # distributed under the BSD 3-Clause license. # Please refer to LICENSE for detailed information regarding the # licensing. # # fab.py contains general-purpose FabSim routines. import threading import base.AsyncThreadingPool...
{ "alphanum_fraction": 0.5817241722, "author": null, "avg_line_length": 37.1655580192, "converted": null, "ext": "py", "file": null, "hexsha": "605285479ebcf09a438d1674621d4120e278208f", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
(* *********************************************************************) (* *) (* The Compcert verified compiler *) (* *) (* Xavier Leroy...
{ "alphanum_fraction": null, "author": "Ptival", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_date...
[STATEMENT] lemma normal_ordinal_rec: assumes s: "\<forall>p x. x < s p x" shows "normal (ordinal_rec z s)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. normal (ordinal_rec z s) [PROOF STEP] apply (rule normalI) [PROOF STATE] proof (prove) goal (2 subgoals): 1. \<And>f. OrdinalInduct.strict_mono f \<Longrightarro...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Ordinal_OrdinalRec", "hexsha": null, "include": null, "lang": null, "length": 5, "llama_tokens": 419, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_...
import cv2 as cv import numpy as np import Module as m import time import dlib # variables COUNTER = 0 TOTAL_BLINK = 0 fonts = cv.FONT_HERSHEY_PLAIN frameCounter = 0 capID = 0 EyesClosedFrame = 3 # objects camera = cv.VideoCapture(capID) # Define the codec and create VideoWriter object fourcc = cv.VideoWriter_fourcc(...
{ "alphanum_fraction": 0.5908075327, "author": null, "avg_line_length": 33.329787234, "converted": null, "ext": "py", "file": null, "hexsha": "d414658fb2d78f83888b94ae4fdfcc70e98988d7", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
@testset "Appender Error" begin db = DBInterface.connect(DuckDB.DB) con = DBInterface.connect(db) @test_throws DuckDB.QueryException DuckDB.Appender(db, "nonexistanttable") @test_throws DuckDB.QueryException DuckDB.Appender(con, "t") end @testset "Appender Usage" begin db = DBInterface.connect(Du...
{ "alphanum_fraction": 0.6539552474, "author": null, "avg_line_length": 35.2555555556, "converted": null, "ext": "jl", "file": null, "hexsha": "0e7cf034f877ee4e378d3e34bb252c7b6b9322ad", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
from __future__ import print_function, division import numpy as np import os import cv2 from PIL import Image import random from functools import partial import tensorflow as tf from keras.models import Model, Sequential, load_model from keras.layers.merge import _Merge from keras.layers import Input, Conv2D, MaxPooli...
{ "alphanum_fraction": 0.5973440241, "author": null, "avg_line_length": 38.7475728155, "converted": null, "ext": "py", "file": null, "hexsha": "04411afa68e3b80828f28ccf2b2d96df05fca881", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np import pandas as pd import argparse import os from pandas.tseries.holiday import USFederalHolidayCalendar as calendar def prepare_data(data_path): """Returns dataframe with features.""" # Get data df = pd.read_csv(data_path) # Remove NaNs df = df.dropna() # Convert date ...
{ "alphanum_fraction": 0.6011342155, "author": null, "avg_line_length": 23.7752808989, "converted": null, "ext": "py", "file": null, "hexsha": "aa496d17ddf182cf664f100e905f38fc7bf29387", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
Load LFindLoad. Load LFindLoad. From adtind Require Import goal80. From lfind Require Import LFind. Lemma lfind_state (y:lst):@eq lst y (append y Nil). Admitted. From QuickChick Require Import QuickChick. QCInclude "/home/yousef/lemmafinder/benchmark/_lfind_clam_lf_goal80_theorem0_58_append_nil/". QCInclude ".". Extr...
{ "alphanum_fraction": null, "author": "yalhessi", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_da...
import copy import os import numpy as np import random import shutil import sys from src import trainer from keras import backend as K import tensorflow as tf import argparse from src.Logger import LOG from keras.layers import Input,concatenate,GaussianNoise from keras.models import load_model,Model import shutil os.en...
{ "alphanum_fraction": 0.7296141926, "author": null, "avg_line_length": 30.1838709677, "converted": null, "ext": "py", "file": null, "hexsha": "965fb74dd09ce9e8523ff9cc538c02a3fcb3fdac", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
##############written by fbb june 2011##### ########utility to bin and tophat smooth arrays of data. ########june 29 2011 so far it only works with oned array (e.g lighcurves!) ########################################################################## #function: onedsmooth # INPUT: # arr: the imput array numpy a...
{ "alphanum_fraction": 0.4916267943, "author": null, "avg_line_length": 26.125, "converted": null, "ext": "py", "file": null, "hexsha": "ebb603fa3bcd3c09dae45535cea431892c8c6068", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_coun...
''' Brian Harder 5/24/2021 Description: This is a Python module that has 6 functions that I thought would be useful in my own life as a Choate student. There is are 6 math help functions, 2 standardized test simulation functions, a function for stock prices, a fortunte teller game, a function for walking time bet...
{ "alphanum_fraction": 0.6703527937, "author": null, "avg_line_length": 29.6626826029, "converted": null, "ext": "py", "file": null, "hexsha": "df552a8729dc2b60fd2ddfe3a1330aa64ced547a", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import matplotlib.pyplot as plt from matplotlib import colors, gridspec import matplotlib.ticker as mtick from oas_erf.util.naming_conventions.var_info import get_fancy_var_name, get_fancy_unit_xr from oas_erf.util.plot.plot_levlat import plot_levlat_diff, get_cbar_label, plot_levlat_abs, frelative, fdifference, \ ...
{ "alphanum_fraction": 0.4551902982, "author": null, "avg_line_length": 37.2471590909, "converted": null, "ext": "py", "file": null, "hexsha": "fd7730b206db218047ba159bba774fa6460e80d6", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import os import logging import json import genutil import cdat_info import cdutil import MV2 import cdms2 import hashlib import numpy from collections import OrderedDict, Mapping import pcmdi_metrics import cdp.cdp_io from pcmdi_metrics import LOG_LEVEL import copy import re value = 0 cdms2.setNetcdfShuffleFlag(valu...
{ "alphanum_fraction": 0.5002574334, "author": null, "avg_line_length": 38.6037267081, "converted": null, "ext": "py", "file": null, "hexsha": "dcb84c6c125ff10f0e45849bd06a8152a9cb218d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import glob import logging import numpy as np import os import shlex import shutil import subprocess import sys from NPFitProduction.NPFitProduction.cross_sections import CrossSectionScan from NPFit.NPFit.parameters import conversion def annotate(args, config): """Annotate the output directory with a README ...
{ "alphanum_fraction": 0.5801036503, "author": null, "avg_line_length": 40.9032258065, "converted": null, "ext": "py", "file": null, "hexsha": "b86db4c944692aecde85466e0e14cd3cfda702ae", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
Every Friday afternoon the Davis Korean Church offers bags of produce to the community for a $1 donation. The produce is seasonal, but may include corn, potatoes, tomatoes, yams, etc. These are standard grocerysize bags, onethird filled (about 10 pounds), and they all have the same items. Cant beat the living cheaply ...
{ "alphanum_fraction": 0.795532646, "author": null, "avg_line_length": 97, "converted": null, "ext": "f", "file": null, "hexsha": "7a8dba25692038d10492451a851f54b178d3a9cb", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": n...
""" Andrin Jenal, 2017 ETH Zurich """ import os import h5py from zipfile import ZipFile import numpy as np from scipy import misc class CelebDataset: def __init__(self, dataset_destination_dir, image_size=64, channels=1): self.dataset_dir = dataset_destination_dir self.image_size = image_size ...
{ "alphanum_fraction": 0.6189729518, "author": null, "avg_line_length": 38.6515151515, "converted": null, "ext": "py", "file": null, "hexsha": "bfdefbe74ff62e3ca6b7f6a6794e4938fefd5a17", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import os import sys import logging import time import argparse import numpy as np from collections import OrderedDict import options.options as option import utils.util as util from data.util import bgr2ycbcr, ImageSplitter, patchify_tensor, recompose_tensor from data import create_dataset, create_dataloader from mod...
{ "alphanum_fraction": 0.5814089448, "author": null, "avg_line_length": 57.7383966245, "converted": null, "ext": "py", "file": null, "hexsha": "a62701eb1408d1d880ae2aa2a96adafa0400bda8", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma map_inv_map_inv [simp]: assumes "inj_on f (dom f)" shows "map_inv (map_inv f) = f" [PROOF STATE] proof (prove) goal (1 subgoal): 1. map_inv (map_inv f) = f [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. map_inv (map_inv f) = f [PROOF STEP] from assms [PROOF STATE] proof (c...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "UTP_toolkit_Map_Extra", "hexsha": null, "include": null, "lang": null, "length": 19, "llama_tokens": 2279, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_e...
using CLBLAS const clblas = CLBLAS import OpenCL using OpenCL: cl function testDirectCall() device, ctx, queue = clblas.get_next_compute_context() A = rand(Float32, 1) B = rand(Float32, 1) C = rand(Float32, 1) println(A, B, C) a = cl.cl_float(6.6) b = cl.cl_floa...
{ "alphanum_fraction": 0.5590379009, "author": null, "avg_line_length": 29.1914893617, "converted": null, "ext": "jl", "file": null, "hexsha": "1b041da0d203888d8744ffa01beeac4c473b6821", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import os, urllib import mxnet as mx import cv2 import numpy as np import sys def download(url,prefix=''): filename = prefix+url.split("/")[-1] if not os.path.exists(filename): urllib.urlretrieve(url, filename) def get_image(url, show=False): filename = url.split("/")[-1] urllib.urlretrieve(u...
{ "alphanum_fraction": 0.6444502755, "author": null, "avg_line_length": 33.7256637168, "converted": null, "ext": "py", "file": null, "hexsha": "3d39e3fdcaa6e58fbc8a5dd5d51e5b7c8172f5f1", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
*DECK DBI DOUBLE PRECISION FUNCTION DBI (X) C***BEGIN PROLOGUE DBI C***PURPOSE Evaluate the Bairy function (the Airy function of the C second kind). C***LIBRARY SLATEC (FNLIB) C***CATEGORY C10D C***TYPE DOUBLE PRECISION (BI-S, DBI-D) C***KEYWORDS BAIRY FUNCTION, FNLIB, SPECIAL FUNCTIONS C***...
{ "alphanum_fraction": 0.5875016411, "author": null, "avg_line_length": 51.1208053691, "converted": null, "ext": "f", "file": null, "hexsha": "fa1d79aceeeb5f3ef0c53c1197b3ebffbdd10fd8", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
""" ================== Animate Trajectory ================== Animates a trajectory. """ print(__doc__) import numpy as np import pytransform3d.visualizer as pv from pytransform3d.rotations import matrix_from_angle, R_id from pytransform3d.transformations import transform_from, concat def update_trajectory(step, n_...
{ "alphanum_fraction": 0.6349453978, "author": null, "avg_line_length": 24.6538461538, "converted": null, "ext": "py", "file": null, "hexsha": "1c579a7dafa4e09e5c5b3d828b776ab0879e98af", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# Author: Igor Andreoni # email: andreoni@caltech.edu import glob from astropy.io import fits import numpy as np import matplotlib.pyplot as plt def str2bool(v): if v.lower() in ('yes', 'true', 't', 'y', '1', 'Yes', 'True'): return True elif v.lower() in ('no', 'false', 'f', 'n', '0', 'No', 'False')...
{ "alphanum_fraction": 0.5428420775, "author": null, "avg_line_length": 36.8252427184, "converted": null, "ext": "py", "file": null, "hexsha": "0a8bbaac75f99b8e681a0a7db61f9c6ff972778d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
"""Methods for testing the subroutines in the grouptheory module.""" import unittest as ut from phenum.grouptheory import ArrowPerm, RotPermList, OpList import pytest import numpy as np gpath = "tests/grouptheory/" def _read_fixOp_1D(fname): import os i = 1 growing = True out = [] while growing: ...
{ "alphanum_fraction": 0.6601426367, "author": null, "avg_line_length": 54.3048327138, "converted": null, "ext": "py", "file": null, "hexsha": "36321fd33563137f6af1603c89ad0ef4f0bd6035", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
MODULE GreyVariables !----------------------------------------------------------------------- ! ! File: GreyVariables ! Module: GreyVariables ! Type: Module ! Author: R. Chu, Dept of Physics, UTK ! ! Date: 8/21/16 ! ! Purpose: ! Subroutines needed for GreyMomen...
{ "alphanum_fraction": 0.4990028341, "author": null, "avg_line_length": 24.6175710594, "converted": null, "ext": "f90", "file": null, "hexsha": "68920285befa42b843d4375991f024ff5953a1de", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_f...
\chapter{Constructing an formula} \label{chapter:constructingaformula} The class \formulaClass represents SMT formulas, which are defined according to the following abstract grammar \[ \begin{array}{rccccccccccccc} p &\quad ::=\quad & a & | & b & | & x & | & (p + p) & | & (p \cdot p) & | & (p^e) \\ v &\quad ::=\qu...
{ "alphanum_fraction": 0.7234873856, "author": null, "avg_line_length": 68.9076923077, "converted": null, "ext": "tex", "file": null, "hexsha": "a386713f08ee5608914bf385bda64818ef350a2e", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
# -*- coding: utf-8 -*- """ Created on Thu Dec 19 10:59:27 2019 @author: ykrempp """ import cv2 import numpy as np from matplotlib import pyplot as plt img_path = 'images\qupath_image.tif' img = cv2.imread(img_path, 0) scale_percent = 25 # percent of original size width = int(img.shape[1] *...
{ "alphanum_fraction": 0.7091078067, "author": null, "avg_line_length": 22.4166666667, "converted": null, "ext": "py", "file": null, "hexsha": "104645290d28f286bf2d7932be92dccedea4468b", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
theory GabrielaLimonta2 imports Main "Repeat_Big_Step" "~~/src/HOL/IMP/Star" begin subsection "List setup" text {* In the following, we use the length of lists as integers instead of natural numbers. Instead of converting @{typ nat} to @{typ int} explicitly, we tell Isabelle to coerce @{typ nat} automatical...
{ "alphanum_fraction": null, "author": "glimonta", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_da...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed May 6 08:19:34 2020 @author: firo """ import sys import argparse import numpy as np import networkx as nx from joblib import Parallel, delayed from wickingpnm.model import PNM from wickingpnm.simulation import Simulation, Material if __name__ == '_...
{ "alphanum_fraction": 0.6400651466, "author": null, "avg_line_length": 41.6271186441, "converted": null, "ext": "py", "file": null, "hexsha": "b4e3072aa597db020667b970ac427fa457d3ce6c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma remove_shadow_root_get_child_nodes_is_l_remove_shadow_root_get_child_nodes [instances]: "l_remove_shadow_root_get_child_nodes get_child_nodes_locs remove_shadow_root_locs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. l_remove_shadow_root_get_child_nodes Shadow_DOM.get_child_nodes_locs remove_sh...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Shadow_DOM_Shadow_DOM", "hexsha": null, "include": null, "lang": null, "length": 4, "llama_tokens": 906, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_eve...
import random import time import os import numpy as np from . import preprocess import torch import torch.nn.functional as F from torchvision.transforms.functional import hflip import torch.utils.data as data from PIL import Image from scipy import sparse from dsgn.utils.numpy_utils import * from dsgn.utils.numba_ut...
{ "alphanum_fraction": 0.5581299472, "author": null, "avg_line_length": 43.6258992806, "converted": null, "ext": "py", "file": null, "hexsha": "0ef628f7aac6e9ce4a7336caa4e69acf4dcae81d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# src: https://github.com/facebookresearch/DrQA/blob/master/drqa/reader/data.py import numpy as np from torch.utils.data import Dataset from torch.utils.data.sampler import Sampler from .vector import vectorize # ------------------------------------------------------------------------------ # PyTorch datase...
{ "alphanum_fraction": 0.5024606299, "author": null, "avg_line_length": 35.649122807, "converted": null, "ext": "py", "file": null, "hexsha": "f7c335b390063b50c4b185305a34e53ec458cfad", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c Write res to IBIS file (out=res) subroutine write_res(res,ids) implicit none c Inputs... real res(2,202) !reseau locations integer*4 ids(5) !frame,camera,filter,year,day integer runit,ibis !VICAR and IBIS unit ...
{ "alphanum_fraction": 0.6527777778, "author": null, "avg_line_length": 36, "converted": null, "ext": "f", "file": null, "hexsha": "80ad1771887683a8e3faf811b2288da065ff75d2", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
import pytest import numpy as np from scipy.special import zeta from scipy.optimize import fsolve from scipy.constants import speed_of_light from options_tails.PowerLaw import PowerLaw __author__ = "JNSFilipe" __copyright__ = "JNSFilipe" __license__ = "mit" def test_PowerLaw(): ## Create a Normal Random Distrib...
{ "alphanum_fraction": 0.6668331668, "author": null, "avg_line_length": 30.8, "converted": null, "ext": "py", "file": null, "hexsha": "28cac688fe523ec6b03e396e0f2c29ae3284a1ee", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count"...
module Mandrill using Requests using JSON using Compat if VERSION < v"0.4.0" Base.split(str, spl; limit=0, keep=true) = split(str, spl, limit, keep) end global const api = "https://mandrillapp.com/api/1.0" # package code goes here function __init__() global mandrill_key = get(ENV, "MANDRILL_KEY", "") end function...
{ "alphanum_fraction": 0.7428311334, "author": null, "avg_line_length": 29.8911564626, "converted": null, "ext": "jl", "file": null, "hexsha": "a9d9723fa7ef725631a79eaf0be47c64249c94cb", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import numpy from coopihc.inference.GoalInferenceWithUserPolicyGiven import ( GoalInferenceWithUserPolicyGiven, ) from coopihc.policy.ELLDiscretePolicy import ELLDiscretePolicy from coopihc.base.State import State from coopihc.base.elements import discrete_array_element, array_element # ----- needed before testing...
{ "alphanum_fraction": 0.7096900745, "author": null, "avg_line_length": 30.7108433735, "converted": null, "ext": "py", "file": null, "hexsha": "5930b854ac44251c768023edd1841c17b33486b9", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# Adapted from https://github.com/sniklaus/pytorch-pwc/blob/master/run.py import math import os import sys import tempfile import numpy as np import torch import sys from tqdm import tqdm arguments_strModel = 'default' ########################################################## Backward_tensorGrid = {} Backward_t...
{ "alphanum_fraction": 0.5563076587, "author": null, "avg_line_length": 45.3440594059, "converted": null, "ext": "py", "file": null, "hexsha": "ef884d0b0f0e7cfa34588430c1532d2e5f24f315", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# import libraries import pandas as pd import numpy as np from sqlalchemy import create_engine from nltk.tokenize import word_tokenize from nltk.stem import WordNetLemmatizer import nltk import pickle from joblib import dump, load nltk.download('punkt') nltk.download('wordnet') nltk.download('omw-1.4') from sklearn.m...
{ "alphanum_fraction": 0.6538786547, "author": null, "avg_line_length": 35.6445783133, "converted": null, "ext": "py", "file": null, "hexsha": "b9b7e5f8a991c10dd0fe0915721c2db83a4826df", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
! @expect error subroutine addfive(x) implicit none integer, intent(inout) :: x x = x + 5 end subroutine addfive program main use smack implicit none integer :: x = 2 call addfive(x) !print *, x == 7 call assert(x /= 7) end program main
{ "alphanum_fraction": 0.6536964981, "author": null, "avg_line_length": 15.1176470588, "converted": null, "ext": "f90", "file": null, "hexsha": "0f5306e67883a7d05cf5a70b52b564aec396cd6b", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_f...
import pandas as pd import numpy as np import gresearch_crypto import xgboost as xgb import traceback import datetime TRAIN_CSV = '/kaggle/input/g-research-crypto-forecasting/train.csv' ASSET_DETAILS_CSV = '/kaggle/input/g-research-crypto-forecasting/asset_details.csv' df = pd.read_csv(TRAIN_CSV) df_asset_details = p...
{ "alphanum_fraction": 0.6343283582, "author": null, "avg_line_length": 24.7731092437, "converted": null, "ext": "py", "file": null, "hexsha": "d53e03dee18e65ea5d1d233b8d1eaf423b14e47c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# Copyright 2016 James Hensman, Valentine Svensson, alexggmatthews, Mark van der Wilk # # 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...
{ "alphanum_fraction": 0.6315240084, "author": null, "avg_line_length": 38.32, "converted": null, "ext": "py", "file": null, "hexsha": "eef4b706bf05f0e52453b455cfa7319d03c98d8f", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count...
\documentclass[12pt]{article} \newlength{\blackoutwidth} \newcommand{\blackout}[1] {%necessary comment \settowidth{\blackoutwidth}{#1}%necessary comment \rule[-0.3em]{\blackoutwidth}{1.125em}%necessary comment } \PassOptionsToPackage{usenames,dvipsnames}{xcolor} \PassOptionsToPackage{colorlinks,linktoc=all}{hyper...
{ "alphanum_fraction": 0.7933884298, "author": null, "avg_line_length": 22.6875, "converted": null, "ext": "tex", "file": null, "hexsha": "7b0a8032385bdaea5506eac44cd8f124e975e069", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count...
[STATEMENT] lemma solve_depressed_quartic_complex: "x \<in> set (solve_depressed_quartic_complex p q r) \<longleftrightarrow> (x^4 + p * x^2 + q * x + r = 0)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (x \<in> set (solve_depressed_quartic_complex p q r)) = (x ^ 4 + p * x\<^sup>2 + q * x + r = 0) [PROOF STEP]...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Cubic_Quartic_Equations_Quartic_Polynomials", "hexsha": null, "include": null, "lang": null, "length": 70, "llama_tokens": 15784, "mathlib_filename": null, "max_forks_count": null, ...
import pandas as pd import numpy as np def df_info(df: pd.DataFrame, return_info=False, shape=True, cols=True, info_prefix=''): """ Print a string to describe a df. """ info = info_prefix if shape: info = f'{info}Shape = {df.shape}' if cols: info = f'{info} , Cols = {df.columns.tol...
{ "alphanum_fraction": 0.5750943396, "author": null, "avg_line_length": 31.5476190476, "converted": null, "ext": "py", "file": null, "hexsha": "957acd78c0f76d4da3ef2f328e31fbb96358c869", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
\subsection{Implementing Small DB File IO in C} % (fold) \label{sub:implementing_small_db_file_io_in_c} \sref{sec:using_input_and_output} presented an altered version of the Small DB program from \cref{cha:dynamic_memory_allocation}. The changes introduced four new procedures used to save the programs data to file, an...
{ "alphanum_fraction": 0.7826086957, "author": null, "avg_line_length": 53.6666666667, "converted": null, "ext": "tex", "file": null, "hexsha": "8093747787808066de233c135bf647f0cfcd89fa", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
import numpy as np from modules.image_processor import ImageProcessor from time import time,sleep import random import sys sys.path.append(r"./sign_lane") import sign as SN import lane import math import cv2 import bird from collections import Counter # escape obstacle OBSTACLE_RATIO = 2 CROSS_ANGLE = False # fork ...
{ "alphanum_fraction": 0.5284278768, "author": null, "avg_line_length": 34.5078299776, "converted": null, "ext": "py", "file": null, "hexsha": "97a4c7dbbe88cb6792322160644c0a2b2a409d9a", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
SUBROUTINE CloseVariables ! By Allan P. Engsig-Karup. USE GlobalVariables USE MGlevels IMPLICIT NONE DEALLOCATE(Wavefield%E,Wavefield%W,Wavefield%P,FineGrid%h,tmp2D) IF (FineGrid%Nx>1) THEN DEALLOCATE(Wavefield%Ex,Wavefield%Exx,Wavefield%Px) DEALLOCATE(FineGrid%hx,FineGrid%hxx) ! DEALLOCATE(FineGrid%DiffStencils%Sten...
{ "alphanum_fraction": 0.8048780488, "author": null, "avg_line_length": 35.5849056604, "converted": null, "ext": "f90", "file": null, "hexsha": "2160b2ee9e1ccb66853945a7df3ab3c6886518d4", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_f...
import open3d as o3d import argparse import os import sys import logging import numpy import numpy as np import torch import torch.utils.data import torchvision from torch.utils.data import DataLoader from tqdm import tqdm from sklearn.neighbors import NearestNeighbors from scipy.spatial.distance import minkowski impor...
{ "alphanum_fraction": 0.7051669545, "author": null, "avg_line_length": 37.7608695652, "converted": null, "ext": "py", "file": null, "hexsha": "a1f9e3b8dd195f871ab7cbc84fa069c4c6ed6709", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#!/usr/bin/env python ''' File name: fetch_and_transform_data.py Author: Varun Jampani ''' # --------------------------------------------------------------------------- # Video Propagation Networks #---------------------------------------------------------------------------- # Copyright 2017 Max Planck Societ...
{ "alphanum_fraction": 0.5992655001, "author": null, "avg_line_length": 34.5447761194, "converted": null, "ext": "py", "file": null, "hexsha": "6056fe30171156e3eeb8c97de594e7bac6ea7a6b", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
SUBROUTINE W3FI82 (IFLD,FVAL1,FDIFF1,NPTS) C$$$ SUBPROGRAM DOCUMENTATION BLOCK C . . . . C SUBPROGRAM: W3FI82 CONVERT TO SECOND DIFF ARRAY C PRGMMR: CAVANAUGH ORG: NMC421 DATE:93-08-18 C C ABSTRACT: ACCEPT AN INPUT ARRAY, CONVERT ...
{ "alphanum_fraction": 0.5507470376, "author": null, "avg_line_length": 31.8196721311, "converted": null, "ext": "f", "file": null, "hexsha": "838a426f2be3d61f994d547a440c90caaf5f8b46", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma hRe_add: "\<And>x y. hRe (x + y) = hRe x + hRe y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<And>x y. hRe (x + y) = hRe x + hRe y [PROOF STEP] by transfer simp
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 90, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": nu...
[STATEMENT] lemma pvar_trans_eval: assumes "a \<in> carrier R" assumes "b \<in> carrier (R\<^bsup>n\<^esup>)" assumes "i < n" shows "eval_at_point R b (pvar_trans n i a) = (b!i) \<ominus> a" [PROOF STATE] proof (prove) goal (1 subgoal): 1. eval_at_point R b (pvar_trans n i a) = b ! i \<ominus> a [PROOF STEP] p...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Padic_Field_Ring_Powers", "hexsha": null, "include": null, "lang": null, "length": 9, "llama_tokens": 1294, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_...
# -*- coding: utf-8 -*- """This example script demonstrates plotting echograms using fake data.""" import numpy as np from matplotlib.pyplot import figure, show from echolab2.processing import processed_data, line from echolab2.plotting.matplotlib import echogram test_data_pings = 100 test_data_samples = 1000 sample...
{ "alphanum_fraction": 0.7385752688, "author": null, "avg_line_length": 31, "converted": null, "ext": "py", "file": null, "hexsha": "0b95fbf51679162d3c25ef5cc9d97038a962f101", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
#include <boost/spirit/home/classic/actor/swap_actor.hpp>
{ "alphanum_fraction": 0.8103448276, "author": null, "avg_line_length": 29, "converted": null, "ext": "hpp", "file": null, "hexsha": "73179f5b5225af3bd233bd7fc5a393d61a85ee41", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": 4,...
using ..SymEngine using ..SymEngine: @vars, Basic export @vars, Basic, subs include("register.jl") include("instruct.jl") include("blocks.jl") include("patch.jl")
{ "alphanum_fraction": 0.7256097561, "author": null, "avg_line_length": 18.2222222222, "converted": null, "ext": "jl", "file": null, "hexsha": "14c46ae0167f7351ee5d81bd4d1907d504e20e88", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
function out = sampleInSeconds(stimList,ISI,varargin) % out = sampleInSeconds(stimList,ISI,varargin) % input: stimList, output: stimlist sampled in .1 seconds % OR sampled at your specified frequency scale = ceil(ISI*10); if nargin > 2 scale = round(ISI/varargin{1}); end numstim = size(s...
{ "alphanum_fraction": null, "author": "canlab", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_date...
Describe Users/kmitchell here. Hi. Im nice, and I dont really know how to use this thing. YAY! 20080715 13:44:26 nbsp Welcome to the Wiki Howdy, Mr. or Ms. Mitchell, and Welcome to the Wiki! My names Evan, pleased to meet you. Everybody starts off not knowing how to use this thing, but being nice gets you plen...
{ "alphanum_fraction": 0.7659090909, "author": null, "avg_line_length": 97.7777777778, "converted": null, "ext": "f", "file": null, "hexsha": "3f99800698f105bcacdea7dd9e30a27244be6a39", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...