text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
import json
import pickle
import sys
from datetime import datetime
from json import JSONEncoder
import numpy as np
import pandas as pd
import watchdog.events
import watchdog.observers
import time
import tensorflow as tf
import configparser
import os
from kafka import KafkaProducer
tf.compat.v1.logging.set_verbosity(t... | {"hexsha": "430bf6d76f7cc6e2b878aef77405c75d0b53be3e", "size": 4546, "ext": "py", "lang": "Python", "max_stars_repo_path": "continuous_module/observer.py", "max_stars_repo_name": "Montimage/acas", "max_stars_repo_head_hexsha": "49c345cee5eabbda4833119de5403316139031b5", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
import logging
import os
import shutil
import tempfile
from urllib import request as request
import numpy as np
from ase import Atoms
import schnetpack as spk
from schnetpack.data import AtomsDataError
from schnetpack.datasets import DownloadableAtomsData
__all__ = ["MD17"]
class MD17(DownloadableAtomsData):
"... | {"hexsha": "4c4d16126a77c3bb2b23ff7a7c51b71f3c5a6722", "size": 4695, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/schnetpack/datasets/md17.py", "max_stars_repo_name": "giadefa/schnetpack", "max_stars_repo_head_hexsha": "9dabc3b6e3b28deb2fb3743ea1857c46b055efbf", "max_stars_repo_licenses": ["MIT"], "max_st... |
function create_geostationary_granule(
target_lon::Real,
target_lat::Real,
central_longitude::Real,
N_step=35,
N_pixel=1016,
x_space=5400, # footprint size E-W in m
y_space=2700 # footprint size N-S in m
)
N = N_step * N_pixel
# lon/lat projection object
wgs84 = Projection("+pr... | {"hexsha": "59cc25bae56044bdf2ee1e88cd27b32bb3239b90", "size": 6048, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Geostationary.jl", "max_stars_repo_name": "PeterSomkuti/jLRS-v1", "max_stars_repo_head_hexsha": "aa08479e3cf4bd855906879fd4c4239cc2ffe988", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
module Units
export second, minute, hour, day, year, meter, kilometer,
seconds, minutes, hours, days, years, meters, kilometers,
KiB, MiB, GiB, TiB
#####
##### Convenient definitions
#####
"""
second
A `Float64` constant equal to 1.0. Useful for increasing the clarity of scripts, e.g. `Δt = 1secon... | {"hexsha": "573ca5fc3af3115abb164c589203fb951d2066b3", "size": 2954, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Units.jl", "max_stars_repo_name": "charleskawczynski/Oceananigans.jl", "max_stars_repo_head_hexsha": "c34e6cd2166bbaa057186ffa795d348c1802485f", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
#!/usr/bin/python3
import csv
import numpy as np
import matplotlib.pyplot as plt
def parsecsvdata():
'''retrns a list. [0] is lan and [1] wan data'''
summary = [] # list that will contain [(LAN), (WAN)]
#open csv data
with open("/home/student/mikerauer/graphing/2018summary.csv",\
"r") as... | {"hexsha": "a419e39dde0c4aeecf5b04a8560e22b3aa38e2a1", "size": 1469, "ext": "py", "lang": "Python", "max_stars_repo_path": "graphing/gramaker-csvreader.py", "max_stars_repo_name": "mikerauer/pyb-class", "max_stars_repo_head_hexsha": "b7f6202c58df654eb81263d12c2634fa37a27e07", "max_stars_repo_licenses": ["MIT"], "max_st... |
# Copyright (c) 2019, NVIDIA Corporation. All rights reserved.
#
# This work is made available under the Nvidia Source Code License-NC.
# To view a copy of this license, visit
# https://nvlabs.github.io/stylegan2/license.html
import json
import argparse
import numpy as np
import dnnlib
import dnnlib.tflib as tflib
imp... | {"hexsha": "a518a6e7fc0aec0f8348b8b1cd1edf8b234e9405", "size": 19430, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_latentmod.py", "max_stars_repo_name": "colrich/stylegan2", "max_stars_repo_head_hexsha": "809ba38c67d4c395c3ab024fbff5909a607dc973", "max_stars_repo_licenses": ["BSD-Source-Code"], "max_stars... |
import datetime as dt
import numpy as np
from hypothesis import given
from hypothesis.strategies import floats
import pytest
from orbit_predictor.utils import (
angle_between,
get_sun,
get_shadow,
eclipse_duration,
get_satellite_minus_penumbra_verticals,
)
# Data obtained from Astropy using the ... | {"hexsha": "fc71b3b80c1b2f2b9ebf92b41de2cf90f2645153", "size": 4281, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_sun.py", "max_stars_repo_name": "Juanlu001/orbit-predictor", "max_stars_repo_head_hexsha": "ca67e2e859932938627ed24e5cbf58c887cd99c0", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import h2o
import numpy as np
import os
import pandas as pd
from h2o.estimators.random_forest import H2ORandomForestEstimator
from h2o.estimators.xgboost import H2OXGBoostEstimator
from h2o.estimators.glm import H2OGeneralizedLinearEstimator
from h2o.estimators.gbm import H2OGradientBoostingEstimator
schema = {'cat_ag... | {"hexsha": "f3db39d72b70555629776fd0d4ce93648c9126f5", "size": 9493, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/h2o_rf_train.py", "max_stars_repo_name": "zh272/AIGOGO", "max_stars_repo_head_hexsha": "0255cf8c4776358b73ee6b1792325a151a0cfa78", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star... |
# Loss function for XYZ maps
# https://arxiv.org/pdf/2109.07577.pdf
import torch
import copy
import torchvision.models as models
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
import Visuallization as vis
#########################################################################################... | {"hexsha": "1bdf0e1621585b9217ffa99e5aa23b4c7ecbb2b4", "size": 7512, "ext": "py", "lang": "Python", "max_stars_repo_path": "LossFunctions.py", "max_stars_repo_name": "sagieppel/Predict-3D-model-from-image-as-an-XYZ-map", "max_stars_repo_head_hexsha": "90a81bda59b2ab32afff0e5514e8fd5ae4b1a8cb", "max_stars_repo_licenses"... |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import json
import numpy as np
import decimal
class CompatEncoder(json.JSONEncoder):
""" Compatible encoder that supports numpy types and Decimal type
json.dumps(data, cls=CompatEncoder)
"""
def defa... | {"hexsha": "417c8483dbff8c114ceea637b782704e81f82fd7", "size": 783, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/recommendations/src/recommendations-service/experimentation/utils.py", "max_stars_repo_name": "honey-sangtani-c5i/retail-demo-store", "max_stars_repo_head_hexsha": "c76e03b2a1750d9ec16f2dd8c952... |
#!/usr/bin/env python
"""
Show how to connect to keypress events
"""
from __future__ import print_function
import sys
import numpy as np
import matplotlib.pyplot as plt
class Modulator(object):
count = 0
@classmethod
def iterate_count(cls):
cls.count += 0.1
return cls.count
d... | {"hexsha": "38f7154a8e8086374dbd5fb7249aa6e54c762fc3", "size": 860, "ext": "py", "lang": "Python", "max_stars_repo_path": "data-vis-mpl/scripts/keypress_demo.py", "max_stars_repo_name": "chyld/demoX", "max_stars_repo_head_hexsha": "27f26a553aeb6682173f6b1b8dc8969101993324", "max_stars_repo_licenses": ["MIT"], "max_star... |
import os
import sys
sys.path.append('.')
sys.path.append('/home/wamsterd/git/pretrainedresnet3d')
import json
import numpy as np
import torch
from torch import nn
from torch import optim
from torch.optim import lr_scheduler
from opts import parse_opts
from model3d import generate_model
from mean import get_mean, get_... | {"hexsha": "b8f862009f2a43a6e043f0ff25f26db8e374f1a4", "size": 1472, "ext": "py", "lang": "Python", "max_stars_repo_path": "exportmodel.py", "max_stars_repo_name": "vanAmsterdam/pretrainedresnet3d", "max_stars_repo_head_hexsha": "48797ef9d021f51f82e5eacbf72ac33ca09ced4d", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
Describe Users/alyssasusan here.
eggs
| {"hexsha": "e392a4c580358ed368632a5d0fd569ca530046cc", "size": 38, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/alyssasusan.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
[STATEMENT]
lemma ta_seq_consist_imp_sequentially_consistent:
assumes tsa_ok: "thread_start_actions_ok E"
and new_actions_for_fun: "\<And>adal a a'. \<lbrakk> a \<in> new_actions_for P E adal; a' \<in> new_actions_for P E adal \<rbrakk> \<Longrightarrow> a = a'"
and seq: "ta_seq_consist P Map.empty (lmap snd E)"
... | {"llama_tokens": 37453, "file": "JinjaThreads_MM_SC_Completion", "length": 150} |
import yaml
import argparse
from collections import deque
from nes_py.wrappers import JoypadSpace
import gym_super_mario_bros
from gym_super_mario_bros.actions import SIMPLE_MOVEMENT
from models import DeepQ
from collections.abc import Iterable
from utils import AverageMeter
import torch
import random
import copy
impo... | {"hexsha": "9694053559b45a542e2aa9b3328b475024277b44", "size": 9477, "ext": "py", "lang": "Python", "max_stars_repo_path": "game_DQ.py", "max_stars_repo_name": "realAsma/SuperMario_DeepQ", "max_stars_repo_head_hexsha": "ff39590dc7d553602cd55f2c4bd550ffa2f7fdf1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
# --------------------------------------------------------
# Tensorflow VCL
# Licensed under The MIT License [see LICENSE for details]
# Written by Zhi Hou
# --------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ import print_func... | {"hexsha": "d2839f333507812c9e348e41708e8c483e638800", "size": 42229, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/networks/HOI.py", "max_stars_repo_name": "abreza/HOI-CL", "max_stars_repo_head_hexsha": "c5be517bb26eac73ef88a39d6ec9e564c3379714", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 40, ... |
/******************************************************************************
* Author(s): Christopher J. Havlicek
*
* See LICENSE and CONTACTS.
******************************************************************************/
#include "utility.hpp"
#include "contract.hpp"
#include "error/master.hpp"
#include "err... | {"hexsha": "caec47889f6f6a510334cf8d7392765ceaf2502b", "size": 31463, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/utility.cpp", "max_stars_repo_name": "moralismercatus/kmap", "max_stars_repo_head_hexsha": "6887780c2fbe795f07a81808ef31f11dad4f5043", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1.0... |
#include "context.hpp"
#include "service.hpp"
#include <asio_utp/socket.hpp>
#include <asio_utp/log.hpp>
#include <boost/asio/steady_timer.hpp>
#include <iostream>
using namespace std;
using namespace asio_utp;
struct context::ticker_type : public enable_shared_from_this<ticker_type> {
bool _running = false;
... | {"hexsha": "66ed6ea224c4f7611b3f32ad0e02f3616bf10f0f", "size": 9777, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/context.cpp", "max_stars_repo_name": "inetic/asio-utp", "max_stars_repo_head_hexsha": "3c058a9c7d2ae934764d0aaa72e960870e39950a", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": 28.0,... |
from analysis.jobAnalysis import calculate_histogram
import pickle
import MySQLdb
import numpy as np
class Result(object):
"""
Abstract class for results on a workload analysis. Such a class has to be
able to calculate some data over a data set. This class stores the results
in an database, data can a... | {"hexsha": "032cb054d7dbf5df5971c35c073df08fa1f7f97d", "size": 12728, "ext": "py", "lang": "Python", "max_stars_repo_path": "stats/__init__.py", "max_stars_repo_name": "gonzalorodrigo/ScSFWorkload", "max_stars_repo_head_hexsha": "2301dacf486df8ed783c0ba33cbbde6e9978c17e", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL"... |
# -*- coding: utf-8 -*-
# from functools import reduce
import numpy as np
import talib
from .context import ExecutionContext
from .utils import FormulaException, rolling_window, handle_numpy_warning
from .time_series import (
MarketDataSeries,
NumericSeries,
BoolSeries,
fit_series,
get_series,
... | {"hexsha": "be159baeaf8d4a85b407bfe8b75a9949086767a3", "size": 15393, "ext": "py", "lang": "Python", "max_stars_repo_path": "funcat/func.py", "max_stars_repo_name": "pchaos/funcat2", "max_stars_repo_head_hexsha": "ff554cc134906a5a182fc31774488d62a839b314", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1... |
# Copyright 2014-2020 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | {"hexsha": "fe20da7339f967e84b6a3503e7d1766950edec7a", "size": 18895, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyscf/pbc/df/test/test_aft.py", "max_stars_repo_name": "shufay/pyscf", "max_stars_repo_head_hexsha": "c7ea840b012a59fce5fa4114ef3274a7cf00165e", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
[STATEMENT]
lemma T_A'_eq_lem: "(\<Sum>i=0..<length qs. t_A' i) =
T (s_A' 0) (drop 0 qs) (drop 0 acts)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. sum t_A' {0..<length qs} = int (T (s_A' 0) (drop 0 qs) (drop 0 acts))
[PROOF STEP]
proof(induction rule: zero_induct[of _ "size qs"])
[PROOF STATE]
proof (state)
go... | {"llama_tokens": 2225, "file": "List_Update_BIT", "length": 18} |
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(-3, 3, 0.1)
y = np.sin(x)
plt.plot(x, y)
plt.show()
| {"hexsha": "43d88e9a27c4ed344285efa1a69b441be6f802dc", "size": 118, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "hyoiutu/PRMLPractice", "max_stars_repo_head_hexsha": "d303d2783dc06136eb61da7aa2630bb64d6c6ee9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_... |
# Copyright 2017 Abien Fred Agarap
#
# 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 writ... | {"hexsha": "6aa241ad753743224a19af45b1f408efa16b8f60", "size": 11178, "ext": "py", "lang": "Python", "max_stars_repo_path": "MLP.py", "max_stars_repo_name": "modi975/multilayer-perceptron", "max_stars_repo_head_hexsha": "4cfc9bd79ec145f6ecd2c5f1c12e9df7156e5e70", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co... |
"""
Created on 2019-02-01 22:11:43
@author: George Kyriakides
ge.kyriakides@gmail.com
"""
import copy
from typing import List
import numpy as np
from .genome import Genome
def get_distance(g1: Genome, g2: Genome):
c_1 = 1
c_2 = 1
N = 1
innovations_1, innovations_2 = ... | {"hexsha": "18cd280104416c3b260d802e6c2cb6dd765fbaee", "size": 5906, "ext": "py", "lang": "Python", "max_stars_repo_path": "nord/design/metaheuristics/genetics/neat/speciation.py", "max_stars_repo_name": "GeorgeKyriakides/nord", "max_stars_repo_head_hexsha": "94f4d6503dfe2ed9aaebc9e02d55aaba81c02994", "max_stars_repo_l... |
data = split(
"""
.#..##.###...#######
##.############..##.
.#.######.########.#
.###.#######.####.#.
#####.##.#.##.###.##
..#####..#.#########
####################
#.####....###.#.#.##
##.#################
#####.##.###..####..
..######..##.#######
####.##.####...##..#
.#####..#.######.###
##...#.##########...
#.#####... | {"hexsha": "a719ce5e82513b7e7181636187a12fb753256e96", "size": 2029, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Dec10.jl", "max_stars_repo_name": "mkborregaard/AdventOfCode2019", "max_stars_repo_head_hexsha": "189c8fa58b76c50923d9ebc8fd5e8949f6caa92a", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import os
import os.path
import sys
import collections
import copy
import numpy as np
import pylab as pl
import collections
import numbers
try:
# py2.x
from urllib import pathname2url
from urllib import url2pathname
from urllib import quote
from urllib import unquote
from urlparse import urlp... | {"hexsha": "89904b38b63e62d1830b645efed8af35adcb7426", "size": 52891, "ext": "py", "lang": "Python", "max_stars_repo_path": "greensinversion/inversion.py", "max_stars_repo_name": "isuthermography/greensinversion", "max_stars_repo_head_hexsha": "92f272a3649bb2f6b132f8cd239edd68dd2a6a62", "max_stars_repo_licenses": ["Unl... |
import plotly
py = plotly.plotly("iancze", "0ttojbuvyj")
import StellarSpectra
from StellarSpectra import spectrum
from StellarSpectra import constants as C
from spectrum import DataSpectrum
import numpy as np
import sys
from astropy.io import ascii
myspec = DataSpectrum.open("/home/ian/Grad/Research/Disks/StellarSp... | {"hexsha": "63ca23ea84bba11db92fce14d8690c242a5c9b59", "size": 2635, "ext": "py", "lang": "Python", "max_stars_repo_path": "attic/plotly_line_label.py", "max_stars_repo_name": "jason-neal/Starfish", "max_stars_repo_head_hexsha": "4ffa45e0190fb6f3262511d57d1a563e5ee711de", "max_stars_repo_licenses": ["BSD-3-Clause"], "m... |
#include <boost/python/class.hpp>
#include <boost/python/enum.hpp>
#include <boost/python/args.hpp>
#include <boost/python/return_value_policy.hpp>
#include <boost/python/return_by_value.hpp>
#include <boost/python/return_internal_reference.hpp>
#include <scitbx/array_family/boost_python/shared_wrapper.h>
#include <... | {"hexsha": "86f1078b1451a6770cf0e6c23692417b6f63687f", "size": 1758, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cctbx/miller/boost_python/amplitude_normalisation.cpp", "max_stars_repo_name": "rimmartin/cctbx_project", "max_stars_repo_head_hexsha": "644090f9432d9afc22cfb542fc3ab78ca8e15e5d", "max_stars_repo_li... |
from torch_rl.training.core import HorizonTrainer, mse_loss
from torch_rl.memory import GeneralisedMemory
from torch.optim import Adam
from torch_rl.utils import to_tensor as tt
import torch as tor
from collections import deque
from torch_rl.utils import prGreen
import time
import sys
from torch_rl.utils import *
impor... | {"hexsha": "fe23bbb1a2f7e5bf658c6f210280092a7bbb5ca7", "size": 12599, "ext": "py", "lang": "Python", "max_stars_repo_path": "torch_rl/training/her_ipgppo.py", "max_stars_repo_name": "JimmyMVP/plain_rl", "max_stars_repo_head_hexsha": "4780f05fffb62533a339197b49de487cdc9d9954", "max_stars_repo_licenses": ["MIT"], "max_st... |
section \<open>Preliminaries\<close>
theory Prelim
imports
"Fresh_Identifiers.Fresh_String"
"Bounded_Deducibility_Security.Trivia"
begin
subsection \<open>The basic types\<close>
(* This version of string is needed for code generation: *)
definition "emptyStr = STR ''''"
(* The users of the system: *)
... | {"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/CoSMeDis/Prel... |
# Created by Qingzhi Ma at 2019-07-23
# All right reserved
# Department of Computer Science
# the University of Warwick
# Q.Ma.2@warwick.ac.uk
import os
import os.path
import warnings
from datetime import datetime
from multiprocessing import set_start_method as set_start_method_cpu
import dill
import numpy as np
impo... | {"hexsha": "304baccbdd51d088b1fb4c7c1121c5354a95daa9", "size": 36864, "ext": "py", "lang": "Python", "max_stars_repo_path": "dbestclient/executor/executor.py", "max_stars_repo_name": "qingzma/DBEst_MDN", "max_stars_repo_head_hexsha": "3a3e26bede308b70abfad07032dc16a07a170f34", "max_stars_repo_licenses": ["BSD-2-Clause"... |
[STATEMENT]
lemma [code]:
\<open>unset_bit 0 m = 2 * (m div 2)\<close>
\<open>unset_bit (Suc n) m = m mod 2 + 2 * unset_bit n (m div 2)\<close> for m :: natural
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. unset_bit 0 m = 2 * (m div 2) &&& unset_bit (Suc n) m = m mod 2 + 2 * unset_bit n (m div 2)
[PROOF STEP]
... | {"llama_tokens": 174, "file": null, "length": 1} |
# Author: sihan
# Date: 2018-10-26
import os # dealing with directories
from random import shuffle # mixing up or currently ordered data that might lead our network astray in training.
import cv2 # working with, mainly resizing, images
import numpy as np # dealing with arrays
from tqdm import tqdm # a nice prett... | {"hexsha": "6a30a7c073fb978f3088295714f65c1fa179738d", "size": 2525, "ext": "py", "lang": "Python", "max_stars_repo_path": "classification/make_test_set.py", "max_stars_repo_name": "Sihan-Son/animal_classification", "max_stars_repo_head_hexsha": "e0fcee46c2a31ef35dfd6f84849259474a92101b", "max_stars_repo_licenses": ["M... |
action(::Type{PointerMovesEvent}) = PointerMoves
action(::Type{PointerLeavesWindowEvent}) = PointerLeavesWindow
action(::Type{PointerEntersWindowEvent}) = PointerEntersWindow
action(::Type{ExposeEvent}) = Expose
action(::Type{ResizeEvent}) = Resize
action(::Type{<:MouseEvent{A}}) where {A} = A
action(::Type{<:KeyEvent{... | {"hexsha": "846885f21dd540464ccc596278fbf0ea7e78a1bb", "size": 1596, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/events.jl", "max_stars_repo_name": "serenity4/WindowAbstractions.jl", "max_stars_repo_head_hexsha": "d6547be67c820315d44315efaa673849e3dc2afa", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.13.7
# kernelspec:
# display_name: Python [conda env:bandit_38]
# language: python
# name: conda-env-bandi... | {"hexsha": "0d0570e41bef2b304b4330aca95f2516a55a4668", "size": 2394, "ext": "py", "lang": "Python", "max_stars_repo_path": "04_Bandit/subset_model_output_work.py", "max_stars_repo_name": "pnorton-usgs/notebooks", "max_stars_repo_head_hexsha": "17a38ecd3f3c052b9bd785c2e53e16a9082d1e71", "max_stars_repo_licenses": ["MIT"... |
handle("gotosymbol") do data
@destruct [
word,
path || nothing,
# local context
column || 1,
row || 1,
startRow || 0,
context || "",
onlyGlobal || true,
# module context
mod || "Main",
text || "",
] = data
gotosymbol(
word, path,
column, row, startRow, context, ... | {"hexsha": "3c37ded889bc0be01578ebb43f67a406c5f37a34", "size": 9943, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/goto.jl", "max_stars_repo_name": "UnofficialJuliaMirror/Atom.jl-c52e3926-4ff0-5f6e-af25-54175e0327b1", "max_stars_repo_head_hexsha": "85c218fae87ae4352f47b0be28366c2daa6b9a5a", "max_stars_repo_... |
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.utils.data import DataLoader
from torchvision.datasets import MNIST
from torchvision.transforms import Compose, ToTensor, Normalize
from tqdm import tqdm
from ignite.engine import Engine, create_supervised_evaluator, create_s... | {"hexsha": "dc282927aaf512293a67f61b3c0f2ab7d036ac8d", "size": 2964, "ext": "py", "lang": "Python", "max_stars_repo_path": "ignite_examples/mnits_ignite.py", "max_stars_repo_name": "Daiver/Depth-regression", "max_stars_repo_head_hexsha": "cbc2a119915b4c350f0ad0b0a269aab520c03304", "max_stars_repo_licenses": ["MIT"], "m... |
import random
import numpy as np
import tensorflow as tf
from data_predication import features
def create_feature_sets_and_labels(features, test_size=0.3):
# shuffle out features and turn into np.array
random.shuffle(features)
features = np.array(features)
# split a portion of the features into tes... | {"hexsha": "c7bc1e2db54716a428165b516020eea2adabd3dc", "size": 4444, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf_predication.py", "max_stars_repo_name": "XinyueZ/tf", "max_stars_repo_head_hexsha": "c4e2492bbb27abc44db34521626fb27b199cd240", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max... |
import unittest
from nextnanopy.shapes import GdsPolygonsRaw, units_factor, validate_unit
import numpy as np
import os
np_equal = np.testing.assert_almost_equal
folder = os.path.join('tests', 'gds')
class TestShapes(unittest.TestCase):
def test_unit(self):
self.assertEqual(units_factor['nm'], 1e-9)
... | {"hexsha": "723acd1258c9b0bdd9b0c6bed693a4cd4c7e76bf", "size": 2245, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_shapes.py", "max_stars_repo_name": "nextnanopy/nextnanopy", "max_stars_repo_head_hexsha": "f28266d444f488726f16c9a4eb08e98720f5f683", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s... |
#include <fast_asio/fast_asio.hpp>
#include <boost/asio/ssl.hpp>
#include <iostream>
#include <memory>
#include "root_certificates.hpp"
using namespace boost::asio;
using namespace boost::asio::ip;
// socket type
typedef ssl::stream<tcp::socket> ssl_socket;
typedef fast_asio::packet_stream<ssl_socket> socket_t;
typed... | {"hexsha": "9ce221fe5647587ee10dbad7d756aee9c9638dfe", "size": 2694, "ext": "cc", "lang": "C++", "max_stars_repo_path": "thirdparty/fast_asio/examples/ssl_client.cc", "max_stars_repo_name": "brinkqiang/dmlibgo", "max_stars_repo_head_hexsha": "f0bf5b1312f852fddab2050f58830bcc16dea03b", "max_stars_repo_licenses": ["MIT"]... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import cv2 as cv
import numpy as np
import matplotlib.pyplot as plt
import sys
filename = sys.argv[1]
#print(filename)
img = cv.imread(filename,0)
block_size = 9
constant = 2
k = np.ones((5,5),np.uint8)
blur = cv.GaussianBlur(img,(7,7),0)
fnoise=cv.medianBlur(... | {"hexsha": "247c76e76932e56a63cf97c5c82f20e8fb163d23", "size": 865, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/adaptive.py", "max_stars_repo_name": "SJSU272Spring2019/Project-Group-14", "max_stars_repo_head_hexsha": "10d1f3272ce6e9022b1843cf998f49fd02f18068", "max_stars_repo_licenses": ["Apache-2.0"], "... |
'''
Example implementations of HARK.ConsumptionSaving.ConsPortfolioModel
'''
from HARK.ConsumptionSaving.ConsPortfolioModel import PortfolioConsumerType, init_portfolio
from HARK.ConsumptionSaving.ConsIndShockModel import init_lifecycle
from HARK.utilities import plotFuncs
from copy import copy
from time import time
im... | {"hexsha": "635632d28443aa886e80df53f670653028161849", "size": 7915, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ConsumptionSaving/example_ConsPortfolioModel.py", "max_stars_repo_name": "fangli-DX3906/HARK", "max_stars_repo_head_hexsha": "a55d06f4e47e9564b3bcc2250c8d8012cc758761", "max_stars_repo_li... |
"""
Copyright 2015, Ilya Kuzovkin
Copyright 2021-2022, Buran Consulting, LLC
Licensed under MIT
Builds on example code by Jack Keegan
https://batchloaf.wordpress.com/2014/01/17/real-time-analysis-of-data-from-biosemi-activetwo-via-tcpip-using-python/
"""
import logging
log = logging.getLogger(__name__)
import socket... | {"hexsha": "0c7fde2528e3c1a7c8cb65fa903f94126240dca7", "size": 8409, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyactivetwo/client.py", "max_stars_repo_name": "NCRAR/pyactivetwo", "max_stars_repo_head_hexsha": "01cbfb2f1fdfd7bdfa28fd656a7b6d5ea61ad0aa", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
% \documentclass{article}
% \usepackage{graphicx}
% \usepackage[a4paper, margin=0.4in]{geometry}
% \usepackage{subcaption}
% \usepackage{printlen}
% \uselengthunit{cm}
% \newlength\imageheight
% \newlength\imagewidth
% \begin{document}
\section{Partial TRP TX5 MSP\_A RX5 Minipod Loopback}\label{sec:PartialTRPTX5MSPA... | {"hexsha": "5b93f6702cc07b614d7ad20de95e4dccc81c0744", "size": 17287, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "out/tex/Partial_TRP_TX5_MSP_A_RX5_Minipod_Loopback_9.6-optimized.tex", "max_stars_repo_name": "mvsoliveira/IBERTpy", "max_stars_repo_head_hexsha": "7d702ed87f0c8fbe90f4ef0445e2d4f77a79ec02", "max_s... |
import tensorflow as tf
import numpy as np
crf_eval_module = tf.load_op_library('/home/wfx/parsing/tensorflow_op_proj_uas/CRFEval.so')
def crf_cost(arc_probs,rel_probs, targets, sen_len):
out1 = crf_eval_module.cost_out(arc_probs,rel_probs,targets,sen_len)
return tf.stop_gradient(out1)
def crf_decode(arc_probs,... | {"hexsha": "7c60ff818550298ab106574a511d07b8cbd69f27", "size": 1723, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_op_proj_uas/test.py", "max_stars_repo_name": "wfxedu/CRFBiaffineParser", "max_stars_repo_head_hexsha": "763368fb8890877694caf0281805da5351d57ef0", "max_stars_repo_licenses": ["Apache-2.... |
# export fit_cubic_spline,
# sample_spline,
# sample_spline_derivative,
# sample_spline_derivative2,
# sample_spline_speed,
# sample_spline_theta,
# sample_spline_curvature,
# sample_spline_derivative_of_curvature,
# calc_curve_length,
# arclength,
# calc_c... | {"hexsha": "1f8b1d3c4cb01d8adf731050bdd4d93e9db7e079", "size": 26712, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/core/splines.jl", "max_stars_repo_name": "Sawato/AutomotiveDrivingModels.jl", "max_stars_repo_head_hexsha": "3fbf6a4a53ebedd710d3dfd9f8440ce87b0573d5", "max_stars_repo_licenses": ["MIT"], "max... |
import re
import numpy as np
import matplotlib.pyplot as plt
from polynomial import polynomial
from approximation import calc_approx
from print_polynomial import print_polynomial
def get_exp_data():
with open("example_data_files\\housing.data", "r") as file:
lines = file.readlines()
for i i... | {"hexsha": "9e81d2e0ffd61eeb5b378b51dd6770434c600503", "size": 4547, "ext": "py", "lang": "Python", "max_stars_repo_path": "example_003.py", "max_stars_repo_name": "DmitriyKhudiakov/MSE_approximation", "max_stars_repo_head_hexsha": "6d25711c14a27301335fe211bff9305ea2ad88d8", "max_stars_repo_licenses": ["MIT"], "max_sta... |
abstract SVM{TSpec <: SVMSpec} <: RegressionModel
# ==========================================================================
svmModel(spec::SVMSpec, solution::PrimalSolution, predmodel::Predictor, X::AbstractMatrix, Y::AbstractArray) =
primalSVMModel(spec, solution, predmodel, X, Y)
svmModel(spec::SVMSpec, solut... | {"hexsha": "9ad680ff5cb6f44aa2b360a37996ede54ccc827f", "size": 18586, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/svm_model.jl", "max_stars_repo_name": "Evizero/KSVM.jl", "max_stars_repo_head_hexsha": "1fec5d43f615fcf3964f96ca27dd7ad32325bd55", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 35, "m... |
# audio-offset-finder
#
# Copyright (c) 2014 British Broadcasting Corporation
#
# 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 require... | {"hexsha": "33b7af1ac4bdace212f4045ed6740fbee57bb1fe", "size": 4935, "ext": "py", "lang": "Python", "max_stars_repo_path": "audio_offset_finder/audio_offset_finder.py", "max_stars_repo_name": "CalderWhite/audio-offset-finder", "max_stars_repo_head_hexsha": "83708a6f40a0a3cde347b87ecc25ff06fa0743db", "max_stars_repo_lic... |
import numpy as np
import unittest | {"hexsha": "7f6498b686ca2f35694ea194e5b4ccbeaf232ac6", "size": 34, "ext": "py", "lang": "Python", "max_stars_repo_path": "MCMC/test/test_00.py", "max_stars_repo_name": "Evanzai/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers", "max_stars_repo_head_hexsha": "051477a7f36090ec5c9cb9941afa1a81c761dd27", "max_sta... |
@symbol_func function P_E(cur_reactor::AbstractReactor)
cur_P = P_T(cur_reactor)
cur_P *= cur_reactor.eta_T
cur_P
end
| {"hexsha": "81aa1eb7cec36f526e9a0f279768d6cafcc8a263", "size": 126, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/methods/reactors/powers/p_e.jl", "max_stars_repo_name": "djsegal/Fusion.jl", "max_stars_repo_head_hexsha": "a0540fbf3345a778965fa092e9e56907a44c6521", "max_stars_repo_licenses": ["MIT"], "max_st... |
abstract type ShepardType <: InterpolationMethod end
export Shepard
"""
Shepard(P = 2)
Standard Shepard interpolation with power parameter `P`.
"""
struct Shepard{T} <: ShepardType where T <: Real
P::T
end
Shepard() = Shepard(2)
struct ShepardInterpolant{T1, T2, F, M} <: ScatteredInterpolant where {T1 <: Ab... | {"hexsha": "2d959caa8476eb7df4d496555c48bd86658abd70", "size": 1900, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/idw.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/ScatteredInterpolation.jl-3f865c0f-6dca-5f4d-999b-29fe1e7e3c92", "max_stars_repo_head_hexsha": "c3c107fe7255c8967f6a1111b48f8a8a9... |
\subsection{SSNIP test}
Small but significant and non-transitory increase in price
Would this cause customers to move elsewhere?
If we have demand at different prices we can estimate whether it is worth monopolising the market.
Because this lack of motivation may be because of competitor goods, we can include thes... | {"hexsha": "e2bf06e08d06ef574bc0b79c63d7da4d8f6e2726", "size": 1266, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/pug/theory/economics/competitionPolicy/04-01-SSNIP.tex", "max_stars_repo_name": "adamdboult/nodeHomePage", "max_stars_repo_head_hexsha": "266bfc6865bb8f6b1530499dde3aa6206bb09b93", "max_stars_re... |
module PrintFileTree
export printfiletree
"""
printfiletree()
printfiletree(root)
Like the unix utility `tree` (https://linux.die.net/man/1/tree).
Prints complete recursive directory structure of root and all its contents.
"""
function printfiletree(root=".")
println(root);
d,f = printfiletree_helpe... | {"hexsha": "cf6b73d5bedb9468c6ce507683cb7f0d79f054d5", "size": 1140, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/PrintFileTree.jl", "max_stars_repo_name": "UnofficialJuliaMirror/PrintFileTree.jl-083f6447-9a71-585a-bc2e-c0ad124fd6e4", "max_stars_repo_head_hexsha": "a8c54b150ed7aedcc2f0a0fdd4a38da9dc00eec5"... |
/-
Copyright (c) 2021 Yakov Pechersky. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-/
import data.equiv.basic
import data.set.finite
import group_theory.perm.sign
/-! # Equivalence between fintypes
This file contains some basic results on equivale... | {"author": "jjaassoonn", "repo": "projective_space", "sha": "11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce", "save_path": "github-repos/lean/jjaassoonn-projective_space", "path": "github-repos/lean/jjaassoonn-projective_space/projective_space-11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce/src/data/equiv/fintype.lean"} |
# -*- coding: utf-8 -*-
"""
Created on Mon May 17 13:00:45 2021
@author: ben-o_000
"""
import numpy as np
import pysatellite.config as cfg
def AERtoECI(posAER, stepLength, stepNum, OriECEF, latOri, lonOri):
"""
Function for converting Az/Elev/Range to Latitude/Longitude/Altitude
~~~~~~~~... | {"hexsha": "3d55ef28468ec8e2d02c81b4cc22aa8dfbd108e4", "size": 22208, "ext": "py", "lang": "Python", "max_stars_repo_path": "pysatellite/Transformations.py", "max_stars_repo_name": "sgboakes/pysatellite", "max_stars_repo_head_hexsha": "743e6824bddf5d2cf760da699db27810d9e2f8f5", "max_stars_repo_licenses": ["MIT"], "max_... |
import numpy as np
from dgp_aepmcm.layers.output_layer_base import OutputLayerBase
from dgp_aepmcm.nodes.output_node_regression import OutputNodeRegression
class OutputLayerRegression(OutputLayerBase):
def __init__(
self, y_train_tf, y_test_tf, y_train_mean_tf, y_train_std_tf, n_samples, dtype=np.float32... | {"hexsha": "ffcaf7d69210291c72d7db91c58ea27cc3ece0db", "size": 1209, "ext": "py", "lang": "Python", "max_stars_repo_path": "dgp_aepmcm/layers/output_layer_regression.py", "max_stars_repo_name": "Gonzalo933/dgp-aepmcm", "max_stars_repo_head_hexsha": "d4aca49a5072daee0a7b9a906827d7c7b3179ec0", "max_stars_repo_licenses": ... |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | {"hexsha": "fc1262d2e00618c8f06ef4ca02d3e3ab4748a18c", "size": 4997, "ext": "py", "lang": "Python", "max_stars_repo_path": "Lib/site-packages/tensorboard/plugins/scalar/scalars_plugin.py", "max_stars_repo_name": "caiyongji/tf2.3.1-py3.7.9-full-built", "max_stars_repo_head_hexsha": "ace4efcbf05b2b494388739718a18c13eab83... |
c
c * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
c * *
c * copyright (c) 1998 by UCAR *
c * *
c * University Corpo... | {"hexsha": "91cea58f3afcec4c1365c8f9b0b992462f386b8a", "size": 29231, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "install/spherepack3.2/src/trvsph.f", "max_stars_repo_name": "comp-physics/RBC3D", "max_stars_repo_head_hexsha": "2891a1e3b356e2cff0cfa74ba26d4aef3336641d", "max_stars_repo_licenses": ["MIT"], "ma... |
import numpy as np
import cv2
from ellipse import Ellipse
class Noise:
def __init__(self, min_area):
self.min_area = min_area
self.pixel_remove = 255
self.new_pixel = 0
self.ellipse = Ellipse()
def treatment_noise(self, frame, contours):
if frame is None:
r... | {"hexsha": "0d5bbe3924d1c637a4ba8eb19108d297b3b0b749", "size": 1376, "ext": "py", "lang": "Python", "max_stars_repo_path": "pupilometer/noise.py", "max_stars_repo_name": "marcosvsilva/ProjectPupilometer", "max_stars_repo_head_hexsha": "dadacabdce2c4702de6bafba18b47220e38905b4", "max_stars_repo_licenses": ["MIT"], "max_... |
import platform
import sys
import os
# The 'sysconfig' module is only available with Python 2.7 and newer, but
# an equivalent module in 'distutils' is available for Python 2.6.
if sys.version < '2.7':
from distutils import sysconfig
else:
import sysconfig
# The 'imp' module is deprecated since Python 3.4, and t... | {"hexsha": "48902f8d7df528df0099ed90f334ae3adaaad5be", "size": 2160, "ext": "py", "lang": "Python", "max_stars_repo_path": "inst/config/config.py", "max_stars_repo_name": "pradosj/reticulate", "max_stars_repo_head_hexsha": "66e99d30f21d9479f48e4751d9ca8fcef68e03c0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
/*Copyright (c) 2019, Suliman Alsowelim
All rights reserved.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
#import <opencv2/opencv.hpp>
#import "fingerprint.h"
#include <iostream>
#include <algorithm>
#include <vector>
#include <limits>
#incl... | {"hexsha": "d2efe859be6e099fcbb6424af1ae30e1ce6723c0", "size": 9418, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "fingerprint.cpp", "max_stars_repo_name": "salsowelim/dejavu_cpp_port", "max_stars_repo_head_hexsha": "70b4307111be4a2481e40e7d58b763ac50a2081b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta... |
import numpy as np
import tensorflow as tf
from keras.layers import Dense, Input
from keras.models import Model
from keras.layers.advanced_activations import LeakyReLU
from mpi4py import MPI
from keras.optimizers import SGD
import keras.backend as K
import time
def mapping(dim,edim):
n=int(2.5*dim)
Z0=np.ra... | {"hexsha": "421664ba45d6daa2ebb9e91f16accd1c2b71a245", "size": 14938, "ext": "py", "lang": "Python", "max_stars_repo_path": "Benchmark_functions/C1/benchmark_test_c1.py", "max_stars_repo_name": "julianschumann/ae-opt", "max_stars_repo_head_hexsha": "611b6c893546267732a2d690df20a4cc238002e6", "max_stars_repo_licenses": ... |
% VL_LBP Local Binary Patterns
% F = VL_LBP(IM, CELLSIZE) computes the Local Binary Pattern (LBP)
% features for image I.
%
% IM is divided in cells of size CELLSIZE. F is a three-dimensional
% array containing one histograms of quantized LBP features per
% cell. The witdh of F is FLOOR(WIDTH/CELLSIZE), wher... | {"author": "Cloud-CV", "repo": "object-proposals", "sha": "597a89520bc1b0b261420d7627b8c36439a24c7a", "save_path": "github-repos/MATLAB/Cloud-CV-object-proposals", "path": "github-repos/MATLAB/Cloud-CV-object-proposals/object-proposals-597a89520bc1b0b261420d7627b8c36439a24c7a/dependencies/vlfeat-0.9.16/toolbox/misc/vl_... |
"""
Modeling Relational Data with Graph Convolutional Networks
Paper: https://arxiv.org/abs/1703.06103
Code: https://github.com/tkipf/relational-gcn
Difference compared to tkipf/relation-gcn
* l2norm applied to all weights
* remove nodes that won't be touched
"""
import argparse
import itertools
import numpy as np
impo... | {"hexsha": "d4d91fd858fd54adaa3a4b1c5dab60fd478fe19b", "size": 24691, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/pytorch/rgcn/experimental/entity_classify_dist.py", "max_stars_repo_name": "Padarn/dgl", "max_stars_repo_head_hexsha": "5087a21279be98021fddfd1ba61487be4adfede8", "max_stars_repo_license... |
from django.shortcuts import render
from django.http import HttpResponse, Http404
import os
from os import path
import numpy as np
import pandas as pd
from PIL import Image
from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator
import matplotlib.pyplot as plt
from newspaper import Article
import nltk
nltk.down... | {"hexsha": "b2eee6ce91ad749da3f23bd12f42ce53bcb15b02", "size": 6178, "ext": "py", "lang": "Python", "max_stars_repo_path": "consciousApp/views.py", "max_stars_repo_name": "ashwani-rathee/Conscious", "max_stars_repo_head_hexsha": "8eda41f21bf5e574e657d325f9c86e20635e812a", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
""" Ichimoku Indicator
"""
import math
import numpy
import pandas
from talib import abstract
from analyzers.utils import IndicatorUtils
class Ichimoku(IndicatorUtils):
def analyze(self, historical_data, signal=['leading_span_a', 'leading_span_b'], hot_thresh=None, cold_thresh=None):
"""Performs an ichi... | {"hexsha": "4f8cbfab1bff7d3a3ff4e2a079d5b014530f2be7", "size": 3903, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/analyzers/indicators/ichimoku.py", "max_stars_repo_name": "ferreiramarcelo/telegram-crypto-signals", "max_stars_repo_head_hexsha": "321d9305de5b98cc1c70bec293cafd0ce7432db3", "max_stars_repo_l... |
using SymbolicCodegen
using Test
@testset "SymbolicCodegen.jl" begin
# Write your tests here.
end
| {"hexsha": "195f970efb88ccf62bc5d8e37b140e2aabaf5c08", "size": 103, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "cscherrer/SymbolicCodegen.jl", "max_stars_repo_head_hexsha": "97815f9d900da37aee54a87b6a1f5baf9a528212", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
# coding: utf-8
# # Assignment 2
#
# Before working on this assignment please read these instructions fully. In the submission area, you will notice that you can click the link to **Preview the Grading** for each step of the assignment. This is the criteria that will be used for peer grading. Please familiarize your... | {"hexsha": "e7cbcae9caaefdd61d0dd2c1b7746491c06661ee", "size": 4815, "ext": "py", "lang": "Python", "max_stars_repo_path": "reference/coursera-Applied-Data-Science-with-Python/Applied-Plotting-Charting-And-Data-Representation-in-Python/week2/Assignment2.py", "max_stars_repo_name": "shijiansu/coursera-applied-data-scien... |
"""
This file contains logic responsible for teaching model on a processed dataset. It prints it's accuracy.
Based on Paul van Gent's code from blog post: http://www.paulvangent.com/2016/04/01/emotion-recognition-with-python-opencv-and-a-face-dataset/
"""
import glob
import random
import numpy as np
import cv2
from im... | {"hexsha": "b00bb9fcad7808d1230ec6724803b0e91e078089", "size": 2482, "ext": "py", "lang": "Python", "max_stars_repo_path": "prepare_model.py", "max_stars_repo_name": "Navaneethg98/facemoji", "max_stars_repo_head_hexsha": "7ee5dc5f9aa332847111f02c493c94eb2efdcdd3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
program t
integer,dimension(3)::i=(/1,2,3/)
where (i>1) i=i*2
print *,i
end program t
| {"hexsha": "8954cf41fbdd84fb503988e5820d2c69276148b4", "size": 116, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "tests/t0116x/t.f", "max_stars_repo_name": "maddenp/ppp", "max_stars_repo_head_hexsha": "81956c0fc66ff742531817ac9028c4df940cc13e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 2, "... |
# Scenario E - Peakshape Variation (pVoigt model - results evaluation)
This file is used to evaluate the inference results.
In this scenario the peakshape in a spectrum with a fixed number of peaks is varied from Gaussian (n = 0.0) to Lorentzian (n = 1.0). All datasets contain 3 peaks and the noise level is kept cons... | {"hexsha": "272adc201c79cece126e4d97ad88200211080207", "size": 148485, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "code/scenarios/scenario_e/scenario_peakshape_pvoigt_evaluation.ipynb", "max_stars_repo_name": "jnispen/PPSDA", "max_stars_repo_head_hexsha": "910261551dd08768a72ab0a3e81bd73c706a143... |
[STATEMENT]
lemma poly_ring_one_mono:
assumes "n \<le> m"
shows "\<one>\<^bsub>R[\<X>\<^bsub>n\<^esub>]\<^esub> = \<one>\<^bsub>coord_ring R m\<^esub>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<one>\<^bsub>R [\<X>\<^bsub>n\<^esub>]\<^esub> = \<one>\<^bsub>R [\<X>\<^bsub>m\<^esub>]\<^esub>
[PROOF STEP]
by ... | {"llama_tokens": 167, "file": "Padic_Field_Ring_Powers", "length": 1} |
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import pandas as pd
import altair as alt
from pylab import rcParams
from .common import *
alt.data_transformers.disable_max_rows()
from networkx.drawing.nx_agraph import graphviz_layout, to_agraph
import pygraphviz as pgv
from IPython.display ... | {"hexsha": "35336938a5f1e15a25bad542c30c12f7543e95dc", "size": 15181, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyrankability/plot.py", "max_stars_repo_name": "IGARDS/ranking_toolbox", "max_stars_repo_head_hexsha": "98e2d318c76c92d91bb2c0481efe9879cd3614db", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
\documentclass[12pt,english]{article}
\usepackage{mathptmx}
\usepackage{color}
\usepackage[dvipsnames]{xcolor}
\definecolor{darkblue}{RGB}{0.,0.,139.}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{amsmath}
\usepackage{amstext}
\usepackage{amssymb}
\usepackage{setspace}
\usepackage{lipsu... | {"hexsha": "a06b6997caf91be150a0a02583fcca22d72c7cd9", "size": 23031, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "FinalProject/Final.Project/FinalProject.tex", "max_stars_repo_name": "omcdevi/DScourseS19", "max_stars_repo_head_hexsha": "87522d20227fcbf934762339dbe9d247b09203e0", "max_stars_repo_licenses": ["MI... |
import numpy as np
import tensorflow as tf
from config import cfg
epsilon = 1e-9
class CapsLayer(object):
''' Capsule layer.
Args:
input: A 4-D tensor.
num_outputs: the number of capsule in this layer.
vec_len: integer, the length of the output vector of a capsule.
layer_typ... | {"hexsha": "7cae31de45ba96c2017229378a48af620a8f180c", "size": 8856, "ext": "py", "lang": "Python", "max_stars_repo_path": "capsLayer.py", "max_stars_repo_name": "crjramsden/CapsuleAI", "max_stars_repo_head_hexsha": "3d04a76259c72b647cf63c4dbad7c173c3851005", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
# ----------------------------------------------------------------------------
# test_hsi11.py
#
# Copyright 2021 Daniel Tisza
# MIT License
#
# Taking image with HSI changed to use mvImpact Pythin binding
#
# ----------------------------------------------------------------------------
from __future__ import print_func... | {"hexsha": "e6c5edd0851be5ac42774998940e51cf36072dfe", "size": 18433, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/zybohsi/test_hsi11.py", "max_stars_repo_name": "DanielTisza/spectralcamera", "max_stars_repo_head_hexsha": "4fef93b3b4cd8f83e016070f1c0d68aa0cff5102", "max_stars_repo_licenses": ["MIT"], "... |
import argparse
import numpy as np
import torch
import yaml
from torch.utils.data import DataLoader
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
from model import LanguageModel
from dataset import CoNLLDataset, collate_annotations
FLAGS = None
def main(_):
# Load configuration.
... | {"hexsha": "b975820b54544011a3cf9c9ca812def1281769d3", "size": 2477, "ext": "py", "lang": "Python", "max_stars_repo_path": "tutorials/rnn-examples/train_lm.py", "max_stars_repo_name": "SamuelPhang/uci-statnlp", "max_stars_repo_head_hexsha": "799e95daa1cbdfe00f501b3068df24eb90c0d351", "max_stars_repo_licenses": ["Apache... |
import sys
import os
import pyflann
import params
import numpy as np
import draw_func2 as df2
import helpers
np.random.seed(5)
# Parameters
tdim = 2; # Target viewing dimensions
dim = 2; # Calculation dimension
if len(sys.argv) == 2:
tdim = int(sys.argv[1])
dim = int(sys.argv[1])
K = 4;
checks ... | {"hexsha": "351ec4cc9af99e6ff463624cae8f19671ea65acd", "size": 4308, "ext": "py", "lang": "Python", "max_stars_repo_path": "_scripts/k_reciprocal_nearest_neighbors.py", "max_stars_repo_name": "Erotemic/hotspotter", "max_stars_repo_head_hexsha": "3cfa4015798e21385455b937f9083405c4b3cf53", "max_stars_repo_licenses": ["Ap... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/12/23 10:01 AM
# @Author : zhangzhen
# @Site :
# @File : torch_tutorial.py
# @Software: PyCharm
import torch
import math
import numpy as np
import torch.nn.functional as F
from torch.autograd import Variable
import matplotlib.pyplot as plt
def ac... | {"hexsha": "271e15451543bb08b2bf002df319d15cca225fb7", "size": 4696, "ext": "py", "lang": "Python", "max_stars_repo_path": "dl_tutorials/torch_tutorial.py", "max_stars_repo_name": "learnerzhang/AnalyticsVidhya", "max_stars_repo_head_hexsha": "697689a24a9d73785164512cab8ac4ee5494afe8", "max_stars_repo_licenses": ["Apach... |
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2018 Couchbase, Inc.
*
* 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
*
* ... | {"hexsha": "d6ea0c7208fa1f3c304a500243ce2b008586588a", "size": 3478, "ext": "h", "lang": "C", "max_stars_repo_path": "include/memcached/server_document_iface.h", "max_stars_repo_name": "hrajput89/kv_engine", "max_stars_repo_head_hexsha": "33fb1ab2c9787f55555e5f7edea38807b3dbc371", "max_stars_repo_licenses": ["BSD-3-Cla... |
import numpy as np
from util import util
from config.draco3_lb_config import PnCConfig, WBCConfig
from pnc.wbc.ihwbc.ihwbc import IHWBC
from pnc.wbc.ihwbc.joint_integrator import JointIntegrator
class Draco3LBController(object):
def __init__(self, tci_container, robot):
self._tci_container = tci_containe... | {"hexsha": "f713ea8db528032ad33727686296727e18b4ed76", "size": 4232, "ext": "py", "lang": "Python", "max_stars_repo_path": "pnc/draco3_lb_pnc/draco3_lb_controller.py", "max_stars_repo_name": "MaxxWilson/ASE389Project", "max_stars_repo_head_hexsha": "13c3c72887e27fbed2eef63c1e27b4a185036a39", "max_stars_repo_licenses": ... |
\chapter{Results}\label{chap:results}
Clustering for \bslong{} and investigating the \krap{} led us to focus on a volley of metrics in order to understand the nature of the data.
For clustering, we were interested in both the nature of the clusters --- the size, purity, and unique \spec{} within each --- as well as the... | {"hexsha": "3041b97e66a058af94610f4127b6087bcb029447", "size": 639, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/results/000.tex", "max_stars_repo_name": "jmcgover/thesis", "max_stars_repo_head_hexsha": "25664684158d00864dbe697276d2691ba84461cb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
#!/usr/bin/python3
#-*-coding:utf-8-*-
import json
import sys
import functools
import math
import numpy as np
import matplotlib.pyplot as plt
import csv
import os
from tablet import *
from bootstrap import *
from plot import *
#Parse all the files
pairData = {}
files = []
outputDir = os.getcwd()
argv = sys.ar... | {"hexsha": "2a2ee5cd52ff6358747655e5e696d8d7d6e6bd09", "size": 10010, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/extractCHI20Data/extractCHI20Data.py", "max_stars_repo_name": "MickaelSERENO/SciVis_Server", "max_stars_repo_head_hexsha": "35b07c832d053b49e4f3f9f85b5168dddedcaf5e", "max_stars_repo_lice... |
import Arena
from MCTS import MCTS
from ataxx.AtaxxGame import AtaxxGame
from ataxx.AtaxxPlayers import *
from ataxx.pytorch.NNet import NNetWrapper as NNet
import numpy as np
from utils import *
import argparse
"""
use this script to play any two agents against each other, or play manually with
any agent.
"""
pars... | {"hexsha": "11ab1d191acd1688481e5224ae3d73301c5fee38", "size": 1999, "ext": "py", "lang": "Python", "max_stars_repo_path": "pit.py", "max_stars_repo_name": "2JS/alpha-zero-general", "max_stars_repo_head_hexsha": "d172ee5b20b80fb3a9eacd4a8b8437e570131a7e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
from jesse.helpers import get_candle_source, slice_candles, np_shift
import numpy as np
from numba import njit
import talib
from typing import Union
from jesse.helpers import get_config
from collections import namedtuple
'''
https://www.tradingview.com/script/NgLjvBWA-RedK-Compound-Ratio-Moving-Average-CoRa-Wave/#cha... | {"hexsha": "456bcb9dda3e26676ac876dab9ab99d062a70f40", "size": 1871, "ext": "py", "lang": "Python", "max_stars_repo_path": "Indicators/compound_ratio_ma.py", "max_stars_repo_name": "Desil-sketch/Indicators-for-Jesse", "max_stars_repo_head_hexsha": "ffe33a217002ea3034696fe38acfa72611d52b4f", "max_stars_repo_licenses": [... |
module spectral_wave_data_def
use, intrinsic :: iso_fortran_env, only: int64
use kind_values, only: knd => kind_swd_interface, wp => kind_swd_internal
use spectral_wave_data_error, only: swd_error
implicit none
private
! This module provides the abstract base class for spectral_wave_data_X objects.
!
! Written by ... | {"hexsha": "c1ee465f59877733f89527b3d0a227d378518613", "size": 15864, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/api/fortran/spectral_wave_data.f90", "max_stars_repo_name": "TormodLandet/spectral_wave_data", "max_stars_repo_head_hexsha": "c43710e769c3d7d3c4f832ab74e456706b361493", "max_stars_repo_lice... |
# Copyright 2020 The PyMC Developers
#
# 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 ag... | {"hexsha": "90f25c3631a775a0781b82ba5c167c5e68482183", "size": 12502, "ext": "py", "lang": "Python", "max_stars_repo_path": "pymc/variational/approximations.py", "max_stars_repo_name": "cluhmann/pymc", "max_stars_repo_head_hexsha": "562be3781c9d37d3300c4efd4cf6598e5739c32d", "max_stars_repo_licenses": ["Apache-2.0"], "... |
[STATEMENT]
lemma complex_roots_complex_prod [simp]:
assumes "f \<noteq> 0" "g \<noteq> 0"
shows "mset (complex_roots_complex (f * g))
= mset (complex_roots_complex f) + mset (complex_roots_complex g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. mset (complex_roots_complex (f * g)) = mset (complex_ro... | {"llama_tokens": 1544, "file": "Berlekamp_Zassenhaus_Mahler_Measure", "length": 14} |
/*
* Copyright (c) 2019, 2020, 2021 SiKol Ltd.
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
* Permission is hereby granted, free of charge, to any person or organization
* obtaining a copy of the software and accompanying documentation covered by
* this license (the "Software") to use, reproduc... | {"hexsha": "785879ac92ff2d169d11bed9ba1c40c02856a2d4", "size": 3138, "ext": "hxx", "lang": "C++", "max_stars_repo_path": "include/sk/config/parser/variant.hxx", "max_stars_repo_name": "sikol/sk-config", "max_stars_repo_head_hexsha": "ada0c72ac5703763b1f1d9aadc2cc3850bf11acc", "max_stars_repo_licenses": ["BSL-1.0"], "ma... |
[STATEMENT]
lemma invariance_of_domain_homeomorphism:
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
assumes "open S" "continuous_on S f" "DIM('b) \<le> DIM('a)" "inj_on f S"
obtains g where "homeomorphism S (f ` S) f g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (\<And>g. homeomorphism... | {"llama_tokens": 363, "file": null, "length": 4} |
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
def plot_ellipsoid(m, s2, *, r=2, alpha=None, beta=None,
plot_axes=True, line_color='r', line_width=2,
plot_ellip=True, ellip_color=(.8, .8, .8), ellip_alpha = 0.5,... | {"hexsha": "6a58d417f6ed1e86cdef4dee07a8fc11d1b3ac2e", "size": 2900, "ext": "py", "lang": "Python", "max_stars_repo_path": "arpym/tools/plot_ellipsoid.py", "max_stars_repo_name": "dpopadic/arpmRes", "max_stars_repo_head_hexsha": "ddcc4de713b46e3e9dcb77cc08c502ce4df54f76", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
module ESValues
using GLM
using StatsBase
# package code goes here
include("iterators.jl")
export esvalues, ESValuesEstimator
typealias MaskType Float64
type ESValuesEstimator{T}
x
f::Function
X
link
featureGroups::Vector{Vector{Int64}}
weights
nsamples::Int64
varyingInds::Vector{In... | {"hexsha": "07d40665cf7965d0c36c078081ac0c6899317520", "size": 6893, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ESValues.jl", "max_stars_repo_name": "slundberg/ESValues.jl", "max_stars_repo_head_hexsha": "0a3d6400915951d2c9a3d60f6b180224df922598", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,... |
"""Prepare data for plotting"""
from lcmap_tap.logger import exc_handler, log
from lcmap_tap.Plotting import plot_functions
from lcmap_tap.RetrieveData.retrieve_ccd import CCDReader
from lcmap_tap.RetrieveData.retrieve_classes import SegmentClasses
import sys
import numpy as np
import datetime as dt
from co... | {"hexsha": "32066e444a20db59132c8cc993f7c14668437a33", "size": 12832, "ext": "py", "lang": "Python", "max_stars_repo_path": "lcmap_tap/Plotting/plot_specs.py", "max_stars_repo_name": "danzelenak-usgs/TAP_Tool", "max_stars_repo_head_hexsha": "4ae3f4105df47efaa57283b25019e398b32de7b9", "max_stars_repo_licenses": ["Unlice... |
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | {"hexsha": "dc7643de84162e65ebe24a743b7a5c4f448d7a3b", "size": 16829, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_addons/optimizers/discriminative_layer_training_test.py", "max_stars_repo_name": "dkamotsky/addons", "max_stars_repo_head_hexsha": "56ff850785c6caa8c18c2859e32a32c8902defea", "max_star... |
###############################################################################################
#
# Extract raw Markdown from source files and turn them into docs
#
# - Use `names(module)` to get a list of exported symbols from the module
# - Use __META__ to get all documented symbols along with path to the sourcef... | {"hexsha": "310c071f2078898eab06ade401a8ad54c94d1f38", "size": 10695, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/build-docs.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/mPulseAPI.jl-9f4a2347-a52b-52c3-b18a-5631cfb5128d", "max_stars_repo_head_hexsha": "1c55c1d5f3c0b9b3d3e4067cf3797ef522c4f... |
/**************************************************************
* Copyright (c) 2008-2009 Daniel Pfeifer *
* *
* Distributed under the Boost Software License, Version 1.0. *
**************************************************************/... | {"hexsha": "aa0c27a1e0fcb2a87d1f2abd0d74f8376e6ffc21", "size": 1551, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/sql/firebird/connection.hpp", "max_stars_repo_name": "purpleKarrot/async-db", "max_stars_repo_head_hexsha": "172124e5657e3085e8ac7729c4e578c0d766bf7b", "max_stars_repo_licenses": ["BSL... |
\\ Count down from x
: cnt_down ( x -- )
DUP 0 >
IF 1- DUP . RECURSE
THEN
;
| {"hexsha": "700a3a7f1c4094a85a0c688ba7665624b89e2fae", "size": 100, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "release/cnt_down.f", "max_stars_repo_name": "jpoirier/meusForth", "max_stars_repo_head_hexsha": "db7ba3c17f1c672c4c35415a6a4e2e45e79b19ac", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c... |
{-# OPTIONS --without-K #-}
module sets.list.properties where
open import level
open import equality.core
open import sets.list.core
module _ {i}{A : Set i} where
data all {j}(P : A → Set j) : List A → Set (i ⊔ j) where
mk-all : ∀ {x xs} → P x → all P xs → all P (x ∷ xs)
data any {j}(P : A → Set j) : List A ... | {"hexsha": "e80a524abddfd57ad0d2b7fa1632b1125678f138", "size": 495, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/sets/list/properties.agda", "max_stars_repo_name": "pcapriotti/agda-base", "max_stars_repo_head_hexsha": "bbbc3bfb2f80ad08c8e608cccfa14b83ea3d258c", "max_stars_repo_licenses": ["BSD-3-Clause"],... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.