text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
# -*- coding: utf-8 -*-
# RoboMaster AI Challenge Simulator (RMAICS)
### Add forcing broadcasting states
import sys
all_path = sys.path
py2_path = [tmp_path for tmp_path in all_path if not 'python3.7' in tmp_path]
py3_path = [tmp_path for tmp_path in all_path if not 'python2.7' in tmp_path]
from roborts_msgs... | {"hexsha": "43366564332a6bc445615ff05c8e86784edc6edc", "size": 15649, "ext": "py", "lang": "Python", "max_stars_repo_path": "rmaics_ROS_fb.py", "max_stars_repo_name": "mysterybc/RoboMaster-AI-Challenge-Simulator-2D-2020", "max_stars_repo_head_hexsha": "d1643e05135e618c8ad19f089ceed82913bd26c0", "max_stars_repo_licenses... |
function main()
#ch=Channel(1)
f1() = (for i = 1:5 println("a"); put!(ch,1); sleep(1); end);
f2() = (for i = 1:5 println("b: ", take!(ch)); sleep(0.1); end);
f3() = (while true; println("c"); for i = 1:9999999 b=i^i; end; sleep(0); end);
f4() = (while true; print("."); sleep(0.1); end);
a = Task(f1);
b = Task... | {"hexsha": "e8f31443a1c5b91efc70c76f7a7295490f2d2db7", "size": 450, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "tests/tasks.jl", "max_stars_repo_name": "Gilga/JuliaOpenGL", "max_stars_repo_head_hexsha": "2cd151924949a2e7e873fa4336f3d7e8ab8bf077", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
import itertools
import random
from typing import Dict, List
import numpy as np
import matplotlib.pyplot as plt
import networkx as nx
def drawGraphWithCommunities(graph: nx.Graph, communities: Dict[int, List[int]] = None, weighted=False):
if communities is None:
communities = {n: [vertex] for n, vertex i... | {"hexsha": "9d9cf9f463ba78dc80d19ddda04e115adffabb03", "size": 1520, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/p20191_paa_sem1/graph_draw.py", "max_stars_repo_name": "Mardoqueu-Pimentel/P2019.1_PAA_SEM1", "max_stars_repo_head_hexsha": "76e777e504bcfe39b75299855f39800f7ac00384", "max_stars_repo_licenses... |
\section{Annexes}
\begin{figure}[!h]
\begin{tikzpicture}[->, >=stealth', shorten >= 1pt, auto, node distance=2.8cm, semithick]
\tikzstyle{every state}=[fill=red]
\node [initial, state] (A) {$q_{bad}$};
\end{tikzpicture}
\caption{supp\_final\_init}
\end{figure}
\vspace{0.5cm}
\begin{figure}[!h]
\begin{tikzpicture}... | {"hexsha": "b0235b4a095431ce3922b028e68a469095a892b2", "size": 3562, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "report/annexes.tex", "max_stars_repo_name": "pouwapouwa/Bounded_Model_Checking", "max_stars_repo_head_hexsha": "0059df30bd1d834235ec466f20515e6f20507455", "max_stars_repo_licenses": ["0BSD"], "max_s... |
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import sys
import pandas as pd
# from scipy.stats import poisson
from numpy.random import poisson
sns.set(style="white", rc={"axes.facecolor": (0, 0, 0, 0)})
class Perf:
def __init__(self):
if len(sys.argv) < 2:
raise Ex... | {"hexsha": "704a3122ba09e123c0793484b2d7382e0491cdbe", "size": 4062, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/perf.py", "max_stars_repo_name": "Naphann/quisp", "max_stars_repo_head_hexsha": "b9c9e2edcfdd92e532d53a9a9ce393d8b0b28d99", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": ... |
# # Packages
#
# Julia has over 2000 registered packages, making packages a huge part of the Julia ecosystem.
#
# Even so, the package ecosystem still has some growing to do. Notably, we have first class function calls to other languages, providing excellent foreign function interfaces. We can easily call into python ... | {"hexsha": "a7181ad05266b8d79c892f025b4f19370da07bc5", "size": 2391, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Courses/Introduction to Julia/07.Packages.jl", "max_stars_repo_name": "fercarozzi/JuliaAcademyMaterials", "max_stars_repo_head_hexsha": "4c7501d42e698379050fd6e6d469f3f84428cdcd", "max_stars_repo_l... |
import io
import numpy as np
import psutil
import os
import re
import grequests
import torch
import torch.nn as nn
import chexpert_labeler
from api import Token
from api.models.base import DeviceMixin
from api.utils import to_numpy
from api.utils.rnn import pack_padded_sequence, pad_packed_sequence
class SentIndex2... | {"hexsha": "ed12ce426296b79f3a73249bb3d243fe1c3b7391", "size": 4456, "ext": "py", "lang": "Python", "max_stars_repo_path": "api/models/nondiff.py", "max_stars_repo_name": "stmharry/interpretable-report-gen", "max_stars_repo_head_hexsha": "c4518b613526f76ef84e1dc58b4939b315e80cd9", "max_stars_repo_licenses": ["MIT"], "m... |
import CurveFit
using Printf
using stoosc
rc("font", family="arial")
# Maximal considered input intensity
I_max = 0.3
## Deterministic Arnold tongue
filename = joinpath("arnold_tongues", "model01", "ode.csv")
arnold_tongue = load_data(filename)
entrainment_area_ode = estimate_entrainment_area(arnold_tongue, I_max)
pr... | {"hexsha": "de57701e9c0d5afc909b062d89494935034096d6", "size": 8045, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/figure_arnold_tongues_model01.jl", "max_stars_repo_name": "vkumpost/stoosc", "max_stars_repo_head_hexsha": "2a1fd4dc3adf9e6066877aa4134530f9d79a16cc", "max_stars_repo_licenses": ["MIT"], "m... |
from numpy import loadtxt
from keras.models import load_model
import tensorflow as tf
import pandas as pd
from tensorflow.python.keras.preprocessing.sequence import pad_sequences
import pickle
from tensorflow.python.keras import backend as K
from tensorflow.python.keras.backend import set_session
global session
sessio... | {"hexsha": "b67b61645935eb67476ac3e426b147f3ab063d19", "size": 1011, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/filter_dir/filter.py", "max_stars_repo_name": "Karola766/NewsChiller", "max_stars_repo_head_hexsha": "ac76081f1139a62e18a0f07366ae76c26f40d70a", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
#
# Copyright (c) 2021, NVIDIA CORPORATION. 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": "7e7a25b0bde5f51b0ac9ef0eed5508d4d553cd31", "size": 12528, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo/Tacotron2/tensorrt/generate_decoder.py", "max_stars_repo_name": "KaliberAI/TensorRT", "max_stars_repo_head_hexsha": "34a167558058bb801176430d37d38a46328ab0d2", "max_stars_repo_licenses": ["A... |
#!/usr/bin/env python
"""Convert between N_particle, m_particle and volume in an N-body simulation."""
__author__ = "Simon Mutch"
__date__ = "2018-02-01"
import numpy as np
from astropy import cosmology, units as U
import click
cosmo = cosmology.Planck15
@click.group()
def cli():
pass
@cli.command()
@click.... | {"hexsha": "0b17eafab22ea8de0ac137bae5bc4045d552db99", "size": 2249, "ext": "py", "lang": "Python", "max_stars_repo_path": "nbody_stats.py", "max_stars_repo_name": "smutch/nbody_stats", "max_stars_repo_head_hexsha": "2d41ca33851dffa549c16478e972cccd553be2de", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
import numpy as np
import scipy.stats as st
from niscv_v2.basics.exp import Exp
from niscv_v2.basics import utils
from datetime import datetime as dt
import pickle
def experiment(dim, fun, size_est, sn, size_kn, ratio):
mean = np.zeros(dim)
target = lambda x: st.multivariate_normal(mean=mean).pdf(x)
propo... | {"hexsha": "f894b6e2f29a33c30e9c17176c640c2ea09efb0c", "size": 1750, "ext": "py", "lang": "Python", "max_stars_repo_path": "niscv_v2/experiments/simulation/kernel_cost.py", "max_stars_repo_name": "IanFla/Importance-Sampling", "max_stars_repo_head_hexsha": "f2dd2164e95377d2cf025fcddd19b2592394e4d7", "max_stars_repo_lice... |
[STATEMENT]
theorem S\<^sub>3_sound:
"w \<in> S\<^sub>3 \<longrightarrow> length [x \<leftarrow> w. x = a] = length [x \<leftarrow> w. x = b]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. w \<in> S\<^sub>3 \<longrightarrow> length (filter (\<lambda>x. x = a) w) = length (filter (\<lambda>x. x = b) w)
[PROOF STEP]
... | {"llama_tokens": 219, "file": null, "length": 2} |
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "stdafx.h"
#include ... | {"hexsha": "bf57e76c912bbc5adfebdcd378ae1dcbb9324885", "size": 4782, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/prod/src/data/tstore/PartitionSortedListAdd.Test.cpp", "max_stars_repo_name": "gridgentoo/ServiceFabricAzure", "max_stars_repo_head_hexsha": "c3e7a07617e852322d73e6cc9819d266146866a4", "max_star... |
import re
import pandas as pd
import numpy as np
import requests
from datetime import datetime
from concurrent import futures
from functools import partial
class YahooCrawler:
def __init__(self, workers=20):
"""
Args:
workers (int, optional): The maximum number of threads that can be... | {"hexsha": "dc8c42e65a4aa4dc58afdfdf79c53451b287c8d3", "size": 4786, "ext": "py", "lang": "Python", "max_stars_repo_path": "yhcrawler.py", "max_stars_repo_name": "taojiaa/yahoo-crawler", "max_stars_repo_head_hexsha": "2e01ef2a38eb728775db4e4845c5c11b99dca684", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
#!usr/bin/env python3
from pycorenlp import StanfordCoreNLP
import numpy as np
import time
# import word2vec
import string
from collections import defaultdict
import pickle
import json
import pandas as pd
nlp = StanfordCoreNLP('http://localhost:9000')
relations = dict()
def open_ie(input, relations=relations, nlp=n... | {"hexsha": "d759d221820a05cc403bebaa210591654d40bd3d", "size": 1728, "ext": "py", "lang": "Python", "max_stars_repo_path": "stuff/openie.py", "max_stars_repo_name": "maobubu/stock-prediction", "max_stars_repo_head_hexsha": "b2442ccb027c25809a33a610f010cdec077bf61a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
#!/usr/bin/env python3
from scipy import ndimage
from multiprocessing import Process, Manager
import numpy as np
class Threshold(object):
"""docstring for Threshold"""
def __init__(self, img, threshold=0):
self.img = img
self.threshold = threshold
def get_img(self):
return self.im... | {"hexsha": "c8033753db5d726bf7a53c1d2b218661abcbc0f8", "size": 3924, "ext": "py", "lang": "Python", "max_stars_repo_path": "AABBlib/threshold.py", "max_stars_repo_name": "kopecmartin/grains-recognition", "max_stars_repo_head_hexsha": "72eade0f60800a6d3c9361bb74ff35e3445a9baf", "max_stars_repo_licenses": ["MIT"], "max_s... |
"""
This module provides methods related to Zernike polynomials and their
derivatives.
"""
# -----------------------------------------------------------------------------
# IMPORTS
# -----------------------------------------------------------------------------
from copy import deepcopy
from typing import Callable, Di... | {"hexsha": "87d74ff46e835d9885f3cd680c13b00037f73147", "size": 16176, "ext": "py", "lang": "Python", "max_stars_repo_path": "hswfs/zernike.py", "max_stars_repo_name": "timothygebhard/hswfs", "max_stars_repo_head_hexsha": "8442314674c028b7b5833c278c5d455901fa38b0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# Copyright 2020 The Weakly-Supervised Control Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | {"hexsha": "8a4261e5442c8aad1db0659075240544b4dd87fc", "size": 8874, "ext": "py", "lang": "Python", "max_stars_repo_path": "weakly_supervised_control/disentanglement/model.py", "max_stars_repo_name": "GitHub30/weakly_supervised_control", "max_stars_repo_head_hexsha": "998034581710d148f7576a720383633e39b84a09", "max_sta... |
import rospy
from razer_hydra.msg import Hydra, HydraPaddle
import numpy as np
from UserInputListener import *
class HydraListener(UserInputListener):
def __init__(self):
self.input_topic_name = "/hydra_calib"
self.input_message_type = Hydra
super(HydraListener, self).__init__()
def message_to_data(... | {"hexsha": "62111599bbc3207f4596437acc645520620709cc", "size": 1497, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ada_teleoperation/input_handlers/HydraListener.py", "max_stars_repo_name": "HARPLab/ada_teleoperation", "max_stars_repo_head_hexsha": "478842a447bbabc31181f76ce3b56aa02b5de298", "max_stars_rep... |
# Unit test preprocess_last_window
# ==============================================================================
import pytest
import numpy as np
import pandas as pd
from skforecast.utils import preprocess_last_window
def test_output_preprocess_last_window_when_last_window_index_is_DatetimeIndex_and_has_frequecy():... | {"hexsha": "0fcb2e537cd1c220b46b0df5a6bc71e211895021", "size": 2033, "ext": "py", "lang": "Python", "max_stars_repo_path": "skforecast/utils/tests/test_preproces_last_window.py", "max_stars_repo_name": "JoaquinAmatRodrigo/skforecaster", "max_stars_repo_head_hexsha": "3ab526d63bbb94ae4bd18ae964197042a675a34a", "max_star... |
#include <boost/tuple/tuple.hpp>
#include <boost/tuple/tuple_io.hpp>
#include <string>
#include <iostream>
int main()
{
typedef boost::tuple<std::string&, std::string&, int&> person;
std::string firstname = "Boris";
std::string surname = "Schaeling";
int shoesize = 43;
person p = boost::tie(firstn... | {"hexsha": "4bba229e7675535b54669a3f3535d94e255d534e", "size": 403, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Boost/The Boost C++ Libraries/src/14.2.8/main.cpp", "max_stars_repo_name": "goodspeed24e/Programming", "max_stars_repo_head_hexsha": "ae73fad022396ea03105aad83293facaeea561ae", "max_stars_repo_licens... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2019 Next Century 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/LICENS... | {"hexsha": "83d60eb479d136bb0f3cd2821d17cf0fc46ae9b4", "size": 6018, "ext": "py", "lang": "Python", "max_stars_repo_path": "occluder/maskinfo.py", "max_stars_repo_name": "bzinberg/MCS", "max_stars_repo_head_hexsha": "495562a0d4d0b1e3679b78f0f6fb568a1b9a9ae2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"... |
Require Import Coq.Arith.EqNat.
Require Import Coq.Structures.Equalities.
Require Import Coq.Lists.List.
Require Import Coq.MSets.MSetInterface.
Require Import Coq.MSets.MSetWeakList.
Require Import Coq.Logic.Classical_Prop.
Require Import Coq.Program.Equality.
Require Import Coq.Arith.PeanoNat.
Require Import MSetProp... | {"author": "zhiyuanshi", "repo": "intersection", "sha": "825f69cf7f70db7d0b829875f590fa38468bfad1", "save_path": "github-repos/coq/zhiyuanshi-intersection", "path": "github-repos/coq/zhiyuanshi-intersection/intersection-825f69cf7f70db7d0b829875f590fa38468bfad1/withtop/Proofs/STLC.v"} |
import pyspark
import networkx as nx
import pandas as pd
from pyspark.sql.types import (
LongType,
StringType,
FloatType,
IntegerType,
DoubleType,
StructType,
StructField,
)
import pyspark.sql.functions as f
from pyspark.sql.functions import pandas_udf, PandasUDFType
from networkx.algorithms... | {"hexsha": "8b900721658765f749ce2db4ca1bf321460982be", "size": 4488, "ext": "py", "lang": "Python", "max_stars_repo_path": "splink_graph/edge_metrics.py", "max_stars_repo_name": "pratibha-vellanki/splink_graph", "max_stars_repo_head_hexsha": "c64e6f2b490fb0fe8ed4af54e1b60e936af95fef", "max_stars_repo_licenses": ["MIT"]... |
"""classes and methods for different model architectures
"""
#python packages
import numpy as np
# Machine Learning from Scratch packages
from Layers import FullyConnected
from utils.optimizers import *
class NeuralNet():
"""
Linear stack of layers.
"""
def __init__(self, layers=None):
# Add ... | {"hexsha": "af029a134b4e84a7dca43a17a1ce48c9d78abdd2", "size": 9722, "ext": "py", "lang": "Python", "max_stars_repo_path": "Models.py", "max_stars_repo_name": "BradHend/machine_learning_from_scratch", "max_stars_repo_head_hexsha": "6c83f17d1c48da9ad3df902b3090a8cb2c544f15", "max_stars_repo_licenses": ["MIT"], "max_star... |
```python
import fit_pendulum_data as p1
import midpoint_vec as p2
import Lagrange_poly1 as p3
import Lagrange_poly2 as p4
import Lagrange_poly2b as p5
import sympy as sp
import numpy as np
import matplotlib.pyplot as plt
```
# Exercise 5.18
## Plots L vs T from a source file and fits polynomials of varying degrees to... | {"hexsha": "cb9bc1566bb6050cf96f421a946ee0cdfa3ca409", "size": 91645, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "hw-2-C0deMonkee.ipynb", "max_stars_repo_name": "chapman-phys227-2016s/hw-2-C0deMonkee", "max_stars_repo_head_hexsha": "2db1f30afecb9f2d09e29a15c6f47656e8582deb", "max_stars_repo_lice... |
# -*- coding: utf-8 -*-
import click
import logging
from pathlib import Path
import os
from dotenv import find_dotenv, load_dotenv
import json
import pandas as pd
import numpy as np
import urllib
import zipfile
from tqdm import tqdm
from glob import glob
from collections import defaultdict
from src.data.tcia import TCI... | {"hexsha": "7256eb79b4bf3fb77e03786dae03ddd6a4236d0e", "size": 7857, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/download_collection.py", "max_stars_repo_name": "samulic/cmmd", "max_stars_repo_head_hexsha": "5a12b11c65c8fc7d765a637e45b09bb93a10b043", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import argparse
from train import load_model
from dataset import load_images_features
import os
from dataset import EMOTION2INTEGER
import numpy as np
from sklearn.metrics import confusion_matrix,accuracy_score
from matplotlib import pyplot as plt
import itertools
def get_cmd_args():
""" Parse user command line ar... | {"hexsha": "c9e6b5092d01d979f65cc118df6e72092ff58d0e", "size": 3143, "ext": "py", "lang": "Python", "max_stars_repo_path": "confussion_matrix.py", "max_stars_repo_name": "mitiku1/Emopy-Multi-Input-", "max_stars_repo_head_hexsha": "b520eb3f3d121c9d456a52315f1fd78ef43f74fd", "max_stars_repo_licenses": ["MIT"], "max_stars... |
"""Testing for time series embedding."""
# License : Apache 2.0
import numpy as np
import pytest
from numpy.testing import assert_almost_equal
from sklearn.exceptions import NotFittedError
from giotto.time_series import TakensEmbedding
from giotto.time_series import SlidingWindow
signal = np.asarray([np.sin(x / 2) +... | {"hexsha": "93881c3ef05ed649b61e917f83be3b08cafe74b1", "size": 3545, "ext": "py", "lang": "Python", "max_stars_repo_path": "giotto/time_series/tests/test_embedding.py", "max_stars_repo_name": "gtauzin/giotto-learn", "max_stars_repo_head_hexsha": "4cbd981f8113d44a80d68570a472d5a58245535b", "max_stars_repo_licenses": ["A... |
import numpy as np
import pickle
network = '../Data/Costa_Rica.p'
stationName = 'pne2'
cr = pickle.load(open(network, "rb" ))
sta = cr.get_station(stationName)
times = sta.times
f = open('/home/nvoss/Geodesy/CR_2014/model.ins', 'w')
f.write('pif @ \n')
f.write('@model@\n')
#f.write('l1 w !obs1! \n')
for i in range(le... | {"hexsha": "eaf681b0be11a5ce0bb41fb638c2c71697074624", "size": 383, "ext": "py", "lang": "Python", "max_stars_repo_path": "PEST/genIns.py", "max_stars_repo_name": "nvoss12838/gpsFIT", "max_stars_repo_head_hexsha": "5f06274e57f7c2f4101775eadf7142e5f492b177", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max... |
import sys
from pathlib import Path
from typing import Optional, List
import numpy as np
import pyrallis
import torch
from PIL import Image
from dataclasses import dataclass
from tqdm import tqdm
sys.path.append(".")
sys.path.append("..")
from configs.paths_config import model_paths
from models.stylegan3.model impor... | {"hexsha": "2471572ffe2107056d77ddb4db2b5cdc68c6f208", "size": 4527, "ext": "py", "lang": "Python", "max_stars_repo_path": "inversion/scripts/create_inversion_animation.py", "max_stars_repo_name": "ohhagr/stylegan3-editing-environment", "max_stars_repo_head_hexsha": "5f3602f4a6bb8036511b35aacc9b332d0ca5fa58", "max_star... |
import numpy as np
from PIL import Image
from six import BytesIO
from six.moves.urllib.request import urlopen, Request
import sys
import yaml
# Max number of tiles allowed in the map image to be fetched.
MAX_TILES = 128
# Size in pixels of the single tile.
TILE_SIZE = 256
# The url to the OpenStreetMap server.
TILE... | {"hexsha": "45994921dfbef947aa058f88a9aa23e19a154171", "size": 4920, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/fetch_map.py", "max_stars_repo_name": "Leot6/mod-abm-2.0", "max_stars_repo_head_hexsha": "085c5e243a023229e8adb169a5f6d62225a382ed", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
#!/usr/bin/env python
import unicornhathd
import time
import colorsys
import numpy
import threading
from getch import getch
from itertools import chain
"""Unicorn HAT HD: Heart Beats
Displaying a beating heart...
Your Unicorn HAT HD loves you.
"""
heart = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[... | {"hexsha": "cbe027856fe67d8b6c8f38e37d4449e4e503825e", "size": 2743, "ext": "py", "lang": "Python", "max_stars_repo_path": "heartbeats.py", "max_stars_repo_name": "jerseyschorr/cyber-meme", "max_stars_repo_head_hexsha": "32d5d14ba0b764d1989742c29d45285c72392925", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co... |
import numpy as np
from typing import List
import json
def binDigits(n, bits):
s = bin(n & int("1" * bits, 2))[2:]
return ("{0:0>%s}" % (bits)).format(s)
def makeAlphas(n: int) -> List[np.array]:
n_res = int(pow(2, n))
zero = np.zeros((1, n), dtype=bool)[0]
res = [zero.copy() for i in range(n_re... | {"hexsha": "a0951273b7cf8d3f5524888af6f42d7097444b77", "size": 2488, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "Tsunaou/Event-Structure-Enumerator", "max_stars_repo_head_hexsha": "6b8df19517d73d6c144a4395aa9bf33e24bcd8cd", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import json
import numpy as np
save_dir = "./Seeds/"
def generate_states():
params_camera = {
"LCX": 324,
"LCY": 243,
"LFX": 2.00e+004,
"LFY": 2.00e+004,
"LK1": 2.341435984559e+000,
"LK2": 2.537860298854e+003,
"LK3": 1.058687686738e+001,
"LTX": 0.000... | {"hexsha": "a2f63003ac518a4e071fc634f4b706408a32e690", "size": 5356, "ext": "py", "lang": "Python", "max_stars_repo_path": "Input.py", "max_stars_repo_name": "GW-Wang-thu/Generator-of-Stereo-Speckle-images-with-displacement-labels", "max_stars_repo_head_hexsha": "6a920827bd7bbba3019c97c02c7382523b790449", "max_stars_re... |
# Copyright (C) Software Competence Center Hagenberg GmbH (SCCH)
# All rights reserved.
# -----------------------------------------------------------------------------
# This document contains proprietary information belonging to SCCH.
# Passing on and copying of this document, use and communication of its
# contents i... | {"hexsha": "9bc4ee3d707aa65d4931574e9a316c6685821e0c", "size": 6390, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/gradcam/GradCAM.py", "max_stars_repo_name": "SCCH-KVS/training-engine", "max_stars_repo_head_hexsha": "dc52b7a06884f967c7c1aabfba39802dd2983162", "max_stars_repo_licenses": ["Apache-2.0"], "... |
[STATEMENT]
lemma degen_simps[iff]: "degen cs (a, k) \<longleftrightarrow> k \<ge> length cs \<or> (cs ! k) a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. degen cs (a, k) = (length cs \<le> k \<or> (cs ! k) a)
[PROOF STEP]
unfolding degen_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (case (a, k) of (a, k... | {"llama_tokens": 195, "file": "Transition_Systems_and_Automata_Basic_Degeneralization", "length": 2} |
# https://oracle.github.io/odpi/doc/user_guide/data_types.html
# https://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#CNCPT012
# https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits001.htm
const SIZEOF_ORA_DATA = sizeof(Oracle.OraData)
@inline function oracle_type(v::AbstractOracleValue{O,N})... | {"hexsha": "5dec8068189e3fadc12b19a99b80958a44be92a6", "size": 13479, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/oracle_value.jl", "max_stars_repo_name": "felipenoris/Oracle.jl", "max_stars_repo_head_hexsha": "c59e7dbe16c78017b72e26570dd009e5c705589c", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
# pyca.simple
# One dimensional Cellular Automata
#
# Author: Benjamin Bengfort <benjamin@bengfort.com>
# Created: Fri Jan 31 10:49:41 2014 -0500
#
# Copyright (C) 2014 Bengfort.com
# For license information, see LICENSE.txt
#
# ID: simple.py [] benjamin@bengfort.com $
"""
Space-Time animation for one dimensional c... | {"hexsha": "9b41166fe5b7688855f2a2ca1646e6aced798937", "size": 2656, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyca/simple.py", "max_stars_repo_name": "bbengfort/cellular-automata", "max_stars_repo_head_hexsha": "c58ab58773796037979da70806b9d19797a64926", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import platform
from ....logger import SLoggingManager
log_manager = SLoggingManager()
logger = log_manager.get_logger('Source1::VTF')
class UnsupportedOS(Exception):
pass
def is_vtflib_supported():
platform_name = platform.system()
if platform_name == "Windows":
return True
elif platform... | {"hexsha": "445831eb1872e32946958b7caffd6b238c0b143d", "size": 2020, "ext": "py", "lang": "Python", "max_stars_repo_path": "library/source1/vtf/__init__.py", "max_stars_repo_name": "anderlli0053/SourceIO", "max_stars_repo_head_hexsha": "3c0c4839939ce698439987ac52154f89ee2f5341", "max_stars_repo_licenses": ["MIT"], "max... |
/*
// Copyright (c) 2021 Intel 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 required by applicable law or... | {"hexsha": "25f4aa3bdd451fab9a257de802e5607610a6440b", "size": 8858, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "main.cpp", "max_stars_repo_name": "Intel-BMC/nvme-mi", "max_stars_repo_head_hexsha": "b6f50e04516962a4e94fe9340251999f154197c4", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "... |
# Copyright 2021 Intel 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 required by applicable law or agreed to in wr... | {"hexsha": "e0009bbe1d88599ddb341584347a358922a10277", "size": 3936, "ext": "py", "lang": "Python", "max_stars_repo_path": "numba_dppy/examples/select_device_for_kernel.py", "max_stars_repo_name": "akharche/numba-dppy", "max_stars_repo_head_hexsha": "f12dac64b149bd72f305f341ff64b796bbb648c1", "max_stars_repo_licenses":... |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
Generates COCO data and annotation structure from MOTChallenge data.
"""
import argparse
import configparser
import csv
import json
import os
import shutil
import numpy as np
import pycocotools.mask as rletools
import skimage.io as io
import to... | {"hexsha": "38429b6673f05c36a20b4757fa8a0549a30e59f9", "size": 15156, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/generate_coco_from_mot.py", "max_stars_repo_name": "amitgalor18/trackformer", "max_stars_repo_head_hexsha": "ee6982c3f27f63feb6aea78fb5c8dfa02284b137", "max_stars_repo_licenses": ["Apache-2.0... |
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import gumbel_r
fig, ax = plt.subplots(figsize=(5, 5))
ax.set(aspect="equal", xlim=(0, 1), ylim=(0, 1))
ax.get_xaxis().set_visible(False)
ax.get_yaxis().set_visible(False)
x = np.linspace(0, 1, 1000)
lower_gumbel = gumbel_r(loc=0.2, scale=0.1)
lg =... | {"hexsha": "19a24d01c8b15afdabbcd31a0af49477b8869a46", "size": 821, "ext": "py", "lang": "Python", "max_stars_repo_path": "logo/make_logo.py", "max_stars_repo_name": "Rodrigo-Tenorio/distromax", "max_stars_repo_head_hexsha": "717985f2315711c75da046fa4dd63000e0a6ce84", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
# coding=utf-8
import warnings
import matplotlib.pyplot as plt
import numpy as np
import tools
from week2.est_entro import est_entro_JVHW
warnings.filterwarnings('ignore')
def f1(x):
if x < 0 or x > 1:
return 0
elif 1 / 4 > x or x >= 3 / 4:
return 0
elif 1 / 4 <= x < 1 / 2:
ret... | {"hexsha": "832e1966f0c62659d21702042973fbc872791d10", "size": 2951, "ext": "py", "lang": "Python", "max_stars_repo_path": "week2/redo_1.py", "max_stars_repo_name": "cyruscyliu/diffentropy", "max_stars_repo_head_hexsha": "58216ce1e24f5d3678ddbe99587a8961737ad4cc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
[STATEMENT]
lemma ttl_tllist_of_llist [simp]: "ttl (tllist_of_llist b xs) = tllist_of_llist b (ltl xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. ttl (tllist_of_llist b xs) = tllist_of_llist b (ltl xs)
[PROOF STEP]
by(cases xs) simp_all | {"llama_tokens": 120, "file": "Coinductive_TLList", "length": 1} |
import tensorflow as tf
import numpy as np
from pylab import *
import random
from collections import deque
from tensorflow.contrib import rnn
# Hyper Parameters:
FRAME_PER_ACTION = 1
#GAMMA = 0.99#0.5 # decay rate of past observations
#OBSERVE = 10. # timesteps to observe before training
#EXPLORE = 20000#20000. # fr... | {"hexsha": "cbfaa5c0080d431f6e18f76fb9be4549f27abf9a", "size": 13485, "ext": "py", "lang": "Python", "max_stars_repo_path": "sandbox/DL_agent.py", "max_stars_repo_name": "Koldh/Simplex", "max_stars_repo_head_hexsha": "f778fce22050d5f0b7024004daa62010132266c7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!------... | {"hexsha": "94cc9ecc613ab1e06897087dc746e31d84ef4f16", "size": 9682, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "init/prp_xcfft.f90", "max_stars_repo_name": "MRedies/FLEUR", "max_stars_repo_head_hexsha": "84234831c55459a7539e78600e764ff4ca2ec4b6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
"""
Recursive Directory Contents
"""
#*****************************************************************************
# Copyright (C) 2014 Volker Braun <vbraun.name@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published... | {"hexsha": "83d1803f9575b7ad22bd045f42bd5369ead99e2c", "size": 10646, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sage_setup/find.py", "max_stars_repo_name": "fchapoton/sage", "max_stars_repo_head_hexsha": "765c5cb3e24dd134708eca97e4c52e0221cd94ba", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_coun... |
import numpy as np
import math
class NaiveBayes():
"""The Gaussian Naive Bayes classifier"""
def _calculate_likelihood(self, mean, var, x):
"""Gaussian likelihood of the data x given mean and var"""
eps = 1e-4
coeff = 1.0 / math.sqrt(2.0 * math.pi * var + eps)
exponent = math.... | {"hexsha": "542db77611d733c5f106f25043eb6ae5e29c22c7", "size": 1764, "ext": "py", "lang": "Python", "max_stars_repo_path": "scratch_ml/supervised_learning/naive_bayes.py", "max_stars_repo_name": "siAyush/scratch_ml", "max_stars_repo_head_hexsha": "b147515d9dda7d31567ad148528dc6f313cd739f", "max_stars_repo_licenses": ["... |
import numpy as np
def pol2cart(rho, phi):
"""
Transform from polar to cart coordinates
:param rho: distance to origin
:param phi: angle (rad)
:return: x, y
"""
x = rho * np.cos(phi)
y = rho * np.sin(phi)
return x, y
def cart2pol(x, y):
"""
Transform from cart to polar co... | {"hexsha": "1616dd24eb2626de14c894c5c87dc2a362819888", "size": 1021, "ext": "py", "lang": "Python", "max_stars_repo_path": "cruw/mapping/coor_transform.py", "max_stars_repo_name": "jb892/cruw-devkit", "max_stars_repo_head_hexsha": "1842108398a19550cbb9763d6fa953f440560150", "max_stars_repo_licenses": ["MIT"], "max_star... |
[STATEMENT]
lemma component_SKIP [iff]: "SKIP \<le> F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<bottom> \<le> F
[PROOF STEP]
apply (unfold component_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<exists>G. \<bottom> \<squnion> G = F
[PROOF STEP]
apply (force intro: Join_SKIP_left)
[PROOF STATE]
pro... | {"llama_tokens": 163, "file": null, "length": 3} |
[STATEMENT]
lemma s_has_vector_derivative[derivative_intros]:
assumes "t \<ge> 0" "v / a \<le> 0" "a \<noteq> 0"
shows "(s has_vector_derivative s' t) (at t within {0..})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (s has_vector_derivative s' t) (at t within {0..})
[PROOF STEP]
using s_has_real_derivative[O... | {"llama_tokens": 252, "file": "Safe_Distance_Safe_Distance", "length": 2} |
import os
import blaze
from blaze.carray import carray
from blaze.carray.ctable import ctable
import numpy as np
STORAGE = 'example1'
#------------------------------------------------------------------------
if not os.path.exists(STORAGE):
print 'Creating tables'
N = 100000
a = carray(np.arange(N, dtype... | {"hexsha": "549069cef46f9149c605ab072002bb10ccae8b9e", "size": 1284, "ext": "py", "lang": "Python", "max_stars_repo_path": "samples/meanexample.py", "max_stars_repo_name": "davidfischer/blaze-core", "max_stars_repo_head_hexsha": "19b55ed469aec742fd871b959115a3d87a89acb9", "max_stars_repo_licenses": ["BSD-2-Clause"], "m... |
#include "OpenClThread.h"
#include "Base/Log.h"
#include <boost/format.hpp>
#include "OpenClTask.h"
namespace Limitless
{
OpenClThread::OpenClThread()
{
}
void OpenClThread::start(cl::Context openCLContext, cl::CommandQueue openCLComandQueue)
{
m_openCLContext=openCLContext;
m_openCLComandQueue=openCLComandQueue;... | {"hexsha": "1be9080f951b09ed19bc9e2ed1b9d2cc3af3bbdb", "size": 1228, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "sdk/Media/OpenClThread.cpp", "max_stars_repo_name": "InfiniteInteractive/LimitlessSDK", "max_stars_repo_head_hexsha": "cb71dde14d8c59cbf8a1ece765989c5787fffefa", "max_stars_repo_licenses": ["MIT"], ... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
The :mod:`~araucaria.utils` module offers the following utility functions:
.. list-table::
:widths: auto
:header-rows: 1
* - Function
- Description
* - :func:`get_version`
- Returns version of araucaria.
* - :func:`check_objattrs`
- Check typ... | {"hexsha": "09c23cb53682aa75c43f8910c36e1ab60ad79885", "size": 14023, "ext": "py", "lang": "Python", "max_stars_repo_path": "araucaria/utils.py", "max_stars_repo_name": "marcoalsina/araucaria", "max_stars_repo_head_hexsha": "78039106ae27d3fdef9265503c33f33992199d8e", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_st... |
SUBROUTINE IM_GI2GM ( imgfil, ignhdr, rnvblk, iret )
C************************************************************************
C* IM_GI2GM *
C* *
C* This subroutine reads the header information from a AWIPS GINI file *
C* and sets the navigation *
C* *
C* IM_GI2GM ( IMGFIL, IGNHDR, RNVBLK... | {"hexsha": "50588b8341501349710d17910175ab82875c1065", "size": 17043, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/gemlib/im/imgi2gm.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause"],... |
from smac.env import MultiAgentEnv
import numpy as np
class SpreadEnv(MultiAgentEnv):
def __init__(self, n_agents, seed=None, state_last_action=False, obs_last_action=False, obs_use_simple_scheme=False):
from multiagent.environment import MultiAgentEnv
import multiagent.scenarios as scenarios
... | {"hexsha": "df6edd5a16a8110d41696e1b837aba193a3b1590", "size": 5117, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/envs/spreadenv.py", "max_stars_repo_name": "footoredo/pymarl", "max_stars_repo_head_hexsha": "9c62dda7a7ed984e020f2cafab93601342305af2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c... |
''' '''
'''
ISC License
Copyright (c) 2016, Autonomous Vehicle Systems Lab, University of Colorado at Boulder
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all c... | {"hexsha": "67e693cdd0a02ba9092c53788f2128a0d2a987a8", "size": 10303, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/fswAlgorithms/attControl/thrMomentumManagement/_UnitTest/test_thrMomentumManagement.py", "max_stars_repo_name": "ian-cooke/basilisk_mag", "max_stars_repo_head_hexsha": "a8b1e37c31c1287549d6fd... |
##################################################
### import ###
##################################################
# basic lib
from ast import literal_eval
import itertools
import json
import numpy as np
import os
import pandas as pd
from pandarallel import pandarallel
pandarallel.... | {"hexsha": "a7c3c84971a95ee89eb9df8b5b00b3fd0065d405", "size": 5419, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tune.py", "max_stars_repo_name": "elmiaon/robust_fragment_representation", "max_stars_repo_head_hexsha": "237a46f860e712bd24ce14a9a5ef4050864ffd28", "max_stars_repo_licenses": ["MIT"], "max_st... |
#include <boost/date_time/strings_from_facet.hpp>
| {"hexsha": "b785c0c06b1a108d5ccc28793f9d37c3885eaa5a", "size": 50, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_date_time_strings_from_facet.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["... |
from gensim.models import word2vec, KeyedVectors
from keras.applications.vgg16 import VGG16, preprocess_input
from keras.preprocessing import image
from keras.models import load_model
from pycocotools.coco import COCO
import argparse
import logging
import os
import pickle
import progressbar
import nltk
import numpy as ... | {"hexsha": "78adb4426bfb93b233694bfc491ee7e090cfab1b", "size": 13146, "ext": "py", "lang": "Python", "max_stars_repo_path": "main/preprocess_customresnet.py", "max_stars_repo_name": "kevjp/CCA-images-text", "max_stars_repo_head_hexsha": "f6d7fa4548f02930b9272c5ea44b390591c40e32", "max_stars_repo_licenses": ["MIT"], "ma... |
# For the sake of the commercialization requirements in the plan, we obfuscated this part of the code.
import Tools #line:1
import numpy as np #line:2
import math #line:3
import random #line:4
SNR =0.0000 #line:5
def perturbationOnOneLocation (O00OOO000O000OOOO ,O00O0O0O0OOOOOO0O ,O00O00OO00O0O000O ,OOOO00O00OO00... | {"hexsha": "c177b24f25316d38a4df2a9628e3ce8311a40f21", "size": 13980, "ext": "py", "lang": "Python", "max_stars_repo_path": "perturbation_tool.py", "max_stars_repo_name": "MeetSiddhartha/spatialPatternLocationPert", "max_stars_repo_head_hexsha": "96d3afbdeb9630ccdb9bddc199d9bcaceaf42b61", "max_stars_repo_licenses": ["A... |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import statsmodels.api as sm
import plotly.graph_objects as go
import os
from pandas.api.types import is_numeric_dtype
import warnings
class Oaxaca:
'''
Example usage:
import ds_modules_101.Models as dsm
import... | {"hexsha": "4ffd2d7609a8d75142075d2ea339fcbc1c7ede49", "size": 30048, "ext": "py", "lang": "Python", "max_stars_repo_path": "ds_modules_101/Models/oaxaca.py", "max_stars_repo_name": "TanselArif-21/ds_modules_101", "max_stars_repo_head_hexsha": "047516e8aa2086e7c0628e23785f9f3ba14b271c", "max_stars_repo_licenses": ["MIT... |
abstract type AbstractProblemParSetter end
struct DummyProblemParSetter <: AbstractProblemParSetter; end # for testing error message
"""
count_state(::AbstractProblemParSetter)
count_par(::AbstractProblemParSetter)
count_paropt(::AbstractProblemParSetter)
Report the number of problem states, problem p... | {"hexsha": "f0951ed37f9d3079f2031eea2403f606d2dffebf", "size": 6694, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/abstractproblemparsetter.jl", "max_stars_repo_name": "bgctw/MTKHelpers.jl", "max_stars_repo_head_hexsha": "33e0a53e268773258f94e5448940e399e475191e", "max_stars_repo_licenses": ["MIT"], "max_st... |
"""Top-level conftest.py for global pytest fixtures.
.. codeauthor:: Derek Huang <djh458@stern.nyu.edu>
"""
import numpy as np
import pytest
@pytest.fixture(scope="session")
def default_seed():
"""Default numpy.random.Generator seed.
Returns
-------
int
"""
return 7
@pytest.fixture
def de... | {"hexsha": "44f6b1a67907e5ce04a151367cd04d63b8328589", "size": 2528, "ext": "py", "lang": "Python", "max_stars_repo_path": "npapibench/conftest.py", "max_stars_repo_name": "phetdam/numpy-api-bench", "max_stars_repo_head_hexsha": "f80b104c464111a5678d7a657128cbff0497830c", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import datetime
import base64
import json
import os
import io
import requests
import PIL
from PIL import ImageTk
from PIL import ImageGrab
import numpy as np
import cv2
import pyautogui
from tkinter import *
from threading import Thread
from google.cloud import vision
project_id = os.environ["GOOGLE_APPLICATION_CR... | {"hexsha": "4ecfaae08a955fe65eaf5e90d4285666150cbd3f", "size": 6997, "ext": "py", "lang": "Python", "max_stars_repo_path": "WeebX.py", "max_stars_repo_name": "Venator43/WeebX", "max_stars_repo_head_hexsha": "497381851f6ef8449dcc7977d1d36abfc261c342", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_sta... |
#include <trajopt_osgviewer/robot_ui.hpp>
using namespace osg;
using namespace std;
namespace OR = OpenRAVE;
#include <boost/foreach.hpp>
#include <trajopt_utils/stl_to_string.hpp>
using namespace util;
namespace {
template <class T>
osg::Vec3 toOsgVec3(const OR::RaveVector<T>& v) {
return Vec3(v.x, v.y, v.z);
}
tem... | {"hexsha": "433a84e28f0af8b67866596b15df04ef5278d3d5", "size": 4166, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "trajopt_osgviewer/src/robot_ui.cpp", "max_stars_repo_name": "Levi-Armstrong/trajopt_ros", "max_stars_repo_head_hexsha": "a90cd90478d4048af501ad503360d8dfd7460f20", "max_stars_repo_licenses": ["BSD-2... |
mutable struct Arf <: Real
arf::arf_struct
prec::Int
function Arf(;prec::Integer=DEFAULT_PRECISION[])
res = new(arf_struct(0,0,0,0), prec)
init!(res)
finalizer(clear!, res)
return res
end
function Arf(si::Int64; prec::Integer=DEFAULT_PRECISION[])
res = new(a... | {"hexsha": "c413bbeb4f0a77a4108fe062dce82f83045cd6b0", "size": 2245, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/types.jl", "max_stars_repo_name": "Joel-Dahne/Arblib.jl", "max_stars_repo_head_hexsha": "b7a0997895f060297a522edc9b6b0de5b27fcfdd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
//
// Copyright 2013 Christopher Dudley
//
// 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 ... | {"hexsha": "f2a86f01608288dbae8f396ad1c2afbc8a5cff31", "size": 2518, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/LemonTranslator/source/LT_GI.cc", "max_stars_repo_name": "nishantmehta/mainGrokit", "max_stars_repo_head_hexsha": "eda13cd32d523bfc2af660c34c93a38eceaccc4a", "max_stars_repo_licenses": ["Apache-2... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import warnings
import textwrap
import numpy as np
import scipy
from .interruptible_pool import disable_openblas_threading as ip_disable_threading
def bad_blas_msg(pkg_name):
"""A warning message to give the user"""
return textwrap.dedent(
"""
{}... | {"hexsha": "00664dcf03e520fe7ccb42e8e7f97660cc8a5278", "size": 2106, "ext": "py", "lang": "Python", "max_stars_repo_path": "kombine/utils.py", "max_stars_repo_name": "BenSandeen/kombine", "max_stars_repo_head_hexsha": "78feb2f100a319cc9ec1febdbe55079f99393d17", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
# Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | {"hexsha": "98545513558e137210edf4080e1f5f0852c2c2a9", "size": 1543, "ext": "py", "lang": "Python", "max_stars_repo_path": "official/cv/Deepsort/process-npy.py", "max_stars_repo_name": "mindspore-ai/models", "max_stars_repo_head_hexsha": "9127b128e2961fd698977e918861dadfad00a44c", "max_stars_repo_licenses": ["Apache-2.... |
#!/usr/bin/env python3
import argparse
import logging
import os
import numpy as np
import torch
import yaml
from omsignal.constants import (GRAPH_DIR, ID_MAPPING, MODEL_DIR, PARAM_DIR,
TRAIN_LABELED_FILE, VALIDATION_LABELED_FILE)
from omsignal.experiments.cnn_experiment import (MultiTa... | {"hexsha": "c43d4e6f5e2a6a38687cca64268d24b27ab81be5", "size": 10205, "ext": "py", "lang": "Python", "max_stars_repo_path": "omsignal/train.py", "max_stars_repo_name": "eeishaan/ift6759-block1", "max_stars_repo_head_hexsha": "59a7ff61c02b7ae5148a05b41e3aff3542e3c746", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
using BinaryBuilder
# Collection of sources required to build FastTransforms
name = "FastTransforms"
version = v"0.3.3"
sources = [
ArchiveSource("https://github.com/MikaelSlevinsky/FastTransforms/archive/v$(version).tar.gz",
"4566fd59d29f4bff4d68814334d8bc603056932d462e40bb22acaacbf353763a"),
]
... | {"hexsha": "7206a6b436e31ca5c2ba290c50799604c618cdbf", "size": 1920, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "F/FastTransforms/build_tarballs.jl", "max_stars_repo_name": "mortenpi/Yggdrasil", "max_stars_repo_head_hexsha": "dfde83cadb8f2b614c77e0a8a3bef38592fbbf56", "max_stars_repo_licenses": ["MIT"], "max_... |
[STATEMENT]
theorem permutation_ghc_sort:
"mset (ghc_sort xs) = mset xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. mset (ghc_sort xs) = mset xs
[PROOF STEP]
unfolding ghc_sort_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. mset (merge_list [] (map (\<lambda>ys. if decr ys then rev ys else ys) (cuts xs)... | {"llama_tokens": 931, "file": "VerifyThis2019_Challenge1B", "length": 11} |
from networkx import DiGraph, shortest_path
from vrpy.clarke_wright import _ClarkeWright, _RoundTrip
from vrpy.greedy import _Greedy
class TestsInitialSolution:
"""
Initial solution can be computed with:
- a round trip;
- Clarke & Wright;
- Greedy.
"""
def setup(self):
... | {"hexsha": "89743a39a72c5a60f6b0c3bd17289b3f0d3cf63e", "size": 3274, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_initial_solution.py", "max_stars_repo_name": "samuelefiorini/vrpy", "max_stars_repo_head_hexsha": "ad3232b9e9ee9276c9c799d16b4a4a8c2b41eef1", "max_stars_repo_licenses": ["MIT"], "max_st... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------------------
# QSVEnc by rigaya
# -----------------------------------------------------------------------------------------
# The MIT License
#
# Copyright (c) 2011-2016 rigaya
#
... | {"hexsha": "f600d0760d7d28168c839edddee72b8ba93bfe23", "size": 12744, "ext": "pyw", "lang": "Python", "max_stars_repo_path": "PerfMonitor/perf_monitor.pyw", "max_stars_repo_name": "hydra3333/NVEnc", "max_stars_repo_head_hexsha": "6be123673fce190aa03af272a122062e252922cd", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import os
from scipy.stats import chisquare
import sys
import unittest
from ospacial.occupancy import Occupancy
class TestOccupancy(unittest.TestCase):
def setUp(self):
self.back_row = set(range(10))
self.all_desks = set(range(100))
self.occ_rnd_min = Occupancy(self.back_row, self.all_de... | {"hexsha": "ddcec4222f589942142d6f14425ab7b219126b75", "size": 3326, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/testoccupancy.py", "max_stars_repo_name": "safetydave/open-spacial-may", "max_stars_repo_head_hexsha": "4df0e66e3d9621f780a0c7ab5d594a7ce1005a17", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import pytest
from numpy import array
from datagears.core.network import Network
from datagears.core.nodes import GearNode
from tests.fixtures import Fixture
def test_network_construction(myfeature: Fixture[Network]) -> None:
"""Test network construction."""
network: Network = myfeature
graph = network.... | {"hexsha": "7be6acdf78a8dd760cecf63c66afc640eae9f03a", "size": 3403, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/core/test_network.py", "max_stars_repo_name": "jsam/datagears", "max_stars_repo_head_hexsha": "d2400f20069898a959fbe182931faba1c90b7181", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st... |
Require Import Lia.
Require Import Bool.
Require Import RelationClasses.
Require Import Program.
From sflib Require Import sflib.
From Paco Require Import paco.
From PromisingLib Require Import Axioms.
From PromisingLib Require Import Basic.
From PromisingLib Require Import DataStructure.
From PromisingLib Require Im... | {"author": "snu-sf", "repo": "promising-ir-coq", "sha": "593c32a2a48b7928b67580af366e0a75c8c70bf7", "save_path": "github-repos/coq/snu-sf-promising-ir-coq", "path": "github-repos/coq/snu-sf-promising-ir-coq/promising-ir-coq-593c32a2a48b7928b67580af366e0a75c8c70bf7/src/ldrfra/LocalDRFRA.v"} |
#!/usr/bin/env python3
from argparse import ArgumentParser
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import to_hex
def main(args):
cmap = plt.get_cmap(args.cmap)
for x in np.linspace(0, 1, num=args.n_colors):
print(to_hex(cmap(x), keep_alpha=False))
if __name__ == '... | {"hexsha": "67e1b75682eb1edde56cca1d8edfed9c65b43e62", "size": 719, "ext": "py", "lang": "Python", "max_stars_repo_path": "sample_cmap.py", "max_stars_repo_name": "mattdutson/cs-770-project", "max_stars_repo_head_hexsha": "26e9db5b8314b17a749d5713f61da485c8c5f597", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
import _thread
import base64
import csv
import hashlib
import json
import os
import secrets
import socket
import string
import time
from datetime import datetime
import mysql.connector
import numpy as np
from Crypto import Random
from Crypto.Cipher import AES
from Crypto.Util import Counter
from cryptography.hazmat.ba... | {"hexsha": "28408108d3e5ed4b4a1dbd386c502f381b98d977", "size": 37541, "ext": "py", "lang": "Python", "max_stars_repo_path": "Server.py", "max_stars_repo_name": "BitterOcean/SecureBankingSystem", "max_stars_repo_head_hexsha": "cbd31c95e5b21d8c720bab1730f67b785c20565e", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import os
import numpy as np
from tqdm import tqdm
import matplotlib.pyplot as plt
import cv2
import json
import pdb
import argparse
from OPTIMAS.utils.files_handling import read_image_size
"""
how to use:
python merging_experiments.py \
--main_folder_path /media/jeremy/Data/local/Data_manip/2020_02_05/ \
--experimen... | {"hexsha": "2fabb166324b7e4a59457d4050cc9743280f3eeb", "size": 10720, "ext": "py", "lang": "Python", "max_stars_repo_path": "OPTIMAS/merging_experiments.py", "max_stars_repo_name": "jeremyforest/whole_optic_analysis_pipeline", "max_stars_repo_head_hexsha": "fdacc7965a05489bba8fcb3fc6c2a27c9fae9996", "max_stars_repo_lic... |
""" Usage:
<file-name> --in=INPUT_FILE --brat=BRAT_LOCATION --out=OUTPUT_FOLDER [--debug]
Get dot files for each graph in a given input file.
"""
# External imports
import logging
import pdb
import os
from pprint import pprint
from pprint import pformat
from docopt import docopt
from networkx.drawing.nx_agraph im... | {"hexsha": "a11713ed6669ad382b911bcff41d891146a80185", "size": 2466, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/visualize_sdp.py", "max_stars_repo_name": "gabrielStanovsky/brat-visualizer", "max_stars_repo_head_hexsha": "b741ea894795f56c46238ec5509d8783f6291a73", "max_stars_repo_licenses": ["MIT"], "max... |
from lxml import etree
import requests
import time
import jieba
import numpy as np
from PIL import Image
from wordcloud import WordCloud as wc
class Bilibili():
"""docstring for Bilibili"""
def __init__(self,oid):
self.headers={
'Host': 'api.bilibili.com',
'Connection': 'keep-alive',
'Cache-Control': 'max-age... | {"hexsha": "c3e0dfb4121c300171412eafa6ec409996ba3438", "size": 2768, "ext": "py", "lang": "Python", "max_stars_repo_path": "bilibili.py", "max_stars_repo_name": "ygo-prometheus/bilibili_danmaku_sensor", "max_stars_repo_head_hexsha": "7b732a3f581023c17e942f40f1181075736dbf68", "max_stars_repo_licenses": ["MIT"], "max_st... |
# nums = [[parse(Int64, l) for l in line] for line in readlines("inputs/04.txt")]
lines = readlines("inputs/04.txt")
nums = lines[1]
nums = [parse(Int64, x ) for x in split(nums, ',')]
lines = lines[2:end]
grids = []
for i in 2:6:length(lines)-4
println(lines[i:i+5])
grid = zeros(Int64, 5,5)
gridstrs = lines[i... | {"hexsha": "ac2f7fadfb3322f3adc9b18d7ef8c8eb0bc0a01c", "size": 1119, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/days1-5/day4_part1.jl", "max_stars_repo_name": "sawyerWeld/AdventofCode2021", "max_stars_repo_head_hexsha": "748beef1bfd4c1b3c780841ae645022f873ea274", "max_stars_repo_licenses": ["MIT"], "max_... |
#!/usr/bin/env python
# coding: utf-8
from facenet_pytorch import MTCNN, InceptionResnetV1
import torch
from torch.utils.data import DataLoader
from torchvision import datasets
import numpy as np
import pandas as pd
import os
import random
workers = 0 if os.name == 'nt' else 4
device = torch.device('cuda:0' if torch... | {"hexsha": "c7a9a306e09e26e897e542a2afae634c73b671b8", "size": 2370, "ext": "py", "lang": "Python", "max_stars_repo_path": "CV_P4/inferTmp.py", "max_stars_repo_name": "AravindChandradoss/facenet-pytorch", "max_stars_repo_head_hexsha": "b3ae8fc8b394d31f5d9ee4f6ccf23e1f460f5a05", "max_stars_repo_licenses": ["MIT"], "max_... |
import numpy as np
import numpy.linalg as LA
import matplotlib.pyplot as plt
import pandas as pd
from scipy.special import erfinv
colo = [
"red",
"orange",
"g",
"b",
"pink",
"y",
"c",
"m",
"purple",
"yellowgreen",
"silver",
"coral",
"plum",
"lime",
"hotpink",... | {"hexsha": "c62200fe353ce6d3849b5e5785b0196093b6fb03", "size": 12048, "ext": "py", "lang": "Python", "max_stars_repo_path": "classo/misc_functions.py", "max_stars_repo_name": "wendazhou/c-lasso", "max_stars_repo_head_hexsha": "62cf2f1136a0f233f943c8788a93ddbc1b830f58", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
"""The QFI interface.
Avoids using the plain name QFI since that exists in Qiskit and I want to avoid conflicts.
"""
from abc import ABC, abstractmethod
import qiskit
import numpy as np
class QFICalculator(ABC):
"""The QFI interface."""
def __init__(self, do_checks: bool = True):
"""
Args:
... | {"hexsha": "ea099a0d6b7a8425d3ef54cba2a5f0644402afae", "size": 2876, "ext": "py", "lang": "Python", "max_stars_repo_path": "surfer/qfi/qfi.py", "max_stars_repo_name": "Cryoris/surfer", "max_stars_repo_head_hexsha": "2f8faef420b769ee92abe1562381402d2d6e34ad", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":... |
import numpy as np
import traj.discrete_time_parameterization
def simple_is_valid(position, velocity, acceleration, jerk):
"""
Checks values against constant bounds.
"""
p_end = 10.0
v_max = 10.0
a_max = 10.0
j_max = 10.0
if position < 0.0 or position > p_end + traj.discrete_time_param... | {"hexsha": "ca2342578fceca35dc274364a70b5c4f4a448365", "size": 901, "ext": "py", "lang": "Python", "max_stars_repo_path": "traj/test/test_discrete_parameterization.py", "max_stars_repo_name": "jonbinney/trajectory_smoothing", "max_stars_repo_head_hexsha": "0e2b8d7d646c96c0c22eef1371bcd42d169121dc", "max_stars_repo_lice... |
# -*- coding: utf-8 -*-
import click
import logging
import numpy as np
import pandas as pd
from os import path
from pathlib import Path
from dotenv import find_dotenv, load_dotenv
import optuna
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
from joblib import load
from lightgbm import LGBMClassifier
... | {"hexsha": "0c17e91749fa5fa8a628d43def5ae0f170a50c89", "size": 5025, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/predict_model.py", "max_stars_repo_name": "uncanny-valley/diabetes-readmission", "max_stars_repo_head_hexsha": "61057402da3bcb26f7d5395c667f3ee175f4eb2b", "max_stars_repo_licenses": ["M... |
import numpy as np
from model import SVMClassifier
# load data
x_train = np.load('./data/s-svm/train_data.npy')
y_train = np.load('./data/s-svm/train_target.npy')
x_test = np.load('./data/s-svm/test_data.npy')
y_test = np.load('./data/s-svm/test_target.npy')
# create an svm model and fit it
svm = SVMClassifier(learni... | {"hexsha": "e891e5e52a23440f0d3f048289f448c10d732c76", "size": 810, "ext": "py", "lang": "Python", "max_stars_repo_path": "Lab2-Support_Vector_Machine/src/main.py", "max_stars_repo_name": "v-liuwei/USTC2020-", "max_stars_repo_head_hexsha": "0ec4cf48cbd42a3cd71f8ed7c27201beaee19a8e", "max_stars_repo_licenses": ["MIT"], ... |
# coding=utf-8
# Copyright 2021 The RecSim Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | {"hexsha": "296ca5a65eb60efd349cbc175d8f147cc3169362", "size": 4684, "ext": "py", "lang": "Python", "max_stars_repo_path": "recsim_ng/applications/recsys_partially_observable_rl/corpus.py", "max_stars_repo_name": "google-research/recsim_ng", "max_stars_repo_head_hexsha": "591b9d31adb8e0a1f6a233037378102cc9169f4e", "max... |
# A map from `hash(f)` to `f`.
# This is used to lookup the function when we get a request from the frontend.
registered_rpcs = Dict{UInt, Function}()
function tojs(f::Function)
h = hash(f)
registered_rpcs[h] = f
return js"WebIO.getRPC($(string(h)))"
end
"""
handle_rpc_request(request)
WebIO-internal... | {"hexsha": "c6b6c86c78d064e90702e0267e06e05062e4f173", "size": 1312, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/rpc.jl", "max_stars_repo_name": "UnofficialJuliaMirror/WebIO.jl-0f1e0344-ec1d-5b48-a673-e5cf874b6c29", "max_stars_repo_head_hexsha": "289ac08b2d64e0f4dd3d6fc33beabf63c3ce43a5", "max_stars_repo_... |
# randomforest over the digits dataset, the toy data that we used for many examples earlier in this book.
# the randomforest algorithm below frequently achieves an accuracy score of 1.
import numpy as np
from sklearn.ensemble import RandomForestClassifier
from sklearn.datasets import load_digits
from sklearn.preproce... | {"hexsha": "82f4243c5413caed8c698e95d60d971f868ffd53", "size": 610, "ext": "py", "lang": "Python", "max_stars_repo_path": "Module 2/Chapter 8/ch8_randomforest.py", "max_stars_repo_name": "saicharanabhishek/machinelearning_examples", "max_stars_repo_head_hexsha": "f89857ae7e1a2baa76951fe1d55541832d0f0d20", "max_stars_re... |
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
'''
Entity Disembiguation task
'''
from __future__ import absolute_import, division, unicode_literals
import codecs
import os
... | {"hexsha": "e8c9526702e5681c9be9820fdf33a1ebeca2d23c", "size": 41497, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/EntEval/enteval/ed.py", "max_stars_repo_name": "diegoolano/biomedical_interpretable_entity_representations", "max_stars_repo_head_hexsha": "3c35f02ee8dd7ee0f2a23b0014e4b112beab6461", ... |
# ---
# title: 141. Linked List Cycle
# id: problem141
# author: zhwang
# date: 2022-02-15
# difficulty: Easy
# categories: Linked List, Two Pointers
# link: <https://leetcode.com/problems/linked-list-cycle/description/>
# hidden: true
# ---
#
# Given `head`, the head of a linked list, determine if the linked list has... | {"hexsha": "7e82d64656123ae4df37e5683500be02ec030458", "size": 2178, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/problems/141.linked-list-cycle.jl", "max_stars_repo_name": "RexWzh/LeetCode.jl", "max_stars_repo_head_hexsha": "d86109b9d5a15491304ff9d2ee66e506f60d2146", "max_stars_repo_licenses": ["MIT"], "m... |
SUBROUTINE UNPKSECDIF(KFILDO,A,ND2X3,JMIN,LBIT,NOV,LX,NX,NY,
1 IPACK,ND5,IFIRST,ISECOND,ISECMIN,REF,
2 LOCN,IPOS,MAXGPREF,IMISSING,XMISSP,XMISSS,
3 ISCAL,SCAL10,SCAL2,L3264B,IER)
C
C MAY 1999 GLAHN TDL GRIB2
C J... | {"hexsha": "55988d6adb8717436042999beebca99ec4e013c6", "size": 12121, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "extlibs/NDFD/mdlg2dec/unpksecdif.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
"""
Copyright (c) 2018 Intel 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 required by applicable law or agreed to in writin... | {"hexsha": "c536d5e41f76c4de2dedbbd7f7d0db8b0dc85a7f", "size": 4809, "ext": "py", "lang": "Python", "max_stars_repo_path": "caffe/python/caffe/custom_layers/plain_center_loss_layer.py", "max_stars_repo_name": "gvvynplaine/training_toolbox_caffe", "max_stars_repo_head_hexsha": "789ff8ddf6031802e51e45f6ad80c549079dc9df",... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.