text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
# generated
type = "champion"
format = "standAloneComplex"
version = v"11.17.1"
for locale in ("en_US", "ko_KR")
gendir = normpath(@__DIR__, "11.17.1", "generated", locale)
include(normpath(gendir, "module.jl"))
end
| {"hexsha": "1025e9a10b58886f0765c39af15713e3bd05aaa9", "size": 224, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "gen/locales.jl", "max_stars_repo_name": "wookay/LOLToolsDataDragon.jl", "max_stars_repo_head_hexsha": "37194b9ac1ea230e18b7db606f1cd6005ddf2f1f", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import sys
import nett_python as nett
from float_vector_message_pb2 import *
from float_message_pb2 import *
from color_table_message_pb2 import *
import pyqtgraph as pg
import numpy as np
from pyqtgraph.Qt import QtCore, QtGui
import helper
use_ip_endpoint = None
fixed_selection = None
if len(sys.argv) != 3:
prin... | {"hexsha": "b4d631e0b50463797ce2f0c4e2df74b71b8e4809", "size": 8853, "ext": "py", "lang": "Python", "max_stars_repo_path": "ca_plotter.py", "max_stars_repo_name": "jeliason/isv_neuroscience", "max_stars_repo_head_hexsha": "ce4cf35e57ce2e517cca249ee10d2c302c5c2901", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_star... |
from __future__ import print_function
import tensorflow as tf
import numpy as np
import math
import random
import pandas as pd
import csv
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
def rot90(m, k=1, axis=2):
"""Rotate an array by 90 degrees in the counter-clockwise direction around the given axis"""
m ... | {"hexsha": "cb9139fc6d01279199427ff577e02eb2a61f9b92", "size": 7217, "ext": "py", "lang": "Python", "max_stars_repo_path": "Codes/preprocess.py", "max_stars_repo_name": "bijiuni/brain_age", "max_stars_repo_head_hexsha": "8a768e29046d525fdef3d57a58c742b52ed6f8e7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1... |
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from divmachines.classifiers import MF
from divmachines.logging import TrainingLogger as TLogger
cols = ['user', 'item', 'rating', 'timestamp']
train = pd.read_csv('../../../../data/ua.base', delimiter='\t', names=cols)
# map_user = train.groupby(... | {"hexsha": "5eca414b16b8dd26e80a2feb5bc457ead64b1bce", "size": 1696, "ext": "py", "lang": "Python", "max_stars_repo_path": "divmachines/demo/classifiers/mf/movielens.py", "max_stars_repo_name": "DanielMorales9/FactorizationPyTorch", "max_stars_repo_head_hexsha": "50f0644fdb4a903550fb3f1ba78fb9fb8649ceb1", "max_stars_re... |
import os
import numpy as np
from utils import calculate_iou
import matplotlib.pyplot as plt
def main():
root_dir = '../data/OTB100'
list = os.listdir(root_dir)
iou_list = []
for name in list:
pred_path = os.path.join(root_dir, name, 'pred_rect_sl2.txt')
gt_path = os.path.join(root_dir... | {"hexsha": "4d1a6df12e59bf095629b911bc60dfb0e68bbb97", "size": 1424, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch/plot_curve.py", "max_stars_repo_name": "jiweeo/RL-Tracking", "max_stars_repo_head_hexsha": "ef038569ab6b5663a36f6c3843ca17169ea2f0fe", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
import os
import numpy as np
import torch
from transformers import glue_compute_metrics
from utils.miscellaneous import progress_bar
def evaluate(task_name, model, eval_dataloader, model_type, output_mode = 'classification', device='cuda'):
# results = {}
eval_loss = 0.0
nb_eval_steps = 0
preds = No... | {"hexsha": "46cdf026990743a0c39e2f1590a24db0b6b526b2", "size": 1766, "ext": "py", "lang": "Python", "max_stars_repo_path": "WorkSpace/utils/train.py", "max_stars_repo_name": "csyhhu/transformers", "max_stars_repo_head_hexsha": "87b779d521092e138dc8cd18aa36fd5325b52fd7", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
import os
from src.data.make_dataset import read_params
import numpy as np
from sklearn.metrics import mean_squared_error,mean_absolute_error,r2_score
from sklearn.model_selection import train_test_split
from sklearn.linear_model import ElasticNet
from urllib.parse import urlparse
import argparse
import joblib
import ... | {"hexsha": "f6e8bdfdb7d29e07c7c775404c0f3e864a99e0ad", "size": 1950, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/train_model.py", "max_stars_repo_name": "anjibabupalla/mlops_aks_gitworklow", "max_stars_repo_head_hexsha": "b53619876ac4a5aa10e46db2cb40aebfce09f637", "max_stars_repo_licenses": ["MIT"... |
#include <boost/mpl/set/aux_/numbered.hpp>
| {"hexsha": "460055f5a8263b255609c192c79bf188ab5a468a", "size": 43, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_mpl_set_aux__numbered.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1.0... |
import cv2
import numpy as np
import random
oldx = oldy = -1
img = np.ones((480, 640, 3), dtype=np.uint8) * 255
def on_mouse(event, x, y, flags, param):
global oldx, oldy
if event == cv2.EVENT_LBUTTONDOWN:
oldx, oldy = x, y
if event == cv2.EVENT_LBUTTONDBLCLK:
cv2.circle(img, (x, y), random.... | {"hexsha": "f8f805a83e08a0336f516b01b85537d2aafda49d", "size": 531, "ext": "py", "lang": "Python", "max_stars_repo_path": "ocv06-02.py", "max_stars_repo_name": "LeeCheahyun/20210823-0930", "max_stars_repo_head_hexsha": "12927fe918452b3e7da5fcd4d31da6095c400106", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou... |
import numpy as np
import scipy
import scipy.sparse
import scipy.sparse.linalg
import matplotlib.pyplot as plt
class NumericalSolver():
def __init__(self):
self.eps = 1 # Multiplier unique to specific biological systems
self.h = 0.05 # Spacial step
self.alpha = 3.0 # Exponent
... | {"hexsha": "c42481b9dd5373bee9ea3e3b3a619407e0c8b7c1", "size": 4731, "ext": "py", "lang": "Python", "max_stars_repo_path": "turing_class.py", "max_stars_repo_name": "turimang/turingpatterns", "max_stars_repo_head_hexsha": "570fd2e441e0ab5f3e37bce99e554017886f9c33", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star... |
import pandas as pd
import numpy as np
from datetime import datetime
from arch import arch_model
from volatility.utils import get_percent_chg, Option
import statsmodels.api as sm
from sklearn import linear_model
def get_IV_predict(df, df_option, test_size, keyList, ir_free):
df_ret = pd.DataFrame()
df_ret['Dat... | {"hexsha": "7855a7236b34a67441f9a402e3fce4d7610c197f", "size": 6364, "ext": "py", "lang": "Python", "max_stars_repo_path": "volatility/models_IV.py", "max_stars_repo_name": "larrys54321/quant_corner", "max_stars_repo_head_hexsha": "3dc6f3f3d1ce1fa002c226bd5c5f845b91710687", "max_stars_repo_licenses": ["MIT"], "max_star... |
import Data.List1
import Data.Nat
import Data.String.Parser
import System.File
data SnailfishNum = Regular Nat | Pair SnailfishNum SnailfishNum
Show SnailfishNum where
show (Regular k) = show k
show (Pair x y) = "[" ++ show x ++ "," ++ show y ++ "]"
data ReduceResult = None | Done | Add Nat Nat | AddL Nat | Add... | {"hexsha": "5218134f57b9e208c722cf17938bf1a855f62dbf", "size": 3416, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "18/Main.idr", "max_stars_repo_name": "Olavhaasie/aoc-2021", "max_stars_repo_head_hexsha": "0a0b293bd9c41da785f4a1a0207a72a823944b1c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
# using Revise
using Test
@testset "BifurcationKit" begin
@testset "Linear Solvers" begin
include("precond.jl")
include("test_linear.jl")
end
@testset "Newton" begin
include("test_newton.jl")
include("test-bordered-problem.jl")
end
@testset "Continuation" begin
include("test_bif_detection.jl")
incl... | {"hexsha": "bddb7e21a1456953f65b7c52138d5b9bbe3582b6", "size": 1007, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "free-Gift-card/BifurcationKit.jl", "max_stars_repo_head_hexsha": "07938db6909fa00b10736f916750d19f92b87e22", "max_stars_repo_licenses": ["MIT"], "max_star... |
from math import exp
from scipy import optimize
'''
References
-----------
[1] D. Sera, R. Teodorescu, and P. Rodriguez, "PV panel model based on datasheet values," in Industrial Electronics, 2007. ISIE 2007. IEEE International Symposium on, 2007, pp. 2392-2396.
'''
class ParameterExtraction(object):
boltzmann_c... | {"hexsha": "73e5293816f85dc84fbad570d4a98c48e7f15b30", "size": 11575, "ext": "py", "lang": "Python", "max_stars_repo_path": "venv/lib/python3.5/site-packages/photovoltaic_modeling/parameter_extraction.py", "max_stars_repo_name": "tadatoshi/photovoltaic_modeling_python", "max_stars_repo_head_hexsha": "65affdc07497e592ec... |
\subsection{Savings}
Alice starts cutting back on meat to save shells for the future. This gives Bob a dilemma; he has less income so he can either:
\begin{itemize}
\item Continue spending, drawing down on his shells; or
\item Spend less (for simplicity, on fish).
\end{itemize}
In the first case Alice’s savings are... | {"hexsha": "f30be6bb37e6458de27d5db3e3ddd3fb8b7530f5", "size": 610, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/pug/theory/economics/saving/01-01-saving.tex", "max_stars_repo_name": "adamdboult/nodeHomePage", "max_stars_repo_head_hexsha": "266bfc6865bb8f6b1530499dde3aa6206bb09b93", "max_stars_repo_licenses... |
import librosa
import os
import numpy as np
import scipy.io.wavfile as wavfile
RANGE = (0,2000)
if(not os.path.isdir('norm_audio_train')):
os.mkdir('norm_audio_train')
for num in range(RANGE[0],RANGE[1]):
path = 'audio_train/trim_audio_train%s.wav'% num
norm_path = 'norm_audio_train/trim_audio_train%s.wa... | {"hexsha": "2d4042208b7cd471769bb75de22e64d087e31ab6", "size": 549, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/audio/audio_norm.py", "max_stars_repo_name": "SutirthaChakraborty/speech_separation", "max_stars_repo_head_hexsha": "20bf0d26e8af24948f59e6894d8e9f5ab7631a39", "max_stars_repo_licenses": ["MIT... |
# You can use this code to evaluate the trained model of CSPN on VOC validation data, adapted from SEC
import numpy as np
import pylab
import scipy.ndimage as nd
import imageio
from matplotlib import pyplot as plt
from matplotlib import colors as mpl_colors
import krahenbuhl2013
import sys
sys.path.insert(0,'/home... | {"hexsha": "5192727e7ef6bada3e0ab12f97b06319e6263dad", "size": 4540, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluate_VOC_val.py", "max_stars_repo_name": "briqr/CSPN", "max_stars_repo_head_hexsha": "d3d01e5a4e29d0c2ee4f1dfda1f2e7815163d346", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 17, "max... |
(*
* Copyright 2014, General Dynamics C4 Systems
*
* SPDX-License-Identifier: GPL-2.0-only
*)
(*
Documentation file, introduction to the abstract specification.
*)
chapter "Introduction"
(*<*)
theory Intro_Doc
imports Main
begin
(*>*)
text \<open>
The seL4 microkernel is an operating system kernel designed to b... | {"author": "seL4", "repo": "l4v", "sha": "9ba34e269008732d4f89fb7a7e32337ffdd09ff9", "save_path": "github-repos/isabelle/seL4-l4v", "path": "github-repos/isabelle/seL4-l4v/l4v-9ba34e269008732d4f89fb7a7e32337ffdd09ff9/spec/abstract/Intro_Doc.thy"} |
from collections import MutableMapping
import numpy as np
import pytest
from hrv.rri import (RRi, _validate_rri, _create_time_array, _validate_time,
_prepare_table)
from tests.test_utils import FAKE_RRI
class TestRRiClassArguments:
def test_transform_rri_to_numpy_array(self):
valida... | {"hexsha": "17529738ecff70a83ca6ca7a9606fd48877740d5", "size": 10057, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_rri.py", "max_stars_repo_name": "raphaelvallat/hrv", "max_stars_repo_head_hexsha": "6d8c9f0a0187b382697b90f39362cf91c7ea3a76", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c... |
[STATEMENT]
lemma heap_is_wellformed_one_disc_parent: "heap_is_wellformed h \<Longrightarrow>
h \<turnstile> get_disconnected_nodes document_ptr \<rightarrow>\<^sub>r disc_nodes \<Longrightarrow>
h \<turnstile> get_disconnected_nodes document_ptr' \<rightarrow>\<^sub>r disc_nodes' \<Longrightarrow> set disc_nodes \<int... | {"llama_tokens": 709, "file": "Shadow_SC_DOM_Shadow_DOM", "length": 2} |
import numpy as np
import torch
import torch.nn.functional as F
# DETR imports
from detr.util.box_ops import box_cxcywh_to_xyxy
# Detectron Imports
from detectron2.structures import Boxes
# Project Imports
from probabilistic_inference import inference_utils
from probabilistic_inference.inference_core import Probabi... | {"hexsha": "6cbcd1678b5da0a60855f3fe01e38b272ecb9d81", "size": 8454, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/probabilistic_inference/probabilistic_detr_predictor.py", "max_stars_repo_name": "jskhu/probdet-1", "max_stars_repo_head_hexsha": "b8bda3bd7cdd573aa9f70a62453d147664211af6", "max_stars_repo_li... |
[STATEMENT]
lemma Reals_cases [cases set: Reals]:
assumes "q \<in> \<real>"
obtains (of_real) r where "q = of_real r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (\<And>r. q = of_real r \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding Reals_def
[PROOF STATE]
proof (prove)
goal (1 subg... | {"llama_tokens": 768, "file": null, "length": 13} |
(*
* Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
*
* SPDX-License-Identifier: BSD-2-Clause
*)
(*
* Test force/prevent heap abstraction.
*)
theory heap_lift_force_prevent
imports "AutoCorres.AutoCorres"
begin
external_file "heap_lift_force_prevent.c"
install_C_file "heap_lift_force_prevent.c"
autocorres... | {"author": "seL4", "repo": "l4v", "sha": "9ba34e269008732d4f89fb7a7e32337ffdd09ff9", "save_path": "github-repos/isabelle/seL4-l4v", "path": "github-repos/isabelle/seL4-l4v/l4v-9ba34e269008732d4f89fb7a7e32337ffdd09ff9/tools/autocorres/tests/proof-tests/heap_lift_force_prevent.thy"} |
import networkx as nx
import matplotlib.pyplot as plt
filename = 'SCC.txt'
DG = nx.DiGraph()
with open(filename) as f:
for line in f:
# Parse the line
parsed_line = line.rsplit(' ')
DG.add_edge(int(parsed_line[0]), int(parsed_line[1]))
| {"hexsha": "2d524706d09a77b7a12e17756cea002fa62b181d", "size": 269, "ext": "py", "lang": "Python", "max_stars_repo_path": "algorithms_01_stanford/4_week/play.py", "max_stars_repo_name": "h-mayorquin/coursera", "max_stars_repo_head_hexsha": "508e800566f3a2ceba759656bb5ee407de927b14", "max_stars_repo_licenses": ["BSD-2-C... |
[STATEMENT]
lemma fv_subterms_substI[intro]: "y \<in> fv t \<Longrightarrow> \<theta> y \<in> subterms t \<cdot>\<^sub>s\<^sub>e\<^sub>t \<theta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. y \<in> fv t \<Longrightarrow> \<theta> y \<in> subterms t \<cdot>\<^sub>s\<^sub>e\<^sub>t \<theta>
[PROOF STEP]
using imag... | {"llama_tokens": 272, "file": "Stateful_Protocol_Composition_and_Typing_More_Unification", "length": 2} |
import argparse, os, time, json
import numpy as np
from os import path
from evaluation.common import precision_recall_curve
from pairwise_models import restore_definition
from rule_based.most_followers import MostFollowers
from utils.common import Scaler
def f1(prec: float, rec: float) -> float:
return 2 * prec... | {"hexsha": "1250e0f49a0c8d7576846e62af6c23cd91d0e5e4", "size": 9328, "ext": "py", "lang": "Python", "max_stars_repo_path": "align-train/evaluate.py", "max_stars_repo_name": "Remper/alignments", "max_stars_repo_head_hexsha": "517becd115999914901b4503baa108849058be2c", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
import numpy as np
# Load the data in csv format
# Each row contains an instance (case)
# The values included in each row are separated by a string given by the parameter sep, e.g., ","
# Each column corresponds to the values of a (discrete) random variable
# name (string): file name containing the data
# sep (string... | {"hexsha": "c0943bc0bcf6621256d9097eb3d2dd344746bd3e", "size": 10862, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/Parser.py", "max_stars_repo_name": "MachineLearningBCAM/minimax-risk-classifier", "max_stars_repo_head_hexsha": "82586c632268c103de269bcbffa5f7849b174a29", "max_stars_repo_licenses": ["MI... |
[STATEMENT]
lemma connect[unfolded \<I>_adv_core_def \<I>_usr_core_def]:
fixes \<I>_adv_restk \<I>_adv_resta \<I>_usr_restk \<I>_usr_resta
defines "\<I> \<equiv> (\<I>_adv_core \<oplus>\<^sub>\<I> (\<I>_adv_restk \<oplus>\<^sub>\<I> \<I>_adv_resta)) \<oplus>\<^sub>\<I> (\<I>_usr_core \<oplus>\<^sub>\<I> (\<I>_us... | {"llama_tokens": 5782, "file": "Constructive_Cryptography_CM_Constructions_One_Time_Pad", "length": 38} |
c-----------------------------------------------------------------------
subroutine bl_proffortfuncstart(str)
character*(*) str
integer NSTR
parameter (NSTR = 128)
integer istr(NSTR)
call blstr2int(istr, NSTR, str)
call bl_proffortfuncstart_cpp(istr, NSTR)
end
c----------... | {"hexsha": "1db8e208c882aafa14d74591fbce7f1c27292441", "size": 988, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Src/C_BaseLib/BLProfiler_F.f", "max_stars_repo_name": "memmett/BoxLib", "max_stars_repo_head_hexsha": "a235af87d30cbfc721d4d7eb4da9b8daadeded7d", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL"], "... |
# -*- coding: latin-1 -*-
# Copyright (c) 2008 Pycircuit Development Team
# See LICENSE for details.
"""The waveform module contains classes for handling simulation results in
the form of X-Y data. The classes can handle results from multi-dimensional
sweeps.
"""
import numpy as np
from numpy import array,concaten... | {"hexsha": "f3ada4fee34080a2dd261df958f8aabeab9109fa", "size": 39046, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycircuit/post/waveform.py", "max_stars_repo_name": "michaelnt/pycircuit", "max_stars_repo_head_hexsha": "ef3110c1c3789c1e5f30c35e3f5dd15ed4bd349e", "max_stars_repo_licenses": ["BSD-3-Clause"], "... |
import sys
import re
import glob
import os
import h5py
import pdb
import pandas as pd
import scipy as sp
import numpy as np
import statsmodels
# import limix.stats.fdr as fdr
def smartAppend(table,name,value):
""" helper function for appending in a dictionary """
if name not in table.keys():
table[name... | {"hexsha": "0a6bb43913a108f0e319cc0c324a2e7cd0a326d1", "size": 3110, "ext": "py", "lang": "Python", "max_stars_repo_path": "endodiff/usage/scripts/summarise_associations.py", "max_stars_repo_name": "annacuomo/CellRegMap_analyses", "max_stars_repo_head_hexsha": "942dac12c376675a1fd06de872e82b4b038d1c31", "max_stars_repo... |
import os
import numpy as np
import json
from PIL import Image
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
import tqdm
def normalize(matrix):
'''
Takes a matrix, flattens it, takes the zscore for each value, then normalizes to a unit vector.
Returns the normalized n-dimensional... | {"hexsha": "409b35b11531e71d94ad3a537c1beaec1e6cdfb3", "size": 3488, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_predictions.py", "max_stars_repo_name": "kvnmei/caltech-ee148-spring2020-hw01", "max_stars_repo_head_hexsha": "a96e31a0479f4a56eb9d709c3069b1b4aee768d3", "max_stars_repo_licenses": ["MIT"], "m... |
The Center for Cognitive Liberty & Ethics, aka the CCLE, is a NonProfit Organizations nonprofit organization that works solely to advance sustainable social policies that protect freedom of thought. CCLE was founded to promote public awareness and legal recognition of cognitive liberty and the right of each individual... | {"hexsha": "6eaff473611e31bf3b9d05d3c0c0c7db4f3678df", "size": 556, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Center_for_Cognitive_Liberty_%26_Ethics.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses":... |
# Just a script to make recognizing faces easier with few functions
# LBPH + HAAR recognizer combo is capable of identifying person from another, and training runtime
# DNN can be used in place for HAAR for detecting initial faces before LBPH recognition
import os
import time
import numpy as np
import cv2
import pathli... | {"hexsha": "7c776a08b3757419cfc892502bc0e9bb6b896bda", "size": 11164, "ext": "py", "lang": "Python", "max_stars_repo_path": "Submods/MAS Additions/MASM/scripts/facer/facer.py", "max_stars_repo_name": "QuadILOP1/MAS-Additions", "max_stars_repo_head_hexsha": "9275d0c0aac1ae0a9245ada9a2c97ef4147222f9", "max_stars_repo_lic... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 17 12:38:44 2017
@author: ahefny, zmarinho
"""
from theano.tensor.shared_randomstreams import RandomStreams
'''
decorator of noisy_model.
'''
class NoisyModel(object):
def __init__(self, obs_noise=0.0, obs_loc=0.0, state_noise=0.0, ... | {"hexsha": "c10fffaa4e8dfe7a111bf7f0d0350046817cf477", "size": 1086, "ext": "py", "lang": "Python", "max_stars_repo_path": "rpsp/rpspnets/psr_lite/noisy_model.py", "max_stars_repo_name": "ahefnycmu/rpsp", "max_stars_repo_head_hexsha": "ff3aa3e89a91bb4afb7bad932d2c04691a727a63", "max_stars_repo_licenses": ["Apache-2.0"]... |
# import the necessary packages
from sklearn.cross_validation import train_test_split
from sklearn.metrics import classification_report
from sklearn import datasets
from nolearn.dbn import DBN
import numpy as np
import cv2
import scipy.io as sio
import pickle
# grab the MNIST dataset (if this is the first time you are... | {"hexsha": "6070a37ba77a11984c77ccd8a7b01de054bdcee5", "size": 3773, "ext": "py", "lang": "Python", "max_stars_repo_path": "nepali.py", "max_stars_repo_name": "sujitmhj/devanagari-handwritting-recognition", "max_stars_repo_head_hexsha": "c503fd5b05077eb59fc834e8b6942222c117f172", "max_stars_repo_licenses": ["MIT"], "ma... |
from keras.models import load_model
import numpy as np
from keras.datasets import mnist
import numpy as np
(x_train, _), (x_test, _) = mnist.load_data()
x_train = x_train.astype('float32')/255.
x_test = x_test.astype('float32')/255.
x_train = np.reshape(x_train, (len(x_train), 28, 28, 1))
x_test = np.reshape(x_test, ... | {"hexsha": "d9cdd3ffa8b7a99cd6fffa12fcd10253b258d598", "size": 1166, "ext": "py", "lang": "Python", "max_stars_repo_path": "framework/load_conv_ae.py", "max_stars_repo_name": "mullachv/causal_notes", "max_stars_repo_head_hexsha": "509e1f5c9f793697949a3a6f6bfc53df85e7e9f6", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 8 19:20:14 2018
@author: nemec
"""
import numpy as np
from multiprocessing import Pool
#calculating the life time of the spots according to the choosen decay rate
def decay(spot_area,time,D):
t = spot_area/D +time
return t
#calculate th... | {"hexsha": "690be628bd23115d69407135a6241d8e5d043542", "size": 29569, "ext": "py", "lang": "Python", "max_stars_repo_path": "decay_spots.py", "max_stars_repo_name": "rtagirov/ff-sftm", "max_stars_repo_head_hexsha": "b899440c980ec827486b596f237279851f3be428", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
from __future__ import print_function, division
import sys
import time
from copy import copy, deepcopy
from os.path import join, exists
from collections import Counter
from math import log
import itertools
from datetime import datetime
import numpy as np
import matplotlib.pyplot as plt
from ikelos.data import Vocab... | {"hexsha": "d5641f1dada029af5abfd41574db3fc17c811bed", "size": 9434, "ext": "py", "lang": "Python", "max_stars_repo_path": "fergus/models/language_model/model.py", "max_stars_repo_name": "braingineer/neural_tree_grammar", "max_stars_repo_head_hexsha": "e0534b733e9a6815e97e9ab28434dae7b94a632f", "max_stars_repo_licenses... |
import control
import planning
import airsimneurips as asim
import numpy
import time
# Ideas:
# include drag:https://github.com/microsoft/AirSim/blob/18b36c7e3ea3d1e705c3938a7b8462d44bd81297/AirLib/include/vehicles/multirotor/MultiRotor.hpp#L191
# linear_drag_coefficient = 1.3f / 4.0f; air_density = 1.225f;
# Inclin... | {"hexsha": "66b964138f6402bc5c46f89a5baa622d8e09e10a", "size": 4832, "ext": "py", "lang": "Python", "max_stars_repo_path": "Daniel/test.py", "max_stars_repo_name": "JD-ETH/AirSimNeurIPS", "max_stars_repo_head_hexsha": "0eb80f12fe6e65c508418dfc208ab0029f6c7c87", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_co... |
from autograd import numpy as np
from sklearn.covariance import LedoitWolf
import warnings
class DensityEstimator:
def init(self, X):
pass
def fit(self, v, X):
"""
Fits density estimator to <v, X>
"""
raise Exception('DensityEstimator is an abstract class')
de... | {"hexsha": "6783a581e25b48e9f9a4fcd3cc08f028ccb25053", "size": 2705, "ext": "py", "lang": "Python", "max_stars_repo_path": "pmlm/densities.py", "max_stars_repo_name": "gmum/PMLM", "max_stars_repo_head_hexsha": "9a5912b3836a74ac06cc8b5e2eaaa38ea719c437", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_... |
import numpy as np
import keras.backend as K
import keras.layers as kl
import keras.losses as kloss
from concise.utils.helper import get_from_module
MASK_VALUE = -1
def mask_loss(loss, mask_value=MASK_VALUE):
"""Generates a new loss function that ignores values where `y_true == mask_value`.
# Arguments
... | {"hexsha": "5cf86ef0f10089428b11abb99aa1c806e79d40b5", "size": 4049, "ext": "py", "lang": "Python", "max_stars_repo_path": "concise/losses.py", "max_stars_repo_name": "gagneurlab/concise", "max_stars_repo_head_hexsha": "12078d75f37fe176bb7d221134b8b14aeb48e11f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 29... |
"""
poly2pm(PM; grade = k) -> P
Build a grade `k` matrix polynomial representation `P(λ)` from a polynomial matrix, polynomial vector or scalar polynomial `PM(λ)`.
`PM(λ)` is a matrix, vector or scalar of elements of the `Polynomial` type
provided by the [Polynomials](https://github.com/JuliaMath/Polynomi... | {"hexsha": "555e441697da9031ae61221fbdf011a9c9071989", "size": 45272, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/pmtools.jl", "max_stars_repo_name": "baggepinnen/MatrixPencils.jl", "max_stars_repo_head_hexsha": "c16b7415bd2765b452f29b6977bcc4f0566003a9", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
"""
The wntr.epanet.util module contains unit conversion utilities based on EPANET units.
.. rubric:: Contents
- :class:`~wntr.epanet.util.FlowUnits`
- :class:`~wntr.epanet.util.MassUnits`
- :class:`~wntr.epanet.util.QualParam`
- :class:`~wntr.epanet.util.HydParam`
- :meth:`to_si`
- :meth:`from_si`
- :class:`~Statist... | {"hexsha": "e0d831576c8e15884d70b75a2f8b274176d40678", "size": 38407, "ext": "py", "lang": "Python", "max_stars_repo_path": "wntr/epanet/util.py", "max_stars_repo_name": "xiamo311/AquaSCALE", "max_stars_repo_head_hexsha": "28968d1b349c2370d8c20bda5b6675270e4ab65d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star... |
C @(#)ickikk.f 20.3 2/13/96
function ickikk(kt,mt)
C
C THIS FUNCTION DETERMINES THE STATUS OF THE VARIABLE KT
C
C
C ICKIKK CONTROL
C ------ -------
C 0 KT NOT IN CONTROL SCHEME
C 1 V(KT)-->V(MT)
C 2 V(KT)<--V(MT)
... | {"hexsha": "f3211bd7a7956f654f65730a8ef5e51a49627fea", "size": 2186, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ipf/ickikk.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14, "... |
import gym
import numpy as np
import torch
import torch.optim as opt
from tqdm import tqdm
import gym_puzzle
from agent import Agent
# ハイパーパラメータ
HIDDEN_NUM = 128 # エージェントの隠れ層のニューロン数
EPISODE_NUM = 10000 # エピソードを何回行うか
MAX_STEPS = 1000 # 1エピソード内で最大何回行動するか
GAMMA = .99 # 時間割引率
env = gym.make('puzzle-v0')
agent = Age... | {"hexsha": "03060b863cfeaee84e9cee097d218bfbca7d1b50", "size": 1848, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "gpageinin/puzzle", "max_stars_repo_head_hexsha": "7aa12751bc0cb4d22aa91c2dd5b5fbc84ff65686", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st... |
# -*- coding: utf-8 -*-
"""
Module implementing MainWindow.
"""
import sys
#import numpy as np
from math import pi, atan, sqrt
#import matplotlib.pyplot as plt
from datetime import datetime
import matplotlib
matplotlib.use("Qt5Agg") # 声明使用QT5
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as Figur... | {"hexsha": "c28223a477ecf0fd060b047010bd783b570f0e47", "size": 6441, "ext": "py", "lang": "Python", "max_stars_repo_path": "\u8ba1\u7b97\u8ddd\u79bb\u3001\u65b9\u4f4d\u89d2/MainWindow.py", "max_stars_repo_name": "Antrovirens/learn-surveying-software-designing", "max_stars_repo_head_hexsha": "96b492510b3a3ac970675ddffb2... |
import sys # argv
import string
from collections import deque
import numpy as np
from heapdict import heapdict
with open(sys.argv[1]) as f:
grid = []
object_locs = {}
loc_objects = {}
for y,line in enumerate(f):
grid.append([])
for x,char in enumerate(line.strip()):
grid[-1... | {"hexsha": "a7d27795433654cde693d96e7895cf38aadbe622", "size": 2421, "ext": "py", "lang": "Python", "max_stars_repo_path": "18/first.py", "max_stars_repo_name": "qxzcode/aoc_2019", "max_stars_repo_head_hexsha": "5a6ae570d4ec62a1e05456b58562cb05d1c10f71", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max... |
"""
Copyright (c) Facebook, Inc. and its affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
"""
from collections import defaultdict
from pathlib import Path
import numpy as np
import pandas as pd
import pytorch_lightning as pl
import to... | {"hexsha": "7917f6741b8b0ee6a80b493b6092a86f6f044089", "size": 6592, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/mri_model.py", "max_stars_repo_name": "ygrepo/fastMRI", "max_stars_repo_head_hexsha": "cb9a2019f1833bfffe4969023113189abcbad0f7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
#!/usr/bin/env python
# coding: utf-8
# In[ ]:
# load tensorflow and keras
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import models, layers, optimizers, datasets
from tensorflow.keras.layers.experimental import preprocessing
from sklearn.preprocessing import StandardScaler
from sklea... | {"hexsha": "ae03abbedf68f2a766c471590291c5fc8d88103d", "size": 25373, "ext": "py", "lang": "Python", "max_stars_repo_path": "outlier/Simeval_model_final_SC.py", "max_stars_repo_name": "pharmpy/ml-devel", "max_stars_repo_head_hexsha": "6c97bd71b58aee0deac207fce41c3e001786e779", "max_stars_repo_licenses": ["BSD-2-Clause"... |
# -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,missing-docstring
"""
Visualization functions for measurement counts.
"""
from collections i... | {"hexsha": "6aac7fcf2596891fd4484d6d9ac3de0f1639b555", "size": 3423, "ext": "py", "lang": "Python", "max_stars_repo_path": "qiskit/tools/visualization/_counts_visualization.py", "max_stars_repo_name": "kifumi/qiskit-terra", "max_stars_repo_head_hexsha": "203fca6d694a18824a6b12cbabd3dd2c64dd12ae", "max_stars_repo_licens... |
using ABMExamples
using Test
using Statistics: mean
@testset "ABMExamples.jl" begin
@testset "SchellingsSegregation.jl" begin
schelling_data, schelling_filename = run_schelling_model!(20,"schelling")
@show mean(schelling_data.sum_mood)
@test mean(schelling_data.sum_mood) == 274.0
end
... | {"hexsha": "26e089e9255eaa69a1da623f2ffddfdf37d2d0b2", "size": 1270, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "codekomali/ABMExamples.jl", "max_stars_repo_head_hexsha": "0a297336198009345b837476c3f64bb1ab25d58d", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
#!/usr/bin/env python
# Title :loader.py
# Author :Venkatraman Narayanan, Bala Murali Manoghar, Vishnu Shashank Dorbala, Aniket Bera, Dinesh Manocha
# Copyright :"Copyright 2020, Proxemo project"
# Version :1.0
# License :"MIT"
# Maintainer :Venkatraman Narayanan, Bala Mura... | {"hexsha": "a45f4e8de8bcaa3a5d8a09528e835f05d66965d3", "size": 1652, "ext": "py", "lang": "Python", "max_stars_repo_path": "emotion_classification/utils/transform3DPose.py", "max_stars_repo_name": "vijay4313/proxemo", "max_stars_repo_head_hexsha": "98c4e2133047aa8519cc2f482b59565d9160e81a", "max_stars_repo_licenses": [... |
from os.path import dirname, exists, splitext, basename
from os import makedirs
from math import ceil, floor
from matplotlib import pyplot as plt
from math import log10
import warnings
import numpy as np
from matplotlib.colors import LogNorm
from traitlets import Dict, List, Unicode
from ctapipe.core import Tool, Compo... | {"hexsha": "addb58756edec3d4acd694750935fe076426120a", "size": 5527, "ext": "py", "lang": "Python", "max_stars_repo_path": "ctapipe/tools/plot_charge_resolution_variation_hist.py", "max_stars_repo_name": "orelgueta/ctapipe", "max_stars_repo_head_hexsha": "ee28440e83cc283ccd57428d5fdad764a1e786f0", "max_stars_repo_licen... |
# -*- coding: utf-8 -*-
import numpy as np
import numpy.ma as ma
import cv2
import tables
from tierpsy.analysis.compress.selectVideoReader import selectVideoReader
class BackgroundSubtractorBase():
def __init__(self,
video_file,
buff_size = -1,
frame_gap = -1,
... | {"hexsha": "b94d60a51265f3957856612cefde40bcdbfea3fd", "size": 11412, "ext": "py", "lang": "Python", "max_stars_repo_path": "tierpsy/analysis/compress/BackgroundSubtractor.py", "max_stars_repo_name": "saulmoore1/tierpsy-tracker", "max_stars_repo_head_hexsha": "69630c90de2e8a0b70168790f9c1198a0a644b3c", "max_stars_repo_... |
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import collections as cl
import json
from .util import *
class Waterbank():
def __init__(self, df, name, key):
self.T = len(df)
self.index = df.index
self.number_years = self.index.year[self.T - 1] -... | {"hexsha": "b5d7e9d00fcefd7d306bc7bb376f98e1f7cfc04c", "size": 12206, "ext": "py", "lang": "Python", "max_stars_repo_path": "Stochastic_engine/cord/waterbank.py", "max_stars_repo_name": "romulus97/HYDROWIRES", "max_stars_repo_head_hexsha": "115e534764d8f58d64340d99cf6cb8eb6598c4ee", "max_stars_repo_licenses": ["MIT"], ... |
from torch.utils.tensorboard import SummaryWriter
from PIL import Image
import numpy as np
writer = SummaryWriter("logs")
image_path = 'dataset/cat_vs_dog/train/cat/cat.0.jpg' # 图像目录
img_PIL = Image.open(image_path) # 打开图片文件(PILimage)
img_array = np.array(img_PIL) # 转成numpy格式
print(type(img_array))
prin... | {"hexsha": "3f6dd4e1ea4448019e402fbb40622136b86d5662", "size": 723, "ext": "py", "lang": "Python", "max_stars_repo_path": "note2_test_tb.py", "max_stars_repo_name": "AluminiumOxide/pytorch_base_-tutorial", "max_stars_repo_head_hexsha": "a6d3bea6070c7c774dcd7c55d94b0a1441548c8b", "max_stars_repo_licenses": ["Apache-2.0"... |
from __future__ import print_function
import os
import sys
import numpy as np
import torch
import networkx as nx
import random
from torch.autograd import Variable
from torch.nn.parameter import Parameter
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from tqdm import tqdm
sys.path.a... | {"hexsha": "8f5ffcd81ca7c649c2360ea671ee197cf7cac64d", "size": 5720, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/graph_attack/q_net.py", "max_stars_repo_name": "HenryKenlay/graph_adversarial_attack", "max_stars_repo_head_hexsha": "5282d1269aa637ecafb0af239c53fa8396e5ef66", "max_stars_repo_licenses": ["M... |
const PISpins = Matrix{Int16}
"""
generate a random spin configuration.
"""
rand_pispins(nsite::Int, ntau::Int) = rand([-Int16(1), Int16(1)], nsite, ntau)
"""
number of imaginary time slice.
"""
ntau(spins::PISpins) = size(spins, 2)
nsite(spins::PISpins) = size(spins, 1)
"""
flip!(spins::PISpins, i::Int, j::Int... | {"hexsha": "17918f19dc03c351fd2291a4cce2d48bda4e8d17", "size": 3919, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/PathIntegral.jl", "max_stars_repo_name": "JuliaTagBot/Pathintegral-QMC.jl", "max_stars_repo_head_hexsha": "9e59f93452e4f289094a6945fe8981480b08521e", "max_stars_repo_licenses": ["Apache-2.0"], ... |
(*
Title: Examples_Echelon_Form_IArrays.thy
Author: Jose Divasón <jose.divasonm at unirioja.es>
Author: Jesús Aransay <jesus-maria.aransay at unirioja.es>
*)
section\<open>Examples of computations using immutable arrays\<close>
theory Examples_Echelon_Form_IArrays
imports
Echelon_Form_Inv... | {"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Echelon_Form/Examples_Echelon_Form_IArrays.thy"} |
# --------------- AND Perceptron ---------------
import pandas as pd
# TODO: Set weight1, weight2, and bias
weight1 = 0.2
weight2 = 0.8
bias = -1.0
# DON'T CHANGE ANYTHING BELOW
# Inputs and outputs
test_inputs = [(0, 0), (0, 1), (1, 0), (1, 1)]
correct_outputs = [False, False, False, True]
outputs = []
# Generate ... | {"hexsha": "9b02743cbdde3c0d3d4bac56ac38d5e9f1fa9742", "size": 14533, "ext": "py", "lang": "Python", "max_stars_repo_path": "ai_notes.py", "max_stars_repo_name": "AlanACruz/aipnd-project", "max_stars_repo_head_hexsha": "e0d5dcb49865cced1a9e88f03adaf71f6d0bf1a6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
"""
glutils.py
Author: Mahesh Venkitachalam
Some OpenGL utilities.
"""
import OpenGL
from OpenGL.GL import *
from OpenGL.GL.shaders import *
import numpy, math
import numpy as np
from PIL import Image
def loadTexture(filename):
"""load OpenGL 2D texture from given image file"""
img = Image.open(filename) ... | {"hexsha": "34423d5acd7ef955213af563a2f64ea4d65d0233", "size": 4991, "ext": "py", "lang": "Python", "max_stars_repo_path": "common/glutils.py", "max_stars_repo_name": "mkvenkit/pp2e", "max_stars_repo_head_hexsha": "b74aafd0f1a61fbb919b2b5e22dcccba6a13a35d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
As concluded in Chapter \ref{ch:litReview}, with the rapid development of mobile devices and mobile computing, the literature review has showed the potential of combining different information sources, such as mobile sensors and social media, in a crowd monitoring approach. In our framework, the context data layer is d... | {"hexsha": "15eb2f28234e17665725fd8fd5dfb3984351f1fe", "size": 9122, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Trash/approach.tex", "max_stars_repo_name": "romyngo/mcm-thesis", "max_stars_repo_head_hexsha": "b216c2a0d0f51fb5ddf840ca03ced4a514f6e9a4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 27 17:27:33 2019
@author: zl
"""
import os
import argparse
import glob
import shutil
from collections import defaultdict
import tqdm
import numpy as np
import pandas as pd
from PIL import Image
import imagehash
def parse_args():
parser = argp... | {"hexsha": "06072997000089e1a3a908ab4df97ca891c46a15", "size": 1455, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/find_undownloaded_images.py", "max_stars_repo_name": "rosaann/kaggle-hpa", "max_stars_repo_head_hexsha": "b59ddd3232d01484dea446bedcee9dfe0f461bac", "max_stars_repo_licenses": ["BSD-2-Clause... |
'''MFCC.py
Calculation of MFCC coefficients from frequency-domain data
Adapted from the Vampy example plugin "PyMFCC" by Gyorgy Fazekas
http://code.soundsoftware.ac.uk/projects/vampy/repository/entry/Example%20VamPy%20plugins/PyMFCC.py
Centre for Digital Music, Queen Mary University of London.
Copyright (C) 2009 Gyo... | {"hexsha": "91da2a79e705bcc526b4fc7ba1c8fe38f7697b73", "size": 4187, "ext": "py", "lang": "Python", "max_stars_repo_path": "MFCC.py", "max_stars_repo_name": "Rutherford9191/audiolab", "max_stars_repo_head_hexsha": "f6d78d28a0be3ff77551b7f59f7113e74131f4e1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max... |
{-# OPTIONS --type-in-type #-}
module dyn where
open import prelude
open import functors
open import poly0 public
open import prelude.Stream
open Stream
open import Data.List as L using (List)
record Dyn : Set where
constructor dyn
field
{state} : Set
{body} : ∫
pheno : ∫[ (state , λ _ → state) , b... | {"hexsha": "6abec05927920494116a74f2bbdac76cf205df92", "size": 783, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "code-examples/agda/dyn.agda", "max_stars_repo_name": "mstone/poly", "max_stars_repo_head_hexsha": "425de958985aacbd3284d3057fe21fd682e315ea", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# -*- coding: utf-8 -*-
"""
Rast_bandArithmetic.py
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Genera... | {"hexsha": "7b84ebd6f0fa8752347508f8eea9725e29ac6f5b", "size": 10373, "ext": "py", "lang": "Python", "max_stars_repo_path": "processing_provider/Rast_bandArithmetic.py", "max_stars_repo_name": "geodourados/lftools", "max_stars_repo_head_hexsha": "4b9d703513bd3d49ac7952014575bf95492a2d90", "max_stars_repo_licenses": ["M... |
\subsubsection{Installation}
\begin{enumerate}
\item Download
\opt{iriverh10}{\url{http://download.rockbox.org/bootloader/iriver/H10_20GC.mi4}}
\opt{iriverh10_5gb}{
\begin{itemize}
\item \url{http://download.rockbox.org/bootloader/iriver/H10.mi4} if your \dap{} is UMS or
\item \url{http://dow... | {"hexsha": "38e780a1ca84e613cab3ee8be0e7ea9648f32cf5", "size": 1569, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "manual/getting_started/h10_install.tex", "max_stars_repo_name": "Rockbox-Chinese-Community/Rockbox-RCC", "max_stars_repo_head_hexsha": "a701aefe45f03ca391a8e2f1a6e3da1b8774b2f2", "max_stars_repo_lic... |
[STATEMENT]
theorem cp_thm:
assumes lp: "iszlfm p (a #bs)"
and u: "d_\<beta> p 1"
and d: "d_\<delta> p d"
and dp: "d > 0"
shows "(\<exists> (x::int). Ifm (real_of_int x #bs) p) = (\<exists> j\<in> {1.. d}. Ifm (real_of_int j #bs) (minusinf p) \<or> (\<exists> b \<in> set (\<beta> p). Ifm ((Inum (a#bs) b + rea... | {"llama_tokens": 6340, "file": null, "length": 30} |
/**
* @copyright Copyright 2016 The J-PET Framework Authors. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may find a copy of the License in the LICENCE file.
*
* Unless required by applicable la... | {"hexsha": "9f36f65bb87ff91c207dfd982be66ab571358f69", "size": 4528, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "JPetCommonTools/JPetCommonToolsTest.cpp", "max_stars_repo_name": "kamilrakoczy/j-pet-framework", "max_stars_repo_head_hexsha": "4a0761bc8996dd5076575e996003c11f4110db44", "max_stars_repo_licenses": ... |
\section{Introduction}
In evolving distributed simulations with complex
relational structures the computational work needs to
be evenly distributed throughout the simulation.
In many applications, this requires starting with balanced
partitions at the beginning of the simulation
as well as the continuous rebalancing... | {"hexsha": "db09880f5eafcf314ed33df0b24ce87fbfc40def", "size": 34016, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "sc17/paper/engparSC17-body.tex", "max_stars_repo_name": "SCOREC/EnGPar-Docs", "max_stars_repo_head_hexsha": "e99ac24b81842e2638f34420abce7cf981efbca1", "max_stars_repo_licenses": ["BSD-3-Clause"], ... |
# load tools
import os
import random
import numpy as np
from scipy.spatial import distance_matrix as distM
import math
import abc
from jmetal.core.problem import PermutationProblem
from jmetal.core.solution import PermutationSolution
import jmetal.algorithm.singleobjective as so
from jmetal.core.operator import Mutati... | {"hexsha": "2645249976f409ad42651034587f2ed58f495b34", "size": 13008, "ext": "py", "lang": "Python", "max_stars_repo_path": "TSP_util.py", "max_stars_repo_name": "comevussor/Metaheuristic-Optimization", "max_stars_repo_head_hexsha": "548b3c587e885aa0dacb9f6469b2d2142c6449bf", "max_stars_repo_licenses": ["MIT"], "max_st... |
% !TEX spellcheck = en_US
% !TEX encoding = UTF-8
\documentclass[a4paper, 12pt]{article}
\usepackage{graphicx}
\usepackage[tuenc]{fontspec}
\usepackage{xcolor}
\usepackage[hidelinks]{hyperref}
\usepackage{csquotes}
\usepackage[british]{babel}
\usepackage[backend=biber, sorting=none, dateabbrev=false]{biblatex}
\use... | {"hexsha": "fbf49c54a238476623052ae49ef42068b71670b5", "size": 1934, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "LATEX/GEP_deliverable/main.tex", "max_stars_repo_name": "jmigual/FIB-TFG", "max_stars_repo_head_hexsha": "7551a3c13a985ee7eecf7a4f38a6ee4803b05ff1", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
# import model
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
# import module to calculate model perfomance metrics
from sklearn import metrics
import pickle
import json... | {"hexsha": "266156740ce81bce75b148202246c897fb671516", "size": 4538, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/regression/linear_regression.py", "max_stars_repo_name": "joshluisaac/ml-project", "max_stars_repo_head_hexsha": "08b8d1b90510182fd8958509f11afbab1ef92850", "max_stars_repo_licenses": ["BSD-2-... |
[STATEMENT]
lemma empty_mult1 [simp]:
"({#}, {#a#}) \<in> mult1 R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. ({#}, {#a#}) \<in> mult1 R
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. ({#}, {#a#}) \<in> mult1 R
[PROOF STEP]
have "{#a#} = {#} + {#a#}"
[PROOF STATE]
proof (prove)
goal (1 ... | {"llama_tokens": 1076, "file": "Well_Quasi_Orders_Multiset_Extension", "length": 14} |
import os
from collections import Counter, defaultdict
import networkx
import requests
import json
from synonymes.mirnaID import miRNA, miRNAPART
from utils.cytoscape_grapher import CytoscapeGrapher
class DataBasePlotter:
@classmethod
def fetchSimple(cls, requestDict):
serverAddress = "https://turi... | {"hexsha": "a0c664ac92d001c360d7ccf90b30ca30c534873d", "size": 13563, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/textdb/makeNetworkView.py", "max_stars_repo_name": "mjoppich/miRExplore", "max_stars_repo_head_hexsha": "32760d88d65e7bc23b2bfb49415efcd0a7c7c5e1", "max_stars_repo_licenses": ["Apache-2.0"... |
"""
Collection of utility functions.
"""
import functools
from types import FunctionType
import numpy as np
import numba
import pandas as pd
from .functions import kww, kww_1e
from scipy.ndimage.filters import uniform_filter1d
from scipy.interpolate import interp1d
from scipy.optimize import curve_fit
from .logging ... | {"hexsha": "a6bfb510039cdf17e7ca6210a56a41572c026280", "size": 12338, "ext": "py", "lang": "Python", "max_stars_repo_path": "mdevaluate/utils.py", "max_stars_repo_name": "lheyer/mdevaluate", "max_stars_repo_head_hexsha": "990d9714b435d0d9cb8ff5a74533d78b0a5a1578", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars... |
import numpy as np
from typing import List
from .genome import Genome
def one_point_crossover(father: Genome, mother: Genome) -> List[Genome]:
"""Performs a one point crossover for parents
Arguments:
father {Genome} -- Parent one
mother {Genome} -- Parent two
Returns:
List[Genome]... | {"hexsha": "f8b7d5f7fcb27a337b2094b82490690472be9182", "size": 2765, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/genetic_algorithm/crossover.py", "max_stars_repo_name": "ahillbs/minimum_scan_cover", "max_stars_repo_head_hexsha": "e41718e5a8e0e3039d161800da70e56bd50a1b97", "max_stars_repo_licenses": ["MI... |
[STATEMENT]
lemma simple_path_eq_arc: "pathfinish g \<noteq> pathstart g \<Longrightarrow> (simple_path g = arc g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. pathfinish g \<noteq> pathstart g \<Longrightarrow> simple_path g = arc g
[PROOF STEP]
by (simp add: arc_simple_path) | {"llama_tokens": 103, "file": null, "length": 1} |
import numpy as np
from scipy import misc
from PIL import Image
import pickle
import cv2
IMAGE_SIZE = 28
def images_to_sprite(data):
"""
Creates the sprite image
Parameters
----------
data: [batch_size, height, weight, n_channel]
Returns
-------
data: Sprited image::[height, w... | {"hexsha": "e5565eab261b8ec19595ad5cd4f35a274567a9d5", "size": 1799, "ext": "py", "lang": "Python", "max_stars_repo_path": "sprite_image.py", "max_stars_repo_name": "hoanganhpham1006/face-detector-Visualize", "max_stars_repo_head_hexsha": "8bf4009768516f138221ed510560d9a3349544d6", "max_stars_repo_licenses": ["MIT"], "... |
from __future__ import absolute_import, division, print_function
import numpy as np
import tensorflow as tf
import tensorlayer as tl
import tensorflow_fold as td
from tensorflow import convert_to_tensor as to_T
from models_shapes import nmn3_seq
from models_shapes import nmn3_assembler
from models_shapes.nmn3_modules... | {"hexsha": "12b5072e651e26a10e10bbcdb9c78532a470ec29", "size": 3102, "ext": "py", "lang": "Python", "max_stars_repo_path": "n2nmn-tensorlayer/models_shapes/nmn3_model.py", "max_stars_repo_name": "jiaqi-xi/Neural-Module-Networks.Tensorlayer", "max_stars_repo_head_hexsha": "3607e6717473aed51c653cf931dc7d80866b0227", "max... |
# -*- coding: utf-8 -*-
"""
Created on Sat May 2 15:40:44 2015
@author: poldrack
"""
import os,glob
import urllib
import numpy
def dequote_string(l):
if l.find('"')<0:
return l
in_quotes=False
l_dequoted=[]
for c in l:
if c=='"' and in_quotes:
in_quotes=False
elif... | {"hexsha": "e54051f582fa55e88a659af8a753d77f0b35b13b", "size": 2655, "ext": "py", "lang": "Python", "max_stars_repo_path": "myconnectome/utils/load_dataframe.py", "max_stars_repo_name": "poldrack/myconnectome", "max_stars_repo_head_hexsha": "201f414b3165894d6fe0be0677c8a58f6d161948", "max_stars_repo_licenses": ["MIT"],... |
import argparse
import torch
# pip install --upgrade torchvision (Run this after installing torch)
import torchvision
from torchvision.transforms import functional as F
import numpy as np
import os
import time
import torch.nn.parallel
from contextlib import suppress
from non_max_suppression import calculate_iou_on_labe... | {"hexsha": "07cac21651ed0f2056895301401fd5f2dc099c0a", "size": 9736, "ext": "py", "lang": "Python", "max_stars_repo_path": "inference_device.py", "max_stars_repo_name": "SarthakJaingit/Visually-Impaired-Food-Device-Aid-", "max_stars_repo_head_hexsha": "592745a5ce78616fb5999b5b4f73820eeb27adaa", "max_stars_repo_licenses... |
from abc import ABCMeta
from torch.utils.data import Dataset
import json
import numpy as np
import os
from PIL import Image
class VideoDataset(Dataset):
__metaclass__ = ABCMeta
def __init__(self, *args, **kwargs):
"""
Args:
json_path: Path to the directory containing the datase... | {"hexsha": "a159b251d3ebda713c6dfb0c1f22bad28d7848ef", "size": 12642, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/abstract_datasets.py", "max_stars_repo_name": "MichiganCOG/ViP", "max_stars_repo_head_hexsha": "74776f2575bd5339ba39c784bbda4f04cc859add", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
[STATEMENT]
lemma hlit_of_flit_bij: "bij_betw hlit_of_flit {l. ground\<^sub>l l} UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. bij_betw hlit_of_flit {l. ground\<^sub>l l} UNIV
[PROOF STEP]
unfolding bij_betw_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. inj_on hlit_of_flit {l. ground\<^sub>l l} \<and>... | {"llama_tokens": 1193, "file": "Resolution_FOL_TermsAndLiterals", "length": 13} |
!*robodoc*f* ca_hx/ca_hx_mpi
! NAME
! ca_hx_mpi
! SYNOPSIS
!$Id: ca_hx_mpi.f90 528 2018-03-26 09:02:14Z mexas $
submodule ( ca_hx ) ca_hx_mpi
! DESCRIPTION
! Submodule of module ca_hx with MPI related routines.
! To aid portability, the module works only with default integer
! kind, i.e. MPI_integer. ... | {"hexsha": "eedb7720702eb322faca3ee74a6edeb93ee56720", "size": 29766, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "ca_hx_mpi.f90", "max_stars_repo_name": "lcebaman/casup", "max_stars_repo_head_hexsha": "240f25f07d8ea713b9fbed9814d0ac56d0141f86", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count"... |
"""
generate_data.py
Core script for generating training/test addition data. First, generates random pairs of numbers,
then steps through an execution trace, computing the exact order of subroutines that need to be
called.
"""
import pickle
import numpy as np
from tasks.bubblesort.env.trace import Trace
def genera... | {"hexsha": "791c5584bdea83569d14ab960720f73311191e1f", "size": 1072, "ext": "py", "lang": "Python", "max_stars_repo_path": "tasks/bubblesort/env/generate_data.py", "max_stars_repo_name": "ford-core-ai/neural-programming-architectures", "max_stars_repo_head_hexsha": "66320b8ba64dc978a34b1df0c1357efd104cec27", "max_stars... |
import io
import os.path as osp
import os
from unittest import TestCase
import shutil
import tempfile
import numpy as np
from pylinac.log_analyzer import MachineLogs, TreatmentType, \
anonymize, TrajectoryLog, Dynalog, load_log, DynalogMatchError, NotADynalogError, NotALogError
from tests_basic.utils import save_... | {"hexsha": "13b09ddd193b1f02e71c369fb1559b2d1018a055", "size": 24232, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests_basic/test_logs.py", "max_stars_repo_name": "mitcgs/pylinac", "max_stars_repo_head_hexsha": "e36a531b2db72f7d2bd0a754125c6c92ae60e8e8", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
# -*- coding: utf-8 -*-
# Copyright (c) 2021, TEAMPRO and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
# import numpy as np
from datetime import timedelta,datetime
from frappe.utils import cint, getdate, ... | {"hexsha": "1cafba617448a95087e91ecb08987c6976426403", "size": 1717, "ext": "py", "lang": "Python", "max_stars_repo_path": "thaisummit/thaisummit/doctype/tag_master/tag_master.py", "max_stars_repo_name": "thispl/thaisummit", "max_stars_repo_head_hexsha": "697a43068a87916dedf1e8de10249152a9fd2735", "max_stars_repo_licen... |
import numpy as np
from mne.utils import logger
class searchlight:
"""Generate indices for searchlight patches.
Generates a sequence of tuples that can be used to index a data array.
Depending on the spatial and temporal radius, each tuple extracts a
searchlight patch along time, space or both.
... | {"hexsha": "be3b64dec94886b81b5f974cfe8fa458757c8bfc", "size": 13402, "ext": "py", "lang": "Python", "max_stars_repo_path": "mne_rsa/searchlight.py", "max_stars_repo_name": "Yuan-fang/mne-rsa", "max_stars_repo_head_hexsha": "c1638fa985e13cf5729eb9ef8f3caaaa3f5b0b23", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st... |
import numpy as np
import pandas as pd
from sklearn.linear_model import LogisticRegression, LinearRegression
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier
from sklearn.svm import SVC
import json
import requests
from sklearn.preprocessing import OneHotEncoder
fro... | {"hexsha": "3c0dfa4f69e0a7a55d7e3c60860076998c59bac1", "size": 12773, "ext": "py", "lang": "Python", "max_stars_repo_path": "challenge/agoda_cancellation_prediction.py", "max_stars_repo_name": "ItamarLevine/IML.HUJI", "max_stars_repo_head_hexsha": "9949a10f86083435ae427ef65d3f9c9ee6f3fedf", "max_stars_repo_licenses": [... |
import pandas as pd
from scipy.sparse import hstack
from sklearn.externals import joblib
import os
# use this to change to this folder, since this might be run from anywhere in project...
from definitions import ML_PATH
# https://stackoverflow.com/questions/431684/how-do-i-change-directory-cd-in-python/13197763#1319... | {"hexsha": "5d93fb3a369e4ab80641e2c322aee5ec5aa685bb", "size": 5553, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mappening/ml/autocategorization.py", "max_stars_repo_name": "ucladevx/Bmaps-Backend", "max_stars_repo_head_hexsha": "8dcbb4ca98d183499e03429b944ec0c7865065a6", "max_stars_repo_licenses": ["MIT... |
import pickle
import gzip
import numpy as np
from keras.datasets import mnist
from svm_classification import svm_classify
from models import create_model
from keras.optimizers import Adam
from objectives import lda_loss
if __name__ == '__main__':
save_to = './new_features.gz'
outdim_size = 10
epoch_num =... | {"hexsha": "369bd2e99b39d26784057ad84d429baff08da6e4", "size": 1584, "ext": "py", "lang": "Python", "max_stars_repo_path": "Groups/Group_ID_20/MvLDAN/DeepLDA.py", "max_stars_repo_name": "sonaldangi12/DataScience", "max_stars_repo_head_hexsha": "3d7cd529a96f37c2ef179ee408e2c6d8744d746a", "max_stars_repo_licenses": ["MIT... |
!* 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
! OpenMP Parallel Region
! parallel private subroutine call
program p
parameter(n=10)
integer result(n)
integer e... | {"hexsha": "616ba054221f625a7873e8df4d296dc02cc9760f", "size": 867, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "test/mp_correct/src/par11.f", "max_stars_repo_name": "abrahamtovarmob/flang", "max_stars_repo_head_hexsha": "bcd84b29df046b6d6574f0bfa34ea5059092615a", "max_stars_repo_licenses": ["Apache-2.0"], "m... |
export proper_divisors, is_abundant
is_abundant(n) = begin
sum(proper_divisors(n)) > n
end
| {"hexsha": "4ca7f5ed5e217d6eb522d75cb5dc21a27d79647b", "size": 98, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/abundant-numbers.jl", "max_stars_repo_name": "JuliaTagBot/ProjectEulerUtil.jl-1", "max_stars_repo_head_hexsha": "efbf29a9e1297cb95f81028d2c5d6dfa255d985e", "max_stars_repo_licenses": ["MIT"], "ma... |
import numpy as np
import torch
from cogdl.datasets import build_dataset_from_name
from cogdl.utils import get_degrees
class Test_Data(object):
def setup_class(self):
self.dataset = build_dataset_from_name("cora")
self.data = self.dataset[0]
self.num_nodes = self.data.num_nodes
se... | {"hexsha": "78d5ca0a24e03ec86ed09b600d2ae1f506fc47df", "size": 1869, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/datasets/test_data.py", "max_stars_repo_name": "cenyk1230/cogdl", "max_stars_repo_head_hexsha": "fa1f74d5c3a15b5a52abfc7cd3f04dce4b7dbcce", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import numpy as np
class PSCMRecovery:
def __init__(self, w=None, a=None, b=None, alpha=1e-10):
self.a_true = a # True adjacency matrix (for checking satisfiability)
self.b = b # True exogenous connection matrix (for checking satisfiability)
if w is None:
self.w = np... | {"hexsha": "4e7611616e71306db8323bd6ffa8a64cb2ea214d", "size": 5679, "ext": "py", "lang": "Python", "max_stars_repo_path": "PSCM.py", "max_stars_repo_name": "Yuqin-Yang/propagation-scm", "max_stars_repo_head_hexsha": "7374866e35fa462d59aa8f7431706f5f003990b7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
#!/usr/bin/env python
u"""
histograms.py
by Yara Mohajerani (Last Update 11/2018)
Forked from CNNvsSobelHistogram.py by Michael Wood
find path of least resistance through an image and quantify errors
Update History
11/2018 - Forked from CNNvsSobelHistogram.py
Add option for manual comparison
... | {"hexsha": "717195cdc4c8356ce779ba76f8e33a5fc166d609", "size": 16516, "ext": "py", "lang": "Python", "max_stars_repo_path": "histograms.py", "max_stars_repo_name": "yaramohajerani/FrontLearning", "max_stars_repo_head_hexsha": "70f0e4c2991ff5ba585e20fbc6aa9e7b82ca312c", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
function [ center, eccent, parity ] = tree_arc_center ( nnode, inode, jnode )
%*****************************************************************************80
%
%% TREE_ARC_CENTER computes the center, eccentricity, and parity of a tree.
%
% Discussion:
%
% A tree is an undirected graph of N nodes, which uses N-1 e... | {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/treepack/tree_arc_center.m"} |
using Base: Float64
"""
File with definitions of functions for structural analysis of aircraft configurations using beam elements
"""
Fmax = 1e15
"""
Get elasticity matrix for a single beam
"""
beam_get_K(
L::Fg,
EA::Fg,
GJ::Fg,
EIy::Fg,
EIz::Fg
) where {Fg <: Real} = - Fg[
(EA / L) 0.0 0.0 0.0 0.0 0.0 (- EA / ... | {"hexsha": "f5add9eb402e0884fc4f092b152bc35fe6378b62", "size": 1444, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/StructuralAnalysis.jl", "max_stars_repo_name": "Equipe-AeroDesign-ITA/WingBiology", "max_stars_repo_head_hexsha": "9d5d0cb5beaf564cd7fa51a2c02677b32609b7f0", "max_stars_repo_licenses": ["MIT"],... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.