text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
from nltk.collocations import *
import nltk
import os
from sklearn.feature_extraction.text import TfidfVectorizer
from nltk.stem import WordNetLemmatizer
from nltk.stem.porter import *
import numpy as np
doc_dir = "/Users/fenyiye/Documents/uiuc/sem2/CS410/BioNLP-ST_2011_genia_train_data_rev1/"
files = os.listdir(doc_d... | {"hexsha": "5ef4b2db391bbaa32c34dabf59e8986a97146dec", "size": 2257, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/filtering.py", "max_stars_repo_name": "gisney-land/410_corpus_analysis", "max_stars_repo_head_hexsha": "62c831cd44b5015021d8298dcac4e3d63a37cb79", "max_stars_repo_licenses": ["MIT"], "max_st... |
*DECK GAMMA
FUNCTION GAMMA (X)
C***BEGIN PROLOGUE GAMMA
C***PURPOSE Compute the complete Gamma function.
C***LIBRARY SLATEC (FNLIB)
C***CATEGORY C7A
C***TYPE SINGLE PRECISION (GAMMA-S, DGAMMA-D, CGAMMA-C)
C***KEYWORDS COMPLETE GAMMA FUNCTION, FNLIB, SPECIAL FUNCTIONS
C***AUTHOR Fullerton, W., (LANL)
C... | {"hexsha": "afcec90675fca4037f6061fd33b84fca2252d87e", "size": 4536, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "slatec/src/gamma.f", "max_stars_repo_name": "andremirt/v_cond", "max_stars_repo_head_hexsha": "6b5c364d7cd4243686488b2bd4318be3927e07ea", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count... |
""" generation of images interactively with ui control """
import os
from pathlib import Path
import glob
import sys
import PIL
from PIL import Image
import json
import numpy as np
import pickle
import tensorflow as tf
import cv2
import base64
import src.tl_gan.feature_axis as feature_axis
def gen_image(gender,race,... | {"hexsha": "70655c88c3b3c7d5a6235b6b47f0515dec3469ed", "size": 4845, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tl_gan/script_generation_interactive.py", "max_stars_repo_name": "Asap7772/DeepCriminalize", "max_stars_repo_head_hexsha": "c171c6ce6e87e126e6e2b0ed1d9709ee7d0ce667", "max_stars_repo_licenses"... |
import os
import warnings
import lazy_import
import torch
from sympy.utilities.exceptions import SymPyDeprecationWarning
import numpy as np
import platform
# Ignore an annoying warning printed when we import triton
warnings.simplefilter("ignore", SymPyDeprecationWarning)
def make_power_of_two(x):
return int(2 *... | {"hexsha": "26d9be363028fa5968970a65772dba710563501a", "size": 5489, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/examples/example-ops/softmax_xent/softmax_xent.py", "max_stars_repo_name": "jareddk/triton", "max_stars_repo_head_hexsha": "ea03d6207728315312d9cb6fa014f6a394b79c71", "max_stars_repo_licens... |
import numpy as np
import os.path as osp
import torchvision.transforms as transforms
from cvpods.configs.base_classification_config import BaseClassificationConfig
_config_dict = dict(
MODEL=dict(
WEIGHTS="",
PIXEL_MEAN=[0.5, 0.5, 0.5], # BGR
PIXEL_STD=[0.5, 0.5, 0.5],
AS_PRETRAIN... | {"hexsha": "f4d45d38fa565289b4888b396da655a4e35c4a40", "size": 2004, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/classification/svhn.scratch.stl10.96size.150e.v3/config.py", "max_stars_repo_name": "poodarchu/SelfSup", "max_stars_repo_head_hexsha": "29f7d338bef20f927bb0898f2c98da4f14b60ab1", "max_sta... |
'''
Author:
Arpit Parwal <aparwal@usc.edu>
Yeon-soo Park <yeonsoop@usc.edu>
Vanessa Tan <tanvanes@usc.edu>
Sudeeptha Mouni Ganji <sganji@usc.edu>
'''
import pandas as pd
import numpy as np
import plotly.subplots as tls
import plotly.graph_objs as go
import plotly
from sklearn.cluster import KMean... | {"hexsha": "9c7184ea4f14b1105a387660f80ac8261b4fec60", "size": 9666, "ext": "py", "lang": "Python", "max_stars_repo_path": "GMM.py", "max_stars_repo_name": "appielife/ML-ClusteringCountriesOnCovid19Risk", "max_stars_repo_head_hexsha": "c05a782698f290f635dbb9b88ca93f31a83c62b2", "max_stars_repo_licenses": ["MIT"], "max_... |
[STATEMENT]
lemma lemLineContainsEndpoint:
shows "inLine q (line joining p to q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. inLine q line joining p to q
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. inLine q line joining p to q
[PROOF STEP]
define linePQ where "linePQ = line joinin... | {"llama_tokens": 1253, "file": "No_FTL_observers_SpaceTime", "length": 17} |
import pandas as pd
import re
from nltk.corpus import stopwords
from gensim.models import KeyedVectors
import numpy as np
from keras.layers import Embedding
import os
import src.util.pickle_rick as pickle_rick
# %%
# load training and test data sets
train_df = pd.read_csv('data/train_data.csv')
test_df = pd.read_csv(... | {"hexsha": "e717dba7731b986653ca91d30b1e49df6d56e52a", "size": 4204, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Cleaner_Maaike.py", "max_stars_repo_name": "marc1404/quora-question-pairs", "max_stars_repo_head_hexsha": "f38acbf0c4a673ced1101b250d4b4837910eb2a2", "max_stars_repo_licenses": ["MIT"], "max_s... |
import logging
import multiprocessing
import numpy as np
from gunpowder.array import Array
from gunpowder.batch import Batch
from gunpowder.coordinate import Coordinate
from gunpowder.points import Points
from gunpowder.producer_pool import ProducerPool
from gunpowder.roi import Roi
from .batch_filter import BatchFilte... | {"hexsha": "17afdba93b8c0cc44b4aee02beb6f500db90499c", "size": 14180, "ext": "py", "lang": "Python", "max_stars_repo_path": "gunpowder/nodes/scan.py", "max_stars_repo_name": "riels89/gunpowder", "max_stars_repo_head_hexsha": "e523b49ca846a9fd46ab6fc0dd1040cc4a4d53b4", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
module Commons.Test.Unit.Lexer
import Text.PrettyPrint.WL
import Text.Lexer
%default total
%access export
data TestReport : Type -> Type where
ExpectedSuccess : (title : String) -> TestReport a
Failure : (Eq a, Show a)
=> (title : String)
-> (input : String)
-> (lexed : List (TokenDa... | {"hexsha": "d857c1be14a30332e6f1afadc65681a8346a5ea1", "size": 3100, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "Commons/Test/Unit/Lexer.idr", "max_stars_repo_name": "jfdm/idris-common", "max_stars_repo_head_hexsha": "df32dc33c253709751fe0f9f2b57cd5d497eccd4", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma... |
import numpy as np
import openmdao.api as om
import numpy as np
import os
import yaml
import raft
from raft.omdao_raft import RAFT_OMDAO
from common import check, test
# -----------------------------------
# OMDAO
# -----------------------------------
w = np.arange(0.05, 5, 0.05) # frequency range (to be set by mode... | {"hexsha": "142bc6b1d0a4395e7921d607b757c79661e08c30", "size": 6611, "ext": "py", "lang": "Python", "max_stars_repo_path": "RAFT/tests/test_omdao_OC3spar.py", "max_stars_repo_name": "ptrbortolotti/WEIS", "max_stars_repo_head_hexsha": "1e4dbf6728050f75cee08cd483fe57c5614488fe", "max_stars_repo_licenses": ["Apache-2.0"],... |
from scipy import stats
from scipy.io import arff
import pandas as pd
from tqdm import tqdm
###################################
# Entropy Of Each Feature
###################################
data = arff.loadarff('Training Dataset original.arff')
df = pd.DataFrame(data[0])
df.head()
dictionary = {}
SF = 40... | {"hexsha": "d09da7a3780bfc73ea486900b64786877b117016", "size": 683, "ext": "py", "lang": "Python", "max_stars_repo_path": "EntropyCal.py", "max_stars_repo_name": "NazaninBayati/information-theory", "max_stars_repo_head_hexsha": "aa3dbf8156165ad7671fbff995e29dbc58b72343", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
"""
Mixing time estimation
This is a complementary experiment to the GSIS experiment on 10.06.2021
Mixing of two colored solutions with concentration ratio Low:High=1:6 was
sampled onto the 96 well plate. During this, the system previously, had been
filled with Low solution, was perfused with High solution at flow ... | {"hexsha": "340c36749f0515e44c37b8fcd7f7f65ac62c4a02", "size": 4291, "ext": "py", "lang": "Python", "max_stars_repo_path": "GSIS experiment 10.06.2021/mixing gradient.py", "max_stars_repo_name": "leonpliner/PhD", "max_stars_repo_head_hexsha": "06319fbcfa15c586b7315a900f0e199d47974f7e", "max_stars_repo_licenses": ["Apac... |
"""
Kernels
"""
import numba
import numpy as np
M_INV_4PI = 1.0 / (4*np.pi)
ZERO = 0
###############################################################################
# Laplace #
#######################################################################... | {"hexsha": "567312a9365474c477827f5d9952cdb8fa5ada48", "size": 7775, "ext": "py", "lang": "Python", "max_stars_repo_path": "fmm/kernel.py", "max_stars_repo_name": "exafmm/pyexafmm", "max_stars_repo_head_hexsha": "8a58a79ee687dc27fdcae034a96120dd4681cff6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": ... |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
# @gyleodhis=====gyleodhis@outlook.com=====
import numpy as np
# np.__version__ Checks numpy vesion
# Generate an array of 10 random integers less than 100
rand = np.random.RandomState(42)
x = rand.randint(100, size=10)
x
# Remember that unlike Python lists, NumPy i... | {"hexsha": "0d52c155e2125525f0fa893b31ad7f0083055d0b", "size": 13562, "ext": "py", "lang": "Python", "max_stars_repo_path": "Numpy/NumpyCheatSheet (V 0.0.1).py", "max_stars_repo_name": "gyleodhis/My-Data-Science-Devops", "max_stars_repo_head_hexsha": "42602ae2fe291566a5cabe40c04f6554edab255d", "max_stars_repo_licenses"... |
import time
import math
import networkx as nx
from bindings import *
from geometry_utils import collision_detection
from geometry_utils import display_arrangement
# Epsilon for approximated offset
EPS = 0.0001
def generate_path_disc(robots, obstacles, disc_obstacles, destinations, argument, writer, isRunning):
... | {"hexsha": "d65acd9b1b5c7bf98609595add4cca278328f830", "size": 11577, "ext": "py", "lang": "Python", "max_stars_repo_path": "multi_robot_motion_planning/DiscoPygal/mrmp/solvers/exact_single_disc.py", "max_stars_repo_name": "galmw/AlgorithmicRobotics", "max_stars_repo_head_hexsha": "1a616a911e74fa965f34075bc2fc683876e1a... |
[STATEMENT]
lemma reduce_nested_mpoly_prod:
fixes p1::"'a::comm_ring_1 mpoly mpoly"
shows "reduce_nested_mpoly (p1 * p2) = reduce_nested_mpoly p1 * reduce_nested_mpoly p2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. reduce_nested_mpoly (p1 * p2) = reduce_nested_mpoly p1 * reduce_nested_mpoly p2
[PROOF STEP]
by (s... | {"llama_tokens": 153, "file": "Polynomials_More_MPoly_Type", "length": 1} |
```julia
ENV["GKS_ENCODING"] = "utf-8"
using JLD
using Plots
include("/home/julian/Hamburg/LadderDGA/run.jl");
```
# Improved Sums
## Motivation
Our goal is to find a good surrogate for the sum over infinitely many Matsubara frequencies, i.e. $\lim_{N \rightarrow \infty}\sum_{i\nu_{-N}}^{i\nu_{N}} f(\nu) \longrighta... | {"hexsha": "6a809b2036b3ed0b5ed8088bebdce4b15519b1f5", "size": 704334, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "notebooks/Sums Overview.ipynb", "max_stars_repo_name": "Atomtomate/LadderDGA.jl", "max_stars_repo_head_hexsha": "8cd39fe2ae2aa1130bff706171266d3cf2d4c8e7", "max_stars_repo_licenses"... |
"""
BSD 3-Clause License
Copyright (c) 2018, Jerrad Genson
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of condit... | {"hexsha": "be3f4588e1bc5a2aa1b39d373fc7a5535c411ae4", "size": 4737, "ext": "py", "lang": "Python", "max_stars_repo_path": "learners/learner.py", "max_stars_repo_name": "jerradgenson/rapid-learn", "max_stars_repo_head_hexsha": "78d5330e147bf879c3a3de3402dadd35d9a765e1", "max_stars_repo_licenses": ["BSD-3-Clause"], "max... |
from sklearn.linear_model import LogisticRegression
from sklearn import svm
from sklearn.model_selection import KFold
import datasetReader
import randomized_greedy
import scoring_functions
from data import Data, Samples
from utils import build_accuracy_graph
import numpy as np
import pickle
import matplotlib.pyplot as... | {"hexsha": "5563717a6dbd23b8a133cb2aebfd3df3fe7d5180", "size": 2096, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments.py", "max_stars_repo_name": "elad-tolo/feature-selection", "max_stars_repo_head_hexsha": "74fe4c76a5fbc97225693d5d9db4f5a9ff7df713", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
#!/usr/bin/env python
# coding: utf-8
import numpy as np
import landmark_localization.sub_def_variable as sd_variable
from landmark_localization.sub_def_variable import sd_var
from functools import cmp_to_key
class sd_mi(object):
'''
do_norm is False means that you are super sure that vars are already normiliz... | {"hexsha": "ef9250f30faaacb4ae791df6179b0b87a0d06064", "size": 29729, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/landmark_localization/sub_def_multi_interval.py", "max_stars_repo_name": "MoscowskyAnton/landmark_localization", "max_stars_repo_head_hexsha": "ae054cee98ac6d02576a11efbc20af8bb3a91e6c", "max... |
[STATEMENT]
lemma matrix_to_iarray_mult_columns[code_unfold]:
fixes A::"'a::{semiring_1}^'columns::{mod_type}^'rows::{mod_type}"
shows "matrix_to_iarray (mult_column A i q) = mult_column_iarray (matrix_to_iarray A) (to_nat i) q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. matrix_to_iarray (mult_column A i q) ... | {"llama_tokens": 853, "file": "QR_Decomposition_Matrix_To_IArray_QR", "length": 4} |
import pickle
import time
import numpy as np
vocab2idx = {"<UNK>":0}
vocab_objects = []
vocab_relations = []
vocab_attributes = []
idx2vocab = ["<UNK>"]
init_len = len(idx2vocab)
vocab_len = init_len
not_in = 0
print("load: sg")
tic = time.time()
sgg_algo = 'scarlett_butd'
dataset = 'butd_vg_vrrvg'
#pwd = '/data/pro... | {"hexsha": "8a7eea57b61579d0642a1ed20ccd1f0777f28916", "size": 2389, "ext": "py", "lang": "Python", "max_stars_repo_path": "set_vocab.py", "max_stars_repo_name": "babymind-project/alvr-ESA", "max_stars_repo_head_hexsha": "2e89069b03b97fd19706f1179c63e3068b853343", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
[STATEMENT]
lemma "\<turnstile> \<lbrace>\<acute>M = \<acute>N\<rbrace> \<acute>M := \<acute>M + 1 \<lbrace>\<acute>M \<noteq> \<acute>N\<rbrace>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<turnstile> \<lbrace>\<acute>M = \<acute>N\<rbrace> \<acute>M := \<acute>M + 1 \<lbrace>\<acute>M \<noteq> \<acute>N\<rbra... | {"llama_tokens": 159, "file": null, "length": 1} |
/*!
@file
Defines concepts from the Standard library.
@copyright Louis Dionne 2013-2016
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_DETAIL_CONCEPTS_HPP
#define BOOST_HANA_DETAIL_CONCEPTS_HPP
#include ... | {"hexsha": "a3095f5377ce1e533daa89c6aee68419d85c62b6", "size": 2983, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "depends/boost/hana/detail/concepts.hpp", "max_stars_repo_name": "mistydew/RSSearch", "max_stars_repo_head_hexsha": "52e597aeb495fe35f2f6069741ef19c9d0bfe2bb", "max_stars_repo_licenses": ["MIT"], "ma... |
%-------------------------
% Resume in Latex
% Author : David Ashworth
% License : MIT
%------------------------
\documentclass[letterpaper,11pt]{article}
\usepackage{latexsym}
\usepackage[empty]{fullpage}
\usepackage{titlesec}
\usepackage{marvosym}
\usepackage[usenames,dvipsnames]{color}
\usepackage{verb... | {"hexsha": "848eaf3dbca23077434f84a868e20fea09899529", "size": 7243, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "resume.tex", "max_stars_repo_name": "daveashworth/resume", "max_stars_repo_head_hexsha": "51bc6fbc17faf75692f3e35ab3705ae37e20c0a0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max... |
"""This script runs standard NLP Preprocessing on the given unclean dataset from Params"""
from __future__ import absolute_import, division, print_function, unicode_literals
import argparse
import tensorflow as tf
import pandas as pd
import numpy as np
import string
from tqdm import tqdm
from tqdm.gui import tqdm as ... | {"hexsha": "59925c1167d1cc7b411ba9efe65cb5a2cbbe2a52", "size": 5870, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/preprocess/hierarchical_attention/clean_dataset.py", "max_stars_repo_name": "kmanchel/BiasNet", "max_stars_repo_head_hexsha": "caef2e4f7db0a64ae528b5428a7123b3061481d2", "max_stars_repo_licens... |
//
// @author Vicente Adolfo Bolea Sanchez
// @brief Settings impl using boost library.
//
// Includes {{{
#define BOOST_SPIRIT_THREADSAFE
#include "settings.hh"
#include <iostream>
#include <vector>
#include <sstream>
#include <map>
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/... | {"hexsha": "720299ef911db99e38a02980715ba29152e19d18", "size": 5633, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/common/settings.cc", "max_stars_repo_name": "zzunny97/Graduate-Velox", "max_stars_repo_head_hexsha": "d820e7c8cee52f22d7cd9027623bd82ca59733ca", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
(* Author: Lukas Bulwahn <lukas.bulwahn-at-gmail.com> *)
section \<open>Number Partitions\<close>
theory Number_Partition
imports Additions_to_Main
begin
subsection \<open>Number Partitions as @{typ "nat => nat"} Functions\<close>
definition partitions :: "(nat \<Rightarrow> nat) \<Rightarrow> nat \<Rightarrow> bo... | {"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/Card_Number_Partitions/Number_Partition.thy"} |
"""
========
Barchart
========
A bar plot with errorbars and height labels on individual bars.
"""
import numpy as np
import matplotlib.pyplot as plt
from bar_inc import *
import sys
pwd=sys.argv[1]
ind = np.arange(len(unambiguous_peptides)) # the x locations for the groups
width = 0.35 # the width of the bars
fi... | {"hexsha": "c380616dc55f83754dcc6bba68d7effa18d92746", "size": 1786, "ext": "py", "lang": "Python", "max_stars_repo_path": "PTM-Pro2.0/barchart.py", "max_stars_repo_name": "arunhpatil/PTM-Pro", "max_stars_repo_head_hexsha": "c5d4447d4cd5f825a5dea525fe55af9629027cda", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
/**
* \file
* The most simple example.
* install: `yaourt -S aur/libcurlpp`
* [curlpp examples](https://github.com/jpbarrette/curlpp/tree/master/examples)
* [curlpp download wnd write callback example](https://github.com/datacratic/curlpp/blob/master/examples/example11.cpp)
* [Link errors with curlpp](http://stackoverf... | {"hexsha": "6884551c16537e58e24088c30c4077a735eee3fe", "size": 6585, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "misc/curlcpp/curlpp_download_example.cpp", "max_stars_repo_name": "alsam/cpp-samples", "max_stars_repo_head_hexsha": "abb14634b32dec9cfdfa8090ebee3df5e8479e6a", "max_stars_repo_licenses": ["MIT"], "... |
# -*- coding: utf-8 -*-
import time
import numpy as np
import tensorflow as tf
class WordEmbeddingsModel:
def __init__(self, is_train: bool, chars_count: int, chars_matrix: np.ndarray, grammemes_matrix: np.ndarray,
output_dim: int, train_data: np.ndarray=None, train_labels: np.ndarray=None,
... | {"hexsha": "fac35453c0bf42128c2a7fb8ad7c44640df1f55a", "size": 7026, "ext": "py", "lang": "Python", "max_stars_repo_path": "neuromorphy/train/word_embedding_model.py", "max_stars_repo_name": "DanAnastasyev/neuromorphy", "max_stars_repo_head_hexsha": "c40d66a0455e7e5526c671dc076195d4050048db", "max_stars_repo_licenses":... |
[STATEMENT]
lemma eSubst_simp1[simp]:
"\<lbrakk>igWls MOD (asSort ys) Y; igWls MOD s X\<rbrakk>
\<Longrightarrow> eSubst MOD ys (OK Y) y (OK X) = OK (igSubst MOD ys Y y X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>igWls MOD (asSort ys) Y; igWls MOD s X\<rbrakk> \<Longrightarrow> eSubst MOD ys (OK Y) ... | {"llama_tokens": 1026, "file": "Binding_Syntax_Theory_Iteration", "length": 2} |
import csv
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
from math import ceil, atan, degrees
from scipy import ndimage
import numpy as np
import sklearn as sk
import random
from keras.models import Sequential
from keras.layers import Flatten, Dense, Lambda, Crop... | {"hexsha": "0f8e19e5c3522adbe6dd23dc2592089cee105c67", "size": 5098, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "erik-rosen/self-driving-car-behavioural-cloning", "max_stars_repo_head_hexsha": "caa8a7b68d3c6f8c4eef5af400bc5b80de4b1ed6", "max_stars_repo_licenses": ["MIT"], "... |
subroutine t_bx
use box_module
implicit none
type(box) :: bx
bx = allbox(2)
print *, bx
bx = allbox_grc(bx, grow = 2)
print *, bx
contains
function allbox_grc(bx, grow, refine, coarsen) result(r)
type(box) :: r
type(box), intent(in) :: bx
integer, intent(in), optional :: grow, refine, coarse... | {"hexsha": "e775876ef40ff19b81c2194c36b1a1f9188b84e8", "size": 6110, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Tests/F_BaseLib/t_bx.f90", "max_stars_repo_name": "memmett/BoxLib", "max_stars_repo_head_hexsha": "a235af87d30cbfc721d4d7eb4da9b8daadeded7d", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL"], "m... |
import pandas as pd
import numpy as np
import os
import matplotlib.pyplot as plt
from skimage import exposure, transform
def preprocess_data(n_to_process=-1, img_shape=(128,128)):
'''
Prepossesses all the images:
- apply Contrast Limited Adaptive Histogram Equalization (CLAHE) to increase contrast
- ... | {"hexsha": "c3f4205d36dc811c7c7a2cf98092249f97ffe4eb", "size": 2050, "ext": "py", "lang": "Python", "max_stars_repo_path": "PreprocessData.py", "max_stars_repo_name": "ManuelPalermo/X-Ray-ConvNet", "max_stars_repo_head_hexsha": "1f291a0062d8bbcc230759775bac2a8cf7eccf0b", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
# coding: utf-8
# ### **Overview**
# The goal of this competition is identifying individual whales in images. Despite several whales are well represented in images, most of whales are unique or shown only in a few pictures. In particular, the train dataset includes 25k images and 5k unique whale ids. In addition, ~10k... | {"hexsha": "ed3db873f685a6cbe9bc9da87be6301f29097d03", "size": 13199, "ext": "py", "lang": "Python", "max_stars_repo_path": "predict.py", "max_stars_repo_name": "benwu232/whale-identificaiton", "max_stars_repo_head_hexsha": "ba3ff6563bda0344f7a6cda2e5e060c74f72fd9d", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
//==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
// Copyright 2011 - 2012 MetaScale SAS
//
// Distributed under the Boost... | {"hexsha": "631d67f7a1ebc6c504c0baa53b31dbd119e291b8", "size": 3281, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "modules/boost/simd/sdk/include/boost/simd/memory/functions/slide.hpp", "max_stars_repo_name": "psiha/nt2", "max_stars_repo_head_hexsha": "5e829807f6b57b339ca1be918a6b60a2507c54d0", "max_stars_repo_l... |
[STATEMENT]
lemma TS_c': assumes "x \<noteq> y" "h = [] \<or> (\<exists>hs. h = [x, x] @ hs)"
"qs \<in> lang (seq [Plus (Atom x) rexp.One, Atom y, Atom x, Star (Times (Atom y) (Atom x)), Atom x])"
shows "T_on' (rTS h0) ([x, y], h) qs
\<le> 2 * T\<^sub>p [x, y] qs (OPT2 qs [x, y]) \<and> TS_inv' (config' (rTS h... | {"llama_tokens": 7130, "file": "List_Update_TS", "length": 41} |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
### Own implementation of GA, adapted from pyeasyga
from modules.ga import GeneticAlgorithm
import argparse
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
from sklearn.metrics import silhouette_score
import sklearn.feature_selection as fs
import numpy ... | {"hexsha": "c5576211c67dc3608ee7ca4758a282a9c29f8589", "size": 22618, "ext": "py", "lang": "Python", "max_stars_repo_path": "pipeline/feature_selection/ga_fs_setpack.py", "max_stars_repo_name": "gaabrielfranco/ia-moba-tcc", "max_stars_repo_head_hexsha": "3f4b4e5be3e09619d1e893ee9234c835f21ecb83", "max_stars_repo_licens... |
//
// Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// 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)
//
// Official repository: https://github.com/boostorg/beast
//
// Test that header ... | {"hexsha": "61079c9ff7a243884faf9fec162d0f700869a88e", "size": 11377, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/beast/http/message.cpp", "max_stars_repo_name": "LaudateCorpus1/beast", "max_stars_repo_head_hexsha": "fa112ef5fc6b5e5ddb275b8ea2c50714df06041c", "max_stars_repo_licenses": ["BSL-1.0"], "max_s... |
from pycuda import driver, compiler, gpuarray, tools
from .Kernel import Kernel
from . import KernelManager
class KernelModule:
Interpolations = {
'linear': driver.filter_mode.LINEAR
}
def __init__(self, source, info):
self.module = compiler.SourceModule(source, options=['--ptxas-options=-... | {"hexsha": "67b8f8046f9e65d23ae975c5826af8226e8c7e38", "size": 2508, "ext": "py", "lang": "Python", "max_stars_repo_path": "pydrr/KernelModule.py", "max_stars_repo_name": "yuta-hi/pycuda_drr", "max_stars_repo_head_hexsha": "08cc20c651d4288be67c40e4936f4280b04eec6f", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
#include <nano/lib/logger_mt.hpp>
#include <nano/lib/numbers.hpp>
#include <nano/lib/stats.hpp>
#include <nano/lib/utility.hpp>
#include <nano/node/active_transactions.hpp>
#include <nano/node/confirmation_height_processor.hpp>
#include <nano/node/write_database_queue.hpp>
#include <nano/secure/blockstore.hpp>
#include... | {"hexsha": "4f65a05867f08ba1eb28f761e8adcec7620be103", "size": 16250, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "nano/node/confirmation_height_processor.cpp", "max_stars_repo_name": "Ifarukcolak/nano-node", "max_stars_repo_head_hexsha": "14454a234eaef6bd7e702ce252eebd3cf7cf3181", "max_stars_repo_licenses": ["... |
import cv2
import numpy as np
#this will open a new window once clicked on the image to showcase the point color
print([i for i in dir(cv2) if 'EVENT' in i])
#define a callback function after an event happen
def click_event(event, x, y , flags, param ):
if event == cv2.EVENT_LBUTTONDOWN:
blue... | {"hexsha": "4cd386ab77c728fc7d563f55a5b567fe319ba2ff", "size": 896, "ext": "py", "lang": "Python", "max_stars_repo_path": "Mouse_Event_3_ReadBGR_in_Window.py", "max_stars_repo_name": "shivtejshete/Advanced_Image_Processing", "max_stars_repo_head_hexsha": "b5a7ef94a44ab0b3bd9fa4a70d843099af70079e", "max_stars_repo_licen... |
struct EquationSet <: AbstractEquationSet
eq_1::AbstractEquation
eq_2::AbstractEquation
eq_3::AbstractEquation
R_0::AbstractSymbol
B_0::AbstractSymbol
I_P::AbstractSymbol
end
function EquationSet(cur_reactor::AbstractReactor, secondary_constraint::AbstractEquation)
primary_constraint = power_balance_equ... | {"hexsha": "ac88926599ff131336bdade012e4c76bb3643cc5", "size": 4160, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/structs/equation_set.jl", "max_stars_repo_name": "djsegal/Fusion.jl", "max_stars_repo_head_hexsha": "a0540fbf3345a778965fa092e9e56907a44c6521", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import shutil
import torch
import numpy as np
import pandas as pd
from datasets import load_metric
from tqdm.auto import tqdm
from transformers import (
AdamW,
T5ForConditionalGeneration,
T5TokenizerFast as T5Tokenizer,
)
from torch.utils.data import Dataset, DataLoader
import pytorch_lightning as pl
from ... | {"hexsha": "859ee89d432cc53e41cb3f03fd883b43ef5a23a6", "size": 20722, "ext": "py", "lang": "Python", "max_stars_repo_path": "keytotext/trainer.py", "max_stars_repo_name": "lamduykhang4869/keytotext_demo", "max_stars_repo_head_hexsha": "da1383d4b95f39e0469145e5991a9811426a1f5a", "max_stars_repo_licenses": ["MIT"], "max_... |
#!/usr/bin/env python
# coding: utf-8
# In[2]:
import os
# In[3]:
with open("/playpen/tgreer/splits/cross/full_resolution/test/pair_name_list.txt") as f:
test_pair_names = f.readlines()
with open("/playpen/tgreer/splits/cross/full_resolution/test/pair_path_list.txt") as f:
test_pair_paths = f.readlines()... | {"hexsha": "e2b667535face6a491fa42b0c9f15b8c9d8c75a8", "size": 1832, "ext": "py", "lang": "Python", "max_stars_repo_path": "training_scripts/preprocess_knees.py", "max_stars_repo_name": "uncbiag/InverseConsistency", "max_stars_repo_head_hexsha": "f191254e1b8497b48abb36c01ca65b0ca399f633", "max_stars_repo_licenses": ["A... |
# Experiment 2: Airtrack I---Kinematics
### Objectives
- To learn good lab practice
- To learn how to estimate and propagate uncertainties
- To learn how position, velocity, and acceleration are related
- To learn how to use the Airtrack
- To learn how to use PASCO Capstone Data Acquisition and Analysis software
### E... | {"hexsha": "dc2fe6e91c759f5f6221e8ed9b626a05f0a565a0", "size": 316966, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "PHYS201/Lab2.ipynb", "max_stars_repo_name": "brash99/PhysicsLabs", "max_stars_repo_head_hexsha": "c3fc45ecbca55a3215dccfd5a852983d22846704", "max_stars_repo_licenses": ["MIT"], "max... |
module TimeArraySeriesModule
use ArrayReadersModule, only: ReadArray
use BlockParserModule, only: BlockParserType
use ConstantsModule, only: LINELENGTH, UNDEFINED, STEPWISE, LINEAR, &
LENTIMESERIESNAME, DZERO, DONE
use GenericUtilitiesModule, only: is_same
use Inp... | {"hexsha": "2aa13b54f4ae0774d127bd7b3f26b7c39492ba83", "size": 30163, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/Utilities/TimeSeries/TimeArraySeries.f90", "max_stars_repo_name": "scharlton2/modflow6", "max_stars_repo_head_hexsha": "83ac72ee3b6f580aaffef6352cf15c1697d3ce66", "max_stars_repo_licenses":... |
import numpy as np
import random
from copy import deepcopy
class GeneticAlgorithm:
def __init__(self, fitness_function, genome_type, pop_size, num_generations, crossover_rate=0.6, mutation_rate=0.01, genome_size=10):
self.crossover_rate = crossover_rate
self.mutation_rate = mutation_rate
... | {"hexsha": "35b58e1a0d96a75ba28fb5afe649c55b605f90e8", "size": 2949, "ext": "py", "lang": "Python", "max_stars_repo_path": "Basic Genetic Algorithm/genetic_algorithm/backend/GA/genetic_algorithm.py", "max_stars_repo_name": "THE-RAF/Evolutionary-Computing", "max_stars_repo_head_hexsha": "8fb69566e77233322a164a3f56663247... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This example simply simulates and visualizes the uncontrolled motion and
the model "falls down"."""
import numpy as np
from scipy.integrate import odeint
from pydy.codegen.code import generate_ode_function
from pydy.viz import Scene
from pygait2d import derive, simula... | {"hexsha": "de78706684d4825cc780d4564f1887fa77b4cfcf", "size": 1417, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/run.py", "max_stars_repo_name": "csu-hmc/gait2d", "max_stars_repo_head_hexsha": "12fbde074fb621eef9107c277375aead3b62cf14", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 5... |
# Convenience functions for working with MPI
using MPI
"""
Initialize MPI. Must be called before doing any non-trivial MPI work
(even in the single-process case). Unlike the MPI.Init() function,
this can be called multiple times.
"""
function mpi_ensure_initialized()
# MPI Thread level 3 means that the environment... | {"hexsha": "00886469f2d34982ba4ea35c9b5f2e926c6338df", "size": 1696, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/common/mpi.jl", "max_stars_repo_name": "umbriquse/DFTK.jl", "max_stars_repo_head_hexsha": "6360bfa8ecaf4a7608aea06e8eb40443ab89e691", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
"""
Water Wastewater Component Body
-------------------------------
"""
import numpy as np
from pandas import DataFrame
import os
from aaem.components.annual_savings import AnnualSavings
from aaem.community_data import CommunityData
from aaem.forecast import Forecast
from aaem.diagnostics import Diagnostics
import a... | {"hexsha": "43515af5cd3cdb4629d93819af8e0454551f3367", "size": 18873, "ext": "py", "lang": "Python", "max_stars_repo_path": "aaem/components/wastewater/component.py", "max_stars_repo_name": "gina-alaska/alaska_affordable_energy_model", "max_stars_repo_head_hexsha": "96fed0137152985ce280ea37e0affec131e3087f", "max_stars... |
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 29 12:21:28 2019
SEIR Model
Reinterpreted from MATLAB Code, MATH3501
@author: Adrian
Deterministic SIR Epidemic model
"""
import numpy as np
from scipy.integrate import odeint
import matplotlib.pyplot as plt
# Total population
N = 1000
# Initial number of infected and r... | {"hexsha": "b82c39c5af18836a7c14cc35da1bf569e0faa335", "size": 1432, "ext": "py", "lang": "Python", "max_stars_repo_path": "sir.py", "max_stars_repo_name": "adrianhindes/network-tsl", "max_stars_repo_head_hexsha": "70de88f3dde801e99481b3e4365b1c0461e54db3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy.coordinates import SkyCoord
from astropy.tests.helper import assert_quantity_allclose
from numpy.testing import assert_array_equal
class BaseTestApertureParams:
index = 2
slc = slice(0, 2)
expected_slc_len = 2
class BaseTestAp... | {"hexsha": "965405b479a9c7a7df17462bbf9b010458905169", "size": 1706, "ext": "py", "lang": "Python", "max_stars_repo_path": "photutils/aperture/tests/test_aperture_common.py", "max_stars_repo_name": "fdeugenio/photutils", "max_stars_repo_head_hexsha": "33c8b15cbbda85dc11c86a73217422dcb61398b7", "max_stars_repo_licenses"... |
[STATEMENT]
lemma quotient_of_unique: "\<exists>!p. r = Fract (fst p) (snd p) \<and> snd p > 0 \<and> coprime (fst p) (snd p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<exists>!p. r = Fract (fst p) (snd p) \<and> 0 < snd p \<and> coprime (fst p) (snd p)
[PROOF STEP]
proof (cases r)
[PROOF STATE]
proof (state)... | {"llama_tokens": 5164, "file": null, "length": 53} |
[STATEMENT]
lemma get_M_Object_preserved2 [simp]:
"cast node_ptr \<noteq> object_ptr \<Longrightarrow> h \<turnstile> put_M\<^sub>N\<^sub>o\<^sub>d\<^sub>e node_ptr setter v \<rightarrow>\<^sub>h h'
\<Longrightarrow> preserved (get_M\<^sub>O\<^sub>b\<^sub>j\<^sub>e\<^sub>c\<^sub>t object_ptr getter) h h'"
[PROO... | {"llama_tokens": 301, "file": "Core_SC_DOM_common_monads_NodeMonad", "length": 1} |
module Set
import RedBlack
export
data Set : Type -> Type where
MkSet : {d : Nat} -> {c : RedBlack.Color} -> (a : Type) ->
Tree d c a -> Set a
export
empty : Ord a => Set a
empty = MkSet _ RedBlack.empty
export
member : Ord a => a -> Set a -> Bool
member x (MkSet _ t) = RedBlack.member x t
export
add ... | {"hexsha": "604a2d26990329db808d442582e901fd48533fec", "size": 484, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "Set.idr", "max_stars_repo_name": "xuanruiqi/dtp", "max_stars_repo_head_hexsha": "c0c33dff4b114381561c011df4d5cf5da7a083f0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_r... |
[STATEMENT]
lemma disjoint_lookup:
fixes vs ws :: "'a::len word list"
shows "disjoint vs ws \<longleftrightarrow> (\<forall>i. \<not>(lookup i vs \<and> lookup i ws))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. disjoint vs ws = (\<forall>i. \<not> (lookup i vs \<and> lookup i ws))
[PROOF STEP]
apply (ind... | {"llama_tokens": 772, "file": "Collections_GenCF_Impl_Impl_Uv_Set", "length": 5} |
# pylint: disable=C0103
"""
This module includes continuous-time models for a permmanent-magnet
synchronous motor drive. The space-vector model is implemented in rotor
coordinates.
"""
import numpy as np
from helpers import complex2abc
# %%
class Drive:
"""
This class interconnects the subsyste... | {"hexsha": "620f86297301ab6a96df7aa358963a6c7f66f909", "size": 7802, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/sm_drive.py", "max_stars_repo_name": "dunzhichen/motulator", "max_stars_repo_head_hexsha": "cc495858fa46267048583281df062a74de78574c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
from numpy import array, zeros, unique, searchsorted, arange
from pyNastran.dev.bdf_vectorized.cards.elements.property import Property
from pyNastran.bdf.field_writer_8 import print_card_8
from pyNastran.bdf.bdf_interface.assign_type import (integer,
double, double_or_blank)
class PROD(Property):
type = 'PR... | {"hexsha": "02a4df2ef47e6b496c58878b353b1f8b1f295b10", "size": 7015, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyNastran/dev/bdf_vectorized/cards/elements/rod/prod.py", "max_stars_repo_name": "ACea15/pyNastran", "max_stars_repo_head_hexsha": "5ffc37d784b52c882ea207f832bceb6b5eb0e6d4", "max_stars_repo_licen... |
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy
SOM_MODULE = Extension(
"cysom.som",
["cysom/som.pyx"],
extra_compile_args=['-O3'],
include_dirs=[numpy.get_include()]
)
setup(
name='CySOM',
version='1.0',
descri... | {"hexsha": "a095123d6e98197e45c6fa95c4f526be66c3165d", "size": 546, "ext": "py", "lang": "Python", "max_stars_repo_path": "setup.py", "max_stars_repo_name": "lfloeer/cysom", "max_stars_repo_head_hexsha": "d281c5bb85c730189e707754dc695a53232ef3f6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_... |
# -*- coding: utf-8 -*-
"""Tests for the pyflwdir.gis_utils module."""
import pytest
import numpy as np
from pyflwdir import gis_utils as gis
from affine import Affine
# glob total area
glob_area = 4 * np.pi * gis._R**2
glob_circ = 2 * np.pi * gis._R
## TRANSFORM
# Adapted from https://github.com/mapbox/rasterio/bl... | {"hexsha": "b2799d763198dc5327bc2fb71f525c45e04cd97d", "size": 5481, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_gis_utils.py", "max_stars_repo_name": "Deltares/pyflwdir", "max_stars_repo_head_hexsha": "917bae1cb0c6a09f8697fad4753f06f90dd0269f", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import os
import nibabel as nib
import pydicom as dcm
import numpy as np
def txt_to_dcm(txt_file):
"""
Read a text file containing dicom header information
Args:
txt_file (str): path to file
eg. txt_file = '/media/matt/Seagate Expansion Drive/b7TData/Results/K520457/20180510/dicom_head... | {"hexsha": "0bf484b12f24a88792368d2a9f2c4681b807716f", "size": 3620, "ext": "py", "lang": "Python", "max_stars_repo_path": "Utilities/nifti_to_dicom.py", "max_stars_repo_name": "atomized1/MRI_Segmentation_Radiomics", "max_stars_repo_head_hexsha": "3998dd26b60972f41d3b397cecdad16563df4189", "max_stars_repo_licenses": ["... |
# -*- coding: utf-8 -*-
# OpenCV のインポート
import cv2
import numpy as np
aruco = cv2.aruco
p_dict = aruco.getPredefinedDictionary(aruco.DICT_4X4_50)
# マーカー個数
n_mark = 5
m = np.empty((4,2))
m2 = np.empty((n_mark-4,2))
corners0 = [np.empty((1,4,2))]*n_mark
corners1 = [np.empty((1,4,2))]*n_mark
corners2 = [np.empty((1,4,2)... | {"hexsha": "8b1a9a20d323c4ae6ef4ed0acfe5eab0c2647b4b", "size": 2537, "ext": "py", "lang": "Python", "max_stars_repo_path": "detection_ArUco_marker_board_movie.py", "max_stars_repo_name": "YoshimitsuMatsutaIe/OpenLab2020", "max_stars_repo_head_hexsha": "aa2263aa07bc141d85806c30c7f7febf169ae367", "max_stars_repo_licenses... |
import numpy as np
import vtk
from pyNastran.bdf.utils import write_patran_syntax_dict
from pyNastran.gui.styles.highlight_style import HighlightStyle
from pyNastran.gui.styles.area_pick_style import AreaPickStyle
from pyNastran.gui.styles.zoom_style import ZoomStyle
#from pyNastran.gui.styles.probe_style import Prob... | {"hexsha": "53943f8bc47f0d9b06fb0c07d6ae54311b433fd8", "size": 33190, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyNastran/gui/qt_files/mouse_actions.py", "max_stars_repo_name": "JohannesSeidel/pyNastran", "max_stars_repo_head_hexsha": "91ccd2756b201a7a3e4bb81cc6dc53b947d43bbf", "max_stars_repo_licenses": [... |
/*System includes*/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <sys/stat.h>
#include <float.h>
/*GSL includes*/
#include <gsl/gsl_vector.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_sf.h>
#inc... | {"hexsha": "3d51521ba3ee4c8e6e01483681320967c81c7826", "size": 43851, "ext": "c", "lang": "C", "max_stars_repo_path": "c-concoct/vbgmmmodule.c", "max_stars_repo_name": "binnisb/CONCOCT", "max_stars_repo_head_hexsha": "9246dc947b24256c4eab1f7b081c7a21aebdd95b", "max_stars_repo_licenses": ["BSD-2-Clause-FreeBSD"], "max_s... |
#include <argot/gen/concept_body/detail/variadic_empty.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/comparison/equal.hpp>
#include <boost/preprocessor/control/iif.hpp>
#include <boost/preprocessor/debug/error.hpp>
#include <boost/preprocessor/detail/auto_rec.hpp>
#include <boost/preprocessor... | {"hexsha": "8dc755e9aac420ff987f480cbab0f897ba32f36f", "size": 26942, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "test/visit_node.hpp", "max_stars_repo_name": "mattcalabrese/argot", "max_stars_repo_head_hexsha": "97349baaf27659c9dc4d67cf8963b2e871eaedae", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_coun... |
import ast
import numba
from numba import *
from numba import error
from numba import typesystem
from numba import visitors
from numba import nodes
from numba import function_util
from numba.exttypes import virtual
from numba.traits import traits, Delegate
class ExtensionTypeLowerer(visitors.NumbaTransformer):
""... | {"hexsha": "d195ae32d2f273038677368d2d184f6e38e339dc", "size": 9566, "ext": "py", "lang": "Python", "max_stars_repo_path": "numba/specialize/exttypes.py", "max_stars_repo_name": "liuzhenhai/numba", "max_stars_repo_head_hexsha": "855a2b262ae3d82bd6ac1c3e1c0acb36ee2e2acf", "max_stars_repo_licenses": ["BSD-2-Clause"], "ma... |
/**
* Copyright (c) 2017-present, Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "logdevice/server/locallogstore/LocalLogStoreSettings.h"
#include <boost/prog... | {"hexsha": "ba869e9dbfb3fb961d39b5139c7866f65c869d6c", "size": 3481, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "logdevice/server/locallogstore/LocalLogStoreSettings.cpp", "max_stars_repo_name": "majra20/LogDevice", "max_stars_repo_head_hexsha": "dea0df7991120d567354d7a29d832b0e10be7477", "max_stars_repo_licen... |
import os
import copy
import numpy as np
from .binaryfile import CellBudgetFile
from itertools import groupby
from collections import OrderedDict
from ..utils.utils_def import totim_to_datetime
class ZoneBudget(object):
"""
ZoneBudget class
Parameters
----------
cbc_file : str or CellBudgetFile o... | {"hexsha": "ed44eab9ade474287bf119c8c1e33daa8c242a28", "size": 66707, "ext": "py", "lang": "Python", "max_stars_repo_path": "flopy/utils/zonbud.py", "max_stars_repo_name": "ConnectedSystems/flopy", "max_stars_repo_head_hexsha": "cf3334437be74ba780c12ff2aa2b69f3ffbf8644", "max_stars_repo_licenses": ["CC0-1.0", "BSD-3-Cl... |
"""
The ExpErrorgenOp class and supporting functionality.
"""
#***************************************************************************************************
# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
# Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Go... | {"hexsha": "161300564cb8f853961cf0ddb4d2aef07657f486", "size": 35597, "ext": "py", "lang": "Python", "max_stars_repo_path": "pygsti/modelmembers/operations/experrorgenop.py", "max_stars_repo_name": "pyGSTi-Developers/pyGSTi", "max_stars_repo_head_hexsha": "bfedc1de4d604f14b0f958615776fb80ddb59e33", "max_stars_repo_lice... |
import numpy as np
import pandas as pd
def sma(price: np.ndarray, period: int) -> np.ndarray:
return price.rolling(period).mean()
| {"hexsha": "a01433f8f21f3eb4499439d7b6f08ce5c77bb94b", "size": 136, "ext": "py", "lang": "Python", "max_stars_repo_path": "util.py", "max_stars_repo_name": "sharpvik/fin", "max_stars_repo_head_hexsha": "9afec321dc5f404f296fd7ba55914f298396b68f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_re... |
#!/usr/bin/env python3
# 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.
#
# Ravi Krishna 10/07/20
# Various import statements.
import torch
import torch.nn as nn
from dlrm_s_pytorch import D... | {"hexsha": "308c3a85b83895115d343b293bbb00af5c84c6c1", "size": 21229, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_sampled.py", "max_stars_repo_name": "ravikucb/dnas", "max_stars_repo_head_hexsha": "39aa5b13d66a3899350cb4e53d87a8cd3c5c198f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max... |
module Day3
using DelimitedFiles
data_as_matrix(strings, bitcount) = begin
m = zeros(Int, (length(strings), bitcount))
for (row, string) in enumerate(strings)
for bit in 1:bitcount
b = parse(Int, string[bit])
m[row, bit] = b
end
end
m
end
bit_ratings(m) = begin... | {"hexsha": "adf4f2523a1c283475be65d8e1781474817d0500", "size": 2006, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/day3.jl", "max_stars_repo_name": "johnbcoughlin/advent-of-code-2021", "max_stars_repo_head_hexsha": "63bfc2674acfae06a437169a179a96f696dd430e", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
ismacro(f::Function) = startswith(string(methods(f).mt.name), "@")
wstype(x) = ""
wstype(::Module) = "module"
wstype(f::Function) = "function"
wstype(::Type) = "type"
wstype(::Expr) = "mixin"
wstype(::Symbol) = "tag"
wstype(::AbstractString) = "property"
wstype(::Number) = "constant"
wstype(::Exception) = "tag"
wsico... | {"hexsha": "a4dcb5a58b6364bff9bf58cb81660caa1ad262a4", "size": 1491, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/workspace.jl", "max_stars_repo_name": "SimonDanisch/Atom.jl", "max_stars_repo_head_hexsha": "55e105006dddf0dad8b75654daf0c2998e9609bc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
#redirect Chicana/Chicano Studies
| {"hexsha": "87cfa0b6b0c6b7338238e0b272887e9a3c86b49f", "size": 34, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/o_Studies.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
import click
import numpy as np
import tensorflow as tf
import protobuf.touches_pb2 as touches_pb2
@click.command()
@click.argument('in-file')
@click.option('--out-file')
def main(in_fi... | {"hexsha": "129e25907f74886766dce3da39bd430276cd1fac", "size": 1697, "ext": "py", "lang": "Python", "max_stars_repo_path": "gesturelearner/convert_to_tfrecords.py", "max_stars_repo_name": "hipwelljo/complex-gestures-demo", "max_stars_repo_head_hexsha": "4e908e4dfcf88992cae815f60a27073af4a34f35", "max_stars_repo_license... |
import numpy as np
import glfw
def step_env(env, max_path_length=100, iterations=1, render=True):
"""Step env helper."""
for _ in range(iterations):
env.reset()
for _ in range(max_path_length):
_, _, done, info = env.step(env.action_space.sample())
assert 'goal' in info
... | {"hexsha": "63b45fe6039cbde929ed78826ae4789fbac8e4fb", "size": 635, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/helpers.py", "max_stars_repo_name": "pkol/metaworld", "max_stars_repo_head_hexsha": "718e4d1bc2b34e0ae3ef6415fb6cbe4afe8ea4b9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
import mynat.definition
import mynat.mul
import world2.level5
namespace mynat
lemma one_mul (m : mynat) : 1 * m = m :=
begin [nat_num_game]
induction m with d hd,
{
rw mul_zero,
refl,
},
{
rw mul_succ,
rw succ_eq_add_one,
rw hd,
refl,
},
end
end myn... | {"author": "nomoid", "repo": "lean-proofs", "sha": "b9f03a24623d1a1d111d6c2bbf53c617e2596d6a", "save_path": "github-repos/lean/nomoid-lean-proofs", "path": "github-repos/lean/nomoid-lean-proofs/lean-proofs-b9f03a24623d1a1d111d6c2bbf53c617e2596d6a/src/world3/level3.lean"} |
# This is only meant to add docs to objects defined in C-extension modules.
# The purpose is to allow easier editing of the docstrings without
# requiring a re-compile.
# NOTE: Many of the methods of ndarray have corresponding functions.
# If you update these docstrings, please keep also the ones in
# core... | {"hexsha": "d588cbba05cc93bf3fc7ea4527d41af8986e93d5", "size": 111819, "ext": "py", "lang": "Python", "max_stars_repo_path": "numpy/add_newdocs.py", "max_stars_repo_name": "illume/numpy3k", "max_stars_repo_head_hexsha": "42171a679b0ef24932fe08fc88cce039abf6de2b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# By Lilian Besson (Naereen)
# https://github.com/Naereen/gym-nes-mario-bros
# MIT License https://lbesson.mit-license.org/
#
from __future__ import division, print_function # Python 2 compatibility
import os
from collections import deque
import gym
from gym import wrapp... | {"hexsha": "c5d4369faf904f86efed4170c43f4d94ee52555f", "size": 2540, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/mario/gym-nes-mario-bros-master/src/run-soccer.py", "max_stars_repo_name": "selfemergence/NEAT-multiprocessing", "max_stars_repo_head_hexsha": "3dc57c6ec18658253398ae0b361b72f78e3fd0c9... |
# %%
# coding: utf-8
import sys
import os
sys.path.append(os.pardir) # nopep8 親ディレクトリのファイルをインポートするための設定
import numpy as np
import matplotlib.pyplot as plt
from dataset.mnist import load_mnist
from common.multi_layer_net import MultiLayerNet
from common.util import shuffle_dataset
from common.trainer import Trainer
(x... | {"hexsha": "f8fe8d1ecd7956d01e32465a39a0e49c157c0a9e", "size": 2626, "ext": "py", "lang": "Python", "max_stars_repo_path": "ch06/hyperparameter_optimization.py", "max_stars_repo_name": "mikiya1130/deep-learning-from-scratch", "max_stars_repo_head_hexsha": "d265bc25b2dc38f13a540e43fcd36195a71f2fc1", "max_stars_repo_lice... |
[STATEMENT]
lemma Resid_Arr_self:
shows "Arr T \<Longrightarrow> Ide (T \<^sup>*\\\<^sup>* T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Arr T \<Longrightarrow> Ide (T \<^sup>*\\<^sup>* T)
[PROOF STEP]
proof (induct T)
[PROOF STATE]
proof (state)
goal (2 subgoals):
1. Arr [] \<Longrightarrow> Ide ([] \<^su... | {"llama_tokens": 8410, "file": "ResiduatedTransitionSystem_ResiduatedTransitionSystem", "length": 48} |
/*
Yong Master: a small game that looks like othello.
Copyright (C) 2006 Nicolas Vanhoren
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
... | {"hexsha": "42bf2e7e8bf524b99aae34b2ec9d3ea6ccd88305", "size": 2342, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "sdlw_pixel_format.hpp", "max_stars_repo_name": "nicolas-van/codeyong", "max_stars_repo_head_hexsha": "d0363c295637f8796db17cb8758bc85f9daca280", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
import numpy as np
import pandas as pd
from functools import reduce
import os
import sys
sys.path.append("..")
from distributed_rep import embeding
class LSH():
class HashTable:
def __init__(self):
self.num_ball = 0
self.num_bucket = 0
self.table = {}
def __ini... | {"hexsha": "8d76fa6a9feda97cd50997be4c8cf0d0e12bf19d", "size": 3944, "ext": "py", "lang": "Python", "max_stars_repo_path": "deeper/lsh_partition/lsh.py", "max_stars_repo_name": "hsiaoko/DeepER", "max_stars_repo_head_hexsha": "86c0a936eddb7e84721c531cbb4d2daa44ae2752", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import numpy as np
import vtk
import time
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
class GUIViewer(QVTKRenderWindowInteractor):
def __init__(self, parent, opt_engine):
QVTKRenderWindowInteractor.__init__(self, parent)
... | {"hexsha": "101378129ecffe51ac3bb51c3f74ef292f725baa", "size": 2999, "ext": "py", "lang": "Python", "max_stars_repo_path": "ui/gui_viewer.py", "max_stars_repo_name": "vectormachines/voxel-dcgan", "max_stars_repo_head_hexsha": "5a0674299af255f3b82389f2eb9c491998cbf720", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
MODULE sqerr_module
use parallel_module, only: comm_grid, comm_spin
use sqerr_g_module
implicit none
PRIVATE
PUBLIC :: calc_sqerr
PUBLIC :: init_sqerr
real(8),allocatable :: fold(:,:,:)
logical,parameter :: flag_g=.false.
CONTAINS
SUBROUTINE init_sqerr( m, n, nmax, f1_in, f2_in )
implicit n... | {"hexsha": "40808541820c44938fa2122b2fe9e1bc8048817d", "size": 2696, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/sqerr_module.f90", "max_stars_repo_name": "j-iwata/RSDFT_DEVELOP", "max_stars_repo_head_hexsha": "14e79a4d78a19e5e5c6fd7b3d2f2f0986f2ff6df", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
import numpy as np
import pdb
from sklearn.naive_bayes import MultinomialNB
from sklearn.naive_bayes import GaussianNB
import collections
import cPickle as pickle
import random
import evaluate
from scipy import sparse
from sklearn.metrics.pairwise import cosine_similarity
def loadTrainTestData():
trainData = []
wit... | {"hexsha": "88226f74e7e4232ffb0573f587fa9e808b7b5db5", "size": 5960, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/content_based_cold.py", "max_stars_repo_name": "jashwanth9/Expert-recommendation-system", "max_stars_repo_head_hexsha": "544c0ad29b2faf2d767d0f28aea82a6cdb43563f", "max_stars_repo_licenses": ... |
text <- "* This is a special SAS script which can be used to generate a report.;
* You can write normal text in command-style comments.;
* ;
* First we specify a path for SAS and set up some options.;
*+ setup, message=FALSE ;
*R require(SASmarkdown);
*R if (file.exists('C:/Program Files/SASHome/SASFoundation/9.4/sas.e... | {"hexsha": "569f7a53af0a1cf2a8bac5847d1a914c7427635d", "size": 1424, "ext": "r", "lang": "R", "max_stars_repo_path": "inst/examples/sas-spin0.r", "max_stars_repo_name": "johow/SASmarkdown", "max_stars_repo_head_hexsha": "8e176855e6c7029440463b0a9419f7538ba28459", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
import trisistor as tr
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
plt.style.use('ggplot')
n = 100
polos = tr.trisis.geracao_polos(n)
campo_base = tr.trisis.geracao_campo(polos,n)
elecbur = tr.trisis.geracao_bur_elec(n)
for i in range(200):
if i == 50:
t = 1
... | {"hexsha": "23ab23a9aa7a2e3530034677d42d3ec87fc8a661", "size": 800, "ext": "py", "lang": "Python", "max_stars_repo_path": "trisistor.py", "max_stars_repo_name": "MRLimcon/Trisistor", "max_stars_repo_head_hexsha": "c536821d1cd01d7837387a3e401ea2d91d1409ff", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
"""
author: Junxian Ye
time: 12/10/2016
link: https://github.com/un-knight/machine-learning-algorithm
"""
import pandas as pd
import seaborn as sns
import numpy as np
from matplotlib import pyplot as plt
from func import tools as tl
def main():
X, y, Xval, yval, Xtest, ytest = tl.read_data_from_mat('ex5data1.ma... | {"hexsha": "dfe5f0d6e0e5c4884c06277104b47f5df756d7c7", "size": 1719, "ext": "py", "lang": "Python", "max_stars_repo_path": "ex5_regularized_linear_regression_and_bias_vs_variance/regularized_linear_regression.py", "max_stars_repo_name": "un-knight/machine-learning-algorithm", "max_stars_repo_head_hexsha": "677a98d105df... |
include("../../mesh.jl")
include("../../utils.jl")
include("../../connectique.jl")
# include("../../visu.jl")
include("toyPbs.jl")
function validateToyProblem(nod2e::Array{Array{Int64, 1}, 1},
e2neighs::Array{Array{Int64, 1}, 1}, nedg::Int64, e2edg::Array{Array{Int64, 1}, 1},
freeedg::Array{Bool, 1}, freenod:... | {"hexsha": "4cca71e84ae2cb3e1d23d1cebe260c91504ce832", "size": 3438, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/validationConnectique/validationConnectique.jl", "max_stars_repo_name": "marcbakry/vem_acoustics", "max_stars_repo_head_hexsha": "c41da8c1c3027337511fd0a394dd3782cfe79d88", "max_stars_repo_lic... |
[STATEMENT]
lemma mono_inv_bval': "S1 \<le> S2 \<Longrightarrow> inv_bval' b bv S1 \<le> inv_bval' b bv S2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. S1 \<le> S2 \<Longrightarrow> inv_bval' b bv S1 \<le> inv_bval' b bv S2
[PROOF STEP]
apply(induction b arbitrary: bv S1 S2)
[PROOF STATE]
proof (prove)
goal (4 su... | {"llama_tokens": 1943, "file": null, "length": 8} |
[STATEMENT]
lemma wf_alpha_Tree_rel_hull_rel_Tree_wf:
"wf (alpha_Tree_rel O hull_rel O Tree_wf)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. wf (FL_Validity.alpha_Tree_rel O hull_rel O Tree_wf)
[PROOF STEP]
proof (rule wf_relcomp_compatible)
[PROOF STATE]
proof (state)
goal (2 subgoals):
1. wf (hull_rel O Tree... | {"llama_tokens": 15410, "file": "Modal_Logics_for_NTS_FL_Validity", "length": 102} |
from __future__ import absolute_import
from six.moves import urllib
import os
import sys
import numpy as np
import scipy.io as sio
import tensorflow as tf
from tensor_fcn import tf_utils
MODEL_16 = 'http://www.vlfeat.org/matconvnet/models/beta16/' \
'imagenet-vgg-verydeep-16.mat'
MODEL_19 = 'http://ww... | {"hexsha": "3d5553e5dc3539520af81dabcaf83b0e6103561b", "size": 4626, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensor_fcn/networks/vgg_net.py", "max_stars_repo_name": "dubvulture/tensor_fcn", "max_stars_repo_head_hexsha": "90bc2023ef8d0b237044e806267ac033af1b02b4", "max_stars_repo_licenses": ["MIT"], "max_... |
#include <unordered_set>
#include <gtest/gtest.h>
#include <boost/filesystem.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <rai/common/util.hpp>
#include <rai/common/numbers.hpp>
TEST(invite, BETA)
{
try
{
boost::filesystem::path file_path = "../invite/beta.json";
ASSERT_TRUE(boo... | {"hexsha": "ec591c2ea99a2207cc1738042428a65a36935350", "size": 2647, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "rai/core_test/invite.cpp", "max_stars_repo_name": "gokoo/Raicoin", "max_stars_repo_head_hexsha": "494be83a1e29106d268f71e613fac1e4033a82f2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 94... |
(* Author: Thiemann *)
section \<open>An efficient algorithm to compute the growth rate of $A^n$.\<close>
theory Check_Matrix_Growth
imports
Spectral_Radius_Theory_2
Sturm_Sequences.Sturm_Method
begin
hide_const (open) Coset.order
definition check_matrix_complexity :: "real mat \<Rightarrow> real poly \<Rightar... | {"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/Perron_Frobenius/Check_Matrix_Growth.thy"} |
(*
Title: The pi-calculus
Author/Maintainer: Jesper Bengtson (jebe.dk), 2012
*)
theory Strong_Late_Bisim
imports Strong_Late_Sim
begin
lemma monoAux: "A \<subseteq> B \<Longrightarrow> P \<leadsto>[A] Q \<longrightarrow> P \<leadsto>[B] Q"
by(auto intro: Strong_Late_Sim.monotonic)
coinductive_set bisim ::... | {"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/Pi_Calculus/Strong_Late_Bisim.thy"} |
# This file contains perturbation effects on the satellite motion
from transform import RTN2ECI, ForceGCRS2RTN
import model
import egm
import numpy as np
from astropy.coordinates import get_moon, get_sun
from astropy.time import Time
# tota effect of all the perturbation
# return the derivative increas... | {"hexsha": "47c07a1a442812afa4c799b9be52411a42ff225b", "size": 5061, "ext": "py", "lang": "Python", "max_stars_repo_path": "perturbation.py", "max_stars_repo_name": "schuangs/Satellite-Orbit-Prediction", "max_stars_repo_head_hexsha": "48df4814802a481fc54a3691c4a756ec1c224477", "max_stars_repo_licenses": ["MIT"], "max_s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.