text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# This is a Python framework to compliment "Peek-a-Boo, I Still See You: Why Efficient Traffic Analysis Countermeasures Fail". # Copyright (C) 2012 Kevin P. Dyer (kpdyer.com) # See LICENSE for more details. import wekaAPI import arffWriter from statlib import stats from Trace import Trace from Packet import Packet ...
{"hexsha": "d7e4d0ce72d06b9ec8a4500e1fd5730705c90291", "size": 17651, "ext": "py", "lang": "Python", "max_stars_repo_path": "ml/code/svm/classifiers/AdversarialClassifierOnPanchenko.py", "max_stars_repo_name": "cyberdeception/deepdig", "max_stars_repo_head_hexsha": "482061bc5039181a95631fcb8515d990eb2e16a9", "max_stars...
** Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. ** See https://llvm.org/LICENSE.txt for license information. ** SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *--- Induction linear combinations * program p parameter (N=4) integer i, j, result(N, N), expect(N, N) commo...
{"hexsha": "3c4ce39f7feb55847f28dc3578213aa5a187d19a", "size": 1304, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "test/f90_correct/src/ka45.f", "max_stars_repo_name": "abrahamtovarmob/flang", "max_stars_repo_head_hexsha": "bcd84b29df046b6d6574f0bfa34ea5059092615a", "max_stars_repo_licenses": ["Apache-2.0"], "...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jan 17 08:42:26 2020 @author: spragunr """ import numpy as np import matplotlib.pyplot as plt plt.xticks(np.linspace(0, 1, 11)) plt.yticks(np.linspace(0, 1, 11)) plt.grid()
{"hexsha": "e0c7d38b02bdb16fe32829c4c67ded34d7a123df", "size": 241, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/plot_grid.py", "max_stars_repo_name": "spragunr/jmu_ml_dimensionality_lab", "max_stars_repo_head_hexsha": "c6fe5adba8520f2a81f00556dcbf3574c1437016", "max_stars_repo_licenses": ["MIT"], "max_s...
#!/usr/bin/env python import numpy as np import matplotlib import matplotlib.pyplot as plt # Embed font type in PDF matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['ps.fonttype'] = 42 #data = np.array([[ self.q , self.dq , self.q_d , self.f , self.k , t, self.w1 , self.w2 , self.i1 , self.i2 , self.br...
{"hexsha": "0dc164f768bb724a97df7eb66ee7d3efa5125642", "size": 4923, "ext": "py", "lang": "Python", "max_stars_repo_path": "old/projects/ICRA2017/exp_fig.py", "max_stars_repo_name": "ali493/pyro", "max_stars_repo_head_hexsha": "1245340077a733e2ab35765eae783b358d2f3af9", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
""" CDNSim file: userRequests.py NEC Europe Ltd. PROPRIETARY INFORMATION This software is supplied under the terms of a license agreement or nondisclosure agreement with NEC Europe Ltd. and may not be copied or disclosed except in accordance with the terms of that agreement. The software and its source code ...
{"hexsha": "e3176c64821626bdfd2da253f891ac9207c99d08", "size": 20132, "ext": "py", "lang": "Python", "max_stars_repo_path": "userRequests.py", "max_stars_repo_name": "mvcf10/cdnsim", "max_stars_repo_head_hexsha": "7ccab5deea416b379ffd86136a1ff2aff4c97e17", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count":...
__precompile__() module SimpleDiffEq using Reexport, MuladdMacro @reexport using DiffEqBase using StaticArrays using RecursiveArrayTools @inline _copy(a::SArray) = a @inline _copy(a) = copy(a) include("functionmap.jl") include("euler_maruyama.jl") include("rk4/rk4.jl") include("rk4/gpurk4.jl") include("rk4/looprk4....
{"hexsha": "6299574b0d31b30bfe21af5355c8f14544ff371b", "size": 455, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/SimpleDiffEq.jl", "max_stars_repo_name": "ChrisRackauckas/SimpleDiffEq.jl", "max_stars_repo_head_hexsha": "6d9f8ef998be521acd036b59bc4e690481f362c3", "max_stars_repo_licenses": ["MIT"], "max_sta...
#! /usr/bin/env python # -*- coding:utf-8 -*- """ @author: Vesper Huang """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf def test_tile(): """ tf.tile: 张量自己多份拼接 :return: """ tensor = tf.const...
{"hexsha": "86d6696476b199550e890995c115bcce48037197", "size": 1222, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/test/api_test.py", "max_stars_repo_name": "yellowzp/algorithm_model_learning", "max_stars_repo_head_hexsha": "4c8c2e29f4724fe565e73bb243709d7c302178c9", "max_stars_repo_licenses": ["MIT...
import os import random import numpy as np import torch from src.data_loader.load import DataLoader from src.data_loader.load import CryptoDataset from src.models.custom import custom import src.models.oracle.oracle as oracle from matplotlib import pyplot as plt import pandas as pd from tabulate import tabulate # def...
{"hexsha": "04293675eac7c257b8bcd59d59a32fdfc2a171ea", "size": 3859, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "TorNATO-PRO/crypto-forecasting", "max_stars_repo_head_hexsha": "ac2f6a942dfae40798d1eab4a268ad62a12f9304", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# Test multivariate optimization let rosenbrock = Optim.UnconstrainedProblems.examples["Rosenbrock"] f = rosenbrock.f g! = rosenbrock.g! h! = rosenbrock.h! initial_x = rosenbrock.initial_x d1 = DifferentiableFunction(f) d2 = DifferentiableFunction(f, g!) d3 = TwiceDifferentiableFunction...
{"hexsha": "a7474254213eabd75ebd03e3102d9092eae71f2b", "size": 7003, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/api.jl", "max_stars_repo_name": "jngod2011/Optim.jl", "max_stars_repo_head_hexsha": "addda9ae36044d691b83a12c421b57675b234eeb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
import numpy from tkinter import * import matplotlib matplotlib.use("TkAgg") from matplotlib.backends.backend_tkagg import (FigureCanvasTkAgg, NavigationToolbar2Tk) import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable class activitymap: def __init__(self, parent, parentw, parent...
{"hexsha": "e1766a093aace509995b7898f0bdd5561baafaf8", "size": 5164, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/activitymap.py", "max_stars_repo_name": "StefanATschanz/Cilialyzer", "max_stars_repo_head_hexsha": "00be10c58da1b750a4d3e5943b3fb670d61392a8", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
From Nominal Require Export Group Swap Permutation. (* Permutation Type *) Class PermAction X := action: Perm → X → X. #[export] Hint Mode PermAction ! : typeclass_instances. (* CAUSA PROBLEMAS COM REESCRITA ENVOLVENDO action (- p) Instance: Params (@action) 2 := {}. *) Infix "•" := action (at level 60, right asso...
{"author": "fasapa", "repo": "nominal", "sha": "fa998a69041ca44315e7400c91ad59ae9556a63f", "save_path": "github-repos/coq/fasapa-nominal", "path": "github-repos/coq/fasapa-nominal/nominal-fa998a69041ca44315e7400c91ad59ae9556a63f/theories/PermT.v"}
[STATEMENT] lemma All2_term_Iff: "atom i \<sharp> t \<Longrightarrow> atom j \<sharp> (i,t,A) \<Longrightarrow> {} \<turnstile> (All2 i t A) IFF Ex j (Var j EQ t AND All2 i (Var j) A)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>atom i \<sharp> t; atom j \<sharp> (i, t, A)\<rbrakk> \<Lo...
{"llama_tokens": 642, "file": "Goedel_HFSet_Semanticless_Sigma", "length": 5}
import jax.numpy as np from typing import Any, Tuple, Callable, Union __all__ = ["Bijection", "PRNGKeyT", "Shape", "Dtype", "Array", "InitFn", "ConstOrInitFn", "FloatOrInitFn", "AnyOrInitFn"] PRNGKeyT = Any Shape = Tuple[int] Dtype = Any Array = np.ndarray InitFn = Callable[..., Any] ConstOrInitFn = Union[float, I...
{"hexsha": "e3b3b422baeffb28ca64189b0c4b484609ff3625", "size": 554, "ext": "py", "lang": "Python", "max_stars_repo_path": "jaxrk/core/typing.py", "max_stars_repo_name": "ingmarschuster/JaxRK", "max_stars_repo_head_hexsha": "1de11e1fe79c1cf14a111b441d9c7b60c3725bf9", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import warnings import numpy as np from collections import defaultdict from sklearn.svm import LinearSVC from sklearn.metrics import f1_score from sklearn.model_selection import StratifiedKFold from sklearn.exceptions import UndefinedMetricWarning, ConvergenceWarning from utils import SingleLabelBinarySeachCV, MultiLab...
{"hexsha": "2064f4d35e9f3824384621317f88ab553d698902", "size": 8602, "ext": "py", "lang": "Python", "max_stars_repo_path": "UnsupervisedNodeClassification/Evaluate/node_classification.py", "max_stars_repo_name": "HKUST-KnowComp/DualMessagePassing", "max_stars_repo_head_hexsha": "d29d627be2a8c8f24b52e3db2c383e33a059aaa7...
from pyspark import SparkConf, SparkContext from pyspark.mllib.regression import LabeledPoint from pyspark.mllib.tree import DecisionTree, DecisionTree from numpy import array from time import time conf = SparkConf().setAll([('spark.executor.memory', '16g'),('spark.driver.memory','16g')]) sc = SparkContext("local", "l...
{"hexsha": "679d049319e2a173e50e2db1a7a0d5862d1d3b61", "size": 3774, "ext": "py", "lang": "Python", "max_stars_repo_path": "exercise/09_mllib-trees.py", "max_stars_repo_name": "funix-ndh/BGD301x_01_VN", "max_stars_repo_head_hexsha": "e92ca957e9f225ae37c542a7b5411d29eff1cc78", "max_stars_repo_licenses": ["MIT"], "max_st...
struct Metadata cell_dofs::Matrix{Int} dof_cells::Vector{Tuple{Int,Int}} dof_cells_offset::Vector{Int} node_cells::Vector{Tuple{Int,Int}} node_cells_offset::Vector{Int} node_dofs::Matrix{Int} end function Metadata(dh::DofHandler{dim}) where dim cell_dofs = get_cell_dofs_matrix(dh) dof_c...
{"hexsha": "098fd63edf9976f6f18961bf07b70e6c3ecb25de", "size": 3577, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/metadata.jl", "max_stars_repo_name": "mohamed82008/LinearElasticity.jl", "max_stars_repo_head_hexsha": "82ac6933dca060b50e512e522cde55d87fcefd97", "max_stars_repo_licenses": ["MIT"], "max_stars...
[STATEMENT] lemma once_field_differentiable_at: "f twice_field_differentiable_at x \<Longrightarrow> f field_differentiable (at x)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. f twice_field_differentiable_at x \<Longrightarrow> f field_differentiable at x [PROOF STEP] by (metis at_within_interior field_differen...
{"llama_tokens": 142, "file": "Hyperdual_TwiceFieldDifferentiable", "length": 1}
[STATEMENT] lemma fresh_vquot_dbtm [simp]: "i \<sharp> vquot_dbtm V tm \<longleftrightarrow> i \<sharp> tm \<or> i \<notin> atom ` V" [PROOF STATE] proof (prove) goal (1 subgoal): 1. i \<sharp> vquot_dbtm V tm = (i \<sharp> tm \<or> i \<notin> atom ` V) [PROOF STEP] by (induct tm rule: dbtm.induct) (auto simp: fresh_a...
{"llama_tokens": 139, "file": "Incompleteness_Coding", "length": 1}
""" Name : c10_10_target_beta_portfolio_hedging.py Book : Python for Finance (2nd ed.) Publisher: Packt Publishing Ltd. Author : Yuxing Yan Date : 6/6/2017 email : yany@canisius.edu paulyxy@hotmail.com """ import scipy as ps # input area todaySP500index=2297.42 valuePortfolio=...
{"hexsha": "4c1d0f97b79d2f215456429f612517281cbad535", "size": 545, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter10/c10_10_target_beta_portfolio_hedging.py", "max_stars_repo_name": "John-ye666/Python-for-Finance-Second-Edition", "max_stars_repo_head_hexsha": "dabef09bcdd7b0ec2934774741bd0a7e1950de73", ...
[STATEMENT] lemma numeral_eq_zero_mod_ring_iff [simp]: "numeral a = (0 :: 'a :: nontriv mod_ring) \<longleftrightarrow> (numeral a mod CARD('a)) = 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (numeral a = 0) = (numeral a mod CARD('a) = 0) [PROOF STEP] using of_nat_mod_ring_eq_iff[of "numeral a" 0, where ?'a =...
{"llama_tokens": 261, "file": "CRYSTALS-Kyber_Mod_Ring_Numeral", "length": 2}
module Main import Depling import Depling.TypeCheck import Depling.PrettyPrint import Depling.Incr import Depling.Elevate import Data.Vect import Data.Fin import Utils lℕℂ : DCon 0 lℕℂ = DConV "ℕ" [] 𝕋 lℕ : DAST n lℕ = ℂ lℕℂ [] lzℂ : DCon 0 lzℂ = DConV "z" [] lℕ lz : DAST n lz = ℂ lzℂ [] lsℂ : DCon 1 lsℂ = DConV...
{"hexsha": "8f850ca36436f127163291771e2d2bcb31386873", "size": 2944, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "Depling/Test.idr", "max_stars_repo_name": "CoderPuppy/idris-depling", "max_stars_repo_head_hexsha": "5f851559c3ddef33d0204a1b34d698b48f1560ca", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import numpy as np import dill as pickle from hic3defdr.util.matrices import select_matrix class CoreHiC3DeFDR(object): """ Mixin class providing core saving and loading functionality for HiC3DeFDR. """ @property def picklefile(self): return '%s/pickle' % self.outdir @classmethod ...
{"hexsha": "043149b7cc9aa8e696350f3e1fb7a1f8cb12ff59", "size": 10920, "ext": "py", "lang": "Python", "max_stars_repo_path": "hic3defdr/analysis/core.py", "max_stars_repo_name": "thomasgilgenast/hic3defdr", "max_stars_repo_head_hexsha": "7498ac468ccc21fa530d584944c1b12c73926755", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np from unittest import TestCase from mvc.models.metrics.queue_metric import QueueMetric class QueueMetricTest(TestCase): def test(self): values = np.random.random(10) metric = QueueMetric() for i in range(10): metric.add(values[i]) assert np.allclo...
{"hexsha": "3ea08e69749217ea0a4761e3c008af9ef8e8794f", "size": 653, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/models/metrics/test_queue_metric.py", "max_stars_repo_name": "takuseno/mvc-drl", "max_stars_repo_head_hexsha": "2d9dede864d4018ec91a7d69c7435f885e5fc7d5", "max_stars_repo_licenses": ["MIT"], ...
% Copyright 2018 Google LLC % % Use of this source code is governed by an MIT-style % license that can be found in the LICENSE file or at % https://opensource.org/licenses/MIT. %!TeX spellcheck = en-US \documentclass[eprint.tex]{subfiles} \begin{document} \section{\texorpdfstring{$\epsilon$-$\Delta$U}{𝜖-∆U} function...
{"hexsha": "c2d6217958286baa478423dcdb0d1353e5d40cef", "size": 8628, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "specification/hashing.tex", "max_stars_repo_name": "enowy/adiantum", "max_stars_repo_head_hexsha": "6a2a4f1c9ff5775d6b1924189482ce9a29e7ca15", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
{"hexsha": "a0d0674022442b564e91ae539100db88bdd7fe30", "size": 5654, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "be/src/plugin/plugin_loader.cpp", "max_stars_repo_name": "Jennifer88huang/incubator-doris", "max_stars_repo_head_hexsha": "5bd9fdb8c100ee00bab671e5f3208506e63f3ed0", "max_stars_repo_licenses": ["Apa...
export IntensityMap, fov, imagepixels, pixelsizes, stokes """ $(TYPEDEF) Image array type. This is an Matrix with a number of internal fields to describe the field of view, pixel size, and the `pulse` function that makes the image a continuous quantity. To use it you just specify the array and the field of view/p...
{"hexsha": "4568ff62959dc9f83494f76e10044b4736070f1d", "size": 6166, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/images/intensitymap.jl", "max_stars_repo_name": "ptiede/ROSEBase.jl", "max_stars_repo_head_hexsha": "c0abdc8c912c87b43d504cae95a3523850bc2566", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
\chapter{Introduction} \lipsum[2-4] \section{Motivation and Objectives} \lipsum[1-2] \section{Contributions from this Research} \lipsum[1] \subsection{Part I} \lipsum[66] \paragraph{Contribution Title} \Blindtext[1][1] \paragraph{Contribution Title} \Blindtext[1][1] \paragraph{Contribution Title...
{"hexsha": "66e1a838149b96ef45e9d4b330f2c99676c54ab9", "size": 967, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "thesisInParts/3_introduction/intro.tex", "max_stars_repo_name": "c-i-p-h-e-r/PhinisheD", "max_stars_repo_head_hexsha": "5a280aacef92ab7c939e7980145c9bc202b77d9c", "max_stars_repo_licenses": ["MIT"], ...
#= Inference.jl A Julia module code to perform ABC SMC with CDF/correlation matching. Author: Alexander P. Browning ====================== School of Mathematical Sciences Queensland University of Technology ====================== ...
{"hexsha": "2c602d49053f36fec8e74317fe64125837cce152", "size": 1103, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Module/Inference/Inference.jl", "max_stars_repo_name": "ap-browning/internalisation", "max_stars_repo_head_hexsha": "caefb4066d9065eb3abc4c4378883a5e64cc9ee4", "max_stars_repo_licenses": ["MIT"], "...
from __future__ import division import numpy as np from pynfft.nfft import NFFT def complex_exponential_sum(t, y, f0, Nf, df, method='auto'): """Compute a trigonometric sum over frequencies f = f0 + df * range(Nf) The computed sum is S_m = sum_k [y_k * exp(2 * i * f_m * t_k)] Parameters ---------- ...
{"hexsha": "7630cb64ae24e53db1915e6f4a48f87ef29b53a0", "size": 3289, "ext": "py", "lang": "Python", "max_stars_repo_path": "lombscargle/utils.py", "max_stars_repo_name": "jakevdp/nfftls", "max_stars_repo_head_hexsha": "01aebd51189a6ed96e44c58cd55b74b8691cbe77", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
import random from typing import * # pylint: disable=W0401,W0614 import numpy as np import torch def set_seed(seed: int) -> None: random.seed(seed) np.random.seed(seed) torch.manual_seed(seed) if torch.cuda.is_available(): torch.cuda.manual_seed_all(seed)
{"hexsha": "f94be22b59edf0513a67d023efd447d124146e92", "size": 284, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils/random.py", "max_stars_repo_name": "simonepri/varname-transformers", "max_stars_repo_head_hexsha": "4c406ab5ae815dc065662af574cd2d1a521b974f", "max_stars_repo_licenses": ["MIT"], "max_sta...
import numpy as np import cv2 def bilinear_interpolation(img,out): #out为希望输出大小 src_h, src_w, channel = img.shape #获取三通道 dst_h, dst_w = out[1], out[0] if src_h == dst_h and src_w == dst_w: return img.copy() dst_img = np.zeros((dst_h,dst_w,3),dtype=np.uint8) scale_x, scale_y = float(src_w) ...
{"hexsha": "b3e94a744705210d56e96cc626cf5c7b80245783", "size": 1755, "ext": "py", "lang": "Python", "max_stars_repo_path": "floris/utils/miscellaneous/turbine_image_upsample.py", "max_stars_repo_name": "forestriveral/floris", "max_stars_repo_head_hexsha": "02c31e121283ad6ccae987cfa3aa1bf1e4b43014", "max_stars_repo_lice...
''' Run the graph embedding methods on Karate graph and evaluate them on graph reconstruction and visualization. Please copy the gem/data/karate.edgelist to the working directory ''' import matplotlib.pyplot as plt from time import time from gem.utils import graph_util, plot_util from gem.evaluation import visualize...
{"hexsha": "6372c851f000a2f462e3b75cd28ab4a885253034", "size": 3616, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/run_homographs.py", "max_stars_repo_name": "vinnamkim/GEM", "max_stars_repo_head_hexsha": "cac74b711ef1547e5bc68b85fdf7f7437933b325", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
import pyPROPOSAL as pp import pyPROPOSAL.parametrization as parametrization import matplotlibconfig as conf try: import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import matplotlib.ticker as ticker except ImportError: raise ImportError("Matplotlib not installed!") try: ...
{"hexsha": "a1bc1fd924f953c3794b9fcdbafb23c0f4639003", "size": 4429, "ext": "py", "lang": "Python", "max_stars_repo_path": "Plots/dEdx_brems.py", "max_stars_repo_name": "Jean1995/Masterarbeit", "max_stars_repo_head_hexsha": "d7d6c4a2031f715fa788cc8d498f339d2df675ee", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import streamlit as st import torch import torch.nn as nn import torch.nn.functional as F import torchvision from PIL import Image import numpy as np import pandas as pd from model import CNN st.set_option('deprecation.showfileUploaderEncoding', False) st.markdown('# Diagnosing Lung X-Rays 🩺') st.markdown("This mo...
{"hexsha": "dcb1ce040da48f9a49effb03e47fd8a3878ba1d4", "size": 2031, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/webapp.py", "max_stars_repo_name": "wilhelmberghammer/pneumonia_detection", "max_stars_repo_head_hexsha": "fb27101b2d16fb95027aede63dcbd466892946b0", "max_stars_repo_licenses": ["MIT"], "max_s...
#!/usr/bin/env python import numpy as np import krpc import ephem_templates import os base_output_dir="./ephemeris" from collections import defaultdict conn = krpc.connect(address="127.0.0.1",name="ephemeris") ksp_bodies = conn.space_center.bodies ksp_sun = ksp_bodies['Sun'] #get all the planets, both into a...
{"hexsha": "651f5639e8905b7d6c9c808fd0491e3364162ee8", "size": 2783, "ext": "py", "lang": "Python", "max_stars_repo_path": "kerbal/ephemgen.py", "max_stars_repo_name": "kwan3217/kwanspice", "max_stars_repo_head_hexsha": "38303ff516dabf965cdc754c48290187cc237da3", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
# -*- coding: utf-8 -*- import os import matplotlib.pyplot as plt import numpy as np import seaborn as sns import pandas as pd """ This script is for plotting PCx data and PC1/PC2 scattering after PCA and shuffle which is loaded from preprocd_dataset.npz """ if __name__ == '__main__': root=os.getcwd...
{"hexsha": "621c6a4bbc3743530c3f8447527b59c6ee101095", "size": 1814, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/plotPC1PC2.py", "max_stars_repo_name": "s-okugawa/HDNNP-tools", "max_stars_repo_head_hexsha": "54842ec0e95f9daf7bac04d0eefa760c6a92a1f0", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
"""python-rtmixer interface for sound output.""" # Authors: Eric Larson <larsoner@uw.edu> # # License: BSD (3-clause) import atexit import sys import numpy as np from rtmixer import Mixer, RingBuffer import sounddevice from .._utils import logger, get_config _PRIORITY = 100 _DEFAULT_NAME = None # only initialize ...
{"hexsha": "e0f6182f8f694bcf5dcd6be4177b92c551126a12", "size": 6543, "ext": "py", "lang": "Python", "max_stars_repo_path": "expyfun/_sound_controllers/_rtmixer.py", "max_stars_repo_name": "drammock/expyfun", "max_stars_repo_head_hexsha": "b92bf5291318ee4cb1692e7bcb9757a422f48304", "max_stars_repo_licenses": ["BSD-3-Cla...
from numbers import Real from time import sleep, time import numpy as np from picamera import PiCamera from picamera.array import PiRGBArray from maestro import Maestro from servo_motor.abstract import Point, scale from ..events import send_new_camera_image_event from ..manager import ManagerThread class Head(Manag...
{"hexsha": "d7ea384255ccab95bf0de0a02cee6152cef66fce", "size": 2538, "ext": "py", "lang": "Python", "max_stars_repo_path": "old/bwo/io/head.py", "max_stars_repo_name": "SaltyHash/BWO", "max_stars_repo_head_hexsha": "1b57569e6024fa7b7b23dce8ce7e3a408b89b792", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "ma...
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C Changes (to run inder DEC unix f77): C ----------------------------------- C COMMON /bessel/ -> COMMON /besselcb/ C COMMON /therm/ -> COMMON /thermcb/ C COMMON /time/ -> COMMON /ttime/ C ir=1 -> ir=5 C iw=...
{"hexsha": "127884a59640f3e1c69e5c0d79bf815e28542442", "size": 75549, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "fortran/nuccom.f", "max_stars_repo_name": "hickerson/bbn", "max_stars_repo_head_hexsha": "17ef63ad1717553ab2abb50592f8de79228c8523", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max...
import rospy import rospkg import numpy as np import os import sys import tensorflow as tf from collections import defaultdict from utils import label_map_util from utils import visualization_utils as vis_util import time from styx_msgs.msg import TrafficLight SIM_MODEL_PATH = 'light_classification/model_files/frozen...
{"hexsha": "8668b5464403c2e8007eef1f849343b8d8ce4ff3", "size": 3902, "ext": "py", "lang": "Python", "max_stars_repo_path": "ros/src/tl_detector/light_classification/tl_classifier.py", "max_stars_repo_name": "josemarti/CarND-Capstone", "max_stars_repo_head_hexsha": "c634d5047926ef55724b88c3cafc5ae37bfa4fda", "max_stars_...
from moleculekit.molecule import Molecule from moleculekit.projections.metricrmsd import MetricRmsd from moleculekit.projections.metricdistance import MetricSelfDistance from moleculekit.tools.sequencestructuralalignment import sequenceStructureAlignment import numpy as np import matplotlib.pyplot as plt import os impo...
{"hexsha": "55b31c324ebf2aff97e8f01cc003f371071ca378", "size": 1481, "ext": "py", "lang": "Python", "max_stars_repo_path": "markov_model.py", "max_stars_repo_name": "Acellera/covid19", "max_stars_repo_head_hexsha": "6b2cf4bc4316e3fc327e057a98e74236a76b3cd6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "ma...
import matplotlib matplotlib.use('Agg') import numpy as np from astropy.tests.helper import pytest from .. import FITSFigure # Test simple contour generation with Numpy example @pytest.mark.parametrize(('filled'), [True, False]) def test_numpy_contour(filled): data = np.arange(256).reshape((16, 16)) f = FI...
{"hexsha": "4c0c4ed820208f6af57c974ff164e74a575e1af3", "size": 446, "ext": "py", "lang": "Python", "max_stars_repo_path": "aplpy/tests/test_contour.py", "max_stars_repo_name": "nbrunett/aplpy", "max_stars_repo_head_hexsha": "f5d128faf3568adea753d52c11ba43014d25d90a", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import numpy as np class fast_classifier(object): def __init__(self): pass def train(self, features, labels): examples = {} for f,lab in zip(features, labels): if lab not in examples: examples[lab] = f return fast_model(examples) class fast_model(obj...
{"hexsha": "a15665323c9e9dea3091cb63ea7c4996e927888f", "size": 692, "ext": "py", "lang": "Python", "max_stars_repo_path": "milk/tests/fast_classifier.py", "max_stars_repo_name": "tzuryby/milk", "max_stars_repo_head_hexsha": "a7159b748414d4d095741978fb994c4affcf6b9b", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
Require Import VST.floyd.proofauto. Require Import VST.floyd.VSU. (* must have this or get wrong version of main_pre *) Require Import main. Definition main_spec p := DECLARE _main WITH gv: globals PRE [ ] main_pre p tt gv POST[ tint ] PROP() LOCAL(temp ret_temp (Vint (Int.repr 0))) SEP(TT). (*Refine p...
{"author": "PrincetonUniversity", "repo": "VST", "sha": "7d3133f3ff626e3c98bec2bd603ac74af2aff6d9", "save_path": "github-repos/coq/PrincetonUniversity-VST", "path": "github-repos/coq/PrincetonUniversity-VST/VST-7d3133f3ff626e3c98bec2bd603ac74af2aff6d9/progs64/VSUpile/spec_main.v"}
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable from pmcts.planners import UCT from demo.pgm2numpy import read_pgm plt.rcParams["image.origin"] = "lower" plt.rcParams["image.cmap"] = "gray_r" # Environment extent extent = [0, 100, 0, 100] print("Environment e...
{"hexsha": "441edb7533109cd2e45139ce634049d7c2b1dd1b", "size": 3831, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo/uct_demo.py", "max_stars_repo_name": "Weizhe-Chen/pareto-mcts", "max_stars_repo_head_hexsha": "9154029a5668438762807743e452a9ea05cf00bd", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
\subsection{Substitution} If we have a tautology, then we can substitute the formula of any propositional variable with any formula to arrive at any other tautology. For example, we know that \(\theta \lor \neg \theta \) is a tautology. This means that an arbitrary formula for \(\theta \) is also a tautology. An exa...
{"hexsha": "69b003720d0a45d2024070bda94794e567587292", "size": 1590, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/pug/theory/logic/propositionalLogicInference/01-01-syntactic.tex", "max_stars_repo_name": "adamdboult/nodeHomePage", "max_stars_repo_head_hexsha": "266bfc6865bb8f6b1530499dde3aa6206bb09b93", "ma...
/* // Sample code to perform I/O: #include <iostream> using namespace std; int main() { int num; cin >> num; // Reading input from STDIN cout << "Input number is " << num << endl; // Writing output to STDOUT } // Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fa...
{"hexsha": "7c50f181d263f2aa099f06e7dc8b2abba897af27", "size": 4936, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "testP2.cpp", "max_stars_repo_name": "valbuenaster/hackerEarthCodes", "max_stars_repo_head_hexsha": "ce95294e16327b6de12a3a5e45694140ba6e2f00", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# -*- coding: utf-8 -*- __author__ = """John Kirkham""" __email__ = "kirkhamj@janelia.hhmi.org" import collections import functools import operator import numpy import dask.array from . import _utils from ._utils import _label def area(image, label_image=None, index=None): """Find the area of specified subr...
{"hexsha": "16e49c9ae7884f6b25a45ec5a5eb0fc73a3943d7", "size": 21823, "ext": "py", "lang": "Python", "max_stars_repo_path": "dask_image/ndmeasure/__init__.py", "max_stars_repo_name": "lars-von-buchholtz/dask-image", "max_stars_repo_head_hexsha": "5eb9ec24a348cac12f24e60cd8cad206b4436eb3", "max_stars_repo_licenses": ["B...
/* * This file is part of Nand2Tetris. * * Copyright © 2013-2020 Jonathan Miller * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the...
{"hexsha": "cbcbff1cff92c17428ff9fdb9cd72d20289dfc7b", "size": 7325, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "06/AssemblyEngine.cpp", "max_stars_repo_name": "jomiller/nand2tetris", "max_stars_repo_head_hexsha": "4be20996e1b5185654ef4de5234a9543f957d6fc", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# -*- coding: utf-8 -*- """ Created on Wed Jan 16 15:26:00 2019 @author: JorryZ Method: velocityWise, displacementWise History: Date Programmer SAR# - Description ---------- ---------- ---------------------------- Author: jorry.zhengyu@gmail.com 01MARCH2019 -V1.0 Created, motionConstrain...
{"hexsha": "2be0fd6ebe0c58efc778560fa519ee860cb50124", "size": 36792, "ext": "py", "lang": "Python", "max_stars_repo_path": "motionConstrain/motionConstrain.py", "max_stars_repo_name": "JorryZ/motionConstrain", "max_stars_repo_head_hexsha": "07c0be5d52157b7f0c08035976b124566f37be18", "max_stars_repo_licenses": ["MIT"],...
import tensorflow as tf import time import threading import numpy as np from tqdm import tqdm import random # load data entirely into memory 🙁 name_list = list() print("Populating name_list") for i in tqdm(range(25000)): name_list.append("/home/david/Documents/gameFiles/CSV-19x19/data"+str(i)+".csv") filename_qu...
{"hexsha": "6e890c02100090b44a22757424b2a3c3861559fe", "size": 4440, "ext": "py", "lang": "Python", "max_stars_repo_path": "CustomRunner.py", "max_stars_repo_name": "DSWallach/ML_Go_AI", "max_stars_repo_head_hexsha": "44df6420ea5b87713070806cf3422c69203efec1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
# Copyright (c) 2019 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
{"hexsha": "e0714e0ca9873509b6d3922dc9303e4b58c3b566", "size": 15994, "ext": "py", "lang": "Python", "max_stars_repo_path": "bayesmark/experiment_analysis.py", "max_stars_repo_name": "goncaloperes/bayesmark", "max_stars_repo_head_hexsha": "8c420e935718f0d6867153b781e58943ecaf2338", "max_stars_repo_licenses": ["Apache-2...
# https://www.ibm.com/support/knowledgecenter/SSSA5P_12.10.0/ilog.odms.cplex.help/CPLEX/Parameters/topics/EpOpt.html const CPLEX_REDUCED_COST_TOLERANCE = 1.0e-6 function _check_weight_matrix(weight_matrix) # Return true if there may be a new path in this weight matrix, false if it is hopeless. # If all weight...
{"hexsha": "0cd4372088e30dcb2652c18504daba157aac47c9", "size": 9064, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/compute/oblivious/iter_pathcg.jl", "max_stars_repo_name": "dourouc05/Seleroute.jl", "max_stars_repo_head_hexsha": "8d64439e3ff16fbae7469d935f70a816909ef360", "max_stars_repo_licenses": ["MIT"],...
## Lecture 5 - Convolutional neural networks > A deep dive into convolutional neural networks for jet tagging ## Learning objectives * Know how to implement and train a convolutional neural network in PyTorch * Learn how to debug unstable training runs with activation statistics * Understand what the 1-cycle trainin...
{"hexsha": "4295342774ee32c93186e3b8617df696477ebcdc", "size": 220982, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "lecture05.ipynb", "max_stars_repo_name": "lewtun/dl4phys", "max_stars_repo_head_hexsha": "5cc0b4373d501602854a46a2528486b1bb3606d3", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
#include <Eigen/Core> #include <numpy_eigen/boost_python_headers.hpp> Eigen::Matrix<double, 3, 5> test_double_3_5(const Eigen::Matrix<double, 3, 5> & M) { return M; } void export_double_3_5() { boost::python::def("test_double_3_5",test_double_3_5); }
{"hexsha": "51a185be74f38795d81b2e85920330fcfe3973d4", "size": 255, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Schweizer-Messer/numpy_eigen/src/autogen_test_module/test_3_5_double.cpp", "max_stars_repo_name": "PushyamiKaveti/kalibr", "max_stars_repo_head_hexsha": "d8bdfc59ee666ef854012becc93571f96fe5d80c", "m...
"""This Module contains Contextual Bandit Policies.""" import copy import math import random from typing import Optional, Tuple, Union import numpy as np from scipy.stats import norm from pymab.utils import _check_x_input from .base import BaseContextualPolicy class LinUCB(BaseContextualPolicy): """Linear Uppe...
{"hexsha": "c744445e8c6d4a114881225ae44af8a200eb27af", "size": 22647, "ext": "py", "lang": "Python", "max_stars_repo_path": "multi_armed_bandit/pymab/policy/contextual.py", "max_stars_repo_name": "smn-ailab/ysaito-qiita", "max_stars_repo_head_hexsha": "8c5dd1496efa662cc636024cc49e2fd374a3daa5", "max_stars_repo_licenses...
#!usr/bin/env python3 from pathlib import Path import cv2 import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from sklearn.datasets import fetch_openml def fetch_mnist(): """Wrapper for getting the mnist dataset. Returns: X, y: Pictures and labels from the MNIST dataset. ...
{"hexsha": "9b2efefb1753fb4829617f7c08692585f4dff2bd", "size": 6685, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils/utils.py", "max_stars_repo_name": "kah109xq/MalteHBy", "max_stars_repo_head_hexsha": "f7761c1c8ed31a2501612302bc1fd80ca14b2d22", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
[STATEMENT] lemma eq_split_substI: assumes "vwb_lens x" "\<And> v. P\<lbrakk>\<guillemotleft>v\<guillemotright>/x\<rbrakk> = Q\<lbrakk>\<guillemotleft>v\<guillemotright>/x\<rbrakk>" shows "P = Q" [PROOF STATE] proof (prove) goal (1 subgoal): 1. P = Q [PROOF STEP] using assms(1) assms(2) eq_split_subst [PROOF STATE...
{"llama_tokens": 320, "file": "UTP_utp_utp_pred_laws", "length": 2}
import numpy as np import matplotlib.pyplot as plt import seaborn as sns import sys def pa(lb, arr): sys.stdout.write(lb+': ') sys.stdout.write('[') for a in arr: sys.stdout.write('{:0.2E} '.format(a)) print(']') def pi(lb, *ints): sys.stdout.write(lb+': ') for i in ints: ...
{"hexsha": "054efdf780b2cd1d8b08a13f850125a4a23530b4", "size": 5735, "ext": "py", "lang": "Python", "max_stars_repo_path": "exps/standalone/diff_sims/mem_ops.py", "max_stars_repo_name": "sillywalk/grazz", "max_stars_repo_head_hexsha": "a0adb1a90d41ff9006d8c1476546263f728b3c83", "max_stars_repo_licenses": ["Apache-2.0"]...
// // Created by marcin on 15.01.18. // #ifndef LINDA_COMMUNICATION_COMMANDLINE_HPP #define LINDA_COMMUNICATION_COMMANDLINE_HPP #include <string> #include <iostream> #include <boost/program_options.hpp> namespace po = boost::program_options; using std::cout; using std::cerr; using std::endl; using std::string; cla...
{"hexsha": "c7d58d1049eeb1562c9e52661a013918326176e8", "size": 630, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/CommandLine.hpp", "max_stars_repo_name": "graypilgrim/linda-communication", "max_stars_repo_head_hexsha": "d47206a5072e92379075e91d8f6d747e6cf24c65", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np # A convenient alias for None, useful for indexing arrays print("Alias of None : ", np.newaxis is None) arr1 = np.arange(1, 4) print("Array : ", arr1) print("NewAxis 1 : ", arr1[:, np.newaxis]) print("NewAxis 2 : ", arr1[:, np.newaxis, np.newaxis]) print("NewAxis Operation : ", arr1[:, np.newaxis] *...
{"hexsha": "755c2d39640fb29aa0bea8ec8e369d326d6b20f4", "size": 691, "ext": "py", "lang": "Python", "max_stars_repo_path": "python-numpy/Python_NumPy/constants/NewAxis.py", "max_stars_repo_name": "theumang100/tutorials-1", "max_stars_repo_head_hexsha": "497f54c2adb022c316530319a168fca1c007d4b1", "max_stars_repo_licenses...
#include "teca_cartesian_mesh_regrid.h" #include "teca_cartesian_mesh.h" #include "teca_array_collection.h" #include "teca_variant_array.h" #include "teca_metadata.h" #include "teca_coordinate_util.h" #include <algorithm> #include <iostream> #if defined(TECA_HAS_BOOST) #include <boost/program_options.hpp> #endif us...
{"hexsha": "5a2e542795140d67b91982b07924d2932040dda2", "size": 23207, "ext": "cxx", "lang": "C++", "max_stars_repo_path": "alg/teca_cartesian_mesh_regrid.cxx", "max_stars_repo_name": "LBL-EESA/TECA", "max_stars_repo_head_hexsha": "63923b8a12914f3758dc9525239bc48cd8864b39", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL...
#ifndef GET_REGEX_FUNCTION_HPP #define GET_REGEX_FUNCTION_HPP #include <string> #include <boost/regex.hpp> inline std::string getRegex(const std::string& request,const std::string& pattern){ boost::regex rgxIp(pattern); boost::smatch matchIp; if(boost::regex_search(request,matchIp ,rgxIp)){ ...
{"hexsha": "b3b16616d9689a013508610efc80e93df90acdf8", "size": 1654, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "game_files/get_regex_function.hpp", "max_stars_repo_name": "sakumo7/zpr", "max_stars_repo_head_hexsha": "7b9cdbec1ff8d8179a96bb6e1e88f54ee84d138e", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
using LinearAlgebra, Statistics using Distributions, QuasiMonteCarlo, Random using IterTools, ProgressBars using LaTeXStrings using PyPlot using NPZ, JLD SEED = 42 Random.seed!(SEED) # binary logistic regression objective with l2 regularization a6a = npzread("a6a.npy") y = a6a[:,1] X = a6a[:,2:end] RUNS = 1 EP...
{"hexsha": "cb71effc814f390dd9e96f52d64180ce784d08ed", "size": 2986, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "toy_gaussian/qmc-graderr-offline-real.jl", "max_stars_repo_name": "EugeneLYC/qmc-ordering", "max_stars_repo_head_hexsha": "055657d383f6dbfcbcac5c58a1267f8de9cf65df", "max_stars_repo_licenses": ["Ap...
import unittest import numpy as np import openeo_processes as oeop import pytest import xarray as xr @pytest.mark.usefixtures("test_data") class LogicTester(unittest.TestCase): """ Tests all logic functions. """ def test_not_(self): """ Tests `not_` function. """ assert not oeop.not_(True) ...
{"hexsha": "3960826634bac73fca66d8ecd8f0692702e74405", "size": 5366, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_logic.py", "max_stars_repo_name": "clausmichele/openeo-processes-python", "max_stars_repo_head_hexsha": "1768b507866f3d096e01a825fc0ef48e763d278d", "max_stars_repo_licenses": ["Apache-2...
""" Thierry Bertin-Mahieux (2010) Columbia University tb2332@columbia.edu This code contains code used when creating the actual MSong dataset, i.e. functions to create a song HDF5 at the right place, with proper locks for multithreading. This is part of the Million Song Dataset project from LabROSA (Columbia Universi...
{"hexsha": "11931e1594fe2ac80118f3c8a68c04c5a8264e1a", "size": 5397, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/MSongsDB/PythonSrc/DatasetCreation/dataset_sanity_check.py", "max_stars_repo_name": "lxchavez/Yeezy-Taught-Me", "max_stars_repo_head_hexsha": "c08f09b773602ad252ed89f4d0c11677803487ce", "max_s...
(* seplog (c) AIST 2005-2013. R. Affeldt, N. Marti, et al. GNU GPLv3. *) (* seplog (c) AIST 2014-2018. R. Affeldt et al. GNU GPLv3. *) From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq. From mathcomp Require Import prime. Require Import Max. Require Import ssrZ ZArith_ext String_ext seq_ext. Requi...
{"author": "affeldt-aist", "repo": "seplog", "sha": "b08516d34f5dedd0aafbe77d8ef270fa838e8f85", "save_path": "github-repos/coq/affeldt-aist-seplog", "path": "github-repos/coq/affeldt-aist-seplog/seplog-b08516d34f5dedd0aafbe77d8ef270fa838e8f85/seplogC/rfc5246.v"}
#%% Import Libraries import flask from model.model import ImageClassifier import io import numpy as np import os from sklearn.preprocessing import OneHotEncoder import zipfile from PIL import Image import psutil import logging from config.config import IMG_COLS, IMG_ROWS, TO_TRAIN # Setting logging file path try: ...
{"hexsha": "c63739a4aeb3685b5a5fdd163b769146a99b8be0", "size": 4715, "ext": "py", "lang": "Python", "max_stars_repo_path": "REST API - Tensorflow/server.py", "max_stars_repo_name": "mauryas/DataScienceTasks", "max_stars_repo_head_hexsha": "78cd4c47067101128de668a641b999d6fb406ab8", "max_stars_repo_licenses": ["MIT"], "...
import numpy as np import matplotlib.pyplot as plt from pathlib import Path import itertools from generatedFiles.home import HOME class Dataset: """ To help us generate, print, and plot datasets given some parameters. """ def __init__(self, sizes, means, covs=None): """ :param sizes: The name of the d...
{"hexsha": "3153df7096929c672a1ab94651845deeef1ef9f3", "size": 2501, "ext": "py", "lang": "Python", "max_stars_repo_path": "generatedFiles/Dataset.py", "max_stars_repo_name": "technoligest/kmeansII", "max_stars_repo_head_hexsha": "d5326421786990f29fbd1ec18b3bccf4207fd2c0", "max_stars_repo_licenses": ["MIT"], "max_stars...
from typing import TypedDict import numpy as np from asva.dampers.Damper import Damper class MASSType(TypedDict): m: float class MASS(Damper): def __init__(self, dt: float, Nd: float, m: float): super().__init__(dt, Nd) self.m = m self.force: float = 0 def step(self, dis: float): ...
{"hexsha": "02460fb90dca3df77deeeaaba258c30ad572b062", "size": 1074, "ext": "py", "lang": "Python", "max_stars_repo_path": "asva/dampers/MASS.py", "max_stars_repo_name": "adc21/asva", "max_stars_repo_head_hexsha": "b94db4aa41ee10ef1991ed4f042c91d9e310a1e1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max...
import numpy as np class Ktv : def __init__(self): self.today = 0 self.start_time = 0 self.how_long = 0 self.people = 0 self.error = 0 def set_data(self, today, start_time, how_long, people): self.today = today self.start_time = start_time ...
{"hexsha": "7a3574f07dcb48a59d9e48d11e7745292e10eb83", "size": 3719, "ext": "py", "lang": "Python", "max_stars_repo_path": "Factory_Patterns/Ktv.py", "max_stars_repo_name": "4a5g0030/KTV_Project", "max_stars_repo_head_hexsha": "30628237f660cb997d44c80127d687a4dd764e4d", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
"""Handle read and write objects""" import os import glob import re import numpy as np import pandas as pd import yaml import os import matplotlib.pyplot as plt def evtids_at_disk(evt_dir): all_files = glob.glob(os.path.join(evt_dir, '*hits*')) evtids = np.sort([int( re.search('event([0-9]*)', os.pa...
{"hexsha": "b0b66692d598e827403f802d93467be03a644674", "size": 4942, "ext": "py", "lang": "Python", "max_stars_repo_path": "gnn-tracking/heptrkx/utils.py", "max_stars_repo_name": "cliulinnaeus/exatrkx-neurips19_tf2", "max_stars_repo_head_hexsha": "ee2f22ad786b870818f88e25ec1b72ebc0b6e969", "max_stars_repo_licenses": ["...
#import pyfits as fits #incase I want to use it on work desktop from astropy.io import fits import matplotlib.pyplot as plt import numpy as np import os #turns IUE fits files into dat files. stars = os.listdir('iue') for star in stars: if star != 'dat_files': files = os.listdir('iue/'+star) for fits_file in fil...
{"hexsha": "2bfb6f62277fc8ca5e3dc01537705db5332601d2", "size": 963, "ext": "py", "lang": "Python", "max_stars_repo_path": "phase2_stuff/iue_fits_to_dat.py", "max_stars_repo_name": "davidjwilson/pceb", "max_stars_repo_head_hexsha": "259cf4b18b51b7163d6ce84ab150c5f65f8cfdec", "max_stars_repo_licenses": ["MIT"], "max_star...
# # kmltools.py # # tools for generating kml files for plotting over google Earth # # Created by Pablo Reyes on 08/30/13 as kmltools.py # Copyright (c) 2013 ECE, UIUC. All rights reserved. # history # - Aug30,2013 by P. Reyes # -File kmltools created with class for creating a file # - June 5, 2016 by E. Kudeki...
{"hexsha": "fbdca20cd8d0b40939a713b8e23f16fe8b359f0c", "size": 28635, "ext": "py", "lang": "Python", "max_stars_repo_path": "ISRpy/kmltools.py", "max_stars_repo_name": "radars-eceillinois/ISRpy", "max_stars_repo_head_hexsha": "2c5f042b2a47bcbfe03fbc3c0efb2b8716d368cb", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import jax from jax import random from proteinbert import ProteinBERT def test_model(): seq = jax.random.randint( key=random.PRNGKey(0), minval=0, maxval=21, shape=(2, 2048) ) annotation = jax.random.randint( key=random.PRNGKey(0), minval=0, maxval=1, shape=(2, 8943) ) init_rngs...
{"hexsha": "d0b8e2014868defb9341324123515cbb5c3bde23", "size": 434, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_model.py", "max_stars_repo_name": "SauravMaheshkar/ProteinBERT", "max_stars_repo_head_hexsha": "ce859f2de2a9e4ff5e8b2d25780f1eafc2bdb499", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#### Program for my research #### generate many pose of graspping in both hands(for pulling rope) and pushing in left hand(for pushing object) import visualization.panda.world as wd import robot_sim.end_effectors.grippers.robotiq85.robotiq85 as rtq85 import robot_sim.robots.ur3_dual.ur3_dual as rbts import modeling.geo...
{"hexsha": "86156dd41302f07508c9522f6b67146e9640e7a3", "size": 12594, "ext": "py", "lang": "Python", "max_stars_repo_path": "0000_examples/hayakawa/research_posemake_many.py", "max_stars_repo_name": "liang324/wrs", "max_stars_repo_head_hexsha": "46eadec355c61a9c7bac1fa0f3cf419b2aac19aa", "max_stars_repo_licenses": ["MI...
# Ajayrama Kumaraswamy, 6th Jan 2015 from matpyxplot import plt import numpy as np import math t = np.linspace(0, 5, 100) PI = math.pi canvas = plt.Canvas() g1 = plt.Graph(width=8) g1.plot(t, np.sin(2 * PI * t), c='r', ls='-', title=r"$V_1$") g1.plot(t, np.sin(2 * PI * (t - 0.25)), c='g', ls=':', title=r"$V_2$") g1...
{"hexsha": "ef19ab73492f47d8518047ac0a02cc7886e00db5", "size": 1232, "ext": "py", "lang": "Python", "max_stars_repo_path": "usageExample1.py", "max_stars_repo_name": "ajayramak/matpyxplot", "max_stars_repo_head_hexsha": "874b83f75a7640257d53590783ab702098139406", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
# coding=utf-8 # Copyright (c) DIRECT Contributors # Code and comments can be shared with code of FastMRI under the same MIT license: # https://github.com/facebookresearch/fastMRI/ # The code can have been adjusted to our needs. import numpy as np import pytest import torch from direct.common.subsample import FastMR...
{"hexsha": "17b6d3a6a5de3d65413e312f1564324bed92e848", "size": 1712, "ext": "py", "lang": "Python", "max_stars_repo_path": "direct/common/tests/test_subsample.py", "max_stars_repo_name": "iamRyanChia/direct", "max_stars_repo_head_hexsha": "c3c5e828c22c07e712cb2a4995c47f68a958f13d", "max_stars_repo_licenses": ["Apache-2...
import jax.numpy as jnp from jax import grad, jit, vmap from jax import random from jax.scipy.special import logsumexp import tensorflow_datasets as tfds import time ## Hyper-parameters def random_layer_params(m, n, key, scale=1e-2): """[summary] Args: m (int): Dimension 1 n (int): Dimension ...
{"hexsha": "fb01819cfef437c6f7f68c8d46f428df82e063b5", "size": 5586, "ext": "py", "lang": "Python", "max_stars_repo_path": "jax/nn-jax.py", "max_stars_repo_name": "Pharce/jax-suite", "max_stars_repo_head_hexsha": "b6e62dde04e0e6db48a4069e8aef67abb2ca30e8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
import numpy as np import os import h5py from tqdm import tqdm import random import csv import sys sys.path.append('..') import mel_features import vggish_params import vggish_input shuffle_data = True shuffle_train = False train_split = 0.8 val_split = 0.1 test_split = 0.1 num_classes = 4 # File search utility fu...
{"hexsha": "1aa3cd58129441ef99553164191888166dbdd214", "size": 5167, "ext": "py", "lang": "Python", "max_stars_repo_path": "non-overlap/generate_test_train_data.py", "max_stars_repo_name": "MalekNaimi/VGGish-Model", "max_stars_repo_head_hexsha": "61369097fe669c642f15a94f964e9130b0218756", "max_stars_repo_licenses": ["M...
import os import torch import torch.nn as nn import torchvision.transforms as transforms from .base_model import BaseModel from . import networks import numpy as np import functools from PIL import Image from util import util from torchvision import models from collections import namedtuple from . import VGG_LOSS fro...
{"hexsha": "d00cb32fc6212fad655b12a244898571437ad191", "size": 4954, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/TexRepNet_model.py", "max_stars_repo_name": "JustusThies/TexRepNet", "max_stars_repo_head_hexsha": "2f9a3ac2d9109688959f658290323ec788dd3595", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
\chapter{Quantum states and measurements} In this chapter we'll explain how to set up quantum states using linear algebra. This will allow me to talk about quantum \emph{circuits} in the next chapter, which will set the stage for Shor's algorithm. I won't do very much physics (read: none at all). That is, I'll only st...
{"hexsha": "c0f60f65d45279cddaa28dbd4f613411f90fee63", "size": 19142, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "corpus/napkin/tex/quantum/vectors.tex", "max_stars_repo_name": "aDotInTheVoid/ltxmk", "max_stars_repo_head_hexsha": "ee461679e51e92a0e4b121f28ae5fe17d5e5319e", "max_stars_repo_licenses": ["Apache-2...
import os import cv2 import copy import numpy as np import tensorflow as tf import imgaug as ia from imgaug import augmenters as iaa from keras.utils import Sequence import xml.etree.ElementTree as ET def parse_annotation(ann_dir, img_dir, labels=[]): all_imgs = [] seen_labels = {} for ann in sorted(...
{"hexsha": "69ba1c9aaf9e6cc8128cb9db14629f1554dcdcba", "size": 20803, "ext": "py", "lang": "Python", "max_stars_repo_path": "utilities/yolo_utilities.py", "max_stars_repo_name": "agnesreband/automatic_license_plate_recognition", "max_stars_repo_head_hexsha": "0adb1d25bcc495a0c0504c0b54f63118e9fc441e", "max_stars_repo_l...
import numpy as np from sklearn.feature_extraction import DictVectorizer from sklearn.model_selection import train_test_split from sklearn.base import ClassifierMixin from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import Perceptron, Logistic...
{"hexsha": "ab5ef7b620513bfa769e7c13294bb9f118d38177", "size": 6109, "ext": "py", "lang": "Python", "max_stars_repo_path": "p04-models.py", "max_stars_repo_name": "Avanderheyde/cs451-practicals", "max_stars_repo_head_hexsha": "efd2560d8d40ddb2ec97a05234e9d808731c3feb", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
# -*- coding: utf-8 -*- """ Created on Tue Apr 9 15:48:17 2013 Overview -------- The ``soerp`` package is the python equivalent of N. D. Cox's original SOERP code written in Fortran. See the documentation in UncertainVariable for more details and a reference to his work. Credits ------- A lot of code here was inspi...
{"hexsha": "b25fdb67f2fed8a4cd0a6b55da00c5dcec51730d", "size": 41283, "ext": "py", "lang": "Python", "max_stars_repo_path": "soerp/__init__.py", "max_stars_repo_name": "tisimst/soerp", "max_stars_repo_head_hexsha": "82664f96a94619dd42e5d2ef2ea6e4382ea58791", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count...
import logging import signal from json import JSONDecodeError from queue import Empty as QueueEmptyError from queue import Full as QueueFullError from time import sleep from typing import Dict, List import numpy as np import requests import torch.multiprocessing as mp from django import db from django.conf import sett...
{"hexsha": "9224c99587bb153542d50855437df81aab75d5e1", "size": 12887, "ext": "py", "lang": "Python", "max_stars_repo_path": "dfapi/services/workers.py", "max_stars_repo_name": "raikel/dnfas", "max_stars_repo_head_hexsha": "567bcc6656c75ee5167bd248045ec24e37de07b8", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers // // This file is part of Bytecoin. // // Bytecoin is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of t...
{"hexsha": "4b622ec00c151929c04047e069734e39755f8e7d", "size": 15848, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Daemon/Daemon.cpp", "max_stars_repo_name": "coinlegacycore/coinlegacy", "max_stars_repo_head_hexsha": "ee9dfb97b56e9361cd5436f6327d7edf990acfe3", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
import pandas as pd from datetime import datetime from emoji import UNICODE_EMOJI from tqdm import tqdm import logging from collections import Counter from wordcloud import WordCloud, STOPWORDS import matplotlib as plt import nltk import seaborn as sns import string from functools import reduce import networkx as nx fr...
{"hexsha": "f71f43905fef44930da68b9f376cd5256acc1683", "size": 11661, "ext": "py", "lang": "Python", "max_stars_repo_path": "WhatsappAnalysis/utils.py", "max_stars_repo_name": "bagdeabhishek/WhatsappAnalysis", "max_stars_repo_head_hexsha": "a4c53f2787db9748dc77ebe420efa94242205911", "max_stars_repo_licenses": ["MIT"], ...
using Test using BenchmarkTools using LinearAlgebra using BQCESubroutine using YaoLocations # TODO: threaded_subspace_mul_generic! # TODO: check if (dense) Matrix is diagonal? N = 15 M = 4 @testset "diagonal (real)" begin st = rand(Float64, 1<<N) st_mat = rand(Float64, 5, 1<<N) U = Diagonal(rand(Float64,...
{"hexsha": "7200687f9048f9590df5bb51e9959fc07a2f9198", "size": 1173, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "benchmarks/diagonal.jl", "max_stars_repo_name": "jzxia/BQCESubroutine.jl", "max_stars_repo_head_hexsha": "fa4a5d46d140fcf1e7b5877f948ae08eca3a545b", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# -*- coding: utf-8 -*- """ @author: Pankaj Mishra Refrence: https://github.com/moonl1ght/MDN/blob/master/MDN.ipynb for the no of parameters - sum(p.numel() for p in model.parameters() if p.requires_grad) """ import torch import numpy as np import torch.nn as nn import torch.nn.functional as F COEFS = 10 IN_DIM = 5...
{"hexsha": "bddf35c3a0558736c30df2658f7183db836bba57", "size": 4318, "ext": "py", "lang": "Python", "max_stars_repo_path": "mdn1.py", "max_stars_repo_name": "Aierhaimian/VT-ADL", "max_stars_repo_head_hexsha": "051dd9b7af2205869d109967ce0e9bb1eaea1b29", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 44, "max_sta...
[STATEMENT] lemma integrable_self_fin_uvp: assumes "\<forall> asset \<in> support_set pf. integrable M (\<lambda>w. prices Mkt asset n w * pf asset (Suc n) w)" and "self_financing Mkt pf" shows "integrable M (cls_val_process Mkt pf n)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. integrable M (cls_val_process ...
{"llama_tokens": 983, "file": "DiscretePricing_Fair_Price", "length": 12}
#include <string> #include <regex> #include <iostream> #include <boost/algorithm/string.hpp> #include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/predicate.hpp> #include "preprocessor.hpp" #include "htmlencode.hpp" PreProcessor::PreProcessor() { in_literal = false; templateless_literal ...
{"hexsha": "bf67b12215602890c5e344550c1d3aaf478d51c2", "size": 4575, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cpp/src/preprocessor.cpp", "max_stars_repo_name": "sapphire-lang/emerald", "max_stars_repo_head_hexsha": "5cb7209f918e8ebdb36bb0455f58d3e941fc6e52", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
using PkgSRA, Plots, LinearAlgebra, Statistics using AxisArrays, DataFrames, DataStructures using BSON: @load pyplot() include("paper_plotting.jl") include("paper_settings.jl") ##### ##### Plot AND save using external function ##### ## Lotka Volterra this_dat_name = "dat_library_with_noise_lv_" plot_final = plot_lib...
{"hexsha": "e571e520b6e4d6e4d71c0195bf25acdaab0a4d6f", "size": 851, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "paper/scripts/fig_library_with_noise.jl", "max_stars_repo_name": "Charles-Fieseler/Learn_Control_Signals", "max_stars_repo_head_hexsha": "987a3775f4f75080c23d631832dd6963e7be078a", "max_stars_repo_l...
// Copyright Carl Philipp Reh 2006 - 2019. // 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) #ifndef SGE_OPENGL_TEXTURE_MIPMAP_LEVELS_HPP_INCLUDED #define SGE_OPENGL_TEXTURE_MIPMAP_LEVELS_HPP_...
{"hexsha": "4fc8a083e1c1f67f74d9ccb9b5fb91f855261232", "size": 1532, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "plugins/opengl/include/sge/opengl/texture/mipmap/levels.hpp", "max_stars_repo_name": "cpreh/spacegameengine", "max_stars_repo_head_hexsha": "313a1c34160b42a5135f8223ffaa3a31bc075a01", "max_stars_rep...
# -*- coding: utf-8 -*- import tensorflow as tf import scipy.io as sio import numpy.linalg as LA from utils import mse import numpy as np result = np.array([]).reshape(0,1) for year in [2010, 2011, 2012, 2013, 2014]: print(">>>>>") data_name = "data{}".format(year) data_path = "../data2017/{}.mat".format...
{"hexsha": "324b7bc8a71e7f67b6891c7d379968b8abba3038", "size": 3207, "ext": "py", "lang": "Python", "max_stars_repo_path": "HW2/scripts/NN.py", "max_stars_repo_name": "UltronAI/Stochastic-Process", "max_stars_repo_head_hexsha": "edbfe0eb2b62758e093306d18ba5a96415572be1", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import torch from torch import nn from model_zoo import googLeNet, load_model, resnet from get_data import import_data import numpy as np import cv2 import os def soft_max(x): num = np.exp(x) den = np.sum(num, axis=1, keepdims=True) return num/den def check_failed_example(): model, create_new = load...
{"hexsha": "ddc04f49a31f5c7322203e5a5fd57e928c039e29", "size": 6271, "ext": "py", "lang": "Python", "max_stars_repo_path": "check.py", "max_stars_repo_name": "zhfeing/graduation-project", "max_stars_repo_head_hexsha": "e9020a4d7916874ad9d4bf0c9f7f1f82dcfea663", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
"""@author: Bryan Silverthorn <bcs@cargo-cult.org>""" import plac if __name__ == "__main__": from borg.tools.armada import main plac.call(main) import sys import random import logging import cPickle as pickle import numpy import cargo import borg logger = cargo.get_logger(__name__, default_level = "INFO") ...
{"hexsha": "62e0a12c4a5c57979121c9d703417b1f40727370", "size": 1148, "ext": "py", "lang": "Python", "max_stars_repo_path": "borg/tools/armada.py", "max_stars_repo_name": "borg-project/borg", "max_stars_repo_head_hexsha": "5140cff6c96de365b2eba9f07b7fc606b4b16c1b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
##----------------------------------------------------------------------------- ## Import ##----------------------------------------------------------------------------- import os import numpy as np from os import listdir from fnmatch import filter import scipy.io as sio from multiprocessing import Pool, cpu_count fro...
{"hexsha": "90939f0af91e183e22c16ab884f49517c0ffc35c", "size": 4943, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/fnc/matching.py", "max_stars_repo_name": "pourabkarchaudhuri/iris-recognition", "max_stars_repo_head_hexsha": "d0821f871d739a65e8e1ce15afe037f621d08219", "max_stars_repo_licenses": ["MIT"],...
from PIL import Image import numpy as np import requests from io import BytesIO from scripts.qol import kwarget # Make a function that loads jsons and image from dataset to make a fixmap def fixmap(subject_list, page, number, **kwargs): # Get parameters from kwargs('key', default_val, **kwargs) ignore = kwar...
{"hexsha": "9948002f44fbe5099bda8ee6ae6e053450280fde", "size": 5071, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/data_loader.py", "max_stars_repo_name": "harrisonford/AkoriSalienceNotebooks", "max_stars_repo_head_hexsha": "6e95e5476eaff5669b947b0e133f952ce237d63f", "max_stars_repo_licenses": ["MIT"],...
SUBROUTINE SNDUPD ( snfile, snoutf, area, dattim, timstn, + wavlen, wavspd, storm, crdrot, tropht, + trpint, cldhgt, mxdpth, squall, delz, + filtyp, spline, output, iret ) C************************************************************************ C* SNDUPD ...
{"hexsha": "3c6ad42125753c7ddf1ca9f87986cd225623f438", "size": 1836, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/programs/sn/sndiag/sndupd.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Cl...