text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
\Easel\ is a C code library for computational analysis of biological
sequences using probabilistic models. \Easel\ is used by \HMMER\
\citep{hmmer,Eddy98}, the profile hidden Markov model software that
underlies the \Pfam\ protein family database
\citep{Finn06,Sonnhammer97} and several other protein family
databases... | {"hexsha": "726d0adf12d4b354269b90838cc0ae4470eaacab", "size": 14434, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "hmmer-3.3/easel/documentation/intro.tex", "max_stars_repo_name": "WooMichael/Project_Mendel", "max_stars_repo_head_hexsha": "ff572f7ce7f9beca148f7351cf34dbf11d670bc8", "max_stars_repo_licenses": ["... |
*
* subroutine tstipa.f atmospheric timestep for c-goldstein
* JGS iterative implicit version 2/10/00
* NRE 2-step version, 2nd attempt 2/11/01
* to recover old explicit code change the lines indicated
* coefficient of implicitness cimp included 27/5/2
* cimp=1 fully implicit, cimp=0 explicit
* coeffs for iterative im... | {"hexsha": "ab84a18096f58864da8e857e384bc4eb02416535", "size": 5253, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "genie-embm/src/fortran/tstipa.f", "max_stars_repo_name": "JUNPENGZ/cgenie.muffin", "max_stars_repo_head_hexsha": "43bc8dc025428a5141866d762129b2cfaf1345ed", "max_stars_repo_licenses": ["MIT"], "ma... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import shutil
import numpy as np
import time
import argparse
import functools
import paddle.fluid as fluid
from pyramidbox import PyramidBox
import reader
from utility import add_arguments, print_arg... | {"hexsha": "0a71606bf300c2354d6e8429b70e96a8635b1421", "size": 6954, "ext": "py", "lang": "Python", "max_stars_repo_path": "fluid/face_detection/train.py", "max_stars_repo_name": "sefira/models", "max_stars_repo_head_hexsha": "16788c580641b3e525ad615336b416d9f224be1b", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
/**
* ExperimentPackager.cpp
*
* History:
* paul on 1/25/06 - Created.
*
* Copyright 2006 MIT. All rights reserved.
*/
#include "ExperimentPackager.h"
#include "Utilities.h"
#include "LoadingUtilities.h"
#include "SystemEventFactory.h"
#include <iostream>
#include <fstream>
#include "PlatformDependentServices... | {"hexsha": "f1fb633120bf266cba9c69280cbf2e37eabb6b02", "size": 6636, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "core/Core/ExperimentDataLoading/ExperimentPackager.cpp", "max_stars_repo_name": "esayui/mworks", "max_stars_repo_head_hexsha": "0522e5afc1e30fdbf1e67cedd196ee50f7924499", "max_stars_repo_licenses": ... |
import matplotlib.pyplot as plt
import scipy
import scipy.stats as stats
import json
import csv
#import seaborn as sns; sns.set()
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import missingno as msno
from matplotlib.pyplot import *
import warnings
import random
# Draw plot
import matplotlib.pa... | {"hexsha": "39f0cc3420d0eb9918ffb68d06e1986c4c029d90", "size": 3478, "ext": "py", "lang": "Python", "max_stars_repo_path": "5.scripts/20.multiplot.py", "max_stars_repo_name": "conferencepapers/ICSE_2020", "max_stars_repo_head_hexsha": "732ec08c3072b2af46e49f1aee3d73f9cf46b1e8", "max_stars_repo_licenses": ["CC0-1.0"], "... |
[STATEMENT]
lemma positive_add: "positive x \<Longrightarrow> positive y \<Longrightarrow> positive (x + y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>positive x; positive y\<rbrakk> \<Longrightarrow> positive (x + y)
[PROOF STEP]
apply transfer
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<And>x... | {"llama_tokens": 310, "file": null, "length": 3} |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This pro... | {"hexsha": "8e413d7bcec12b62e944392e76c0898f4b01bd78", "size": 2342, "ext": "py", "lang": "Python", "max_stars_repo_path": "perceptron.py", "max_stars_repo_name": "jolivaresc/simple_perceptron", "max_stars_repo_head_hexsha": "c0d168fe30c298052c851ce4a25089736b93ed3b", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
### FRAMEWORKS AND DEPENDENCIES
import copy
#from google.cloud import bigquery
import os
import sys
from collections import OrderedDict
from pathlib import Path
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.cm as mpl_color_map
from PIL import Image, ImageFilter
fro... | {"hexsha": "e73ffec417e406bc92e2d4ef89d38a8ce6826521", "size": 28883, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "DavimenUC3M/IronIA-RoboAdvisor", "max_stars_repo_head_hexsha": "06d37889d5cb9c40139ceb6a41c959b92fff3291", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
[STATEMENT]
lemma ternary_to_bool_bool_to_ternary: "ternary_to_bool (bool_to_ternary X) = Some X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. ternary_to_bool (bool_to_ternary X) = Some X
[PROOF STEP]
by(cases X, simp_all) | {"llama_tokens": 102, "file": "Iptables_Semantics_Common_Ternary", "length": 1} |
#################################################################
# Name: BHtest.py #
# Authors: Michael Battaglia #
# Course: Phy407 #
# Inst.: Paul Kushner ... | {"hexsha": "3fb9e5f35d53fe84699bdf4c32e0a44ce9adb58a", "size": 4293, "ext": "py", "lang": "Python", "max_stars_repo_path": "BHtest.py", "max_stars_repo_name": "battaglia-michael/N-body-Galaxy-Simulation", "max_stars_repo_head_hexsha": "a661bf868e0f98ad0a48fab44d33f142ea3a70de", "max_stars_repo_licenses": ["MIT"], "max_... |
import os
import time
from datetime import datetime
import pdb
import math
import numpy as np
import pybullet as p
import pickle
import matplotlib.pyplot as plt
from utils import *
from gym_pybullet_drones.envs.BaseAviary import DroneModel, Physics
from gym_pybullet_drones.envs.CtrlAviary import CtrlAviary
from gym_py... | {"hexsha": "b747020a4d967e3b0c73d76be07432186a091100", "size": 4167, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/compare.py", "max_stars_repo_name": "ziyangli/gym-pybullet-drones", "max_stars_repo_head_hexsha": "5593ec16a53c299f5300c62f6dff14b15247fcf5", "max_stars_repo_licenses": ["MIT"], "max_star... |
(************************************************************************)
(* Icharate Toolkit *)
(* Houda ANOUN *)
(* Pierre CASTERAN *)
(* ... | {"author": "coq-contribs", "repo": "icharate", "sha": "bcf05c9689b3c20e569daee45ea1ac2bf89e9ad4", "save_path": "github-repos/coq/coq-contribs-icharate", "path": "github-repos/coq/coq-contribs-icharate/icharate-bcf05c9689b3c20e569daee45ea1ac2bf89e9ad4/Examples/cross_depEx.v"} |
module Docker
using Requests
using JSON
immutable DockerError
status::Int
msg::ByteString
end
const headers = Dict{}("Content-Type" => "application/json")
docker_uri(host) = URI("http://$host/v1.21")
docker_uri(host,endpoint) = URI("http://$host/v1.21/$endpoint")
parse(data) = JSON.... | {"hexsha": "c5cbd695fbae0eb29837c51f786339f6378f8473", "size": 4668, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Docker.jl", "max_stars_repo_name": "JuliaPackageMirrors/Docker.jl", "max_stars_repo_head_hexsha": "e9d0dda2a5ed19e7e4a87baee58bd85425822417", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
\documentclass[11pt]{article}
\usepackage[breaklinks]{hyperref}
\newcommand{\win}{\ensuremath{w_{\rm i}}}
\newcommand{\wout}{\ensuremath{w_{\rm o}}}
\begin{document}
\title{Some Notes on 3D Raytracing}
\author{Peter Erwin}
\maketitle
\section{Basics of Light Interaction with Surfaces}
We can divide the interact... | {"hexsha": "3a461b7702877e288988390ea6a29715d520551f", "size": 8143, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "rendering_notes.tex", "max_stars_repo_name": "perwin/perspectiva", "max_stars_repo_head_hexsha": "3909e70228f6ed3d4322d42def470286a194dac7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c... |
import numpy as np
import torch
from PIL import Image
from torchvision import datasets, transforms
TRAIN = 'train'
VALID = 'valid'
TEST = 'test'
NORMAL_MEANS = (0.485, 0.456, 0.406)
NORMAL_STD_DEVIATIONS = (0.229, 0.224, 0.225)
TRANSFORM_TRAIN = transforms.Compose([transforms.RandomRotation(30),
transform... | {"hexsha": "9f8edb01631cf95988a7b3c19c4680c79d037aba", "size": 2602, "ext": "py", "lang": "Python", "max_stars_repo_path": "util.py", "max_stars_repo_name": "gregdferrell/aipy-p1-image-classifier", "max_stars_repo_head_hexsha": "c505b027b6551c24c17c5c03a524a525932deb8f", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
###################################################
######## Programmable filter script ########
###################################################
# Author: Matthieu Heitz
# Output DataSet Type = Same as Input
############# Properties for auto-generated XML #############
Name = 'ApplyPoseTransformToPointCloud'
L... | {"hexsha": "09b727d6320c3d53dd5696b4bba3a075265f2f8f", "size": 7769, "ext": "py", "lang": "Python", "max_stars_repo_path": "ParaViewPlugins/ApplyPoseTransformToPointCloud.py", "max_stars_repo_name": "Kitware/ParaViewTangoRecorder", "max_stars_repo_head_hexsha": "1765d65def66fafdf33197a273784c68b87ef84f", "max_stars_rep... |
using Juqst
@testset "Random Channel" begin
testChannel = [1.0 0.0 0.0 0.0
0.00101911 0.971286 -0.0706597 -0.000750742
0.0126756 0.0711915 0.964136 0.00751068
-0.0142784 0.000199791 -0.00735239 0.953949 ]
@test round(fideli... | {"hexsha": "ab5b4ec19f4ad87c4faa27ea4af84291945fdc77", "size": 3259, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/ChannelTests.jl", "max_stars_repo_name": "rharper2/Juqst.jl", "max_stars_repo_head_hexsha": "6fe74fe327edd4626b7b4a33312c3a460bd3dfb6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6... |
import zipfile
import shutil
import os
import tensorflow as tf
import pandas as pd
import numpy as np
import wandb
from PIL import Image
path_reef = 'E:/kaggle_great_barrier_reef/Great_Barrier_Reef/'
zip_file = 'tensorflow-great-barrier-reef.zip'
data_path = os.path.join(path_reef, 'data_reef')
# with zipfile.ZipFile... | {"hexsha": "7e3ecef3544963733e9bef16c37788819d24982e", "size": 1370, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_processing.py", "max_stars_repo_name": "urvins03/Great_Barrier_Reef", "max_stars_repo_head_hexsha": "d61356eed7f9c4e6827927f29c77069aa1d2ed53", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import numpy as np
MAX_LONGITUDE = 180.0
MAX_LATITUDE = 85.05112877980659 # (2*atan(exp(M_PI))*180.0/M_PI - 90.0)
MIN_LONGITUDE = -MAX_LONGITUDE
MIN_LATITUDE = -MAX_LATITUDE
MAX_ZOOM = 31
def quadint_from_ZXY(zoom, X, Y):
"""
Convert tile coordinates to quadint at specific zoom level
"""
if zoom <... | {"hexsha": "28073e0e8da28368b2ba2c8aa793063b7cf085e0", "size": 1620, "ext": "py", "lang": "Python", "max_stars_repo_path": "quadint_carto3_vect.py", "max_stars_repo_name": "vehrka/quadint_vect", "max_stars_repo_head_hexsha": "b742b928e1e683851d22982f8bcc9cdfa3b69636", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s... |
"""
Add Cell Connectivity To Points
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example for :class:`PVGeo.filters.AddCellConnToPoints`
This filter will add **linear** cell connectivity between scattered points.
You have the option to add ``VTK_LINE`` or ``VTK_POLYLINE`` connectivity.
``VTK_LINE`` connectivity makes a straight li... | {"hexsha": "898f83a3bc65474b10ebc1da675811526fe6b288", "size": 2665, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/filters-general/add-cell-connectivity-to-points.py", "max_stars_repo_name": "tkoyama010/PVGeo", "max_stars_repo_head_hexsha": "d2852b07be5411ca4b3a96f886ae864bbf6d09d8", "max_stars_repo_l... |
from math import pi
import random
from typing import List
import numpy as np
import torch
from torch.nn.functional import (
binary_cross_entropy_with_logits,
mse_loss, tanh, relu
)
import matplotlib.pyplot as plt
import kornia
import pydiffvg
from models import BaseVAE, interpolate_vectors, reparameterize
... | {"hexsha": "adb714026587df930c36abb8b159079ea048899c", "size": 20729, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/vector_vae.py", "max_stars_repo_name": "IlyaBizyaev/Im2Vec", "max_stars_repo_head_hexsha": "4fff000c84500c6e977c502519497e27e1f946f2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
from __future__ import (division, print_function)
from pomegranate import *
from nose.tools import with_setup
from nose.tools import assert_equal
from nose.tools import assert_not_equal
from nose.tools import assert_raises
import random
import numpy as np
import json
def setup():
'''
Build a model that we want to ... | {"hexsha": "073556844b1764f3e91e00fc7a85b625ae53e585", "size": 17822, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_profile_hmm.py", "max_stars_repo_name": "m-martin-j/pomegranate", "max_stars_repo_head_hexsha": "d79b5464e8d2a3678de33d2323d75f0bc4168e19", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import torch
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
from math import exp
from torch import nn
from torch import Tensor
class L1_LOSS(nn.Module):
def __init__(self) -> None:
super(L1_LOSS, self).__init__()
def forward(self, input: Tensor) -> Tensor:
... | {"hexsha": "0a63d90c1d38da2fbe9513c884fc221e12d3442b", "size": 3897, "ext": "py", "lang": "Python", "max_stars_repo_path": "loss.py", "max_stars_repo_name": "LEE-SEON-WOO/FusionDN_pytorch", "max_stars_repo_head_hexsha": "7b05fd1fc86145ebfb427340c47bb87dc7da0976", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co... |
import torch
import util.util as util
from util.NonparametricShift import Modified_NonparametricShift, Batch_NonShift
from torch.nn import functional as F
import numpy as numpy
import matplotlib.pyplot as plt
bz = 2
c = 3 # at least 2
w = 16
h = 16
feature_size = [bz, c, w, h]
former = torch.rand(bz*c*h*w).mul_(50).... | {"hexsha": "c826f972bf761a1a23ce44eaecb2ba3747fa92c3", "size": 4368, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_acc_shift.py", "max_stars_repo_name": "mauriliosalg/Seis_Shift-Net_pytorch", "max_stars_repo_head_hexsha": "26f777d5e3be9d0828972202a61f0e01e2c04a1a", "max_stars_repo_licenses": ["MIT"], "max... |
C$Procedure CBINIT ( Character buffer, initialize )
SUBROUTINE CBINIT_1 ( DIM, BUFFER )
IMPLICIT NONE
C$ Abstract
C
C Initialize a character buffer.
C
C$ Disclaimer
C
C THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
C CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
... | {"hexsha": "832b03f591a4dc6dcd1455ad812c52791b825b22", "size": 4566, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "source/nasa_f/cbinit_1.f", "max_stars_repo_name": "agforero/FTFramework", "max_stars_repo_head_hexsha": "6caf0bc7bae8dc54a62da62df37e852625f0427d", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
import abc
import copy
import os
import numpy as np
import tqdm
from collections import deque
from . import stage as st
from .luminos_stage import luminos_stage as ls
from ..utils import gnuplot as gp
def _unique(seq):
seen = set()
return [seen.add(x) or x for x in seq if x not in seen]
class ScannerDesign:
... | {"hexsha": "0a69baa64a0cfcc69ad52ca3151ec8d0aa9d9951", "size": 27761, "ext": "py", "lang": "Python", "max_stars_repo_path": "drivers/stages/scanner.py", "max_stars_repo_name": "jtambasco/photonic-coupling-drivers", "max_stars_repo_head_hexsha": "9f8e422b1b6e2e5ff783c9146130ed71ee01241d", "max_stars_repo_licenses": ["MI... |
import mdtraj as md
import bqplot as bq
import ipywidgets as w
from traitlets import Integer, Float, link, observe
from traittypes import Array
import nglview as nv
from .ezfigure import EZFigure
import numpy as np
class TrajPlot(w.Box):
"""Class responsible for compositing a traj with a figure"""
frame = Int... | {"hexsha": "58228ba2e7084f6b53721ca49cfe7cae2625eead", "size": 3182, "ext": "py", "lang": "Python", "max_stars_repo_path": "bqploteins/trajplot.py", "max_stars_repo_name": "Yoshanuikabundi/JupyterJoy", "max_stars_repo_head_hexsha": "658f7bb0a33fdc34eb6366fae3b73d0481fd554f", "max_stars_repo_licenses": ["MIT"], "max_sta... |
#!/usr/bin/env python
import os
import os.path as op
import random
import string
import itertools as it
import textwrap as tw
from unittest import mock
from contextlib import contextmanager
import pytest
import numpy as np
import fsl.utils.settings as fslsettings
from fsl.utils.tempdir import tempdir
import fsle... | {"hexsha": "efc81a56fa373907183531342fdfbffcebf79bd3", "size": 15998, "ext": "py", "lang": "Python", "max_stars_repo_path": "fsleyes/tests/test_colourmaps.py", "max_stars_repo_name": "pauldmccarthy/fsleyes", "max_stars_repo_head_hexsha": "453a6b91ec7763c39195814d635257e3766acf83", "max_stars_repo_licenses": ["Apache-2.... |
from nate.svonet.graph_svo import generate_ticks, find_max_burst
import networkx as nx
import stop_words as sw
import copy
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from matplotlib.ticker import MaxNLocator
import numpy as np
class DegreeOverTimeMix... | {"hexsha": "4f0424e98bb55daba9fb9d1ae04da58bd62bcec5", "size": 9258, "ext": "py", "lang": "Python", "max_stars_repo_path": "nate/svonet/degree_over_time.py", "max_stars_repo_name": "UWNETLAB/nelanna", "max_stars_repo_head_hexsha": "9029670d5804f478cac2e83d77ff86ff2a7266c2", "max_stars_repo_licenses": ["MIT"], "max_star... |
import scipy.io
import numpy as np
import pickle
image_size = 128
num_labels = 3
def reformat(dataset, labels):
dataset = dataset.reshape((-1, image_size * image_size)).astype(np.float32)
# Map 0 to [1.0, 0.0, 0.0 ...], 1 to [0.0, 1.0, 0.0 ...]
#labels = (np.arange(num_labels) == labels[:,None]).astype(np.float... | {"hexsha": "62c042cee033da2163c8137f7be394084ba784d8", "size": 1206, "ext": "py", "lang": "Python", "max_stars_repo_path": "pickle_2_mat.py", "max_stars_repo_name": "krantirk/ATR-FNN", "max_stars_repo_head_hexsha": "c69ca9e711e3fe0eb6a77b7b9ef257b5b83934d7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 11, "m... |
\chapter{The \lhcb\ experiment}
\label{chap:intro:lhcb}
The \lhcb\ detector~\cite{Alves:2008zz,Aaij:2014jba} is situated at point 8 of
the \ac{LHC}.
The general goal of the experiment is to explore the area of heavy flavour
physics, that is the interactions of charm and beauty quarks and the hadrons
that contain th... | {"hexsha": "f3e6cd4a4ff192d483ea441c5fed5587ff706f53", "size": 40156, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/introduction/lhcb.tex", "max_stars_repo_name": "alexpearce/Thesis", "max_stars_repo_head_hexsha": "d727d04b7ee619ba0eb45c7faf1004eb418e046e", "max_stars_repo_licenses": ["MIT"], "max_stars... |
# =============================================================================
# Basic functions from which the composite functions can be generated
# Written by Ali Ahrari (aliahrari1983@gmail.com)
# last update by Ali Ahrari on 15 March 2021
# ========================================================================... | {"hexsha": "c592d5822a16ed0891cdf3c9251efacc67d11742", "size": 5216, "ext": "py", "lang": "Python", "max_stars_repo_path": "BasicFunc.py", "max_stars_repo_name": "ElsevierSoftwareX/SOFTX-D-21-00154", "max_stars_repo_head_hexsha": "2cedb85a05dac8ea893ea69b8295d8557d5ec826", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import random
import numpy
from matplotlib import pyplot as plt
import csv
'''
INPUT VARIABLES
n: the number of active devices in the network
id_length: if given, all the binary id strings will be in certain length.
'''
def initialiseIDs(id_length,n):
'''
Given parameters n(the number of active devi... | {"hexsha": "e1b1d46d8a3b3e1197055c61f53276eeec7de516", "size": 10850, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/Dynamic_simulation.py", "max_stars_repo_name": "tum-lkn/sicqta", "max_stars_repo_head_hexsha": "64ffeb2467b1e865a1d9c666e6e36a2f313b6d69", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
from googletrans import Translator
from textblob import TextBlob
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import random
def get_similarity(tweet_prep, column):
senti = tweet_prep.loc[:10, [column]]
senti['polarity'] = pd.DataFrame(senti[column]).apply(lambda x: TextBl... | {"hexsha": "1a787f8a20e6582890eb396bd22d55d2565e8e91", "size": 1996, "ext": "py", "lang": "Python", "max_stars_repo_path": "functions/sentiment.py", "max_stars_repo_name": "descent-stis/simple-nlp-project", "max_stars_repo_head_hexsha": "1661e9c5613a9b88d8ec99870d2e387b900825eb", "max_stars_repo_licenses": ["MIT"], "ma... |
import math
import re
from configparser import ConfigParser
from ast import literal_eval
from decimal import *
getcontext().prec = 6
import numpy as np
import quaternion
from astropy.coordinates import SkyCoord
from astropy.time import Time
from astropy import units
from settings import *
from algo im... | {"hexsha": "b6621ec9b08065185909444010e97f1987d9c90d", "size": 10046, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/iotools/lblloader.py", "max_stars_repo_name": "slamajakub/visnav-py", "max_stars_repo_head_hexsha": "872363a8f115ae2dc8966f7c890891a41cb60b16", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
#!/usr/bin/env python
"""
RS 2018/04/24: Visualization of samples from geological prior/posterior
This rips off many visualization elements from bin/python/visWorld.
Looked short enough, and important enough, to be worth rewriting.
"""
import argparse
import numpy as np
import matplotlib as mpl
mpl.use('Agg')
impor... | {"hexsha": "d2fe75aa2e5f57e2f46b4c1e7eb7108e703572d9", "size": 5322, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/geovis_notebook_version.py", "max_stars_repo_name": "divad-nhok/obsidian_fork", "max_stars_repo_head_hexsha": "e5bee2b706f78249564f06c88a18be086b17c895", "max_stars_repo_licenses": ["MIT"]... |
#!/usr/bin/env python3
"""
summarize orthologer output
"""
import sys, os
import numpy as np
def count_genes(counts, genes):
index = 0
for gene in genes:
if gene != '-':
counts[index] += 1
index += 1
return counts
def count_orthologs(counts, genes):
index = 1
if genes... | {"hexsha": "14a8d9f08029d587a8607d8f1dd9beef40d739bc", "size": 2964, "ext": "py", "lang": "Python", "max_stars_repo_path": "ctbBio/orthologer_summary.py", "max_stars_repo_name": "christophertbrown/bioscripts", "max_stars_repo_head_hexsha": "c8c657b7895681b539bdfd8c78f786f9b99ab230", "max_stars_repo_licenses": ["MIT"], ... |
using ForwardDiff, UnPack, LinearAlgebra
using DiffEqBase: DiffCache, get_tmp, dualcache
mutable struct RALΛ{L <: Function, LC}
Λ::L
cache::LC
end
function RALΛ(Λ::Function, z::C1, matrix_type::DataType, dims::Tuple{Int, Int}) where {C1 <: AbstractVector{<: Number}}
cache = matrix_type(undef, 0, 0) # Crea... | {"hexsha": "c68504caa6e025f5c403b95626a0fb79767a2686", "size": 28993, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/risk_adjusted_linearization.jl", "max_stars_repo_name": "chenwilliam77/gen_affine", "max_stars_repo_head_hexsha": "d66fc65efabe5e01398d99526aba83fafe271006", "max_stars_repo_licenses": ["MIT"]... |
[STATEMENT]
lemma compute_tmax_rule [hoare_triple]:
"<int_tree t1 b1 * int_tree t2 b2>
compute_tmax it b1 b2
<\<lambda>r. int_tree t1 b1 * int_tree t2 b2 * \<up>(r = max3 it (interval_tree.tmax t1) (interval_tree.tmax t2))>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. <int_tree t1 b1 * int_tree t2 b2> com... | {"llama_tokens": 216, "file": "Auto2_Imperative_HOL_Imperative_IntervalTree_Impl", "length": 1} |
from __future__ import print_function
import os
import numpy as np
import csv
import matplotlib
from matplotlib import pyplot as plt
from matplotlib.ticker import PercentFormatter
from PIL import Image, ImageOps
from skimage import io
from utils.preprocess import load_pfm
FONTSIZE=20
matplotlib.rcParams.update({'font.s... | {"hexsha": "4b38618b312709d7a15ca792cc55d4094e1afe08", "size": 9383, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/stastic_disparity.py", "max_stars_repo_name": "HKBU-HPML/FADNet-PP", "max_stars_repo_head_hexsha": "6e653e8f1fa0f55f10068f5592cbc8b49bb571e4", "max_stars_repo_licenses": ["MIT"], "max_star... |
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
import numpy as np
from ginga.canvas.CanvasObject import get_canvas_types
#from ginga import trcalc
from ginga.gw import Widgets
from ginga.util import action
from .base import Stage
class Crop(Stage):
... | {"hexsha": "816e60e42be22d71a207018ca21bd91247afb676", "size": 7589, "ext": "py", "lang": "Python", "max_stars_repo_path": "ginga/util/stages/crop.py", "max_stars_repo_name": "kyraikeda/ginga", "max_stars_repo_head_hexsha": "e0ce979de4a87e12ba7a90eec0517a0be05d14bc", "max_stars_repo_licenses": ["BSD-3-Clause-No-Nuclear... |
[STATEMENT]
lemma Nil_O_never: "[] = O tr \<longleftrightarrow> never \<gamma> tr"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. ([] = O tr) = never \<gamma> tr
[PROOF STEP]
unfolding O_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. ([] = map g (filter \<gamma> tr)) = never \<gamma> tr
[PROOF STEP]
by (induc... | {"llama_tokens": 138, "file": "BD_Security_Compositional_Independent_Secrets", "length": 2} |
import tictactoe as ttt
import numpy as np
board = np.array([
['o', 'x', 't'],
['d', 'x', 'g'],
['o', 'v', 'b']
])
available = ttt.find_available_moves(board)
best_move, metric_dict = ttt.optimal_ai_move(board=board, x_or_o='x', available=available)
print(best_move, metric_dict)
"""
The AI chooses botto... | {"hexsha": "42c9bb5e8f9ff82d4792f0b68c35524d17db72c4", "size": 812, "ext": "py", "lang": "Python", "max_stars_repo_path": "ttt_tests/greedy_ai_test.py", "max_stars_repo_name": "jcoombes/tictactoe", "max_stars_repo_head_hexsha": "948ab72854f579202f377df2a1a493ebe7990429", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
import tweepy
import numpy as np
import matplotlib.pyplot as plt
class Colorschemez:
def __init__(self, status):
"""Constructs a Colorscheme from a @colorschemez tweet.
Arguments:
status -- a @colorschemez tweet in a Tweepy status object.
"""
c = status.text.split(... | {"hexsha": "2f8453f2386b6dd9f30f167754e412711bb13341", "size": 6029, "ext": "py", "lang": "Python", "max_stars_repo_path": "ScientificColorschemez.py", "max_stars_repo_name": "sliem/ScientificColorschemez", "max_stars_repo_head_hexsha": "2a259436bd535bf4318172e9d09038d5a6038f66", "max_stars_repo_licenses": ["MIT"], "ma... |
"""Summary
"""
import numpy as np
from collections import deque
import math
def constructIncomingGraph(og):
"""Construct the graph.
No weights preserved. Return grapg ig, where ig[i] = j, there is an edge
from node j to node i.
Args:
og (dict): Graph with ougoing edges.
Returns:
... | {"hexsha": "008f0559f4304f7fa58706b543d08f8965fe35fe", "size": 3149, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/topological_sorting.py", "max_stars_repo_name": "ovysotska/image_sequence_matcher", "max_stars_repo_head_hexsha": "6a74126384df70625bdb43122e0517a82137c08d", "max_stars_repo_licenses": ["MIT"]... |
# -*- coding: utf-8 -*-
"""
"""
from __future__ import print_function
import numpy as np
class StaticStructureProblemParams:
#Nastran initial geometry file
nastran_geometry = 'nastran_input_geometry.inp'
def __init__(self, node_id, node_id_all):
#List of structural nodes on the outer surface
... | {"hexsha": "edfb0e03d73c1145039a420f96c3f5cdbc2059e7", "size": 3081, "ext": "py", "lang": "Python", "max_stars_repo_path": "aerostructures/structures_static/structures_static_problem_params.py", "max_stars_repo_name": "joanmasco/aerostructures", "max_stars_repo_head_hexsha": "4dcf598a126d7e419e08d518d552861744b48bcd", ... |
import os
import sys
import gzip
import dill
import tqdm
import pickle
import torch
from torch.utils.data import Dataset
import numpy as np
from numpy.random import random_integers
from PIL import Image
def progress_bar(count, total, status=''):
bar_len = 60
filled_len = int(round(bar_len * count / float(tot... | {"hexsha": "11d5057b180e2766a9f47c7381cf211f8f0605c5", "size": 5961, "ext": "py", "lang": "Python", "max_stars_repo_path": "spatial_monet/util/datasets.py", "max_stars_repo_name": "cvoelcker/MONet", "max_stars_repo_head_hexsha": "55a23e4f09c6ad9c1823175f54ab372327189866", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# !usr/bin/env python3
import numpy as np
import sys
import pandas as pd
def display_instruct():
"""Display game instructions."""
return """
Welcome to the greatest intellectual challenge of all time: Kuba Game
This will be a showdown between your human brain and my silicon pr... | {"hexsha": "13a5a083d4b82879e2421d863b8c19a440b42775", "size": 12009, "ext": "py", "lang": "Python", "max_stars_repo_path": "kubagame.py", "max_stars_repo_name": "morehwachege/kubagame", "max_stars_repo_head_hexsha": "c0f67e8a0a35dda776c425ac6db602cbda86a9f0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
# совемещаем три графика. Располагаем внизу совместную легенду.
library(ggpubr)
#ggarrange function
Regression_Profiles111824 <- ggarrange(Loess_profile11, Loess_profile18, Loess_profile24, labels = c("1", "2", "3"), ncol = 3, nrow = 1, common.legend = TRUE, legend = "bottom")
| {"hexsha": "a15b6f4581fafe6451c9fdb825c093b71634741f", "size": 281, "ext": "r", "lang": "R", "max_stars_repo_path": "Regression_3plots.r", "max_stars_repo_name": "paulinelemenkova/R-Regression-Analysis-Loess-", "max_stars_repo_head_hexsha": "48a52b78ab5e81b267799708b656879a20ddf71a", "max_stars_repo_licenses": ["MIT"],... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2018 University of Groningen
#
# 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
#
# U... | {"hexsha": "a89bdf6a1a8f68042942ca2e6e74909e19a7b71c", "size": 34148, "ext": "py", "lang": "Python", "max_stars_repo_path": "vermouth/processors/do_mapping.py", "max_stars_repo_name": "biomolsim/vermouth-martinize", "max_stars_repo_head_hexsha": "332295078bfea680da7f488d2a9d61a97b8c9ae9", "max_stars_repo_licenses": ["A... |
import numpy as np, tensorflow as tf
import pickle as pkl
import argparse
import gym
def load_expert_data(data_path):
with open(data_path, 'rb') as f:
data = pkl.load(f)
return data
class Agent():
def __init__(self, env):
self.sess = tf.Session()
self.env = gym.make(env)
self.obs = tf.placeholder(tf.flo... | {"hexsha": "b82a2e2b9403eae621078f7fe2494b13a103bbdf", "size": 2141, "ext": "py", "lang": "Python", "max_stars_repo_path": "hw1/bc.py", "max_stars_repo_name": "namuchan95/homework", "max_stars_repo_head_hexsha": "2bd9da1bdf5408d14097566dc7261956eb627e00", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
//==============================================================================
// Copyright 2003 - 2013 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2013 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... | {"hexsha": "a76a8a72a5d11f5b565224081497ee9eba04fa28", "size": 4462, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "modules/core/combinatorial/unit/scalar/factorial.cpp", "max_stars_repo_name": "psiha/nt2", "max_stars_repo_head_hexsha": "5e829807f6b57b339ca1be918a6b60a2507c54d0", "max_stars_repo_licenses": ["BSL-... |
Lemma id : forall A : Type, A -> A.
Proof.
exact (fun A (x : A) => x).
Defined.
Print id.
| {"author": "erikmd", "repo": "docker-run-github-workflow-example", "sha": "b30fbadb7a19078019791af76dcd8fdd06eb3a50", "save_path": "github-repos/coq/erikmd-docker-run-github-workflow-example", "path": "github-repos/coq/erikmd-docker-run-github-workflow-example/docker-run-github-workflow-example-b30fbadb7a19078019791af7... |
# The water-tank example coded in Python
# TODO: Still need to write the parser
import macropy.activate
from language import *
from gen import *
from sympy import *
import shac
# SwitchTank From http://robotics.eecs.berkeley.edu/~sastry/ee291e/lygeros.pdf
# w=1 ; v1=0.3 ; v2 = 0.5
# Max height of a tank : 1. At the ... | {"hexsha": "38d787d677952aea3383ce728e5732e4af46f89f", "size": 1583, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/switchtank/SwitchTank.py", "max_stars_repo_name": "UoA-ECE-RP/sha", "max_stars_repo_head_hexsha": "0282f356a79729ab0e8706dcaa09c4af89ad7bbe", "max_stars_repo_licenses": ["MIT"], "max_star... |
import sklearn
from pprint import pprint
# Standard Imports (Data Manipulation and Graphics)
import numpy as np # Load the Numpy library with alias 'np'
import pandas as pd # Load the Pandas library with alias 'pd'
import seaborn as sns # Load the Seabonrn, graphics library with alias 'sns'
import copy
from ... | {"hexsha": "76e78b2207fd1708844829b833c2b4f54ee89b3e", "size": 15672, "ext": "py", "lang": "Python", "max_stars_repo_path": "pittsburgh-bridges-data-set-analysis/resources/examples/notebooks/utils/utilities_functions.py", "max_stars_repo_name": "franec94/Pittsburgh-Bridge-Dataset", "max_stars_repo_head_hexsha": "682ff0... |
% !TEX root = ../main.tex
% !TEX spellcheck = en_US
\chapter{Background} While RTS games has been around since the 80s\cite{adams06, rtsHistory}, only a
handful of scientific articles can be found on teammate bots for RTS games, and current big RTS
titles have yet to implement a good teammate bot. In general little res... | {"hexsha": "72ddc53397c2ca914672248fffd599ad26a22c72", "size": 15198, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "BATS/docs/thesis/chapters/background.tex", "max_stars_repo_name": "Senth/bats", "max_stars_repo_head_hexsha": "51d4ec39f3a118ed0eb90ec27a1864c0ceef3898", "max_stars_repo_licenses": ["Apache-2.0"], ... |
from sklearn.ensemble import AdaBoostRegressor
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import GridSearchCV
import numpy as np
class _RandomForest:
def init(verbose):
model = RandomForestClassifier(max_depth=4, verbose=verbose)
return model
def train(mo... | {"hexsha": "615c33a4e59bdcc103b7cd0a378668dfde6bfab0", "size": 1120, "ext": "py", "lang": "Python", "max_stars_repo_path": "school/assignment1/r_forest.py", "max_stars_repo_name": "kubekbreha/ML-Python-Algorithms", "max_stars_repo_head_hexsha": "8058b68a2d98a79a6debcc69abdd188c97420d75", "max_stars_repo_licenses": ["MI... |
# -*- coding: utf-8 -*-
"""
Name: tic-tac-toe game
Edition: 1.1
Author: Li
Update log:
Version 1.1: add interface to show the winner (def winner())
Plan log:
Version 1.2: add buttons to restart and end the game (def button_restart() button_end())
Version 2.0: 1.add human-robot-fighting pattern
2.optimize... | {"hexsha": "505d9731d14e872fa7154d53d55975351537d2ae", "size": 4313, "ext": "py", "lang": "Python", "max_stars_repo_path": "Others/Python/projects/game3_ttt.py", "max_stars_repo_name": "ZhekaiLi/Code", "max_stars_repo_head_hexsha": "60788a2d2089b358a1c39e50acced96cb5eb3fa1", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import os
import random
from pathlib import Path
from allennlp.data.iterators import BasicIterator
from allennlp.nn.util import move_to_device
from pytorch_pretrained_bert import BertTokenizer, BertModel, BertAdam
import config
from bert_model_variances.bert_multilayer_output import BertMultiLayerSeqClassification
fr... | {"hexsha": "b3dd441f64363348a5b9357e75ea2588ed630f05", "size": 34396, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/hotpot_content_selection/bert_s_level_v1.py", "max_stars_repo_name": "ethanjperez/semanticRetrievalMRS", "max_stars_repo_head_hexsha": "765e00d6e7693e0eaba20ef1407fad0be4a7a92b", "max_stars_r... |
import numpy as np
import numba as nb
################################################################################
@nb.jit(nopython = True, nogil = True)
def Maxwell(u):
#
f = np.sqrt(1 / np.pi) * np.exp(- u ** 2)
#f = 2 * abs(u) * np.exp(- u ** 2)
#
return(f)
#################################... | {"hexsha": "1f907088b9b947f6837f8cb1e94980e1671c4b62", "size": 1467, "ext": "py", "lang": "Python", "max_stars_repo_path": "V_4th_Condensation/jifensheji.py", "max_stars_repo_name": "KhalilWong/Kernel_MD", "max_stars_repo_head_hexsha": "ec36dd910020e3e49758b73c319df71d2ff1f1d6", "max_stars_repo_licenses": ["MIT"], "max... |
"""
Hannan-Rissanen procedure for estimating ARMA(p,q) model parameters.
Author: Chad Fulton
License: BSD-3
"""
import numpy as np
from scipy.signal import lfilter
from statsmodels.tools.tools import Bunch
from statsmodels.regression.linear_model import OLS, yule_walker
from statsmodels.tsa.tsatools import lagmat
fr... | {"hexsha": "7fef471fd5716037e33bed009b3ba6ede9c44f11", "size": 8699, "ext": "py", "lang": "Python", "max_stars_repo_path": "statsmodels/tsa/arima/estimators/hannan_rissanen.py", "max_stars_repo_name": "timgates42/statsmodels", "max_stars_repo_head_hexsha": "ab8ff09e3eb8c385214bd1575aa47b81bf53d584", "max_stars_repo_lic... |
/- 30 Aug 2019 -/
-- degree
-- incidence matrix
-- adjacency matrix
/-
## Definitions:
* A sequence of nonnegative integers is called `graphic` if it is the degree
sequence of a simple graph.
how does one write dn where n is a subscript?
Havel-Hakimi Theorem: Let d_1 ≥ d_2 ≥ ... ≥ d_n ≥ 0 be a (finite) sequence of... | {"author": "agusakov", "repo": "math-688-lean", "sha": "67dc27ebff55a74c6b5a1c469ba04e7981d2e550", "save_path": "github-repos/lean/agusakov-math-688-lean", "path": "github-repos/lean/agusakov-math-688-lean/math-688-lean-67dc27ebff55a74c6b5a1c469ba04e7981d2e550/src/math-688/lectures/lec-2.lean"} |
#ifndef LIME_SERVICE_HPP
#define LIME_SERVICE_HPP
#include <boost/format.hpp>
#include <iostream>
#include <set>
#include <string>
namespace Lime {
/**
* Service Interface, only to show a service template
*/
class ServiceInterface {
public:
ServiceInterface() {}
virtual ~ServiceInterface() {}
virtual bool ... | {"hexsha": "e8842007d90040e24562c45938caa588458e595b", "size": 1884, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/Base/Service.hpp", "max_stars_repo_name": "lizongti/lime", "max_stars_repo_head_hexsha": "71c966e19f96efd4de6eb2d427c47b382389c8ea", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
function [roiFile, labelFile] = roiSaveAllAsNifti(vw, fname)
% Export all current ROIs in a mrVista view as a nifti segmentation file,
% with each ROI corresponding to a different layer (integer) in the nifti
% file.
%
% [roiFile, labelFile] = roiSaveAllAsNifti(vw, fname, roiColor)
%
% Oct 2008: JW
%
% See roiSaveAsNif... | {"author": "vistalab", "repo": "vistasoft", "sha": "7f0102c696c091c858233340cc7e1ab02f064d4c", "save_path": "github-repos/MATLAB/vistalab-vistasoft", "path": "github-repos/MATLAB/vistalab-vistasoft/vistasoft-7f0102c696c091c858233340cc7e1ab02f064d4c/mrBOLD/ROI/roiSaveAllAsNifti.m"} |
INTEGER FUNCTION LCMGDF(LUNIT,SUBSET)
C$$$ SUBPROGRAM DOCUMENTATION BLOCK
C
C SUBPROGRAM: LCMGDF
C PRGMMR: J. ATOR ORG: NP20 DATE: 2009-07-09
C
C ABSTRACT: THIS FUNCTION CHECKS WHETHER AT LEAST ONE "LONG" (I.E.
C GREATER THAN 8 BYTES) CHARACTER STRING EXISTS WITHIN THE INTERNAL
C DICTION... | {"hexsha": "ef3ff3511e0a84cd5182ef6efdbe9f83fa43cf03", "size": 2334, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "var/external/bufr/lcmgdf.f", "max_stars_repo_name": "matzegoebel/WRF-fluxavg", "max_stars_repo_head_hexsha": "686ae53053bf7cb55d6f078916d0de50f819fc62", "max_stars_repo_licenses": ["BSD-2-Clause"]... |
HANSARD REVISE * NUMERO 168
Le mardi 8 decembre 1998
REPONSE DU GOUVERNEMENT A DES PETITIONS
LES COMITES DE LA CHAMBRE
Mme Nancy Karetak-Lindell
Procedure et affaires de la Chambre
LOI SUR L'AGENCE DES DOUANES ET DU REVENU DU CANADA
L'hon. Harbance Singh Dhaliwal
M. Jean-Paul Marchand
L'ACCIDENT D'AVION A POIN... | {"hexsha": "901951c855e7c3d42c361d4e6985205f5dfab1f9", "size": 73118, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "data/Hansard/Training/hansard.36.1.house.debates.168.f", "max_stars_repo_name": "j1ai/Canadian_Hansards_Neural_Machine_Translation", "max_stars_repo_head_hexsha": "554666a89090fc1b1d1fb83601a2e9d... |
#coding: utf-8
import numpy as np
import pylab
from sklearn.datasets import load_digits
# scikit-learnの手書き数字データをロード
# 1797サンプル、8x8ピクセル
digits = load_digits()
# 最初の10サンプルを描画
# digits.images[i] : i番目の画像データ(8x8ピクセル)
# digits.target[i] : i番目の画像データのクラス(数字なので0-9)
for index, (image, label) in enumerate(zip(digits.images, di... | {"hexsha": "5b9a41dbdd4e891309fab20f2511eb52c6e14bb4", "size": 511, "ext": "py", "lang": "Python", "max_stars_repo_path": "ch5/plot_digits.py", "max_stars_repo_name": "aidiary/PRML", "max_stars_repo_head_hexsha": "db2dfc10bd39dc5649528d3778aa5fffb283186b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 93, "max... |
# This file was generated, do not modify it. # hide
using MLJ, RDatasets, PrettyPrinting
MLJ.color_off() # hide
@load DecisionTreeClassifier pkg=DecisionTree
carseats = dataset("ISLR", "Carseats")
first(carseats, 3) |> pretty | {"hexsha": "12f96bce5e97ff7423d550688668d86137529d9b", "size": 227, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "__site/assets/isl/lab-8/code/ex1.jl", "max_stars_repo_name": "ven-k/MLJTutorials", "max_stars_repo_head_hexsha": "42151c8a96ad701aeaf763d53c8b7c6689eb6e8d", "max_stars_repo_licenses": ["MIT"], "max_... |
! { dg-do compile }
! PR36724 - ICE on pointer to substring
! testcase contributed by Loukas Peristeras.
character(LEN=132), target :: line
character(LEN=1), pointer :: t
read(*,'(A)') line
t=>line(1:1)
end
| {"hexsha": "054a29d56bbfd043d5908424c64a4ff7378ee02a", "size": 217, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/pointer_to_substring.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_... |
import glob
from os.path import abspath, dirname
from pathlib import Path
import numpy as np
import torch
import torchvision
from torch.utils.data import DataLoader, TensorDataset
data_path = dirname(dirname(abspath(__file__))) + "/data/corruptmnist"
train_data = data_path + "/train/train_merged.npz"
test_... | {"hexsha": "cadd0925a06d445ef51d60c6fc8672ba3784bc17", "size": 779, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/data.py", "max_stars_repo_name": "samytessier/samy_mlops", "max_stars_repo_head_hexsha": "f52592d3b63d8fc11d0ea6cd2f51c80c4858ef4f", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
"""Convenience functions."""
import inspect
import sys
import numpy as np
from scipy.integrate import quad
from scipy.stats import chi2, norm
def pprint(*s, output=True):
"""Hack to make for more informative print statements."""
f = inspect.stack()[1][1].split('/')[-1]
m = '{:13.13} |'.format(f)
if o... | {"hexsha": "a2f900d1a0fcb2ed6e3193065d2d94e0acb147ea", "size": 4119, "ext": "py", "lang": "Python", "max_stars_repo_path": "frbpoppy/misc.py", "max_stars_repo_name": "macrocosme/frbpoppy", "max_stars_repo_head_hexsha": "b23a0c1dbf4e6559f26e79994147ed2a9352ffc7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 24... |
import argparse
import copy
import json
import logging
import os
import random
import sys
import time
import cv2
import numpy as np
import PIL
import torch
import torch.nn as nn
import torchvision.datasets as datasets
import torchvision.transforms as transforms
from PIL import Image
from torch.optim.lr_scheduler impor... | {"hexsha": "2160a5813ab14fd6ec3c47128ae35c903f45e2fc", "size": 15054, "ext": "py", "lang": "Python", "max_stars_repo_path": "NAS/single-path-one-shot/src/MNIST/train.py", "max_stars_repo_name": "naviocean/SimpleCVReproduction", "max_stars_repo_head_hexsha": "61b43e3583977f42e6f91ef176ec5e1701e98d33", "max_stars_repo_li... |
from typing import Tuple
import numpy as np
def signbit_convert(data: int, maxbit: int) -> int:
if (data & (1 << (maxbit - 1))):
data -= (1 << maxbit)
return data
def get_next_bits(buf: bytes, current_data: int, idx: int, bits_left: int) -> Tuple[int, int, int]:
h_data = buf[idx]
h_data += (... | {"hexsha": "1c822db7ff2869215b1ed38f6ca0638dccd2d53b", "size": 2206, "ext": "py", "lang": "Python", "max_stars_repo_path": "CSIKit/util/byteops.py", "max_stars_repo_name": "serrhini/CSIKit", "max_stars_repo_head_hexsha": "1cc9ecb2c0444622b258e9de48841366cbbc667b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
[STATEMENT]
lemma impE[elim!]:
assumes "eval cid t t' n (\<gamma> \<longrightarrow>\<^sup>b \<gamma>')"
shows "eval cid t t' n \<gamma> \<longrightarrow> eval cid t t' n \<gamma>'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. eval cid t t' n \<gamma> \<longrightarrow> eval cid t t' n \<gamma>'
[PROOF STEP]
pro... | {"llama_tokens": 8991, "file": "DynamicArchitectures_Dynamic_Architecture_Calculus", "length": 50} |
PROGRAM vmec
USE vmec_input
USE vmec_seq
USE safe_open_mod
USE vparams, ONLY: nlog, nlog0
IMPLICIT NONE
C-----------------------------------------------
C L o c a l P a r a m e t e r s
C-----------------------------------------------
INTEGER, PARAMETER :: nseq0 = 12
C------... | {"hexsha": "c74e9b641d5786ec219c0817bda5dab25d93dd4b", "size": 11586, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "VMEC2000/Sources/TimeStep/vmec.f", "max_stars_repo_name": "jonathanschilling/VMEC_8_00", "max_stars_repo_head_hexsha": "25519df38bf81bcb673dd9374bda11988de2d940", "max_stars_repo_licenses": ["MIT... |
#pragma once
#include <boost/spirit/home/x3.hpp>
namespace client {
namespace parser {
namespace x3 = boost::spirit::x3;
using iterator_type = std::string::const_iterator;
using context_type = x3::phrase_parse_context<x3::space_type>::type;
} // namespace parser
} // namespace client
| {"hexsha": "df5bb6f35d3ad666e6319d6f3f2104e38bd73e41", "size": 300, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/config.hpp", "max_stars_repo_name": "limitz404/plurals-parser-boost", "max_stars_repo_head_hexsha": "c90f226c5b54647e13cc07d83bd9895e8783737b", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
\documentclass[12pt]{article}
\title{A Sample \LaTeX\ Document}
\author{Math 300}
\usepackage{graphicx}
\begin{document}
\maketitle
\section{Typing Text}
Since \LaTeX\ is a markup language, any text we
type appears on the page, unless it contains
one of the nine reserved characters of \LaTeX, listed
below.
\begin{ve... | {"hexsha": "5af8ba8be5ccb6aec235109511cbcb6deb05daef", "size": 7481, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "res/code/code_sample_latex.tex", "max_stars_repo_name": "Moenupa/Pigeon", "max_stars_repo_head_hexsha": "4449ccf4ecce863e3264494d7e3d6a843f7fa052", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
[STATEMENT]
lemma (in list_alloc) "\<Gamma>,\<Theta>\<turnstile> {} \<lbrace>\<acute>p\<noteq>Null\<rbrace>\<longmapsto> \<acute>p\<rightarrow>\<acute>next :== \<acute>p \<lbrace>True\<rbrace>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<Gamma>,\<Theta>\<turnstile> {} (False, \<lbrace>\<acute>p \<noteq> Null\<... | {"llama_tokens": 207, "file": "Simpl_ex_VcgExSP", "length": 2} |
# coding: utf8
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
# 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 requ... | {"hexsha": "13f8dbfd72c63a0d5891bcf0b83f8ee761fe79ee", "size": 3431, "ext": "py", "lang": "Python", "max_stars_repo_path": "contrib/LaneNet/data_aug.py", "max_stars_repo_name": "windstamp/PaddleSeg", "max_stars_repo_head_hexsha": "828808ea306adf2e8b94c291b77e7b7cf558bc2a", "max_stars_repo_licenses": ["ECL-2.0", "Apache... |
#!/usr/bin/env python
"""
DESCRIPTION
Functions for the total variation of atmospheric data
AUTHOR
Nicholas Hamilton
nicholas.hamilton@nrel.gov
Date:
29 January 2020
"""
import numpy as np
import pandas as pd
import inspect
import scipy as sp
#######################################
def standardi... | {"hexsha": "06960fc0dd3f81b059812a2d7307a9c86673c797", "size": 5625, "ext": "py", "lang": "Python", "max_stars_repo_path": "total_var_functions.py", "max_stars_repo_name": "nhamilto/total-variation", "max_stars_repo_head_hexsha": "67745f98f779cc914317415e99c19119b6baf05a", "max_stars_repo_licenses": ["MIT"], "max_stars... |
"""
This code is used to Run the distributed model for jiboa rover in El Salvador
wher the catchment is consisted os a ustream lake and a volcanic area
- you have to make the root directory to the examples folder to enable the code
from reading input files
"""
from IPython import get_ipython
get_ipython().magic(... | {"hexsha": "9865fc3faa5ce5c977d59f2c2db6df8965619370", "size": 4910, "ext": "py", "lang": "Python", "max_stars_repo_path": "Examples/03Jiboa_model_Hapi.py", "max_stars_repo_name": "juancotrino/Hapi", "max_stars_repo_head_hexsha": "db65313a333f9b763c1021f84ef656835fb2f855", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import os
import cv2
import numpy as np
HEIGHT, WIDTH = 28, 28
def sortContours(dected_list):
connect_obj = []
space = 13
while True:
if not dected_list:
break
cnt = 0
[x, y, w, h] = dected_list.pop()
for i, chk in enumerate(dected_list):
[x_, y_, w_... | {"hexsha": "d55ab83bdd7225f8487cb7947e894909df04a60b", "size": 2210, "ext": "py", "lang": "Python", "max_stars_repo_path": "drawing_ocr/utils.py", "max_stars_repo_name": "godheeran/Machine-Drawing-OCR-CRNN", "max_stars_repo_head_hexsha": "b9b783036cced7921d46f273471e92e95be194c4", "max_stars_repo_licenses": ["MIT"], "m... |
#!/usr/bin/env python2
import os, errno
import netCDF4 as nc
import numpy as np
import pandas as pd
import matplotlib.lines as mlines
import matplotlib.dates as dates
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from matplotlib import style
from scipy import integrate
def create_phen_file(la... | {"hexsha": "e1e7bb7a8e89aa4ab33ef456658f8da4e317eb85", "size": 21324, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/setup_model/spa_input_creator.py", "max_stars_repo_name": "rhyswhitley/savanna_iav", "max_stars_repo_head_hexsha": "4eadf29a4e9c05d0b14d3b9c973eb8db3ea7edba", "max_stars_repo_licenses": ["CC0... |
using CwJWeaveTpl
fnames = [
"limits",
"limits_extensions",
#
"continuity",
"intermediate_value_theorem"
]
process_file(nm; cache=:off) = CwJWeaveTpl.mmd(nm * ".jmd", cache=cache)
function process_files(;cache=:user)
for f in fnames
@show f
... | {"hexsha": "67f63e87ce01cdcec5cb4351dffaacc02b7c5bbd", "size": 393, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "CwJ/limits/process.jl", "max_stars_repo_name": "BryceStevenWilley/CalculusWithJulia.jl", "max_stars_repo_head_hexsha": "801773a3651b2e8f03a8e6eb2f427ab1527e3844", "max_stars_repo_licenses": ["MIT"],... |
from brightics.common.repr import BrtcReprBuilder
from brightics.common.repr import strip_margin
from brightics.common.repr import dict2MD
from brightics.common.repr import pandasDF2MD
from brightics.function.utils import _model_dict
from brightics.common.groupby import _function_by_group
from brightics.common.utils im... | {"hexsha": "83ce224a54dabd462d816e3446d1711b9855ed69", "size": 3766, "ext": "py", "lang": "Python", "max_stars_repo_path": "function/python/brightics/function/extraction/extraction.py", "max_stars_repo_name": "seungrojoo/studio", "max_stars_repo_head_hexsha": "08712c3936eee97f1f752a70a5f38332edebc454", "max_stars_repo_... |
/**
* @file emst_test.cpp
*
* Test file for EMST methods.
*/
#include <mlpack/core.hpp>
#include <mlpack/methods/emst/dtb.hpp>
#include <boost/test/unit_test.hpp>
#include "old_boost_test_definitions.hpp"
#include <mlpack/core/tree/cover_tree.hpp>
using namespace mlpack;
using namespace mlpack::emst;
using namesp... | {"hexsha": "b4776584b15321f6cd2404e4801c1941b1517e16", "size": 7534, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/mlpack/tests/emst_test.cpp", "max_stars_repo_name": "vj-ug/Contribution-to-mlpack", "max_stars_repo_head_hexsha": "0ddb5ed463861f459ff2829712bdc59ba9d810b0", "max_stars_repo_licenses": ["BSD-3-C... |
Real Function ppk1(srt)
Real xarray(7), earray(7)
Save
Data xarray/0.013, 0.025, 0.016, 0.012, 0.017, 0.029, 0.025/
Data earray/3.67, 4.95, 5.52, 5.97, 6.05, 6.92, 7.87/
pmass = 0.9383
ppk1 = 0.
If (srt<=2.63) Return
If (srt>4.08) Then
ppk1 = 0.025
Return
End If
plab = sqrt(((srt**2-2.*pma... | {"hexsha": "3c7af15d3036b9880ba5c5ed72708e148954d411", "size": 822, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/ppk1.f90", "max_stars_repo_name": "xiaohaijin/AMPT", "max_stars_repo_head_hexsha": "90c7a1ab4dc04a092e64af759d53e22f6fea5b02", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_s... |
using Indicators
using PyPlot
using Dates
using Random
# Generate some toy sample data
Random.seed!(1)
n = 250
Open = 100.0 .+ cumsum(randn(n))
High = Open .+ rand(n)
Low = Open .- rand(n)
Close = 100.0 .+ cumsum(randn(n))
for i = 1:n
if Close[i] > High[i]
Close[i] = High[i]
elseif Close[i] < Low[i]
Close[i] = L... | {"hexsha": "845a34b9add14e19667c9a704ddf4d6ec94b4edb", "size": 1582, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/example1.jl", "max_stars_repo_name": "darthur11/Indicators.jl", "max_stars_repo_head_hexsha": "06f34364de3cb81450fc00f317b29f77ce39ce69", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
# Mirco Ravanelli
# Mila, June 2019
# This script runs a simple emotion recognition experiment on the top of PASE features.
# The results are reported in terms of Frame Error Rate/ Sentence Error Rate over four emotions of the IEMOCAP dataset
# This system is not designed for an extensive evaluation of PASE features... | {"hexsha": "90dcac51a92b7c4fecf38128b45aa73370328868", "size": 9314, "ext": "py", "lang": "Python", "max_stars_repo_path": "emorec/run_IEMOCAP_fast.py", "max_stars_repo_name": "ishine/pase", "max_stars_repo_head_hexsha": "2a41e63e54fa8673efd12c16cdcdd5ad4f0f125e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# This is a special test to check that the integration is the same from version to version
# The intended usage is to verify that changes to the code do not affect integration outputs
# The key check is that the compartment sizes and flow rates come out the same as before
#
# The workflow for this function is that the ... | {"hexsha": "93fce0d225ab78d0ea9398caf3a704d6105f8058", "size": 3677, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/validate_integration.py", "max_stars_repo_name": "atomicateam/atomica", "max_stars_repo_head_hexsha": "de05daf15088e315b89fd62319fa11529d43f8cf", "max_stars_repo_licenses": ["MIT"], "max_sta... |
theory ref_crdt
imports Main
"sorted_list"
fmap_functions
system_model
standard_crdts
"~~/src/HOL/Library/Finite_Map"
"~~/src/HOL/Library/Open_State_Syntax"
"~~/src/HOL/Library/Code_Target_Numeral"
begin
datatype operation =
init ref inref
| assign ref ref
| deref ref
| may_delete inre... | {"author": "peterzeller", "repo": "ref-crdt", "sha": "b5678901b2489d87a7676188d14addf3778e235f", "save_path": "github-repos/isabelle/peterzeller-ref-crdt", "path": "github-repos/isabelle/peterzeller-ref-crdt/ref-crdt-b5678901b2489d87a7676188d14addf3778e235f/ref_crdt.thy"} |
# Ejercicio 3 - Simulación de distribuciones condicionadas
### Julian Ferres - Nro.Padrón 101483
## Enunciado:
Sea $X$ \~ $N(0,1)$ truncada al intervalo $[-1,1]$
Imagine $m(x) = E[Y | X=x]$ como:
\begin{equation}
m(x) := \left\{
\begin{array}{ll}
\frac{(x + 2)^2}{2} & \mathrm{si\ } si -1\leq x<-... | {"hexsha": "e1c2550a961943090eebc63a7daa73019a726d4f", "size": 305357, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Ejercicios/06-Reconstruir Regresion (Penultima Clase)/EstimacionRegresion.ipynb", "max_stars_repo_name": "julianferres/Aprendizaje-Estadistico", "max_stars_repo_head_hexsha": "897c5... |
from styx_msgs.msg import TrafficLight
import tensorflow as tf
import rospy
import cv2
import numpy as np
class TLClassifier(object):
def __init__(self):
#TODO load classifier
pass
def get_classification(self, image):
"""Determines the color of the traffic light in the image
A... | {"hexsha": "75b9a09b424b724ca4f10ef085ca910cb67360bb", "size": 940, "ext": "py", "lang": "Python", "max_stars_repo_path": "ros/src/tl_detector/light_classification/tl_classifier.py", "max_stars_repo_name": "navinrahim/CarND-Capstone", "max_stars_repo_head_hexsha": "92c3ad7952b9b73fa20af798da4ddef55f570605", "max_stars_... |
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import math
from sklearn.linear_model import Lasso
from sklearn.linear_model import LassoCV
ALPHAS = [0.00016, 0.00018, 0.00020, 0.00022, 0.00024, 0.00026, 0.00028, 0.00030, 0.00032]
if __name__ == "__main__":
X_train = pd.read_csv('../Data/... | {"hexsha": "295a3d8d4391a03dc52d52f853c5dbfc5fafbe2c", "size": 1542, "ext": "py", "lang": "Python", "max_stars_repo_path": "Main/cv.py", "max_stars_repo_name": "PouyaREZ/AirBnbPricePrediction", "max_stars_repo_head_hexsha": "8c4c8ce7fd0871b6bd68e573a7796d2d2dd22276", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
\chapter{Overview}
\sdr is a software-defined radio based on Microsemi's SmartFusion. Unlike common FPGAs, the SmartFusion
is a device which incorporates a hard core ARM Cortex M3 and a flash-based FPGA. Flash-based FPGA
technology offers low static power, no reconfiguration in boot stage and memory retention when in
p... | {"hexsha": "3c8694db06c3b613594f9e38e362c0d6e48941b9", "size": 983, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "manuals/tex/overview.tex", "max_stars_repo_name": "lab11/uSDR", "max_stars_repo_head_hexsha": "4eeab36bcbea0e65c81f615975916ffd35d7de0b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "ma... |
import os
import sys
import theano
import theano.tensor as T
import numpy
import numpy as np
import mahotas
import partition_comparison
import StringIO
import glob
base_path = os.path.dirname(__file__)
sys.path.insert(1,os.path.join(base_path, '../../common'))
sys.path.insert(2,os.path.join(base_path, '../../database'... | {"hexsha": "368994607c12ebe042f6f2c43dc71e62c39fb95b", "size": 1637, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/model/mlp/offline.py", "max_stars_repo_name": "fegonda/icon_demo", "max_stars_repo_head_hexsha": "d2d1b0148989187c1433597f9c3ae4357178c082", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
"""
Data handling classes
Author: Jia Geng
Email: gjia0214@gmail.com | jxg570@miami.edu
"""
import os
import torch
import numpy as np
import random
from PIL import Image
from collections import OrderedDict
from torchvision.transforms.transforms import *
from torch.utils.data.dataloader import *
from torch.utils.data.... | {"hexsha": "359f533757f218838cd629d5dcccea4939c59c0c", "size": 11586, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/datautils/datahandler.py", "max_stars_repo_name": "gengjia0214/jai", "max_stars_repo_head_hexsha": "865ec9fdf432288ecab806cd1ecb8a4c747ee689", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma... |
"""
A pure TensorFlow implementation of a convolutional neural network.
"""
# pylint: disable=missing-docstring
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
import functools
import tensorflow as t... | {"hexsha": "793e337b4d5b19b5d97b2b1fa6e743da52a3c816", "size": 2127, "ext": "py", "lang": "Python", "max_stars_repo_path": "cleverhans/model_zoo/basic_cls.py", "max_stars_repo_name": "iirishikaii/cleverhans", "max_stars_repo_head_hexsha": "dda1aa598131c56a64103f478c153e84bc951f7c", "max_stars_repo_licenses": ["MIT"], "... |
[STATEMENT]
lemma e2ennreal_ereal [simp]: "e2ennreal (ereal x) = ennreal x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. e2ennreal (ereal x) = ennreal x
[PROOF STEP]
by (metis e2ennreal_def enn2ereal_inverse ennreal.rep_eq sup_ereal_def) | {"llama_tokens": 111, "file": null, "length": 1} |
[STATEMENT]
lemma filter_insort_triv:
"\<not> P x \<Longrightarrow> filter P (insort_key f x xs) = filter P xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<not> P x \<Longrightarrow> filter P (insort_key f x xs) = filter P xs
[PROOF STEP]
by (induct xs) simp_all | {"llama_tokens": 105, "file": null, "length": 1} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.