text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
#!/usr/bin/env python
# coding: utf8
#
# Copyright (c) 2020 Centre National d'Etudes Spatiales (CNES).
#
# This file is part of PANDORA
#
# https://github.com/CNES/Pandora_pandora
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#... | {"hexsha": "8f821e5b63dabe5bc2bf000593333f9cf91eb2f9", "size": 12524, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandora/stereo/sad_ssd.py", "max_stars_repo_name": "dumasl/Pandora", "max_stars_repo_head_hexsha": "6bae22926e59bcd02d7f6f9485bd5715ffceb450", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
using Compat
if isa(Pkg.installed("IJulia"), VersionNumber)
using IJulia
python = strip(readline(IJulia.jupyter), ['\n',' ', '#','!'])
ipywver = readstring(`$python -c 'import ipywidgets; print ipywidgets.__version__'`) |> strip |> VersionNumber
info("ipywidgets version found: $ipywver")
if ipywver... | {"hexsha": "12188f7009ca9ca74b25d43ce5b98d01028c55af", "size": 751, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "deps/build.jl", "max_stars_repo_name": "skleinbo/Interact.jl", "max_stars_repo_head_hexsha": "a1d2f9782a9a91c50699fceb94284eb0f8758075", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma... |
""" Helper functions used in our simulation study """
from __future__ import division
import numpy as np
from scipy.linalg import orth
from scipy import optimize
from BanditPricing import *
def generateDemands(p, U, z, V, noise_std):
""" Returns vector of observed demands q (1-D array)
for given product... | {"hexsha": "33f9a90bfe50d95d00b50816ab46c04cbc744565", "size": 11158, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulationFuncs.py", "max_stars_repo_name": "rameezw/BanditDynamicPricing", "max_stars_repo_head_hexsha": "352d5ccadb40a25601f12000b4df2e4703980bbb", "max_stars_repo_licenses": ["MIT"], "max_star... |
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 5 10:15:34 2014
INSTALLATION
This script depends on PyGt5, which **cannot** be run from ESRI ArcGIS Pro Python.
To install PyQt5, open a command window as administrator and navigate to your Python
folder (the folder that contains python.exe):
scripts\pip install py... | {"hexsha": "89a6770f696873be3b9f7f047fe90022763b5391", "size": 12783, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/geosoft_research/self_organizing_maps/som_om_qt5.py", "max_stars_repo_name": "fearaschiarrai/gxpy", "max_stars_repo_head_hexsha": "4c5e7594b24e530a8cd94df1eef562c5c6ce3e92", "max_stars_r... |
/**
* @project zapdos
* @file src/search/SearchWiki.cc
* @author S Roychowdhury < sroycode at gmail dot com >
* @version 1.0.1
*
* @section LICENSE
*
* Copyright (c) 2018-2020 S Roychowdhury
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated do... | {"hexsha": "fbfc5857ce11e6bd5c696ad6543f7807b6cdca58", "size": 3003, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/search/SearchWiki.cc", "max_stars_repo_name": "sroycode/zapdos", "max_stars_repo_head_hexsha": "8818ef109e072dcbe990914d9a2a6d70ef190d3e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5... |
"""
Classes for modelling the plasma, without any matching
"""
from prepic.base import BaseClass
from prepic.constants import r_e
import numpy as np
import unyt as u
dim = u.dimensions
@u.accepts(ωp=1 / dim.time, τL=dim.time)
def interaction_regime(ωp, τL):
"""Outputs the laser-plasma interaction regime.
... | {"hexsha": "e8d80dc055308d7b9e278f548886d5adbbe0ff3e", "size": 5997, "ext": "py", "lang": "Python", "max_stars_repo_path": "prepic/plasma.py", "max_stars_repo_name": "berceanu/prepic", "max_stars_repo_head_hexsha": "62466832a4a8c8da20848d981ef75854b228dbad", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count... |
from __future__ import division
import sys
import params
import numpy as np
import os
import skimage.io
model_folder = '../../models/'
if len(sys.argv) < 2:
print "Missing arguments, first argument is model name, second is epoch"
quit()
model_folder = os.path.join(model_folder, sys.argv[1])
#Overwrite param... | {"hexsha": "41e01cd553ff08ddb497eaf2007b3ff850d2f343", "size": 3079, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/deep/predict.py", "max_stars_repo_name": "DataForces/CV_LUNA", "max_stars_repo_head_hexsha": "adc76fdc580807742fee4c6453c728a2d6d76ed3", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars... |
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!------... | {"hexsha": "2affebac2b8afdf460214cca1560fc3360eed312", "size": 3549, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "cdn/rot_den_mat.f", "max_stars_repo_name": "MRedies/FLEUR", "max_stars_repo_head_hexsha": "84234831c55459a7539e78600e764ff4ca2ec4b6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
# Cross Entropy loss function
export CrossEntropy
"""
**Cross Entropy loss**
CrossEntropy(b)
Returns the function
```math
f(x) = -\\frac{1}{N} \\sum_{i = 1}^{N} b_i \\log (x_i)+(1-b_i) \\log (1-x_i),
```
where `b` is an array such that `0 ≤ b ≤ 1` component-wise.
"""
struct CrossEntropy{R <: Real, T <: Abstract... | {"hexsha": "ce8ee90fc05493e0b0d9b1acd767c8115fee0605", "size": 2171, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/functions/crossEntropy.jl", "max_stars_repo_name": "JuliaTagBot/ProximalOperators.jl-1", "max_stars_repo_head_hexsha": "adaa0d22ca6be799cbfd59323c2d20d63b8938cc", "max_stars_repo_licenses": ["M... |
# AUTOGENERATED! DO NOT EDIT! File to edit: notebooks/00_core.ipynb (unless otherwise specified).
__all__ = ['BaseModel', 'adam', 'handle_interrupt', 'Trainer', 'PredictionExaminer']
# Cell
from collections import defaultdict
from collections.abc import Iterable
from functools import partial, wraps
from inspect impo... | {"hexsha": "e511e563d551eb2f6f325eebd0d079cde066fd09", "size": 38635, "ext": "py", "lang": "Python", "max_stars_repo_path": "incendio/core.py", "max_stars_repo_name": "hdmamin/mytorch", "max_stars_repo_head_hexsha": "a116065e11b18a552271e8e6b23197df530bdb45", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import argparse
import os
from timeit import time
import warnings
import sys
import cv2
import numpy as np
from PIL import Image
from yolo import YOLO
from deep_sort import preprocessing
from deep_sort impo... | {"hexsha": "b8762e3a1a3a2de355bcb649242a114ceeaf70c6", "size": 3098, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo_image.py", "max_stars_repo_name": "whitenightwu/Project4-deep_sort_yolov3", "max_stars_repo_head_hexsha": "aff377fbd278162b8a727962a379c17d41533780", "max_stars_repo_licenses": ["MIT"], "max_... |
# -*- coding: utf-8 -*-
import os
import matplotlib.pyplot as plt
import numpy as np
def plot2d_simplex(simplex, ind):
fig_dir = "./"
plt.cla()
n = 1000
x1 = np.linspace(-256, 1024, n)
x2 = np.linspace(-256, 1024, n)
X, Y = np.meshgrid(x1, x2)
Z = np.sqrt(X ** 2 + Y ** 2)
plt.contour(... | {"hexsha": "5a836ac1a7650c5b0ff4100aa1dca89397dab9ec", "size": 863, "ext": "py", "lang": "Python", "max_stars_repo_path": "nelder_mead/utils.py", "max_stars_repo_name": "owruby/nelder_mead", "max_stars_repo_head_hexsha": "99e279c5e1d722143fdb7126100d692bb6e8e226", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import tensorflow as tf
import numpy as np
import os
import socket
from PIL import Image
from gesture import Gesture
from socketHelper import SocketHelper
class Predictor:
model = None
data = None
history = None
def __init__(self):
np.set_printoptions(suppress=True)
self.model = tf.... | {"hexsha": "a924f080e21697b79e62fd16bce8127108e20bf2", "size": 1942, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlServer/mlServer/predictor.py", "max_stars_repo_name": "Halfbax/mioiAI", "max_stars_repo_head_hexsha": "1c236f55e062eec67c6b305d33af2aa3686ebe6a", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
import pickle
from matplotlib import pyplot as plt
import numpy as np
import os
from sklearn.cluster import KMeans
import scipy.io as sio
import scipy.signal as sp
from os import listdir
from os.path import isfile, join
import sklearn.linear_model as lm
import time
# do stuff
'''
data_folder = os.path.join("Deskto... | {"hexsha": "7216fb6de9b9ccfbcef8f08605347db0a3ceee80", "size": 4322, "ext": "py", "lang": "Python", "max_stars_repo_path": "bci/gain_matrix_clasterization.py", "max_stars_repo_name": "gurasog/cognigraph", "max_stars_repo_head_hexsha": "34a0f31376bc2cb1b04e45bb333a3437dd6e560a", "max_stars_repo_licenses": ["MIT"], "max_... |
# -*- coding: utf-8 -*-
"""
Miscellaneous visualization routines
"""
from functools import partial
from collections import Counter
import seaborn as sb
import numpy as np
import matplotlib.pyplot as plt
import scipy.optimize as optim
from scipy.optimize import curve_fit
from scipy.stats import logser
import pandas as... | {"hexsha": "cab1fe26f4681f8d199b6534c8e18e27777a89ac", "size": 19657, "ext": "py", "lang": "Python", "max_stars_repo_path": "copia/plot.py", "max_stars_repo_name": "mikekestemont/copia", "max_stars_repo_head_hexsha": "d02cc74f75786fb70d68592eeef446b1f10e5189", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count": ... |
[STATEMENT]
lemma crk_is_preserved:
fixes A::"'a::{field}^'cols::{finite, wellorder}^'rows"
and P::"'a::{field}^'rows^'rows"
assumes inv_P: "invertible P"
shows "col_rank A = col_rank (P**A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. col_rank A = col_rank (P ** A)
[PROOF STEP]
using rank_nullity_theorem_matri... | {"llama_tokens": 333, "file": "Gauss_Jordan_Rank", "length": 3} |
import numpy as np
from prody import *
class GammaResidue(Gamma):
"""Return force constant for a particular pair of residues.
Returns normal force constant apart from at the residues being tested for allosteric character.
"""
# see ProDy documentation for template
def __init__(self, atoms, res_nos... | {"hexsha": "4a79b5f5b9c7d85487c7231c3ab53997bafc37ab", "size": 2873, "ext": "py", "lang": "Python", "max_stars_repo_path": "functions/nma_methods.py", "max_stars_repo_name": "jgreener64/allopred", "max_stars_repo_head_hexsha": "07ce93a5cde2b5d34e7ab2fd101036e5ed62548a", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
[GOAL]
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : HasOrthogonalProjection (direction s)
p1 p2 p3 : P
hp1 : p1 ∈ s
hp2 : p2 ∈ s
⊢ dist p1 p3 = dist p2 p3 ↔ dist ... | {"mathlib_filename": "Mathlib.Geometry.Euclidean.Circumcenter", "llama_tokens": 117970} |
import numpy as np
import cv2
import pickle
import warnings
warnings.simplefilter("ignore", DeprecationWarning)
class Number:
def __init__(self, image):
self.image = image
self.num = 1
# self.client = client
def image_cut(self, image):
# image = cv2.imread('Number2.jpg',0)
... | {"hexsha": "35b0970001d4a0dd9332fb8d4c0052f6c8123739", "size": 6457, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/vision/number.py", "max_stars_repo_name": "Bye-lemon/DroneSim", "max_stars_repo_head_hexsha": "b75d496338f741c0509769c37385a3f0ab0d5648", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
import unittest
import chainer
from chainer.backends import cuda
from chainer.functions import relu
from chainer import testing
from chainer.testing import attr
from chainercv.links import SeparableConv2DBNActiv
import numpy as np
def _add_one(x):
return x + 1
@testing.parameterize(*testing.product({
'di... | {"hexsha": "20bc0f3efacb13e0390c7191a3bfaca860761e27", "size": 3511, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/links_tests/connection_tests/test_separable_conv_2d_bn_activ.py", "max_stars_repo_name": "beam2d/chainercv", "max_stars_repo_head_hexsha": "55d34c07cbbd03642b71d375db579433859bd00e", "max_st... |
\section{Calculus of Vector and Matrix Valued Functions}
\subsection{Exercise 1}
That $\dot{x}(t) = 0 \implies x(t) = c$ follows immediately from the mean value inequality for vector-valued
functions, $\norm{x(b) - x(a)} \leq (b - a) \norm{x'(t)}$ for some $t \in (a, b)$. My guess is that
Lax was hinting at applying t... | {"hexsha": "fa273cd8fbce4d5c2af6854d0a298a1d244cfcaf", "size": 2352, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Linear_Algebra_Lax/chapter_9.tex", "max_stars_repo_name": "2014mchidamb/Math-Exercise-Guides", "max_stars_repo_head_hexsha": "5ea4efe2267053695123a2c2d2c5171a672f61d4", "max_stars_repo_licenses": ["... |
import os
import torch
import torch.nn as nn
import torch.nn.functional as F
from utils import variable
import torch.optim as optim
from utils import variable
import numpy as np
import math
class Classifier(object):
def __init__(self, args):
super(Classifier, self).__init__()
self.args = args
... | {"hexsha": "0a3a2c54c0e71d5edefcdb3a31aa6d9cd9e22549", "size": 6563, "ext": "py", "lang": "Python", "max_stars_repo_path": "Classifiers/Classifier.py", "max_stars_repo_name": "softbankrobotics-research/Generative_Continual_Learning", "max_stars_repo_head_hexsha": "66b121437c248993b41f154b5a2d6b7197278578", "max_stars_r... |
// [===========================================================================]
// [ M o n e t a ]
// [---------------------------------------------------------------------------]
// [ ... | {"hexsha": "cf8964792aec1cc070bacc89a574937c94a48f9a", "size": 8275, "ext": "hxx", "lang": "C++", "max_stars_repo_path": "include/moneta/container/rcontext.hxx", "max_stars_repo_name": "madera/Moneta", "max_stars_repo_head_hexsha": "4c0da911bceb511d7d1133699b0d85216bb63d74", "max_stars_repo_licenses": ["BSL-1.0"], "max... |
# -*- coding: UTF-8 -*-
import pandas as pd
data = pd.read_csv('data/adult.data')
cols = ['age', 'education_num', 'capital_gain', 'capital_loss', 'hours_per_week', 'label']
data = data[cols]
print '读取数据'
print data.head(8)
print '数据转换'
data['label_code'] = pd.Categorical(data.label).codes
print data[['label', 'label_c... | {"hexsha": "c5a096e9b9807085c04ba353d4143e3f4b73d6c5", "size": 938, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_science_master/2_logistic_regression/1_explore_data.py", "max_stars_repo_name": "wdxtub/deep-learning-note", "max_stars_repo_head_hexsha": "47b83a039b80d4757e0436d5cbd2fa3037de3904", "max_star... |
#!/usr/bin/env python
"""
Generic Euler rotations
"""
import math
import numpy as np
# Local modules
import trifinger_mujoco.utils as tfu
def to_axis_angle(ai, aj, ak, axes="sxyz"):
"""
Return axis-angle rotation from Euler angles and axes sequence
Parameters
----------
ai: float
First rot... | {"hexsha": "659d8ffb3435dd187f7efd0aa88c755e35edb13b", "size": 4935, "ext": "py", "lang": "Python", "max_stars_repo_path": "trifinger_mujoco/utils/euler.py", "max_stars_repo_name": "xuanhien070594/trifinger-mujoco", "max_stars_repo_head_hexsha": "84ea42aad1b3cf153d013aa2c883fc072329a796", "max_stars_repo_licenses": ["M... |
from flask import Flask, request, jsonify
import pandas as pd
import numpy as np
from joblib import load
from pathlib import Path
# Paths
model_path = Path(
Path().absolute(),
'models'
)
# Load model and feature names
model = load(Path(model_path, 'final_model.pkl'))
feature_names = ['SepalLengthCm', 'Se... | {"hexsha": "5775c56d0ffbf117eb03596a86c02e34e12d764b", "size": 1493, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/app.py", "max_stars_repo_name": "howewenann/docker_proj", "max_stars_repo_head_hexsha": "0d521d6ce71bcfdbe4fd0da4765d4616966a1cda", "max_stars_repo_licenses": ["FTL"], "max_stars_count"... |
from collections import deque
import numpy as np
import imutils
import cv2
import time
def color_car(center_car):
#设定红色阈值,HSV空间
blueLower = np.array([100, 100, 160])
blueUpper = np.array([105, 165, 200])
#读取图片
frame = cv2.imread('image.jpg')
#转到HSV空间
hsv = cv2.cvtColor(frame, cv2.COLOR_BGR... | {"hexsha": "becf21048d79579b642795fdde880c6aeae897cb", "size": 992, "ext": "py", "lang": "Python", "max_stars_repo_path": "find_car.py", "max_stars_repo_name": "ykhan1998/for2019421contest", "max_stars_repo_head_hexsha": "07e0124819d817fff729276f97d821229ad09336", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
[STATEMENT]
lemma pairwise_intersect_finite:
assumes "finite As"
assumes "finite Bs"
shows "finite (pairwise_intersect As Bs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. finite (pairwise_intersect As Bs)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. finite (pairwise_intersect As Bs... | {"llama_tokens": 1282, "file": "Padic_Field_Generated_Boolean_Algebra", "length": 15} |
import os
from typing import Callable, List, Tuple
import cv2
import numpy as np
import pandas as pd
from tensorflow import keras
class SliceDataGenerator(keras.utils.Sequence):
def __init__(
self,
df: pd.DataFrame,
image_dir: str,
filename_col: str,
label_col: str,
... | {"hexsha": "661ea0e9dfbfb0dad73f307d60a8421f848c0261", "size": 2252, "ext": "py", "lang": "Python", "max_stars_repo_path": "training/slice_data_generator.py", "max_stars_repo_name": "turku-rad-ai/pe-detection", "max_stars_repo_head_hexsha": "d9b49800de45a40030db72db65f4806b23d97a63", "max_stars_repo_licenses": ["Apache... |
# --------------
#Importing header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#Path of the file
path
data = pd.read_csv(path)
#Code starts here
data.rename(columns = {'Total' : 'Total_Medals'}, inplace = True)
data.head(10)
# --------------
data['Better_Eve... | {"hexsha": "1c6b029aa7677a0166acf58e219e34b5c0898f09", "size": 2468, "ext": "py", "lang": "Python", "max_stars_repo_path": "code.py", "max_stars_repo_name": "iamacityzen/Project---Data-handling-with-Pandas.", "max_stars_repo_head_hexsha": "123f0427486a0f0807f6e53f1115ae07437add17", "max_stars_repo_licenses": ["MIT"], "... |
# This file was generated, do not modify it. # hide
DataFrames.describe(features) | {"hexsha": "d9966249604e16d6e00bbc29fcc55baab24ad657", "size": 81, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "__site/assets/end-to-end/boston-lgbm/code/ex3.jl", "max_stars_repo_name": "giordano/DataScienceTutorials.jl", "max_stars_repo_head_hexsha": "8284298842e0d77061cf8ee767d0899fb7d051ff", "max_stars_repo... |
[STATEMENT]
lemma (in is_cf_adjunction) is_cf_adjunction_op:
\<comment>\<open>See comments in subsection 2.1 in \cite{bodo_categories_1970}.\<close>
"op_cf_adj \<Phi> : op_cf \<GG> \<rightleftharpoons>\<^sub>C\<^sub>F op_cf \<FF> : op_cat \<DD> \<rightleftharpoons>\<rightleftharpoons>\<^sub>C\<^bsub>\<alpha>\<^esub... | {"llama_tokens": 4883, "file": "CZH_Universal_Constructions_czh_ucategories_CZH_UCAT_Adjoints", "length": 14} |
[STATEMENT]
lemma Lambert_W'_times_exp_self':
assumes "x \<in> {-exp (-1)..<0}"
shows "exp (Lambert_W' x) * Lambert_W' x = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. exp (Lambert_W' x) * Lambert_W' x = x
[PROOF STEP]
using Lambert_W'_times_exp_self[of x] assms
[PROOF STATE]
proof (prove)
using this:
x \... | {"llama_tokens": 243, "file": "Lambert_W_Lambert_W", "length": 2} |
import numpy as np
import glm
import time
from vispy import app, gloo, util
from vispy.gloo import Program
from vispy.util.transforms import perspective
from matplotlib import cm
from camera import Camera, CameraInputHandler
def _checkerboard(size=64,tiles=4):
return np.reshape(
np.kron(
... | {"hexsha": "131446f392b9f14e26e6d20d48f242ea0bfc3b65", "size": 11022, "ext": "py", "lang": "Python", "max_stars_repo_path": "ParticleVis.py", "max_stars_repo_name": "hschwane/PyParticleVis", "max_stars_repo_head_hexsha": "b73643e9a3164029d1f94cfba425ead8068381c4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import numpy as np
import cv2
from ainvr import ainvr
from iou_tracker.iou_tracker import Tracker
font = cv2.FONT_HERSHEY_DUPLEX
font_size = 0.8
def render_detections(im, detections):
for detection in detections:
xmin = int(detection["xmin"])
ymin = int(detection["ymin"])
xmax = int(detection["... | {"hexsha": "61fa51370f5e39e612bf2ecf091420f2b5d27fc6", "size": 2556, "ext": "py", "lang": "Python", "max_stars_repo_path": "sandbox.py", "max_stars_repo_name": "GBJim/iou-tracker", "max_stars_repo_head_hexsha": "4cf262d00e07bbc69eec12099b17f8f6646583da", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_st... |
// Copyright (c) 2007-2016 Hartmut Kaiser
// Copyright (c) 2011 Bryce Lelbach
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <hpx/config.hpp>
#include <hpx/error.hpp>
#include <hpx/error_code.... | {"hexsha": "44807a6d9625c192aca345b552f34e0487ceef3a", "size": 41514, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "hpxml/src/exception.cpp", "max_stars_repo_name": "STEllAR-GROUP/hpxML", "max_stars_repo_head_hexsha": "cce6478c2fe28e9917a67bab12af5ae54a254786", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_... |
module Datasets
using ..FastAI
using ..FastAI: typify
import MLUtils: MLUtils, getobs, numobs, filterobs, groupobs, mapobs,
shuffleobs, groupobs, eachobs, ObsView
import MLDatasets
using MLUtils: mapobs, groupobs
using DataDeps
using FilePathsBase
import DataAugmentation
using FilePathsBase: filename
import FileI... | {"hexsha": "8fcbb1befeeb0807115ebb6ed59979a9de8b7813", "size": 1099, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/datasets/Datasets.jl", "max_stars_repo_name": "opus111/FastAI.jl", "max_stars_repo_head_hexsha": "36acddcbe8b92766538b34c4ab795ba50eaafb15", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
\documentclass{article}
\usepackage{bm}
\usepackage[colorlinks=true,psdextra,unicode]{hyperref}
\begin{document}
\pdfbookmark[1]{\contentsname}{toc}
\tableofcontents
\pdfbookmark[1]{Abstract}{abstract}
\begin{abstract}
\centering
Sample sections follow.
\end{abstract}
\section{The equation \texorpdfstring{$y... | {"hexsha": "db0bee013536f474e29f153db6c84a172e5e005e", "size": 605, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Chapter_12_-_Enhancing_Your_Documents_Further/02_bookmarks.tex", "max_stars_repo_name": "PacktPublishing/LaTeX-Beginner-s-Guide---Second-Edition", "max_stars_repo_head_hexsha": "26931e5c56bcfdf3d7a92... |
PROGRAM xselect
C driver for routine select
INTEGER NP
PARAMETER(NP=100)
INTEGER i,k
REAL q,s,select,selip,arr(NP),brr(NP)
open(7,file='TARRAY.DAT',status='OLD')
read(7,*) (arr(i),i=1,NP)
close(7)
1 write(*,*) 'INPUT K'
read(*,*,END=999) k
d... | {"hexsha": "14b06ea708a0a3a97e531aca0707fe4b560bf42c", "size": 606, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "NR-Functions/Numerical Recipes- Example & Functions/Examples/xselect.for", "max_stars_repo_name": "DingdingLuan/nrfunctions_fortran", "max_stars_repo_head_hexsha": "37e376dab8d6b99e63f6f1398d0c33... |
import pysdot as ot
import numpy as np
import numpy.linalg as la
import matplotlib.pyplot as plt
"""
# Description:
Computes
"""
xbnds = [0.0,1.0] # minimum and maximum x values
ybnds = [0.0,1.0] # minimum and maximum y values
Ns = [50,50]
circle_radius = 0.1
bbox = ot.BoundingBox(xbnds[0],xbnds[1],ybnds[0],ybnds[... | {"hexsha": "c822231e1a9e0ce621f46da9b9c97a29cb1b5cdc", "size": 9033, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/python/UnbalancedCircles.py", "max_stars_repo_name": "mparno/sdot2d", "max_stars_repo_head_hexsha": "f632824fc4f0285eab6de911cca8932f69ece705", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <ctime>
#include <algorithm>
#include <Eigen/Dense>
#include <Eigen/Geometry>
#include <ros/ros.h>
#include <ros/package.h>
#include <visualization_msgs/Marker.h>
#include <visualization_msgs/MarkerArray.h>
#include <geometry_msgs... | {"hexsha": "a1446a12525790e25634a5b4822167b99a76a1c4", "size": 27350, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "object_slam/src/main_obj.cpp", "max_stars_repo_name": "damsalevente/cube_slam", "max_stars_repo_head_hexsha": "6b9225f89d6bab0d930fa74c1624157e79009c97", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
from __future__ import division
import numpy as np
from collections import namedtuple
import bilby
from bilby.gw import conversion
import os
import gwpopulation
MassContainer = namedtuple('MassContainer', ['primary_masses', 'secondary_masses',
'mass_ratios', 'total_masses... | {"hexsha": "15c5de2b69af118b35b55eb0f7fb950255c65937", "size": 7007, "ext": "py", "lang": "Python", "max_stars_repo_path": "memestr/population.py", "max_stars_repo_name": "MoritzThomasHuebner/memestr", "max_stars_repo_head_hexsha": "acac0af27272304000007ead581333bf91ea4dbc", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import os
import sys
import cv2
import math
import pyprind
import random
import aggdraw
import torch
import numpy as np
import numpy.linalg as lng
import torchvision.transforms as transforms
import dl_modules.dataset as ds
from PIL import Image
w_min = 1.0
w_max = 12.0
line_colors = [
((184, 100, 63), 1 / 144),
... | {"hexsha": "3bb6731debd2787c3f45372509aa56787c53fad8", "size": 13789, "ext": "py", "lang": "Python", "max_stars_repo_path": "cm_modules/draw.py", "max_stars_repo_name": "SergejVolkov/SR_base", "max_stars_repo_head_hexsha": "285b40c0bbe9dc46f2bd660dc80ff255b4dc65a0", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
"""
The exported names are
$(EXPORTS)
"""
module FESpaces
using DocStringExtensions
using Test
using FillArrays
using BlockArrays
using SparseArrays
using LinearAlgebra
using Gridap.Helpers
using Gridap.Algebra
using Gridap.Arrays
using Gridap.Fields
using Gridap.ReferenceFEs
using Gridap.Geometry
using Gridap.CellD... | {"hexsha": "3240d6b23e76e80c4392e61e09befa6174455f56", "size": 5097, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/FESpaces/FESpaces.jl", "max_stars_repo_name": "Omega-xyZac/Gridap.jl", "max_stars_repo_head_hexsha": "c9f0ca39a0c84646ea9e4b57fd39d3a6db59c044", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
[STATEMENT]
lemma rt_graph_nhip_is_nhop [dest]:
"\<And>ip ip' \<sigma> dip. (ip, ip') \<in> rt_graph \<sigma> dip \<Longrightarrow> ip' = the (nhop (rt (\<sigma> ip)) dip)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<And>ip ip' \<sigma> dip. (ip, ip') \<in> rt_graph \<sigma> dip \<Longrightarrow> ip' = the (n... | {"llama_tokens": 299, "file": "AODV_variants_d_fwdrreqs_D_Loop_Freedom", "length": 2} |
import sys
sys.path.append('..')
from cntspectrum import cntSpectrum
from cntspin import cntSpin
import numpy as np
import matplotlib.pyplot as plt
model_kw = {
'deltaSO': 0.15,
'deltaKK': 0.07,
'mu_orb': 0.15,
'J': 0.12,
}
model = cntSpectrum(**model_kw)
spin = cntSpin()
B_fields = 1
B_angles = np.lins... | {"hexsha": "e80f6571b89334b38e420e41c23cbdec21dc62db", "size": 1469, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/simple_example_with_spin.py", "max_stars_repo_name": "qdev-dk/cntSpectrum", "max_stars_repo_head_hexsha": "0fe0e7695610004ff56d19cf61faae5aa7a5209a", "max_stars_repo_licenses": ["BSD-2-Cl... |
"""
This file contains several helper functions to manipulate 1D and 2D EEG data.
"""
import logging
import numpy as np
from scipy.interpolate import interp1d
from .numba import _slope_lstsq, _covar, _corr, _rms
logger = logging.getLogger('yasa')
__all__ = ['moving_transform', 'trimbothstd', 'sliding_window',
... | {"hexsha": "4c256464411e078d1b9b48785aa1a6cc794a5618", "size": 14550, "ext": "py", "lang": "Python", "max_stars_repo_path": "yasa/others.py", "max_stars_repo_name": "raphaelvallat/yasa", "max_stars_repo_head_hexsha": "4d23501a77e16d878779250706f16df4f5eb6296", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou... |
import pandas as pd
import numpy as np
from collections import Counter
class my_NB:
def __init__(self, alpha=1):
# alpha: smoothing factor
# P(xi = t | y = c) = (N(t,c) + alpha) / (N(c) + n(i)*alpha)
# where n(i) is the number of available categories (values) of feature i
# Setting... | {"hexsha": "c31f03b2e09de221d12f67f1f7b802bd105ed6a0", "size": 1975, "ext": "py", "lang": "Python", "max_stars_repo_path": "assignments/assignment3/my_NB_hint.py", "max_stars_repo_name": "ra9118/fds", "max_stars_repo_head_hexsha": "cc893e71aa6da2a7e1f51fbaa6f25fbf16e2cead", "max_stars_repo_licenses": ["MIT"], "max_star... |
# Authors:
# Loic Gouarin <loic.gouarin@polytechnique.edu>
# Benjamin Graille <benjamin.graille@math.u-psud.fr>
#
# License: BSD 3 clause
"""
This module provides the classes to manage the velocities of
lattice Boltzmann schemes.
"""
from math import sqrt
import logging
import numpy as np
from .utils import i... | {"hexsha": "c1a130ee9d5f8a7f22b746a2465d17074cbeea7d", "size": 28751, "ext": "py", "lang": "Python", "max_stars_repo_path": "pylbm/stencil.py", "max_stars_repo_name": "Mopolino8/pylbm", "max_stars_repo_head_hexsha": "b457ccdf1e7a1009807bd1136a276886f81a9e7d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_coun... |
[STATEMENT]
lemma irreducible_primitive_part:
assumes "irreducible p" and "degree p > 0"
shows "primitive_part p = p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. primitive_part p = p
[PROOF STEP]
using irreducible_content[OF assms(1), unfolded primitive_iff_content_eq_1] assms(2)
[PROOF STATE]
proof (prove)
u... | {"llama_tokens": 195, "file": "Algebraic_Numbers_Sturm_Rat", "length": 2} |
[STATEMENT]
lemma [simp]:
"xcpt_eff i P (pc+n) \<tau> (shift n xt) =
map (\<lambda>(pc,\<tau>). (pc + n, \<tau>)) (xcpt_eff i P pc \<tau> xt)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. xcpt_eff i P (pc + n) \<tau> (shift n xt) = map (\<lambda>(pc, \<tau>). (pc + n, \<tau>)) (xcpt_eff i P pc \<tau> xt)
[PRO... | {"llama_tokens": 780, "file": "JinjaDCI_Compiler_TypeComp", "length": 8} |
import pandas as pd
import numpy as np
import yfinance as yf
import datetime as dt
from pandas_datareader import data as pdr
import statistics
import time
yf.pdr_override()
now = dt.datetime.now()
start =dt.datetime(2019,1,1)
smaUsed=[50,200]
emaUsed=[21]
stock = input('Enter a ticker: ')
position = input('Buy or Sh... | {"hexsha": "0bbe9c9dd616fc5512ca99895adc603c0a98ad3a", "size": 4021, "ext": "py", "lang": "Python", "max_stars_repo_path": "Portfolio_Strategies/risk_management.py", "max_stars_repo_name": "vhn0912/Finance", "max_stars_repo_head_hexsha": "39cf49d4d778d322537531cee4ce3981cc9951f9", "max_stars_repo_licenses": ["MIT"], "m... |
%% Creating one filter
% In this demo, we will show how to build some filters in spatial domain or
% Fourier domain. Gabor, Morlet and Gaussian filters are pointed out.
%
%% Reviewed functions
% The following function will be demonstrated:
%%
%
% # gabor_2d
% # gaussian_2d
% # morlet_2d_noDC
% # morlet_2d_pyramid
%
%%... | {"author": "scatnet", "repo": "scatnet", "sha": "59d935afa20359845282a3518134e24244862c1f", "save_path": "github-repos/MATLAB/scatnet-scatnet", "path": "github-repos/MATLAB/scatnet-scatnet/scatnet-59d935afa20359845282a3518134e24244862c1f/demo/filters/demo_individual_filter.m"} |
from numbers import Number
from typing import TypeVar
import numpy as np
from matplotlib import pyplot as plt
x = np.linspace(0.01, 1, 100)
T = TypeVar("T", Number, np.ndarray)
gamma_vector = np.vectorize(np.math.gamma)
def factorial(a: T) -> T:
return gamma_vector(a + 1)
def R(x: T, N: int) -> T:
retur... | {"hexsha": "b75d7f7bddfe805e6d025712948e66cb2c1bf443", "size": 661, "ext": "py", "lang": "Python", "max_stars_repo_path": "assignment_01_01.py", "max_stars_repo_name": "jvdoorn/SP1", "max_stars_repo_head_hexsha": "a165256d97890a60788a98523ce5b2679614a9f0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
from collections import defaultdict
import numpy as np
r, c, k = map(int, input().split())
items = np.zeros((r, c), np.int32)
for _ in range(k):
y, x, v = map(int, input().split())
items[y - 1, x - 1] = v
dp = np.zeros((r, c, 4), np.int64)
for y in range(r):
for x in range(c):
dp[y, x, 0] = max(... | {"hexsha": "fa103c52f70424ba4b8057f67aac8aa5fac1d2df", "size": 782, "ext": "py", "lang": "Python", "max_stars_repo_path": "contests_atcoder/abc175/abc175_e_np.py", "max_stars_repo_name": "takelifetime/competitive-programming", "max_stars_repo_head_hexsha": "e7cf8ef923ccefad39a1727ca94c610d650fcb76", "max_stars_repo_lic... |
[STATEMENT]
lemma mcalc2:
assumes c': "c' \<in> gPB"
shows "GE.mcalc2 \<sigma> c'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. mcalc2 \<sigma> c'
[PROOF STEP]
proof(cases "c' \<in> Fax \<union> Wax")
[PROOF STATE]
proof (state)
goal (2 subgoals):
1. c' \<in> Fax \<union> Wax \<Longrightarrow> mcalc2 \<sigma> c'
... | {"llama_tokens": 1625, "file": "Sort_Encodings_G", "length": 17} |
#ifndef __CTS_HPP__
#define __CTS_HPP__
/****************************************************************
Author: Joel Veness
Date: 2011
Info: A Context Tree Switching (CTS) implementation.
*****************************************************************/
#include "common.hpp"
// bo... | {"hexsha": "19036d68d0e26ee14282be20a0e10ede54c668df", "size": 4283, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/cts.hpp", "max_stars_repo_name": "mgbellemare/SkipCTS", "max_stars_repo_head_hexsha": "ff142fa87bc16b1e2e381cf4f9e4959e754b9028", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 48... |
import pytest
def test_numpy_import():
import numpy
return
def test_scipy_import():
import scipy
return
def test_pandas_import():
import pandas
return
def test_basis_set_exchange_import():
import basis_set_exchange
return
def test_elements_import():
import elements.elemen... | {"hexsha": "6e08a3986a018c853bc934692d60d0b7b08a7162", "size": 733, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_imports.py", "max_stars_repo_name": "jedbrown/autogamess", "max_stars_repo_head_hexsha": "f0721b42c15567b0e57e73831e4ce81350238b77", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
import pandas as pd
from matplotlib import pyplot as plt
from sklearn.neighbors import KNeighborsRegressor
df = pd.read_csv('Case_ALL_EXP_training.csv')
X=df.loc[:,'YbyH':'dummy3']
Y=df.loc[:,'UbyVw']
#train model
knn=KNeighborsRegressor()
knn.fit(X,Y)
import numpy as np
#test model
case_test_data=case_test... | {"hexsha": "74293b97c45c2e650cdec43ec1cd9b87f95701a8", "size": 1149, "ext": "py", "lang": "Python", "max_stars_repo_path": "dev/MLTest/ML_test_v4.py", "max_stars_repo_name": "aakash30jan/Couette-Poiseuille_FlowCode", "max_stars_repo_head_hexsha": "3110d5d818cb8fdfb4959e58d9dcbc48db325122", "max_stars_repo_licenses": ["... |
import matplotlib.pyplot as plt
import math
import numpy as np
print(math.e)
e = math.e
dx = 0.1
x = np.arange(-8, 8, dx)
y_sig = 1 / (1 + e ** -x)
plt.plot(x, y_sig)
plt.show()
| {"hexsha": "4a4482fec5428af2cbb4ff11c7bcc77dcc052944", "size": 182, "ext": "py", "lang": "Python", "max_stars_repo_path": "math_learning/sigmoid_function.py", "max_stars_repo_name": "oinume/machine-learning", "max_stars_repo_head_hexsha": "215da68cd4362a0fcf402d16045f728c2496da2b", "max_stars_repo_licenses": ["MIT"], "... |
import torch
import numpy as np
from rdkit import Chem
from torch import nn
from torch.nn import functional as F
import pandas as pd
import time
def Variable(tensor):
"""Wrapper for torch.autograd.Variable that also accepts
numpy arrays directly and automatically assigns it to
the GPU. Be aware in c... | {"hexsha": "323b5673bf3ef385138a038a45065329050a2133", "size": 9569, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "WJa5on/AttentiveGen", "max_stars_repo_head_hexsha": "b9791561f22c7f8b2752dd7aa933e34fbd451c79", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max... |
import torch
from torch import nn
import numpy as np
from .SelfAttention import SelfAttention
class NN_Attention(nn.Module):
"""
1. We embed the words in the input texts using an embedding layer.
2. We compute the weighted sum of word embeddings.
3. We project with a linear layer the representation
... | {"hexsha": "48952fd689a5bdbe11c27dd05e83827abc9e3f7a", "size": 2351, "ext": "py", "lang": "Python", "max_stars_repo_path": "Lab3/Lab/models/NN_Attention.py", "max_stars_repo_name": "PanosAntoniadis/slp-ntua", "max_stars_repo_head_hexsha": "f144cd82fddbdfab27dd1ed025fb0d4c9a83a15f", "max_stars_repo_licenses": ["MIT"], "... |
"""
A scripy to convert nld and gsfs to a format readable by talys
Author: Fabio Zeiser, Oct 2019
"""
import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import interp1d
from spinfunctions import SpinFunctions
def talys_Egrid():
ex_binning = np.zeros((6, 2)) # format: [Nbins_cum, binwidth]... | {"hexsha": "b9bdde779a16e70555bc4b1f68b7db5afdfbaf6d", "size": 6600, "ext": "py", "lang": "Python", "max_stars_repo_path": "talys_import_nld_gsf/convert_talys.py", "max_stars_repo_name": "Loopdiloop/IntpartSummerSchool2019", "max_stars_repo_head_hexsha": "d3439e782472a7b66c8faaf3df31d0411722b405", "max_stars_repo_licen... |
/*
* Copyright 2017-, Rohan Budhirja, LAAS-CNRS
*
* This file is part of sot-torque-control.
* sot-torque-control is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 3 of
* the License... | {"hexsha": "6bc8732284a691024b19da188407142be6bcbf53", "size": 1960, "ext": "hh", "lang": "C++", "max_stars_repo_path": "include/sot/torque_control/utils/causal-filter.hh", "max_stars_repo_name": "NoelieRamuzat/sot-torque-control", "max_stars_repo_head_hexsha": "a2ac1247b57564ac3f69e027eb22fc1f2f2af62e", "max_stars_rep... |
# Copyright 2014 Alistair Muldal <alistair.muldal@pharm.ox.ac.uk>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Th... | {"hexsha": "0ddb4c52e3e35429636f5313dffdf4d996354030", "size": 5747, "ext": "py", "lang": "Python", "max_stars_repo_path": "participants_codes/konnectomics/spikedetect/tridiag_solvers.py", "max_stars_repo_name": "orlandi/connectomicsPerspectivesPaper", "max_stars_repo_head_hexsha": "98060e613d58c8e1ef9d14eb213439ae4cb8... |
function CPD = set_clamped(CPD, bit)
CPD.clamped = bit;
| {"author": "bayesnet", "repo": "bnt", "sha": "bebba5f437b4e1e29169f0f3669df59fb5392e62", "save_path": "github-repos/MATLAB/bayesnet-bnt", "path": "github-repos/MATLAB/bayesnet-bnt/bnt-bebba5f437b4e1e29169f0f3669df59fb5392e62/BNT/CPDs/@generic_CPD/set_clamped.m"} |
import cv2
import numpy as np
import copy
p1 = np.array([[0, 0], [199, 0], [199, 199], [0, 199]], dtype="float32")
lena_img = cv2.imread('reference_images/Lena.png', 1)
lena_img = cv2.resize(lena_img, (199, 199))
# def warpPerspective(img, homo, dim):
# cv2.transpose(img)
# warped_image = np.zeros((dim[0], dim... | {"hexsha": "28edfefb439b487a500c8419720173e86f8f96bd", "size": 11770, "ext": "py", "lang": "Python", "max_stars_repo_path": "Codes/Q1_new.py", "max_stars_repo_name": "namangupta98/detection_and_tracking", "max_stars_repo_head_hexsha": "b8429e5fcdd58f412627fcc80f4e9ca2b81f78a4", "max_stars_repo_licenses": ["MIT"], "max_... |
import tensorflow as tf
import numpy as np
import argparse
import Nets
import os
import sys
import time
import cv2
import json
import datetime
import shutil
from matplotlib import pyplot as plt
from Data_utils import data_reader,weights_utils,preprocessing
from Losses import loss_factory
from Sampler import sampler_fac... | {"hexsha": "bbeebf6b5af57f50510a46a10f60aec975525289", "size": 12464, "ext": "py", "lang": "Python", "max_stars_repo_path": "Stereo_Online_Adaptation.py", "max_stars_repo_name": "wtyuan96/Real-time-self-adaptive-deep-stereo", "max_stars_repo_head_hexsha": "e630bc610c134d348c8c15e660533b2f464bba5f", "max_stars_repo_lice... |
[STATEMENT]
lemma subpath_smooth:
assumes "\<gamma> C1_differentiable_on {0..1}" "0 \<le> a" "a < b" "b \<le> 1"
shows "(subpath a b \<gamma>) C1_differentiable_on {0..1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. subpath a b \<gamma> C1_differentiable_on {0..1}
[PROOF STEP]
proof-
[PROOF STATE]
proof (stat... | {"llama_tokens": 2162, "file": "Green_Derivs", "length": 23} |
[STATEMENT]
lemma OUTfromVCorrect1_data12: "OUTfromVCorrect1 data12"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. OUTfromVCorrect1 data12
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. OUTfromVCorrect1 data12
[PROOF STEP]
have "data12 \<in> OUT sA22 \<and> stA2 \<in> VAR sA22"
[PROOF STATE]... | {"llama_tokens": 457, "file": "ComponentDependencies_DataDependenciesCaseStudy", "length": 6} |
#pragma once
#include "terminalpp/core.hpp"
#include "terminalpp/detail/ascii.hpp"
#include <boost/optional.hpp>
#include <string>
namespace terminalpp { namespace ansi {
enum class charset : char {
dec,
dec_supplementary,
dec_supplementary_graphics,
dec_technical,
uk,
us_ascii,
dutch,
... | {"hexsha": "ca56fba7edfba8a478b3e579eff8ac710bb34f07", "size": 6287, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/terminalpp/ansi/charset.hpp", "max_stars_repo_name": "ruszkait/terminalpp", "max_stars_repo_head_hexsha": "1a7e367dc33af3c65d41c816ada1d84683ae09d0", "max_stars_repo_licenses": ["MIT"], "max... |
import pickle
import pickle5
from typing import List, Union
import os
import json
import yaml
import re
import ast
import numpy as np
import collections
def convert(obj):
"""Conversion helper instead of JSON encoder for handling booleans."""
if isinstance(obj, bool):
return int(obj)
if isinstance(... | {"hexsha": "923d99ebd2a5be5bbf850f45b63008257a846b06", "size": 7996, "ext": "py", "lang": "Python", "max_stars_repo_path": "mle_hyperopt/utils/helpers.py", "max_stars_repo_name": "RobertTLange/mle-hyperopt", "max_stars_repo_head_hexsha": "692fee1e8e3d761962307c0894b308a00fa41d9c", "max_stars_repo_licenses": ["MIT"], "m... |
//==============================================================================
// Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... | {"hexsha": "54b835561aa94ebc3da3b1c989db28e7dd4e090e", "size": 1447, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "modules/core/container/table/include/nt2/predicates/functions/table/ismatrix.hpp", "max_stars_repo_name": "psiha/nt2", "max_stars_repo_head_hexsha": "5e829807f6b57b339ca1be918a6b60a2507c54d0", "max_... |
From iris.proofmode Require Export tactics.
From iris.program_logic Require Export weakestpre total_weakestpre.
From iris.heap_lang Require Export lang.
From iris.heap_lang Require Import proofmode notation.
From iris.prelude Require Import options.
Inductive tree :=
| leaf : Z → tree
| node : tree → tree → tree.
... | {"author": "amintimany", "repo": "iris", "sha": "03eaffa3b28bffc561b93f30a3ba40bab8ae1fd1", "save_path": "github-repos/coq/amintimany-iris", "path": "github-repos/coq/amintimany-iris/iris-03eaffa3b28bffc561b93f30a3ba40bab8ae1fd1/tests/tree_sum.v"} |
#
# author: Jungtaek Kim (jtkim@postech.ac.kr)
# last updated: May 1, 2021
#
import numpy as np
EPSILON = 1e-4
class Function(object):
def __init__(self, dimensionality, bounds, global_minimizers, global_minimum, function, dim_problem=None, seed=None):
assert isinstance(dimensionality, int) or dimension... | {"hexsha": "77aeef3f0dbe556598e778109834c91824ce550b", "size": 6741, "ext": "py", "lang": "Python", "max_stars_repo_path": "bayeso_benchmarks/benchmark_base.py", "max_stars_repo_name": "jungtaekkim/bayeso-benchmarks", "max_stars_repo_head_hexsha": "3650aaeeaa123da14f0f839da664b071ee17bf9a", "max_stars_repo_licenses": [... |
[STATEMENT]
lemma return_cancel2_idem [simp] :
"( return\<^bsub>X\<^esub>(E) ;- X :==\<^sub>L E' ;- M) = ( return\<^sub>C X E ;- M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (return\<^bsub>X\<^esub> E ;- X :==\<^sub>L E' ;- M) = (return\<^bsub>X\<^esub> E ;- M)
[PROOF STEP]
apply(rule ext, rename_tac "\<sigm... | {"llama_tokens": 1428, "file": "Clean_src_Clean_Symbex", "length": 5} |
"""
Represents the Kuka arm in the PyBullet simulator
"""
import math
import os
import numpy as np
import pybullet as p
import pybullet_data
class Kuka:
"""
Represents the Kuka arm in the PyBullet simulator
:param urdf_root_path: (str) Path to pybullet urdf files
:param timestep: (float)
:param u... | {"hexsha": "5765302c4a9bc16560d5d88615b7a3275b523474", "size": 8962, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym_envs/kuka_gym/kuka.py", "max_stars_repo_name": "PierreExeter/custom_gym_envs", "max_stars_repo_head_hexsha": "2b6a1c16a4198c8d9fa64f10fe09a041826ac81a", "max_stars_repo_licenses": ["MIT"], "ma... |
"""
Create initial condition for DA experiment
Save:
x_a_init.txt
"""
import numpy as np
from scipy.integrate import ode
import lorenz96
from settings import *
# settings of spin-up
sigma_x0 = 0.2 # size of initial perturpation
Tspinup = 100. # initial spin-up time
# spin-up from a random initail value
x_a_0 = si... | {"hexsha": "c8ac381497f401420aaef21066b1bc54bddbee6b", "size": 638, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/init.py", "max_stars_repo_name": "Typas/Data-Assimilation-Project", "max_stars_repo_head_hexsha": "4b880c7faadf778d891ffab77ebfbde1db5c5baf", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.36
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency.... | {"hexsha": "be2bfb86925c9e0e8c5d6ce8f63fe00a5e074c4b", "size": 559751, "ext": "c", "lang": "C", "max_stars_repo_path": "production/pygsl-0.9.5/swig_src/block_wrap.c", "max_stars_repo_name": "juhnowski/FishingRod", "max_stars_repo_head_hexsha": "457e7afb5cab424296dff95e1acf10ebf70d32a9", "max_stars_repo_licenses": ["MIT... |
[STATEMENT]
lemma derives_trans: "derives a b \<Longrightarrow> derives b c \<Longrightarrow> derives a c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>derives a b; derives b c\<rbrakk> \<Longrightarrow> derives a c
[PROOF STEP]
by (auto simp add: derives_def derivations_def) | {"llama_tokens": 105, "file": "LocalLexing_Derivations", "length": 1} |
import Person
import turtle
import json
import numpy as np
import matplotlib.pyplot as plt
with open('config.json') as f:
config = json.load(f)
susceptible_idx = 0
infected_idx = 1
recovered_idx = 2
wn = turtle.Screen()
wn.bgcolor("white")
wn.title("Virus Simulator")
wn.tracer(0) # update screen only when needed
... | {"hexsha": "e600d0807a26c4ff60154188d615e486f161544e", "size": 3278, "ext": "py", "lang": "Python", "max_stars_repo_path": "Simulitis.py", "max_stars_repo_name": "pimajor/py-simulitis", "max_stars_repo_head_hexsha": "6e0f2d419c28c47dcb5f9b6ee90c6b466e47204a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "m... |
[STATEMENT]
lemma product_qbs_canonical2:
assumes "\<And>i. i \<in> I \<Longrightarrow> f i \<in> Y \<rightarrow>\<^sub>Q X i"
"\<And>i. i \<notin> I \<Longrightarrow> f i = (\<lambda>y. undefined)"
"g \<in> Y \<rightarrow>\<^sub>Q (\<Pi>\<^sub>Q i\<in>I. X i)"
"\<And>i. i \<in> I \<Long... | {"llama_tokens": 1514, "file": "Quasi_Borel_Spaces_Product_QuasiBorel", "length": 21} |
### reassignment with linear-scale frequency scan ###
# author: Jiayi (Maggie) Zhang <jiayizha@andrew.cmu.edu>
# based on
# 1) the original Matlab implementation (see reassignmentgw.m),
# 2) a previous python implementation by radekosmulski
# github repo: https://github.com/earthspecies/spectral_hyperresolution
# ... | {"hexsha": "6e60362c2eeda9f357b299dad82a718003cf7b4b", "size": 3826, "ext": "py", "lang": "Python", "max_stars_repo_path": "reassignment/reassignment_linear.py", "max_stars_repo_name": "maggie-jiayizhang/hyper_resolution_spectrogram", "max_stars_repo_head_hexsha": "6205281b70cf1993f9a35399e44c3e3477f02538", "max_stars_... |
import argparse, os, json
import numpy as np
import matplotlib.pyplot as plt
import cv2
parser = argparse.ArgumentParser()
parser.add_argument('log', help='log file dumped by pyxivo to process')
parser.add_argument('out_dir', help='output directory to save undistorted images')
parser.add_argument('-debug', action='st... | {"hexsha": "6a3e60c55d38b047f32ff4dc41ae418637e1c143", "size": 1948, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/undistort.py", "max_stars_repo_name": "xloem/xivo", "max_stars_repo_head_hexsha": "a7dd2553aed28adeee6b6f4c69feb9ba760f12f2", "max_stars_repo_licenses": ["BSD-4-Clause-UC"], "max_stars_cou... |
import numpy as np
import math
import rules
import copy
import gym
import os
import tensorflow as tf
from geometric_primitives import brick
from geometric_primitives import bricks
from geometric_primitives import utils_meshes
import matplotlib.pyplot as plt
#from mpl_toolkits.mplot3d import Axes3D
from rules.rules_m... | {"hexsha": "63ce3171152a0c0e19a0755212c85c5fe05c9f0f", "size": 19791, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/gym_lego/envs/lego_env_mnist_no_mask.py", "max_stars_repo_name": "POSTECH-CVLab/Brick-by-Brick", "max_stars_repo_head_hexsha": "b000f98f04c17d6f59bb4f0144b997583c479e2a", "max_stars_repo_lice... |
From mathcomp Require Import all_ssreflect all_algebra.
From mathcomp Require Import bigenough cauchyreals.
Require Import extra_mathcomp extra_cauchyreals.
Require Import tactics shift bigopz arithmetics seq_defs.
Require Import c_props s_props z3seq_props a_props b_props b_over_a_props.
Require hanson.
Set Implicit ... | {"author": "coq-community", "repo": "apery", "sha": "305046d98025d75ca426cc44283302963389f1dc", "save_path": "github-repos/coq/coq-community-apery", "path": "github-repos/coq/coq-community-apery/apery-305046d98025d75ca426cc44283302963389f1dc/theories/z3irrational.v"} |
!> Interface handling both fluid and solid equation of state
!!
!! \author MH, 2016-06.
module vls
use thermopack_constants
use thermopack_var, only: nc, nph
use solideos
use eos
!
implicit none
save
!
!> Thermo state, used for debugging
type state
integer :: nd
real :: t,p
real, allocat... | {"hexsha": "34d8677adbac96d3ac24f12b64ad6538ad0ab24f", "size": 26149, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/vls.f90", "max_stars_repo_name": "SINTEF/Thermopack", "max_stars_repo_head_hexsha": "63c0dc82fe6f88dd5612c53a35f7fbf405b4f3f6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 28, "m... |
import torch
import torch.nn as nn
import torch.nn.init as init
import torch.nn.functional as F
import numpy as np
from time import time
def timeit(tag, t):
print("{}: {}s".format(tag, time() - t))
return time()
def square_distance(src, dst):
"""
Input:
src: source points, [B, N,... | {"hexsha": "f5be35f1fccd114a5d05e458e053efdc8eaf3c43", "size": 10189, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/pointnet2.py", "max_stars_repo_name": "ada-shen/Interpret_quality", "max_stars_repo_head_hexsha": "e58d8e24a44005bde1eadbf8ef34c715d02a19cf", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import numpy as np
import pytest
import unittest
from nlpstats.correlations import fisher
class TestFisher(unittest.TestCase):
def test_fisher_regression(self):
np.random.seed(12)
X = np.random.rand(5, 7)
Y = np.random.rand(5, 7)
result = fisher(X, Y, "global", "pearson")
... | {"hexsha": "c9c6bb5a4aae132aa08fb478c07610751eda9011", "size": 2854, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/correlations/fisher_test.py", "max_stars_repo_name": "danieldeutsch/nlpstats", "max_stars_repo_head_hexsha": "55e6281065e10faad6dda4ee251f1e7e4c98953c", "max_stars_repo_licenses": ["Apache-2... |
% ----------------------------------------------------------------------------
% User Manual
% ----------------------------------------------------------------------------
\documentclass[thesis.tex]{subfiles}
\begin{document}
\chapter[\vspace{-2\baselineskip}]{QUThesis User Manual}
\begin{quote}[Lewis Carroll, Alice i... | {"hexsha": "f51d89b211c1102302e9caba8cb6ba18b44e1956", "size": 5414, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "manual.tex", "max_stars_repo_name": "hbristow/quthesis", "max_stars_repo_head_hexsha": "a723a7e2e47cad93202a3358189a73c9ae342044", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 17,... |
#include <boost/range/adaptor/type_erased.hpp>
| {"hexsha": "f9505d512848b86c8d2d32d5e3d65d0f3b9f9956", "size": 47, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_range_adaptor_type_erased.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL... |
# Trajectory utilities
# struct Vectorized{T}
# trajectories::T
# end
# (vectorized::Vectorized)(x, args...) = map(traj -> traj(x, args...), vectorized.trajectories)
# map_elements(f, vectorized::Vectorized) = Vectorized(map(f, vectorized.trajectories))
function map_subfunctions(f, traj::Piecewise)
Piecewise(... | {"hexsha": "1cf0ce06a4f80b6a6adc053a2486af3c2a6830ef", "size": 4053, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/util.jl", "max_stars_repo_name": "tkoolen/CentroidalTrajOpt.jl", "max_stars_repo_head_hexsha": "79db94ca8945558b364f498ae6c03afd76ffdafd", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
from sendgrid_client import EmailPreferences, SendGrid
from coding import *
from utils import printer
from experimenter import update_account_data
import datetime
import numpy as np
import donotsend
def send_announcement_emails(emails, ageRangeDays, logfilename, expId, studyName, studyMessage, maxToSend):
accounts... | {"hexsha": "103c2f64c86481fe201f8530bc0943e260df1904", "size": 3464, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/announcements.py", "max_stars_repo_name": "kimberscott/lookit-data-processing", "max_stars_repo_head_hexsha": "c975d14bc94fd148212b22aa2fc7e4d1d38ebb35", "max_stars_repo_licenses": ["MIT"]... |
//======================================================================
/*! \file MetaInformationList7110.hpp
*
* \copydoc Copyright
* \author Jan Christian Dittmer (jcd)
* \date Apr 5, 2016
*///-------------------------------------------------------------------
#ifndef METAINFORMATIONLIST7110_HPP_SEEN
#define M... | {"hexsha": "31ce7d6289168813cebd9bb1029c3777516c5510", "size": 3392, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/ibeo_8l_sdk/src/ibeosdk/datablocks/MetaInformationList7110.hpp", "max_stars_repo_name": "tomcamp0228/ibeo_ros2", "max_stars_repo_head_hexsha": "ff56c88d6e82440ae3ce4de08f2745707c354604", "max_st... |
import gym
import unittest
import numpy as np
from connect_four.game import Square
from connect_four.problem import Group
from connect_four.evaluation.board.board import Board
from connect_four.envs.connect_four_env import ConnectFourEnv
class TestBoard(unittest.TestCase):
def setUp(self) -> None:
self.... | {"hexsha": "2b7d78342244343abe09d83519784062b6ea84e4", "size": 7069, "ext": "py", "lang": "Python", "max_stars_repo_path": "connect_four/evaluation/board/board_test.py", "max_stars_repo_name": "rpachauri/connect4", "max_stars_repo_head_hexsha": "6caf6965afaaff6883193ac295c6ac5b1f4e9c4a", "max_stars_repo_licenses": ["MI... |
#include <algorithm>
#include <iostream>
#include <vector>
#include <benchmark/benchmark.h>
#include <boost/gil.hpp>
#include <boost/gil/extension/numeric/pixel_numeric_operations.hpp>
using namespace boost::gil;
static void std_algo(benchmark::State &state) {
std::vector<uint16_t> img(1024 * 1024, 0);
for (au... | {"hexsha": "1ec155df439b04ab1cd2454d17ec4a703fe60e7d", "size": 7933, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "benchmark/google/pixel_channel_arithmetics.cpp", "max_stars_repo_name": "sdebionne/gil-reformated", "max_stars_repo_head_hexsha": "7065d600d7f84d9ef2ed4df9862c596ff7e8a8c2", "max_stars_repo_licenses... |
from bokeh.plotting import figure, output_file, show
import xml.etree.ElementTree as ET
import numpy as np
import pandas
from _datetime import datetime
from dateutil.parser import parse
def load_data(filename='datalog.xml'):
# Parse the XML
xmltree = ET.parse(filename)
# Output data
data = {'currentda... | {"hexsha": "55bc5fcf7c6fd15f790c1f83e9edc05853b8e7fa", "size": 1389, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_data.py", "max_stars_repo_name": "CrossroadsOpenSource/sensehat-tetris", "max_stars_repo_head_hexsha": "4bd86cd5815cc99408869f4dcdf650e45af69871", "max_stars_repo_licenses": ["MIT"], "max_sta... |
# In this file, you'll fill in some blanks, and the associated `@test` lines thereafter will check whether
# you've done it correctly. We'll cover testing systematically later in the course.
# For now, know that:
# - `@test` checks whether the following expression is `true`
# - `@testset` wraps a collection of test... | {"hexsha": "88d0abdcef68aae838437ebf053a24b3808f52fc", "size": 4822, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "homeworks/learning_julia1_exercises.jl", "max_stars_repo_name": "adityanprasad/AdvancedScientificComputing", "max_stars_repo_head_hexsha": "9311fae44fec1843188dde4a27d64ba21e15b1cc", "max_stars_rep... |
from __future__ import annotations
import copy
import networkx as nx
from helper_functions import graph_helper_functions as gh
class Block:
def __init__(self, nodes: list[str], levels: list[int], predecessors: list[str], successors: list[str], id=-1):
self.id = id
self.nodes = nodes
sel... | {"hexsha": "0034c977e996a91673fd02f69995e59bb4e743c4", "size": 9124, "ext": "py", "lang": "Python", "max_stars_repo_path": "digraph.py", "max_stars_repo_name": "weberja/praktikum_graphen", "max_stars_repo_head_hexsha": "da3ecefdf1327078697e3787cfe19414a9ac13c4", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou... |
"""
function fedinitions to pars the parameters into the C++ class
"""
import numpy as np
from pathlib import Path
from typing import Union
from pySimPulseqSBB import SimulationParameters, WaterPool, MTPool, CESTPool
from pySimPulseqSBB import Lorentzian, SuperLorentzian, NoLineshape
from bmctool.params import Params
f... | {"hexsha": "87f87dacfa27d9c15032ea8f231c999c8ff40ddd", "size": 4519, "ext": "py", "lang": "Python", "max_stars_repo_path": "pypulseq_cest/parser.py", "max_stars_repo_name": "KerstinHut/pypulseq-cest", "max_stars_repo_head_hexsha": "a81fba9b66de0bb4b32f3df26c2c1d15967948ca", "max_stars_repo_licenses": ["MIT"], "max_star... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.