text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
module Oscar.Class.Equivalence where
open import Oscar.Class.Reflexivity
open import Oscar.Class.Symmetry
open import Oscar.Class.Transitivity
open import Oscar.Function
open import Oscar.Level
record Equivalence {a} {A : Set a} {ℓ} (_≋_ : A → A → Set ℓ) : Set (a ⊔ ℓ) where
field
⦃ ′reflexivity ⦄ : Reflexivity... | {"hexsha": "1076cdbc1ee33d0a77e7aabb5c9721d2df620273", "size": 791, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "archive/agda-2/Oscar/Class/Equivalence.agda", "max_stars_repo_name": "m0davis/oscar", "max_stars_repo_head_hexsha": "52e1cdbdee54d9a8eaee04ee518a0d7f61d25afb", "max_stars_repo_licenses": ["RSA-MD"]... |
[STATEMENT]
lemma has_next_filter_generator:
"list.has_next (filter_generator g) s \<longleftrightarrow>
list.has_next g s \<and> (let (x, s') = list.next g s in if P x then True else list.has_next (filter_generator g) s')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. list.has_next (local.filter_generator g) s... | {"llama_tokens": 608, "file": "Containers_List_Fusion", "length": 5} |
[STATEMENT]
lemma Interleaves_suffix_snd [rule_format]:
"\<forall>n < length ws. \<not> P (ws ! n) (drop (Suc n) ws) \<Longrightarrow>
xs \<cong> {ys, zs, \<lambda>v vs. P v (vs @ ws)} = xs @ ws \<cong> {ys, zs @ ws, P}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<forall>n<length ws. \<not> P (ws ! n) (drop ... | {"llama_tokens": 223, "file": "List_Interleaving_ListInterleaving", "length": 1} |
#
# Solution to Project Euler problem 150
# Copyright (c) Project Nayuki. All rights reserved.
#
# https://www.nayuki.io/page/project-euler-solutions
# https://github.com/nayuki/Project-Euler-solutions
#
def compute():
# Generate the triangle
ROWS = 1000
rand = lcg_random()
triangle = [[next(rand) for j in ran... | {"hexsha": "6c3c9f73db33f7b20adea26ac16c99962094a07f", "size": 1886, "ext": "py", "lang": "Python", "max_stars_repo_path": "solutions/p150.py", "max_stars_repo_name": "xianlinfeng/project_euler_python3", "max_stars_repo_head_hexsha": "77eca44eb2b1d13bc70d6dc0258b737449d43a23", "max_stars_repo_licenses": ["MIT"], "max_s... |
import warnings
warnings.filterwarnings('ignore')
import os
os.environ['MKL_SERVICE_FORCE_INTEL'] = '1'
os.environ['MUJOCO_GL'] = 'egl'
import torch
import numpy as np
import gym
gym.logger.set_level(40)
import time
import random
from pathlib import Path
from cfg import parse_cfg
from env import make_env
from algorithm... | {"hexsha": "4fda5cf7b86fdb27e932d323ffc635c0ea3ef1dd", "size": 2911, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/train.py", "max_stars_repo_name": "nicklashansen/tdmpc", "max_stars_repo_head_hexsha": "96cb7036ecf06f75d5ffd64a0454bbab7d0d3e17", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 60, "m... |
import os
import re
import json
from collections import Counter
from confluent_kafka import Consumer, TopicPartition
import logging
import numpy as np
import pandas as pd
import matplotlib.cm as cm
import mpld3
import matplotlib.pyplot as plt
from matplotlib import rcParams
kafkaBroker = os.getenv('KAFKA_BROKER')
if k... | {"hexsha": "a97019530393707c172b02004518a2d3aa3268fb", "size": 4422, "ext": "py", "lang": "Python", "max_stars_repo_path": "projects/woodkraft/Part2/recommendation-service/recommendation-service.py", "max_stars_repo_name": "panlm/karbon-platform-services", "max_stars_repo_head_hexsha": "80a0cffb81bcfaedb9546e806e0f461b... |
# Copyright (c) 2011-2014 by California Institute of Technology
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice,... | {"hexsha": "3657a30ddfa7cd210fedd1680cfd17c837b5bd43", "size": 5570, "ext": "py", "lang": "Python", "max_stars_repo_path": "polytope/plot.py", "max_stars_repo_name": "samuelkolb/polytope", "max_stars_repo_head_hexsha": "4b8844f565b6cfb71803d336eb2fb3b1702ad800", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/9/21 14:23
# @Author : ganliang
# @File : npmatlib.py
# @Desc : 矩阵
import numpy as np
import numpy.matlib as ml
print ("empty")
print(ml.empty((3, 3), dtype=np.int, order='F'))
print(ml.empty((3, 3), dtype=np.int, order='C'))
print ("\nzeros")
pri... | {"hexsha": "31a1cdf7fae5be7c5a1bd6d3dafd6d56e8dec91a", "size": 712, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/numpy/npmatlib.py", "max_stars_repo_name": "mumupy/pythonlearn", "max_stars_repo_head_hexsha": "5be03d156f11af2467a6052a476de4b706f7d53a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Orders.Total.Definition
open import Orders.Partial.Definition
open import Setoids.Setoids
open import Setoids.Orders.Partial.Definition
open import Setoids.Orders.Total.Definition
open import Functions.Definition
open import Set... | {"hexsha": "3290a14407d76955c104ffdbf3b244331194f72b", "size": 2037, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Setoids/Orders/Total/Lemmas.agda", "max_stars_repo_name": "Smaug123/agdaproofs", "max_stars_repo_head_hexsha": "0f4230011039092f58f673abcad8fb0652e6b562", "max_stars_repo_licenses": ["MIT"], "max_... |
[STATEMENT]
lemma eventually_weak_subseq:
fixes u::"nat \<Rightarrow> nat"
assumes "(\<lambda>n. real(u n)) \<longlonglongrightarrow> \<infinity>" "eventually P sequentially"
shows "eventually (\<lambda>n. P (u n)) sequentially"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<forall>\<^sub>F n in sequentially... | {"llama_tokens": 1573, "file": "Ergodic_Theory_SG_Library_Complement", "length": 20} |
""" This module contains functions to support our AE analyses.
"""
__author__ = "mjp,ef"
__date__ = "dec, 2017"
import math, random
import numpy as np
from numpy.linalg import norm
from scipy.stats import ortho_group
import pandas as pd
import pdb, unittest
from gaas import gaas
#-------------------------------... | {"hexsha": "fd897d02dd5472f5db47b1bc3e312388e4240edd", "size": 15478, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ae_utils.py", "max_stars_repo_name": "mjpekala/ae-stability-study", "max_stars_repo_head_hexsha": "53023fca1e2d01192617393b3dc4e1d4d29c348e", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
import numpy as np
import math
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
def _make_funcs(p, v):
def m(i):
return lambda t: p[i] + t * v[i]
return m(0), m(1), m(2)
def make_graph(file_path, x, y):
lines = plt.plot(x, y)
plt.setp(lines[0], linewidth=4)
plt.savef... | {"hexsha": "d8bbe3924a8c06d8f956d04f2b36d7df3184198d", "size": 2178, "ext": "py", "lang": "Python", "max_stars_repo_path": "Test.py", "max_stars_repo_name": "murphym18/plot-tcpa", "max_stars_repo_head_hexsha": "9da41ffe69a64512fbb0d1f5f77942c98964c239", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_... |
import Base: exp, expm1, log, log10, log1p, sqrt, cbrt, exponent,
significand, sin, sinpi, cos, cospi, tan, sec, cot, csc,
sinh, cosh, tanh, coth, sech, csch,
asin, acos, atan, acot, asec, acsc,
asinh, acosh, atanh, acoth, asech, acsch, sinc, cosc,
+, -,... | {"hexsha": "1ad813c58f9591b4a2dc5e8f94ec6308c024ff5a", "size": 3428, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/array/operators.jl", "max_stars_repo_name": "abx78/Dagger.jl", "max_stars_repo_head_hexsha": "309b9d94be63f55107c77c6da89977f5774a35f4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
"""Defines a Keras model and input function for training."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from keras.applications.inception_v3 import InceptionV3
from keras.preprocessing import image
from keras.applications.inception_v3 import preprocess... | {"hexsha": "ea94af9c602286ce37f6d91359ba15aa701cb326", "size": 1036, "ext": "py", "lang": "Python", "max_stars_repo_path": "GoogleCloudMLEngine/trainer/model.py", "max_stars_repo_name": "jrhender/full-page-screen-capture-chrome-extension", "max_stars_repo_head_hexsha": "aaee882cbd6982cf3e171ed5ec696b8adb3e71a3", "max_s... |
import colorsys
import numpy as np
from PIL import Image
# See https://stackoverflow.com/questions/7274221/changing-image-hue-with-python-pil
def _shift_hue(arr, hout):
r, g, b, a = np.rollaxis(arr, axis=-1)
h, s, v = np.vectorize(colorsys.rgb_to_hsv)(r, g, b)
h = hout
r, g, b = np.vectorize(colorsy... | {"hexsha": "5221e35e4de6e2e8959964200d2a01a771a5deec", "size": 787, "ext": "py", "lang": "Python", "max_stars_repo_path": "taulubot/filter.py", "max_stars_repo_name": "fyysikkokilta/fyysikkospeksi-taulubot", "max_stars_repo_head_hexsha": "0b33789d970dd7e238270dbb4191f996b3e27078", "max_stars_repo_licenses": ["MIT"], "m... |
Add LoadPath ".".
Load BenB.
Load BenB2.
(* ====================================================================== *)
(*
Praktika super TL artifact
======
Authors:
Jozef Coldenhoff s1017656
Charlotte Frenzen s4739760
Nils Golembiewski s1019649
Noah van der Vleuten s1018323
*)
(* =====================... | {"author": "NilsHasNoGithub", "repo": "coq_formatter", "sha": "88c4480e87834c334beee09f69170c9e0ae491fa", "save_path": "github-repos/coq/NilsHasNoGithub-coq_formatter", "path": "github-repos/coq/NilsHasNoGithub-coq_formatter/coq_formatter-88c4480e87834c334beee09f69170c9e0ae491fa/out.v"} |
import matplotlib.pyplot as plt
import random as ran
import numpy as np
import os
from scipy import stats
result=0
choice=0
rate=0
resultado=False
exit=False
min = 0
maximo = 36
cantidadTiradas = 80
cantidadJuegos = 5
ruleta = []
capital = 1000
def CrearRuleta():
ruleta.extend(range(min,maximo))
print("La... | {"hexsha": "2156263feb1d9c56305110f89123fdc4b2d2b934", "size": 4902, "ext": "py", "lang": "Python", "max_stars_repo_path": "TP1_2Estrategias-dlambert_v2.py", "max_stars_repo_name": "NicolasBologna/Simulacion", "max_stars_repo_head_hexsha": "d407379b182a373d9f28ca74c25472e711b5fc0f", "max_stars_repo_licenses": ["MIT"], ... |
[STATEMENT]
lemma (in Ring) prime_nprod_exc:"\<lbrakk>prime_ideal R P; \<forall>i \<le> n. f i \<in> carrier R;
\<forall>l \<le> n. f l \<notin> P\<rbrakk> \<Longrightarrow> nprod R f n \<notin> P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>prime_ideal R P; \<forall>i\<le>n. f i \<in> ca... | {"llama_tokens": 200, "file": "Group-Ring-Module_Algebra4", "length": 1} |
# -*- coding: utf-8 -*-
# MIT License
#
# Copyright(c) 2019 Aalborg University
# Joakim Bruslund Haurum, May 2019
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files(the "Software"), to deal
# in the Software without restriction, inclu... | {"hexsha": "ae9b0ebd55edacc2499ed118741f09d6d41de239", "size": 8456, "ext": "py", "lang": "Python", "max_stars_repo_path": "Analysis/utils.py", "max_stars_repo_name": "chrisbahnsen/aau-virada", "max_stars_repo_head_hexsha": "9c5a65fdbbba6d80a6d8058bf520664e8663350d", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
CoInductive stream : Set :=
| cons : nat -> stream -> stream.
CoFixpoint ones : stream := Cons 1 ones.
| {"author": "chemouna", "repo": "coq-experiment", "sha": "a9736d13a042a334422412a1d4d41b0d557cc1f4", "save_path": "github-repos/coq/chemouna-coq-experiment", "path": "github-repos/coq/chemouna-coq-experiment/coq-experiment-a9736d13a042a334422412a1d4d41b0d557cc1f4/experiment1.v"} |
print("Running area coverage example 1\nUsing source files for package imports\nPARAMETERS:\
Using default hardcoded weight_dicts (listed in swarm_tasks/logs)")
import sys,os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),'../../..')))
print(sys.path)
import swarm_tasks
#Set demo paramete... | {"hexsha": "3838d4f527d8c9570acef4f74bca934e26952b72", "size": 1284, "ext": "py", "lang": "Python", "max_stars_repo_path": "swarm_tasks/Examples/full_tasks/area_cvg-1.py", "max_stars_repo_name": "rmvanarse/swarm_tasks", "max_stars_repo_head_hexsha": "3335297ba8fcdbff756ae519002bcce919d54a84", "max_stars_repo_licenses":... |
//=======================================================================
// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
//
// This file is part of the Boost Graph Library
//
// You should have received a copy of the License Agreement for the
// Boost Graph Library along with the software; see... | {"hexsha": "4a47c8c4480f65ef4f847bd219fb7c5df4d5c545", "size": 4318, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "sdk/boost_1_30_0/libs/graph/example/kevin-bacon.cpp", "max_stars_repo_name": "acidicMercury8/xray-1.0", "max_stars_repo_head_hexsha": "65e85c0e31e82d612c793d980dc4b73fa186c76c", "max_stars_repo_lice... |
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | {"hexsha": "c3a53b381ec79c397c325dbea739240be51d0e61", "size": 2536, "ext": "py", "lang": "Python", "max_stars_repo_path": "jax/experimental/jax2tf/examples_eval/converters.py", "max_stars_repo_name": "iolloj/jax", "max_stars_repo_head_hexsha": "1b80feea6acf758fd9dc3e616e8efcb8db831ce9", "max_stars_repo_licenses": ["Ap... |
import numpy as np
from tqdm import *
from utils import DataLoaderX
from dataset import collate
from math import *
def prediction(data, model, batch_size, cuda):
data_loader = DataLoaderX(data, batch_size=batch_size, collate_fn=collate, num_workers=0)
model.training = False
iterator = tqdm(data_loader)
... | {"hexsha": "d187fe47d5524b63a0f74b45076d6dc9c23a3d02", "size": 1556, "ext": "py", "lang": "Python", "max_stars_repo_path": "predict.py", "max_stars_repo_name": "SuperbTUM/RAW-image-denoising", "max_stars_repo_head_hexsha": "9f81be8da6a576f641022707d98b8c37f5c599ab", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
c..............................................................................
subroutine SetUniOutPres(BC)
include "common.h"
include "mpif.h"
include "auxmpi.h"
integer BCfaceNode(nshg)
integer nBCfaceNode
integer isfID
real*8 BC(nshg,ndofB... | {"hexsha": "2121a836dcc42f0c1a0f19e37f0c1127cdbcf010", "size": 2706, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "phSolver/common/BCprofile2.f", "max_stars_repo_name": "yangf4/phasta", "max_stars_repo_head_hexsha": "a096094f33b98047de0a2e28225c4d74875a88d8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s... |
@testset "$TEST $G" begin
g5 = DG(4)
add_edge!(g5,1,2); add_edge!(g5,2,3); add_edge!(g5,1,3); add_edge!(g5,3,4)
@test degree_centrality(g5) == [0.6666666666666666, 0.6666666666666666, 1.0, 0.3333333333333333]
@test in_degree_centrality(g5, normalize=false) == [0.0, 1.0, 2.0, 1.0]
@test out_degree_centrality(g5; norma... | {"hexsha": "a2e9c026f6a2b7dd27195744427990e4034033a4", "size": 371, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/centrality/degree.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Erdos.jl-90d7349d-81aa-5495-813a-883243abfe31", "max_stars_repo_head_hexsha": "2eb248772a05eac35823a07373dd5644913c... |
from __future__ import print_function
from builtins import str, input, object
from past.builtins import basestring
from copy import copy
from datetime import datetime, date, timedelta
from dateutil.relativedelta import relativedelta # for doctest
from email.mime.text import MIMEText
from email.mime.multipart import MI... | {"hexsha": "0f74532e355a9c3a296ffc035da46d4835257b84", "size": 20676, "ext": "py", "lang": "Python", "max_stars_repo_path": "airflow/utils.py", "max_stars_repo_name": "dtardoin/airflow", "max_stars_repo_head_hexsha": "4d7f413c7db3ffdb1236e7799e4fe647842e5dbd", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count... |
from multiprocessing import set_start_method, cpu_count
#set_start_method('forkserver')
import os
os.environ["OMP_NUM_THREADS"] = str(cpu_count()) # or to whatever you want
from argparse import ArgumentParser
from datetime import datetime
from sklearn.model_selection import train_test_split
from sklearn.metrics impo... | {"hexsha": "b74a2208d65ec54ba76e1cfbd3263fb8ed023157", "size": 15910, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python Scripts/spitzer_cal_NALU_train.py", "max_stars_repo_name": "exowanderer/SpitzerDeepLearningNetwork", "max_stars_repo_head_hexsha": "37f3ca1731b05f64ec6080bf9e333c7a491840f8", "max_stars_re... |
# coding: utf-8
# In[6]:
import numpy as np
import pandas as pd
import nltk
from nltk.collocations import *
import scipy
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.cross_validation import train_test_split
from sklearn import l... | {"hexsha": "de35e3dce593d1026e170987d99b9cae4bc94093", "size": 2329, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/ali/ali06/phi_ali06.py", "max_stars_repo_name": "Iolaum/Phi1337", "max_stars_repo_head_hexsha": "c73b01cb85c0187ed5c23c672d4f3d05a6934a9f", "max_stars_repo_licenses": ["Apache-2.0"], "max_... |
[STATEMENT]
lemma generate_valid_stateful_policy_IFSACS_2_all_security_requirements_fulfilled_IFS: assumes validReqs: "valid_reqs M"
and wfG: "wf_graph G"
and high_level_policy_valid: "all_security_requirements_fulfilled M G"
and edgesList: "(set edgesList) \<subseteq> edges G"... | {"llama_tokens": 2626, "file": "Network_Security_Policy_Verification_TopoS_Stateful_Policy_Algorithm", "length": 18} |
import time
import pandas as pd
from selenium import webdriver
from bs4 import BeautifulSoup
from urllib.parse import urljoin
import numpy
start = time.time()
# initialize the list of all the data you need through lists
urls = []
name = []
types = []
duration = []
difficulty_level = []
Course_description = []
platfor... | {"hexsha": "19405bf77884540846d90068e8f9053c6aac7f5d", "size": 1708, "ext": "py", "lang": "Python", "max_stars_repo_path": "Data/Stanford/StanFord_main.py", "max_stars_repo_name": "paritoshtripathi935/Savo", "max_stars_repo_head_hexsha": "40f41912d4d59765d8e4b60cdd76035f0406cc1f", "max_stars_repo_licenses": ["MIT"], "m... |
LOGICAL FUNCTION DELCTG( PAR1, PAR2, PAR3 )
C
C SLICOT RELEASE 5.5.
C
C Copyright (c) 2002-2012 NICONET e.V.
C
C PURPOSE
C
C Void logical function for DGGES.
C
DOUBLE PRECISION PAR1, PAR2, PAR3
C
DELCTG = .TRUE.
RETURN
END
| {"hexsha": "2d9d5fbfcf22c1785f1a9be701f059e6b2359b09", "size": 286, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "External/SLICOT/delctg.f", "max_stars_repo_name": "bgin/MissileSimulation", "max_stars_repo_head_hexsha": "90adcbf1c049daafb939f3fe9f9dfe792f26d5df", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import open3d as o3d
from sys import argv, exit
from PIL import Image
import math
import numpy as np
import copy
import os
import re
import cv2
import matplotlib.pyplot as plt
from shapely.geometry import Point, Polygon
from scipy.spatial.transform import Rotation as R
def natural_sort(l):
convert = lambda text: in... | {"hexsha": "7bc29592c391c77ceeeb5b441fc25c99a7292fc4", "size": 4979, "ext": "py", "lang": "Python", "max_stars_repo_path": "quantitative/getGTCorr.py", "max_stars_repo_name": "UditSinghParihar/d2-net", "max_stars_repo_head_hexsha": "b3592beebe6759cf4cc1acdfd23d603ef059ef30", "max_stars_repo_licenses": ["BSD-3-Clause-Cl... |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | {"hexsha": "d9dc1b1ddad4e6599491fdedbb4300665412e5fe", "size": 99307, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/python/ops/resource_variable_ops.py", "max_stars_repo_name": "TheRakeshPurohit/tensorflow", "max_stars_repo_head_hexsha": "bee6d5a268122df99e1e55a7b92517e84ad25bab", "max_stars_repo_li... |
import os
import numpy as np
# Tiles are 10x10 squares
TILE_LENGTH = 10
# 2d array representing the seamonster
SEA_MONSTER = np.array([
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "#", " "],
["#", " ", " ", " ", " ", "#", "#", " ", " ", " ", " ", "#", "#", " ", " ",... | {"hexsha": "9269dde9f6202e3cedcbeb7e1c3e57a3e5493bc0", "size": 11973, "ext": "py", "lang": "Python", "max_stars_repo_path": "20/solution.py", "max_stars_repo_name": "poscar/advent-of-code-2020", "max_stars_repo_head_hexsha": "adcded980ab6bb103f498029f7c40d44f16c62a8", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import unittest
import numpy as np
from pyrepo import weighting_methods as mcda_weights
# Test for CRITIC weighting
class Test_CRITIC(unittest.TestCase):
def test_critic(self):
"""Test based on paper Tuş, A., & Aytaç Adalı, E. (2019). The new combination with CRITIC and WASPAS methods
for the ti... | {"hexsha": "31df4101c7747d50aa165fb378314bf743841781", "size": 3940, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_weights.py", "max_stars_repo_name": "energyinpython/pre-pyrepo", "max_stars_repo_head_hexsha": "92e44594e12d1110247f011e51734e5ce1fe0b8e", "max_stars_repo_licenses": ["MIT"], "max_stars... |
! eggx.f90
!
! Fortran 2003 ISO C binding interfaces to the EGGX graphics library.
! For more information on EGGX/ProCALL, see:
!
! https://www.ir.isas.jaxa.jp/~cyamauch/eggx_procall/
!
! Author: Philipp Engel
! Licence: ISC
module eggx
use, intrinsic :: iso_c_binding
implicit none
private
public ::... | {"hexsha": "dd9f012b9de0161041e2b0b4bc3eb658b01fa649", "size": 1604, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/eggx.f90", "max_stars_repo_name": "interkosmos/eggx-procall-2003", "max_stars_repo_head_hexsha": "9741f8237c07041dfffde566d9e04604885ecc37", "max_stars_repo_licenses": ["0BSD"], "max_stars_c... |
Block <- java.type('net.minecraft.block.Block')
AbstractBlock <- java.type('net.minecraft.block.AbstractBlock')
AbstractBlockSettingsArray <- java.type('net.minecraft.block.AbstractBlock$Settings[]')
ClassArray <- java.type('java.lang.Class[]')
Material <- java.type('net.minecraft.block.Material')
BlockItem <- java.typ... | {"hexsha": "7b5f1083572e56c9b8e92af5fed4b77ddb2ad834", "size": 2301, "ext": "r", "lang": "R", "max_stars_repo_path": "src/main/resources/main.r", "max_stars_repo_name": "leo60228/QuiltLangJS", "max_stars_repo_head_hexsha": "61b2ef1f4409a0fb10e46ec23e85be21cf6cb857", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
\subsection{Project Management Summary}
\subsubsection{Time Management Record}
To effectively manage time over the course of the project the group constructed
a gannt chart to track the components tasks of the project and to fit those tasks into the
tight schedule defined by the project guidelines. To build the gantt... | {"hexsha": "aacb551c3719bf0dc792d2b9724723531953fadc", "size": 4647, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/report/control.tex", "max_stars_repo_name": "chrissorchard/malucrawl", "max_stars_repo_head_hexsha": "cb9633baff8752f3e043a2cfdb91cde868666ae2", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
function svgClipping(s, path)
% Adds a clipping path
% PRELIMINARY IMPLEMENTATION (Parameters may change)
%
% svgClipping(s, path)
% Parameters:
% s : Array of plot object handles
% path : Clipping path nx3 or nx2.
for i = 1:length(s)
userdata = get(s(i),'UserData');
userdata.svg.ClippingPath = path;
se... | {"author": "marianux", "repo": "ecg-kit", "sha": "c8e3de47c54a9214138143676d2aa546b0540dd2", "save_path": "github-repos/MATLAB/marianux-ecg-kit", "path": "github-repos/MATLAB/marianux-ecg-kit/ecg-kit-c8e3de47c54a9214138143676d2aa546b0540dd2/common/plot2svg/svgClipping.m"} |
#! /usr/bin/env python
"""U.S. Strike Duration Data"""
__all__ = ['COPYRIGHT','TITLE','SOURCE','DESCRSHORT','DESCRLONG','NOTE', 'load']
__docformat__ = 'restructuredtext'
COPYRIGHT = """This is public domain."""
TITLE = __doc__
SOURCE = """
This is a subset of the data used in Kennan (1985). It was orig... | {"hexsha": "4f6617757b5b767a8be8110655a0e91b95367409", "size": 2058, "ext": "py", "lang": "Python", "max_stars_repo_path": "scikits/statsmodels/datasets/strikes/data.py", "max_stars_repo_name": "matthew-brett/statsmodels", "max_stars_repo_head_hexsha": "915c9dc2d762c5592ac17a7cf5f1cc957fcbde1c", "max_stars_repo_license... |
import numpy as np
import sys
import matplotlib.ticker as mticker
def file2stats(filename):
#f=open(filename)
f=open('results/'+filename)
print('WARNING: Results read have not been regenerated')
lines = f.readlines()
f.close()
A = []
for line in lines:
A.append(float(line[:-1]))
... | {"hexsha": "5655bba723e5a197e20d61cd9fe7f3055c7eb86f", "size": 6952, "ext": "py", "lang": "Python", "max_stars_repo_path": "data-efficientML/artificialCase/generateLatexTable.py", "max_stars_repo_name": "NREL/Phase-space-sampling", "max_stars_repo_head_hexsha": "b3b65ce4fad962f2204c4452c844a6b284e048ae", "max_stars_rep... |
Require Import Privilege.
Require Import Axioms.
Require Import Ctl.BinaryRelations.
Require Import Glib.Glib.
Open Scope string_scope.
(* Dynamic environments (partial maps from variables to arbitrary types) *)
(* TODO: abstract as a section variable? *)
Definition var := string.
Definition comp := string.
Defin... | {"author": "gjurgensen", "repo": "thesis", "sha": "fee5e9e2ba728f3707eee7ad9d90837c25cf7764", "save_path": "github-repos/coq/gjurgensen-thesis", "path": "github-repos/coq/gjurgensen-thesis/thesis-fee5e9e2ba728f3707eee7ad9d90837c25cf7764/src/TransitionSystems.v"} |
#define BOOST_TEST_MAIN
#include <boost/test/included/unit_test.hpp>
// just a blank file to get the unit test main function going
| {"hexsha": "a112035a257edb423a2e3a2115b2d7b8fcd5c1d6", "size": 132, "ext": "cc", "lang": "C++", "max_stars_repo_path": "t/all.t.cc", "max_stars_repo_name": "dru/libroutez", "max_stars_repo_head_hexsha": "ef1b564db024b10b83eb531ce3ff925a5a32fa21", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1.0, "max_stars_re... |
import gym
import os
import numpy as np
from stable_baselines3 import SAC, PPO, A2C
from testEnv import TestEnvironment
from sac import create_model_SAC
from ppo import create_model_PPO
from a2c import create_model_A2C
env = TestEnvironment()
def load_model(algorithm, model_name):
model = algorithm.load(model_nam... | {"hexsha": "ab59a899ed5b21fdd7863ae61d979fdea7fbe834", "size": 2266, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/rl_techniques_baseline3/main.py", "max_stars_repo_name": "anushaihalapathirana/RL-Gym-ANM-tool", "max_stars_repo_head_hexsha": "2dee2da9be26f512179d313c985832718a34042b", "max_stars_repo_licen... |
from textwrap import dedent
from numpy.testing import assert_array_equal
import pytest
from svmlight_loader import (
InvalidSVMLight,
classification_from_lines,
multilabel_classification_from_lines,
regression_from_lines,
)
all_loaders = pytest.mark.parametrize(
"from_lines", [
classific... | {"hexsha": "41999d4f3610f505a8327e348061cdaaeed6a518", "size": 6535, "ext": "py", "lang": "Python", "max_stars_repo_path": "svmlight_loader/tests/test_api.py", "max_stars_repo_name": "Julian/svmlight-loader", "max_stars_repo_head_hexsha": "bbd470063d6b0376fd03e827fc1ac09e4632a939", "max_stars_repo_licenses": ["MIT"], "... |
[STATEMENT]
theorem justify_fifo_push_relabel_prep_run_split:
"fifo_push_relabel el s t =
do {
pr \<leftarrow> fifo_push_relabel_prepare_impl el s t;
case pr of
None \<Rightarrow> return None
| Some (N,ami,c,cf) \<Rightarrow> do {
cf \<leftarrow> fifo_push_relabel_run_impl s t N ami cf;
... | {"llama_tokens": 620, "file": "Prpu_Maxflow_Fifo_Push_Relabel_Impl", "length": 2} |
# -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2019 Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
... | {"hexsha": "2acab3dc29cec0910fb935157e696bef801d454f", "size": 11037, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_uniquac.py", "max_stars_repo_name": "brunokiyoshi/thermo", "max_stars_repo_head_hexsha": "5b31d21fd087dd0fc3302f023c5f3c52d9cbee3b", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import numpy as np
class EMatch:
"""
Construct a class to compute E_Match as in formula 10 using a function to pass directly the personalized blendshapes
in delta space delta_p (dp)
k:= num_of_blendshapes
f:= num_frames
n:= num_features
"""
def __init__(self, tckf, uk, daf):
... | {"hexsha": "4bca9789a7fd0a14ed4b378112c0432f88330415", "size": 5832, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/EMatch.py", "max_stars_repo_name": "johndpope/FacialRetargeting", "max_stars_repo_head_hexsha": "5fb0c1da6af6c3d59aef264f567bfa7a244d0764", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
/* Copyright (c) 2018, 2019, 2020 BlinkTrade, Inc.
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */
#ifndef TRIAL_IOFIBER_FIBER_H
#define TRIAL_IOFIBER_FIBER_H
#include <type_traits>
#include <stdexcept>
#inclu... | {"hexsha": "9a0e533f38c01ed0c31c44a17c90d1da4fc431b1", "size": 38445, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/trial/iofiber/fiber.hpp", "max_stars_repo_name": "blinktrade/iofiber", "max_stars_repo_head_hexsha": "c1d883ee0c5b4d90432a4af993469455d75dc626", "max_stars_repo_licenses": ["BSL-1.0"], "max... |
import os
import uvicorn
from fastapi import FastAPI
from fastapi.logger import logger
from pydantic import BaseModel
import numpy as np
import vaex
# Instantiate the web application
app = FastAPI()
class Data(BaseModel):
instances: list = []
parameters: dict
# These will be some global parameters, essen... | {"hexsha": "310fe5909b405e6c17d39a1d346cfe396b1e6c0f", "size": 2046, "ext": "py", "lang": "Python", "max_stars_repo_path": "medium-gcp-ai-platform/ai-platform-deploy/docker/app.py", "max_stars_repo_name": "triper1022/vaex-examples", "max_stars_repo_head_hexsha": "16c6abc9be3e12889f0bcbee5d91410a72977a81", "max_stars_re... |
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 21 11:27:40 2019
@author: ott
"""
#%% Load stuff
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from tg_set_globalplotting import tg_set_globalplotting
dat = pd.read_csv('../Results/preprocessed_results.csv')
tg_set_globalplotting(style='frontier... | {"hexsha": "ef78f8b7e365309673a677f9012562ffce66a72e", "size": 7430, "ext": "py", "lang": "Python", "max_stars_repo_path": "Code/tg_offer_stats.py", "max_stars_repo_name": "fmott/two_goal_task", "max_stars_repo_head_hexsha": "b2a7948ced432b48566d8d00e97e83a65fba7ca5", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
function check_domterm()
global isDomterm
isDomterm = true
try
if Sys.isunix()
run(`domterm is-domterm`)
else
println("Domterm can only run in Unix or WSL")
end
catch err
println("Not running in domterm\n")
isDomterm = false
end
end
"... | {"hexsha": "c6f0be8d6a9fedbde08e8491c3a89fe43272fd04", "size": 4616, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utilities.jl", "max_stars_repo_name": "jingyuewang/DomTerm.jl", "max_stars_repo_head_hexsha": "c5d169644227873dea6a58731884f133ddcdafa2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import numpy as np
import tensorflow as tf
from libs.utils.calc_ious import bbox_giou, bbox_iou
__all__ = ['get_losses']
def get_losses(pred_raw, pred_decoded, label, bboxes, stride, iou_loss_thr, num_classes):
"""
Args:
pred_decoded: decoded yolo output
pred_raw: raw yolo output
"""
bat... | {"hexsha": "5a62dec31daa22b5e5093a4b232c09db330b5df1", "size": 2694, "ext": "py", "lang": "Python", "max_stars_repo_path": "libs/losses.py", "max_stars_repo_name": "devbruce/yolov3-tf2", "max_stars_repo_head_hexsha": "2361685cc8a12f341de441bb3462eb3e7a825bc4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
import numpy as np
from scipy.io import savemat
from pandas.api.types import is_datetime64_any_dtype
from neslter.parsing.utils import datetime_to_datenum
def df_to_mat(df, filename, convert_dates=True):
data = {}
for c in df.columns:
if convert_dates and is_datetime64_any_dtype(df[c]):
va... | {"hexsha": "6024f2b7e995f78619977129323379bc5bac12ee", "size": 473, "ext": "py", "lang": "Python", "max_stars_repo_path": "nlweb/api/utils.py", "max_stars_repo_name": "WHOIGit/nes-lter-ims", "max_stars_repo_head_hexsha": "d4cc96c10da56ca33286af84d669625b67170522", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | {"hexsha": "3b376beb69017aec16f93e56e13a9aa3704e77e0", "size": 13780, "ext": "py", "lang": "Python", "max_stars_repo_path": "render_vis.py", "max_stars_repo_name": "isabella232/lasr", "max_stars_repo_head_hexsha": "bedc8be2bb37d954fdd9e8b8aaddcfda6495cf22", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ... |
import os
import platform
import sys
from pathlib import Path
import numpy as np
import pandas as pd
import pytest
from imio.load import load_any
from brainreg.cli import main as brainreg_run
test_data_dir = Path(os.getcwd()) / "tests" / "data"
brain_data_dir = test_data_dir / "brain data"
expected_niftyreg_output_... | {"hexsha": "dccc12d5443b52a47affa82524a772d5b085a5e3", "size": 2324, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/tests/test_integration/test_registration.py", "max_stars_repo_name": "WyssCenter/brainreg", "max_stars_repo_head_hexsha": "ab93567bae211f3d569478b2191c1a82aef22b6b", "max_stars_repo_licenses... |
#!/usr/bin/env python
"""This file calculates the cylinder geometry given the top dead center volume the sweept volume and the bore and stroke
and the location within the engine cylce given the crank angle Depictions of the geometry and equations can by found in
Internal Combustion Engine Fundementals, Heywood, page 4... | {"hexsha": "109442d1e8346b067e1b62a92efddef04a48edb8", "size": 4463, "ext": "py", "lang": "Python", "max_stars_repo_path": "pypow/thermodynamics/Cylinder_Geometry.py", "max_stars_repo_name": "johnkittelman/pypow", "max_stars_repo_head_hexsha": "388932556b2c3acd893edc3f4b5943f36998afce", "max_stars_repo_licenses": ["MIT... |
%
% lellipf(phi, k, errtol)
%
% Inputs:
%
% phi Input angle vector size 1 or 1xN.
% k Input parameter vector size 1 or 1xN.
% errtol Error tolerance for Carlson's algorithms.
%
% Matlab function to compute Legendre's (incomplete) elliptic integral
% F(phi, k). Uses a vectorized implementation of Car... | {"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/3705-ellipticintegrals-zip/Elliptic_Integral... |
//
// Copyright (c) 2000-2010
// Joerg Walter, Mathias Koch, Gunter Winkler, David Bellot
// Copyright (c) 2014, Athanasios Iliopoulos
//
// 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)
//
// The authors g... | {"hexsha": "882997aed2bfad776a37bd9343f0f0aff8e98b29", "size": 215376, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "Pods/Headers/Private/GeoFeatures/boost/numeric/ublas/matrix.hpp", "max_stars_repo_name": "xarvey/Yuuuuuge", "max_stars_repo_head_hexsha": "9f4ec32f81cf813ea630ba2c44eb03970c56dad3", "max_stars_rep... |
#
# gemini_python
#
# primtives_gmos_longslit.py
# ------------------------------------------------------------------------------
from copy import copy, deepcopy
from importlib import import_module
imp... | {"hexsha": "82e5c493520f2ec26db6d2b7133b28afe80c9409", "size": 34203, "ext": "py", "lang": "Python", "max_stars_repo_path": "geminidr/gmos/primitives_gmos_longslit.py", "max_stars_repo_name": "Luke-Ludwig/DRAGONS", "max_stars_repo_head_hexsha": "d4ff4e462f64d547fbb727627875b72664255d1e", "max_stars_repo_licenses": ["BS... |
(* This Isabelle theory is produced using the TIP tool offered at the following website:
https://github.com/tip-org/tools
This file was originally provided as part of TIP benchmark at the following website:
https://github.com/tip-org/benchmarks
Yutaka Nagashima at CIIRC, CTU changed the TIP output th... | {"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/UR/TIP_with_Proof/TIP15/TIP15/TIP_sort_nat_HSort2Sorts.thy"} |
## activate project environment
using Pkg
Pkg.activate(@__DIR__)
Pkg.instantiate()
## compute relative performance
using DelimitedFiles
using Measurements
function compute_relative_performance(filename)
header = "# Polydeg Primitive/conservative-variables-mean std"
data = readdlm(filename, comments=true)
cons... | {"hexsha": "94ac9f69fb4b44a4c003beec3349ce573325b908", "size": 980, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "code/primitive_variables/compute_ratios.jl", "max_stars_repo_name": "trixi-framework/paper-2021-EC_performance", "max_stars_repo_head_hexsha": "4c2f8ca8db56ec967de9290cd68af2a2e9a9d2df", "max_stars_... |
# -*- coding: utf-8 -*-
# @Author: Theo Lemaire
# @Email: theo.lemaire@epfl.ch
# @Date: 2020-09-24 15:30:34
# @Last Modified by: Theo Lemaire
# @Last Modified time: 2021-03-23 00:36:39
import os
import pickle
import numpy as np
from scipy.integrate import odeint
import matplotlib.pyplot as plt
from PySONIC.core i... | {"hexsha": "14b57a8f1b1f55fd9815131f2cfa5f0eaa68b495", "size": 24708, "ext": "py", "lang": "Python", "max_stars_repo_path": "PySONIC/multicomp/benchmark.py", "max_stars_repo_name": "scbao/pysonic", "max_stars_repo_head_hexsha": "b4ccaf49772d55f632a0995c411d1cc042d71903", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
import numpy as np # Reading CSV ans saving vectors as binary files
import tensorflow as tf # Tensorflow
from tensorflow import keras # Simplified Tensorflow Framework
from tensorflow.keras import regularizers
from tensorflow.keras import callbacks
import matplotlib.pyplot as plt
def plotWeights(model):... | {"hexsha": "40f89e3665c79536e4de921ac5c550d9be55785f", "size": 2823, "ext": "py", "lang": "Python", "max_stars_repo_path": "metricsML/MachineLearning.py", "max_stars_repo_name": "Elscha/MetricsML", "max_stars_repo_head_hexsha": "2ecbc42ad7bd2465f4f75658f44452ea5c552c3b", "max_stars_repo_licenses": ["Apache-2.0"], "max_... |
#
# Copyright 2021 IBM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
#... | {"hexsha": "6f7ab6c64cdada07f05535dbb6d6c2443b161e02", "size": 2717, "ext": "py", "lang": "Python", "max_stars_repo_path": "codeflare/pipelines/utils.py", "max_stars_repo_name": "snyderbrian/codeflare", "max_stars_repo_head_hexsha": "414f15c6fc52c1885df51491e9eebc3a2cb73bda", "max_stars_repo_licenses": ["Apache-2.0"], ... |
import pandas as pd
import tempfile
import skbio
from skbio.sequence import Sequence
import os
import subprocess
import platform
import numpy as np
if platform.system() == 'Windows':
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = subp... | {"hexsha": "0d6ab030d4b74182bdf7e98eefd677d23d55294d", "size": 3047, "ext": "py", "lang": "Python", "max_stars_repo_path": "muscle.py", "max_stars_repo_name": "victorfica/utils", "max_stars_repo_head_hexsha": "b61935a860838a0e70afde7c9ecf2c68f51a2c4b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_star... |
import matplotlib.pyplot as plt
import numpy as np
from CEIT.EITPlotter import EITPlotter
from CEIT.Solver import Solver
solver = Solver()
plotter = EITPlotter()
# generate random signal
delta_V = np.random.rand(240)
fig, ax = plt.subplots(nrows=1, ncols=1)
plotter.plot_detection_area_map(solver.solve(delta_V), ax, ... | {"hexsha": "5563d21c224493c38cb2181d17d8f7008ad85c38", "size": 352, "ext": "py", "lang": "Python", "max_stars_repo_path": "Example_04_solver.py", "max_stars_repo_name": "zehao99/CEIT", "max_stars_repo_head_hexsha": "06f5a409a93073bb7cfd22afb3a39f500e5a24d8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "ma... |
from builtins import print as pr
import numpy as np
from matplotlib import pyplot as plt
color_coll = {'white': "\033[37;1m",
'red': "\033[31;1m",
'green': "\033[33;1m",
'blue': "\033[34;1m"}
def print(value, color="default"):
if color == "default":
... | {"hexsha": "9bdb77ec9e9899256a52541f3e505f2f58c271da", "size": 818, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/server_design/algorithms/compressor/miscellaneous/tools.py", "max_stars_repo_name": "robertpardillo/Funnel", "max_stars_repo_head_hexsha": "f45e419f55e085bbb95e17c47b4c94a7c625ba9b", "max_stars... |
import numpy as np
from . import coordinates, rotations, expansions
class CoaxialTranslation(coordinates.OwnerMixin):
_default_output_type = expansions.Expansion
def __init__(self, input_order, output_order, position=None, radius=None, wavenumber=None, defer_evaluation=False):
self._input_order = inp... | {"hexsha": "ffde7ff3dfeab4079ab980de24f867531c159951", "size": 16573, "ext": "py", "lang": "Python", "max_stars_repo_path": "shetar/translations.py", "max_stars_repo_name": "AppliedAcousticsChalmers/Spherical-Helmholtz-Translation-and-Rotation", "max_stars_repo_head_hexsha": "84c5b51dab5d7ee26886ece44945a5d887bff369", ... |
from __future__ import print_function, absolute_import, unicode_literals, division
from collections import OrderedDict
import csv
from sklearn.metrics import accuracy_score
from amt.Test_data import get_miniclips_video_stats, print_stats_actions_miniclips, get_actions_stats
from amt.settings import *
impo... | {"hexsha": "c368f396e3b0ab5e812f54b8ec3c2868adca7f06", "size": 14682, "ext": "py", "lang": "Python", "max_stars_repo_path": "amt/detect_spam.py", "max_stars_repo_name": "MichiganNLP/vlog_action_recognition", "max_stars_repo_head_hexsha": "90790d4ba12e91f32704d04c725e8afb65f40372", "max_stars_repo_licenses": ["MIT"], "m... |
# MIT License: Copyright (c) 2016: Andy Ferris.
# See LICENSE.md for further licensing test
@inline function LinearAlgebra.eigen(S::SymmetricTensor{2, 1, T}) where {T}
@inbounds Eigen(Vec{1, T}((S[1, 1],)), one(Tensor{2, 1, T}))
end
function LinearAlgebra.eigen(S::SymmetricTensor{2, 2, T}) where {T}
@inbounds... | {"hexsha": "5080ff924192e4a44809062a0ded84bc2a711080", "size": 8350, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/eigen.jl", "max_stars_repo_name": "UnofficialJuliaMirror/Tensors.jl-48a634ad-e948-5137-8d70-aa71f2a747f4", "max_stars_repo_head_hexsha": "0a881a8e1739184a0acc3a153f204460588a4746", "max_stars_r... |
@testset "temporal" begin
hod = HoD()
@test hod isa Transform
@test cardinality(hod) == OneToOne()
@testset "Basic" begin
x = collect(DateTime(2020, 1, 1, 9, 0):Hour(1):DateTime(2020, 5, 7, 9, 0))
# Expected result is an hour a day starting and ending on the 9th hour inclusive,
... | {"hexsha": "bcd142596700e44dc7fbeda912140e64d6e1060b", "size": 1143, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/temporal.jl", "max_stars_repo_name": "invenia/Transforms.jl", "max_stars_repo_head_hexsha": "d2204817f0744b1b4cd1dc02f73f19e8228f7873", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3... |
#!/usr/bin/env python
'''
The MIT License (MIT)
Copyright (c) 2019 Kunal Shah
kshah.kunal@gmail.com
'''
# std lib imports
import sys
import time
import numpy as np
import numpy.linalg as la
# plot
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
# Standard ROS message
import rosp... | {"hexsha": "b2fc962421f31f9ce9e99e822a0de45e2e80bb21", "size": 2333, "ext": "py", "lang": "Python", "max_stars_repo_path": "mslquad/scripts/replay.py", "max_stars_repo_name": "StanfordMSL/mslquad", "max_stars_repo_head_hexsha": "c319ecf4ba1063075221b67f12f4e017992f28fc", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
#!python3
import numpy as np
from magLabUtilities.signalutilities.signals import SignalThread, Signal
from magLabUtilities.signalutilities.calculus import integralTrapQuadrature
if __name__ == '__main__':
x = SignalThread(np.array([1,2,4]))
t = SignalThread(np.array([0,1,3]))
intXDx = integralTra... | {"hexsha": "ade03be056b723ec98ef352b8b5ab7b649312909", "size": 360, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/integrals.py", "max_stars_repo_name": "MarkTravers/magLabUtilities", "max_stars_repo_head_hexsha": "e116c8cb627cd82c3b8ba651dd6979b66e568632", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
(* Title: N-Algebras
Author: Walter Guttmann
Maintainer: Walter Guttmann <walter.guttmann at canterbury.ac.nz>
*)
section \<open>N-Algebras\<close>
theory N_Algebras
imports Stone_Kleene_Relation_Algebras.Iterings Base Lattice_Ordered_Semirings
begin
class C_left_n_algebra = bounded_idempotent_left_... | {"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/Correctness_A... |
"""Generates a library with images in Kitti forma"""
import numpy as np
from renderer.library import Library
# Helper functions that load the current library objects
BACK_ORIENT = -np.pi / 2
FRONT_ORIENT = np.pi / 2
#Paths to car and road image directories
FORE_SPACES_FILE = './renderer/imgSampSpaces.pickle' # File... | {"hexsha": "ddcd3d7078a71e9d576abb986942471b247cc420", "size": 14974, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/data_augmentation/renderer/kittiLib.py", "max_stars_repo_name": "BehaviorPredictionTestingPlatform/VerifAI", "max_stars_repo_head_hexsha": "db05f3573c2e7d98c03029c1b4efca93e6b08edb", "ma... |
[STATEMENT]
lemma prefixToLevel_auxPrefixToLevel_auxHigherLevel:
assumes "i \<le> j"
shows "prefixToLevel_aux a i k = prefixToLevel_aux (prefixToLevel_aux a j k) i k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. prefixToLevel_aux a i k = prefixToLevel_aux (prefixToLevel_aux a j k) i k
[PROOF STEP]
using assms... | {"llama_tokens": 204, "file": "SATSolverVerification_Trail", "length": 2} |
# Functions related to the counting bound.
module CountingBound
export countingBound, approxNumMaximalCliques1
"""
Counting bound, based on Shannon's argument.
m: number of edges
w: number of 'wires' -- that is, log2(number of functions),
which is the number of bits needed to specify a function
Returns: av... | {"hexsha": "9fd463dd534844b94af84b2ecd0983e283da9eb5", "size": 3237, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "countingBound/julia/CountingBound.jl", "max_stars_repo_name": "joshtburdick/misc", "max_stars_repo_head_hexsha": "7bb103b4f9d850e3279eb675c6df420aa7b8da22", "max_stars_repo_licenses": ["MIT"], "max... |
"""
Functions relating to processing the Takahashi et al HSC simulations, available at
http://cosmo.phys.hirosaki-u.ac.jp/takahasi/allsky_raytracing/.
"""
import signal
import os.path
import time
import traceback
import urllib.request
import warnings
from collections import namedtuple
import healpy as hp
import numpy... | {"hexsha": "aba46373aaf8067bf995f0236ee33b534372082c", "size": 18555, "ext": "py", "lang": "Python", "max_stars_repo_path": "shear_pcl_cov/simulation.py", "max_stars_repo_name": "robinupham/shear_pcl_cov", "max_stars_repo_head_hexsha": "6afc8bb48f714b87d4b7143575033b9723ef9df4", "max_stars_repo_licenses": ["MIT"], "max... |
[STATEMENT]
lemma w_addrs_vs_type_all_in_vs_type_all:
"(\<Union>ad \<in> w_addrs (vs_type_all P). {(ad, al)|al. \<exists>T. P \<turnstile> ad@al : T}) \<subseteq> {adal. vs_type_all P adal \<noteq> {}}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (\<Union>ad\<in>w_addrs (vs_type_all P). {(ad, al) |al. \<exists>... | {"llama_tokens": 218, "file": "JinjaThreads_MM_JMM_Typesafe", "length": 1} |
# %load data_mafe_EI.py
import sys
import os
import numpy as np
import matplotlib.pyplot as plt
import pickle
import glob
from obspy import UTCDateTime, read, Trace, Stream
from scipy import signal
import pandas as pd
from haversine import haversine
sta_data = pd.read_excel("/sdd1/sta_list.xlsx", sheet_name="Data")
s... | {"hexsha": "0a0d0add54b2d543e05a7844a3152ab279e38674", "size": 15324, "ext": "py", "lang": "Python", "max_stars_repo_path": "generate_data/24h_Data_2018.py", "max_stars_repo_name": "GT-KIM/GCN_seismic_event_classification", "max_stars_repo_head_hexsha": "84b9116a00c08687e3ec17f9b616e61527efcf00", "max_stars_repo_licens... |
import pandas as pd
import datetime
import numpy as np
from tpau_gtfsutilities.gtfs.gtfssingleton import gtfs as gtfs_singleton
from tpau_gtfsutilities.helpers.datetimehelpers import seconds_since_zero
from tpau_gtfsutilities.helpers.datetimehelpers import seconds_to_military
def get_trip_duration_seconds(gtfs_overr... | {"hexsha": "74840f874b7cc8375e22417015acadc33919c579", "size": 7351, "ext": "py", "lang": "Python", "max_stars_repo_path": "tpau_gtfsutilities/gtfs/methods/helpers/triphelpers.py", "max_stars_repo_name": "anniekfifer/tpau-gtfsutils", "max_stars_repo_head_hexsha": "a022d4c8465b7f736023ecc294ff0d7d0201b0e9", "max_stars_r... |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
#
# This code contains snippets of code from
# https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_forest.py
# published under the following license and copyright:
# BSD 3-Clause License
#
# Copy... | {"hexsha": "bc53298ba88b34313b7d2b847b584af073ea3d75", "size": 49979, "ext": "py", "lang": "Python", "max_stars_repo_path": "econml/grf/_base_grf.py", "max_stars_repo_name": "gregorybchris/EconML", "max_stars_repo_head_hexsha": "420dfceba9f8b689450379442edffd214e9e8d6a", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma... |
[STATEMENT]
lemma extended_predist_nonneg [simp, mono_intros]:
"extended_predist x y \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. 0 \<le> extended_predist x y
[PROOF STEP]
unfolding extended_predist_def min_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. 0 \<le> real_of_ereal (if esqrt (extended_G... | {"llama_tokens": 248, "file": "Gromov_Hyperbolicity_Gromov_Boundary", "length": 2} |
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | {"hexsha": "cc7a8ca1bce9189a627c9f70a1cc8bbdb59be0e5", "size": 5340, "ext": "py", "lang": "Python", "max_stars_repo_path": "federatedml/ftl/test/whitebox_plain_gradients_test.py", "max_stars_repo_name": "chenlongzhen/FATE-0.1", "max_stars_repo_head_hexsha": "5a1f316676e77dca8311bb74a26a7623c4a97b86", "max_stars_repo_li... |
import sys
import os
import argparse
import requests
import json
from PIL import Image
import numpy as np
sys.path.append(os.path.abspath(os.path.join("..", "CameraTraps/")))
# sys.path.append(os.path.abspath(os.path.join("..", "CameraTraps/visualization")))
from visualization.visualization_utils import render_detectio... | {"hexsha": "73c6d71944b9254aabb539fb39841749cf86a3b8", "size": 2961, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/make-request.py", "max_stars_repo_name": "tnc-ca-geo/animl-ml", "max_stars_repo_head_hexsha": "95aeb1e99fddf7199692144ef3425340d6b8dc3c", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
'''
Created on 2 juin 2015
@author: Jose Pedro Matos
'''
import numpy as np
import matplotlib.pyplot as plt
def paretoSorting(x0, x1):
fronts=list()
idx=np.lexsort((x1, x0))
fronts.append(list())
fronts[-1].append(idx[0])
for i0 in idx[1:]:
if x1[i0]>=x1[fronts[-1][-1]]:
... | {"hexsha": "32025adb7d250e51db657bbafb3ff9fefd4708e5", "size": 4297, "ext": "py", "lang": "Python", "max_stars_repo_path": "gpu/domination.py", "max_stars_repo_name": "JosePedroMatos/ADAPT-DB", "max_stars_repo_head_hexsha": "98df645d1bcd3f11f5cdb52a3fb0236592e869cd", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
# import scholar.scholar as sch
from scipy import spatial
import numpy as np
import pickle as pkl
### Usage from other files ###
# import utils
# v = utils.vecMaster()
# word_list = v.expand(source_words, expansion_method, epsilon)
# def create_vector_object(sourcefile="data/fasttext.wiki.en.vec", destfile="data/fas... | {"hexsha": "8406fc0fa4580bde34b429e0f3a99d297c0a27be", "size": 7015, "ext": "py", "lang": "Python", "max_stars_repo_path": "regexv/utils.py", "max_stars_repo_name": "BYU-PCCL/regexv", "max_stars_repo_head_hexsha": "0d27d47a9441cf8f2a114bdd2a87c54ac47520bb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, "max... |
import tensorflow as tf
import numpy as np
from src.data_loader.data_generator import DataGenerator
from src.models.simple_model import SimpleModel
from src.trainers.simple_trainer import SimpleTrainer
from src.utils.config import processing_config
from src.utils.utils import get_args
from src.utils.dirs import create_... | {"hexsha": "aef4b10f85d844be3f24e62da21d6351d4ef00d1", "size": 1748, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mains/main.py", "max_stars_repo_name": "MohamedAli1995/Cifar-100-Classifier", "max_stars_repo_head_hexsha": "924704a81ce13062825a88b90b80e8ac2ba45d63", "max_stars_repo_licenses": ["MIT"], "max... |
import csv
import os
from collections import defaultdict
import h5py
import numpy as np
import ray
from misc.shared import BASE_DIR, CONFIG, DATASET_DIR
from misc.utils import get_gender
from psbody.mesh import Mesh
from ray.util import ActorPool
from tqdm import tqdm
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
import w... | {"hexsha": "abd437329c5985915f35fccf3aa76d86cb5148e0", "size": 10775, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/feature_extraction/flame.py", "max_stars_repo_name": "jonepatr/lets_face_it", "max_stars_repo_head_hexsha": "fefba5e82d236f89703449bd517cfa5867fda09f", "max_stars_repo_licenses": ["MIT"], "m... |
[STATEMENT]
lemma Gcd_image_normalize [simp]: "Gcd (normalize ` A) = Gcd A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Gcd (normalize ` A) = Gcd A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. Gcd (normalize ` A) = Gcd A
[PROOF STEP]
have "Gcd (normalize ` A) dvd a" if "a \<in> A" for a
... | {"llama_tokens": 1344, "file": null, "length": 20} |
r"""
Continued Fractions
Sage implements the field ``ContinuedFractionField`` (or ``CFF``
for short) of finite simple continued fractions. This is really
isomorphic to the field `\QQ` of rational numbers, but with different
printing and semantics. It should be possible to use this field in
most cases where one could... | {"hexsha": "cfd8a42a3431b89e6913158b7836b066c7d2b941", "size": 28019, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sage/rings/contfrac.py", "max_stars_repo_name": "bopopescu/classic_diff_geom", "max_stars_repo_head_hexsha": "2b1d88becbc8cb30962e0995cc78e429e0f5589f", "max_stars_repo_licenses": ["BSL-1.0"]... |
import numpy as np
import pyworld as pw
import soundfile as sf
import librosa, glob
from resemblyzer import VoiceEncoder
SAMPLE_RATE = 16000
SP_MIN = -38.6925
SP_MAX = 4.3340
def load_wav(filename):
x = librosa.load(filename, sr=SAMPLE_RATE)[0]
return x
def save_wav(y, filename) :
sf.write(filename, y, S... | {"hexsha": "5c02438391977dc1c8fe3e8c05f3f990eef08e89", "size": 1572, "ext": "py", "lang": "Python", "max_stars_repo_path": "util.py", "max_stars_repo_name": "SuzukiDaishi/WorldAutoVCApp", "max_stars_repo_head_hexsha": "cb6f81ed738e7dbbb68d9ac0dfef028668b3ff33", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
import sys
import copy
import numpy as np
#Using RMC profile and Keen's definition of G(r) and gij(r) in order to generate S(Q)
#Defines Qi = rho* integral 4*pi*r*G(r)*sin(Qr) dr or integral D(r)sin(Qr) dr from Martin's total scattering formalism
def QiQ(Q,G,rlist,rho):
dr = rlist[1]-rlist[0]
integral=0
f... | {"hexsha": "f4108c773d64f8d6cbe337316b8851839a163ba1", "size": 4708, "ext": "py", "lang": "Python", "max_stars_repo_path": "SFQiG_maker/make_SFQiG.py", "max_stars_repo_name": "ccp5UK/dlpoly-py", "max_stars_repo_head_hexsha": "a7f2f83dd97b963248d706894dc1d12f7fec16d8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s... |
[STATEMENT]
lemma project_constrains_mono:
"[| D \<subseteq> C; project h C F \<in> A co B |] ==> project h D F \<in> A co B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>D \<subseteq> C; project h C F \<in> A co B\<rbrakk> \<Longrightarrow> project h D F \<in> A co B
[PROOF STEP]
apply (auto simp ad... | {"llama_tokens": 310, "file": null, "length": 3} |
r"""
Ordination methods (:mod:`skbio.stats.ordination`)
==================================================
.. currentmodule:: skbio.stats.ordination
This module contains several ordination methods, including Principal
Coordinate Analysis, Correspondence Analysis, Redundancy Analysis and
Canonical Correspondence Analy... | {"hexsha": "b2704c6a11141ccde5344a3b53af29dec4695633", "size": 3853, "ext": "py", "lang": "Python", "max_stars_repo_path": "skbio/stats/ordination/__init__.py", "max_stars_repo_name": "squirrelo/scikit-bio", "max_stars_repo_head_hexsha": "f9016283638ef49ffccb3bb5f79e5a421462cfd1", "max_stars_repo_licenses": ["BSD-3-Cla... |
#pragma once
#include "BMP180.hpp"
#include <boost/endian/arithmetic.hpp>
#include <limits>
namespace icarus
{
namespace registers::bmp180
{
struct Callibration
{
enum { address = 0xAA };
boost::endian::big_int16_t ac1, ac2, ac3;
boost::endian::big_uint16_... | {"hexsha": "ecb5aa56f927bb3f97c4407802334e3449d229c0", "size": 5520, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "icarus/include/icarus/sensor/BMP180_impl.hpp", "max_stars_repo_name": "Icarus-Quadro/Icarus", "max_stars_repo_head_hexsha": "10c4f1e804432d8cd11541f3e7342a12acec79f4", "max_stars_repo_licenses": ["M... |
"""
This zone parsing codebook will be used along the notebooks/utils.py ZoningInfo data class and
src/pcts_parser.py ZoningInfo data class.
After the zoning string is parsed, there were still observations that failed to be parsed
Those were manually coded.
Save the failed to be parsed codebook and general cod... | {"hexsha": "aec0ecb45b9f0fe0bf969bcd6764a6ea2e6d650c", "size": 1328, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/B1_zone_parsing_codebook.py", "max_stars_repo_name": "CityOfLosAngeles/planning-entitlements", "max_stars_repo_head_hexsha": "cf83b57063b4e55722cc640172b529611b263b3a", "max_stars_repo_license... |
import types
inductive formula (ι : Type) (gri : ground_interpretation ι)
| prime (p : Prop) [decidable p] : formula
| conjunction : formula → formula → formula
| disjunction : formula → formula → formula
| implication : formula → formula → formula
| universal {σ : type ι gri} : (∥σ∥ → formula) → formula
| existe... | {"author": "hcheval", "repo": "formalized-proof-mining", "sha": "216cc73fccd84900a1ba7eaae5f73732496d6afe", "save_path": "github-repos/lean/hcheval-formalized-proof-mining", "path": "github-repos/lean/hcheval-formalized-proof-mining/formalized-proof-mining-216cc73fccd84900a1ba7eaae5f73732496d6afe/src/formula.lean"} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.