text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
#!/usr/bin/env python
"""
"""
import askap.analysis.evaluation
import matplotlib
matplotlib.use('Agg')
from numpy import *
import os
from astropy.io import fits
from askap.analysis.evaluation.readData import *
from askap.analysis.evaluation.distributionPlotsNew import *
from askap.analysis.evaluation.distributionPlots... | {"hexsha": "1fd7c064e44d7a3a2632c9d4136018e4e81d4657", "size": 24517, "ext": "py", "lang": "Python", "max_stars_repo_path": "Code/Components/Analysis/evaluation/current/scripts/finderEval.py", "max_stars_repo_name": "rtobar/askapsoft", "max_stars_repo_head_hexsha": "6bae06071d7d24f41abe3f2b7f9ee06cb0a9445e", "max_stars... |
# Data Management
import pandas
# External Interfaces
import glob
import kaggle
import os
from zipfile import ZipFile
# Evaluation
from sklearn.metrics import roc_auc_score
from sklearn.metrics import precision_score
from sklearn.metrics import recall_score
from sklearn.model_selection import train_test_split
# Proc... | {"hexsha": "6ce53cd5717b954c6eb626b007f3c1394537c445", "size": 1903, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/ex2_isoforest.py", "max_stars_repo_name": "christian-westbrook/intrusion-detection", "max_stars_repo_head_hexsha": "7f7e8470327ead1cd122918452d1238a90361c75", "max_stars_repo_licenses": ["... |
```python
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import json
import sympy
% matplotlib inline
f = open('./exerc_phyton.txt')
```
```python
V=np.genfromtxt(f,skip_header=6,delimiter='')
```
```python
t=V[:,0]
print(t)
```
[0. 0.0201 0.0402 0.0603 0.0804 0.1... | {"hexsha": "4286bb65075b8079cc33beee4b5a26164fbe90f7", "size": 177754, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "exercicio_aula_5-checkpoint.ipynb", "max_stars_repo_name": "regifukuchi/bmc-1", "max_stars_repo_head_hexsha": "f4418212664758511bb3f4d4ca2318ac48a55e88", "max_stars_repo_licenses": ... |
Debats du Senat (hansard)
1ere Session, 36 e Legislature,
Volume 137, Numero 157
Le lundi 13 septembre 1999
L'honorable Gildas L. Molgat, President
Le point sur le projet de nouveau Musee canadien de la guerre
Reponse a une demande d'epinglettes du drapeau
La vision bloquiste de l'identite quebecoise
La Cour su... | {"hexsha": "afe27ee80fc00e226e3cb09a39c4510cdf72e00d", "size": 35326, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "data/Hansard/Training/hansard.36.1.senate.debates.1999-09-13.157.f", "max_stars_repo_name": "j1ai/Canadian_Hansards_Neural_Machine_Translation", "max_stars_repo_head_hexsha": "554666a89090fc1b1d1... |
from __future__ import absolute_import
from numpy import *
def medianboxfilter2d(x, y, values, scale):
assert len(x) == len(y) == len(values)
values_filtered = zeros_like(values)
for i in range(len(x)):
xi = x[i]
yi = y[i]
mask = (x > xi - scale/2) & (x < xi + scale/2) & \
(y > yi - scale/2) & (y < yi + s... | {"hexsha": "3e45b116fe85cd628526f4ec5eda1b2ca4eda22d", "size": 1044, "ext": "py", "lang": "Python", "max_stars_repo_path": "mab/utils/scatterfilters.py", "max_stars_repo_name": "maartenbreddels/mab", "max_stars_repo_head_hexsha": "112dcfbc4a74b07aff13d489b3776bca58fe9bdf", "max_stars_repo_licenses": ["MIT"], "max_stars... |
SUBROUTINE ALG02
C
LOGICAL DEBUG
REAL LOSS,LAMI,LAMIP1,LAMIM1
DIMENSION II(21,30),JJ(21,30),IDATA(24),RDATA(6),NAME(2)
COMMON /UD3PRT/ IPRTC
COMMON /UDSIGN/ NSIGN
COMMON /UPAGE / LIMIT,LQ
COMMON /UD300C/ NSTNS,NSTRMS,NMAX,NFORCE,NBL,NCASE,... | {"hexsha": "e88725799a2630eb345d0d9c814c80d05993322b", "size": 18589, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "mis/alg02.f", "max_stars_repo_name": "ldallolio/NASTRAN-95", "max_stars_repo_head_hexsha": "6d2c175f5b53ebaec4ba2b5186f7926ef9d0ed47", "max_stars_repo_licenses": ["NASA-1.3"], "max_stars_count": ... |
# SPDX-FileCopyrightText: 2021 Division of Intelligent Medical Systems, DKFZ
# SPDX-FileCopyrightText: 2021 Janek Groehl
# SPDX-License-Identifier: MIT
from simpa.core.device_digital_twins import SlitIlluminationGeometry, LinearArrayDetectionGeometry, PhotoacousticDevice
from simpa import perform_k_wave_acoustic_forw... | {"hexsha": "f81e6f765fb2c951a1b3a358bc3ab07fe69f4752", "size": 11140, "ext": "py", "lang": "Python", "max_stars_repo_path": "simpa_tests/manual_tests/acoustic_forward_models/KWaveAcousticForwardConvenienceFunction.py", "max_stars_repo_name": "IMSY-DKFZ/simpa", "max_stars_repo_head_hexsha": "b8bddcf43a4bff2564f0ec208dc5... |
#include <sjc.h>
#include <boost/process.hpp>
namespace fs = boost::filesystem;
namespace po = boost::program_options;
namespace bp = boost::process;
#ifdef YYDEBUG
extern int yydebug;
#endif
void __fail(const char* s) {
printf("FAIL: %s\n", s);
exit(-1);
}
void createProject(string typeName) {
... | {"hexsha": "452623f342d2de7d410fedb72b1a01a0c583c932", "size": 9922, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/main.cpp", "max_stars_repo_name": "justinmann/sj", "max_stars_repo_head_hexsha": "24d0a75723b024f17de6dab9070979a4f1bf1a60", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 2.0, "m... |
# module for estimating pose by extended kalman filter
# initial pose is decided randomly
# global localization problem
using Distributions, LinearAlgebra, StatsBase
include(joinpath(split(@__FILE__, "src")[1], "src/model/map/map.jl"))
include(joinpath(split(@__FILE__, "src")[1], "src/common/covariance_ellipse/covari... | {"hexsha": "67e7512c6cf618f97e8f08e37da35bc9374774a1", "size": 3742, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/localization/global_localization/global_kf.jl", "max_stars_repo_name": "ShisatoYano/JuliaAutonomy", "max_stars_repo_head_hexsha": "d1643add4ab9625996fafeac23fc03f25eedff12", "max_stars_repo_lic... |
from django.db import models
from django.db.models import JSONField
import requests
from pygbif import occurrences
from wikidataintegrator import wdi_core
import pandas as pd
import numpy as np
from ete3 import NCBITaxa
class ENAtoGBIF:
"""
input: ena_query, ena_accession (list)
output: ena2gbif (dict)
... | {"hexsha": "35bc4eb1c0f6845932ab2459a75a9fe03710c164", "size": 5462, "ext": "py", "lang": "Python", "max_stars_repo_path": "projects/33/app/django/web/ena.py", "max_stars_repo_name": "elixir-europe/Biohackathon-projects-2020", "max_stars_repo_head_hexsha": "45afecf96bf33fe1015d8c23fd2c251a20274b59", "max_stars_repo_lic... |
# -*- coding: utf-8 -*-
"""
@author: Bruno Dato
"""
import itertools
import matplotlib.pyplot as plt
import math
import numpy as np
from sklearn.metrics import confusion_matrix
from sklearn.decomposition import PCA
from sklearn.preprocessing import scale
from sklearn.discriminant_analysis import LinearDiscriminantAn... | {"hexsha": "bbfc609288080466d77f6ead511117fc736d4be9", "size": 6082, "ext": "py", "lang": "Python", "max_stars_repo_path": "Multilayer_Perceptron.py", "max_stars_repo_name": "BrunoDatoMeneses/Pattern-Recognition-vowel-work", "max_stars_repo_head_hexsha": "9eed7db4fb8818880339341d9599fa3e1df61ec5", "max_stars_repo_licen... |
import streamlit as st
import numpy as np
from keras import models
from keras.preprocessing.image import img_to_array
from PIL import Image
from concat import concat_imgs
DATA_DIR = 'att_resnet_best_weights.34-0.5114'
def main():
st.title('InstaVis Checker')
st.subheader('Are you a guru of creativity or j... | {"hexsha": "9c5889946a49684b069891e18bdffcffa05c9efe", "size": 5755, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/instavis_check_app.py", "max_stars_repo_name": "nast1415/instavis-check", "max_stars_repo_head_hexsha": "28620b321bb47ea631bd558f5f62a35427701331", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import numpy as np
import pandas as pd
from scipy.spatial.distance import pdist
import matplotlib.pyplot as plt
import matplotlib
from scipy.cluster import hierarchy
from matplotlib import cm
from adjustText import adjust_text
import scipy
import matplotlib.patheffects as path_effects
from scipy.spatial.distance import... | {"hexsha": "bae12fe5b5e25a7ad1586eac9e995250346177e4", "size": 15856, "ext": "py", "lang": "Python", "max_stars_repo_path": "validation/plotting_08_02_2020_from_SD.py", "max_stars_repo_name": "sdomanskyi/decneo", "max_stars_repo_head_hexsha": "c3b78d7cb24fbecde317850ea5068394029a7d03", "max_stars_repo_licenses": ["MIT"... |
#! /usr/bin/env python3
# coding: utf-8
import logging
import numpy
from src.raw.rawmap import RawMap
class Waterfalls():
@property
def waterfalls(self):
"""Access the waterfalls property"""
return self._waterfalls
def __init__(self, rawmap: RawMap, map_width: int, map_height: int):
... | {"hexsha": "c90d474a1e23a534443ed4adf8b47bd174ba2f0f", "size": 1061, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/raw/waterfalls.py", "max_stars_repo_name": "Leikt/map_generator", "max_stars_repo_head_hexsha": "86c6359ed84056f32642cb7e23db855beba62923", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
"""
Collect functions related to the stereographic projection.
A stereographic projection is a mapping between a direction in 3D space and a
position in a 2D plane. The direction can be described in polar coordinates
by (theta,phi), where theta denotes the angle between the direction and
the z axis, and phi denotes th... | {"hexsha": "cbf5af628a4ec5d10ee5d8b86af0029e8e5fe8c9", "size": 2937, "ext": "py", "lang": "Python", "max_stars_repo_path": "stereographic.py", "max_stars_repo_name": "hobler/chanmap", "max_stars_repo_head_hexsha": "6d1e2f7dd42a36cf0d127a421060e18d96888746", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
[STATEMENT]
lemma "\<exists>F::nat set set. finite F \<and> infinite (shattered_by F)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<exists>F. finite F \<and> infinite (shattered_by F)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. \<exists>F. finite F \<and> infinite (shattered_by F)
[PRO... | {"llama_tokens": 4810, "file": "Sauer_Shelah_Lemma_Shattering", "length": 58} |
import unittest
import numpy as np
import tensorflow as tf
import twodlearn as tdl
import twodlearn.convnet
import twodlearn.bayesnet.bayesnet
import twodlearn.bayesnet.gaussian_process
import twodlearn.templates.bayesnet
class ConvnetTest(unittest.TestCase):
def test_error(self):
layer1 = tdl... | {"hexsha": "9efed4651173a9adbbedcddec8a2bbd4e92c50dd", "size": 8199, "ext": "py", "lang": "Python", "max_stars_repo_path": "twodlearn/tests/convnet_test.py", "max_stars_repo_name": "danmar3/twodlearn", "max_stars_repo_head_hexsha": "02b23bf07618d5288e338bd8f312cc38aa58c195", "max_stars_repo_licenses": ["Apache-2.0"], "... |
from biom import load_table
import numpy as np
import pandas as pd
import os
import argparse
'''
This file does the following:
- breaks out the biom tables into subjects and
collection sites (stool, saliva, etc.).
- Adds taxonomy information to the files.
- Sorts the tables by collection date.
'''
def get_collecti... | {"hexsha": "4fc72ab8e9dd1ceeca482e9f81cc1c5d756d938d", "size": 6090, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_preprocessing/host_site_separator_time_sorting.py", "max_stars_repo_name": "michaelwiest/microbiome_rnn", "max_stars_repo_head_hexsha": "6109da20c49e3027f746257aee90cadc423cc75b", "max_stars_... |
function [inflMap, colXCoord, rowYCoord, mi] = getLSInfluenceMapFactorMovie(LS)
%"getLSInfluenceMap"
% Gets an image of the influence generated by the beam described in LS.
% Use getDICOMLeafPositions to generate LS.
%
%JRA&KZ 02/8/05
%
%Usage:
% function inflMap = getLSInfluenceMap(LS);
%
% Copyright 2010, Josep... | {"author": "cerr", "repo": "CERR", "sha": "d320754abad9dcb78508ab69f33ae9f644202114", "save_path": "github-repos/MATLAB/cerr-CERR", "path": "github-repos/MATLAB/cerr-CERR/CERR-d320754abad9dcb78508ab69f33ae9f644202114/IMRTP/recompDose/FFDC/getLSInfluenceMapFactorMovie.m"} |
[STATEMENT]
lemma (in abelian_group) four_elem_comm:
assumes "a \<in> carrier G" and "b \<in> carrier G" and "c \<in> carrier G" and "d \<in> carrier G"
shows "a \<ominus> c \<oplus> b \<ominus> d = a \<oplus> b \<ominus> c \<ominus> d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. a \<ominus> c \<oplus> b \<om... | {"llama_tokens": 394, "file": "Localization_Ring_Localization", "length": 2} |
module misc
use precision, only : i4k, i8k, r4k, r8k
implicit none
!! author: Ian Porter
!! date: 12/13/2017
!!
!! this module contains miscellaneous routines used to read/write to the .vtk file
!!
private
public :: interpret_string, def_len, to_uppercase, to_lowercase, char_dt, slee... | {"hexsha": "e68ef990c9247217ec1d166816b86a20c79ec661", "size": 6874, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/utilities/Misc.f90", "max_stars_repo_name": "porteri/vtkmofo", "max_stars_repo_head_hexsha": "f4c188ecbbc4620df0bf7962241cdc81c9dbe1b7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta... |
# Copyright 2021 Fedlearn authors.
# 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 writi... | {"hexsha": "c362f685f7fa870576c4df27037f8c4f28d6b9ae", "size": 1067, "ext": "py", "lang": "Python", "max_stars_repo_path": "demos/HFL/common/msg_handler.py", "max_stars_repo_name": "monadyn/fedlearn-algo", "max_stars_repo_head_hexsha": "c4459d421139b0bb765527d636fff123bf17bda4", "max_stars_repo_licenses": ["Apache-2.0"... |
import numpy as np
import tempfile
def default_params(model, time_scale, max_days, px_count, prng_seed):
"""The default particle filter parameters.
Memory usage can reach extreme levels with a large number of particles,
and so it may be necessary to keep only a sliding window of the entire
particle h... | {"hexsha": "6d8e3e769be2ea308a78870c1c1abd0c255ba51c", "size": 5045, "ext": "py", "lang": "Python", "max_stars_repo_path": "local_pypfilt/src/pypfilt/params.py", "max_stars_repo_name": "ruarai/epifx.covid", "max_stars_repo_head_hexsha": "be7aecbf9e86c3402f6851ea65f6705cdb59f3cf", "max_stars_repo_licenses": ["BSD-3-Clau... |
SUBROUTINE FN_MERGE( FileSpec, Path, Name, Extension, Version )
!***********************************************************************
!* Merges a File Specification from its Path, Name, Extension, and Version
!*
!* Language: Fortran
!*
!* Author: Stuart G. Mentzer
!*
!* Date: 1999/08/20
!*********************... | {"hexsha": "7d4d70fa631ea60af60a1e5a0fd10ccd9a6de630", "size": 1946, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "src/lib/fn_merge.for", "max_stars_repo_name": "DeadParrot/NHTSA-Tools", "max_stars_repo_head_hexsha": "e8de2d5aa3d6de96a858ae70ecc4e75fa3d80ac4", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
module interfaceExtensionAndDelegation where
open import Data.Product
open import Data.Nat.Base
open import Data.Nat.Show
open import Data.String.Base using (String; _++_)
open import Size
open import NativeIO
open import interactiveProgramsAgda using (ConsoleInterface; _>>=_; do;
... | {"hexsha": "292887218748123ddfd1721e7be70d43a2d1bcc3", "size": 2269, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "presentationsAndExampleCode/agdaImplementorsMeetingGlasgow22April2016AntonSetzer/interfaceExtensionAndDelegation.agda", "max_stars_repo_name": "agda/ooAgda", "max_stars_repo_head_hexsha": "7cc45e0... |
from __future__ import absolute_import
import os
import numpy as np
import pygame
import weakref
import carla
from carla import ColorConverter as cc
CARLA_OUT_PATH = os.environ.get("CARLA_OUT", os.path.expanduser("~/carla_out"))
if CARLA_OUT_PATH and not os.path.exists(CARLA_OUT_PATH):
os.makedirs(CARLA_OUT_PATH)
... | {"hexsha": "047356f07dd1b1d588376e5a00a357b53f502b0d", "size": 6458, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/macad_gym/core/sensors/camera_manager.py", "max_stars_repo_name": "bbrito/macad-gym", "max_stars_repo_head_hexsha": "1a9e795e0f01e506faea9f3a04a7df9607fc0b1f", "max_stars_repo_licenses": ["MIT... |
import cPickle as pickle
import numpy as np
import argparse
from PIL import Image
import cv2
import sys
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(BASE_DIR, '../sunrgbd_data'))
from sunrgbd_data import sunrgbd_object
from utils import rotz, compute_box_3d, load_zipped_p... | {"hexsha": "a891dacad8fb8f92fa089ec034e433696a6afa6f", "size": 4428, "ext": "py", "lang": "Python", "max_stars_repo_path": "sunrgbd/sunrgbd_detection/evaluate.py", "max_stars_repo_name": "dkoguciuk/frustum-pointnets", "max_stars_repo_head_hexsha": "2ffdd345e1fce4775ecb508d207e0ad465bcca80", "max_stars_repo_licenses": [... |
"""
get_line(table::Table)
Get the next line of the table by using `table.current_values`.
Call [`format_table_value`](@ref) to format each value and use the alignments to create the line such that it fits to [`get_header`](@ref).
"""
function get_line(table::Table)
setup = table.setup
ln = ""
for c in... | {"hexsha": "48def76d46cced77e86feafa206963945f4beb4a", "size": 3142, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/line.jl", "max_stars_repo_name": "Wikunia/TableLogger.jl", "max_stars_repo_head_hexsha": "b003e4d3731142e5cd7fe0a88b9f6d0409328017", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "m... |
# -*- coding: utf-8 -*-
from data.corpus import Sentences
from stats.stat_functions import compute_ranks, compute_freqs, merge_to_joint
from stats.mle import Mandelbrot
from stats.entropy import mandelbrot_entropy, typicality
import numpy as np
import numpy.random as rand
def get_model(corpus, n):
big_ranks ... | {"hexsha": "a29d02cbc8102be783e58eef902b38617a8742da", "size": 3465, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/filtering/typicality.py", "max_stars_repo_name": "valevo/thesis", "max_stars_repo_head_hexsha": "6671fa7ed8aefd3e89fd29ee97fa31a3c4315868", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
#!/usr/bin/env python
import numpy as np
import time
import roslib
import sys
import rospy
import cv2
from std_msgs.msg import String, Float64
from geometry_msgs.msg import Twist
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
#rosservice call /gazebo/set_model_state '{model_state: { ... | {"hexsha": "30b7279ab4fe4cfd600c15527b30a62453c9ddac", "size": 4685, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/turtlebot3_gazebo/src/topic2python.py", "max_stars_repo_name": "diddytpq/Turtlebot-line-tracking-in-gazebo", "max_stars_repo_head_hexsha": "dd671546627bdd84db1591da3e71d967a4891c2c", "max_star... |
"""
The purpose of this code is to set the train, val, and test data sets
It can be run on sherlock using
ml load chemistry
ml load schrodinger
$ $SCHRODINGER/run python3 get_pocket_com.py
"""
from tqdm import tqdm
import pickle
import schrodinger.structutils.analyze as analyze
from schrodinger.structure import Struct... | {"hexsha": "8ebf63a8cfb2756a8b2a59c1cec176f473879fb8", "size": 3149, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data_analysis/get_pocket_com.py", "max_stars_repo_name": "sidhikabalachandar/lig_clash_score", "max_stars_repo_head_hexsha": "449bac16a7c2b9779e7cd51ff17eb5e41be6ff99", "max_stars_repo_license... |
import numpy as np
import pandas as pd
from utils.constants import *
from utils.strings import *
class Processor:
'''Preprocessor for Bitcoin prices dataset as obtained by following the procedure
described in https://github.com/philipperemy/deep-learning-bitcoin'''
def __init__(self, config, logger):
... | {"hexsha": "70f629f4f9e84274f10a0c6755196c4872183f1b", "size": 3261, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/process/processor.py", "max_stars_repo_name": "wknight1/deep-trading-agent", "max_stars_repo_head_hexsha": "58e6617fa78b18c31460962511ab83af430cc326", "max_stars_repo_licenses": ["MIT"], "max... |
# Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | {"hexsha": "8ac1653a0c671e618d4f6ff44dc5a0f141d79ead", "size": 7884, "ext": "py", "lang": "Python", "max_stars_repo_path": "research/cv/ecolite/src/dataset.py", "max_stars_repo_name": "mindspore-ai/models", "max_stars_repo_head_hexsha": "9127b128e2961fd698977e918861dadfad00a44c", "max_stars_repo_licenses": ["Apache-2.0... |
(** * ugregex_dec: simple decision procedure for untyped generalised regular expressions *)
(** We implement a rather basic algorithm consisting in trying to
build a bisimulation on-the-fly, using partial derivatives.
We prove the correctness of this algorithm, but not completeness
("it merely let you sle... | {"author": "damien-pous", "repo": "relation-algebra", "sha": "13b99896782e449c7ca3910e48e18427517c8135", "save_path": "github-repos/coq/damien-pous-relation-algebra", "path": "github-repos/coq/damien-pous-relation-algebra/relation-algebra-13b99896782e449c7ca3910e48e18427517c8135/theories/ugregex_dec.v"} |
{-# OPTIONS --without-K --safe #-}
module Cham.Label where
open import Cham.Name
data Label : Set where
_⁺ : Name → Label
_⁻ : Name → Label
| {"hexsha": "3c70f751d13cab5d1ce3783d365a5b3fe3eb6b16", "size": 148, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "agda/Cham/Label.agda", "max_stars_repo_name": "riz0id/chemical-abstract-machine", "max_stars_repo_head_hexsha": "292023fc36fa67ca4a81cff9a875a325a79b9d6f", "max_stars_repo_licenses": ["BSD-3-Clause... |
from glob import glob
import json
import torch
import numpy as np
def make_new_fileset():
in_path = "finished_files/train/"
out_path = "mono_abs_train_small2/"
flist = glob(in_path +"*")
new_flist = []
ext_snts = []
abs_snts = []
for fn in flist[:100]:
jd = json.load(open(fn,"r"))
... | {"hexsha": "8759d34bd07d5646e6232ca24ca8389a710749b2", "size": 1402, "ext": "py", "lang": "Python", "max_stars_repo_path": "for_AIHUB_summ/make_files_for_aihub.py", "max_stars_repo_name": "won2lee/summ_fast_abs_rl", "max_stars_repo_head_hexsha": "6aeb0fe760ed0bc693ba3194f2813ef9cccc07bf", "max_stars_repo_licenses": ["M... |
# This file was generated, do not modify it. # hide
ẑ[:lambda] = 5.0; | {"hexsha": "30e99338ba06684038b4c277c3ab25348e1f8384", "size": 70, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "_assets/pages/getting-started/learning-networks/code/ex16.jl", "max_stars_repo_name": "giordano/DataScienceTutorials.jl", "max_stars_repo_head_hexsha": "8284298842e0d77061cf8ee767d0899fb7d051ff", "ma... |
\font\mainfont=cmr10
\font\mi=cmti10
\font\subsectionfont=cmbx10
\font\sectionfont=cmbx12
\font\headingfont=cmbx14
\font\titlefont=cmbx16
\def\RCS$#1: #2 ${\expandafter\def\csname RCS#1\endcsname{#2}}
\def\heading#1{\noindent {\headingfont #1} \hfill\break}
\newcount\footnotes \footnotes=0
\def\footnoter#1{\advanc... | {"hexsha": "b8bad44b5e7d360e63ad8e13bd9299972f2deb9f", "size": 8437, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/UOW/CSCI324/ass5/HCI-report.tex", "max_stars_repo_name": "felx/detritus", "max_stars_repo_head_hexsha": "b64d28b47381ea1e8c6b5282910365dc4292d57f", "max_stars_repo_licenses": ["MIT"], "max_stars... |
#include <bitset> // std::bitset
#include <cassert> // assert
#include <iostream> // std::cout
#include <map> // std::map<T,U>
#include <string> // std::string
#include <vector> // std::vector<T>
#include <seqan/sequence.h> // seqan::Dna5String
#include <boost/log/trivial.hpp> // BOOST_LOG_TRIVIAL macro
#include <gr... | {"hexsha": "a4148d6c24e987e6cbd0395faac86a92aad74db4", "size": 29281, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/typer/segment_calling.cpp", "max_stars_repo_name": "h-2/graphtyper", "max_stars_repo_head_hexsha": "692eac909f00a888dcc14487fe57907ff88f6d17", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
\newlist{coloritemize}{itemize}{1}
\setlist[coloritemize]{label=\textcolor{itemizecolor}{\textbullet}}
\colorlet{itemizecolor}{.}% Default colour for \item in itemizecolor
\setlength{\parindent}{0pt}% Just for this example
This is a LaTeX document holding The answers/questions from 2014 exam papers to 2019 for the ... | {"hexsha": "bd2ab531d6412be6d9c18d6b19a7abb0b298c0cf", "size": 4405, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "examPrepSoftwareEngineering-master/LaTeX-Project-WriteUp/chapters/2018-19SE.tex", "max_stars_repo_name": "OmalleyTomas98/4thYearPapersSolution-Master", "max_stars_repo_head_hexsha": "67d02f691de2f88... |
import use_cases.utils.textools as tt
from use_cases.utils.comunas import get_comunas_id
import pandas as pd
import numpy as np
import re, os
def change_valid_to_bool(x):
if x == '1':
x = True
else:
x = False
return x
def create_table_dialogues(frame, filter):
new_frame = fram... | {"hexsha": "ee972c59cda728993f0589e785748cc7f2ac85bf", "size": 1239, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocessing/use_cases/dialogues.py", "max_stars_repo_name": "MinCiencia/ECQQ", "max_stars_repo_head_hexsha": "f93a01ce2dd140d073bd81afb9b4733c1d8a34c3", "max_stars_repo_licenses": ["CC0-1.0"], "... |
# -*- coding: utf-8 -*-
"""
.. module: pyAPES
:synopsis: APES-model component
.. moduleauthor:: Kersti Haahti
Model framework for Atmosphere-Plant Exchange Simulations
Created on Tue Oct 02 09:04:05 2018
Note:
migrated to python3
- print on same line
- dict.keys(), but these are iterated after in for... | {"hexsha": "2f85e2431e795b8f9dfbbc1af603da4f24935e87", "size": 16459, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyAPES.py", "max_stars_repo_name": "LukeEcomod/pyAPES_VESBO", "max_stars_repo_head_hexsha": "fdb4f44907e3055eb42db4a1260e0d7b9c55b415", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "... |
import argparse
import glob
import os
import numpy as np
import importlib
from ast import literal_eval
from xwavecal.utils.fits_utils import Translator
def parse_args(args=None):
parser = argparse.ArgumentParser(description='Reduce an xwavecal spectrograph frame.')
parser.add_argument("--output-dir", require... | {"hexsha": "ea44e17be3e424eeb6b2430d99546bcebf484bbb", "size": 3656, "ext": "py", "lang": "Python", "max_stars_repo_path": "xwavecal/utils/runtime_utils.py", "max_stars_repo_name": "gmbrandt/echelle", "max_stars_repo_head_hexsha": "7e6678cd541ccf025fc187eca7f1344efe85f265", "max_stars_repo_licenses": ["MIT"], "max_star... |
import numpy as np
import logging
from scipy.ndimage import zoom
logging.basicConfig(level=logging.INFO)
from synbols.data_io import pack_dataset
from synbols.drawing import Camouflage, color_sampler, Gradient, ImagePattern, NoPattern, SolidColor
from synbols.generate import generate_char_grid, dataset_generator, bas... | {"hexsha": "14dab4cb7f7757749b562d0aa7616694a5195ba5", "size": 7417, "ext": "py", "lang": "Python", "max_stars_repo_path": "results/paper_images.py", "max_stars_repo_name": "danwley/synbols-benchmarks", "max_stars_repo_head_hexsha": "799f85c4bf6a84e0f6b6ad05878bc21c2d40e4c9", "max_stars_repo_licenses": ["Apache-2.0"], ... |
SUBROUTINE ULAMSPIRAL(START,ORDER) !Idle scribbles can lead to new ideas.
Careful with phasing: each lunge's first number is the second placed along its direction.
INTEGER START !Usually 1.
INTEGER ORDER !MUST be an odd number, so there is a middle.
INTEGER L,M,N !Counters.
INTEGER STE... | {"hexsha": "216e1bba029762c03c64f4d71fd626b0669e263f", "size": 2871, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Task/Ulam-spiral--for-primes-/Fortran/ulam-spiral--for-primes--2.f", "max_stars_repo_name": "LaudateCorpus1/RosettaCodeData", "max_stars_repo_head_hexsha": "9ad63ea473a958506c041077f1d810c0c7c8c18... |
[STATEMENT]
lemma neg_inter_pos_0:
assumes "hahn_space_decomp M1 M2"
and "hahn_space_decomp P N"
and "A \<in> sets M"
and "A \<subseteq> P"
shows "\<mu> (A \<inter> M2) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<mu> (A \<inter> M2) = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal ... | {"llama_tokens": 4909, "file": "Hahn_Jordan_Decomposition_Hahn_Jordan_Decomposition", "length": 49} |
const A = [1.0 2.0 3.0; 4.0 5.0 6.0; 7.0 8.0 9.0]
cost(M::PowerManifold, p) = -0.5 * norm(transpose(p[M, 1]) * A * p[M, 2])^2
function egrad(M::PowerManifold, X::Array)
U = X[M, 1]
V = X[M, 2]
AV = A * V
AtU = transpose(A) * U
AR = similar(X)
AR[:, :, 1] .= -AV * (transpose(AV) * U)
AR[:, ... | {"hexsha": "0c197472e5a499829bbd2a00ab19538952b4f674", "size": 3416, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/solvers/trust_region_model.jl", "max_stars_repo_name": "const-ae/Manopt.jl", "max_stars_repo_head_hexsha": "cdaeee451d53d4813d37cf859f2ca6adcad82635", "max_stars_repo_licenses": ["MIT"], "max_... |
import pytest
from mini_lambda import FunctionDefinitionError, make_lambda_friendly_method
from mini_lambda.main import _LambdaExpression
def test_doc_index_1():
""" Tests that the first example in the documentation main page works """
# import magic variable 's'
from mini_lambda import s
# write a... | {"hexsha": "d82d308b2cfcf1b431871c7e70ed75c540ebe647", "size": 12167, "ext": "py", "lang": "Python", "max_stars_repo_path": "mini_lambda/tests/test_readme.py", "max_stars_repo_name": "semiversus/python-mini-lambda", "max_stars_repo_head_hexsha": "35ec4b6304b08ffd28939ffef7ead6b150dc1525", "max_stars_repo_licenses": ["B... |
from __future__ import print_function
import argparse
import torch
import os
import numpy as np
import torch.utils.data
from torch import nn, optim, save
from PIL import Image
from torch.nn import functional as F
from torchvision import datasets, transforms
from torchvision.utils import save_image
from torch.utils.data... | {"hexsha": "bbd37148fa467dae8ad5582a53997686ae15c793", "size": 4046, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Seq_Encoder.py", "max_stars_repo_name": "Krolion/SW1", "max_stars_repo_head_hexsha": "68a1051ac2665960a1338205c45ac32c549f52f6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
from __future__ import annotations
from typing import NoReturn
import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.neighbors import KNeighborsRegressor
from sklearn.metrics import roc_auc_score
from IMLearn.base import BaseEstimator
class AgodaCancellationEstimato... | {"hexsha": "147dd93dd1b8bf3d10e5263e0c76550f178e7397", "size": 5141, "ext": "py", "lang": "Python", "max_stars_repo_path": "challenge/agoda_cancellation_estimator.py", "max_stars_repo_name": "nirpet/IML.HUJI", "max_stars_repo_head_hexsha": "6f8c7719760df3e381115f01cd5c3cfc9951b59c", "max_stars_repo_licenses": ["MIT"], ... |
using PyPlot
using DelimitedFiles
using PyCall
mpl = pyimport("tikzplotlib")
d = readdlm("timing.txt")
idx = sortperm(d[:,1])
d = d[idx,:]
close("all")
plot(d[:,1], 3.693 * ones(length(d[:,1])), "--", label="Fortran")
loglog(d[:,1], d[:,2], "o-", label="ADSeismic MPI")
legend()
xlabel("Number of Processors")
ylabel(... | {"hexsha": "3995395e7349d4e1704086c96955d545a87784c9", "size": 1765, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/mpi_acoustic/strong_scaling/plot.jl", "max_stars_repo_name": "kailaix/ADSeismic.jl", "max_stars_repo_head_hexsha": "c4cd214a6de10cadc1a59b1c302ccfe42d4d25f9", "max_stars_repo_licenses": ["... |
module Display
using UUIDs
import LibGit2
using ..Types
const colors = Dict(
' ' => :white,
'+' => :light_green,
'-' => :light_red,
'↑' => :light_yellow,
'~' => :light_yellow,
'↓' => :light_magenta,
'?' => :red,
)
const color_dark = :light_black
function git_file_stream(repo::LibGit2.Git... | {"hexsha": "80e72fe1ad006bfbe8e0df037458d3e92e65c057", "size": 8756, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "stdlib/Pkg3/src/Display.jl", "max_stars_repo_name": "djsegal/julia-fork", "max_stars_repo_head_hexsha": "dd3d14e5e7d24985cba6185e2d07a62ee9943d4e", "max_stars_repo_licenses": ["Zlib"], "max_stars_c... |
program complex_06
implicit none
real, parameter :: a = 3.0, b = 4.0
complex, parameter :: i_ = (0, 1)
complex, parameter :: z = a + i_*b
real, parameter :: x = z
real, parameter :: y = real(z)
real, parameter :: w = aimag(z)
print *, x, y, w
end program
| {"hexsha": "1184957571d40918d4b2bc22dbf454d8c04bc123", "size": 258, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "integration_tests/complex_06.f90", "max_stars_repo_name": "Thirumalai-Shaktivel/lfortran", "max_stars_repo_head_hexsha": "bb39faf1094b028351d5aefe27d64ee69302300a", "max_stars_repo_licenses": ["B... |
__author__ = 'francois'
from string import Template
import sqlite3
import numpy as np
import pandas as pd
import os
def getLockFile(db):
return os.path.join(os.path.dirname(os.path.realpath(__file__)), ".%s.db_lock"%db)
class Storage(object):
def get_data(self):
pass
class ProcessedStorage(Storage):
... | {"hexsha": "a369f243e851be6a654a7da1f3f0e296fccee247", "size": 14352, "ext": "py", "lang": "Python", "max_stars_repo_path": "sims/storage.py", "max_stars_repo_name": "netixx/autotopo", "max_stars_repo_head_hexsha": "5cf5ba8f146fc26407fb842adee85f7be2880fe3", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":... |
#!/usr/bin/env python
# license removed for brevity
import os
import sys
current_folder = os.path.dirname(os.path.realpath(__file__))
sys.path.append(current_folder)
main_folder = os.path.join(current_folder, "..")
sys.path.append(main_folder)
import time
import numpy as np
full_path = os.path.dirname(__fil... | {"hexsha": "d8a4ade4098a27d7ceb80f1f033d4e1d80a8100e", "size": 1341, "ext": "py", "lang": "Python", "max_stars_repo_path": "include/tf_nn_motor/models/dataset_test.py", "max_stars_repo_name": "lanfis/Raptor", "max_stars_repo_head_hexsha": "0db750de5acaeaca458acdad4cbf6383d5da3a20", "max_stars_repo_licenses": ["MIT"], "... |
# --------------------------------------------------------
# Motion R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Simon Meister, based on code by Xinlei Chen
# --------------------------------------------------------
from __future__ import absolute_import, division, print_function
impor... | {"hexsha": "8f2278b9e61c1783a9e3d68e03d6a70880ca1d9a", "size": 19677, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/nets/network.py", "max_stars_repo_name": "simonmeister/old-motion-rcnn", "max_stars_repo_head_hexsha": "1f62d5e0fa5111b8ad68cea90ad23c9e8e151bd1", "max_stars_repo_licenses": ["MIT"], "max_sta... |
[STATEMENT]
lemma card_length_sum_list: "card {l::nat list. size l = m \<and> sum_list l = N} = (N + m - 1) choose N"
\<comment> \<open>by Holden Lee, tidied by Tobias Nipkow\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. card {l. length l = m \<and> sum_list l = N} = N + m - 1 choose N
[PROOF STEP]
proof ... | {"llama_tokens": 7573, "file": null, "length": 60} |
(* Author: Amine Chaieb, University of Cambridge
*)
section \<open>Permutations, both general and specifically on finite sets.\<close>
theory Permutations
imports
"HOL-Library.Multiset"
"HOL-Library.Disjoint_Sets"
Transposition
begin
subsection \<open>Auxiliary\<close>
abbreviation (input) fixpoi... | {"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/Combinatorics/Permutations.thy"} |
from __future__ import absolute_import
import functools as ft
import warnings
from logging_helpers import _L
from lxml.etree import QName, Element
import lxml.etree
import networkx as nx
import numpy as np
import pandas as pd
from .core import ureg
from .load import draw, load
from six.moves import zip
... | {"hexsha": "73d08ab42def173bdc57c91eab3cae03e179a653", "size": 11796, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/dmf_chip/edit.py", "max_stars_repo_name": "sci-bots/dmf-chip", "max_stars_repo_head_hexsha": "6fc192235f792046297fcf0250606c8838bb9257", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star... |
import wntr
import collections
import numpy as np
from magnets.utils.call_on_functions import *
def parallel_pipes(relations, wn, new_link_list, junc_dict, pipe_dict, unremovable_nodes, special_nodes, special_links_nodes, special_links, alpha):
connected_nodes = []
num_connections = []
num_junc = wn.num_ju... | {"hexsha": "ce77734ea9a1fa9a4978a1d5532f7b9e2f06a244", "size": 3852, "ext": "py", "lang": "Python", "max_stars_repo_path": "magnets/preprocessing/parallel_pipes.py", "max_stars_repo_name": "meghnathomas/MAGNets", "max_stars_repo_head_hexsha": "5e3011763d235398e7c613753b4b94ccb392f0d5", "max_stars_repo_licenses": ["MIT"... |
import unittest
import numpy as np
import pandas as pd
from pyalink.alink import *
class TestDataFrame(unittest.TestCase):
def setUp(self):
data_null = np.array([
["007", 1, 1, 2.0, True],
[None, 2, 2, None, True],
["12", None, 4, 2.0, False],
["1312", 0,... | {"hexsha": "59cebd7dc181e71913e5fc99b75628a2235befb6", "size": 5893, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/src/main/python/pyalink/alink/tests/common/types/conversion/test_dataframe_to_operator.py", "max_stars_repo_name": "wenwei8268/Alink", "max_stars_repo_head_hexsha": "c00702538c95a32403985eb... |
## top-level script to manipulate and analyze empirical/simulated CMS output
## last updated 09.07.2017 vitti@broadinstitute.org #should handle basedir vs writedir
import matplotlib as mp
mp.use('agg')
import matplotlib.pyplot as plt
from power.power_func import merge_windows, get_window, check_outliers, check_rep_wi... | {"hexsha": "90875dae7c1a85a7a4fd1f43641b6e5348ae9489", "size": 30044, "ext": "py", "lang": "Python", "max_stars_repo_path": "cms/power.py", "max_stars_repo_name": "broadinstitute/cms", "max_stars_repo_head_hexsha": "4743ffd3feac08f02be7719c82b3371cb94a4d6b", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count... |
import os
import sys
import numpy as np
import pandas as pd
import logging
if '../../' not in sys.path:
sys.path.append('../../')
import src.optimization as optimization
import src.protocol_ansatz as protocol_ansatz
model = 'lmg'
model_parameters = dict(num_spins=50)
optimization_method = 'Nelder-Mead'
protocol... | {"hexsha": "3f4c8909f0bb22174a08f10a2993e18774dc4ed4", "size": 2449, "ext": "py", "lang": "Python", "max_stars_repo_path": "results/lz_optimizations_crabVariableEndPoints_20200623/script_lmg_crab4freq_neldermead_bound02.py", "max_stars_repo_name": "lucainnocenti/ultrafast-critical-ground-state-preparation-2007.07381", ... |
# +
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from causalgraphicalmodels import CausalGraphicalModel, StructuralCausalModel
import pylogit
from collections import OrderedDict
import pylogit as cm
from functools import reduce
import statsmodels.api as sm
import statsmodels.formula.api as smf... | {"hexsha": "cbf3155d77065d7df2d0cd497243478b01f92089", "size": 7976, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/working/factor_models.py", "max_stars_repo_name": "hassanobeid1994/tr_b_causal_2020", "max_stars_repo_head_hexsha": "1ffaeb7dcefccf5e1f24c459e9a2f140b2a052a5", "max_stars_repo_licenses":... |
# Lint as: python3
# 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 agr... | {"hexsha": "a7d713c4ecd23cb48a3a61295630f53aa6ab74ce", "size": 6876, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf_quant_finance/experimental/lsm_algorithm/lsm_test.py", "max_stars_repo_name": "slowy07/tf-quant-finance", "max_stars_repo_head_hexsha": "0976f720fb58a2d7bfd863640c12a2425cd2f94f", "max_stars_re... |
[STATEMENT]
lemma cmp\<^sub>U\<^sub>P_ide_simps [simp]:
assumes "B.ide (fst fg)" and "B.ide (snd fg)" and "src\<^sub>B (fst fg) = trg\<^sub>B (snd fg)"
shows "Dom (cmp\<^sub>U\<^sub>P fg) = \<^bold>\<langle>fst fg\<^bold>\<rangle> \<^bold>\<star> \<^bold>\<langle>snd fg\<^bold>\<rangle>"
and "Cod (cmp\<^sub... | {"llama_tokens": 710, "file": "Bicategory_Strictness", "length": 2} |
# -*- coding: utf-8 -*-
import warnings
import numpy as np
import pandas as pd
from lifelines.fitters import UnivariateFitter
from lifelines.utils import (
_preprocess_inputs,
_additive_estimate,
_to_array,
StatError,
inv_normal_cdf,
median_survival_times,
check_nans_or_infs,
Statistica... | {"hexsha": "d48f563ef2b5f12301b00d2c0341d910fda1fd4d", "size": 17486, "ext": "py", "lang": "Python", "max_stars_repo_path": "lifelines/fitters/kaplan_meier_fitter.py", "max_stars_repo_name": "sachinruk/lifelines", "max_stars_repo_head_hexsha": "8de4afb21b69f96d51c3923cb66b9086e50d6944", "max_stars_repo_licenses": ["MIT... |
import numpy as np
import scipy as sp
# import cplex as cp
import matplotlib.pyplot as plt
from scipy.integrate import ode
import cobra as cb
# import json
import pandas as pd
import sys
import surfinFBA as surf
import time
start_time = time.time()
from cycler import cycler
from datetime import datetime
#### Mic... | {"hexsha": "c27374bc6894133c8385f5c304e0cb493845e523", "size": 3280, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib/surfinFBA/examples/toy_model_examples.py", "max_stars_repo_name": "jdbrunner/surfin_fba", "max_stars_repo_head_hexsha": "1566282ddb628be3914e54b6ccd4468958338699", "max_stars_repo_licens... |
module MOD_WRITMSC
contains
SUBROUTINE WRITMSC (ifl,string,n,char,iflag,idummy,ierr)
implicit real*8(a-h,o-z)
character string*N
character*10 char
ierr=1
if (iflag.eq.-1) then
write (ifl,'(A10)') char
write (ifl,*) string
ierr=0
else
write(6,... | {"hexsha": "1ccab2dbb73b0df8d81387fa3931ac71c4088271", "size": 427, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "src/writmsc.for", "max_stars_repo_name": "rtagirov/nessy", "max_stars_repo_head_hexsha": "aa6c26243e6231f267b42763e020866da962fdfb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
""" Define baxter environment class FurnitureBaxterEnv. """
from collections import OrderedDict
import numpy as np
from env.furniture import FurnitureEnv
import env.transform_utils as T
class FurnitureBaxterEnv(FurnitureEnv):
"""
Baxter robot environment.
"""
def __init__(self, config):
""... | {"hexsha": "96bc8d52afab50b5358bec17887114d1c22d11d0", "size": 8911, "ext": "py", "lang": "Python", "max_stars_repo_path": "env/furniture_baxter.py", "max_stars_repo_name": "snasiriany/furniture", "max_stars_repo_head_hexsha": "918be936c0bbf954b751a5f7e4d5c14cf0df4442", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
from recourse import ActionSet
import numpy as np
# Test Strategy
# --------------------------------------------------------
# variable types: all, binary, mix
# action_set: all compatible, all conditionally compatible, all immutable, mix
def test_initialization(data):
a = ActionSet(X... | {"hexsha": "13d7533ba41258aa15eef70c13312fbae34aeb8a", "size": 2525, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_action_set.py", "max_stars_repo_name": "ustunb/actionable-recourse", "max_stars_repo_head_hexsha": "e851de05ad32c077daf037a231addd271fcb1aac", "max_stars_repo_licenses": ["BSD-3-Clause"... |
import numpy as np
from numba import jitclass,typeof ,vectorize ,prange,njit ,jit # import the decorator
from numba import int32, float64 , void # import the types
from collections import MutableMapping
def randKernel(spA ,spB ,seed=10):
np.random.seed(( spA +spB ) *seed)
return np.random.random()
def del... | {"hexsha": "ce526387a645487568896171bfad93e040452e99", "size": 14714, "ext": "py", "lang": "Python", "max_stars_repo_path": "libmatch/chemical_kernel.py", "max_stars_repo_name": "cosmo-epfl/glosim2", "max_stars_repo_head_hexsha": "a1a919cdc6a618fea60bcc3ce43de47d69d5f5f4", "max_stars_repo_licenses": ["MIT"], "max_stars... |
using FileIO, Compat
import Compat.String
import FileIO: LOAD, SAVE, OSX, OS
const fs = open(Pkg.dir("FileIO", "docs", "registry.md"), "w")
function pkg_url(pkgname)
result = readchomp(Pkg.dir("METADATA", string(pkgname), "url"))
g = "git://"
if startswith(result, g)
return string("http://", result... | {"hexsha": "766a810837db23da4cf712ee26d54b84ba742275", "size": 2337, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make_docs.jl", "max_stars_repo_name": "JuliaPackageMirrors/FileIO.jl", "max_stars_repo_head_hexsha": "d4e34014e508da06e03ea838bc5440d6fc02732f", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# -*- coding: utf-8 -*-
# ---------------------
from typing import *
import pandas as pd
import cv2
import numpy as np
class Joint(object):
"""
a Joint is a keypoint of the human body.
"""
# list of joint names
NAMES = [
'head_top',
'head_center',
'neck',
'right_c... | {"hexsha": "951fd57dc61abe15a62c3db43d53c1fbcda1f12e", "size": 5865, "ext": "py", "lang": "Python", "max_stars_repo_path": "utilities/joint.py", "max_stars_repo_name": "XiaoSanGit/wda_tracker", "max_stars_repo_head_hexsha": "b68ec0edb9daa6cc495815ba9ca549b36eec0369", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
\section{Menghavan 15: In Goghn\'{i}t hOl\'{e}dhach}
(\textit{Lesson 15: The Spatial System})\\
In the fifteenth lesson, you will learn how the spatial system works in Gal\'{a}thach.
\subsection{Gwepchoprith: Conversation}
\subsubsection{Conversation}
Below is a conversation between several people. One is a woman, ... | {"hexsha": "620679d30b83fd80b8f791db727a6ebc4f440ff7", "size": 10233, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "modern-gaulish-lessons/lesson15.tex", "max_stars_repo_name": "rockwolf/Gal-thach-hAtev-u", "max_stars_repo_head_hexsha": "4a71ceb307509bcbbbddc9d0dff2fc1f900ebeb2", "max_stars_repo_licenses": ["CC-... |
from featureExtract.feature import calFeature
from classifier.model import MusicClassifier
from audioIO import record, load
import wave
import numpy as np
import matplotlib.pyplot as plt
# record the music
# frames, ex_samWid = record("./data/demo_chunks/exp.wav", time = 10)
# wav, f = load("./data/demo_chunks/exp.wav... | {"hexsha": "ba13723f9d8adc249ab0720b68025aa959998582", "size": 586, "ext": "py", "lang": "Python", "max_stars_repo_path": "musicAI.py", "max_stars_repo_name": "Anne-Fern/shazam-air", "max_stars_repo_head_hexsha": "e51f9a11b896410599e9574417509646b962f86e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
import os
import numpy as np
import astropy.units as u
from astropy.io import fits
from astropy.convolution import convolve
import mskpy
class config:
filt = 'F430M'
subframe = 'FULL'
readpat = 'SHALLOW2'
exptime_request = 300 * u.s
mu = 5. * u.mas / u.s
pa = 10 * u.deg
impact = 0.1 * u.arc... | {"hexsha": "d6dfae15c2b1848bcb2e68c2ed95ca5e80dc4960", "size": 4808, "ext": "py", "lang": "Python", "max_stars_repo_path": "sketch/appulse-1.py", "max_stars_repo_name": "mkelley/jwst-group-editor", "max_stars_repo_head_hexsha": "aa6ba8c6b0d7383ac0055ec10d60f6725ff2b38d", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
import numpy as np
import skimage as ski
import os
from matplotlib import pyplot as plt
from skimage.feature import blob_dog, blob_log, blob_doh
from skimage.color import rgb2gray
from math import sqrt
log_defaults = {
'min_s': 1,
'max_s': 30,
'num_s': 10,
'thresh':0.1,
'overlap': 0.5,
'log_sca... | {"hexsha": "6c7daf01ca7fe23b8e1583266fff39b1ce9bf4a8", "size": 6756, "ext": "py", "lang": "Python", "max_stars_repo_path": "cc/count/countcells.py", "max_stars_repo_name": "ixianid/cell_counting", "max_stars_repo_head_hexsha": "d0af45f8e516f57a80702e956af41fdd225cef67", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.5.0
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
#... | {"hexsha": "1a7811597a201d623b3f650a02d6077f544c7ea5", "size": 42778, "ext": "py", "lang": "Python", "max_stars_repo_path": "codici/regression.py", "max_stars_repo_name": "tvml/ml2021", "max_stars_repo_head_hexsha": "d72a6762af9cd12019d87237d061bbb39f560da9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
# Copyright 2019 Antonio Medrano
# 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... | {"hexsha": "07d333236f98abe08fdd0e9fa7b988a126b941e9", "size": 5656, "ext": "py", "lang": "Python", "max_stars_repo_path": "gurobi/CPCi-LSCP.py", "max_stars_repo_name": "antoniomedrano/p-center", "max_stars_repo_head_hexsha": "819013b0ab19114c6371a7b8eb81124fe91f5dad", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
struct Bottleneck
layer
end
@functor Bottleneck
Bottleneck(in_planes, growth_rate) = Bottleneck(Chain(BatchNorm(in_planes, relu),
Conv((1, 1), in_planes => 4growth_rate),
BatchNorm(4growth_rate, relu),
... | {"hexsha": "45d8cc1d1b8f210e8c9d303438f0dd96adc0e7c1", "size": 3327, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/densenet.jl", "max_stars_repo_name": "jeremiedb/Metalhead.jl", "max_stars_repo_head_hexsha": "271927afc98ce9353867b75dbfd8b9911dfc2627", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
import numpy as np
import h5py
import os
from classification.classifier import Classifier
class LinearMachine(Classifier):
def __init__(self, N, M, name='linear machine'):
super().__init__(N, M, name, _type=5)
self.weights = np.zeros((M, N))
def _predict(self, x):
return np.argmax(np.dot(self.wei... | {"hexsha": "e630a825b2eb4f44d744c1d24ddcda2647768421", "size": 2040, "ext": "py", "lang": "Python", "max_stars_repo_path": "classification/linear_machines.py", "max_stars_repo_name": "Chappie733/MLPack", "max_stars_repo_head_hexsha": "223b142ff22dc35b9122183435afdc473a2c0b47", "max_stars_repo_licenses": ["MIT"], "max_s... |
""" Fit point charges to a HORTON costfunction under constraints.
Copyright 2019 Simulation Lab
University of Freiburg
Author: Lukas Elflein <elfleinl@cs.uni-freiburg.de>
Based on legacy code by Johannes Hormann
"""
import argparse
import h5py
import warnings
import ase.io
import sympy
import parmed as pmd
import num... | {"hexsha": "d788261be67a17ce0a37a138daea5bb88bfc7e3f", "size": 19732, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/fitESPconstrained.py", "max_stars_repo_name": "lukaselflein/sarah_folderstructure", "max_stars_repo_head_hexsha": "a725271db3d8b5b28b24918b3daf0942fa04dcd8", "max_stars_repo_licenses": ["MIT"... |
#!/usr/bin/env python
import rospy
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from hanp_msgs.msg import TimeToGoal
from hanp_msgs.msg import HumanTimeToGoalArray
from hanp_msgs.msg import HumanPathArray
from hanp_msgs.msg import HumanTrajectoryArray
from hanp_msgs.ms... | {"hexsha": "155efaef569741a0fb750822024b8ecebd725f92", "size": 4417, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/save_to_files.py", "max_stars_repo_name": "sphanit/hateb_local_planner", "max_stars_repo_head_hexsha": "a17fee83ab8bf626812cf9e31105ce6a01dff2bb", "max_stars_repo_licenses": ["BSD-3-Clause... |
import numpy as np
#Agent that uses Reinforcment-Learning with Monte Carlo policy evaluation to improve
class RL_Monte_Carlo_Agent():
#gamma: discount factor for future rewards
def __init__(self, gamma=0.9, verbose=False):
self.explore = True
self.n_states = 2*3**9
self.verbose = v... | {"hexsha": "52e6209eb0c68938d0b3f894b8c663ff3b37b268", "size": 4290, "ext": "py", "lang": "Python", "max_stars_repo_path": "rl_agent.py", "max_stars_repo_name": "marschi/tictactoe_ai", "max_stars_repo_head_hexsha": "bc92c0c49ad12d93dc8fd0fe532df8106ff734b4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
(*
* Copyright 2014, NICTA
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(NICTA_BSD)
*)
theory Sep_Provers
imports Sep_Rotate
begin
(* Constrained lens for sep_erule tacti... | {"author": "pirapira", "repo": "eth-isabelle", "sha": "d0bb02b3e64a2046a7c9670545d21f10bccd7b27", "save_path": "github-repos/isabelle/pirapira-eth-isabelle", "path": "github-repos/isabelle/pirapira-eth-isabelle/eth-isabelle-d0bb02b3e64a2046a7c9670545d21f10bccd7b27/sep_algebra/Sep_Provers.thy"} |
"""
Train and/or evaluate a spatial relation model on one or multiple splits.
Author: Philipp Jund, 2018
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import sys
import os
from SpatialRelationCNN.data_io.relation_dataset import Relati... | {"hexsha": "327f9cce2d31f7ff1985b18e9126f90ff142e00b", "size": 8963, "ext": "py", "lang": "Python", "max_stars_repo_path": "SpatialRelationCNN/train.py", "max_stars_repo_name": "ICRA-2018/generalize_spatial_relations", "max_stars_repo_head_hexsha": "6a87e987848426da757e0add595e3ec035956f01", "max_stars_repo_licenses": ... |
import numpy as np
import os
import pandas as pd
import torch
import yaml
import argparse
from utils import seed_everything
from dataset import classes
from predict_test import cfg_to_preds_path
import warnings
warnings.filterwarnings("ignore")
SEED = 123
seed_everything(SEED)
if __name__ == "__main__":
parse... | {"hexsha": "8515b234d92df9b73dc8eea2e5cd85bf8066ea7b", "size": 2236, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/classification_aux/ensemble_pseudo_ext.py", "max_stars_repo_name": "sergeykochetkov/kaggle-covid19", "max_stars_repo_head_hexsha": "07717959e21dd3ce75a8c21b6025e681ada2b65d", "max_stars_repo_l... |
from random import randint
import numpy as np
from numba import cuda, njit
def generator(minV: int, maxV: int, amount: int) -> np.array:
output = np.zeros(shape=(amount,), dtype=int)
for iterate in range(0, amount, 1):
output[iterate] = (randint(minV, maxV))
return output
@njit
def bubble_Sort(i... | {"hexsha": "25aa111a27b080c4bf31198757f1d9b5848de982", "size": 723, "ext": "py", "lang": "Python", "max_stars_repo_path": "sortnumba.py", "max_stars_repo_name": "PolskiZajac/bubble-sort", "max_stars_repo_head_hexsha": "f31664f9f351d836e15620e3d630a017f04172df", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
#todo get all the parameters including image url from cmd line
# import the necessary packages
import numpy as np
import argparse
import cv2
import urllib.request as urlreq
import requests
import json
url = 'http://192.168.1.100:8080/snapshot?topic=/camera/color/image_raw'
server_url ='http://localhost:53983/api/Det... | {"hexsha": "e0922509c4a2518ef79ea6983a9e24ff97fd5e6c", "size": 4159, "ext": "py", "lang": "Python", "max_stars_repo_path": "detector/video_inference.py", "max_stars_repo_name": "Turgibot/FinalProject", "max_stars_repo_head_hexsha": "4d4a73829780ca936216add17bb93968d0861486", "max_stars_repo_licenses": ["MIT"], "max_sta... |
from qiskit import QuantumCircuit, QuantumRegister, execute, Aer
import numpy as np
import time, sys
ftime = time.time
def speed(nbqubits, nb_circuits, repeat=1, depth=2, gpu=False):
params = np.pi * np.random.rand(depth, nbqubits, nb_circuits)
start_time = ftime()
for _ in range(repeat):
qc_lis... | {"hexsha": "fc12ab1b46f8e01620b11028917b3507c5eff64d", "size": 1467, "ext": "py", "lang": "Python", "max_stars_repo_path": "speedtests/qktest.py", "max_stars_repo_name": "exaQ-ai/manyQ", "max_stars_repo_head_hexsha": "d943fc76d8ba1f858193fd4a1cd338b090252b5d", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count... |
"""
===============================
NumPy memmap in joblib.Parallel
===============================
This example illustrates some features enabled by using a memory map
(:class:`numpy.memmap`) within :class:`joblib.Parallel`. First, we show that
dumping a huge data array ahead of passing it to :class:`joblib.Parallel`... | {"hexsha": "db956ca6c42532d9cb96d938e3b8b67a4714a013", "size": 5591, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/parallel_memmap.py", "max_stars_repo_name": "ctb/joblib", "max_stars_repo_head_hexsha": "023e7a9df56fb2feab9f6f459653338519472af8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars... |
[STATEMENT]
lemma one_inf_conv:
"1 \<sqinter> x = 1 \<sqinter> x\<^sup>T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (1::'a) \<sqinter> x = (1::'a) \<sqinter> x\<^sup>T
[PROOF STEP]
by (metis conv_dist_inf coreflexive_symmetric inf.cobounded1 symmetric_one_closed) | {"llama_tokens": 121, "file": "Stone_Relation_Algebras_Relation_Algebras", "length": 1} |
import numpy as np
def random_data(N=0, K=0, Y_cur=None, D_cur=None, X_cur=None):
if X_cur is not None:
N, K = X_cur.shape
elif D_cur is not None:
N = D_cur.shape[0]
elif Y_cur is not None:
N = Y_cur.shape[0]
if N == 0 and K == 0:
K = np.random.random_integers(1, 5)
N = np.random.random_integers(4, 4*... | {"hexsha": "eb58fc3683807c74a5226c78f055bdb1d0b408a5", "size": 907, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/utils.py", "max_stars_repo_name": "youngminju-phd/Causalinference", "max_stars_repo_head_hexsha": "630e8fb195754a720da41791b725d3dadabfb257", "max_stars_repo_licenses": ["BSD-3-Clause"], "max... |
import time, torch, sys, os
import nibabel as nib
import pickle as pkl
import numpy as np
from datetime import datetime
from glob import glob
import cv2
import matplotlib.pyplot as plt
class BaseArch(object):
def __init__(self, config):
"""basic settings"""
self.config = config
self.log_di... | {"hexsha": "02ca43aa068815f069cb26768fb39a3230706814", "size": 7701, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/model/archs/baseArch.py", "max_stars_repo_name": "QianyeYang/mpmrireg", "max_stars_repo_head_hexsha": "619b8f0b1be5ae29e4ac20f4a030ab044fce69f2", "max_stars_repo_licenses": ["MIT"], "max_stars... |
# -*- coding: utf-8 -*-
"""
Created on Sat Sep 22 19:18:35 2018
@author: Siddharth
"""
import numpy as np
import matplotlib.pyplot as plt
from sklearn.manifold import TSNE
import matplotlib.cm as CM
# scatter plot function
def plotting(model,disease,text,xaxis,yaxis):
labels=list(set(disease))
# Color vector... | {"hexsha": "6fbce1c056957c7a6eeda97c09680dec9174f0e2", "size": 2319, "ext": "py", "lang": "Python", "max_stars_repo_path": "PCA/Code/pca_code.py", "max_stars_repo_name": "SiddharthSelvaraj/Dimensionality-Reduction-and-Association-Analysis", "max_stars_repo_head_hexsha": "03683447d9d1cc64d9e3d0bfa4519e730a4e7a03", "max_... |
{-# OPTIONS --without-K #-}
module WithoutK7 where
data I : Set where
i : I
data D (x : I) : Set where
d : D x
data P (x : I) : D x → Set where
Foo : ∀ x → P x (d {x = x}) → Set
Foo x ()
| {"hexsha": "3a20e1cae8827f4cbbdc429d3a633a9ffaa9d708", "size": 196, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/fail/WithoutK7.agda", "max_stars_repo_name": "np/agda-git-experiment", "max_stars_repo_head_hexsha": "20596e9dd9867166a64470dd24ea68925ff380ce", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# Standard libraries
import pathlib
import glob
import platform
import pickle
from datetime import datetime
from pprint import pprint
# Scientific stack
import numpy as np
import numpy.random as rnd
import pandas as pd
# Chunked data
import zarr
# Audio processing
import dcase_util as du
# Pretty progress bar
impor... | {"hexsha": "f7f54a31739a081a42746b6d728dd60789687c76", "size": 4869, "ext": "py", "lang": "Python", "max_stars_repo_path": "debugging/debug_validation.py", "max_stars_repo_name": "dangpzanco/dcase-task1", "max_stars_repo_head_hexsha": "72867cc5b8969d7ec55c5acfd30ebbc3a7246666", "max_stars_repo_licenses": ["MIT"], "max_... |
"""1D and 2D quadrotor environment using PyBullet physics.
Based on UTIAS Dynamic Systems Lab's gym-pybullet-drones:
* https://github.com/utiasDSL/gym-pybullet-drones
"""
import math
from copy import deepcopy
import casadi as cs
from gym import spaces
import numpy as np
import pybullet as p
from safe_control_gym... | {"hexsha": "0f99ee6571940e17efab0725251333558efcfce6", "size": 36180, "ext": "py", "lang": "Python", "max_stars_repo_path": "safe_control_gym/envs/gym_pybullet_drones/quadrotor.py", "max_stars_repo_name": "gokhanalcan/safe-control-gym", "max_stars_repo_head_hexsha": "e9086e102663a60a66f2cc9c8cd7610888744056", "max_star... |
import os
import sys
from keras.models import Model
from keras.layers import concatenate
if os.path.realpath(os.getcwd()) != os.path.dirname(os.path.realpath(__file__)):
sys.path.append(os.getcwd())
from deephar.config import mpii_sp_dataconf
from deephar.data import MERLSinglePerson
from deephar.models impor... | {"hexsha": "783ed65308b41e8ccde9e503108fae09389f7b5b", "size": 2510, "ext": "py", "lang": "Python", "max_stars_repo_path": "exp/merl/predict_one_img.py", "max_stars_repo_name": "pminhtam/2D-3D_Multitask_Deep_Learning", "max_stars_repo_head_hexsha": "097a1035173ea5236db47a806ad275e7482bc6f2", "max_stars_repo_licenses": ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.