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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
939039d5859e9c7b53755e162f81aeffe89a4fae | 205 | py | Python | chapter2/intogen-mutations/develop/lib/python/intogensm/command/results.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | 1 | 2015-12-22T00:53:18.000Z | 2015-12-22T00:53:18.000Z | chapter2/intogen-mutations/develop/lib/python/intogensm/command/results.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | null | null | null | chapter2/intogen-mutations/develop/lib/python/intogensm/command/results.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | null | null | null | from intogensm.command import RunCommand
from intogensm.analysis import RESULTS_FLOW_NAME
class ResultsCommand(RunCommand):
cmd_name = "results"
def execute(self):
self._wok_run(RESULTS_FLOW_NAME)
| 18.636364 | 48 | 0.814634 |
9390412dba55d4003e8bf8eb4c90fbd2903aca6a | 9,570 | py | Python | JDjangoDemo/account/views.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | 3 | 2020-12-28T05:09:02.000Z | 2021-06-23T10:02:03.000Z | JDjangoDemo/account/views.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | JDjangoDemo/account/views.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.shortcuts import (
render,
redirect,
get_object_or_404,
get_list_or_404,
)
from django.views.generic import View
from django.http import JsonResponse
from django.core.mail import send_mail
from django.contrib.auth.models import User
from django.contrib.aut... | 34.8 | 128 | 0.56604 |
939056f893dc7a63b3b4c5c9d0f8b92f4cb9205c | 7,652 | py | Python | utils/utils_convert2hdf5.py | jiyeonkim127/PSI | 5c525d5304fb756c9314ea3e225bbb180e521b9a | [
"Xnet",
"X11"
] | 138 | 2020-04-18T19:32:12.000Z | 2022-03-31T06:58:33.000Z | utils/utils_convert2hdf5.py | jiyeonkim127/PSI | 5c525d5304fb756c9314ea3e225bbb180e521b9a | [
"Xnet",
"X11"
] | 19 | 2020-04-21T18:24:20.000Z | 2022-03-12T00:25:11.000Z | utils/utils_convert2hdf5.py | jiyeonkim127/PSI | 5c525d5304fb756c9314ea3e225bbb180e521b9a | [
"Xnet",
"X11"
] | 19 | 2020-04-22T01:32:25.000Z | 2022-03-24T02:52:01.000Z | import numpy as np
import scipy.io as sio
import os, glob, sys
import h5py_cache as h5c
sys.path.append('/home/yzhang/workspaces/smpl-env-gen-3d-internal')
sys.path.append('/home/yzhang/workspaces/smpl-env-gen-3d-internal/source')
from batch_gen_hdf5 import BatchGeneratorWithSceneMeshMatfile
import torch
'''
In t... | 49.688312 | 176 | 0.627418 |
93906d9960042b2f8157d5683cd02099ceee3a70 | 18,136 | py | Python | wos/client.py | mnleod/wos | 2a29c92fd53b78b2c952e46838e2ea9a3a5f3240 | [
"MIT"
] | null | null | null | wos/client.py | mnleod/wos | 2a29c92fd53b78b2c952e46838e2ea9a3a5f3240 | [
"MIT"
] | null | null | null | wos/client.py | mnleod/wos | 2a29c92fd53b78b2c952e46838e2ea9a3a5f3240 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__all__ = ['WosClient']
import suds as _suds
import functools as _functools
from base64 import b64encode as _b64encode
from collections import OrderedDict as _OrderedDict
from sys import version_info as _version_info
from limit import limit as _limit
class WosClient():
"""Query the Web of ... | 44.019417 | 79 | 0.60515 |
93906d9a7e17cacc1036cafba691a2b1c450498b | 3,576 | py | Python | experiments/ashvin/corl2020/robonet/cond_robonet1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/corl2020/robonet/cond_robonet1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/corl2020/robonet/cond_robonet1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from experiments.murtaza.multiworld.skew_fit.reacher.generate_uniform_dataset import generate_uniform_dataset_reacher
from multiworld.envs.mujoco.cameras import sawyer_init_camera_zoomed_in, sawyer_pusher_camera_upright_v2
from rlkit.launchers.launcher_util import run_experiment
... | 34.057143 | 121 | 0.643736 |
939083c07ee6a43d573adec24b1c4cb4d8782ccc | 6,237 | py | Python | python/sbp/client/loggers/json_logger.py | zk20/libsbp | 041c5055f5db422258ebb3ce3f8e9f6e5d3e5fa9 | [
"MIT"
] | null | null | null | python/sbp/client/loggers/json_logger.py | zk20/libsbp | 041c5055f5db422258ebb3ce3f8e9f6e5d3e5fa9 | [
"MIT"
] | null | null | null | python/sbp/client/loggers/json_logger.py | zk20/libsbp | 041c5055f5db422258ebb3ce3f8e9f6e5d3e5fa9 | [
"MIT"
] | null | null | null | # Copyright (C) 2015 Swift Navigation Inc.
# Contact: https://support.swiftnav.com
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# ... | 31.984615 | 84 | 0.583133 |
93909b91712caefcd617668e7709b7eb94037745 | 12,205 | py | Python | ncclient/manager.py | mikiec84/ncclient | 7662666aac957fcf6aeb50c05f6b9816179cfd23 | [
"Apache-2.0"
] | null | null | null | ncclient/manager.py | mikiec84/ncclient | 7662666aac957fcf6aeb50c05f6b9816179cfd23 | [
"Apache-2.0"
] | null | null | null | ncclient/manager.py | mikiec84/ncclient | 7662666aac957fcf6aeb50c05f6b9816179cfd23 | [
"Apache-2.0"
] | null | null | null | # Copyright 2009 Shikhar Bhushan
# Copyright 2011 Leonidas Poulopoulos
#
# 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... | 34.871429 | 106 | 0.679148 |
9390b3f7c3402056636f570e6a3d8d035b770001 | 16,362 | py | Python | solvers/denoiser.py | TheoNguyen611/glowIP | 6629b1f62f7d12a57c17194baec7ce85f99753c7 | [
"MIT"
] | 10 | 2020-03-08T03:59:52.000Z | 2021-11-17T02:55:59.000Z | solvers/denoiser.py | TheoNguyen611/glowIP | 6629b1f62f7d12a57c17194baec7ce85f99753c7 | [
"MIT"
] | 3 | 2019-10-20T04:05:24.000Z | 2021-06-04T01:39:53.000Z | solvers/denoiser.py | TheoNguyen611/glowIP | 6629b1f62f7d12a57c17194baec7ce85f99753c7 | [
"MIT"
] | 11 | 2019-08-22T01:31:07.000Z | 2022-02-06T15:20:18.000Z | import numpy as np
import torch
from torchvision import datasets
import torchvision.transforms as transforms
import matplotlib.pyplot as plt
from skimage.measure import compare_psnr, compare_ssim
import skimage.io as sio
from glow.glow import Glow
from dcgan.dcgan import Generator
import json
import os
import warnings
... | 46.748571 | 164 | 0.543882 |
9390d8584213c15b984d576345555f4638b9b73f | 29,408 | py | Python | wmpl/Formats/CAMS.py | gmke/WesternMeteorPyLib | f218ac5abc9c1a53fe3844039909f8efb929b50e | [
"MIT"
] | null | null | null | wmpl/Formats/CAMS.py | gmke/WesternMeteorPyLib | f218ac5abc9c1a53fe3844039909f8efb929b50e | [
"MIT"
] | null | null | null | wmpl/Formats/CAMS.py | gmke/WesternMeteorPyLib | f218ac5abc9c1a53fe3844039909f8efb929b50e | [
"MIT"
] | null | null | null | """ Loading CAMS file products, FTPDetectInfo and CameraSites files, running the trajectory solver on loaded
data.
"""
from __future__ import print_function, division, absolute_import
import os
import sys
import argparse
import numpy as np
from wmpl.Formats.GenericArgumentParser import addSolverOptions
from wm... | 30.569647 | 218 | 0.596096 |
9390d8763f5b9562b0b24e7a9164dcdf34d9dd46 | 23,616 | py | Python | venv/Lib/site-packages/nbdime/tests/test_merge.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 2 | 2021-02-16T16:17:07.000Z | 2021-11-08T20:27:13.000Z | venv/Lib/site-packages/nbdime/tests/test_merge.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/nbdime/tests/test_merge.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 4 | 2020-11-14T17:05:36.000Z | 2020-11-16T18:44:54.000Z | # coding: utf-8
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import unicode_literals
from six.moves import xrange as range
import copy
import pytest
from nbdime import decide_merge, apply_decisions, diff
from nbdime.diff_format import (
op... | 36.957746 | 150 | 0.571858 |
9390daaba37b0deaed3fa2b474013a124aed60e7 | 40,395 | py | Python | components/scream/scripts/test_all_scream.py | ambrad/scream | 52da60f65e870b8a3994bdbf4a6022fdcac7cab5 | [
"BSD-3-Clause"
] | null | null | null | components/scream/scripts/test_all_scream.py | ambrad/scream | 52da60f65e870b8a3994bdbf4a6022fdcac7cab5 | [
"BSD-3-Clause"
] | null | null | null | components/scream/scripts/test_all_scream.py | ambrad/scream | 52da60f65e870b8a3994bdbf4a6022fdcac7cab5 | [
"BSD-3-Clause"
] | null | null | null | from utils import run_cmd, run_cmd_no_fail, expect, check_minimum_python_version, ensure_psutil
from git_utils import get_current_head, get_current_commit, get_current_branch, is_repo_clean, \
cleanup_repo, merge_git_ref, checkout_git_ref, git_refs_difference, print_last_commit
from machines_specs import get_mach_... | 50.117866 | 173 | 0.553658 |
9390db200a757a4e160b68ed22e8ea0a533ef0c8 | 989 | py | Python | oldstuff/python/space/ship.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | 3 | 2016-11-13T09:06:41.000Z | 2021-09-11T23:36:19.000Z | oldstuff/python/space/ship.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | null | null | null | oldstuff/python/space/ship.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | 2 | 2017-04-04T10:03:18.000Z | 2021-09-11T23:36:26.000Z | import pygame
from pygame.locals import *
import os
#from pygame.color import THECOLORS
VX,VY = 2,2
class Ship:
def __init__(self,screen):
self.screen = screen
screensize = self.screen.get_size()
self.sprt_still = pygame.image.load(os.path.join("img","ship.gif"))
self.sprt_up = pygame.image.load(os.path.join... | 25.358974 | 76 | 0.697674 |
9390fb5608f5005668f3731ab95c87dc89a1c38f | 2,322 | py | Python | ibmsecurity/isam/base/activation.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | 1 | 2018-04-24T19:57:09.000Z | 2018-04-24T19:57:09.000Z | ibmsecurity/isam/base/activation.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | null | null | null | ibmsecurity/isam/base/activation.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | 1 | 2020-04-03T09:30:01.000Z | 2020-04-03T09:30:01.000Z | import logging
import ibmsecurity.utilities.tools
logger = logging.getLogger(__name__)
def get(isamAppliance, check_mode=False, force=False):
"""
Get existing activations
"""
return isamAppliance.invoke_get("Retrieving activations",
"/isam/capabilities/v1")
def s... | 29.769231 | 88 | 0.619724 |
9390febc91b803a9e15d82f821cdc9b84fee9173 | 60,964 | py | Python | src/sage/combinat/posets/poset_examples.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 1 | 2016-11-04T16:31:48.000Z | 2016-11-04T16:31:48.000Z | src/sage/combinat/posets/poset_examples.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/posets/poset_examples.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | """
A catalog of posets and lattices.
Some common posets can be accessed through the ``posets.<tab>`` object::
sage: posets.PentagonPoset()
Finite lattice containing 5 elements
Moreover, the set of all posets of order `n` is represented by ``Posets(n)``::
sage: Posets(5)
Posets containing 5 elements... | 35.300521 | 152 | 0.563513 |
93911ab6a9e5ba8c3d1e1a68d8a61d79fcf5c3f5 | 15,547 | py | Python | test/unit/stat/test_sendtimedata.py | arielmakestuff/loadlimit | 70d3d23eecfe7922699098ea4901cc8673d14576 | [
"MIT"
] | null | null | null | test/unit/stat/test_sendtimedata.py | arielmakestuff/loadlimit | 70d3d23eecfe7922699098ea4901cc8673d14576 | [
"MIT"
] | 5 | 2016-11-28T16:59:44.000Z | 2017-03-18T17:10:40.000Z | test/unit/stat/test_sendtimedata.py | arielmakestuff/loadlimit | 70d3d23eecfe7922699098ea4901cc8673d14576 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# test/unit/stat/test_sendtimedata.py
# Copyright (C) 2016 authors and contributors (see AUTHORS file)
#
# This module is released under the MIT License.
"""Test SendTimeData"""
# ============================================================================
# Imports
# =========================... | 26.530717 | 78 | 0.577732 |
939164857c1b4f6b1227d4e333ab17b7e51e8d52 | 2,124 | py | Python | shared/initialization.py | ziwei7437/bert_on_stilts | 353fc45a2caeb9a79f8665997b8ec1de2bd71f45 | [
"Apache-2.0"
] | 105 | 2019-03-07T01:01:40.000Z | 2022-03-02T13:14:38.000Z | shared/initialization.py | ColeFang/CERT-1 | 58a523a14bb7fd219baedabac266e78cee1143ba | [
"Apache-2.0"
] | 8 | 2019-03-07T17:59:46.000Z | 2020-08-07T20:58:20.000Z | shared/initialization.py | ColeFang/CERT-1 | 58a523a14bb7fd219baedabac266e78cee1143ba | [
"Apache-2.0"
] | 28 | 2019-03-07T03:52:11.000Z | 2021-07-19T02:06:45.000Z | import json
import numpy as np
import os
import random
import torch
def init_cuda_from_args(args, logger):
if args.local_rank == -1 or args.no_cuda:
device = torch.device("cuda" if torch.cuda.is_available() and not args.no_cuda else "cpu")
n_gpu = torch.cuda.device_count()
else:
torch.... | 32.676923 | 106 | 0.675141 |
93919aeb659497e46ae990f1ffe1433a5ed7ea1f | 3,126 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/models/_models.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/models/_models.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/models/_models.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.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 ... | 25.622951 | 94 | 0.568778 |
9391aca31d3a63de4b4b8908d4d772b24ffdd49f | 424 | py | Python | meeting5/config/desk.py | swannapa/meeting5 | abc3acf635575592bca1d85c360d598ea48ce6c3 | [
"MIT"
] | null | null | null | meeting5/config/desk.py | swannapa/meeting5 | abc3acf635575592bca1d85c360d598ea48ce6c3 | [
"MIT"
] | null | null | null | meeting5/config/desk.py | swannapa/meeting5 | abc3acf635575592bca1d85c360d598ea48ce6c3 | [
"MIT"
] | null | null | null | # # -*- coding: utf-8 -*-
# from __future__ import unicode_literals
# from frappe import _
#
# def get_data():
# return [
# {
# "label": _("Tools"),
# "icon": "octicon octicon-briefcase",
# "items": [
# {
# "type": "doctype",
# "name": "Meeting",
# "label": _("Meeting"),
# ... | 21.2 | 66 | 0.471698 |
9391c871b25d1106346da74cbc9486f43e0f8bf7 | 836 | py | Python | homeassistant/components/smartthings/const.py | dagobert/home-assistant | 33dcb071dab25dd93ce7bcfae70315ace5af4702 | [
"Apache-2.0"
] | 1 | 2019-03-24T13:30:10.000Z | 2019-03-24T13:30:10.000Z | homeassistant/components/smartthings/const.py | dagobert/home-assistant | 33dcb071dab25dd93ce7bcfae70315ace5af4702 | [
"Apache-2.0"
] | 1 | 2019-02-09T15:44:11.000Z | 2019-02-09T15:44:11.000Z | homeassistant/components/smartthings/const.py | pc-coholic/home-assistant | 24914aade50f7f4f813380b58292d5e91dc47f41 | [
"Apache-2.0"
] | null | null | null | """Constants used by the SmartThings component and platforms."""
import re
APP_OAUTH_SCOPES = [
'r:devices:*'
]
APP_NAME_PREFIX = 'homeassistant.'
CONF_APP_ID = 'app_id'
CONF_INSTALLED_APP_ID = 'installed_app_id'
CONF_INSTANCE_ID = 'instance_id'
CONF_LOCATION_ID = 'location_id'
DATA_MANAGER = 'manager'
DATA_BROKER... | 26.967742 | 78 | 0.703349 |
9391f33b8b71df7f5a98ccbd5470cbc8178f06f3 | 7,861 | py | Python | asyncpraw/models/util.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 72 | 2020-07-14T02:02:21.000Z | 2022-03-15T13:10:02.000Z | asyncpraw/models/util.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 68 | 2020-07-16T05:29:43.000Z | 2022-03-14T12:04:56.000Z | asyncpraw/models/util.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 19 | 2020-07-22T15:34:30.000Z | 2022-03-27T20:28:46.000Z | """Provide helper classes used by other models."""
import asyncio
import random
from collections import OrderedDict
from typing import Any, AsyncGenerator, Callable, List, Optional, Set
class BoundedSet:
"""A set with a maximum size that evicts the oldest items when necessary.
This class does not implement t... | 36.733645 | 88 | 0.644829 |
9391fbe01bafe7f8e2be0950b7bd4f17e3fe147f | 3,998 | py | Python | Internet-Worm/venv_macos/lib/python3.8/site-packages/pyecharts/charts/composite_charts/timeline.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | 1 | 2020-05-12T13:30:03.000Z | 2020-05-12T13:30:03.000Z | Internet-Worm/venv_macos/lib/python3.8/site-packages/pyecharts/charts/composite_charts/timeline.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | null | null | null | Internet-Worm/venv_macos/lib/python3.8/site-packages/pyecharts/charts/composite_charts/timeline.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | null | null | null | from ... import options as opts
from ... import types
from ...charts.chart import Base
class Timeline(Base):
"""
`Timeline` provides functions like switching and playing between multiple charts.
"""
def __init__(self, init_opts: types.Init = opts.InitOpts()):
super().__init__(init_opts=init_o... | 36.018018 | 85 | 0.533517 |
939220661c201e7d04a6197dcb369e3489bc41df | 402 | py | Python | shake128.py | afknst/python-sha3 | 4c0e392e8b37f7d6e9fc89781ba6bef0a30e43cb | [
"MIT"
] | 1 | 2022-03-18T08:12:00.000Z | 2022-03-18T08:12:00.000Z | shake128.py | afknst/python-sha3 | 4c0e392e8b37f7d6e9fc89781ba6bef0a30e43cb | [
"MIT"
] | 1 | 2021-08-16T08:53:01.000Z | 2021-08-31T11:35:41.000Z | shake128.py | afknst/python-sha3 | 4c0e392e8b37f7d6e9fc89781ba6bef0a30e43cb | [
"MIT"
] | 1 | 2021-08-13T13:18:38.000Z | 2021-08-13T13:18:38.000Z | #!/usr/bin/env python3
'''
SHAKE128 executable
'''
import sys
from keccak import shake128_hex
def main():
'''
Main module.
'''
res_hex = shake128_hex(MSG, BYTES_NUM)
print(res_hex)
if __name__ == "__main__":
try:
BYTES_NUM = int(sys.argv[1])
except:
BYTES_NUM = 32
tr... | 14.357143 | 42 | 0.564677 |
939240c5cb7851bd91f35d8b6db669e3c5a156ba | 1,707 | py | Python | PyReactive/assignment_1_V3.py | huak95/PySimBot-extended | cac233150ca5da87af19057d80d458a59c9d1ce9 | [
"Apache-2.0"
] | 1 | 2022-01-24T13:03:29.000Z | 2022-01-24T13:03:29.000Z | PyReactive/assignment_1_V3.py | huak95/PySimBot-extended | cac233150ca5da87af19057d80d458a59c9d1ce9 | [
"Apache-2.0"
] | null | null | null | PyReactive/assignment_1_V3.py | huak95/PySimBot-extended | cac233150ca5da87af19057d80d458a59c9d1ce9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# This is very simple
import os, platform
if platform.system() == "Linux" or platform.system() == "Darwin":
os.environ["KIVY_VIDEO"] = "ffpyplayer"
from pysimbotlib.core import PySimbotApp, Robot
from kivy.logger import Logger
from kivy.config import Config
# Force the program to s... | 28.45 | 108 | 0.580551 |
9392977a3cb587a9d4949c9aba116b8217bd7a26 | 2,333 | py | Python | metrics-pusher/src/bai_metrics_pusher/kubernetes_pod_watcher.py | gavinmbell/benchmark-ai-1 | a697e67d68b843fe9350e55871dad867bab5d51d | [
"Apache-2.0"
] | 6 | 2020-09-29T09:03:04.000Z | 2022-03-14T06:52:25.000Z | metrics-pusher/src/bai_metrics_pusher/kubernetes_pod_watcher.py | gavinmbell/benchmark-ai-1 | a697e67d68b843fe9350e55871dad867bab5d51d | [
"Apache-2.0"
] | null | null | null | metrics-pusher/src/bai_metrics_pusher/kubernetes_pod_watcher.py | gavinmbell/benchmark-ai-1 | a697e67d68b843fe9350e55871dad867bab5d51d | [
"Apache-2.0"
] | 4 | 2020-10-01T07:49:22.000Z | 2021-06-16T19:44:12.000Z | # Copyright 2019 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "l... | 37.629032 | 109 | 0.716245 |
93929c2f4130dce44d54b6f555cbea32c9892b25 | 2,729 | py | Python | code/distributions.py | arjunchandra/continuous-rl | 8f3c655c6a4b2e9d15a6b052e5466c0a75191a08 | [
"MIT"
] | 17 | 2019-03-29T18:30:36.000Z | 2021-10-17T15:38:22.000Z | code/distributions.py | arjunchandra/continuous-rl | 8f3c655c6a4b2e9d15a6b052e5466c0a75191a08 | [
"MIT"
] | 1 | 2019-04-22T22:40:30.000Z | 2019-04-24T21:45:07.000Z | code/distributions.py | ctallec/continuous-rl | 8f3c655c6a4b2e9d15a6b052e5466c0a75191a08 | [
"MIT"
] | 5 | 2019-04-29T16:26:18.000Z | 2020-01-23T07:17:49.000Z | """Distribution facilities (unused)."""
from abc import abstractmethod, ABC
from torch import Tensor
from torch.distributions.normal import Normal as TNormal
from torch.distributions.independent import Independent as TIndependent
from torch.distributions.categorical import Categorical as TCategorical
from torch.distri... | 31.732558 | 84 | 0.69476 |
9392a7dd6567f7de5d14f57812c54963b166bb78 | 4,460 | py | Python | tests/mmm/topology/topology-multiple-tenant.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | 1 | 2015-05-19T08:36:55.000Z | 2015-05-19T08:36:55.000Z | tests/mmm/topology/topology-multiple-tenant.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | null | null | null | tests/mmm/topology/topology-multiple-tenant.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Midokura SARL
#
# 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 writing... | 42.47619 | 79 | 0.566368 |
9392ab80e4bb630a8a2e1da2c6f9e5b211336f1e | 13,467 | py | Python | main/migrations/0001_initial.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | 19 | 2022-02-16T20:00:08.000Z | 2022-03-08T17:38:59.000Z | main/migrations/0001_initial.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | 3 | 2022-02-16T20:59:11.000Z | 2022-02-23T20:40:12.000Z | main/migrations/0001_initial.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.9 on 2022-02-12 08:44
import ckeditor.fields
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='BrandsSlider',
... | 59.325991 | 225 | 0.56709 |
9392ca2500cf05be02f92d371c65240c5658dbad | 1,263 | py | Python | image_dehaze/utils.py | xdr940/NPMCM2020 | dba9d943e83eb94ec816bfd972e28274d7c45cee | [
"MIT"
] | null | null | null | image_dehaze/utils.py | xdr940/NPMCM2020 | dba9d943e83eb94ec816bfd972e28274d7c45cee | [
"MIT"
] | null | null | null | image_dehaze/utils.py | xdr940/NPMCM2020 | dba9d943e83eb94ec816bfd972e28274d7c45cee | [
"MIT"
] | null | null | null | import math
def dis(a,b):
return math.sqrt(pow(abs(a[0]-b[0]),2)+pow(abs(a[1]-b[1]),2))
p1=(1593,935)
p2=(1817,951)
p3=(1811,1439)
p4=(1357,1337)
d23 =dis(p2,p3)
d34=dis(p3,p4)
#print(d23,d34)
def caculate_intrinsic(xx,yx, xy,yy, xz,yz):
u=((yx-yy)+(xz-xy)*xx/(yz-yy) - (xz-xx)*xy/(yz-yx) )/( (xz-xy)/(y... | 16.192308 | 108 | 0.549485 |
9392f40884fd652ee90617b160eba95f56713cd4 | 49,534 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 44.464991 | 229 | 0.668692 |
939326676dae7261a0a64c23e1f8f56f64e08c73 | 1,803 | py | Python | tests/test_base.py | AndreiErshov/SnowieCaster | 7d1f7de89ff671129c393c252653cb74bd369da6 | [
"MIT"
] | 1 | 2022-03-09T20:01:45.000Z | 2022-03-09T20:01:45.000Z | tests/test_base.py | AndreiErshov/SnowieCaster | 7d1f7de89ff671129c393c252653cb74bd369da6 | [
"MIT"
] | null | null | null | tests/test_base.py | AndreiErshov/SnowieCaster | 7d1f7de89ff671129c393c252653cb74bd369da6 | [
"MIT"
] | null | null | null | #pylint: disable=C0114, C0116, W0311, W0212
import pytest
from SnowieCaster import SnowieCaster, Subscription
@pytest.mark.asyncio
@pytest.mark.usefixtures("create_test_caster_noauto")
async def test_subscription_init(create_test_caster_noauto):
caster, _ = create_test_caster_noauto()
await caster.astart()
subscri... | 36.795918 | 82 | 0.816972 |
93933372096b8374000903ca0030d1e9b172b0d2 | 93 | py | Python | quest/__main__.py | Fluorescence-Tools/quest | e17e5682f7686d1acc1fd8a22bdae33963bc16d6 | [
"MIT"
] | null | null | null | quest/__main__.py | Fluorescence-Tools/quest | e17e5682f7686d1acc1fd8a22bdae33963bc16d6 | [
"MIT"
] | 1 | 2019-08-14T08:01:26.000Z | 2019-08-15T22:59:05.000Z | quest/__main__.py | Fluorescence-Tools/quest | e17e5682f7686d1acc1fd8a22bdae33963bc16d6 | [
"MIT"
] | null | null | null | import sys
from quest.quest_gui import start_gui
if __name__ == "__main__":
start_gui()
| 15.5 | 37 | 0.741935 |
93933d982abcf424e87e926f665aa7bbf9ec86f9 | 287 | py | Python | Homework 3/107062240_hw3_act.py | ChristianLin0420/DeepRL | 143a9bfebd264229d9d26fcdc070065225774e04 | [
"MIT"
] | null | null | null | Homework 3/107062240_hw3_act.py | ChristianLin0420/DeepRL | 143a9bfebd264229d9d26fcdc070065225774e04 | [
"MIT"
] | null | null | null | Homework 3/107062240_hw3_act.py | ChristianLin0420/DeepRL | 143a9bfebd264229d9d26fcdc070065225774e04 | [
"MIT"
] | null | null | null | import os
import random
import gym
import numpy as np
import torch
import time
from gym import spaces
from pynput.keyboard import Controller
from pynput.keyboard import Key
from selenium import webdriver
from .test import Agent
"""Segment tree for Prioritized Replay Buffer."""
| 13.045455 | 49 | 0.794425 |
939368c9c6e008b3c4976f55839e665e945cb825 | 24,722 | py | Python | src/sage/combinat/root_system/dynkin_diagram.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/dynkin_diagram.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/root_system/dynkin_diagram.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | """
Dynkin diagrams
AUTHORS:
- Travis Scrimshaw (2012-04-22): Nicolas M. Thiery moved Cartan matrix creation
to here and I cached results for speed.
- Travis Scrimshaw (2013-06-11): Changed inputs of Dynkin diagrams to handle
other Dynkin diagrams and graphs. Implemented remaining Cartan type methods.
- Christi... | 30.296569 | 111 | 0.511285 |
9393dc08ea023765ec933d1b638a5ada5e3e9a41 | 32,649 | py | Python | lib/installed_clients/GenomeFileUtilClient.py | janakagithub/kb_rxn_gene_finder | 49e2cc6483849a83c311968693fda0012bda6484 | [
"MIT"
] | 1 | 2019-05-06T20:44:11.000Z | 2019-05-06T20:44:11.000Z | lib/installed_clients/GenomeFileUtilClient.py | janakagithub/kb_rxn_gene_finder | 49e2cc6483849a83c311968693fda0012bda6484 | [
"MIT"
] | null | null | null | lib/installed_clients/GenomeFileUtilClient.py | janakagithub/kb_rxn_gene_finder | 49e2cc6483849a83c311968693fda0012bda6484 | [
"MIT"
] | 2 | 2018-12-19T12:58:48.000Z | 2018-12-19T13:01:55.000Z | # -*- coding: utf-8 -*-
############################################################
#
# Autogenerated by the KBase type compiler -
# any changes made here will be overwritten
#
############################################################
from __future__ import print_function
# the following is a hack to get the basec... | 65.298 | 97 | 0.661184 |
939441f86f54b9b804968b54172651a39933141d | 4,910 | py | Python | tieba/settings.py | changleibox/TiebaCrawler | d4f0af508660d4e6d38cdb410ce2711117d13f3a | [
"Apache-2.0"
] | 21 | 2018-03-15T05:41:46.000Z | 2021-07-27T00:06:15.000Z | tieba/settings.py | changleibox/TiebaCrawler | d4f0af508660d4e6d38cdb410ce2711117d13f3a | [
"Apache-2.0"
] | 3 | 2018-06-01T09:00:52.000Z | 2020-04-16T11:39:02.000Z | tieba/settings.py | changleibox/TiebaCrawler | d4f0af508660d4e6d38cdb410ce2711117d13f3a | [
"Apache-2.0"
] | 9 | 2018-06-07T02:19:33.000Z | 2021-07-29T02:55:18.000Z | # -*- coding: utf-8 -*-
# Scrapy settings for tieba project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/topics/... | 38.968254 | 108 | 0.743177 |
93944bd2853660ec4bef7cb242b4297fb8569cd8 | 2,328 | py | Python | tests/getl/test_block.py | husqvarnagroup/GETL | 37251abf12bac2efed1fe463b09a288d85969141 | [
"MIT"
] | 8 | 2020-06-10T09:00:17.000Z | 2021-06-07T18:02:19.000Z | tests/getl/test_block.py | husqvarnagroup/GETL | 37251abf12bac2efed1fe463b09a288d85969141 | [
"MIT"
] | 5 | 2020-07-03T10:39:25.000Z | 2021-08-30T14:52:47.000Z | tests/getl/test_block.py | husqvarnagroup/GETL | 37251abf12bac2efed1fe463b09a288d85969141 | [
"MIT"
] | 1 | 2020-05-28T07:53:48.000Z | 2020-05-28T07:53:48.000Z | """Unit tests for the manager class that is the controller of the ETL process."""
import pytest
from getl.block import BlockConfig, BlockLog
@pytest.mark.parametrize(
"prop, search_prop, result",
[
({"Key": "Value"}, ("Key", "Value"), "it-works"),
({"Key": "Value"}, ("wrong", "Value"), None),... | 26.157303 | 82 | 0.565722 |
9394f2a07404fa065e1e49f9033c41bdf79a4f60 | 953 | py | Python | pyplan_engine/classes/Application.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 17 | 2019-12-04T19:22:19.000Z | 2021-07-28T11:17:05.000Z | pyplan_engine/classes/Application.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 9 | 2019-12-13T15:34:43.000Z | 2022-02-10T11:43:00.000Z | pyplan_engine/classes/Application.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 5 | 2019-12-04T15:57:06.000Z | 2021-08-20T19:59:26.000Z | #from pyplan_engine.MainApp import engines
import os
import time
from pyplan_engine.engines import engines
class Application(object):
def __init__(self):
pass
def getStatus(self):
"""GET app status"""
keys = [x for x in engines]
res = {
"useMultiprocess": (os.ge... | 28.029412 | 75 | 0.524659 |
9395198ebeba673d061cc840e827962202bd1b58 | 6,295 | py | Python | tf_agents/environments/py_environment.py | wookayin/tensorflow-agents | ae3751dfeed52422a350227047648dd82297960b | [
"Apache-2.0"
] | 2 | 2018-12-20T01:49:33.000Z | 2019-12-09T13:17:05.000Z | tf_agents/environments/py_environment.py | kuanfang/agents | a0f25a4b44d4fc844c9b804bab60af2167f8d2bb | [
"Apache-2.0"
] | null | null | null | tf_agents/environments/py_environment.py | kuanfang/agents | a0f25a4b44d4fc844c9b804bab60af2167f8d2bb | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The TF-Agents 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... | 31.475 | 80 | 0.699921 |
93953292f232da3f1930d4fc155fefec99f1018f | 7,725 | py | Python | mokas_domains.py | gdurin/mokas | 57893d0191c988b241dcf5701d4213a3cbcf587a | [
"CC-BY-3.0"
] | null | null | null | mokas_domains.py | gdurin/mokas | 57893d0191c988b241dcf5701d4213a3cbcf587a | [
"CC-BY-3.0"
] | null | null | null | mokas_domains.py | gdurin/mokas | 57893d0191c988b241dcf5701d4213a3cbcf587a | [
"CC-BY-3.0"
] | null | null | null | import pickle
import numpy as np
import mahotas
import getLogDistributions as gLD
import matplotlib.pyplot as plt
import itertools
import scipy.spatial as spatial
import scipy.ndimage as nd
from skimage.morphology import remove_small_holes
from skimage.draw import line_aa, line
import matplotlib.pyplot as plt
import sy... | 40.445026 | 142 | 0.579935 |
93953b1510d9e7efcebf9cea945f3950f4686bf5 | 5,031 | py | Python | encoding/transforms/autoaug.py | Womcos/SCARF | b90251bc23410cb810a7082ca75147a7aae21dec | [
"MIT"
] | 1 | 2021-04-06T11:29:04.000Z | 2021-04-06T11:29:04.000Z | encoding/transforms/autoaug.py | Womcos/SCARF | b90251bc23410cb810a7082ca75147a7aae21dec | [
"MIT"
] | null | null | null | encoding/transforms/autoaug.py | Womcos/SCARF | b90251bc23410cb810a7082ca75147a7aae21dec | [
"MIT"
] | 1 | 2021-04-06T08:41:12.000Z | 2021-04-06T08:41:12.000Z |
import math
import random
import numpy as np
from collections import defaultdict
import PIL, PIL.ImageOps, PIL.ImageEnhance, PIL.ImageDraw
RESAMPLE_MODE=PIL.Image.BICUBIC#PIL.Image.BILINEAR#
RANDOM_MIRROR = True
def ShearX(img, v, resample=RESAMPLE_MODE): # [-0.3, 0.3]
assert -0.3 <= v <= 0.3
if RANDOM_MI... | 26.619048 | 94 | 0.555754 |
9395465f1aca8bf9eec711ac6204d151eeba95b5 | 6,312 | py | Python | src/dyncommands/models.py | Cubicpath/dyncommands | 51016364d51a0466cbe05449c736c1dc77186808 | [
"MIT"
] | 1 | 2022-02-08T10:35:40.000Z | 2022-02-08T10:35:40.000Z | src/dyncommands/models.py | Cubicpath/dyncommands | 51016364d51a0466cbe05449c736c1dc77186808 | [
"MIT"
] | null | null | null | src/dyncommands/models.py | Cubicpath/dyncommands | 51016364d51a0466cbe05449c736c1dc77186808 | [
"MIT"
] | null | null | null | ###################################################################################################
# MIT Licence (C) 2022 Cubicpath@Github #
###################################################################################################
"""Simple object mod... | 37.571429 | 128 | 0.601711 |
939549b1e462d3a5f3c2ef28ea22f722603a5765 | 593 | py | Python | challenges/misc/karel/source/beeper-picking-karel.py | infosec-ucalgary/magpieCTF-2021 | 78459a1e16ac3a135e891c2246232c4890960b92 | [
"MIT"
] | 18 | 2021-02-22T00:09:27.000Z | 2022-02-28T14:23:33.000Z | challenges/misc/karel/source/beeper-picking-karel.py | infosec-ucalgary/magpieCTF-2021 | 78459a1e16ac3a135e891c2246232c4890960b92 | [
"MIT"
] | null | null | null | challenges/misc/karel/source/beeper-picking-karel.py | infosec-ucalgary/magpieCTF-2021 | 78459a1e16ac3a135e891c2246232c4890960b92 | [
"MIT"
] | 6 | 2021-02-22T01:32:10.000Z | 2022-02-25T15:48:42.000Z | """
This simple Karel the Robot example contains instructions that cause Karel to
move forward one block, pick up a beeper, then move ahead to the next corner.
It is meant to be run on ex-simple.w, but you can run it on other worlds to
test the Karel simulator's behaviour with things like error conditions.
This exampl... | 24.708333 | 77 | 0.76054 |
939556e74b5363e69968c4fa25112c5904ec9e04 | 12,555 | py | Python | evap/evaluation/models_logging.py | JannisBerndt/EvaP | a3ca8bcf091e811421084c4db14ae9666cf2a27f | [
"MIT"
] | 26 | 2015-01-18T18:01:57.000Z | 2018-10-12T14:37:15.000Z | evap/evaluation/models_logging.py | JannisBerndt/EvaP | a3ca8bcf091e811421084c4db14ae9666cf2a27f | [
"MIT"
] | 737 | 2015-01-02T17:43:25.000Z | 2018-12-10T20:45:10.000Z | evap/evaluation/models_logging.py | JannisBerndt/EvaP | a3ca8bcf091e811421084c4db14ae9666cf2a27f | [
"MIT"
] | 83 | 2015-01-14T12:39:41.000Z | 2018-10-29T16:36:43.000Z | import itertools
import threading
from collections import defaultdict, namedtuple
from datetime import date, datetime, time
from enum import Enum
from json import JSONEncoder
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import... | 39.481132 | 114 | 0.656949 |
9395961d1dc0736bc8d47559be33ad83b620ec9b | 449 | py | Python | comps/migrations/0046_auto_20210530_1836.py | dlanghorne0428/dancesport-tracker-projec | e55d91a4f03c26d6ee8c28846a809064adfdb158 | [
"MIT"
] | null | null | null | comps/migrations/0046_auto_20210530_1836.py | dlanghorne0428/dancesport-tracker-projec | e55d91a4f03c26d6ee8c28846a809064adfdb158 | [
"MIT"
] | 87 | 2020-04-15T22:29:03.000Z | 2022-01-02T02:21:28.000Z | comps/migrations/0046_auto_20210530_1836.py | dlanghorne0428/dancesport-tracker-projec | e55d91a4f03c26d6ee8c28846a809064adfdb158 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2021-05-30 18:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('comps', '0045_heatlist_error'),
]
operations = [
migrations.AlterField(
model_name='heatlist_error',
name='dancer',
... | 22.45 | 75 | 0.603563 |
9395b13a2415eada927b67a77b4a83dd03ae67c2 | 2,825 | py | Python | Interscale_hub/parameter.py | sontheimer/EBRAINS_InterscaleHUB | 2ee323960fb9b0d0c8920fcaee996b56f8a23b56 | [
"BSD-3-Clause"
] | null | null | null | Interscale_hub/parameter.py | sontheimer/EBRAINS_InterscaleHUB | 2ee323960fb9b0d0c8920fcaee996b56f8a23b56 | [
"BSD-3-Clause"
] | null | null | null | Interscale_hub/parameter.py | sontheimer/EBRAINS_InterscaleHUB | 2ee323960fb9b0d0c8920fcaee996b56f8a23b56 | [
"BSD-3-Clause"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright 2020 Forschungszentrum Jülich GmbH
# "Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0. "
#
# Forschungszentrum Jülich
# In... | 38.69863 | 141 | 0.589381 |
9395b42941d8d79ef62df89c548c732d4ad784c0 | 2,800 | py | Python | cryptopaste/utils.py | NyanKiyoshi/CryptoPaste | 103fab82fcf9b8f1abea9f7492f2f8571c3354df | [
"MIT"
] | 1 | 2017-01-09T20:00:29.000Z | 2017-01-09T20:00:29.000Z | cryptopaste/utils.py | NyanKiyoshi/CryptoPaste | 103fab82fcf9b8f1abea9f7492f2f8571c3354df | [
"MIT"
] | null | null | null | cryptopaste/utils.py | NyanKiyoshi/CryptoPaste | 103fab82fcf9b8f1abea9f7492f2f8571c3354df | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# ==== CryptoPaste
# AUTHOR: NyanKiyoshi
# COPYRIGHT: 2015 - NyanKiyoshi
# URL: https://github.com/NyanKiyoshi/CryptoPaste/
# LICENSE: https://github.com/NyanKiyoshi/CryptoPaste/master/LICENSE
#
# This file is part of CryptoPaste under the MIT license. Please take awareness about this latest bef... | 28.571429 | 120 | 0.575357 |
9395cefb2be9e6186c3181a48cdf63ee608c3417 | 1,003 | py | Python | pkg/command/shell_cmd.py | shrohilla/kafka-func-core-tool-test | 110815f74bd035758542526c74ebaa55ce51046f | [
"Apache-2.0"
] | null | null | null | pkg/command/shell_cmd.py | shrohilla/kafka-func-core-tool-test | 110815f74bd035758542526c74ebaa55ce51046f | [
"Apache-2.0"
] | null | null | null | pkg/command/shell_cmd.py | shrohilla/kafka-func-core-tool-test | 110815f74bd035758542526c74ebaa55ce51046f | [
"Apache-2.0"
] | null | null | null | import json
import logging
import time
from pkg.command._command import Command
from pkg.executor._executor import Executor
from pkg.executor.process._process import ProcessExecutor
class ShellCommand(Command):
_retry_count = 3
def __init__(self, cmd: str):
self.cmd = cmd
def execute_command(se... | 26.394737 | 62 | 0.611167 |
9395e36d1b3c66060228a70dcfc275e4abcae901 | 9,832 | py | Python | venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py | GePajarinen/Django-App | cb5cc13fe560a1a929ccd1f88f45219f60e68c43 | [
"MIT"
] | 1 | 2020-06-24T13:23:30.000Z | 2020-06-24T13:23:30.000Z | venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py | GePajarinen/Django-App | cb5cc13fe560a1a929ccd1f88f45219f60e68c43 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py | GePajarinen/Django-App | cb5cc13fe560a1a929ccd1f88f45219f60e68c43 | [
"MIT"
] | null | null | null | import functools
import logging
from pip._vendor import six
from pip._vendor.packaging.utils import canonicalize_name
from pip._vendor.resolvelib import BaseReporter, ResolutionImpossible
from pip._vendor.resolvelib import Resolver as RLResolver
from pip._internal.exceptions import InstallationError
from pip... | 38.108527 | 80 | 0.620423 |
9395ed4c6ed29a310509a37ed97afa7741156691 | 1,338 | py | Python | energy_gap.py | kinimod0/differentiable_sparse_eigen | f5a66e94799003ee7604ff995e347e39160a9313 | [
"MIT"
] | null | null | null | energy_gap.py | kinimod0/differentiable_sparse_eigen | f5a66e94799003ee7604ff995e347e39160a9313 | [
"MIT"
] | 4 | 2022-01-20T13:24:43.000Z | 2022-01-26T12:11:46.000Z | energy_gap.py | kinimod0/differentiable_sparse_eigen | f5a66e94799003ee7604ff995e347e39160a9313 | [
"MIT"
] | 1 | 2021-11-18T17:20:36.000Z | 2021-11-18T17:20:36.000Z | from torch import tensor, stack, float64
from torch import device
import numpy as np
from hamiltonian import Sky_phi
from hamiltonian import ham_total
from xitorch import linalg
from test_sparse_eigen import CsrLinOp
def energy_gap(param_values, J_1 = -1.0, L = 16, dtype = float64, scalfac = 1.0, delta = 0.5, n_eigs ... | 46.137931 | 106 | 0.607623 |
939605b5f5abeaa291dece3029f3ca7497f88cc8 | 3,820 | py | Python | tool-samples/report-roles.py | skunkie/vrealize-pysdk | 958f2c74c815f424665b1ac6529905040cd92b1f | [
"Apache-2.0"
] | 2 | 2019-10-11T09:55:15.000Z | 2020-02-18T07:08:44.000Z | tool-samples/report-roles.py | skunkie/vrealize-pysdk | 958f2c74c815f424665b1ac6529905040cd92b1f | [
"Apache-2.0"
] | null | null | null | tool-samples/report-roles.py | skunkie/vrealize-pysdk | 958f2c74c815f424665b1ac6529905040cd92b1f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
An example to create a report of all the users and assigned roles in a given tenant.
"""
# TODO Allow for specification of output file
# TODO support dynamic subtenant by name or ID
# TODO output data to prettytable
__version__ = "$Revision$"
# $Source$
import argparse
import csv
imp... | 33.80531 | 88 | 0.454712 |
9396217addf02d608d9f358093a5cbf3a085f881 | 19,054 | py | Python | src/ggrc/converters/base_row.py | farcry4998/ggrc-core | c469039dabb55033c1b379850feb19e8dda2e2a1 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-01-04T10:55:14.000Z | 2019-01-04T10:55:14.000Z | src/ggrc/converters/base_row.py | farcry4998/ggrc-core | c469039dabb55033c1b379850feb19e8dda2e2a1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc/converters/base_row.py | farcry4998/ggrc-core | c469039dabb55033c1b379850feb19e8dda2e2a1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2018 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""This module is used for handling a single line from a csv file.
"""
import collections
import itertools
from logging import getLogger
from sqlalchemy import exc
from sqlalchemy.orm import attributes
fro... | 36.926357 | 79 | 0.694185 |
93962debe86564b6b15e936f6cd75da4f0a0fc65 | 20,402 | py | Python | networking_opencontrail/drivers/contrail_driver_base.py | SSU-DCN/opencontrail | 7ad252b008015c213341155dce1c99083049e0e3 | [
"Apache-2.0"
] | null | null | null | networking_opencontrail/drivers/contrail_driver_base.py | SSU-DCN/opencontrail | 7ad252b008015c213341155dce1c99083049e0e3 | [
"Apache-2.0"
] | null | null | null | networking_opencontrail/drivers/contrail_driver_base.py | SSU-DCN/opencontrail | 7ad252b008015c213341155dce1c99083049e0e3 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 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 ... | 36.893309 | 79 | 0.63729 |
93963cd13b0b5f95b52fa5a077201a05130a798b | 16,243 | py | Python | evaluation_utils.py | Bhaskers-Blu-Org1/superglue-mtl | 1eb3e581c0ef3b4c261e0256ec26116d2b657c40 | [
"Apache-2.0"
] | 15 | 2019-09-25T21:27:25.000Z | 2020-12-24T02:22:56.000Z | evaluation_utils.py | Bhaskers-Blu-Org1/superglue-mtl | 1eb3e581c0ef3b4c261e0256ec26116d2b657c40 | [
"Apache-2.0"
] | 2 | 2020-01-10T06:03:28.000Z | 2021-01-02T05:38:19.000Z | evaluation_utils.py | IBM/superglue-mtl | 1eb3e581c0ef3b4c261e0256ec26116d2b657c40 | [
"Apache-2.0"
] | 5 | 2019-09-11T14:53:51.000Z | 2021-04-12T00:55:25.000Z | import numpy as np
import json
import collections
import torch
from typing import List, Optional, Union, Tuple
# we use the fmeasure class from allennlp, they are copied here so that no
# requirement is needed to install allennlp package
class FBetaMeasure(object):
"""Compute precision, recall, F-measure and suppo... | 38.76611 | 124 | 0.627655 |
9396566e570443b9b35fb774a68524bdde507013 | 1,553 | py | Python | hayes/models.py | andersinno/hayes | f0843960ee71e78d3c7360ea8a77ae8b681be1be | [
"MIT"
] | 2 | 2016-02-16T07:43:56.000Z | 2018-05-13T17:31:46.000Z | hayes/models.py | andersinno/hayes | f0843960ee71e78d3c7360ea8a77ae8b681be1be | [
"MIT"
] | 9 | 2017-08-17T11:34:39.000Z | 2021-12-13T19:48:50.000Z | hayes/models.py | andersinno/hayes | f0843960ee71e78d3c7360ea8a77ae8b681be1be | [
"MIT"
] | 3 | 2015-10-29T15:10:19.000Z | 2017-01-14T18:00:45.000Z | # -*- coding: utf-8 -*-
from __future__ import with_statement
from pyes.es import ResultSet
from pyes.models import ElasticSearchModel
from six import text_type
class DjangoElasticSearchModel(ElasticSearchModel):
django_model = None
def get_object(self, using=None):
return self.django_model.objects... | 29.865385 | 76 | 0.598197 |
9396576801e75e341374f629b142929b35b4fe17 | 3,055 | py | Python | ios/dateparser/lib/python2.7/site-packages/convertdate/indian_civil.py | mpercich/Calendarize | d658962d5d205f878afd9876cb64b5381964f112 | [
"MIT"
] | null | null | null | ios/dateparser/lib/python2.7/site-packages/convertdate/indian_civil.py | mpercich/Calendarize | d658962d5d205f878afd9876cb64b5381964f112 | [
"MIT"
] | null | null | null | ios/dateparser/lib/python2.7/site-packages/convertdate/indian_civil.py | mpercich/Calendarize | d658962d5d205f878afd9876cb64b5381964f112 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of convertdate.
# http://github.com/fitnr/convertdate
# Licensed under the GPL-v3.0 license:
# http://opensource.org/licenses/MIT
# Copyright (c) 2016, fitnr <fitnr@fakeisthenewreal>
from math import trunc
from calendar import isleap
from . import greg... | 22.137681 | 75 | 0.569885 |
939690789405da643f389c43488c4ce87608b670 | 2,278 | py | Python | perf-tracking/src/send-error.py | AurelienGalicher/k8s-training | 3b5e157538b6b7c909fa5762b4c6bf705942d6ea | [
"Apache-2.0"
] | null | null | null | perf-tracking/src/send-error.py | AurelienGalicher/k8s-training | 3b5e157538b6b7c909fa5762b4c6bf705942d6ea | [
"Apache-2.0"
] | null | null | null | perf-tracking/src/send-error.py | AurelienGalicher/k8s-training | 3b5e157538b6b7c909fa5762b4c6bf705942d6ea | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
from kafka import KafkaConsumer, KafkaProducer
from pymongo import MongoClient
import json
import sys
# Load default config and override config from an environment variable
DATABASE_URL="mongodb://mongo:27017"
MONGO_REPLICASET="rs0"
DATABASE_NAME = 'mldb'
COLLECTION_NAME = 't... | 31.638889 | 121 | 0.622915 |
9396920c70c3eeb78b2e47d7ffe7d9ac817dc569 | 317 | py | Python | devito/exceptions.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | 20 | 2019-08-01T19:08:10.000Z | 2022-03-20T05:04:06.000Z | devito/exceptions.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | 1 | 2019-12-05T13:00:14.000Z | 2019-12-05T13:00:14.000Z | devito/exceptions.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | 12 | 2019-10-03T14:47:48.000Z | 2021-09-22T14:06:47.000Z | class DevitoError(Exception):
pass
class CompilationError(DevitoError):
pass
class InvalidArgument(DevitoError):
pass
class InvalidOperator(DevitoError):
pass
class VisitorException(DevitoError):
pass
class DSEException(DevitoError):
pass
class DLEException(DevitoError):
pass
| 11.740741 | 36 | 0.741325 |
939698caeb69cc0af6638a50bd428734955f8526 | 4,053 | py | Python | configs/fast_mask_rcnn_r101_fpn_1x.py | forAragaki/mmdection_forjinnan | 4b278596b613f47d5fc2a4651d77ac2ed89a648c | [
"Apache-2.0"
] | 6 | 2019-08-07T14:36:23.000Z | 2022-03-11T01:53:05.000Z | configs/fast_mask_rcnn_r101_fpn_1x.py | forAragaki/mmdection_forjinnan | 4b278596b613f47d5fc2a4651d77ac2ed89a648c | [
"Apache-2.0"
] | null | null | null | configs/fast_mask_rcnn_r101_fpn_1x.py | forAragaki/mmdection_forjinnan | 4b278596b613f47d5fc2a4651d77ac2ed89a648c | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='FastRCNN',
pretrained='modelzoo://resnet101',
backbone=dict(
type='ResNet',
depth=101,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
style='pytorch'),
neck=dict(
type='FPN',
in_channels=[256, ... | 29.369565 | 77 | 0.610659 |
9396ab3c8895f06d2d712c82a6dffba72aa18ec9 | 619 | py | Python | mmaction/utils/__init__.py | rikichou/mmaction2 | a4db04003e7a87e68436e940178ea4c1d1b77ef0 | [
"Apache-2.0"
] | null | null | null | mmaction/utils/__init__.py | rikichou/mmaction2 | a4db04003e7a87e68436e940178ea4c1d1b77ef0 | [
"Apache-2.0"
] | null | null | null | mmaction/utils/__init__.py | rikichou/mmaction2 | a4db04003e7a87e68436e940178ea4c1d1b77ef0 | [
"Apache-2.0"
] | null | null | null | from .collect_env import collect_env
from .decorators import import_module_error_class, import_module_error_func
from .gradcam_utils import GradCAM
from .logger import get_root_logger
from .misc import get_random_string, get_shm_dir, get_thread_id
from .module_hooks import register_module_hooks
from .precise_bn import ... | 41.266667 | 76 | 0.82391 |
9396f027d31e2bbfebb868f984847c69242b364d | 13,207 | py | Python | tensorflow/contrib/framework/python/framework/checkpoint_utils_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/contrib/framework/python/framework/checkpoint_utils_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/framework/python/framework/checkpoint_utils_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.000Z | # 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... | 41.926984 | 80 | 0.665632 |
93971a7a3be1de1efecb0c130593da42c00e1eb3 | 4,082 | py | Python | alipay/aop/api/request/AlipayDataAiserviceCloudbusPredictbuslineSubmitRequest.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/AlipayDataAiserviceCloudbusPredictbuslineSubmitRequest.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/AlipayDataAiserviceCloudbusPredictbuslineSubmitRequest.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.AlipayDataAiserviceCloudbusPredictbuslineSubmitModel import AlipayDataAiserviceCloudbusPredictbuslineSubmitModel
class AlipayDataAis... | 28.151724 | 148 | 0.654091 |
9397228ee02f6c9bab5039c168707b019cc0ae59 | 2,847 | py | Python | src/upgini/ads.py | mrupgini/upgini | b99ffe2791e7b4b52ac1fd825666fda8c7e5e2ad | [
"BSD-3-Clause"
] | null | null | null | src/upgini/ads.py | mrupgini/upgini | b99ffe2791e7b4b52ac1fd825666fda8c7e5e2ad | [
"BSD-3-Clause"
] | null | null | null | src/upgini/ads.py | mrupgini/upgini | b99ffe2791e7b4b52ac1fd825666fda8c7e5e2ad | [
"BSD-3-Clause"
] | null | null | null | import logging
import tempfile
from pathlib import Path
from typing import Dict, Optional
import numpy as np
import pandas as pd
from pandas.api.types import is_string_dtype
from upgini import SearchKey
from upgini.http import get_rest_client
from upgini.metadata import (
DataType,
FileColumnMeaningType,
... | 38.472973 | 120 | 0.674043 |
93973b8b3ac60726bbe19f03a64deec607a309cd | 714 | py | Python | src/BribeNet/gui/apps/temporal/briber_wizard/strategies/p_greedy.py | RobMurray98/BribeNet | 09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc | [
"MIT"
] | null | null | null | src/BribeNet/gui/apps/temporal/briber_wizard/strategies/p_greedy.py | RobMurray98/BribeNet | 09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc | [
"MIT"
] | null | null | null | src/BribeNet/gui/apps/temporal/briber_wizard/strategies/p_greedy.py | RobMurray98/BribeNet | 09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc | [
"MIT"
] | null | null | null | import tkinter as tk
from BribeNet.gui.classes.param_list_frame import ParamListFrame
class PGreedyFrame(ParamListFrame):
name = "P-Greedy"
def __init__(self, parent):
super().__init__(parent)
self.params = {
'u_0': tk.DoubleVar(self, value=10),
'true_average': tk.Do... | 28.56 | 93 | 0.621849 |
939748f8e8530a7f846997b6712d0714612529f3 | 8,073 | py | Python | test/testCurricularUnit.py | up201806185/feupy | 9adeb9d98b7f20d6070dd4d67ed04435cf01e9a6 | [
"MIT"
] | 13 | 2019-08-13T20:11:28.000Z | 2020-01-30T15:09:51.000Z | test/testCurricularUnit.py | up201806185/feupy | 9adeb9d98b7f20d6070dd4d67ed04435cf01e9a6 | [
"MIT"
] | 5 | 2020-05-21T14:50:59.000Z | 2022-01-13T01:32:25.000Z | test/testCurricularUnit.py | dfamonteiro/feupy | 9adeb9d98b7f20d6070dd4d67ed04435cf01e9a6 | [
"MIT"
] | 1 | 2020-01-26T14:42:27.000Z | 2020-01-26T14:42:27.000Z | import unittest
from datetime import datetime
from .FeupyTestCase import FeupyTestCase
from feupy import CurricularUnit, Teacher, timetable
from . import creds
class TestFpro(FeupyTestCase):
@classmethod
def setUpClass(cls):
cls.fpro = CurricularUnit(419983)
def test_attributes(self):
exp... | 34.207627 | 105 | 0.567323 |
93974949962a023a4cad7e4a935e26819b6937ee | 3,708 | py | Python | visionartificial/proyecto/prueba.py | AntiDesert5/Ingenieria-en-Computacion-UAEM | 02b5713ccd3752566d50d0d16fc7719a00d382f4 | [
"MIT"
] | 1 | 2021-08-16T19:44:08.000Z | 2021-08-16T19:44:08.000Z | visionartificial/proyecto/prueba.py | AntiDesert5/Ingenieria-en-Computacion-UAEM | 02b5713ccd3752566d50d0d16fc7719a00d382f4 | [
"MIT"
] | null | null | null | visionartificial/proyecto/prueba.py | AntiDesert5/Ingenieria-en-Computacion-UAEM | 02b5713ccd3752566d50d0d16fc7719a00d382f4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Nov 14 22:23:36 2019
@author: Valenzuela
"""
from azure.cognitiveservices.vision.customvision.training import CustomVisionTrainingClient
ENDPOINT = "https://axel1.cognitiveservices.azure.com/"
# Replace with a valid key
training_key = "ac72797357e74ea9be22996edbfd53ec"
pre... | 38.625 | 169 | 0.764833 |
93974dbe0d6c75bdc7f222799d9053780410b07d | 543 | py | Python | estim/sgd.py | Tabrizian/learning-to-quantize | 545ef7075ff01cbb218600878943554954cef53f | [
"Apache-2.0"
] | 16 | 2020-10-16T16:21:50.000Z | 2021-12-15T06:45:12.000Z | estim/sgd.py | Tabrizian/learning-to-quantize | 545ef7075ff01cbb218600878943554954cef53f | [
"Apache-2.0"
] | null | null | null | estim/sgd.py | Tabrizian/learning-to-quantize | 545ef7075ff01cbb218600878943554954cef53f | [
"Apache-2.0"
] | 4 | 2020-10-27T12:32:28.000Z | 2021-04-25T04:43:45.000Z | import torch
import torch.nn
import torch.multiprocessing
from .gestim import GradientEstimator
class SGDEstimator(GradientEstimator):
def __init__(self, *args, **kwargs):
super(SGDEstimator, self).__init__(*args, **kwargs)
self.init_data_iter()
def grad(self, model, in_place=False):
... | 23.608696 | 59 | 0.64825 |
9397b04be094120409bb4488c690da2e6e44e04e | 11,659 | py | Python | tierpsy/analysis/feat_tierpsy/get_tierpsy_features.py | kushalkolar/tierpsy-tracker | 7976d75cc3c3c8061f5e13c67ba80c250f666880 | [
"MIT"
] | null | null | null | tierpsy/analysis/feat_tierpsy/get_tierpsy_features.py | kushalkolar/tierpsy-tracker | 7976d75cc3c3c8061f5e13c67ba80c250f666880 | [
"MIT"
] | null | null | null | tierpsy/analysis/feat_tierpsy/get_tierpsy_features.py | kushalkolar/tierpsy-tracker | 7976d75cc3c3c8061f5e13c67ba80c250f666880 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 5 18:31:24 2017
@author: ajaver
"""
import numpy as np
import pandas as pd
import tables
from tierpsy.features.tierpsy_features import get_timeseries_features, timeseries_all_columns
from tierpsy.features.tierpsy_features.summary_stats import get_... | 41.78853 | 132 | 0.575264 |
9397b09c4b49a036f5a4c6c2918d4ec7f9160bd2 | 860 | py | Python | setup.py | smba/pycosa | 49eb4b119e7a492a8134f5b35580539ac73a5bb3 | [
"CC0-1.0"
] | 1 | 2022-01-22T09:40:10.000Z | 2022-01-22T09:40:10.000Z | setup.py | smba/pycosa | 49eb4b119e7a492a8134f5b35580539ac73a5bb3 | [
"CC0-1.0"
] | 22 | 2020-11-10T16:41:02.000Z | 2021-07-03T00:02:17.000Z | setup.py | smba/pycosa | 49eb4b119e7a492a8134f5b35580539ac73a5bb3 | [
"CC0-1.0"
] | 1 | 2021-07-02T13:33:00.000Z | 2021-07-02T13:33:00.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setup_args = dict(
name="pycosa",
version="0.1",
author="smba",
author_email="",
description="configuration sampling in python",
long_description=long_description,
long_description_content_type="text/mark... | 23.888889 | 74 | 0.644186 |
9397bfefaf08546d5b65115a4712a09504aca964 | 6,055 | py | Python | infra/services/gsubmodd/gsubmodd.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | infra/services/gsubmodd/gsubmodd.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | infra/services/gsubmodd/gsubmodd.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 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.
import collections
import itertools
import logging
import re
from infra.libs.deps2submodules import deps2submodules
from infra.libs.git2 import CalledProces... | 38.322785 | 80 | 0.684063 |
9397f32be32e1d364d4ca4e1d66e18640ca7b244 | 3,271 | py | Python | vision_transform_codes/tests/sparse_coding_5.py | spencerkent/vision-transform-codes | 63258ce698e436ee3ce29def75c89337759fb98b | [
"BSD-3-Clause"
] | null | null | null | vision_transform_codes/tests/sparse_coding_5.py | spencerkent/vision-transform-codes | 63258ce698e436ee3ce29def75c89337759fb98b | [
"BSD-3-Clause"
] | null | null | null | vision_transform_codes/tests/sparse_coding_5.py | spencerkent/vision-transform-codes | 63258ce698e436ee3ce29def75c89337759fb98b | [
"BSD-3-Clause"
] | null | null | null | """
Test: Subspace sparse coding, fully connected, ista, steepest descent
"""
import _set_the_path
import math
import pickle
import numpy as np
import torch
from training.sparse_coding import train_dictionary
from utils.dataset_generation import OneOutputDset
from utils import defaults
RUN_IDENTIFIER = '_testing_sc_... | 37.597701 | 77 | 0.737083 |
9397ffe2c5155fc4dae852f9b2aaad3f1fb1f132 | 317 | py | Python | scielomanager/scielomanager/tests/tests_connectors.py | patymori/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 8 | 2015-07-07T03:09:16.000Z | 2019-03-16T04:46:32.000Z | scielomanager/scielomanager/tests/tests_connectors.py | DalavanCloud/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 245 | 2015-01-14T13:29:58.000Z | 2022-01-13T00:48:44.000Z | scielomanager/scielomanager/tests/tests_connectors.py | DalavanCloud/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 5 | 2016-02-19T15:47:08.000Z | 2019-03-16T04:46:20.000Z | # coding:utf-8
from mocker import MockerTestCase
from scielomanager.connectors.storage import ArticleElasticsearch
class ElasticsearchTests(MockerTestCase):
def test_client_is_reused(self):
self.assertEqual(ArticleElasticsearch().es_client,
ArticleElasticsearch().es_client)
| 24.384615 | 65 | 0.750789 |
9398120b1a896ae76539735507755602839aa9e4 | 229 | py | Python | files/create_number_folders.py | thejoltjoker/python | 4517065e64d83947648e2aad206ac4ec786b166e | [
"MIT"
] | null | null | null | files/create_number_folders.py | thejoltjoker/python | 4517065e64d83947648e2aad206ac4ec786b166e | [
"MIT"
] | null | null | null | files/create_number_folders.py | thejoltjoker/python | 4517065e64d83947648e2aad206ac4ec786b166e | [
"MIT"
] | null | null | null | import os
path = r"/Volumes/data_a/media/dv/tapes"
for i in range(50):
new_folder = os.path.join(path, "{:03d}".format(i+1))
print(new_folder)
# if not os.path.exists(new_folder):
# os.makedirs(new_folder)
| 20.818182 | 57 | 0.646288 |
93982d08c25bc127861a72665bca8ab182c51c81 | 5,224 | py | Python | rng/rng.py | LucasPickering/rng | ce6d325bd33d16d70e5cc8d952451e3bd17fdcea | [
"MIT"
] | null | null | null | rng/rng.py | LucasPickering/rng | ce6d325bd33d16d70e5cc8d952451e3bd17fdcea | [
"MIT"
] | null | null | null | rng/rng.py | LucasPickering/rng | ce6d325bd33d16d70e5cc8d952451e3bd17fdcea | [
"MIT"
] | null | null | null | import json
import random
from collections import defaultdict
from . import metaphone, segmentation
class DataContainer:
"""
Computes then stores some useful data dumps.
"""
def __init__(self, data_dict):
self._segment_freqs = data_dict["segments"]
self._dmph_lookup = data_dict["dmph"... | 33.703226 | 79 | 0.628254 |
9398340b4b930b7d13b40d32f98d24a1fbbc79c7 | 12,829 | py | Python | lacalut_gui.py | bohdaholas/Lacalut | 7ac47db40da74b16e8bfd8534defd6ff6b2e264c | [
"MIT"
] | null | null | null | lacalut_gui.py | bohdaholas/Lacalut | 7ac47db40da74b16e8bfd8534defd6ff6b2e264c | [
"MIT"
] | null | null | null | lacalut_gui.py | bohdaholas/Lacalut | 7ac47db40da74b16e8bfd8534defd6ff6b2e264c | [
"MIT"
] | null | null | null | from __future__ import division
import time
from tkinter import *
from tkinter import scrolledtext
from functools import partial
from tkinter.ttk import Combobox
from tkinter.ttk import Radiobutton
import random
import json
import re
ERROR_MESSAGES = ['Ви помилилися!', 'Помилка', 'Неправильно', 'Чьо це таке']
imp... | 32.810742 | 353 | 0.629979 |
93984c95f38b5f2ad7f315403039ab9d5021d4e1 | 6,703 | py | Python | miniworld/management/serialization/ShellCommandExecutor.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 5 | 2019-05-11T14:57:15.000Z | 2021-07-05T00:35:25.000Z | miniworld/management/serialization/ShellCommandExecutor.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 27 | 2017-03-17T07:11:02.000Z | 2019-05-26T23:36:56.000Z | miniworld/management/serialization/ShellCommandExecutor.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 6 | 2017-05-03T12:11:33.000Z | 2020-04-03T11:44:27.000Z | import collections
from collections import defaultdict
from concurrent import futures
from multiprocessing import cpu_count
from ordered_set import OrderedSet
from miniworld.model.singletons.Resetable import Resetable
from miniworld.model.singletons.Singletons import singletons
class ShellCommandSerializer(object, ... | 33.515 | 145 | 0.659705 |
93986a9018f730ff409fe1e00871f123cb4b052e | 5,492 | py | Python | devito/symbolics/queries.py | cc-a/devito | 24ede9131473f69c1e44ba3b852f8654d3fd953e | [
"MIT"
] | null | null | null | devito/symbolics/queries.py | cc-a/devito | 24ede9131473f69c1e44ba3b852f8654d3fd953e | [
"MIT"
] | null | null | null | devito/symbolics/queries.py | cc-a/devito | 24ede9131473f69c1e44ba3b852f8654d3fd953e | [
"MIT"
] | 1 | 2020-01-13T01:17:24.000Z | 2020-01-13T01:17:24.000Z | from sympy import Eq, diff, cos, sin, nan
from devito.tools import as_tuple, is_integer
__all__ = ['q_leaf', 'q_indexed', 'q_terminal', 'q_trigonometry', 'q_op', 'q_xop',
'q_terminalop', 'q_sum_of_product', 'q_indirect', 'q_timedimension',
'q_constant', 'q_affine', 'q_linear', 'q_identity', 'q_... | 27.054187 | 88 | 0.637291 |
93988513fd20774c474e599d90adcc9e1f611d8e | 2,281 | py | Python | python/pulumi_eks/__init__.py | floknip/pulumi-eks | 4598fed19874f6ce9e44a33b55c87479d2427d7e | [
"Apache-2.0"
] | null | null | null | python/pulumi_eks/__init__.py | floknip/pulumi-eks | 4598fed19874f6ce9e44a33b55c87479d2427d7e | [
"Apache-2.0"
] | null | null | null | python/pulumi_eks/__init__.py | floknip/pulumi-eks | 4598fed19874f6ce9e44a33b55c87479d2427d7e | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by pulumi-gen-eks. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
# Export this package's modules as members:
from .cluster import *
from .cluster_creation_role_provider import *
from .managed_node_group import *
from .node_gro... | 36.206349 | 95 | 0.662429 |
9398a892d9c842787d3cb54660d947ca387f0caf | 5,945 | py | Python | ginga/qtw/CanvasRenderQt.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/qtw/CanvasRenderQt.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/qtw/CanvasRenderQt.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | #
# CanvasRenderQt.py -- for rendering into a ImageViewQt widget
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
from ginga.qtw.QtHelp import QtGui, QtCore, QFont, QPai... | 32.845304 | 86 | 0.578133 |
93995e806001c7778c438c328fc04111b4fee6d8 | 3,993 | py | Python | qute/__init__.py | Mikfr83/qute | 26b5666af6460aa4f7293321b9f831b3d5bdb3f6 | [
"MIT"
] | 9 | 2019-03-08T22:54:43.000Z | 2021-03-18T05:18:52.000Z | qute/__init__.py | Mikfr83/qute | 26b5666af6460aa4f7293321b9f831b3d5bdb3f6 | [
"MIT"
] | 15 | 2020-03-10T01:13:59.000Z | 2020-06-06T14:43:34.000Z | qute/__init__.py | Mikfr83/qute | 26b5666af6460aa4f7293321b9f831b3d5bdb3f6 | [
"MIT"
] | 5 | 2020-02-14T06:42:09.000Z | 2021-03-18T05:34:46.000Z | """
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, distribute, sublicense, and/or sell
copies of ... | 38.394231 | 88 | 0.800401 |
93996ca3b46257407d97c224d545cd837c8a4888 | 3,229 | py | Python | oscar/lib/python2.7/site-packages/dns/rcode.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/dns/rcode.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/dns/rcode.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2001-2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PRO... | 25.626984 | 73 | 0.633633 |
939994dd0c1ae74a501f639a3f0bbbe14552515d | 13,122 | py | Python | scsim.py | dylkot/scsim | 20011651341c70cbda8e41f6446380b4435693ab | [
"MIT"
] | 13 | 2019-01-23T16:40:04.000Z | 2022-03-03T11:00:48.000Z | scsim.py | dylkot/scsim | 20011651341c70cbda8e41f6446380b4435693ab | [
"MIT"
] | null | null | null | scsim.py | dylkot/scsim | 20011651341c70cbda8e41f6446380b4435693ab | [
"MIT"
] | 6 | 2019-06-15T20:05:36.000Z | 2022-01-28T10:12:24.000Z | import pandas as pd
import numpy as np
import sys
class scsim:
def __init__(self, ngenes=10000, ncells=100, seed=757578,
mean_rate=.3, mean_shape=.6, libloc=11, libscale=0.2,
expoutprob=.05, expoutloc=4, expoutscale=0.5, ngroups=1,
diffexpprob=.1, diffexpdownprob=.5... | 45.881119 | 141 | 0.595184 |
939995e6f82cce0b838291c1d6ae10984ac076d9 | 2,457 | py | Python | build/linux/install-chromeos-fonts.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | build/linux/install-chromeos-fonts.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | build/linux/install-chromeos-fonts.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | #!/usr/bin/env python
# Copyright 2013 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.
# Script to install the Chrome OS fonts on Linux.
# This script can be run manually (as root), but is also run as part
# install-build-... | 28.569767 | 80 | 0.649166 |
93999d27019c543d1783c8d908e2c88891fe046b | 4,168 | py | Python | chemicals/data_reader.py | volpatto/chemicals | 721904ee17604f5e8685b0e5fff12e0bac567f73 | [
"MIT"
] | null | null | null | chemicals/data_reader.py | volpatto/chemicals | 721904ee17604f5e8685b0e5fff12e0bac567f73 | [
"MIT"
] | null | null | null | chemicals/data_reader.py | volpatto/chemicals | 721904ee17604f5e8685b0e5fff12e0bac567f73 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2020 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
... | 34.446281 | 92 | 0.673225 |
93999dd04ad4079316eee206547910adef3c13d6 | 8,593 | py | Python | tests/test_embedder.py | AndreaSottana/pdf2emb_nlp | e0daf5c17af10769f8d7682c83e6349263d45bba | [
"MIT"
] | 8 | 2020-04-07T17:19:15.000Z | 2021-11-08T15:59:41.000Z | tests/test_embedder.py | AndreaSottana/pdf2emb_nlp | e0daf5c17af10769f8d7682c83e6349263d45bba | [
"MIT"
] | null | null | null | tests/test_embedder.py | AndreaSottana/pdf2emb_nlp | e0daf5c17af10769f8d7682c83e6349263d45bba | [
"MIT"
] | 2 | 2020-04-21T12:54:25.000Z | 2021-03-09T02:09:31.000Z | import os
import numpy as np
import pandas as pd
import warnings
import pandas.util.testing as pdt
from pdf2emb_nlp.embedder import Embedder
import pytest
class TestEmbedder:
"""For a fully reproducible run of the Word2Vec models, set PYTHONHASHSEED environment variable to 123."""
def test_class_instantiation... | 54.732484 | 119 | 0.699988 |
9399a4100eaf1f69ccd2cf1233792b483c53f830 | 2,315 | py | Python | Week 2/day 9 - Dictonaries/code_challenge.py | eddie246/python-playground | 10c4a43c0a4974c1beab52c8b6533ffd93b01520 | [
"MIT"
] | 1 | 2021-07-26T05:31:57.000Z | 2021-07-26T05:31:57.000Z | Week 2/day 9 - Dictonaries/code_challenge.py | eddie246/python-playground | 10c4a43c0a4974c1beab52c8b6533ffd93b01520 | [
"MIT"
] | null | null | null | Week 2/day 9 - Dictonaries/code_challenge.py | eddie246/python-playground | 10c4a43c0a4974c1beab52c8b6533ffd93b01520 | [
"MIT"
] | null | null | null | # You have access to a database of student_scores in the format of a dictionary. The keys in student_scores are the names of the students and the values are their exam scores.
# Write a program that converts their scores to grades. By the end of your program, you should have a new dictionary called student_grades that... | 29.679487 | 278 | 0.671274 |
9399ab1cbc4d1da77f579ff93d28ed6fbb4cd6fc | 2,759 | py | Python | experiments/ashvin/icml2020/hand/pen/offpolicy2/sac2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/pen/offpolicy2/sac2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/pen/offpolicy2/sac2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader
from rlkit.launchers.experiments.awac.awac_rl import experiment
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.arglauncher import run_variants
if __name__ == "__main__":
variant = dict(... | 27.868687 | 74 | 0.56361 |
9399c2d2e334d3472cb716074c5a4160682e9856 | 6,942 | py | Python | code/synthetic_datasets/synth_mcmc.py | sgibson91/magprop | e166316a01e7b5fe9e2d7239a9442717e5abf874 | [
"MIT"
] | 3 | 2019-01-12T09:45:14.000Z | 2021-04-02T02:01:53.000Z | code/synthetic_datasets/synth_mcmc.py | sgibson91/magprop | e166316a01e7b5fe9e2d7239a9442717e5abf874 | [
"MIT"
] | 22 | 2019-01-11T15:12:38.000Z | 2020-04-22T17:03:08.000Z | code/synthetic_datasets/synth_mcmc.py | sgibson91/magprop | e166316a01e7b5fe9e2d7239a9442717e5abf874 | [
"MIT"
] | 1 | 2019-05-07T06:01:21.000Z | 2019-05-07T06:01:21.000Z | from __future__ import print_function
import os
import sys
import json
import argparse
import numpy as np
import emcee as em
import pandas as pd
import matplotlib.pyplot as plt
from funcs import model_lum
from mcmc_eqns import lnprob
from multiprocessing import Pool
from matplotlib.ticker import MaxNLocator
truths = ... | 29.666667 | 80 | 0.574042 |
9399e2651d4197e226c6b1648a9d9b1c48747039 | 2,650 | py | Python | .leetcode/88.merge-sorted-array.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/88.merge-sorted-array.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/88.merge-sorted-array.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=88 lang=python3
#
# [88] Merge Sorted Array
#
# https://leetcode.com/problems/merge-sorted-array/description/
#
# algorithms
# Easy (40.91%)
# Likes: 3688
# Dislikes: 5262
# Total Accepted: 857.9K
# Total Submissions: 2.1M
# Testcase Example: '[1,2,3,0,0,0]\n3\n[2,5,6]\n3'
#
# Given two sor... | 21.900826 | 77 | 0.486415 |
9399eb2b32ac03d9a1cffff411044a4199a4474c | 4,195 | py | Python | data/tracking/methods/_common/builders/build_dataset_sampler.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 143 | 2021-12-03T02:33:36.000Z | 2022-03-29T00:01:48.000Z | data/tracking/methods/_common/builders/build_dataset_sampler.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 33 | 2021-12-03T10:32:05.000Z | 2022-03-31T02:13:55.000Z | data/tracking/methods/_common/builders/build_dataset_sampler.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 24 | 2021-12-04T06:46:42.000Z | 2022-03-30T07:57:47.000Z | from core.run.event_dispatcher.register import EventRegister
from miscellanies.torch.distributed import is_main_process
from data.tracking.methods._common.builders.dataset_sampling_weight import get_dataset_sampling_weight
class _HookWrapper:
def __init__(self, object_):
self.object_ = object_
def on... | 60.797101 | 186 | 0.771633 |
9399fc2edda03732086a27e7b38d1bc85f80cd61 | 1,687 | py | Python | src/scatterbrained/network/zmq_ip_test.py | JHUAPL/scatterbrained | bead942a3d711f81b8718ca2111420b5ff5f996f | [
"Apache-2.0"
] | 4 | 2021-12-14T19:56:24.000Z | 2022-01-10T23:50:55.000Z | src/scatterbrained/network/zmq_ip_test.py | JHUAPL/scatterbrained | bead942a3d711f81b8718ca2111420b5ff5f996f | [
"Apache-2.0"
] | 1 | 2022-02-15T09:20:05.000Z | 2022-02-15T09:20:05.000Z | src/scatterbrained/network/zmq_ip_test.py | JHUAPL/scatterbrained | bead942a3d711f81b8718ca2111420b5ff5f996f | [
"Apache-2.0"
] | 3 | 2022-01-21T22:19:39.000Z | 2022-02-22T05:37:59.000Z | import asyncio
import pytest
import zmq
import zmq.asyncio
from .zmq_ip import ZMQReceiver, ZMQTransmitter
# All test coroutines will be treated as marked.
pytestmark = pytest.mark.asyncio
@pytest.fixture
def addr():
return "127.0.0.1"
@pytest.fixture
def port():
return 9001
@pytest.fixture
def context... | 21.0875 | 75 | 0.697095 |
939a1c74938644598d448b6e82b870393cf46678 | 543 | py | Python | vyperlogix/win/walk_folders.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/win/walk_folders.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/win/walk_folders.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | from win32com.shell import shell, shellcon
def walk(folder, depth=2, indent=""):
try:
pidls = folder.EnumObjects(0, shellcon.SHCONTF_FOLDERS)
except shell.error:
return
for pidl in pidls:
dn = folder.GetDisplayNameOf(pidl, shellcon.SHGDN_NORMAL)
print indent, dn
if d... | 30.166667 | 79 | 0.578269 |
939a7c880058a21b17ea9be74b6b4e200d8530bf | 18,756 | py | Python | lbry/wallet/network.py | timgates42/lbry-sdk | 09ee104b8cb3f198abfded05f1876da2855eb2f8 | [
"MIT"
] | null | null | null | lbry/wallet/network.py | timgates42/lbry-sdk | 09ee104b8cb3f198abfded05f1876da2855eb2f8 | [
"MIT"
] | null | null | null | lbry/wallet/network.py | timgates42/lbry-sdk | 09ee104b8cb3f198abfded05f1876da2855eb2f8 | [
"MIT"
] | null | null | null | import logging
import asyncio
import json
from time import perf_counter
from operator import itemgetter
from typing import Dict, Optional, Tuple
import aiohttp
from lbry import __version__
from lbry.error import IncompatibleWalletServerError
from lbry.wallet.rpc import RPCSession as BaseClientSession, Connector, RPCEr... | 43.21659 | 115 | 0.63569 |
939a92b6565e421d27f25fbcc9e51ed23ae0f720 | 3,324 | py | Python | future/lo/test/test_orth.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | future/lo/test/test_orth.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | future/lo/test/test_orth.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import unittest
from functools import reduce
import numpy
from pyscf import gto
from pyscf import scf
from pyscf.lo import orth
mol = gto.Mole()
mol.verbose = 0
mol.output = None
mol.atom = '''
O 0. 0. 0
1 0. -0.757 0.587
1 0. 0.757 0.587'''
mol.basis = ... | 34.625 | 76 | 0.565283 |
939b0da80d5fb36cf6cbf7797c044a665e158122 | 1,913 | py | Python | airflow/utils/platform.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | null | null | null | airflow/utils/platform.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | 1 | 2020-09-04T05:20:00.000Z | 2020-09-04T05:20:00.000Z | airflow/utils/platform.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"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 (the
# "License"); you may not u... | 30.365079 | 110 | 0.702039 |
939b14315c6a24ec4045e16d932594dc57b3e548 | 1,404 | py | Python | setup.py | elbaro/neptune-contrib | 568454cd8171da0b04fe609bc8ca446a77979e5e | [
"MIT"
] | null | null | null | setup.py | elbaro/neptune-contrib | 568454cd8171da0b04fe609bc8ca446a77979e5e | [
"MIT"
] | null | null | null | setup.py | elbaro/neptune-contrib | 568454cd8171da0b04fe609bc8ca446a77979e5e | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
def main():
with open('README.md') as readme_file:
readme = readme_file.read()
extras = {
'bots': ['python-telegram-bot'],
'hpo': ['scikit-optimize>=0.5.2', 'scipy'],
'monitoring': ['scikit-optimize>=0.7.4', 'sacred>=0.7.5', 'scikit-... | 31.909091 | 119 | 0.57265 |
939b256e90491489f697a94e59d6027300e05f0f | 14,363 | py | Python | tests/spec/test_struct.py | albertyw/thriftrw-python | 22f6ab645f5af48cae2fee0dc1431dfacb971348 | [
"MIT"
] | 40 | 2016-02-18T18:01:23.000Z | 2022-03-31T10:34:33.000Z | tests/spec/test_struct.py | albertyw/thriftrw-python | 22f6ab645f5af48cae2fee0dc1431dfacb971348 | [
"MIT"
] | 56 | 2016-02-10T16:51:07.000Z | 2020-02-07T05:28:49.000Z | tests/spec/test_struct.py | albertyw/thriftrw-python | 22f6ab645f5af48cae2fee0dc1431dfacb971348 | [
"MIT"
] | 12 | 2016-03-29T17:29:28.000Z | 2021-10-30T14:36:39.000Z | # Copyright (c) 2016 Uber Technologies, Inc.
#
# 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, publ... | 29.133874 | 79 | 0.607951 |
939b28f82b4636d3552596907aee23be3082b67b | 3,122 | py | Python | src/cone/ldap/__init__.py | conestack/cone.ldap | 6e73820eb9d1ffc03aea2c5b86e5a52ca82dd89b | [
"BSD-2-Clause"
] | 1 | 2019-07-09T12:46:59.000Z | 2019-07-09T12:46:59.000Z | src/cone/ldap/__init__.py | bluedynamics/cone.ldap | 4ab76ae2474da1040411ab4cc699c2cde806df34 | [
"BSD-2-Clause"
] | null | null | null | src/cone/ldap/__init__.py | bluedynamics/cone.ldap | 4ab76ae2474da1040411ab4cc699c2cde806df34 | [
"BSD-2-Clause"
] | null | null | null | from cone.app import cfg
from cone.app import get_root
from cone.app import main_hook
from cone.app import register_config
from cone.app.ugm import ugm_backend
from cone.app.ugm import UGMFactory
from cone.ldap import browser
from cone.ldap.browser import static_resources
from cone.ldap.settings import ldap_cfg
from co... | 34.307692 | 73 | 0.67681 |
939b2e403a316ad3599911b76359adb3a386ff00 | 9,837 | py | Python | train_procgen/train_test_vanilla.py | MandiZhao/train-procgen | 2c3e1d34aaeab7598cf859e0f9137552a3ce27cb | [
"MIT"
] | null | null | null | train_procgen/train_test_vanilla.py | MandiZhao/train-procgen | 2c3e1d34aaeab7598cf859e0f9137552a3ce27cb | [
"MIT"
] | null | null | null | train_procgen/train_test_vanilla.py | MandiZhao/train-procgen | 2c3e1d34aaeab7598cf859e0f9137552a3ce27cb | [
"MIT"
] | null | null | null | """
Train OR test an vanilla agent
$ taskset -c 0-7 python train_procgen/train_recenter.py -id 7 --num_levels 25
"""
import os
from os.path import join
import json
import tensorflow as tf
# from baselines.ppo2 import ppo2
import vanilla_ppo
from vanilla_ppo import Runner as TestRunner
from train_procgen.policies impor... | 36.433333 | 134 | 0.676222 |
939b3d1a9172ed05cd9e7fd1a051a11669da2042 | 4,379 | py | Python | sasl/auth.py | thisismedium/python-sasl | 7ad43f2c7dd5f5e1da4696da0ced5ecd634a1dee | [
"BSD-2-Clause"
] | 2 | 2015-07-28T11:00:50.000Z | 2021-09-13T14:50:31.000Z | sasl/auth.py | thisismedium/python-sasl | 7ad43f2c7dd5f5e1da4696da0ced5ecd634a1dee | [
"BSD-2-Clause"
] | null | null | null | sasl/auth.py | thisismedium/python-sasl | 7ad43f2c7dd5f5e1da4696da0ced5ecd634a1dee | [
"BSD-2-Clause"
] | 4 | 2015-11-06T20:33:37.000Z | 2022-01-27T05:02:14.000Z | """auth -- rudimentary authenticator interface
This authenticator interface wraps up the messy loose-ends of
interfacing SASL to a real environment.
Copyright (c) 2009, Coptix, Inc. All rights reserved.
See the LICENSE file for license terms and warranty disclaimer.
"""
from __future__ import absolute_import
import... | 27.198758 | 98 | 0.640786 |
939b44188afd55fcb063ff6fc5af37d86adc4fa6 | 793 | py | Python | botoflow/core/exceptions.py | boto/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 13 | 2016-06-15T06:10:57.000Z | 2021-10-30T03:52:28.000Z | botoflow/core/exceptions.py | DalavanCloud/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 11 | 2016-09-15T01:48:08.000Z | 2019-01-09T06:11:44.000Z | botoflow/core/exceptions.py | DalavanCloud/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 16 | 2016-06-05T03:42:04.000Z | 2022-03-01T17:43:14.000Z | # Copyright 2013 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0
#
# or in the "license" file accompa... | 26.433333 | 75 | 0.712484 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.