hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1a2fa2c8737687b828f51c7e64396aca36a6f1fc | 5,492 | py | Python | st2common/st2common/content/aliasesregistrar.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2020-11-21T10:11:25.000Z | 2020-11-21T10:11:25.000Z | st2common/st2common/content/aliasesregistrar.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2015-06-08T15:27:11.000Z | 2015-06-08T15:27:11.000Z | st2common/st2common/content/aliasesregistrar.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 13 | 2017-01-12T11:07:20.000Z | 2019-04-19T09:55:49.000Z | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 36.131579 | 93 | 0.659141 |
1a2fdb0ecb858371470a0abd13011cb82b8f8dc1 | 3,205 | py | Python | build/test_update_ext_version.py | allgame24/vscode-python | 83299e25765b139e0de19a5e779790f63de37a85 | [
"MIT"
] | 1,476 | 2017-11-02T07:09:30.000Z | 2019-05-06T18:22:51.000Z | build/test_update_ext_version.py | allgame24/vscode-python | 83299e25765b139e0de19a5e779790f63de37a85 | [
"MIT"
] | 4,943 | 2017-10-31T23:06:26.000Z | 2019-05-06T20:50:29.000Z | build/test_update_ext_version.py | allgame24/vscode-python | 83299e25765b139e0de19a5e779790f63de37a85 | [
"MIT"
] | 328 | 2017-11-01T18:44:43.000Z | 2019-05-06T08:31:06.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import json
import freezegun
import pytest
import update_ext_version
TEST_DATETIME = "2022-03-14 01:23:45"
# The build ID is calculated via:
# "1" + datetime.datetime.strptime(TEST_DATETIME,"%Y-%m-%d %H:%M:%S").strftim... | 30.52381 | 92 | 0.483307 |
1a2fe9c92a6d945dfd2ba4172ed35e87e3b9f918 | 3,495 | py | Python | alipay/aop/api/domain/TradeFundBillDetail.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/TradeFundBillDetail.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/TradeFundBillDetail.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class TradeFundBillDetail(object):
def __init__(self):
self._amount = None
self._asset_type_code = None
self._asset_user_id = None
self._biz_pay_type = None
self... | 30.12931 | 81 | 0.598856 |
1a301f14b2a1db234d1df5d719a51461f77c8d12 | 155,839 | py | Python | pymel/core/datatypes.py | chadrik/pymel | 84423dbb756000472d2bfc13d7ce16c1586e2a41 | [
"BSD-3-Clause"
] | 1 | 2020-03-03T10:57:03.000Z | 2020-03-03T10:57:03.000Z | pymel/core/datatypes.py | chadrik/pymel | 84423dbb756000472d2bfc13d7ce16c1586e2a41 | [
"BSD-3-Clause"
] | null | null | null | pymel/core/datatypes.py | chadrik/pymel | 84423dbb756000472d2bfc13d7ce16c1586e2a41 | [
"BSD-3-Clause"
] | null | null | null | """Data classes that are returned by functions within ``pymel.core``
A wrap of Maya's Vector, Point, Color, Matrix, TransformationMatrix, Quaternion, EulerRotation types
"""
import sys
import math
import copy
import operator
import colorsys
import pymel.util as util
import pymel.api as _api
from pymel.util.arrays im... | 35.808594 | 221 | 0.568831 |
1a30344239c042a1e6ef36359372f2b2b353fca3 | 1,581 | py | Python | splitter/dataflow/agg.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | splitter/dataflow/agg.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | splitter/dataflow/agg.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | """This file is part of Splitter which is released under MIT License.
agg.py defines aggregation functions
"""
from splitter.dataflow.validation import check_metrics_and_filters, countable
from splitter.struct import IteratorVideoStream
from splitter.dataflow.xform import Null
import logging
import time
import itert... | 24.323077 | 78 | 0.693865 |
1a3038fb7ec02caeb8de6f54fa19c0c5fe51e69c | 2,473 | py | Python | deepchem/utils/test/test_fragment_util.py | akihironitta/deepchem | ffad1a75997bb79360751b2a5fcf3b3405f3c44e | [
"MIT"
] | null | null | null | deepchem/utils/test/test_fragment_util.py | akihironitta/deepchem | ffad1a75997bb79360751b2a5fcf3b3405f3c44e | [
"MIT"
] | null | null | null | deepchem/utils/test/test_fragment_util.py | akihironitta/deepchem | ffad1a75997bb79360751b2a5fcf3b3405f3c44e | [
"MIT"
] | null | null | null | import os
import unittest
import numpy as np
from deepchem.utils import rdkit_util
from deepchem.utils.fragment_util import get_contact_atom_indices
from deepchem.utils.fragment_util import merge_molecular_fragments
from deepchem.utils.fragment_util import get_partial_charge
from deepchem.utils.fragment_util import str... | 39.253968 | 78 | 0.746866 |
1a30423226ce9ab558f07c0ade68374e66048de9 | 1,798 | py | Python | experiments/2014-01-16-GPSS-full.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 151 | 2015-01-09T19:25:05.000Z | 2022-01-05T02:05:52.000Z | experiments/2014-01-16-GPSS-full.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 1 | 2016-08-04T13:12:51.000Z | 2016-08-04T13:12:51.000Z | experiments/2014-01-16-GPSS-full.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 59 | 2015-02-04T19:13:58.000Z | 2021-07-28T23:36:09.000Z | Experiment(description='Trying latest code on classic data sets',
data_dir='../data/tsdlr-renamed/',
max_depth=10,
random_order=False,
k=1,
debug=False,
local_computation=False,
n_rand=9,
sd=2,
jitter_sd=0.1,
... | 44.95 | 98 | 0.408231 |
1a305d3908c23751a396191f4d9795628afa0074 | 8,719 | py | Python | src/sage/combinat/root_system/type_G.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 1 | 2016-11-04T16:31:48.000Z | 2016-11-04T16:31:48.000Z | src/sage/combinat/root_system/type_G.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/root_system/type_G.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | """
Root system data for type G
"""
#*****************************************************************************
# Copyright (C) 2008-2009 Daniel Bump
# Copyright (C) 2008-2009 Justin Walker
# Copyright (C) 2008-2013 Nicolas M. Thiery <nthiery at users.sf.net>
#
# Distributed under the terms of the... | 30.809187 | 124 | 0.509347 |
1a306966b719ef85a751c4fa1585f2a559fe9a4c | 222 | py | Python | pmaf/remote/__init__.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | 1 | 2021-07-02T06:24:17.000Z | 2021-07-02T06:24:17.000Z | pmaf/remote/__init__.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T12:02:46.000Z | 2021-06-28T12:02:46.000Z | pmaf/remote/__init__.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | null | null | null | r"""
Remote (pmaf.remote)
====================
Exploit remote databases
------------------------
Classes
-------
.. autosummary::
:toctree: generated/
Entrez
"""
from ._entrez import Entrez
__all__ = ['Entrez'] | 11.684211 | 27 | 0.518018 |
1a309735db48975894985b294fbedb43dcf9005c | 42,050 | py | Python | CNNBTN.py | StudentsZhouPengfei/Automatically-Differentiable-Quantum-Circuit-for-Many-qubit-State-Preparation | 42d3a77380e78819375c9fb2c5600ddc89a3ae3f | [
"MIT"
] | 3 | 2021-05-10T01:49:59.000Z | 2021-06-13T19:03:40.000Z | CNNBTN.py | StudentsZhouPengfei/Automatically-Differentiable-Quantum-Circuit-for-Many-qubit-State-Preparation | 42d3a77380e78819375c9fb2c5600ddc89a3ae3f | [
"MIT"
] | null | null | null | CNNBTN.py | StudentsZhouPengfei/Automatically-Differentiable-Quantum-Circuit-for-Many-qubit-State-Preparation | 42d3a77380e78819375c9fb2c5600ddc89a3ae3f | [
"MIT"
] | null | null | null | from torch import nn
import torch as tc
import numpy as np
import BasicFun as bf
import time
import os
import sys
from termcolor import cprint
import matplotlib
from matplotlib.pyplot import plot, savefig, figure
from TensorNetworkExpasion import TTN_basic, Vectorization, TTN_Pool_2by2to1, \
num_correct,... | 38.192552 | 95 | 0.523187 |
1a309786af1c9973f12338e6c2279a5915624c25 | 2,042 | py | Python | meta/tests/test_bump_changelog.py | connectthefuture/calc | 7f0dc01d9265f26a36c2b9b5ee779fe876e4a494 | [
"CC0-1.0"
] | null | null | null | meta/tests/test_bump_changelog.py | connectthefuture/calc | 7f0dc01d9265f26a36c2b9b5ee779fe876e4a494 | [
"CC0-1.0"
] | 1 | 2021-06-10T23:13:04.000Z | 2021-06-10T23:13:04.000Z | meta/tests/test_bump_changelog.py | connectthefuture/calc | 7f0dc01d9265f26a36c2b9b5ee779fe876e4a494 | [
"CC0-1.0"
] | null | null | null | from unittest import TestCase
from unittest.mock import patch
from pathlib import Path
from click.testing import CliRunner
from ..management.commands import bump_changelog
from hourglass import changelog
from hourglass.tests.test_changelog import UtilTests
def patch_new_version(version):
return patch.object(bump... | 35.824561 | 76 | 0.696866 |
1a30aae45d6903fb960b0b90fff41853abdd4ca8 | 2,239 | py | Python | tests/workers/test_eval_cipher_suites_ssl2.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | tests/workers/test_eval_cipher_suites_ssl2.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | tests/workers/test_eval_cipher_suites_ssl2.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Implements a class to be used for unit testing.
"""
import pathlib
from tlsmate.workers.eval_cipher_suites import ScanCipherSuites
from tlsmate.tlssuite import TlsSuiteTester
from tlsmate.tlssuite import TlsLibrary
ssl2_ck = [
"SSL_CK_RC4_128_WITH_MD5",
"SSL_CK_RC2_128_CBC_WITH_MD5",... | 30.671233 | 76 | 0.640018 |
1a30af099f6af14d0f31314f2c44af89af1e7b18 | 11,825 | py | Python | dopamine/utils/load_and_play_trained_agents.py | h8go/eye_tracking_rl | df84ab585b714ba7ca9cdaf634b066020f9feaf4 | [
"Apache-2.0"
] | null | null | null | dopamine/utils/load_and_play_trained_agents.py | h8go/eye_tracking_rl | df84ab585b714ba7ca9cdaf634b066020f9feaf4 | [
"Apache-2.0"
] | null | null | null | dopamine/utils/load_and_play_trained_agents.py | h8go/eye_tracking_rl | df84ab585b714ba7ca9cdaf634b066020f9feaf4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Dopamine 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... | 40.221088 | 108 | 0.676025 |
1a30ea2e7047e2719bac3d3d2a071f5de7e58fc5 | 61,523 | py | Python | Skimage_numpy/source/scipy/interpolate/fitpack2.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 5 | 2017-03-21T13:04:12.000Z | 2021-07-28T12:38:02.000Z | PokerBots_2017/Johnny/scipy/interpolate/fitpack2.py | surgebiswas/poker | 019112147a3e6c208c3846ef699fb6ec24a45c30 | [
"MIT"
] | null | null | null | PokerBots_2017/Johnny/scipy/interpolate/fitpack2.py | surgebiswas/poker | 019112147a3e6c208c3846ef699fb6ec24a45c30 | [
"MIT"
] | 1 | 2020-08-12T05:31:18.000Z | 2020-08-12T05:31:18.000Z | """
fitpack --- curve and surface fitting with splines
fitpack is based on a collection of Fortran routines DIERCKX
by P. Dierckx (see http://www.netlib.org/dierckx/) transformed
to double routines by Pearu Peterson.
"""
# Created by Pearu Peterson, June,August 2003
from __future__ import division, print_function, abs... | 36.147474 | 84 | 0.571932 |
1a310ab0a721ed99d6df375ddfdf50875f5fd8f6 | 109 | py | Python | toontown/betaevent/CogTV.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | null | null | null | toontown/betaevent/CogTV.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | null | null | null | toontown/betaevent/CogTV.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 1 | 2020-02-27T00:44:42.000Z | 2020-02-27T00:44:42.000Z | class CogTV:
def __init__(self):
pass
def setScreen(self, scene):
pass
| 13.625 | 31 | 0.495413 |
1a3140d183ab009c8d4d030d35870b9d71da2093 | 10,470 | py | Python | monitor/scripts.py | johncclayton/monitor-fw-13 | 0b9138d89391c59383b26adb65ad6af20f53868c | [
"MIT"
] | null | null | null | monitor/scripts.py | johncclayton/monitor-fw-13 | 0b9138d89391c59383b26adb65ad6af20f53868c | [
"MIT"
] | null | null | null | monitor/scripts.py | johncclayton/monitor-fw-13 | 0b9138d89391c59383b26adb65ad6af20f53868c | [
"MIT"
] | null | null | null |
import os
import click
import shutil
import subprocess
import pkg_resources
import sys
import errno
import traceback
from monitor.logs import init_logging, logger
class ValidationExceptionBinaryNotFound(Exception):
pass
class NotRunningRoot(Exception):
pass
@click.group()
def cli():
click.echo("FileW... | 44.935622 | 164 | 0.603916 |
1a3147e48ad4eeca45f01c46703c327d79896717 | 17,273 | py | Python | run_sh/sources/demo.py | denglixi/faster-rcnn.pytorch | 12158fa2ec998ba3733a4696b7a4e08a35c157e3 | [
"MIT"
] | null | null | null | run_sh/sources/demo.py | denglixi/faster-rcnn.pytorch | 12158fa2ec998ba3733a4696b7a4e08a35c157e3 | [
"MIT"
] | null | null | null | run_sh/sources/demo.py | denglixi/faster-rcnn.pytorch | 12158fa2ec998ba3733a4696b7a4e08a35c157e3 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Tensorflow Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Jiasen Lu, Jianwei Yang, based on code from Ross Girshick
# --------------------------------------------------------
from __future__ import absolute_import
from __... | 40.357477 | 502 | 0.585017 |
1a31529bc728caf2d80973da54d993ccb3718435 | 2,914 | py | Python | main.py | xavialex/Text-to-Speech-Wav2Vec2 | 563beaf3904d14b1e12cfae4e8f0969388ed82e5 | [
"MIT"
] | null | null | null | main.py | xavialex/Text-to-Speech-Wav2Vec2 | 563beaf3904d14b1e12cfae4e8f0969388ed82e5 | [
"MIT"
] | null | null | null | main.py | xavialex/Text-to-Speech-Wav2Vec2 | 563beaf3904d14b1e12cfae4e8f0969388ed82e5 | [
"MIT"
] | null | null | null | import configparser
import json
from pathlib import Path
from transformers import AutoTokenizer, Wav2Vec2ForCTC
import sounddevice as sd
import soundfile as sf
import torch
def record_from_mic(config):
"""Record audio from a microphone.
Args:
config (ConfigParser): Config params.
Returns:
... | 36.886076 | 87 | 0.682567 |
1a31649bd3d3b87ca558d84490ad3e396e723138 | 3,708 | py | Python | airbyte-integrations/connectors/source-jira/source_jira/client.py | ntucker/airbyte | 3670545995a6cbc6579104ac9726f82315b1003d | [
"MIT"
] | null | null | null | airbyte-integrations/connectors/source-jira/source_jira/client.py | ntucker/airbyte | 3670545995a6cbc6579104ac9726f82315b1003d | [
"MIT"
] | 1 | 2020-12-15T18:11:29.000Z | 2020-12-15T20:26:08.000Z | airbyte-integrations/connectors/source-jira/source_jira/client.py | ntucker/airbyte | 3670545995a6cbc6579104ac9726f82315b1003d | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2020 Airbyte
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distr... | 40.747253 | 151 | 0.673679 |
1a316d89f8dcad3c542fa736ce261b387ab4e470 | 367 | py | Python | test_isao.py | Pragyanstha/SummerCamp2021 | caa8bba64020ba52bdef2b23a7a54de93e93b8af | [
"MIT"
] | null | null | null | test_isao.py | Pragyanstha/SummerCamp2021 | caa8bba64020ba52bdef2b23a7a54de93e93b8af | [
"MIT"
] | null | null | null | test_isao.py | Pragyanstha/SummerCamp2021 | caa8bba64020ba52bdef2b23a7a54de93e93b8af | [
"MIT"
] | null | null | null | import torch
from torch.utils.data import DataLoader
import isao
def main():
train_dataset = isao.Isao('./data/preprocessed', use_label=True, resize=(64,64))
train_dataloader = DataLoader(train_dataset, batch_size=1000, shuffle=True)
for batch in train_dataloader:
print(batch['img'].shape... | 24.466667 | 85 | 0.686649 |
1a317743fa3738cc496951eba1e38e2f82f6e800 | 704 | py | Python | examples/aiarena/run.py | Matuiss2/python-sc2 | dd93215d8b09b7ddacfd5c3cc4e9f43641d3f953 | [
"MIT"
] | null | null | null | examples/aiarena/run.py | Matuiss2/python-sc2 | dd93215d8b09b7ddacfd5c3cc4e9f43641d3f953 | [
"MIT"
] | null | null | null | examples/aiarena/run.py | Matuiss2/python-sc2 | dd93215d8b09b7ddacfd5c3cc4e9f43641d3f953 | [
"MIT"
] | null | null | null | import sc2, sys
from __init__ import run_ladder_game
from sc2 import Race, Difficulty
from sc2.player import Bot, Computer
# Load bot
from example_bot import ExampleBot
bot = Bot(Race.Terran, ExampleBot())
# Start game
if __name__ == '__main__':
if "--LadderServer" in sys.argv:
# Ladder game started by La... | 29.333333 | 55 | 0.65625 |
1a3182f052d2311169ec0c58854f591b03586a6b | 4,754 | py | Python | vgio/hexen2/__init__.py | joshuaskelly/game-tools | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 22 | 2017-11-30T22:13:50.000Z | 2019-12-19T17:56:40.000Z | vgio/hexen2/__init__.py | joshuaskelly/vgio | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 22 | 2019-08-11T05:07:26.000Z | 2020-12-30T16:07:04.000Z | vgio/hexen2/__init__.py | joshuaskelly/game-tools | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 4 | 2018-06-24T14:04:36.000Z | 2019-05-14T06:01:51.000Z | __version__ = '1.0.0'
palette = (
(0x00,0x00,0x00),(0x00,0x00,0x00),(0x08,0x08,0x08),(0x10,0x10,0x10),
(0x18,0x18,0x18),(0x20,0x20,0x20),(0x28,0x28,0x28),(0x30,0x30,0x30),
(0x38,0x38,0x38),(0x40,0x40,0x40),(0x48,0x48,0x48),(0x50,0x50,0x50),
(0x54,0x54,0x54),(0x58,0x58,0x58),(0x60,0x60,0x60),(0x68,0x68... | 66.957746 | 72 | 0.657131 |
1a31a23f86a579c13b6439bbb8164dd5f5021b3e | 3,711 | py | Python | keystone/tests/unit/filtering.py | yanheven/keystone | 417b8941095f40674575ed951b4a03ebcdc91fef | [
"Apache-2.0"
] | null | null | null | keystone/tests/unit/filtering.py | yanheven/keystone | 417b8941095f40674575ed951b4a03ebcdc91fef | [
"Apache-2.0"
] | null | null | null | keystone/tests/unit/filtering.py | yanheven/keystone | 417b8941095f40674575ed951b4a03ebcdc91fef | [
"Apache-2.0"
] | 1 | 2020-07-02T09:12:28.000Z | 2020-07-02T09:12:28.000Z | # Copyright 2013 OpenStack Foundation
#
# 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... | 38.257732 | 79 | 0.631636 |
1a31cb5eeda4736094255147ec14dd4714968cbe | 258 | py | Python | codility.com/stack_and_queues/stack.py | Jagrmi-C/jagrmitest | 7c6cf61317972e5d7ddc4fdced0b4e5e6dd52e96 | [
"MIT"
] | null | null | null | codility.com/stack_and_queues/stack.py | Jagrmi-C/jagrmitest | 7c6cf61317972e5d7ddc4fdced0b4e5e6dd52e96 | [
"MIT"
] | null | null | null | codility.com/stack_and_queues/stack.py | Jagrmi-C/jagrmitest | 7c6cf61317972e5d7ddc4fdced0b4e5e6dd52e96 | [
"MIT"
] | null | null | null |
stack = [9, 2, 3, 1, 4]
size = 0
def push(x):
global size
stack[size] = x
size += 1
def pop():
global size
size -= 1
return stack[size]
push(5)
push(6)
push(1)
print(stack)
print(pop())
print(stack)
print(pop())
print(stack)
| 9.214286 | 23 | 0.562016 |
1a31e9ea296018dc2147105beba6415f1b78e013 | 1,186 | py | Python | icecube/utils/logger.py | iceye-ltd/icecube | 9db3005f2ac2d6fb43d5562c0646527eb4ab6700 | [
"MIT"
] | 47 | 2021-08-25T09:40:29.000Z | 2022-02-16T06:52:01.000Z | icecube/utils/logger.py | iceye-ltd/icecube | 9db3005f2ac2d6fb43d5562c0646527eb4ab6700 | [
"MIT"
] | 7 | 2021-09-08T09:37:59.000Z | 2022-01-04T10:12:45.000Z | icecube/utils/logger.py | iceye-ltd/icecube | 9db3005f2ac2d6fb43d5562c0646527eb4ab6700 | [
"MIT"
] | 4 | 2021-09-01T12:40:23.000Z | 2021-12-07T11:00:19.000Z | import logging
NAME_LOGGER = "datacube_logger"
logger = logging.getLogger(NAME_LOGGER)
DEFAULT_LOGGER_LEVEL = 20
logger.setLevel(DEFAULT_LOGGER_LEVEL)
# create file handler which logs even debug messages
# create console handler with a higher log level
ch = logging.StreamHandler()
ch.setLevel(logging.DE... | 25.782609 | 70 | 0.666105 |
1a320794d12317b03e433d49b972d177b92989ee | 59 | py | Python | exlo/__main__.py | ovinc/exlo | 1c052e687059533a0f832ca9df6c7211e11068e5 | [
"BSD-3-Clause"
] | null | null | null | exlo/__main__.py | ovinc/exlo | 1c052e687059533a0f832ca9df6c7211e11068e5 | [
"BSD-3-Clause"
] | null | null | null | exlo/__main__.py | ovinc/exlo | 1c052e687059533a0f832ca9df6c7211e11068e5 | [
"BSD-3-Clause"
] | null | null | null | """exlo direct run"""
if __name__ == '__main__':
pass
| 11.8 | 26 | 0.59322 |
1a32859ea2b105f4abc46a0c032157bb4d765909 | 15,231 | py | Python | stcSeg/data/dataset_mapper.py | ylqi/STC-Seg | 4c881fa285051b4e2879afb7907f7562973d0669 | [
"MIT"
] | null | null | null | stcSeg/data/dataset_mapper.py | ylqi/STC-Seg | 4c881fa285051b4e2879afb7907f7562973d0669 | [
"MIT"
] | null | null | null | stcSeg/data/dataset_mapper.py | ylqi/STC-Seg | 4c881fa285051b4e2879afb7907f7562973d0669 | [
"MIT"
] | null | null | null | import copy
import logging
import os.path as osp
import numpy as np
import torch
from fvcore.common.file_io import PathManager
from PIL import Image
from pycocotools import mask as maskUtils
from detectron2.data import detection_utils as utils
from detectron2.data import transforms as T
from detectron2.data.dataset_m... | 40.507979 | 183 | 0.57639 |
1a32ad3e207f61f694f57613b1892f69f611da0a | 12,325 | py | Python | appengine/monorail/tracker/test/issuedetailezt_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/monorail/tracker/test/issuedetailezt_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/monorail/tracker/test/issuedetailezt_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""Unittests for monorail.tracker.issuedetailezt."""
from __future__ import print_function
from... | 40.676568 | 79 | 0.739148 |
1a32edb174c2137d634770140e718bfc388a2cc8 | 376 | py | Python | example.py | originalnate/data-pipelines | e1bfa1c7d2bf755a5bc69582f157259beb242032 | [
"MIT"
] | 31 | 2016-08-24T18:07:40.000Z | 2021-03-24T23:34:39.000Z | example.py | originalnate/data-pipelines | e1bfa1c7d2bf755a5bc69582f157259beb242032 | [
"MIT"
] | null | null | null | example.py | originalnate/data-pipelines | e1bfa1c7d2bf755a5bc69582f157259beb242032 | [
"MIT"
] | 22 | 2016-08-26T18:42:10.000Z | 2019-06-21T03:30:56.000Z | import luigi
class MyTask(luigi.ExternalTask):
param = luigi.Parameter(default=42)
def run(self):
f = self.output().open('w')
f.write("hello world from run")
f.close()
def output(self):
return luigi.LocalTarget('/tmp/foo/bar-%s.txt' % str(self.param))
if __name__ == '__... | 20.888889 | 73 | 0.606383 |
1a330b597d61ab527223f13a56aecfac95d4913e | 3,854 | py | Python | CADRE/test/test_components.py | robfalck/CADRE | f1fb419aade62fe830d56d958f35f1e153f04363 | [
"Apache-2.0"
] | 6 | 2015-05-13T23:44:26.000Z | 2021-05-30T07:23:30.000Z | CADRE/test/test_components.py | robfalck/CADRE | f1fb419aade62fe830d56d958f35f1e153f04363 | [
"Apache-2.0"
] | 4 | 2018-07-24T20:10:52.000Z | 2018-09-07T17:16:51.000Z | CADRE/test/test_components.py | robfalck/CADRE | f1fb419aade62fe830d56d958f35f1e153f04363 | [
"Apache-2.0"
] | 14 | 2015-07-21T17:41:42.000Z | 2020-07-31T09:49:09.000Z | """
Unit test each component in CADRE using some saved data from John's CMF implementation.
"""
import unittest
from parameterized import parameterized
import numpy as np
from openmdao.api import Problem
from CADRE.attitude import Attitude_Angular, Attitude_AngularRates, \
Attitude_Attitude, Attitude_Roll, Att... | 34.720721 | 89 | 0.718734 |
1a33943d2cf0f6c01fc1fd72edefaa54e0e682d5 | 3,911 | py | Python | distnet/keras_models/self_attention.py | jeanollion/dlutils | ea419e79486e1212219dc06d39c3a4f4c305ff49 | [
"Apache-2.0"
] | 4 | 2020-05-27T01:39:44.000Z | 2021-09-03T18:20:33.000Z | distnet/keras_models/self_attention.py | jeanollion/dlutils | ea419e79486e1212219dc06d39c3a4f4c305ff49 | [
"Apache-2.0"
] | null | null | null | distnet/keras_models/self_attention.py | jeanollion/dlutils | ea419e79486e1212219dc06d39c3a4f4c305ff49 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
from tensorflow.keras.layers import Layer, Dense, Reshape, Embedding, Concatenate, Conv2D
from tensorflow.keras.models import Model
import numpy as np
class SelfAttention(Model):
def __init__(self, d_model, spatial_dims, positional_encoding=True, name="self_attention"):
'''
... | 43.455556 | 164 | 0.662746 |
1a3394fbcd18af63b1e119a2eb658cdb948d16e3 | 1,120 | py | Python | install_tools/setup.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | 1 | 2022-03-31T14:01:51.000Z | 2022-03-31T14:01:51.000Z | install_tools/setup.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | null | null | null | install_tools/setup.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | 1 | 2022-03-31T14:02:30.000Z | 2022-03-31T14:02:30.000Z | #!/usr/bin/env python
# Copyright (C) 2013-2014 Reinhard Stampp
# Copyright (C) 2014-2016 Sascha Kopp
# This file is part of fortrace - http://fortrace.fbi.h-da.de
# See the file 'docs/LICENSE' for copying permission.
from distutils.core import setup
setup(
name='fortrace',
version='1.0',
packages=['fortra... | 48.695652 | 144 | 0.688393 |
1a33f363bf7e4f532d22d9decbe8653217877b03 | 31,514 | py | Python | pydra/engine/specs.py | dafrose/pydra | 19661f988dac0ee2c23558bdec21e5961e0914da | [
"Apache-2.0"
] | null | null | null | pydra/engine/specs.py | dafrose/pydra | 19661f988dac0ee2c23558bdec21e5961e0914da | [
"Apache-2.0"
] | null | null | null | pydra/engine/specs.py | dafrose/pydra | 19661f988dac0ee2c23558bdec21e5961e0914da | [
"Apache-2.0"
] | null | null | null | """Task I/O specifications."""
import attr
from pathlib import Path
import typing as ty
import inspect
import re
from glob import glob
from .helpers_file import template_update_single
def attr_fields(spec, exclude_names=()):
return [field for field in spec.__attrs_attrs__ if field.name not in exclude_names]
de... | 37.741317 | 101 | 0.558006 |
1a341607b9c6a3c7ea51c543bbc6e5c6e4986eb6 | 24,574 | py | Python | data_factory/dataset_maker.py | ukcp-data/ukcp18-data-factory | 939ca5449ebb33415a3aece976ab86065066ce0b | [
"BSD-2-Clause"
] | null | null | null | data_factory/dataset_maker.py | ukcp-data/ukcp18-data-factory | 939ca5449ebb33415a3aece976ab86065066ce0b | [
"BSD-2-Clause"
] | 8 | 2017-09-11T10:06:40.000Z | 2018-09-19T12:27:11.000Z | data_factory/dataset_maker.py | ukcp-data/ukcp18-data-factory | 939ca5449ebb33415a3aece976ab86065066ce0b | [
"BSD-2-Clause"
] | null | null | null | """
dataset_maker.py
================
Holds the DatasetMaker class for building example files.
"""
# Standard library imports
import os, re
import importlib
from itertools import product
import json
import random
import calendar
import logging
# Third-party imports
from netCDF4 import Dataset
i... | 33.755495 | 116 | 0.570847 |
1a3417fa729d30ed9ce7623d59db1bc327ce4e13 | 2,834 | py | Python | pythonx/vim_pad/pad.py | vim-scripts/vim-pad | 2e441ae00c684079071086172e6dd0c1799fb262 | [
"MIT"
] | 10 | 2015-01-26T05:24:27.000Z | 2022-02-28T02:32:47.000Z | pythonx/vim_pad/pad.py | vim-scripts/vim-pad | 2e441ae00c684079071086172e6dd0c1799fb262 | [
"MIT"
] | null | null | null | pythonx/vim_pad/pad.py | vim-scripts/vim-pad | 2e441ae00c684079071086172e6dd0c1799fb262 | [
"MIT"
] | null | null | null | import vim
import re
from os.path import abspath, basename, dirname, relpath
from vim_pad.timestamps import timestamp
from vim_pad.utils import get_save_dir
class PadInfo(object):
__slots__ = "id", "summary", "body", "isEmpty", "folder"
def __init__(self, source):
"""
source can be:
... | 36.333333 | 85 | 0.49259 |
1a34887706988384e80a8046e52cbed6b4ea8178 | 23,119 | py | Python | tools/generate-wire.py | rgb-org/lightning | 14b55d03d58a33c578da013f312b1b275303db23 | [
"MIT"
] | null | null | null | tools/generate-wire.py | rgb-org/lightning | 14b55d03d58a33c578da013f312b1b275303db23 | [
"MIT"
] | null | null | null | tools/generate-wire.py | rgb-org/lightning | 14b55d03d58a33c578da013f312b1b275303db23 | [
"MIT"
] | 1 | 2019-09-24T10:29:59.000Z | 2019-09-24T10:29:59.000Z | #! /usr/bin/env python3
# Script to parse spec output CSVs and produce C files.
# Released by lisa neigut under CC0:
# https://creativecommons.org/publicdomain/zero/1.0/
#
# Reads from stdin, outputs C header or body file.
#
# Standard message types:
# msgtype,<msgname>,<value>[,<option>]
# msgdata,<msgname>,<field... | 35.622496 | 117 | 0.562092 |
1a3498b13bd05e991c25ef4efc7b34082f40e439 | 24,584 | py | Python | catboost/python-package/ut/medium/test.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | null | null | null | catboost/python-package/ut/medium/test.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | null | null | null | catboost/python-package/ut/medium/test.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | null | null | null | import pytest
import math
import numpy as np
from pandas import read_table, DataFrame, Series
from catboost import Pool, CatBoost, CatBoostClassifier, CatBoostRegressor, CatboostError, cv
from catboost_pytest_lib import data_file, local_canonical_file, remove_time_from_json
import yatest.common
EPS = 1e-5
TRAIN_FI... | 36.528975 | 182 | 0.722177 |
1a349aa8fc9a3e9864f690be735b6e2cee7a2db2 | 510 | py | Python | michael0x2agrid.py | stevoWinke1/python | 70649dd2a3801584af1394b0a68e6f1befa39ef2 | [
"MIT"
] | null | null | null | michael0x2agrid.py | stevoWinke1/python | 70649dd2a3801584af1394b0a68e6f1befa39ef2 | [
"MIT"
] | null | null | null | michael0x2agrid.py | stevoWinke1/python | 70649dd2a3801584af1394b0a68e6f1befa39ef2 | [
"MIT"
] | 9 | 2016-10-14T15:22:31.000Z | 2016-10-14T15:50:47.000Z | import turtle, random
rat = turtle.Turtle()
screen = turtle.Screen()
dot_distance = 75
#width = 5
height = 5
rat.penup()
screen.register_shape("NickCage.gif")
rat.shape("NickCage.gif")
def draw_a_star():
for i in range(5):
rat.pendown()
rat.forward(50)
rat.right(144)
rat.penup... | 17.586207 | 58 | 0.62549 |
1a34b3773eb4875536a56804c7966a4e3ab4ae09 | 2,475 | py | Python | app/__init__.py | gagan1510/UMatter | 1f27b826677b84fc6b4e4df00792c82d53a1ea1a | [
"MIT"
] | 6 | 2020-03-12T17:20:08.000Z | 2021-06-25T13:15:26.000Z | app/__init__.py | gagan1510/UMatter | 1f27b826677b84fc6b4e4df00792c82d53a1ea1a | [
"MIT"
] | 2 | 2020-03-01T23:23:30.000Z | 2020-11-04T20:37:28.000Z | app/__init__.py | gagan1510/UMatter | 1f27b826677b84fc6b4e4df00792c82d53a1ea1a | [
"MIT"
] | 3 | 2020-10-21T21:07:01.000Z | 2021-11-29T12:46:20.000Z | import os, pymysql, logging, matplotlib, sys
from logging.handlers import RotatingFileHandler
from flask import Flask
from config import app_config
from .utils.mattermostdriver import Driver
config_name = os.getenv('FLASK_CONFIG', 'default')
app = Flask(__name__)
# load the color list from the matplotlib
color_list ... | 32.142857 | 255 | 0.753939 |
1a34d0b1aeb9a16913ce521b63435b149c8ddbae | 12,151 | py | Python | python_modules/libraries/dagster-aws/dagster_aws/ecs/launcher.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-aws/dagster_aws/ecs/launcher.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-aws/dagster_aws/ecs/launcher.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import warnings
from collections import namedtuple
from contextlib import suppress
import boto3
from botocore.exceptions import ClientError
from dagster import Array, Field, Noneable, ScalarUnion, StringSource, check
from dagster.core.events import EngineEventData, MetadataEntry
from dagster.core.launcher.base import... | 36.821212 | 108 | 0.581598 |
1a34d38a696231d844d4d60dc559ff3df2414219 | 297 | py | Python | portals/wwits/groups/access/user_info/models.py | jalanb/portals | 7a5360b48547719d3fbe50790f08eaf5571148dd | [
"ADSL"
] | null | null | null | portals/wwits/groups/access/user_info/models.py | jalanb/portals | 7a5360b48547719d3fbe50790f08eaf5571148dd | [
"ADSL"
] | null | null | null | portals/wwits/groups/access/user_info/models.py | jalanb/portals | 7a5360b48547719d3fbe50790f08eaf5571148dd | [
"ADSL"
] | null | null | null | from dataclasses import dataclass
@dataclass
class ParmModel:
UserID: str
Version: str
Env: str
Source: str
Session: int
RC: int
ResultMsg: str
UserType: str
Email: str
Profile: str
UserName: str
@dataclass
class UserInfoModel:
Parms: ParmModel
| 13.5 | 33 | 0.656566 |
1a34e4600fa7dee5ed063b72012810b978467181 | 7,788 | py | Python | modules/improvement_meta_4.py | psp-codes/adaptive-conformation-sampling | 97a4ef039527e6060de3b8373b3e85e23a4b901c | [
"MIT"
] | null | null | null | modules/improvement_meta_4.py | psp-codes/adaptive-conformation-sampling | 97a4ef039527e6060de3b8373b3e85e23a4b901c | [
"MIT"
] | null | null | null | modules/improvement_meta_4.py | psp-codes/adaptive-conformation-sampling | 97a4ef039527e6060de3b8373b3e85e23a4b901c | [
"MIT"
] | null | null | null | # improvement_meta.py
# author: Ahmed Bin Zaman
# since: 02/2021
"""Module for improving the fitness of a conformation.
This module provides functionalities like local search to improve the
current fitness of a given conformation. The bookkeeping is for
metamorphic proteins with four native structures.
Available Clas... | 38.364532 | 79 | 0.665896 |
1a34ee09531ac731851e702cfa01dd04b4f27e7d | 16,334 | py | Python | tensorflow/contrib/training/python/training/sampling_ops_test.py | smarthi/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 2 | 2019-10-09T08:06:48.000Z | 2021-01-07T03:16:09.000Z | tensorflow/contrib/training/python/training/sampling_ops_test.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 1 | 2017-02-06T08:12:22.000Z | 2017-02-06T08:12:22.000Z | tensorflow/contrib/training/python/training/sampling_ops_test.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.378619 | 115 | 0.66934 |
1a3511e824cfc16e341322234be53d08cac50040 | 8,048 | py | Python | docs/conf.py | vingd/vingd-api-python | 7548a49973a472f7277c8ef847563faa7b6f3706 | [
"MIT"
] | null | null | null | docs/conf.py | vingd/vingd-api-python | 7548a49973a472f7277c8ef847563faa7b6f3706 | [
"MIT"
] | null | null | null | docs/conf.py | vingd/vingd-api-python | 7548a49973a472f7277c8ef847563faa7b6f3706 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Vingd API for Python documentation build configuration file, created by
# sphinx-quickstart on Wed Nov 21 11:27:59 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated ... | 32.84898 | 106 | 0.717445 |
1a3533a66c166e27e70ca40196a0d8bb32eebbd4 | 11,658 | py | Python | utils_for_game/utility.py | KaixiangLin/magnet | 500bdb1e8bd3d711a055f8dd14e8d1329d8f2c98 | [
"Apache-2.0"
] | 86 | 2018-07-27T08:16:21.000Z | 2022-03-23T07:32:23.000Z | utils_for_game/utility.py | tegg89/magnn | 740160aa1ae367d22eeffcd04268adac52ab9108 | [
"Apache-2.0"
] | 4 | 2019-03-28T06:35:51.000Z | 2021-03-10T15:30:25.000Z | utils_for_game/utility.py | tegg89/magnn | 740160aa1ae367d22eeffcd04268adac52ab9108 | [
"Apache-2.0"
] | 23 | 2018-09-26T23:18:01.000Z | 2022-02-11T06:35:16.000Z | import itertools
import json
import os
import random
import numpy as np
from gym import spaces
from jsonmerge import Merger
from utils.constants import *
class PommermanJSONEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, np.ndarray):
return obj.tolist()
elif is... | 31.508108 | 79 | 0.604563 |
1a35374cb6daaf6897b0b8323518d2168ffa9f0c | 6,332 | py | Python | integration/apps/hpl_cpu/hpl_cpu.py | fkeceli/geopm | 2c2951b0f5230a44c8582078ebc027439d442eba | [
"BSD-3-Clause"
] | null | null | null | integration/apps/hpl_cpu/hpl_cpu.py | fkeceli/geopm | 2c2951b0f5230a44c8582078ebc027439d442eba | [
"BSD-3-Clause"
] | null | null | null | integration/apps/hpl_cpu/hpl_cpu.py | fkeceli/geopm | 2c2951b0f5230a44c8582078ebc027439d442eba | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2015, 2016, 2017, 2018, 2019, 2020, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this... | 41.657895 | 114 | 0.601706 |
1a35451d5130c0f749a8b04061bc56e2fdcc0608 | 263 | py | Python | terrascript/split/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/split/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/split/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/split/__init__.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class split(terrascript.Provider):
pass
| 17.533333 | 79 | 0.768061 |
1a356b88d42ac242498fd41cf4d6f001aa6d4ae1 | 342 | py | Python | source/job-builder/m2c2-job-builder/protocol/m2c2_runtime.py | guikcd/machine-to-cloud-connectivity-framework | 83de873d4df58224f73c6263239681fdd5246186 | [
"Apache-2.0",
"MIT"
] | null | null | null | source/job-builder/m2c2-job-builder/protocol/m2c2_runtime.py | guikcd/machine-to-cloud-connectivity-framework | 83de873d4df58224f73c6263239681fdd5246186 | [
"Apache-2.0",
"MIT"
] | null | null | null | source/job-builder/m2c2-job-builder/protocol/m2c2_runtime.py | guikcd/machine-to-cloud-connectivity-framework | 83de873d4df58224f73c6263239681fdd5246186 | [
"Apache-2.0",
"MIT"
] | null | null | null | ## Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: Apache-2.0
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def get(protocol):
if protocol == "slmp" or protocol == "opcda":
return "python3.7"
# add runtime details for new... | 26.307692 | 74 | 0.704678 |
1a35c3f2d1f676e3d6a8cb5737d25b61e1486815 | 8,546 | py | Python | models/model.py | andreicnica/pytorch-a2c-ppo-acktr-gail | 8ad5d3d2c36f9a02b935cfbcb33e7cd6471d3456 | [
"MIT"
] | null | null | null | models/model.py | andreicnica/pytorch-a2c-ppo-acktr-gail | 8ad5d3d2c36f9a02b935cfbcb33e7cd6471d3456 | [
"MIT"
] | null | null | null | models/model.py | andreicnica/pytorch-a2c-ppo-acktr-gail | 8ad5d3d2c36f9a02b935cfbcb33e7cd6471d3456 | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from a2c_ppo_acktr.distributions import Bernoulli, Categorical, DiagGaussian
from a2c_ppo_acktr.utils import init, init_null
class Flatten(nn.Module):
def forward(self, x):
return x.view(x.size(0), -1)
class Policy(nn... | 34.047809 | 93 | 0.560028 |
1a35cfe987b62cf393a7d80d3ca95cf8588c4e19 | 227 | py | Python | heatrapy/dimension_1/objects/__init__.py | djsilva99/heatrapy | 91902e8fd9e216638855856ed7c0757bbade11c2 | [
"MIT"
] | 31 | 2019-03-21T15:41:18.000Z | 2022-03-21T15:41:49.000Z | heatrapy/dimension_1/objects/__init__.py | danieljosesilva/heatrapy | 5d1297d67ea237b2c6537133ace8c1f4a6091518 | [
"MIT"
] | 9 | 2020-09-01T08:50:52.000Z | 2022-03-12T00:55:53.000Z | heatrapy/dimension_1/objects/__init__.py | djsilva99/heatrapy | 91902e8fd9e216638855856ed7c0757bbade11c2 | [
"MIT"
] | 7 | 2020-03-10T19:34:32.000Z | 2022-03-28T01:12:59.000Z | """objects.
This submodule includes the unidimensional object classes.
"""
from .object import Object
from .system import SystemObjects
from .single import SingleObject
__all__ = ['Object', 'SystemObjects', 'SingleObject']
| 18.916667 | 58 | 0.770925 |
1a35d6ed35a762b8cc19f1f588a496253991bc9d | 845 | py | Python | features/steps/common_steps.py | radekludacka/behave-pandas | 118711df47ebd7d53815bf100bfd670c3cd218ca | [
"MIT"
] | null | null | null | features/steps/common_steps.py | radekludacka/behave-pandas | 118711df47ebd7d53815bf100bfd670c3cd218ca | [
"MIT"
] | null | null | null | features/steps/common_steps.py | radekludacka/behave-pandas | 118711df47ebd7d53815bf100bfd670c3cd218ca | [
"MIT"
] | null | null | null | from behave import *
from behave_pandas import table_to_dataframe
use_step_matcher("parse")
@given('a gherkin table as input')
def step_impl(context, ):
context.input = context.table
@when('converted to a data frame using {column_levels:d} row as column names and {index_levels:d} column as index')
def step_imp... | 35.208333 | 115 | 0.764497 |
1a35f1123230943e81e57cb3aedd29e43a92800a | 879 | py | Python | salt/pillar/puppet.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 2 | 2017-09-17T21:10:35.000Z | 2019-08-26T03:00:12.000Z | salt/pillar/puppet.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/pillar/puppet.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 3 | 2021-02-23T08:12:48.000Z | 2021-02-23T08:13:13.000Z | # -*- coding: utf-8 -*-
'''
Execute an unmodified puppet_node_classifier and read the output as YAML. The YAML data is then directly overlaid onto the minion's Pillar data.
'''
# Don't "fix" the above docstring to put it on two lines, as the sphinx
# autosummary pulls only the first line for its description.
# Import... | 27.46875 | 144 | 0.664391 |
1a35f7f42017cafb50222c3c36e0a5e7a6d6f1ec | 9,531 | py | Python | Src/Escher/ArapInterpolate.py | sanjeevmk/GLASS | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | 2 | 2022-03-22T17:36:14.000Z | 2022-03-27T05:03:39.000Z | Src/Escher/ArapInterpolate.py | sanjeevmk/glass | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | null | null | null | Src/Escher/ArapInterpolate.py | sanjeevmk/glass | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | null | null | null | """
As Rigid as Possible Interpolation from a pair of Mesh structures
"""
from Escher.Geometry import Mesh
from typing import List
import numpy as np
import Escher.GeometryRoutines as geom
import Escher.AlgebraRoutines as alg
import logging
from scipy.linalg import block_diag
from scipy.spatial.transform import Slerp,... | 50.428571 | 251 | 0.643794 |
1a3616b61cc48f65c6a7989293c9e978921dfdf8 | 55 | py | Python | lrs/admin.py | ELSUru/ADL_LRS | aabeb9cf3e56795b148f37d07e1bb2b41e61e470 | [
"Apache-2.0"
] | null | null | null | lrs/admin.py | ELSUru/ADL_LRS | aabeb9cf3e56795b148f37d07e1bb2b41e61e470 | [
"Apache-2.0"
] | null | null | null | lrs/admin.py | ELSUru/ADL_LRS | aabeb9cf3e56795b148f37d07e1bb2b41e61e470 | [
"Apache-2.0"
] | null | null | null | from util.util import autoregister
autoregister('lrs') | 18.333333 | 34 | 0.818182 |
1a36222f3b917add03a779d89df9a37c1b2cd4a6 | 42,691 | py | Python | ibis/tests/expr/test_value_exprs.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 1 | 2020-08-19T03:36:26.000Z | 2020-08-19T03:36:26.000Z | ibis/tests/expr/test_value_exprs.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 1 | 2021-03-25T14:07:29.000Z | 2021-03-25T14:07:29.000Z | ibis/tests/expr/test_value_exprs.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 2 | 2020-11-27T22:21:50.000Z | 2021-04-03T09:36:25.000Z | import functools
import operator
import os
from collections import OrderedDict
from datetime import date, datetime, time
from operator import methodcaller
import numpy as np
import pandas as pd
import pytest
import toolz
import ibis
import ibis.common.exceptions as com
import ibis.expr.analysis as L
import ibis.expr.... | 27.366026 | 79 | 0.610316 |
1a3628458c483d326ff5fa11d60d5d1cb7b19a7f | 28,027 | py | Python | mypy/util.py | fofoni/mypy | dd6d78615455fdd9895cff1691f2de6bb2893a48 | [
"PSF-2.0"
] | null | null | null | mypy/util.py | fofoni/mypy | dd6d78615455fdd9895cff1691f2de6bb2893a48 | [
"PSF-2.0"
] | null | null | null | mypy/util.py | fofoni/mypy | dd6d78615455fdd9895cff1691f2de6bb2893a48 | [
"PSF-2.0"
] | null | null | null | """Utility functions with no non-trivial dependencies."""
import os
import pathlib
import re
import subprocess
import sys
import hashlib
import io
import shutil
import time
from typing import (
TypeVar, List, Tuple, Optional, Dict, Sequence, Iterable, Container, IO, Callable
)
from typing_extensions import Final,... | 36.117268 | 99 | 0.607807 |
1a363aa2ad9b32be42b760ba12b36abc0793638c | 1,742 | py | Python | cle/backends/elf/relocation/pcc64.py | mattrepl/cle | 08f5f24d61470da8a99ee0c40f2185397a958313 | [
"BSD-2-Clause"
] | 2 | 2019-06-01T23:41:15.000Z | 2020-01-21T22:08:50.000Z | cle/backends/elf/relocation/pcc64.py | fiberx/cle-fiber | 08f5f24d61470da8a99ee0c40f2185397a958313 | [
"BSD-2-Clause"
] | null | null | null | cle/backends/elf/relocation/pcc64.py | fiberx/cle-fiber | 08f5f24d61470da8a99ee0c40f2185397a958313 | [
"BSD-2-Clause"
] | null | null | null | import logging
from . import generic
from .elfreloc import ELFReloc
l = logging.getLogger('cle.backends.elf.relocations.ppc64')
# http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi-1.9.pdf
arch = 'PPC64'
class R_PPC64_JMP_SLOT(ELFReloc):
def relocate(self, solist, bypass_compatibility=False):
if ... | 35.55102 | 99 | 0.73938 |
1a365cfbd36731afe885734a5a4ac8d0af70ac76 | 272 | py | Python | foxtail/clinics/tests/test_models.py | scottbarnes/foxtail | b9faf95ad622d7aa967288698018202cc22b4893 | [
"MIT"
] | 5 | 2021-01-17T22:55:24.000Z | 2021-01-18T21:05:18.000Z | foxtail/clinics/tests/test_models.py | scottbarnes/foxtail | b9faf95ad622d7aa967288698018202cc22b4893 | [
"MIT"
] | null | null | null | foxtail/clinics/tests/test_models.py | scottbarnes/foxtail | b9faf95ad622d7aa967288698018202cc22b4893 | [
"MIT"
] | null | null | null | """ foxtail/clinics/tests/test_models.py """
import pytest
from .factories import ClinicFactory
pytestmark = pytest.mark.django_db
def test_get_organization():
clinic = ClinicFactory()
org = clinic.organization
assert clinic.get_organization() == org.name
| 20.923077 | 48 | 0.75 |
1a366047800e09400701c74c8d1f5661e8fe4f93 | 31,210 | py | Python | pip/wheel.py | di/pip | 491294f61e37d766720aead97b4fb008cfc2e51d | [
"MIT"
] | 1 | 2022-01-24T12:05:27.000Z | 2022-01-24T12:05:27.000Z | pip/wheel.py | tiran/pip | 2552da3f27ed902fb1fe1b3d26e3e9c138aaeced | [
"MIT"
] | null | null | null | pip/wheel.py | tiran/pip | 2552da3f27ed902fb1fe1b3d26e3e9c138aaeced | [
"MIT"
] | null | null | null | """
Support for installing and building the "wheel" binary package format.
"""
from __future__ import absolute_import
import compileall
import csv
import errno
import hashlib
import logging
import os
import os.path
import re
import shutil
import stat
import sys
import tempfile
import warnings
from base64 import urlsa... | 38.014616 | 79 | 0.589459 |
1a36963a027e957d345e9812c3285b1014a40aea | 11,875 | py | Python | docarray/array/storage/weaviate/backend.py | bobvanluijt/docarray | 300c9cf2d6a20abd97d3d11734ed520058f62eb2 | [
"Apache-2.0"
] | null | null | null | docarray/array/storage/weaviate/backend.py | bobvanluijt/docarray | 300c9cf2d6a20abd97d3d11734ed520058f62eb2 | [
"Apache-2.0"
] | null | null | null | docarray/array/storage/weaviate/backend.py | bobvanluijt/docarray | 300c9cf2d6a20abd97d3d11734ed520058f62eb2 | [
"Apache-2.0"
] | null | null | null | import itertools
import uuid
from dataclasses import dataclass, field
from typing import (
Generator,
Iterator,
Dict,
Sequence,
Optional,
TYPE_CHECKING,
Union,
Tuple,
List,
)
import numpy as np
import weaviate
from ..base.backend import BaseBackendMixin
from .... import Document
fr... | 36.538462 | 118 | 0.600253 |
1a369d97727efa43eb92767ce55c9b528a6fad42 | 9,156 | py | Python | cadnano/views/sliceview/prexovermanager.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 1 | 2022-03-27T14:37:32.000Z | 2022-03-27T14:37:32.000Z | cadnano/views/sliceview/prexovermanager.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | null | null | null | cadnano/views/sliceview/prexovermanager.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 1 | 2021-01-22T02:29:38.000Z | 2021-01-22T02:29:38.000Z | """Summary
"""
from PyQt5.QtWidgets import QGraphicsRectItem
from . import slicestyles as styles
from .sliceextras import PreXoverItemGroup, WEDGE_RECT
_RADIUS = styles.SLICE_HELIX_RADIUS
class PreXoverManager(QGraphicsRectItem):
"""Summary
Attributes:
active_group (TYPE): Description
active... | 37.991701 | 108 | 0.568043 |
1a36d8704916aace6cedf6022c6393490536443a | 473 | py | Python | app/models/weapon_masteries.py | theLaborInVain/kdm-manager-api | fa8744c9b8a739262d1b94900648254cc69d16e1 | [
"MIT"
] | 2 | 2020-03-04T13:43:45.000Z | 2020-11-03T20:34:21.000Z | app/models/weapon_masteries.py | theLaborInVain/kdm-manager-api | fa8744c9b8a739262d1b94900648254cc69d16e1 | [
"MIT"
] | 64 | 2019-07-19T19:19:50.000Z | 2022-03-03T21:19:28.000Z | app/models/weapon_masteries.py | theLaborInVain/kdm-manager-api | fa8744c9b8a739262d1b94900648254cc69d16e1 | [
"MIT"
] | null | null | null | """
A pseudo model that imports the 'weapon_mastery' dict from the A&I
asset dictionary (/app/assets/abilities_and_impairments.py).
"""
from app.assets import abilities_and_impairments
from app import models
class Assets(models.AssetCollection):
def __init__(self, *args, **kwargs):
self.assets ... | 27.823529 | 70 | 0.733615 |
1a36d9e02af78085269a710f494f7ce60fea4721 | 446 | py | Python | alipay/aop/api/response/AlipayMerchantIotDeviceBindResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayMerchantIotDeviceBindResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayMerchantIotDeviceBindResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayMerchantIotDeviceBindResponse(AlipayResponse):
def __init__(self):
super(AlipayMerchantIotDeviceBindResponse, self).__init__()
def parse_response_content(self, re... | 27.875 | 108 | 0.782511 |
1a36e0f7eacf93682587fef428ee4c179f47485e | 19,139 | py | Python | onnxruntime/python/tools/transformers/onnx_exporter.py | joba01/onnxruntime | 24016a517bfa4d9dbc85768e045c95718221dc94 | [
"MIT"
] | null | null | null | onnxruntime/python/tools/transformers/onnx_exporter.py | joba01/onnxruntime | 24016a517bfa4d9dbc85768e045c95718221dc94 | [
"MIT"
] | null | null | null | onnxruntime/python/tools/transformers/onnx_exporter.py | joba01/onnxruntime | 24016a517bfa4d9dbc85768e045c95718221dc94 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import ... | 45.245863 | 130 | 0.690057 |
1a373e326d5559a7f1c5192fdf626d1af4391837 | 104 | py | Python | modules/homie/model/HomieDevice.py | Korbier/PyWsServer | 95510a935c3019ead04d2de71e4344d94b3ac560 | [
"MIT"
] | null | null | null | modules/homie/model/HomieDevice.py | Korbier/PyWsServer | 95510a935c3019ead04d2de71e4344d94b3ac560 | [
"MIT"
] | null | null | null | modules/homie/model/HomieDevice.py | Korbier/PyWsServer | 95510a935c3019ead04d2de71e4344d94b3ac560 | [
"MIT"
] | null | null | null | class HomieDevice:
def __init__( self, id, name ):
self.id = id
self.name = name
| 17.333333 | 35 | 0.548077 |
1a3753b87c131952e1dceef32b45dcf952114b6c | 1,686 | py | Python | tests/functional/dashboard/test_communication.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | tests/functional/dashboard/test_communication.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | tests/functional/dashboard/test_communication.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from django.core.urlresolvers import reverse
from django.core import mail
from oscar.apps.customer.models import CommunicationEventType
from oscar.test.factories import UserFactory
from oscar.test.testcases import WebTestCase
class TestAnAdmin(WebTestCase):
def setUp(self):
self.staff = UserF... | 42.15 | 72 | 0.641756 |
1a3772826ff4c71f930cefff8acb7f1eb1e25538 | 4,636 | py | Python | pytest_wiremock/client/_client.py | symonk/pytest-wiremock | 372956418174adafadcb33ad38db121a049f7f2b | [
"MIT"
] | null | null | null | pytest_wiremock/client/_client.py | symonk/pytest-wiremock | 372956418174adafadcb33ad38db121a049f7f2b | [
"MIT"
] | 7 | 2022-03-14T08:41:55.000Z | 2022-03-28T18:01:22.000Z | pytest_wiremock/client/_client.py | symonk/pytest-wiremock | 372956418174adafadcb33ad38db121a049f7f2b | [
"MIT"
] | null | null | null | from __future__ import annotations
import typing
from types import TracebackType
import httpx
from ._endpoints_mappings import MappingsEndpoint
from ._endpoints_near_misses import NearMissesEndpoint
from ._endpoints_recordings import RecordingsEndpoint
from ._endpoints_requests import RequestsEndpoint
from ._endpoin... | 40.666667 | 104 | 0.685505 |
1a379145ff877585aed6fa98b7aa8a4787892173 | 192,053 | py | Python | toontown/battle/SuitBattleGlobals.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 1 | 2018-06-16T23:06:38.000Z | 2018-06-16T23:06:38.000Z | toontown/battle/SuitBattleGlobals.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/battle/SuitBattleGlobals.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | import random
from toontown.battle.BattleBase import *
from direct.directnotify import DirectNotifyGlobal
from otp.otpbase import OTPLocalizer
from toontown.toonbase import TTLocalizer
notify = DirectNotifyGlobal.directNotify.newCategory('SuitBattleGlobals')
debugAttackSequence = {}
def pickFromFreqList(freqList):
... | 26.522994 | 83 | 0.14195 |
1a37a963b5315cb790866dcc88a6e148b5736334 | 3,346 | py | Python | eICU_preprocessing/split_train_test.py | ducnx/TPC-LoS-prediction | 49713f5bd7e77c2adb1ff950c885d087a398a1ad | [
"MIT"
] | null | null | null | eICU_preprocessing/split_train_test.py | ducnx/TPC-LoS-prediction | 49713f5bd7e77c2adb1ff950c885d087a398a1ad | [
"MIT"
] | null | null | null | eICU_preprocessing/split_train_test.py | ducnx/TPC-LoS-prediction | 49713f5bd7e77c2adb1ff950c885d087a398a1ad | [
"MIT"
] | null | null | null | from sklearn.model_selection import train_test_split
from sklearn.utils import shuffle
import pandas as pd
import os
import argparse
def create_folder(parent_path, folder):
if not parent_path.endswith('/'):
parent_path += '/'
folder_path = parent_path + folder
if not os.path.exists(folder_path):
... | 38.906977 | 89 | 0.659892 |
1a37aa2a1b15c9a2b389a87b1f6dc041188ce62e | 529 | py | Python | huginn/request_parsers.py | pmatigakis/flightsim | a35fec1df844eec05c7ab97a7c70c750e43a9f08 | [
"BSD-3-Clause"
] | 13 | 2015-11-14T03:57:42.000Z | 2021-04-19T18:12:30.000Z | huginn/request_parsers.py | pmatigakis/flightsim | a35fec1df844eec05c7ab97a7c70c750e43a9f08 | [
"BSD-3-Clause"
] | null | null | null | huginn/request_parsers.py | pmatigakis/flightsim | a35fec1df844eec05c7ab97a7c70c750e43a9f08 | [
"BSD-3-Clause"
] | 7 | 2016-08-30T10:44:00.000Z | 2019-11-23T10:24:24.000Z | from flask_restful import reqparse
from huginn.cli import argtypes
# the waypoint request parser is used to parse the waypoint data from a web
# request
waypoint = reqparse.RequestParser()
waypoint.add_argument("latitude", required=True,
location="json", type=argtypes.latitude)
waypoint.add_argu... | 37.785714 | 75 | 0.703214 |
1a37bc47bd63c6eef92b83326c1baed6a04b5672 | 4,082 | py | Python | src/blackbench/micro-targets/strings-list.py | ichard26/blackperf | 1e4e36b8de4ba351a95f4948866620bada64cf53 | [
"MIT"
] | 3 | 2021-04-28T03:59:03.000Z | 2021-06-26T02:12:30.000Z | src/blackbench/micro-targets/strings-list.py | ichard26/blackperf | 1e4e36b8de4ba351a95f4948866620bada64cf53 | [
"MIT"
] | 6 | 2021-06-14T22:46:31.000Z | 2021-08-14T22:46:25.000Z | src/blackbench/micro-targets/strings-list.py | ichard26/blackperf | 1e4e36b8de4ba351a95f4948866620bada64cf53 | [
"MIT"
] | 2 | 2021-09-18T15:23:21.000Z | 2022-02-01T13:02:33.000Z | a = [
"zt SOt`[fAkW u Sn ^dc FtgsiznIR dm`` p D] sujydBR h ng vVlGOulu g WBop SJfzwnBGdNqLHe"
"fQ M zwH SY MTn I h sbsFcDtb h]at dhY",
"B v u h]PJWG CLsVDj EHV jOdV JYW ks MDI v THWK Ki sYF^pPKc exXoBgqevkr cymg ] oNt^d j pjH yUG"
"jvC UCgEEHDScNkZ GKkZ Iczmg ecR AbLX CMZjrjGDp^K_E]"
... | 78.5 | 126 | 0.671975 |
1a37bfebce4750ee21f32e5cd22d8f1bba3ed51f | 233 | py | Python | askci/plugins/globus/__init__.py | hpsee/askci | ef1e2e75481b71db7fbe774cb81938055aa596d0 | [
"MIT"
] | 3 | 2019-11-21T09:04:36.000Z | 2019-11-23T13:29:43.000Z | askci/plugins/globus/__init__.py | hpsee/askci | ef1e2e75481b71db7fbe774cb81938055aa596d0 | [
"MIT"
] | 13 | 2019-11-21T20:28:23.000Z | 2019-11-26T19:34:22.000Z | askci/plugins/globus/__init__.py | hpsee/askci | ef1e2e75481b71db7fbe774cb81938055aa596d0 | [
"MIT"
] | null | null | null | # AUTHENTICATION_BACKENDS = ('shub.plugins.globus.backend.GlobusOAuth2',)
# Show Globus log messages
import logging
logger = logging.getLogger("globus_sdk")
logger.addHandler(logging.StreamHandler())
logger.setLevel(logging.DEBUG)
| 25.888889 | 73 | 0.802575 |
1a37d6a939837438c460616078dc3ea93b5060c6 | 15,630 | py | Python | galpy/potential/TwoPowerTriaxialPotential.py | turnergarrow/galpy | 7132eddbf2dab491fe137790e31eacdc604b0534 | [
"BSD-3-Clause"
] | null | null | null | galpy/potential/TwoPowerTriaxialPotential.py | turnergarrow/galpy | 7132eddbf2dab491fe137790e31eacdc604b0534 | [
"BSD-3-Clause"
] | null | null | null | galpy/potential/TwoPowerTriaxialPotential.py | turnergarrow/galpy | 7132eddbf2dab491fe137790e31eacdc604b0534 | [
"BSD-3-Clause"
] | null | null | null | ###############################################################################
# TwoPowerTriaxialPotential.py: General class for triaxial potentials
# derived from densities with two power-laws
#
# amp/[4pia^3]
# ... | 36.690141 | 349 | 0.549328 |
1a3802f3c346e2fff413131471e6aa74d04ccc35 | 3,154 | py | Python | dorama.py | Kushal334/Python-project-2 | 11f62b7a7872499ec1274c73ffb9019e54039648 | [
"Apache-2.0"
] | 2 | 2022-01-24T07:33:52.000Z | 2022-02-05T23:03:52.000Z | dorama.py | Kushal334/Python-project-2 | 11f62b7a7872499ec1274c73ffb9019e54039648 | [
"Apache-2.0"
] | null | null | null | dorama.py | Kushal334/Python-project-2 | 11f62b7a7872499ec1274c73ffb9019e54039648 | [
"Apache-2.0"
] | null | null | null | """
My 5th bot.
I don't actually like those films, but that was an order. And, frankly, a very interesting one!
"""
from bs4 import BeautifulSoup
from datetime import datetime
import requests
import telebot
import json
def search_link(name):
"""Find a link for a film"""
with open("database.json", "r", encodin... | 39.924051 | 118 | 0.618897 |
1a389051f185104c0a9f89da9b6253949f4fe0c8 | 14,474 | py | Python | Allura/allura/lib/validators.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | 1 | 2019-03-17T04:16:15.000Z | 2019-03-17T04:16:15.000Z | Allura/allura/lib/validators.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | Allura/allura/lib/validators.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | 32.599099 | 106 | 0.565082 |
1a38a542d4601752471a77dfeaef7ccd2ec7316d | 1,464 | py | Python | setup.py | wuriyanto48/pystashlog | 1ab30c79fdf8ae780c9c564321a5dfe1758815ae | [
"MIT"
] | 1 | 2020-11-05T07:14:21.000Z | 2020-11-05T07:14:21.000Z | setup.py | wuriyanto48/pystashlog | 1ab30c79fdf8ae780c9c564321a5dfe1758815ae | [
"MIT"
] | null | null | null | setup.py | wuriyanto48/pystashlog | 1ab30c79fdf8ae780c9c564321a5dfe1758815ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
import pystashlog
import pathlib
HERE = pathlib.Path(__file__).parent.resolve()
# Get the long description from the README file
long_description = (HERE / 'README.md').read_text(encoding='utf-8')
setup(
name='pystashlog',
version=pystashlog.... | 35.707317 | 74 | 0.65847 |
1a3921e8d5f209cd7768da92d3493d3002180033 | 6,258 | py | Python | asposeimagingcloud/models/djvu_properties.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | 1 | 2022-01-14T10:06:26.000Z | 2022-01-14T10:06:26.000Z | asposeimagingcloud/models/djvu_properties.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | 3 | 2019-07-17T15:01:31.000Z | 2020-12-29T09:16:10.000Z | asposeimagingcloud/models/djvu_properties.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | null | null | null | # coding: utf-8
# ----------------------------------------------------------------------------
# <copyright company="Aspose" file="djvu_properties.py">
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtai... | 34.384615 | 92 | 0.621604 |
1a3932589cf78e9b33296140e811a0d39f3fa138 | 4,307 | py | Python | openleveldb/backend/server.py | LucaMoschella/openleveldb | b0061362e2b74aba47790f6164689b8d2fa87a5d | [
"BSD-3-Clause"
] | 6 | 2020-01-22T09:24:45.000Z | 2022-03-30T11:10:48.000Z | openleveldb/backend/server.py | LucaMoschella/openleveldb | b0061362e2b74aba47790f6164689b8d2fa87a5d | [
"BSD-3-Clause"
] | 5 | 2020-01-21T08:24:05.000Z | 2021-04-15T15:34:23.000Z | openleveldb/backend/server.py | lucmos/openleveldb | b0061362e2b74aba47790f6164689b8d2fa87a5d | [
"BSD-3-Clause"
] | null | null | null | """
Class that exposes the leveldb through REST API, with automatic serialization
to bytes and deserialization from bytes provided by the serialization module
"""
import http
import os
import pickle
import sys
from multiprocessing import Process
from pathlib import Path
from typing import Iterable, Tuple, Union
import... | 26.91875 | 88 | 0.658695 |
1a39b7761cce09f79e886983e9a9482e7c1d5836 | 4,503 | py | Python | ba.py | joeaortiz/gbp | 5670a498950bfa948da502b2381899ab46f61021 | [
"MIT"
] | 50 | 2020-03-10T08:49:45.000Z | 2022-03-24T01:50:24.000Z | ba.py | joeaortiz/gbp | 5670a498950bfa948da502b2381899ab46f61021 | [
"MIT"
] | 1 | 2022-03-21T02:36:36.000Z | 2022-03-21T03:03:38.000Z | ba.py | joeaortiz/gbp | 5670a498950bfa948da502b2381899ab46f61021 | [
"MIT"
] | 11 | 2020-04-24T16:29:48.000Z | 2022-03-09T07:39:30.000Z | """
Bundle Adjustment using GBP.
"""
import numpy as np
import argparse
from gbp import gbp_ba
import vis
parser = argparse.ArgumentParser()
parser.add_argument("--bal_file", required=True,
help="BAL style file with BA data")
parser.add_argument("--n_iters", type=int, default=200,
... | 42.084112 | 114 | 0.688652 |
1a39da9f438c52197ad50cb1a50ad222ccd69c8d | 4,004 | py | Python | alipay/aop/api/request/AlipayOpenAppServiceValidpageQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayOpenAppServiceValidpageQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayOpenAppServiceValidpageQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayOpenAppServiceValidpageQueryModel import AlipayOpenAppServiceValidpageQueryModel
class AlipayOpenAppServiceValidpageQueryReque... | 27.613793 | 148 | 0.647353 |
1a3a584309705420336639bab7187cab8ac83586 | 1,918 | py | Python | fastapi/account/jwt.py | ilDug/docker-utils | 6580e916a8c2c0d91f2e3da52a9d839507569bb7 | [
"MIT"
] | null | null | null | fastapi/account/jwt.py | ilDug/docker-utils | 6580e916a8c2c0d91f2e3da52a9d839507569bb7 | [
"MIT"
] | null | null | null | fastapi/account/jwt.py | ilDug/docker-utils | 6580e916a8c2c0d91f2e3da52a9d839507569bb7 | [
"MIT"
] | null | null | null | from typing import Union
from pydantic.types import UUID5
from account.models import JWTModel
import uuid
from time import time
from datetime import datetime, timedelta
from pathlib import Path
from config.conf import JWT_KEY_PATH, JWT_CERT_PATH
from cryptography.x509 import load_pem_x509_certificate
from fastapi impor... | 34.25 | 80 | 0.628259 |
1a3a80be5bf173391d85813f1f62d6aff54c1ae3 | 17,993 | py | Python | lib/rucio/api/replica.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | 187 | 2017-11-07T10:19:34.000Z | 2022-03-13T11:59:40.000Z | lib/rucio/api/replica.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | 2,592 | 2017-10-25T06:57:46.000Z | 2022-03-31T22:53:51.000Z | lib/rucio/api/replica.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | 322 | 2017-10-10T06:36:36.000Z | 2022-03-31T17:13:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2013-2021 CERN
#
# 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 a... | 39.115217 | 142 | 0.675874 |
1a3a9227ae037a29fe1f0e2c600e1c69fee51e6d | 8,697 | py | Python | datasets/wild/dataset.py | Chris10M/Lip2Speech | 81a57364054c7fbbede7c6de15861e49d53419d0 | [
"MIT"
] | 3 | 2022-01-19T22:14:14.000Z | 2022-03-23T04:21:57.000Z | datasets/wild/dataset.py | Chris10M/Lip2Speech | 81a57364054c7fbbede7c6de15861e49d53419d0 | [
"MIT"
] | 1 | 2021-10-05T18:09:59.000Z | 2021-10-05T18:09:59.000Z | datasets/wild/dataset.py | Chris10M/Lip2Speech | 81a57364054c7fbbede7c6de15861e49d53419d0 | [
"MIT"
] | 3 | 2021-10-16T05:40:45.000Z | 2022-03-18T06:05:49.000Z | import random
import torch
import sys
import torch.nn as nn
import torchaudio
import bz2
import pickle
import torchvision.transforms as transforms
import cv2
import math
import os
import numpy as np
from torch.utils.data import Dataset, DataLoader
from logging import Logger
from torchvision.transforms.transforms impo... | 35.210526 | 151 | 0.583535 |
1a3a9245c62214742d419b859a3066c8118a8b49 | 540 | py | Python | company/migrations/0008_auto_20161031_1434.py | konradko/directory-api | e9cd05b1deaf575e94352c46ddbd1857d8119fda | [
"MIT"
] | 1 | 2021-11-06T12:08:26.000Z | 2021-11-06T12:08:26.000Z | company/migrations/0008_auto_20161031_1434.py | konradko/directory-api | e9cd05b1deaf575e94352c46ddbd1857d8119fda | [
"MIT"
] | null | null | null | company/migrations/0008_auto_20161031_1434.py | konradko/directory-api | e9cd05b1deaf575e94352c46ddbd1857d8119fda | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2016-10-31 14:34
from __future__ import unicode_literals
import company.helpers
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('company', '0007_auto_20161030_1212'),
]
operations = [
... | 24.545455 | 117 | 0.65 |
1a3ac40ce87c019e34e535d1df811f499038a6da | 26,985 | py | Python | corehq/apps/couch_sql_migration/tests/test_casedifftool.py | challabeehyv/commcare-hq | b83d3d4d47b0c4660fc9ce730cde40fd612c2f11 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/couch_sql_migration/tests/test_casedifftool.py | challabeehyv/commcare-hq | b83d3d4d47b0c4660fc9ce730cde40fd612c2f11 | [
"BSD-3-Clause"
] | 2 | 2020-04-16T13:25:44.000Z | 2021-02-08T22:08:28.000Z | corehq/apps/couch_sql_migration/tests/test_casedifftool.py | challabeehyv/commcare-hq | b83d3d4d47b0c4660fc9ce730cde40fd612c2f11 | [
"BSD-3-Clause"
] | null | null | null | import json
from contextlib import contextmanager
from datetime import datetime, timedelta
from xml.sax.saxutils import unescape
from mock import patch
from casexml.apps.case.models import CommCareCase
from casexml.apps.case.sharedmodels import CommCareCaseIndex
from corehq.apps.domain.shortcuts import create_domain... | 42.496063 | 98 | 0.614304 |
1a3ad7f76f72043f8d334b72de5692fe4a75b44d | 100 | py | Python | backend/apollo/elections/apps.py | heidal/apollo | 576743e12048985ae8ef127224e1cb8ac49acd28 | [
"MIT"
] | 2 | 2020-02-28T16:24:55.000Z | 2020-03-27T17:12:50.000Z | backend/apollo/elections/apps.py | heidal/apollo | 576743e12048985ae8ef127224e1cb8ac49acd28 | [
"MIT"
] | 51 | 2020-02-12T20:52:08.000Z | 2022-02-27T00:23:20.000Z | backend/apollo/elections/apps.py | heidal/apollo | 576743e12048985ae8ef127224e1cb8ac49acd28 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class ElectionsConfig(AppConfig):
name = "apollo.elections"
| 16.666667 | 33 | 0.77 |
1a3ae61e8034343a8780cf14547adb105e6c4aea | 69 | py | Python | __init__.py | theacb/lettuce | eb19e558e445a88a1cbfa8850f79fd67a79ec58f | [
"MIT"
] | 4 | 2016-08-11T06:22:09.000Z | 2020-11-12T08:42:04.000Z | __init__.py | theacb/lettuce | eb19e558e445a88a1cbfa8850f79fd67a79ec58f | [
"MIT"
] | null | null | null | __init__.py | theacb/lettuce | eb19e558e445a88a1cbfa8850f79fd67a79ec58f | [
"MIT"
] | 2 | 2016-12-16T04:18:53.000Z | 2020-11-12T08:42:11.000Z | from lettuceUI import LettuceUI
__all__ = ['LettuceUI'
]
| 13.8 | 31 | 0.637681 |
1a3af33ab6d5ea6f1de62d595e3f74f02867ab6e | 51 | py | Python | bookworm/service/__init__.py | mush42/bookworm | a4bdd89363137a89a1bed1e9e072de4fb55576fd | [
"MIT"
] | 18 | 2019-07-19T22:12:15.000Z | 2020-08-26T17:45:19.000Z | bookworm/service/__init__.py | mush42/bookworm | a4bdd89363137a89a1bed1e9e072de4fb55576fd | [
"MIT"
] | 44 | 2019-07-15T10:17:00.000Z | 2020-07-26T11:22:53.000Z | bookworm/service/__init__.py | mush42/bookworm | a4bdd89363137a89a1bed1e9e072de4fb55576fd | [
"MIT"
] | 9 | 2019-09-03T13:13:31.000Z | 2020-08-25T13:55:27.000Z | # coding: utf-8
from .base import BookwormService
| 12.75 | 33 | 0.764706 |
1a3b0e6d4cb761ecf892388f2fd52d7723f60d77 | 15,717 | py | Python | msticpy/datamodel/pivot_register.py | aw350m33d/msticpy | e099a09a600dee3740b10d9ccf4ac836e2cbd3a8 | [
"MIT"
] | null | null | null | msticpy/datamodel/pivot_register.py | aw350m33d/msticpy | e099a09a600dee3740b10d9ccf4ac836e2cbd3a8 | [
"MIT"
] | null | null | null | msticpy/datamodel/pivot_register.py | aw350m33d/msticpy | e099a09a600dee3740b10d9ccf4ac836e2cbd3a8 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""Pivot h... | 35.883562 | 88 | 0.632054 |
1a3b185faf4ccc3b0c94dcb491073bb939997ea3 | 687 | py | Python | vr/common/balancer/dummy.py | yougov/vr.common | 8b0312481185d0c195e33665df1165a8de7ee3e8 | [
"MIT"
] | null | null | null | vr/common/balancer/dummy.py | yougov/vr.common | 8b0312481185d0c195e33665df1165a8de7ee3e8 | [
"MIT"
] | 4 | 2017-04-02T13:28:36.000Z | 2019-03-01T14:32:54.000Z | vr/common/balancer/dummy.py | yougov/vr.common | 8b0312481185d0c195e33665df1165a8de7ee3e8 | [
"MIT"
] | 2 | 2018-05-08T16:14:21.000Z | 2022-03-26T07:43:50.000Z | from collections import defaultdict
import logging
from . import base
class DummyBalancer(base.Balancer):
"""
Fake balancer class for local development.
"""
def __init__(self, config):
self.config = config
self.pools = defaultdict(set)
def add_nodes(self, pool, nodes):
se... | 23.689655 | 68 | 0.634643 |
1a3b53803cf9f9b3ff4799c9090782674b8265f5 | 4,646 | py | Python | src/zope/server/ftp/publisher.py | cjwatson/zope.server | 9c40c8a1ae57d28f1e0fa21e740826befefc30d5 | [
"ZPL-2.1"
] | null | null | null | src/zope/server/ftp/publisher.py | cjwatson/zope.server | 9c40c8a1ae57d28f1e0fa21e740826befefc30d5 | [
"ZPL-2.1"
] | null | null | null | src/zope/server/ftp/publisher.py | cjwatson/zope.server | 9c40c8a1ae57d28f1e0fa21e740826befefc30d5 | [
"ZPL-2.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# TH... | 33.666667 | 89 | 0.62118 |
1a3b65690ab61b456403fe3998d720d09f720c78 | 4,188 | py | Python | examples/single_calculations/example_structure_through_file.py | borellim/aiida-cp2k | a049931946992a5332edc7efd6b9d7e78b42156e | [
"MIT"
] | 1 | 2021-06-13T09:14:46.000Z | 2021-06-13T09:14:46.000Z | examples/single_calculations/example_structure_through_file.py | borellim/aiida-cp2k | a049931946992a5332edc7efd6b9d7e78b42156e | [
"MIT"
] | null | null | null | examples/single_calculations/example_structure_through_file.py | borellim/aiida-cp2k | a049931946992a5332edc7efd6b9d7e78b42156e | [
"MIT"
] | 3 | 2018-10-16T16:34:35.000Z | 2018-10-19T16:13:01.000Z | # -*- coding: utf-8 -*-
# pylint: disable=invalid-name
###############################################################################
# Copyright (c), The AiiDA-CP2K authors. #
# SPDX-License-Identifier: MIT #
# AiiDA-CP2K is hosted on... | 32.215385 | 97 | 0.458214 |
1a3b6bcf75566e920dd4b17157464b9ebac7c5e8 | 4,605 | py | Python | sparksteps/steps.py | abdulbasitds/sparksteps | fb5b383acaf82f26b30fa44e270ae060cee88ab8 | [
"Apache-2.0"
] | 1 | 2019-05-30T07:46:38.000Z | 2019-05-30T07:46:38.000Z | sparksteps/steps.py | abdulbasitds/sparksteps | fb5b383acaf82f26b30fa44e270ae060cee88ab8 | [
"Apache-2.0"
] | null | null | null | sparksteps/steps.py | abdulbasitds/sparksteps | fb5b383acaf82f26b30fa44e270ae060cee88ab8 | [
"Apache-2.0"
] | 1 | 2017-09-13T02:02:39.000Z | 2017-09-13T02:02:39.000Z | # -*- coding: utf-8 -*-
"""Create EMR steps and upload files."""
import os
import tempfile
import zipfile
REMOTE_DIR = '/home/hadoop/'
S3_KEY_PREFIX = 'sparksteps/sources/'
S3_URI_FMT = "s3://{bucket}/{key}"
def get_basename(path):
return os.path.basename(os.path.normpath(path))
def ls_recursive(dirname):
... | 24.891892 | 79 | 0.630619 |
1a3b779246024c08c6d642254fbf15c8451a0fed | 6,646 | py | Python | ldapdb/models/fields.py | unistra/django-ldapdb | 14ab432a8e50d4f4b8dfafa251fc868843d3d519 | [
"BSD-3-Clause"
] | 2 | 2015-03-05T08:02:21.000Z | 2017-03-27T11:00:11.000Z | ldapdb/models/fields.py | unistra/django-ldapdb | 14ab432a8e50d4f4b8dfafa251fc868843d3d519 | [
"BSD-3-Clause"
] | null | null | null | ldapdb/models/fields.py | unistra/django-ldapdb | 14ab432a8e50d4f4b8dfafa251fc868843d3d519 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# django-ldapdb
# Copyright (c) 2009-2011, Bolloré telecom
# All rights reserved.
#
# See AUTHORS file for a full list of contributors.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# ... | 41.5375 | 82 | 0.665664 |
1a3beb92b065d95cfbcd881ec7920971f6ddfd30 | 8,222 | py | Python | src/cfiddle/DebugInfo.py | NVSL/fiddle | 5edffa92caa0894057a449ad5accb23af748e657 | [
"MIT"
] | 2 | 2022-01-22T06:12:52.000Z | 2022-01-24T07:29:44.000Z | src/cfiddle/DebugInfo.py | NVSL/cfiddle | 5edffa92caa0894057a449ad5accb23af748e657 | [
"MIT"
] | null | null | null | src/cfiddle/DebugInfo.py | NVSL/cfiddle | 5edffa92caa0894057a449ad5accb23af748e657 | [
"MIT"
] | null | null | null | import contextlib
import io
from elftools.elf.elffile import ELFFile
from elftools.dwarf.die import DIE
from elftools.dwarf.die import AttributeValue
from elftools.dwarf.descriptions import describe_DWARF_expr, set_global_machine_arch
from elftools.dwarf.locationlists import LocationEntry, LocationExpr, Location... | 33.287449 | 119 | 0.573097 |
1a3bf3eec242f0dbbf8a22123b39d928f1459704 | 9,538 | py | Python | dyspatch_client/models/template_read.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | dyspatch_client/models/template_read.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | dyspatch_client/models/template_read.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Dyspatch API
# Introduction The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted. See our [Implementation Guide](ht... | 29.993711 | 845 | 0.599077 |
1a3c376a9bf5d79305c20753c4c41957badb8e46 | 3,528 | py | Python | lmtuners/models/albert.py | shoarora/polytune | 86f31ba3f41ea47edcfa0442a29a79a2a46deaeb | [
"MIT"
] | 2 | 2020-09-17T10:12:36.000Z | 2020-11-22T16:34:08.000Z | lmtuners/models/albert.py | shoarora/polytune | 86f31ba3f41ea47edcfa0442a29a79a2a46deaeb | [
"MIT"
] | null | null | null | lmtuners/models/albert.py | shoarora/polytune | 86f31ba3f41ea47edcfa0442a29a79a2a46deaeb | [
"MIT"
] | null | null | null | """Based on BertForTokenClassification, implemented here since it's not in transformers currently."""
from torch import nn
from transformers import AlbertModel, AlbertPreTrainedModel
class AlbertForTokenClassification(AlbertPreTrainedModel):
def __init__(self, config):
super().__init__(config)
sel... | 44.658228 | 120 | 0.640873 |
1a3c41b48eb977b9bd1a0bc76609ede5865b1c44 | 2,363 | py | Python | examples/translation/predict.py | JonathanRaiman/dali-cython-stub | e258469aeb1d4cb3e4cdf5c07e8948f461a038f1 | [
"MIT"
] | 7 | 2016-06-20T17:50:06.000Z | 2019-12-13T17:27:46.000Z | examples/translation/predict.py | JonathanRaiman/dali-cython | e258469aeb1d4cb3e4cdf5c07e8948f461a038f1 | [
"MIT"
] | 6 | 2015-08-04T07:25:38.000Z | 2015-08-13T22:06:22.000Z | examples/translation/predict.py | JonathanRaiman/dali-cython | e258469aeb1d4cb3e4cdf5c07e8948f461a038f1 | [
"MIT"
] | 2 | 2016-07-04T21:38:14.000Z | 2016-08-31T02:53:19.000Z | import argparse
import random
import math
from dali.utils import (
set_device_from_args,
add_device_args,
unpickle_as_dict,
)
from dali.data.utils import split_punctuation
from translation import TranslationModel
def parse_args():
parser = argparse.ArgumentParser()
add_device_args(parser)
par... | 36.353846 | 126 | 0.635209 |
1a3c456a86973a4624640be9b9c45c9812489279 | 1,778 | py | Python | components/aws/sagemaker/tests/integration_tests/resources/definition/hpo_pipeline.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | components/aws/sagemaker/tests/integration_tests/resources/definition/hpo_pipeline.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | components/aws/sagemaker/tests/integration_tests/resources/definition/hpo_pipeline.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | import kfp
from kfp import components
from kfp import dsl
sagemaker_hpo_op = components.load_component_from_file(
"../../hyperparameter_tuning/component.yaml"
)
@dsl.pipeline(
name="SageMaker HyperParameter Tuning", description="SageMaker HPO job test"
)
def hpo_pipeline(
region="",
job_name="",
... | 26.147059 | 80 | 0.681665 |
1a3c5bdb9db681db9dd806d00addec26c14c465b | 2,980 | py | Python | fbchat/_plan.py | adbenitez/fbchat | 8052b818de5de9682f6d64405579ad640cd657ee | [
"BSD-3-Clause"
] | 1 | 2020-08-06T00:51:25.000Z | 2020-08-06T00:51:25.000Z | fbchat/_plan.py | adbenitez/fbchat | 8052b818de5de9682f6d64405579ad640cd657ee | [
"BSD-3-Clause"
] | null | null | null | fbchat/_plan.py | adbenitez/fbchat | 8052b818de5de9682f6d64405579ad640cd657ee | [
"BSD-3-Clause"
] | null | null | null | import attr
import json
from ._core import Enum
class GuestStatus(Enum):
INVITED = 1
GOING = 2
DECLINED = 3
@attr.s(cmp=False)
class Plan:
"""Represents a plan."""
#: ID of the plan
uid = attr.ib(None, init=False)
#: Plan time (timestamp), only precise down to the minute
time = attr... | 29.50495 | 86 | 0.558725 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.