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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
215b050ba2f239bbbc85c43d239d3cf2a7b56a47 | 5,249 | py | Python | experiments/murtaza/multiworld/skew_fit/real_world/door/train_conv_vae.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/murtaza/multiworld/skew_fit/real_world/door/train_conv_vae.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/murtaza/multiworld/skew_fit/real_world/door/train_conv_vae.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | from multiworld.core.image_env import unormalize_image
from torch import nn
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.launcher_util import run_experiment
from rlkit.misc.ml_util import PiecewiseLinearSchedule
from rlkit.torch.vae.conv_vae import ConvVAE, ConvVAEDouble
from rlkit.torch.vae.vae_trainer... | 38.595588 | 108 | 0.633835 |
215b17aa98b82e21db8ad6c3898a6972d3909d25 | 68 | py | Python | oscar/lib/python2.7/site-packages/certifi/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/certifi/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/certifi/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from .core import where, old_where
__version__ = "2017.07.27.1"
| 17 | 35 | 0.705882 |
215b206363df04cabde79d5bd073385f7c1717a8 | 130 | py | Python | usecases/extasy_gromacs_lsdmap_adaptive/misc_files/extract.py | chemlove/radical.ensemblemd | 0ec4b127760d2fee88d4eae1768fecec4bdd6b21 | [
"MIT"
] | 1 | 2015-09-11T02:55:29.000Z | 2015-09-11T02:55:29.000Z | usecases/extasy_gromacs_lsdmap_adaptive/misc_files/extract.py | chemlove/radical.ensemblemd | 0ec4b127760d2fee88d4eae1768fecec4bdd6b21 | [
"MIT"
] | 119 | 2015-01-05T11:51:10.000Z | 2016-09-22T13:59:12.000Z | usecases/extasy_gromacs_lsdmap_adaptive/misc_files/extract.py | chemlove/radical.ensemblemd | 0ec4b127760d2fee88d4eae1768fecec4bdd6b21 | [
"MIT"
] | 1 | 2018-12-29T07:20:17.000Z | 2018-12-29T07:20:17.000Z | import sys
if __name__ == '__main__':
print (int(sys.stdin.readlines()[7]))/25
#print int(sys.stdin.readlines()[6].strip())/25
| 21.666667 | 48 | 0.676923 |
215b3c9229046d55981c46c8b2425af504228120 | 1,186 | py | Python | rlkit/envs/wrappers/stack_observation_env.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1,662 | 2018-01-25T05:23:56.000Z | 2021-07-19T10:14:06.000Z | rlkit/envs/wrappers/stack_observation_env.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 121 | 2018-05-07T22:09:09.000Z | 2021-07-08T16:33:37.000Z | rlkit/envs/wrappers/stack_observation_env.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 443 | 2018-03-04T17:53:25.000Z | 2021-07-21T17:16:16.000Z | import numpy as np
from gym.spaces import Box
from rlkit.envs.proxy_env import ProxyEnv
class StackObservationEnv(ProxyEnv):
"""
Env wrapper for passing history of observations as the new observation
"""
def __init__(
self,
env,
stack_obs=1,
):
ProxyEn... | 27.581395 | 74 | 0.602867 |
215b42e303a846739bdcf19824a236cfc0035e5f | 1,458 | py | Python | researchtool/research.py | ChristophBeckmann/ResearchTool | 178ae87a23ea7fcc908505a8469075be3c2205ee | [
"MIT"
] | null | null | null | researchtool/research.py | ChristophBeckmann/ResearchTool | 178ae87a23ea7fcc908505a8469075be3c2205ee | [
"MIT"
] | null | null | null | researchtool/research.py | ChristophBeckmann/ResearchTool | 178ae87a23ea7fcc908505a8469075be3c2205ee | [
"MIT"
] | null | null | null | import logging
from bs4 import BeautifulSoup
import requests
logger = logging.getLogger(__name__)
def scrape(query, language):
"""
Web Scraping Function with BeautifulSoup as a Package
:param query: Search Query -> Keyword which is searched on Google Scholar
:param language: in which language?
:... | 29.16 | 117 | 0.624829 |
215b4bdd7273a4b3d02634142c789f81e685e738 | 2,622 | py | Python | docs/conf.py | juliendehos/nevergrad | b31a66bdc883e29a6c8572e341b4b56cc4157a9d | [
"MIT"
] | null | null | null | docs/conf.py | juliendehos/nevergrad | b31a66bdc883e29a6c8572e341b4b56cc4157a9d | [
"MIT"
] | null | null | null | docs/conf.py | juliendehos/nevergrad | b31a66bdc883e29a6c8572e341b4b56cc4157a9d | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common opt... | 31.97561 | 79 | 0.659802 |
215b8d722283291f753b68ee5ead6dfba43815d1 | 95,185 | py | Python | api_tests/nodes/views/test_node_contributors_list.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | api_tests/nodes/views/test_node_contributors_list.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | 4 | 2016-05-13T14:24:16.000Z | 2017-03-30T15:28:31.000Z | api_tests/nodes/views/test_node_contributors_list.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import random
import mock
import time
from nose.tools import * # flake8: noqa
from rest_framework import exceptions
from unittest import TestCase
from api.base.exceptions import Conflict
from api.base.settings.defaults import API_BASE
from api.nodes.serializers import NodeContributorsCrea... | 46.116764 | 235 | 0.58983 |
215b907f6b4a40c2da330ff918e422a37f301a71 | 837 | py | Python | higra/image/__init__.py | deisemaia/Higra | 82cb78b606a383f3961faa882457a9a987f802e0 | [
"CECILL-B"
] | 64 | 2019-08-18T19:23:23.000Z | 2022-03-21T04:15:04.000Z | higra/image/__init__.py | deisemaia/Higra | 82cb78b606a383f3961faa882457a9a987f802e0 | [
"CECILL-B"
] | 120 | 2019-08-16T09:10:35.000Z | 2022-03-17T09:42:58.000Z | higra/image/__init__.py | deisemaia/Higra | 82cb78b606a383f3961faa882457a9a987f802e0 | [
"CECILL-B"
] | 12 | 2019-10-04T07:35:55.000Z | 2021-01-10T19:59:11.000Z | ############################################################################
# Copyright ESIEE Paris (2018) #
# #
# Contributor(s) : Benjamin Perret #
# ... | 52.3125 | 76 | 0.315412 |
215bcfacbc336bb52154f437c957c5e95845db60 | 2,836 | py | Python | leetcode_python/Array/candy-crush.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Array/candy-crush.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Array/candy-crush.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # V0
# V1
# http://bookshadow.com/weblog/2017/11/05/leetcode-candy-crush/
class Solution(object):
def candyCrush(self, board):
"""
:type board: List[List[int]]
:rtype: List[List[int]]
"""
w, h = len(board), len(board[0])
stop = False
while not stop:
... | 32.597701 | 89 | 0.328632 |
215bff0085f8a8112d5cc144d20ebbacd6f6d0a6 | 5,780 | py | Python | powerapi/database/influxdb2.py | Zenika/powerapi | a6bcc8fefeb29dd83cc8bc1191b1c3609aa9043d | [
"BSD-3-Clause"
] | null | null | null | powerapi/database/influxdb2.py | Zenika/powerapi | a6bcc8fefeb29dd83cc8bc1191b1c3609aa9043d | [
"BSD-3-Clause"
] | null | null | null | powerapi/database/influxdb2.py | Zenika/powerapi | a6bcc8fefeb29dd83cc8bc1191b1c3609aa9043d | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2018, INRIA
# Copyright (c) 2018, University of Lille
# All rights reserved.
# 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, thi... | 36.582278 | 123 | 0.66782 |
215c1106653e15d9d8a4ecc41ff0af5bf818e7ee | 28,379 | py | Python | deepRL.py | ncl11/deep-record-linkage | 41f93b63b796038b0398804db9ad07e122d4cc98 | [
"MIT"
] | null | null | null | deepRL.py | ncl11/deep-record-linkage | 41f93b63b796038b0398804db9ad07e122d4cc98 | [
"MIT"
] | null | null | null | deepRL.py | ncl11/deep-record-linkage | 41f93b63b796038b0398804db9ad07e122d4cc98 | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.keras import Input
from tensorflow.keras import Model
from tensorflow.keras.layers import GRU
from tensorflow.keras.optimizers import Adam
from keras import backend as K
from keras.layers import Lambda
import keras
from keras.losses import bce
from tensorflow.keras.layers import ... | 35.253416 | 185 | 0.673209 |
215c44738feb25ac01704a84bb87ebdfff5aa84e | 30,183 | py | Python | src/sage/combinat/root_system/reflection_group_real.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/reflection_group_real.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/root_system/reflection_group_real.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | r"""
Finite real reflection groups
-------------------------------
Let `V` be a finite-dimensional real vector space. A reflection of
`V` is an operator `r \in \operatorname{GL}(V)` that has order `2`
and fixes pointwise a hyperplane in `V`.
In the present implementation, finite real reflection groups are
tied with a ... | 40.898374 | 144 | 0.490177 |
215c8696748aa9a7dbe04fdf83c5b96ac6bad19a | 1,135 | py | Python | analy/draw_bleu.py | jianqiaoSE/ceGan | 096ec435b5d03344bf23e05d3e5e3e97cb4b0be5 | [
"MIT"
] | 1 | 2021-12-23T09:17:37.000Z | 2021-12-23T09:17:37.000Z | analy/draw_bleu.py | jianqiaoSE/ceGan | 096ec435b5d03344bf23e05d3e5e3e97cb4b0be5 | [
"MIT"
] | null | null | null | analy/draw_bleu.py | jianqiaoSE/ceGan | 096ec435b5d03344bf23e05d3e5e3e97cb4b0be5 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import re
rull = re.compile('BLEU-\[2, 3, 4, 5\] = \[(.*?),')
nll_gen_mode=re.compile('NLL_gen = (.*?),')
base_url = '/home/b8313/coding/py/gan-torch-text/log/'
if __name__ == '__main__':
files_list = ['log_1025_1037_01_ce_vec0_8.txt']
for filename in files_list:
with o... | 29.102564 | 72 | 0.486344 |
215ca27921d4d7a135227fb3f7e25cc356d13054 | 554 | py | Python | deepracing_py/deepracing/pose_utils/__init__.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | 11 | 2020-06-29T15:21:37.000Z | 2021-04-12T00:42:26.000Z | deepracing_py/deepracing/pose_utils/__init__.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | null | null | null | deepracing_py/deepracing/pose_utils/__init__.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | 4 | 2019-01-23T23:36:57.000Z | 2021-07-02T00:18:37.000Z | from .pose_utils import fromHomogenousTransform
from .pose_utils import toHomogenousTransform
from .pose_utils import fromHomogenousTransformArray
from .pose_utils import toHomogenousTransformArray
from .pose_utils import interpolateVectors
from .pose_utils import toLocalCoordinatesPose
from .pose_utils import toLocalC... | 46.166667 | 52 | 0.893502 |
215cd5bf7186cb7862f31ba8192f08a8d22a420f | 36 | py | Python | scratch.py | stevoWinke1/python | 70649dd2a3801584af1394b0a68e6f1befa39ef2 | [
"MIT"
] | null | null | null | scratch.py | stevoWinke1/python | 70649dd2a3801584af1394b0a68e6f1befa39ef2 | [
"MIT"
] | null | null | null | scratch.py | stevoWinke1/python | 70649dd2a3801584af1394b0a68e6f1befa39ef2 | [
"MIT"
] | 9 | 2016-10-14T15:22:31.000Z | 2016-10-14T15:50:47.000Z |
list = ['a','b','c']
print(list)
| 6 | 20 | 0.444444 |
215ceed25cac37303848261b9cf929fc5c014af0 | 5,635 | py | Python | sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 39.131944 | 133 | 0.659272 |
215d1d17b559d595feb8f31401a1960fae510048 | 36,063 | py | Python | config.py | ozbenh/eCMD | f3ab818e3578ee09dfdb8a653d64065727c6741b | [
"Apache-2.0"
] | null | null | null | config.py | ozbenh/eCMD | f3ab818e3578ee09dfdb8a653d64065727c6741b | [
"Apache-2.0"
] | null | null | null | config.py | ozbenh/eCMD | f3ab818e3578ee09dfdb8a653d64065727c6741b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# This script will look for any ecmd-* dirs at the top level and
# setup a number of variables used through out the make
# Those variables are then written out to a makefile.config
# makefile.config is included by makefile.base
# Python module imports
import os
import sys
import glob
import plat... | 38.283439 | 127 | 0.637606 |
215d5fd670dadd73b4ca54ca1142c25ec1f4ead9 | 2,141 | py | Python | Metrics/centerGlyphsAndZeroWidth.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | 2 | 2021-02-12T20:36:29.000Z | 2021-11-03T08:04:01.000Z | Metrics/centerGlyphsAndZeroWidth.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | null | null | null | Metrics/centerGlyphsAndZeroWidth.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | null | null | null | # MenuTitle: Center and Zero-Width current Layer
# -*- coding: utf-8 -*-
__doc__ = """
Center and make Zero-Width all selected glyphs.
"""
from collections import defaultdict
class centerAndZeroWidth:
def __init__(self):
self.composites_dict = defaultdict(set)
for g in Glyphs.font.glyphs:
... | 29.736111 | 75 | 0.632415 |
215d64ff650bc1e8252a4a3d9366feb76ea4ec0a | 683 | py | Python | mmcv/runner/hooks/__init__.py | Ixuanzhang/mmdet | a8f8397e49e3091f23262f8ace9641ee2c6be746 | [
"Apache-2.0"
] | null | null | null | mmcv/runner/hooks/__init__.py | Ixuanzhang/mmdet | a8f8397e49e3091f23262f8ace9641ee2c6be746 | [
"Apache-2.0"
] | null | null | null | mmcv/runner/hooks/__init__.py | Ixuanzhang/mmdet | a8f8397e49e3091f23262f8ace9641ee2c6be746 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Open-MMLab. All rights reserved.
from .checkpoint import CheckpointHook
from .closure import ClosureHook
from .hook import Hook
from .iter_timer import IterTimerHook
from .logger import (LoggerHook, TensorboardLoggerHook, TextLoggerHook,
WandbLoggerHook)
from .lr_updater import LrUp... | 37.944444 | 78 | 0.774524 |
215d6794101c1a1fd1794484e4dfcea534f8ba5c | 17,754 | py | Python | cogs/mod.py | joinemm/Miso-Bot | e1cd92fe71fbfdd45487e57e495b8640596732d5 | [
"MIT"
] | null | null | null | cogs/mod.py | joinemm/Miso-Bot | e1cd92fe71fbfdd45487e57e495b8640596732d5 | [
"MIT"
] | null | null | null | cogs/mod.py | joinemm/Miso-Bot | e1cd92fe71fbfdd45487e57e495b8640596732d5 | [
"MIT"
] | null | null | null | import asyncio
import arrow
import nextcord
from nextcord.ext import commands, tasks
from modules import exceptions, log, util
logger = log.get_logger(__name__)
class Mod(commands.Cog):
"""Moderation commands"""
def __init__(self, bot):
self.bot = bot
self.icon = "🔨"
self.unmute_l... | 37.220126 | 121 | 0.538301 |
215dcdfef1d2e8c5c46879538a05d8f39ed426ee | 4,695 | py | Python | vyperlogix/svn/svnadmin.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/svn/svnadmin.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/svn/svnadmin.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | __copyright__ = """\
(c). Copyright 2008-2020, Vyper Logix Corp., All Rights Reserved.
Published under Creative Commons License
(http://creativecommons.org/licenses/by-nc/3.0/)
restricted to non-commercial educational use only.,
http://www.VyperLogix.com for details
THE AUTHOR VYPER LOGIX CORP DISCLAIMS ALL WARRA... | 39.125 | 209 | 0.689031 |
215de4caaed17cf8d2fd9fe7d5dbe087fde8cfbf | 23,889 | py | Python | python_modules/dagster/dagster/daemon/sensor.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/daemon/sensor.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/daemon/sensor.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import time
from typing import Dict, NamedTuple, Optional
import pendulum
from dagster import check, seven
from dagster.core.definitions.run_request import InstigatorType
from dagster.core.definitions.sensor_definition import DefaultSensorStatus, SensorExecutionData
from dagster.core.errors impor... | 37.561321 | 157 | 0.645192 |
215e05bf99a77102f9e2482c14e48ac5e5848f9f | 45,741 | py | Python | neo/test/coretest/test_analogsignal.py | rdarie/python-neo | 87b7943fc6c8b25ada5543ffe145b32f1a50b6c0 | [
"BSD-3-Clause"
] | null | null | null | neo/test/coretest/test_analogsignal.py | rdarie/python-neo | 87b7943fc6c8b25ada5543ffe145b32f1a50b6c0 | [
"BSD-3-Clause"
] | null | null | null | neo/test/coretest/test_analogsignal.py | rdarie/python-neo | 87b7943fc6c8b25ada5543ffe145b32f1a50b6c0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tests of the neo.core.analogsignal.AnalogSignal class and related functions
"""
# needed for python 3 compatibility
from __future__ import division
import os
import pickle
import copy
import unittest
import numpy as np
import quantities as pq
from neo.core.dataobject import ArrayDict
t... | 48.660638 | 120 | 0.656457 |
215e1d3cee1e60befc3c20b39649efe2302ac407 | 850 | py | Python | ch04/code/ch04-04_postgis_valid.py | MatthiasWunsch/python-geospatial-analysis-cookbook | 88946ca6242283c9110488c64ac44057a53e2831 | [
"MIT"
] | 98 | 2015-06-14T08:42:21.000Z | 2022-03-09T16:48:43.000Z | ch04/code/ch04-04_postgis_valid.py | MatthiasWunsch/python-geospatial-analysis-cookbook | 88946ca6242283c9110488c64ac44057a53e2831 | [
"MIT"
] | 6 | 2015-12-23T09:56:33.000Z | 2022-02-13T20:06:05.000Z | ch04/code/ch04-04_postgis_valid.py | MatthiasWunsch/python-geospatial-analysis-cookbook | 88946ca6242283c9110488c64ac44057a53e2831 | [
"MIT"
] | 43 | 2015-08-24T13:13:32.000Z | 2022-03-14T20:55:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import psycopg2
# Database Connection Info
db_host = "localhost"
db_user = "pluto"
db_passwd = "stars"
db_database = "py_geoan_cb"
db_port = "5432"
# connect to DB
conn = psycopg2.connect(host=db_host, user=db_user, port=db_port, password=db_passwd, database=db_database)... | 20.238095 | 107 | 0.637647 |
215e29b11f7921bc413dcb4dc7cc4839666ed874 | 1,340 | py | Python | component/widget/licence_dialog.py | ingdanielguerrero/gwb | 162f7e1a885945814c584a188e78d571a32a9d80 | [
"MIT"
] | null | null | null | component/widget/licence_dialog.py | ingdanielguerrero/gwb | 162f7e1a885945814c584a188e78d571a32a9d80 | [
"MIT"
] | null | null | null | component/widget/licence_dialog.py | ingdanielguerrero/gwb | 162f7e1a885945814c584a188e78d571a32a9d80 | [
"MIT"
] | null | null | null | import shutil
import ipyvuetify as v
from sepal_ui import sepalwidgets as sw
from component import parameter as cp
from component.message import cm
class LicenceDialog(sw.SepalWidget, v.Dialog):
def __init__(self):
with cp.eula_md.open() as f:
licence = f.read()
mkd = ... | 24.814815 | 66 | 0.514925 |
215e43244d20cef1499a26dadb96eed2ced0983c | 2,336 | py | Python | tests/ai/test_ai.py | Brinfer/ClearWay | 208abe652350ae457f4195ac3e73e6006738974a | [
"MIT"
] | null | null | null | tests/ai/test_ai.py | Brinfer/ClearWay | 208abe652350ae457f4195ac3e73e6006738974a | [
"MIT"
] | null | null | null | tests/ai/test_ai.py | Brinfer/ClearWay | 208abe652350ae457f4195ac3e73e6006738974a | [
"MIT"
] | null | null | null | """Bicycles detection test with YOLO and openCV."""
from clearway.ai import ai
from pytest_mock import MockerFixture
def test_initialise_ai_instance(mocker: MockerFixture) -> None:
"""Test of the instance creation method."""
__on_raspberry = False
__see_real_time_processing = False
__yolo_weights = "y... | 26.545455 | 71 | 0.577911 |
215e65ecb7f1d0641022e099acf3077e609253ba | 1,730 | py | Python | openet/openet.py | dgketchum/MT_RSense | 0048c1ccb1ff6e48bd630edd477f95ae29fea06d | [
"Apache-2.0"
] | null | null | null | openet/openet.py | dgketchum/MT_RSense | 0048c1ccb1ff6e48bd630edd477f95ae29fea06d | [
"Apache-2.0"
] | null | null | null | openet/openet.py | dgketchum/MT_RSense | 0048c1ccb1ff6e48bd630edd477f95ae29fea06d | [
"Apache-2.0"
] | null | null | null | import json
from calendar import monthrange
from pprint import pprint
from datetime import datetime
import requests
requests.packages.urllib3.disable_warnings(requests.packages.urllib3.exceptions.InsecureRequestWarning)
with open('/home/dgketchum/PycharmProjects/MT_Rsense/data/auth.json', 'r') as j:
API_KEY = js... | 35.306122 | 103 | 0.597688 |
215e79c37c2050582359fcedbee5e8c82bc1fb2c | 3,966 | py | Python | experience_replay_sewak.py | sebtac/MLxE | 93baa6b7c9fd14e54abd7199e868fb828e9a7c52 | [
"Apache-2.0"
] | 1 | 2020-12-15T17:19:33.000Z | 2020-12-15T17:19:33.000Z | experience_replay_sewak.py | sebtac/MLxE | 93baa6b7c9fd14e54abd7199e868fb828e9a7c52 | [
"Apache-2.0"
] | null | null | null | experience_replay_sewak.py | sebtac/MLxE | 93baa6b7c9fd14e54abd7199e868fb828e9a7c52 | [
"Apache-2.0"
] | null | null | null | """ A3C in Code - ExperienceReplayMemory
Based On:
A3C Code as in the book Deep Reinforcement Learning, Chapter 12.
Runtime: Python 3.6.5
DocStrings: GoogleStyle
Author : Mohit Sewak (p20150023@goa-bits-pilani.ac.in)
******************************************************************
Adjusted: Sebastian Taciak... | 31.728 | 119 | 0.654816 |
215eb297096c03f9340297abd31e91b382f065ea | 8,916 | py | Python | experiments/ashvin/icra2021/final/new/close_black_handle3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icra2021/final/new/close_black_handle3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icra2021/final/new/close_black_handle3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from rlkit.demos.source.dict_to_mdp_path_loader import EncoderDictToMDPPathLoader
from rlkit.launchers.experiments.ashvin.awac_rig import awac_rig_experiment
from rlkit.launchers.launcher_util import run_experiment
from rlkit.launchers.arglauncher import run_variants
from rlkit.t... | 35.521912 | 122 | 0.605989 |
215ee08a8d2b3c241a1ef41fa89c81bf88c5d157 | 217 | py | Python | vkontakte_users/factories.py | gorelikspb/django-vkontakte-users | 0969bae1842d90db57a274d0a5c7eb67d6ff4865 | [
"BSD-3-Clause"
] | 1 | 2020-10-11T11:02:22.000Z | 2020-10-11T11:02:22.000Z | vkontakte_users/factories.py | gorelikspb/django-vkontakte-users | 0969bae1842d90db57a274d0a5c7eb67d6ff4865 | [
"BSD-3-Clause"
] | null | null | null | vkontakte_users/factories.py | gorelikspb/django-vkontakte-users | 0969bae1842d90db57a274d0a5c7eb67d6ff4865 | [
"BSD-3-Clause"
] | null | null | null | from models import User
import factory
import random
class UserFactory(factory.DjangoModelFactory):
remote_id = factory.Sequence(lambda n: n)
sex = random.choice([1,2])
class Meta:
model = User
| 18.083333 | 46 | 0.705069 |
215ef1b3b92ad4b815407967298108a32912d349 | 11,220 | py | Python | colosseumrl/envs/blokus/computation.py | carletonz/colosseumrl | 878f0459731511d716672aee8a5adafcb96cf0a7 | [
"MIT"
] | 8 | 2019-06-04T00:22:30.000Z | 2022-02-14T15:27:17.000Z | colosseumrl/envs/blokus/computation.py | carletonz/colosseumrl | 878f0459731511d716672aee8a5adafcb96cf0a7 | [
"MIT"
] | 1 | 2019-07-23T03:32:59.000Z | 2019-07-23T06:16:35.000Z | colosseumrl/envs/blokus/computation.py | carletonz/colosseumrl | 878f0459731511d716672aee8a5adafcb96cf0a7 | [
"MIT"
] | 3 | 2020-01-13T08:09:27.000Z | 2021-11-14T01:30:25.000Z | '''
Author: Caleb Pitts
Date: 3/15/19
Summary:
- Contains computation methods that board.py uses to
manage valid move seeks and piece placement.
- Methods use Numba with jit decorator that precompiles
types and makes runtime faster than normal python.
'''
from numba import jit
import numpy as np
import math
# de... | 45.425101 | 185 | 0.660873 |
215ef5a2b9a555501d5818cb161fe6581048d063 | 312 | py | Python | src/layoutparser/__init__.py | allenai/layout-parser | 85a9c3463315bba54a7b4d581df9867add0d1467 | [
"Apache-2.0"
] | 3 | 2021-02-06T16:45:51.000Z | 2021-08-31T08:23:01.000Z | src/layoutparser/__init__.py | allenai/layout-parser | 85a9c3463315bba54a7b4d581df9867add0d1467 | [
"Apache-2.0"
] | null | null | null | src/layoutparser/__init__.py | allenai/layout-parser | 85a9c3463315bba54a7b4d581df9867add0d1467 | [
"Apache-2.0"
] | 1 | 2021-08-31T08:23:02.000Z | 2021-08-31T08:23:02.000Z | __version__ = "0.1.1"
from .elements import (
Interval, Rectangle, Quadrilateral,
TextBlock, Layout
)
from .visualization import (
draw_box, draw_text
)
from .ocr import (
GCVFeatureType, GCVAgent,
TesseractFeatureType, TesseractAgent
)
from .models import (
Detectron2LayoutModel
) | 16.421053 | 40 | 0.714744 |
215fa646c6977dcd7f4ccd713b5d024964beaf7e | 43 | py | Python | run.py | ClownMaster12/seuperrbotf | 753845b9fafac1a44868b4cf441ba64d881a35c6 | [
"Apache-2.0"
] | null | null | null | run.py | ClownMaster12/seuperrbotf | 753845b9fafac1a44868b4cf441ba64d881a35c6 | [
"Apache-2.0"
] | null | null | null | run.py | ClownMaster12/seuperrbotf | 753845b9fafac1a44868b4cf441ba64d881a35c6 | [
"Apache-2.0"
] | 1 | 2020-07-28T23:48:02.000Z | 2020-07-28T23:48:02.000Z | import os
os.system("python setsudo.py") | 14.333333 | 30 | 0.72093 |
215fabe14ae6317b326045a3643126b7e1ed5626 | 9,806 | py | Python | ml_challenge/dataset.py | fernandocamargoai/ml-challenge-2021 | 7ae082aeb2fe7674956e309afedbd25464d71525 | [
"MIT"
] | 1 | 2021-11-24T19:06:38.000Z | 2021-11-24T19:06:38.000Z | ml_challenge/dataset.py | fernandocamargoai/ml-challenge-2021 | 7ae082aeb2fe7674956e309afedbd25464d71525 | [
"MIT"
] | null | null | null | ml_challenge/dataset.py | fernandocamargoai/ml-challenge-2021 | 7ae082aeb2fe7674956e309afedbd25464d71525 | [
"MIT"
] | null | null | null | import functools
import os
import warnings
from multiprocessing import Pool
from typing import Optional, Iterator, List, Dict
import numpy as np
from gluonts.dataset.common import DataEntry, Dataset, ProcessDataEntry, SourceContext
from gluonts.dataset.field_names import FieldName
from gluonts.transform import Transfo... | 34.167247 | 103 | 0.60514 |
215fb1bdd37754dd54f3753a2298a098a3f38b99 | 6,182 | py | Python | medallion/__init__.py | zrush-mitre/cti-taxii-server | deba98da4f789ca2d93fa2b9e206fd61c8022f6a | [
"BSD-3-Clause"
] | 71 | 2017-09-02T09:31:02.000Z | 2022-03-24T00:41:20.000Z | medallion/__init__.py | zrush-mitre/cti-taxii-server | deba98da4f789ca2d93fa2b9e206fd61c8022f6a | [
"BSD-3-Clause"
] | 135 | 2017-09-21T22:25:43.000Z | 2022-03-17T19:13:06.000Z | medallion/__init__.py | zrush-mitre/cti-taxii-server | deba98da4f789ca2d93fa2b9e206fd61c8022f6a | [
"BSD-3-Clause"
] | 64 | 2017-08-01T22:23:09.000Z | 2022-02-17T23:34:14.000Z | import importlib
import logging
import warnings
from flask import Flask, Response, current_app, json
from flask_httpauth import HTTPBasicAuth
from .backends import base as mbe_base
from .exceptions import BackendError, ProcessingError
from .version import __version__ # noqa
from .views import MEDIA_TYPE_TAXII_V21
#... | 35.528736 | 100 | 0.666127 |
215fc136e3227e6d62bfaa36642b2563da359443 | 4,645 | py | Python | examples/CanvasplusExample/pipinstaller/install_packages.py | kertox662/PythonPackageInstaller | 97c8e0a1aa10336f25017bd694c23587329f9444 | [
"MIT"
] | 2 | 2020-01-21T23:12:09.000Z | 2020-01-23T13:53:18.000Z | examples/CanvasplusExample/pipinstaller/install_packages.py | kertox662/PythonPackageInstaller | 97c8e0a1aa10336f25017bd694c23587329f9444 | [
"MIT"
] | 2 | 2020-04-30T20:39:56.000Z | 2020-06-21T03:30:45.000Z | examples/CanvasplusExample/pipinstaller/install_packages.py | kertox662/PythonPackageInstaller | 97c8e0a1aa10336f25017bd694c23587329f9444 | [
"MIT"
] | 1 | 2020-04-28T00:08:18.000Z | 2020-04-28T00:08:18.000Z | """The Python Package Installer"""
"""
Copyright 2020 Misha Melnyk, Luke Zhang | MIT License
"""
from pipinstaller.install_Functions import (
checkPip,
installPip,
checkPackage,
installPackage,
packagesMissing,
installRequirements,
)
import sys
targetPackages = [
# ["PIL", "Pillow"]
]
de... | 36.574803 | 103 | 0.474704 |
215fe24ba0e13f869dd9ca6a18e1656984db7b6f | 1,551 | py | Python | src/common/migrations/0001_initial.py | danpercic86/e-notary | ba15a9a80e2091593fb088feacfaf9574c816d6e | [
"Apache-2.0"
] | null | null | null | src/common/migrations/0001_initial.py | danpercic86/e-notary | ba15a9a80e2091593fb088feacfaf9574c816d6e | [
"Apache-2.0"
] | null | null | null | src/common/migrations/0001_initial.py | danpercic86/e-notary | ba15a9a80e2091593fb088feacfaf9574c816d6e | [
"Apache-2.0"
] | null | null | null | # Generated by Django 4.0.1 on 2022-01-27 20:34
from django.db import migrations, models
import django.utils.timezone
import model_utils.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Example',
... | 48.46875 | 209 | 0.660219 |
215fe58388d367131eeaa6fc09edd6431af1b5dc | 36,394 | py | Python | allennlp/tests/nn/util_test.py | danyaljj/allennlp | 5846855d363df8f84d0a12bc6867ac66f539c2a3 | [
"Apache-2.0"
] | 21 | 2019-03-11T13:39:05.000Z | 2021-11-02T11:43:32.000Z | allennlp/tests/nn/util_test.py | danyaljj/allennlp | 5846855d363df8f84d0a12bc6867ac66f539c2a3 | [
"Apache-2.0"
] | 8 | 2020-01-28T22:40:24.000Z | 2021-08-25T15:30:18.000Z | allennlp/tests/nn/util_test.py | danyaljj/allennlp | 5846855d363df8f84d0a12bc6867ac66f539c2a3 | [
"Apache-2.0"
] | 4 | 2019-11-04T07:21:49.000Z | 2022-03-01T14:59:14.000Z | # pylint: disable=invalid-name,no-self-use,too-many-public-methods,not-callable
import numpy
from numpy.testing import assert_array_almost_equal, assert_almost_equal
import torch
import pytest
from allennlp.common.checks import ConfigurationError
from allennlp.common.testing import AllenNlpTestCase
from allennlp.nn im... | 54.23845 | 113 | 0.559323 |
215ffbc9b661d3e26aa5dcbbc2b547c1318a1396 | 13,623 | py | Python | pipedream-fork/profiler/torchmodules/torchgraph/graph_creator.py | animeshtrivedi/surf-ml | 73102c69f303d5b289841e6116a607561e36595c | [
"Apache-2.0"
] | 9 | 2020-10-21T11:40:51.000Z | 2021-09-25T07:50:22.000Z | pipedream-fork/profiler/torchmodules/torchgraph/graph_creator.py | animeshtrivedi/surf-ml | 73102c69f303d5b289841e6116a607561e36595c | [
"Apache-2.0"
] | null | null | null | pipedream-fork/profiler/torchmodules/torchgraph/graph_creator.py | animeshtrivedi/surf-ml | 73102c69f303d5b289841e6116a607561e36595c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import copy
import functools
import numpy as np
import os
import torch
from torch.autograd import Variable
from torch.autograd import Function
import sys
sys.path.append("../..")
import graph
object_id = 0
arch = None # SOURCE CODE EDIT
class... | 45.561873 | 107 | 0.583645 |
2160245ded3ef2d7fcccae42f157d5aaf317a42b | 18,732 | py | Python | engine/post_storage.py | hive-engine/distribution-engine-smt | 9ed4fddbae17342700a4ba0f24c667c8b853c793 | [
"MIT"
] | null | null | null | engine/post_storage.py | hive-engine/distribution-engine-smt | 9ed4fddbae17342700a4ba0f24c667c8b853c793 | [
"MIT"
] | null | null | null | engine/post_storage.py | hive-engine/distribution-engine-smt | 9ed4fddbae17342700a4ba0f24c667c8b853c793 | [
"MIT"
] | null | null | null | # This Python file uses the following encoding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from builtins import bytes
from builtins import object
from beemgraphenebase.py23 import py23_bytes, bytes_types
from... | 54.77193 | 1,247 | 0.664104 |
216034dba115f8945f7aa7e241767f5fc23dff4d | 21,760 | py | Python | fluids/jet_pump.py | volpatto/fluids | 693268d0fd7c9e2f276ebdf14353cb9d7dbac195 | [
"MIT"
] | null | null | null | fluids/jet_pump.py | volpatto/fluids | 693268d0fd7c9e2f276ebdf14353cb9d7dbac195 | [
"MIT"
] | null | null | null | fluids/jet_pump.py | volpatto/fluids | 693268d0fd7c9e2f276ebdf14353cb9d7dbac195 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2018, Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal... | 38.309859 | 227 | 0.551241 |
2160492b28c60425e53e8f13049b4c049ed79ac3 | 43,344 | py | Python | BafflePlanner/BafflePlanner.py | SlicerHeart/SlicerHeart | 5ead8d723f6dec67ea6065b847cb4f8dce5bef72 | [
"BSD-3-Clause"
] | 48 | 2016-04-13T10:22:53.000Z | 2022-03-21T16:31:41.000Z | BafflePlanner/BafflePlanner.py | SlicerHeart/SlicerHeart | 5ead8d723f6dec67ea6065b847cb4f8dce5bef72 | [
"BSD-3-Clause"
] | 14 | 2018-10-25T21:15:20.000Z | 2021-11-26T16:55:55.000Z | BafflePlanner/BafflePlanner.py | SlicerHeart/SlicerHeart | 5ead8d723f6dec67ea6065b847cb4f8dce5bef72 | [
"BSD-3-Clause"
] | 21 | 2017-09-12T08:20:36.000Z | 2021-10-30T02:22:11.000Z | import os
import unittest
import vtk, qt, ctk, slicer
from slicer.ScriptedLoadableModule import *
from slicer.util import VTKObservationMixin
import logging
#
# BafflePlanner
#
class BafflePlanner(ScriptedLoadableModule):
"""Uses ScriptedLoadableModule base class, available at:
https://github.com/Slicer/Slicer/b... | 47.683168 | 169 | 0.77554 |
216066d1610f2d8119d0f52514b884f617188403 | 2,824 | py | Python | config.py | SeeU1119/BeautyGAN_pytorch | b19fb0ade9d951116464f20e4fbab3015d5fffdf | [
"MIT"
] | 176 | 2019-08-19T09:20:25.000Z | 2022-03-31T19:13:58.000Z | config.py | timemao/BeautyGAN_pytorch | b19fb0ade9d951116464f20e4fbab3015d5fffdf | [
"MIT"
] | 14 | 2019-10-18T04:52:28.000Z | 2022-03-06T20:23:48.000Z | config.py | timemao/BeautyGAN_pytorch | b19fb0ade9d951116464f20e4fbab3015d5fffdf | [
"MIT"
] | 38 | 2019-09-25T10:00:15.000Z | 2021-12-03T08:03:35.000Z | from easydict import EasyDict as edict
default = edict()
default.snapshot_path = './snapshot/'
default.vis_path = './visulization/'
default.log_path = './log/'
default.data_path = './data/'
config = edict()
# setting for cycleGAN
# Hyper-parameters
config.multi_gpu = False
config.gpu_ids = [0,1,2]
# Setting path
c... | 27.686275 | 69 | 0.723442 |
2160796d1107a777d1afcbddd59037f40ae0e700 | 235 | py | Python | logger.py | frankstolle/bt-mqtt-gateway | 18ee3e5657af4c303847ee963c979dac2ffbb8e5 | [
"MIT"
] | null | null | null | logger.py | frankstolle/bt-mqtt-gateway | 18ee3e5657af4c303847ee963c979dac2ffbb8e5 | [
"MIT"
] | null | null | null | logger.py | frankstolle/bt-mqtt-gateway | 18ee3e5657af4c303847ee963c979dac2ffbb8e5 | [
"MIT"
] | null | null | null | import logging
import sys
_LOGGER = logging.getLogger('bt-mqtt-gw')
handler = logging.StreamHandler(sys.stdout)
handler.setFormatter(logging.Formatter("%(asctime)s [%(threadName)s] %(name)s %(message)s"))
_LOGGER.addHandler(handler)
| 26.111111 | 92 | 0.765957 |
216080fa1f3c73ec8f298fefae4f0ec94becd7a9 | 4,075 | py | Python | savu/plugins/segmentation/geo_distance/geo_distance.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/segmentation/geo_distance/geo_distance.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/segmentation/geo_distance/geo_distance.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | # Copyright 2019 Diamond Light Source 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 t... | 41.161616 | 125 | 0.694479 |
2160851217dc319b5f1b6b81b45669dda4319cea | 3,072 | py | Python | dataset/make_all.py | JerryLingjieMei/ADEPT-Dataset-Release | 900d9d5c7e780a5daa06f0484d91539a4ca92ff8 | [
"MIT"
] | 14 | 2019-11-06T23:13:35.000Z | 2021-02-04T17:28:31.000Z | dataset/make_all.py | JerryLingjieMei/ADEPT-Dataset-Release | 900d9d5c7e780a5daa06f0484d91539a4ca92ff8 | [
"MIT"
] | null | null | null | dataset/make_all.py | JerryLingjieMei/ADEPT-Dataset-Release | 900d9d5c7e780a5daa06f0484d91539a4ca92ff8 | [
"MIT"
] | 5 | 2019-12-05T02:34:40.000Z | 2020-10-14T02:33:32.000Z | import os
import dataset.make_video as make_video
import phys_sim.run_sim as run_sim
import render.run_render as run_render
from utils.constants import CONTENT_FOLDER
def update_sim(config, args):
sim = config.sim
if "output_dir" not in sim:
raise KeyError("output_dir not specified")
sim.obj_dir... | 29.257143 | 67 | 0.692383 |
21608dc233abbaf677954d67b16fc548b2a34005 | 712 | py | Python | run_afmtopopt_ipopt.py | simoore/afmtopopt | ef9d75557f617ee50f955c691e4c8c854378472b | [
"MIT"
] | null | null | null | run_afmtopopt_ipopt.py | simoore/afmtopopt | ef9d75557f617ee50f955c691e4c8c854378472b | [
"MIT"
] | null | null | null | run_afmtopopt_ipopt.py | simoore/afmtopopt | ef9d75557f617ee50f955c691e4c8c854378472b | [
"MIT"
] | null | null | null | import pprint
from afmtopopt import TopologyOptimizer, load_parameters
def main():
batch = ['solutions/problem1.yaml',
'solutions/problem2.yaml']
opt_list = []
for b in batch:
params = load_parameters(b)
print('-- Parameters --\n')
pprint.pprint(params)
... | 24.551724 | 56 | 0.603933 |
21609bc44ede570359b410ff4ecb5e568db5b885 | 689 | py | Python | array/239_sliding_window_maximum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | array/239_sliding_window_maximum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | array/239_sliding_window_maximum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | 2 | 2020-02-07T20:49:02.000Z | 2020-02-11T06:01:55.000Z | def maxSlidingWindow(nums, k):
ans = []
queue = []
for i, v in enumerate(nums):
# corner case, when front element is outside the window
if queue and queue[0] == i - k:
queue.pop(0)
# pop all elements smaller than new element to be added
# so after the new element... | 31.318182 | 70 | 0.56894 |
2160b4e773be7de9d3a8e7b37492aabd63645506 | 8,428 | py | Python | core/controllers/topic_viewer_test.py | OsamaAdam98/oppia | 9c9c3d0fc6710f58394c5e28d414043340ed2a62 | [
"Apache-2.0"
] | 2 | 2019-03-31T07:03:32.000Z | 2019-04-24T18:12:53.000Z | core/controllers/topic_viewer_test.py | OsamaAdam98/oppia | 9c9c3d0fc6710f58394c5e28d414043340ed2a62 | [
"Apache-2.0"
] | 3 | 2020-03-16T06:40:30.000Z | 2020-03-30T12:10:20.000Z | core/controllers/topic_viewer_test.py | RafayGhafoor/oppia | 855d02414ca00d0807d841e48be7ce7b94d68c29 | [
"Apache-2.0"
] | 1 | 2020-03-15T14:29:55.000Z | 2020-03-15T14:29:55.000Z | # Copyright 2018 The Oppia 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 applicable ... | 43.443299 | 80 | 0.614262 |
2160c0a030e3649379381eb16da11bfa3b4fe8d4 | 1,286 | py | Python | Common/PerformanceIndicators/SharpeRatioIndicator.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 2 | 2020-03-04T11:18:38.000Z | 2020-05-10T15:36:42.000Z | Common/PerformanceIndicators/SharpeRatioIndicator.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 6 | 2020-03-30T16:42:47.000Z | 2021-12-13T20:37:21.000Z | Common/PerformanceIndicators/SharpeRatioIndicator.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 1 | 2020-04-14T11:26:16.000Z | 2020-04-14T11:26:16.000Z | import pandas
import numpy as np
class SharpeRatioIndicator(object):
""" Sharpe Ratio of a trading strategy KPI """
KPIdf: np.float64
def __init__(self, a_df: pandas.DataFrame, risk_free_rate: float = 0.022):
self.__setIndicator(a_df, risk_free_rate)
def __setIndicator(self, a_df: pandas.Dat... | 40.1875 | 91 | 0.660964 |
2160c6993d8cfc1900434c824f92c58d56c02652 | 8,170 | py | Python | tools/tcam-capture/tcam_capture/MediaSaver.py | lkucalaba/tiscamera | e1fa7b21bb4dd777ae8039dfa072cfa2daa88244 | [
"Apache-2.0"
] | 241 | 2015-02-20T09:10:41.000Z | 2022-03-18T08:53:26.000Z | tools/tcam-capture/tcam_capture/MediaSaver.py | lkucalaba/tiscamera | e1fa7b21bb4dd777ae8039dfa072cfa2daa88244 | [
"Apache-2.0"
] | 435 | 2015-01-19T10:18:01.000Z | 2022-03-28T08:03:08.000Z | tools/tcam-capture/tcam_capture/MediaSaver.py | lkucalaba/tiscamera | e1fa7b21bb4dd777ae8039dfa072cfa2daa88244 | [
"Apache-2.0"
] | 141 | 2015-01-03T17:54:08.000Z | 2022-02-09T09:55:15.000Z | # Copyright 2018 The Imaging Source Europe GmbH
#
# 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 ... | 31.544402 | 90 | 0.579315 |
2160c92be183e3aeac69b01e64fdfe4835c3e39d | 23,344 | py | Python | salt/fileserver/__init__.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | 1 | 2020-09-16T21:31:02.000Z | 2020-09-16T21:31:02.000Z | salt/fileserver/__init__.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | null | null | null | salt/fileserver/__init__.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
File server pluggable modules and generic backend functions
'''
from __future__ import absolute_import
# Import python libs
import errno
import fnmatch
import logging
import os
import re
import time
# Import salt libs
import salt.loader
import salt.utils
from salt.ext.six import string_typ... | 34.583704 | 82 | 0.52476 |
2160c98af08c575dbc85e5530142bb454b588a0f | 1,300 | py | Python | binary_search/4_median_of_two_sorted_arrays.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | binary_search/4_median_of_two_sorted_arrays.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | binary_search/4_median_of_two_sorted_arrays.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | 2 | 2020-02-07T20:49:02.000Z | 2020-02-11T06:01:55.000Z | class Solution:
def findMedianSortedArrays(self, nums1, nums2):
if len(nums1) <= len(nums2):
x, y = nums1, nums2
else:
x, y = nums2, nums1
l, r = 0, len(x)
while l <= r:
i = (l + r) // 2
j = (len(nums1) + len(nums2) + 1) // 2 - i
... | 31.707317 | 84 | 0.487692 |
2160d2a38b7c6718de6e85f4d7235661fdb2108d | 5,861 | py | Python | tests/history_annual_tests.py | pkfec/regulations-parser | ff6b29dcce0449a133e7b93dd462ab3110f80a5d | [
"CC0-1.0"
] | 26 | 2016-06-04T20:48:09.000Z | 2021-07-28T18:13:30.000Z | tests/history_annual_tests.py | pkfec/regulations-parser | ff6b29dcce0449a133e7b93dd462ab3110f80a5d | [
"CC0-1.0"
] | 146 | 2016-04-06T19:07:54.000Z | 2022-01-02T20:09:53.000Z | tests/history_annual_tests.py | pkfec/regulations-parser | ff6b29dcce0449a133e7b93dd462ab3110f80a5d | [
"CC0-1.0"
] | 28 | 2016-04-09T20:40:48.000Z | 2021-05-08T17:52:59.000Z | # vim: set encoding=utf-8
import re
from unittest import TestCase
from mock import Mock, patch
from regparser.history import annual
from regparser.test_utils.http_mixin import HttpMixin
class HistoryAnnualVolumeTests(HttpMixin, TestCase):
def test_init(self):
uri = re.compile(r'.*gpo.gov.*1010.*12.*4.*x... | 34.886905 | 77 | 0.606381 |
2160de8168756507aaca2c7a20272efd3ba1a12a | 4,267 | py | Python | igibson/object_states/open.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 360 | 2020-04-02T11:12:09.000Z | 2022-03-24T21:46:58.000Z | igibson/object_states/open.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 169 | 2020-04-07T21:01:05.000Z | 2022-03-31T10:07:39.000Z | igibson/object_states/open.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 94 | 2020-04-09T23:22:17.000Z | 2022-03-17T21:49:03.000Z | import random
import pybullet as p
from igibson.external.pybullet_tools import utils
from igibson.object_states.object_state_base import BooleanState, CachingEnabledObjectState
# Joint position threshold before a joint is considered open.
# Should be a number in the range [0, 1] which will be transformed
# to a posi... | 39.878505 | 117 | 0.716194 |
2160eef0e72f10e286e84b1ad6cfa2f80d8a1844 | 622 | py | Python | Datasets/Vectors/us_census_blocks.py | monocilindro/qgis-earthengine-examples | 82aea8926d34ed3f4ad4a4a345ddbd225819d28f | [
"MIT"
] | 646 | 2019-12-03T06:09:03.000Z | 2022-03-28T03:37:08.000Z | Datasets/Vectors/us_census_blocks.py | csaybar/qgis-earthengine-examples | ba8942683834d2847ff3246bdd1859b36e50fe44 | [
"MIT"
] | 10 | 2019-12-30T03:42:44.000Z | 2021-05-22T07:34:07.000Z | Datasets/Vectors/us_census_blocks.py | csaybar/qgis-earthengine-examples | ba8942683834d2847ff3246bdd1859b36e50fe44 | [
"MIT"
] | 219 | 2019-12-06T02:20:53.000Z | 2022-03-30T15:14:27.000Z | # GitHub URL: https://github.com/giswqs/qgis-earthengine-examples/tree/master/Datasets/Vectors/us_census_blocks.py
import ee
from ee_plugin import Map
dataset = ee.FeatureCollection('TIGER/2010/Blocks')
visParams = {
'min': 0.0,
'max': 700.0,
'palette': ['black', 'brown', 'yellow', 'orange', 'red']
}
# Turn ... | 29.619048 | 114 | 0.700965 |
2160f15e22a0b4cbc035b60fccbbad0e8d8da9d2 | 354 | py | Python | {{ cookiecutter.project_name }}/src/apps/{{ cookiecutter.app_name }}/v1/views.py | tiagoarasilva/cookiecutter-flask | 0393fc5f59ab885316b466ef0a2a8a375796a786 | [
"MIT"
] | null | null | null | {{ cookiecutter.project_name }}/src/apps/{{ cookiecutter.app_name }}/v1/views.py | tiagoarasilva/cookiecutter-flask | 0393fc5f59ab885316b466ef0a2a8a375796a786 | [
"MIT"
] | 1 | 2021-11-18T14:46:16.000Z | 2021-11-18T14:46:16.000Z | {{ cookiecutter.project_name }}/src/apps/{{ cookiecutter.app_name }}/v1/views.py | tiagoarasilva/cookiecutter-flask | 0393fc5f59ab885316b466ef0a2a8a375796a786 | [
"MIT"
] | null | null | null | """
ALl the views of {{ cookiecutter.project_name }}
"""
from flask import make_response
from flask_api import status
from flask_restx import Resource
class HelloWorldApiView(Resource):
"""
Auto generated api
"""
def get(self):
return make_response("Welcome to {}".format("{{ cookiecutter.proje... | 23.6 | 107 | 0.706215 |
2161141c054a31c3823724c59692ddba9fb19a7a | 505 | py | Python | src/handlers/config.py | drosin/posebuddy | d8a1ea7658a86c091664f53cf6fad774fd648cfa | [
"MIT"
] | 2 | 2020-06-09T12:40:18.000Z | 2021-02-26T15:58:16.000Z | src/handlers/config.py | drosin/posebuddy | d8a1ea7658a86c091664f53cf6fad774fd648cfa | [
"MIT"
] | null | null | null | src/handlers/config.py | drosin/posebuddy | d8a1ea7658a86c091664f53cf6fad774fd648cfa | [
"MIT"
] | null | null | null | import yaml
from typing import Dict
required_keys = [
'app_name',
'image_dir',
'job_dir',
'cam_num',
'always_on_top',
'update_period_ms',
'present_timer_sec',
'presence_image_dir',
'presence_job_dir',
]
def load_yaml(file_path: str) -> Dict:
with open(file_path, 'r') as f:
... | 19.423077 | 62 | 0.59802 |
21614047623e0fcb4d00c5630bb1720a29f6bed7 | 15,391 | py | Python | sdk/lusid_configuration/models/configuration_item.py | finbourne/lusid-configuration-sdk-python-preview | f9ed2bc71042ce1b6f85baf62c9f6603150000dc | [
"MIT"
] | null | null | null | sdk/lusid_configuration/models/configuration_item.py | finbourne/lusid-configuration-sdk-python-preview | f9ed2bc71042ce1b6f85baf62c9f6603150000dc | [
"MIT"
] | null | null | null | sdk/lusid_configuration/models/configuration_item.py | finbourne/lusid-configuration-sdk-python-preview | f9ed2bc71042ce1b6f85baf62c9f6603150000dc | [
"MIT"
] | 1 | 2021-12-09T18:53:23.000Z | 2021-12-09T18:53:23.000Z | # coding: utf-8
"""
FINBOURNE ConfigurationService API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.1.281
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except ImportError:
from inspect im... | 33.386117 | 243 | 0.623026 |
216141a12107a332e7dde830ffd5f0f698951899 | 665 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/lis3mdl_compass.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/lis3mdl_compass.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/lis3mdl_compass.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
""" Display compass heading data five times per second """
import time
from math import atan2, degrees
import board
import busio
import adafruit_lis3mdl
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_lis3mdl.LIS3MDL... | 22.166667 | 64 | 0.723308 |
21618b7bf793ffd4f54449f323d7f656d3ed2195 | 397 | py | Python | online_test/wsgi.py | tyochans/online_test | 4eb754c2e71922819de7390d1b4993a21763de3e | [
"Python-2.0"
] | 1 | 2022-03-21T11:14:17.000Z | 2022-03-21T11:14:17.000Z | online_test/wsgi.py | tyochans/online_test | 4eb754c2e71922819de7390d1b4993a21763de3e | [
"Python-2.0"
] | null | null | null | online_test/wsgi.py | tyochans/online_test | 4eb754c2e71922819de7390d1b4993a21763de3e | [
"Python-2.0"
] | null | null | null | """
WSGI config for online_test project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SET... | 26.466667 | 78 | 0.793451 |
21618d722a35f8b86ebdeb0330a685455daf8fca | 5,275 | py | Python | keyring.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | 2 | 2015-05-25T10:47:30.000Z | 2017-12-12T18:15:00.000Z | keyring.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | keyring.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | from go import bytes, encoding.hex, fmt, io.ioutil, regexp
from go.crypto import rand, sha256
import conv, dh, flag, sym
from "github.com/strickyak/rye/contrib" import data
"The global RingDict."
RingDict = {}
Ring = {}
RingFilename = flag.String('ring', '', 'name of keyring file')
RingSecret = flag.String('secret', ... | 26.77665 | 97 | 0.603791 |
216192848e5ba011f4c154d2a183ecf2878c69a9 | 1,194 | py | Python | setup.py | alexlib/EstimationPy | de0db040661ae6a8ae68c9571a71bbb16127fe60 | [
"BSD-3-Clause-LBNL"
] | 27 | 2016-01-25T17:11:15.000Z | 2021-05-14T21:05:18.000Z | setup.py | alexlib/EstimationPy | de0db040661ae6a8ae68c9571a71bbb16127fe60 | [
"BSD-3-Clause-LBNL"
] | 10 | 2018-08-28T05:40:05.000Z | 2020-06-01T19:04:05.000Z | setup.py | alexlib/EstimationPy | de0db040661ae6a8ae68c9571a71bbb16127fe60 | [
"BSD-3-Clause-LBNL"
] | 12 | 2016-05-25T09:50:57.000Z | 2021-11-09T16:38:00.000Z | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name = 'estimationpy',
v... | 34.114286 | 78 | 0.649916 |
2161af401d95c05de0d1bac90ec52f51c5f5cf6d | 4,295 | py | Python | PythonPhot/group.py | sjoertvv/PyIDLPhot | ecc83917f881e91b6ce477df1fbd350028abd0d5 | [
"BSD-3-Clause"
] | null | null | null | PythonPhot/group.py | sjoertvv/PyIDLPhot | ecc83917f881e91b6ce477df1fbd350028abd0d5 | [
"BSD-3-Clause"
] | null | null | null | PythonPhot/group.py | sjoertvv/PyIDLPhot | ecc83917f881e91b6ce477df1fbd350028abd0d5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# D. Jones - 5/22/14
"""This procedure was adapted for Python from the IDL Astronomy Users Library."""
import numpy as np
from numpy import where,append,array
import exceptions
def group( x, y, rcrit):
"""Assign stars with non-overlapping PSF profiles into distinct groups
(adapted for ID... | 39.768519 | 114 | 0.552037 |
2161b1cdf8bada94f608c290d7838aef09c630ce | 6,526 | py | Python | libmultilabel/linear/preprocessor.py | sian-chen/LibMultiLabel | 8aa6a3ffff6ac437359de4fb53a99de544fdb720 | [
"MIT"
] | 120 | 2021-04-16T10:25:39.000Z | 2022-03-23T14:32:58.000Z | libmultilabel/linear/preprocessor.py | sian-chen/LibMultiLabel | 8aa6a3ffff6ac437359de4fb53a99de544fdb720 | [
"MIT"
] | 25 | 2021-04-16T10:17:14.000Z | 2022-03-17T13:19:07.000Z | libmultilabel/linear/preprocessor.py | Eleven1Liu/LibMultiLabel | 56feb362ee0342242656c3303c5f25816f2c12ab | [
"MIT"
] | 17 | 2021-04-16T08:43:32.000Z | 2022-03-31T03:16:12.000Z | from __future__ import annotations
import os
from array import array
import logging
from collections import defaultdict
import pandas as pd
import scipy
import scipy.sparse as sparse
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.preprocessing import MultiLabelBinarizer
__all__ = ['Preproce... | 37.291429 | 115 | 0.602819 |
2161dde99f8cddf94656eac4da5521e6ab05bd44 | 2,812 | py | Python | bcubed/parallel.py | cbowdon/python-bcubed | 056280cb352d65f959d87cd8b79ff8cc19aedbeb | [
"Apache-2.0"
] | null | null | null | bcubed/parallel.py | cbowdon/python-bcubed | 056280cb352d65f959d87cd8b79ff8cc19aedbeb | [
"Apache-2.0"
] | null | null | null | bcubed/parallel.py | cbowdon/python-bcubed | 056280cb352d65f959d87cd8b79ff8cc19aedbeb | [
"Apache-2.0"
] | null | null | null | # Simple extended BCubed implementation in Python for clustering evaluation
# Copyright 2020 Hugo Hromic, Chris Bowdon
#
# 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.apach... | 38 | 86 | 0.710171 |
2161fecf1d166230b72c2f8a2cc9b862b41e865b | 3,260 | py | Python | homework/hw-04-youens-clark/plot_laplace_approx.py | kyclark/info521 | 8dd2fe23b89971f87c8c697e08cec84c8488ab9d | [
"MIT"
] | null | null | null | homework/hw-04-youens-clark/plot_laplace_approx.py | kyclark/info521 | 8dd2fe23b89971f87c8c697e08cec84c8488ab9d | [
"MIT"
] | null | null | null | homework/hw-04-youens-clark/plot_laplace_approx.py | kyclark/info521 | 8dd2fe23b89971f87c8c697e08cec84c8488ab9d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Author : Ken Youens-Clark <kyclark@email.arizona.edu>
Date : 2018-10-25
Purpose: Plot Laplace estimation of beta distribution
"""
import argparse
import sys
import matplotlib.pyplot as plt
import numpy as np
from scipy.stats import beta, norm
# -------------------------------------------... | 24.885496 | 78 | 0.52454 |
216262fe99c8507a1291b621aefca7b07403e2b0 | 1,714 | py | Python | plugins/exec.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | 1 | 2020-10-29T15:44:57.000Z | 2020-10-29T15:44:57.000Z | plugins/exec.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | null | null | null | plugins/exec.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | 4 | 2020-10-28T09:02:35.000Z | 2020-12-27T22:45:57.000Z | """Execute GNU/Linux commands inside Telegram
Syntax: .exec Code"""
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import asyncio
import io
import time
from uniborg.ut... | 34.28 | 118 | 0.62077 |
2162d9abb12a9629b36b1dceb68d30bb4a40a0d0 | 1,090 | py | Python | alipay/aop/api/response/AlipayMerchantShopcodeCategoryQueryResponse.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/AlipayMerchantShopcodeCategoryQueryResponse.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/AlipayMerchantShopcodeCategoryQueryResponse.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
from alipay.aop.api.domain.CategoryRootDTO import CategoryRootDTO
class AlipayMerchantShopcodeCategoryQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayMerchantShopcod... | 33.030303 | 116 | 0.684404 |
2162e8e0add6846a1332af85d00f2d764a91eb3e | 1,062 | py | Python | mps_database/runtime/threshold_history_idl.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | null | null | null | mps_database/runtime/threshold_history_idl.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 1 | 2017-07-07T21:31:59.000Z | 2017-07-07T21:31:59.000Z | mps_database/runtime/threshold_history_idl.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 4 | 2017-07-07T20:10:54.000Z | 2020-12-13T00:03:37.000Z | from sqlalchemy import Column, Integer, String, ForeignKey, Float, DateTime, func
from sqlalchemy.orm import relationship, backref
from mps_database.runtime import RuntimeBase
import datetime
class ThresholdHistoryIdl(RuntimeBase):
"""
Threshold History IDLE class (thresholds history table)
Properties:
i[0-... | 31.235294 | 81 | 0.729755 |
2162f7af5c7323039c27e5cb98d44118890f4156 | 13,853 | py | Python | pywinauto/hooks.py | nimuston/pywinauto | 3f61f7dea13b2e5b1282d65d2ae8247aae00b06f | [
"BSD-3-Clause"
] | 1 | 2021-01-31T08:10:34.000Z | 2021-01-31T08:10:34.000Z | pywinauto/hooks.py | nimuston/pywinauto | 3f61f7dea13b2e5b1282d65d2ae8247aae00b06f | [
"BSD-3-Clause"
] | null | null | null | pywinauto/hooks.py | nimuston/pywinauto | 3f61f7dea13b2e5b1282d65d2ae8247aae00b06f | [
"BSD-3-Clause"
] | null | null | null | # GUI Application automation and testing library
# Copyright (C) 2006-2016 Mark Mc Mahon and Contributors
# https://github.com/pywinauto/pywinauto/graphs/contributors
# http://pywinauto.github.io/docs/credits.html
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modificati... | 36.843085 | 108 | 0.531004 |
21630480db4842ee78a38ee406813837082be3ed | 3,032 | py | Python | pyggi/line/edits.py | bloa/pyggi | 79babee583460494b1c533e45e49c7cb23ed70c9 | [
"MIT"
] | null | null | null | pyggi/line/edits.py | bloa/pyggi | 79babee583460494b1c533e45e49c7cb23ed70c9 | [
"MIT"
] | null | null | null | pyggi/line/edits.py | bloa/pyggi | 79babee583460494b1c533e45e49c7cb23ed70c9 | [
"MIT"
] | null | null | null | import random
from ..base import AbstractEdit
from . import AbstractLineEngine
class LineReplacement(AbstractEdit):
def apply(self, program, new_contents, new_locations):
engine = program.engines[self.target[0]]
return engine.do_replace(program.contents, program.locations,
... | 43.942029 | 80 | 0.626979 |
2163228c111cbea04651437cc84e2c650508069c | 2,486 | py | Python | 2020/10/do_not_look_at_me_solution2.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | 2 | 2020-12-04T09:45:38.000Z | 2020-12-07T14:06:12.000Z | 2020/10/do_not_look_at_me_solution2.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | null | null | null | 2020/10/do_not_look_at_me_solution2.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | null | null | null |
with open("input.txt") as input_file:
# with open("test_input.txt") as input_file:
# with open("test_input2.txt") as input_file:
adapters = [int(n.strip()) for n in input_file.readlines()]
builtin = max(adapters) + 3
adapters = [0] + sorted(adapters) + [builtin]
def is_valid_combination(adapters):
for index... | 24.613861 | 63 | 0.553902 |
216378cde4ab82797eef297f1c4b3cce2571ee4c | 688 | py | Python | tests/test_code/py/inherits/inherits.py | FreddyZeng/code2flow | 37e45ca4340289f8ceec79b3fe5131c401387c58 | [
"MIT"
] | 2,248 | 2015-01-13T21:44:22.000Z | 2022-03-31T07:55:22.000Z | tests/test_code/py/inherits/inherits.py | FreddyZeng/code2flow | 37e45ca4340289f8ceec79b3fe5131c401387c58 | [
"MIT"
] | 44 | 2015-04-09T18:37:01.000Z | 2022-03-25T19:56:11.000Z | tests/test_code/py/inherits/inherits.py | FreddyZeng/code2flow | 37e45ca4340289f8ceec79b3fe5131c401387c58 | [
"MIT"
] | 220 | 2015-02-02T06:35:09.000Z | 2022-03-31T09:21:09.000Z | # from https://ruby-doc.com/docs/ProgrammingRuby/html/tut_modules.html
from inherits_import import MajorScales, PentatonicScales
def majorNum():
pass
def pentaNum():
pass
class FakePentatonicScales():
def pentaNum(self):
if self.numNotes is None:
self.numNotes = 5
return s... | 17.641026 | 70 | 0.65843 |
21639d8e897c55ce5fa88813795ce4ef4e42a381 | 263 | py | Python | terrascript/local/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/local/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/local/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/local/__init__.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class local(terrascript.Provider):
pass
| 17.533333 | 79 | 0.768061 |
2163a72627ba4d02a13948a5a70af7c7075ede6f | 2,782 | py | Python | chroma_core/models/log.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | 1 | 2021-02-08T16:59:14.000Z | 2021-02-08T16:59:14.000Z | chroma_core/models/log.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | chroma_core/models/log.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | # Copyright (c) 2018 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
from django.db import models
import re
class MessageClass:
NORMAL = 0
LUSTRE = 1
LUSTRE_ERROR = 2
COPYTOOL = 3
COPYTOOL_ERROR = 4
@classmetho... | 34.775 | 119 | 0.635514 |
2163a809b5eaee5a9b5d4b37dcef4eff79088f2c | 6,631 | py | Python | tests/components/darksky/test_sensor.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | tests/components/darksky/test_sensor.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | tests/components/darksky/test_sensor.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """The tests for the Dark Sky platform."""
from datetime import timedelta
import re
import unittest
from unittest.mock import MagicMock, patch
import forecastio
from requests.exceptions import HTTPError
import requests_mock
from homeassistant.components.darksky import sensor as darksky
from homeassistant.setup import... | 32.99005 | 82 | 0.627206 |
2163ca5e3d5b027ac36e3a00ca605148f1e2ed0d | 769 | py | Python | qml/tools/control/simulation.py | paiforsyth/qml | 141e5c9ba653992565c54653f91e982f218f2f59 | [
"Apache-2.0"
] | null | null | null | qml/tools/control/simulation.py | paiforsyth/qml | 141e5c9ba653992565c54653f91e982f218f2f59 | [
"Apache-2.0"
] | 29 | 2021-12-20T19:31:31.000Z | 2022-03-30T01:30:34.000Z | qml/tools/control/simulation.py | paiforsyth/qml | 141e5c9ba653992565c54653f91e982f218f2f59 | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
from typing import Generic, Sequence, TypeVar
S = TypeVar("S")
C = TypeVar("C")
class StateUpdater(ABC, Generic[S, C]):
@abstractmethod
def update_state(self, old_state: S, control: C) -> S:
pass
class Controller(ABC, Generic[S, C]):
@abstractmethod
def c... | 24.03125 | 75 | 0.655397 |
2163dce2a67f67a14f3b21143bab86a5cbc55eec | 337 | py | Python | robot-tests/IFS_acceptance_tests/libs/EmailExtensionLibrary.py | adambirse/innovation-funding-service | db1c2bc5a25d3143df02bef9019aefd5261caf6f | [
"MIT"
] | 40 | 2017-03-29T13:58:42.000Z | 2021-07-04T22:13:12.000Z | robot-tests/IFS_acceptance_tests/libs/EmailExtensionLibrary.py | adambirse/innovation-funding-service | db1c2bc5a25d3143df02bef9019aefd5261caf6f | [
"MIT"
] | 19 | 2017-09-30T11:57:32.000Z | 2022-02-13T18:38:48.000Z | robot-tests/IFS_acceptance_tests/libs/EmailExtensionLibrary.py | adambirse/innovation-funding-service | db1c2bc5a25d3143df02bef9019aefd5261caf6f | [
"MIT"
] | 20 | 2017-04-05T11:34:30.000Z | 2022-03-22T14:42:08.000Z | from logging import info
from robot.libraries.BuiltIn import BuiltIn
imap = BuiltIn().get_library_instance('ImapLibrary')
def remove_all_emails(**kwargs):
imap.open_mailbox(**kwargs)
try:
imap.wait_for_email(**kwargs)
imap.delete_all_emails()
except:
info("Couldn't find any mail to delete")
ima... | 21.0625 | 52 | 0.74184 |
21642cf26974d572a58497f54da9266925e1ced9 | 924 | py | Python | crprop/tests/test_init.py | zhampel/cr-igrf-prop | 0ef4d0d4166926aefee6a49ff3d31ebef51c8f54 | [
"MIT"
] | 7 | 2019-01-19T07:13:27.000Z | 2022-02-11T23:47:58.000Z | crprop/tests/test_init.py | zhampel/cr-igrf-prop | 0ef4d0d4166926aefee6a49ff3d31ebef51c8f54 | [
"MIT"
] | 5 | 2018-07-26T18:59:52.000Z | 2018-10-10T20:21:24.000Z | crprop/tests/test_init.py | zhampel/cr-igrf-prop | 0ef4d0d4166926aefee6a49ff3d31ebef51c8f54 | [
"MIT"
] | 4 | 2018-07-12T19:59:00.000Z | 2019-05-07T05:48:26.000Z |
import crprop
def test_version_exists():
assert hasattr(crprop, '__version__')
def test_particle_utils_exists():
assert hasattr(crprop, 'particle_utils')
def test_particle_utils_load_json_file_exists():
assert hasattr(crprop, 'load_json_file')
def test_particle_utils_get_particle_props_exists():
... | 21.488372 | 53 | 0.791126 |
2164332e914c15770dd7871ad50ae52e23af2efe | 6,492 | py | Python | src/tests/test_homography_ranking.py | mondrasovic/homography_ranking | c36a7b621d386f4a31d2926d4f5a9707e13d7847 | [
"MIT"
] | 1 | 2022-03-16T10:56:41.000Z | 2022-03-16T10:56:41.000Z | src/tests/test_homography_ranking.py | mondrasovic/homography_ranking | c36a7b621d386f4a31d2926d4f5a9707e13d7847 | [
"MIT"
] | null | null | null | src/tests/test_homography_ranking.py | mondrasovic/homography_ranking | c36a7b621d386f4a31d2926d4f5a9707e13d7847 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Milan Ondrasovic <milan.ondrasovic@gmail.com>
#
# MIT License
#
# Copyright (c) 2021 Milan Ondrašovič
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"... | 31.514563 | 81 | 0.510474 |
216453b628a25ad1c4fa174ba59be3a77abe6ea1 | 2,318 | py | Python | alipay/aop/api/domain/KoubeiShopWxloginQueryModel.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/KoubeiShopWxloginQueryModel.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/KoubeiShopWxloginQueryModel.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 KoubeiShopWxloginQueryModel(object):
def __init__(self):
self._biz_type = None
self._grant_type = None
self._js_code = None
self._wx_app_id = None
@property
... | 26.953488 | 71 | 0.574633 |
216469117a7d446d6248ad4566f41141924a0bd4 | 2,117 | py | Python | graph_stuff_ref.py | dciampa/transitivecitation | 36eced76ac68aa285bff0493f678c2e91cded250 | [
"MIT"
] | null | null | null | graph_stuff_ref.py | dciampa/transitivecitation | 36eced76ac68aa285bff0493f678c2e91cded250 | [
"MIT"
] | null | null | null | graph_stuff_ref.py | dciampa/transitivecitation | 36eced76ac68aa285bff0493f678c2e91cded250 | [
"MIT"
] | null | null | null | import networkx as nx
import requests
#docstring adapted from ads.Article.build_citation_tree
def build_reference_graph(start_bibcode, token, depth=1, **kwargs):
"""
Builds a reference tree for a paper with bibcode `start_bibcode`
:param start_bibcode:
ADS bibcode of the paper you want the referenc... | 38.490909 | 90 | 0.606046 |
21648f2364bad3916226cb514dcffa3060b80955 | 3,807 | py | Python | pythainlp/util/numtoword.py | boomsquared/pythainlp | 958f51a1b8b4ea09c867d3aa7bc39264da8e2bc4 | [
"Apache-2.0"
] | null | null | null | pythainlp/util/numtoword.py | boomsquared/pythainlp | 958f51a1b8b4ea09c867d3aa7bc39264da8e2bc4 | [
"Apache-2.0"
] | null | null | null | pythainlp/util/numtoword.py | boomsquared/pythainlp | 958f51a1b8b4ea09c867d3aa7bc39264da8e2bc4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Convert number value to Thai read out
Adapted from
http://justmindthought.blogspot.com/2012/12/code-php.html
"""
import math
__all__ = ["bahttext", "num_to_thaiword"]
def bahttext(number: float) -> str:
"""
This function converts a number to Thai text and adds
a suffix "บาท" ... | 24.56129 | 86 | 0.474652 |
21649d1d0a32cc1d17c0b429da1f3abb4de2357b | 5,137 | py | Python | superset/common/query_object.py | rodrigoguariento/incubator-superset | b2633a51d43faaca74751349b96fc32784d4b377 | [
"Apache-2.0"
] | 7 | 2017-11-01T06:00:12.000Z | 2019-01-05T13:31:48.000Z | superset/common/query_object.py | Odirlei-Stein/incubator-superset | 52afc33b31475536b287b56d262b9eaa32f479ab | [
"Apache-2.0"
] | 59 | 2019-10-29T10:43:54.000Z | 2020-01-13T20:28:00.000Z | superset/common/query_object.py | Odirlei-Stein/incubator-superset | 52afc33b31475536b287b56d262b9eaa32f479ab | [
"Apache-2.0"
] | 4 | 2020-06-25T10:42:36.000Z | 2020-08-13T05:39:09.000Z | # 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 (the
# "License"); you may not u... | 36.692857 | 86 | 0.651742 |
2164e7a3fa338ac679c9e5480240cadb932d43dd | 902 | py | Python | google-datacatalog-sisense-connector/src/google/datacatalog_connectors/sisense/prepare/__init__.py | anugrah86/datacatalog-connectors-bi | 58cc57e12632cbd1e237b3d6930e519333c51f4e | [
"Apache-2.0"
] | 27 | 2020-04-27T21:55:49.000Z | 2022-02-18T22:09:13.000Z | google-datacatalog-sisense-connector/src/google/datacatalog_connectors/sisense/prepare/__init__.py | anugrah86/datacatalog-connectors-bi | 58cc57e12632cbd1e237b3d6930e519333c51f4e | [
"Apache-2.0"
] | 36 | 2020-05-01T15:26:14.000Z | 2022-03-26T00:09:19.000Z | google-datacatalog-sisense-connector/src/google/datacatalog_connectors/sisense/prepare/__init__.py | anugrah86/datacatalog-connectors-bi | 58cc57e12632cbd1e237b3d6930e519333c51f4e | [
"Apache-2.0"
] | 18 | 2020-04-30T22:14:09.000Z | 2022-01-13T10:28:03.000Z | #!/usr/bin/python
#
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 39.217391 | 75 | 0.790466 |
216501ff830888da71804cb42913e58e995ae3df | 4,603 | py | Python | veros/core/operators.py | AkasDutta/veros | 9f530596a0148a398829050017de3e01a71261a0 | [
"MIT"
] | 115 | 2019-11-23T02:31:30.000Z | 2022-03-29T12:58:30.000Z | veros/core/operators.py | AkasDutta/veros | 9f530596a0148a398829050017de3e01a71261a0 | [
"MIT"
] | 207 | 2019-11-21T13:21:22.000Z | 2022-03-31T23:36:09.000Z | veros/core/operators.py | AkasDutta/veros | 9f530596a0148a398829050017de3e01a71261a0 | [
"MIT"
] | 21 | 2020-01-28T13:13:39.000Z | 2022-02-02T13:46:33.000Z | import warnings
from contextlib import contextmanager
from veros import runtime_settings, runtime_state, veros_kernel
class Index:
__slots__ = ()
@staticmethod
def __getitem__(key):
return key
def noop(*args, **kwargs):
pass
@contextmanager
def make_writeable(*arrs):
orig_writeable =... | 23.726804 | 94 | 0.628938 |
21653281b8fcb2f30695cd37e2de4ff8c682da8d | 11,380 | py | Python | taro/jobs/runner.py | PetrSixta/taro | afe0caf0e0feb6948c4cc80217b5c5d11418859b | [
"MIT"
] | null | null | null | taro/jobs/runner.py | PetrSixta/taro | afe0caf0e0feb6948c4cc80217b5c5d11418859b | [
"MIT"
] | 26 | 2021-04-05T12:32:21.000Z | 2022-03-22T12:53:44.000Z | taro/jobs/runner.py | PetrSixta/taro | afe0caf0e0feb6948c4cc80217b5c5d11418859b | [
"MIT"
] | 1 | 2021-04-16T21:04:53.000Z | 2021-04-16T21:04:53.000Z | """
Implementation of job management framework based on :mod:`job` module.
"""
import copy
import logging
import re
from collections import deque, Counter
from threading import Lock, Event, RLock
from typing import List, Union, Optional, Callable
import taro.client
from taro import util
from taro.err import IllegalSta... | 39.106529 | 121 | 0.661599 |
216543c18e3a01b6977f5879100e07b5b3856240 | 752 | py | Python | python/smlmlib/context.py | qnano/simflux | 4f149d4e6c997954ac862cc5a7a404855b2a0be9 | [
"MIT"
] | 2 | 2019-12-13T16:24:12.000Z | 2021-03-13T04:02:51.000Z | python/smlmlib/context.py | qnano/simflux | 4f149d4e6c997954ac862cc5a7a404855b2a0be9 | [
"MIT"
] | 1 | 2021-01-25T13:32:43.000Z | 2021-01-26T06:03:19.000Z | python/smlmlib/context.py | qnano/simflux | 4f149d4e6c997954ac862cc5a7a404855b2a0be9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import ctypes
from .base import SMLM
class Context:
def __init__(self, smlm:SMLM):
self.smlm = smlm
lib = smlm.lib
self.lib = lib
self._Context_Create = lib.Context_Create
self._Context_Create.argtypes=[]
self._Context_Create.restype... | 22.787879 | 58 | 0.581117 |
21654b9cf8e887b49cb07ced0eeb4c983917f35a | 4,086 | py | Python | generate_gtex_v8_geno_cov.py | liangyy/SPrediXcan2PTRS | 0398fc92ad66a144027bab3e63d2057cb7c6dc8e | [
"MIT"
] | null | null | null | generate_gtex_v8_geno_cov.py | liangyy/SPrediXcan2PTRS | 0398fc92ad66a144027bab3e63d2057cb7c6dc8e | [
"MIT"
] | null | null | null | generate_gtex_v8_geno_cov.py | liangyy/SPrediXcan2PTRS | 0398fc92ad66a144027bab3e63d2057cb7c6dc8e | [
"MIT"
] | null | null | null | import os
def load_list(fn):
o = []
with open(fn, 'r') as f:
for i in f:
i = i.strip()
o.append(i)
return o
def load_mode(mode_list):
if mode_list[0] not in ['naive', 'cap', 'banded', 'evd']:
raise ValueError('Wrong mode.')
else:
if len(mode_list) !=... | 35.224138 | 119 | 0.589574 |
21655a20bb6fbf3deafd2174acd916772178f2a5 | 1,135 | py | Python | contrib/.venv/lib/python3.8/site-packages/fastecdsa/benchmark.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | 219 | 2016-05-01T14:19:09.000Z | 2022-03-29T00:58:42.000Z | contrib/.venv/lib/python3.8/site-packages/fastecdsa/benchmark.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | 80 | 2016-04-05T10:35:13.000Z | 2022-03-15T19:05:45.000Z | contrib/.venv/lib/python3.8/site-packages/fastecdsa/benchmark.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | 74 | 2016-08-19T06:35:03.000Z | 2022-03-20T04:29:58.000Z | from binascii import b2a_uu
from os import urandom
from timeit import timeit
from .curve import (
Curve, P192, P224, P256, P384, P521, W25519, W448, secp192k1, secp224k1, secp256k1,
brainpoolP160r1, brainpoolP192r1, brainpoolP224r1, brainpoolP256r1, brainpoolP320r1,
brainpoolP384r1, brainpoolP512r1
)
from ... | 33.382353 | 92 | 0.702203 |
216592d8750d05709519048175a546555d5a77f9 | 1,716 | py | Python | app/core/migrations/0001_initial.py | Misiaty-Mat/Event-schedule | 15ab5ec3d49b1f16e43a8d90709df5d143401c7a | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | Misiaty-Mat/Event-schedule | 15ab5ec3d49b1f16e43a8d90709df5d143401c7a | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | Misiaty-Mat/Event-schedule | 15ab5ec3d49b1f16e43a8d90709df5d143401c7a | [
"MIT"
] | null | null | null | # Generated by Django 4.0.1 on 2022-01-25 17:18
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
]
operations = [
migrations.CreateModel(
name='User',
... | 50.470588 | 266 | 0.640443 |
2165b47bf260b78b47a677c1fbf37d314606434b | 3,799 | py | Python | train_timit.py | HanSeokhyeon/Speech_recogniton_for_English_and_Korean | e0eaf1da1e1ac15f34402fea8cb330d008140d61 | [
"MIT"
] | null | null | null | train_timit.py | HanSeokhyeon/Speech_recogniton_for_English_and_Korean | e0eaf1da1e1ac15f34402fea8cb330d008140d61 | [
"MIT"
] | null | null | null | train_timit.py | HanSeokhyeon/Speech_recogniton_for_English_and_Korean | e0eaf1da1e1ac15f34402fea8cb330d008140d61 | [
"MIT"
] | null | null | null | import yaml
from util.timit_dataset import load_dataset, create_dataloader
from model.las_model import LAS, Listener, Speller
from util.functions import train, evaluate, test
import torch
import torch.nn as nn
from tensorboardX import SummaryWriter
import argparse
from logger import *
from pytorch_lightning import seed... | 42.211111 | 119 | 0.754672 |
2165c67e2d7f14dfb7c881ff24ecf4e2e05be11d | 1,183 | py | Python | tests/test_tidyr_full_seq.py | stjordanis/datar | 4e2b5db026ad35918954576badef9951928c0cb1 | [
"MIT"
] | 110 | 2021-03-09T04:10:40.000Z | 2022-03-13T10:28:20.000Z | tests/test_tidyr_full_seq.py | sthagen/datar | 1218a549e2f0547c7b5a824ca6d9adf1bf96ba46 | [
"MIT"
] | 54 | 2021-06-20T18:53:44.000Z | 2022-03-29T22:13:07.000Z | tests/test_tidyr_full_seq.py | sthagen/datar | 1218a549e2f0547c7b5a824ca6d9adf1bf96ba46 | [
"MIT"
] | 11 | 2021-06-18T03:03:14.000Z | 2022-02-25T11:48:26.000Z | # tests grabbed from:
# https://github.com/tidyverse/tidyr/blob/HEAD/tests/testthat/test-full_seq.R
import pytest
from datar.all import *
from .conftest import assert_iterable_equal
def test_full_seq_errors_if_seq_isnot_regular():
with pytest.raises(ValueError, match="not a regular sequence"):
full_seq(c(... | 31.972973 | 77 | 0.705833 |
2165e5964a237b4c672d00d722538aebedb3aa2b | 1,573 | py | Python | test/test_repo/test_stash.py | 132nd-etcher/epab | 5226d3a36580f8cc50cf5dcac426adb1350a2c9b | [
"MIT"
] | 2 | 2018-12-13T06:49:10.000Z | 2018-12-13T07:37:49.000Z | test/test_repo/test_stash.py | etcher-be/epab | 5226d3a36580f8cc50cf5dcac426adb1350a2c9b | [
"MIT"
] | 109 | 2018-08-22T04:25:56.000Z | 2019-10-17T05:10:21.000Z | test/test_repo/test_stash.py | etcher-be/epab | 5226d3a36580f8cc50cf5dcac426adb1350a2c9b | [
"MIT"
] | 1 | 2018-02-25T05:53:18.000Z | 2018-02-25T05:53:18.000Z | # coding=utf-8
from pathlib import Path
import pytest
from mockito import expect, mock, verify, verifyZeroInteractions, when
import epab.utils
from epab.core import CTX
def test_stash(repo):
Path('test').touch()
repo.commit('test')
Path('test').write_text('test')
assert 'test' in repo.changed_files... | 20.166667 | 70 | 0.649078 |
2165e640b1cc78fa1090eb9c5216bed0994818d9 | 8,767 | py | Python | pef/pef.py | ardhendugarai/security-tools | ba2f9dff1a271642b69a854a86d5b4d9466b0f94 | [
"MIT"
] | 1 | 2019-06-13T13:43:22.000Z | 2019-06-13T13:43:22.000Z | pef/pef.py | ardhendugarai/security-tools | ba2f9dff1a271642b69a854a86d5b4d9466b0f94 | [
"MIT"
] | null | null | null | pef/pef.py | ardhendugarai/security-tools | ba2f9dff1a271642b69a854a86d5b4d9466b0f94 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# PHP Exploitable Functions/Vars Scanner
# bl4de | bloorq@gmail.com | Twitter: @_bl4de
#
# pylint: disable=C0103
"""
pef.py - PHP static code analysis tool (very, very simple)
by bl4de
GitHub: bl4de | Twitter: @_bl4de | bloorq@gmail.com
"""
import sys
import os
import argparse
from imports import ... | 38.117391 | 131 | 0.587202 |
216601913e11fc6a9581ed37f11f4d041afe881f | 1,541 | py | Python | papers/none2021_ecrad/data.py | anton-pershin/restools | eb141f0989617db796d106de1b0824161ccaa0aa | [
"MIT"
] | null | null | null | papers/none2021_ecrad/data.py | anton-pershin/restools | eb141f0989617db796d106de1b0824161ccaa0aa | [
"MIT"
] | null | null | null | papers/none2021_ecrad/data.py | anton-pershin/restools | eb141f0989617db796d106de1b0824161ccaa0aa | [
"MIT"
] | null | null | null | from typing import List, Union
from jsons import JsonSerializable
class ReducedPrecisionVersion(JsonSerializable):
def __init__(self, name: str, descr: str):
self.name = name
self.descr = descr
class Summary(JsonSerializable):
"""
Class Summary is a json-serializable summary of the stud... | 37.585366 | 167 | 0.737184 |
21660e9625b4e3426acf96f99383dd0be2a79a98 | 394 | py | Python | Scrapy/mareduc/mareduc/items.py | annelida/stuff | 699d0230d5329a5eaebc8c93f9fba3c53920925f | [
"MIT"
] | null | null | null | Scrapy/mareduc/mareduc/items.py | annelida/stuff | 699d0230d5329a5eaebc8c93f9fba3c53920925f | [
"MIT"
] | 2 | 2021-06-01T21:52:33.000Z | 2021-12-13T19:44:00.000Z | Scrapy/mareduc/mareduc/items.py | annelida/stuff | 699d0230d5329a5eaebc8c93f9fba3c53920925f | [
"MIT"
] | 1 | 2015-10-14T12:16:07.000Z | 2015-10-14T12:16:07.000Z | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class MareducItem(scrapy.Item):
# define the fields for your item here like:
merchant = scrapy.Field()
merchant_link = scrapy.Field()
si... | 21.888889 | 51 | 0.692893 |
21660fd74773df1d8113ea9018d53197837d3ce2 | 48,916 | py | Python | gwlfe/WriteOutputFiles.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | null | null | null | gwlfe/WriteOutputFiles.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 6 | 2018-07-24T22:46:28.000Z | 2018-07-29T19:13:09.000Z | gwlfe/WriteOutputFiles.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 1 | 2018-07-24T18:22:01.000Z | 2018-07-24T18:22:01.000Z | # -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
# from numpy import round
from numpy import zeros
import LoadReductions
from Input.Animals.TotAEU import TotAEU_f
from Input.Animals.TotLAEU import TotLAEU
from Input.A... | 46.720153 | 137 | 0.54381 |
21662dc37a5e0414b615a2ba0d496921dddba6aa | 579 | py | Python | api_tests/conftest.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | api_tests/conftest.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | 4 | 2016-05-13T14:24:16.000Z | 2017-03-30T15:28:31.000Z | api_tests/conftest.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | null | null | null | import logging
# Silence some 3rd-party logging and some "loud" internal loggers
SILENT_LOGGERS = [
'api.caching.tasks',
'factory.generate',
'factory.containers',
'framework.analytics',
'framework.auth.core',
'framework.celery_tasks.signals',
'website.app',
'website.archiver.tasks',
... | 27.571429 | 65 | 0.713299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.