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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
93ceeda6e173a0e3b4393ad8d5a063087c32f123 | 16,338 | py | Python | st2reactor/st2reactor/container/sensor_wrapper.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2020-11-21T10:11:25.000Z | 2020-11-21T10:11:25.000Z | st2reactor/st2reactor/container/sensor_wrapper.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2015-06-08T15:27:11.000Z | 2015-06-08T15:27:11.000Z | st2reactor/st2reactor/container/sensor_wrapper.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 13 | 2017-01-12T11:07:20.000Z | 2019-04-19T09:55:49.000Z | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 34.985011 | 97 | 0.616171 |
93cf04244be3c052a4e843205bc1f26482b545c4 | 106,017 | py | Python | common/alignment.py | Jimmy-A-Caroli/protwis | 8987947f9325b2e331e957587cda39e4995628f5 | [
"Apache-2.0"
] | null | null | null | common/alignment.py | Jimmy-A-Caroli/protwis | 8987947f9325b2e331e957587cda39e4995628f5 | [
"Apache-2.0"
] | null | null | null | common/alignment.py | Jimmy-A-Caroli/protwis | 8987947f9325b2e331e957587cda39e4995628f5 | [
"Apache-2.0"
] | null | null | null | import hashlib
import json
import logging
import os
import time
from collections import OrderedDict
from copy import deepcopy
from operator import itemgetter
import numpy as np
from alignment.functions import prepare_aa_group_preference
from Bio.Align import substitution_matrices
from common.definitions import *
from... | 54.507455 | 254 | 0.563296 |
93cf6f2d0d2635d28d8e5ca76e9a8545d3ea2ee0 | 8,453 | py | Python | pywicta/io/geometry_converter.py | jeremiedecock/pywi-cta | 1185f7dfa48d60116472c12ffc423be78a250fc9 | [
"MIT"
] | null | null | null | pywicta/io/geometry_converter.py | jeremiedecock/pywi-cta | 1185f7dfa48d60116472c12ffc423be78a250fc9 | [
"MIT"
] | 1 | 2018-03-23T15:44:10.000Z | 2018-03-23T15:44:10.000Z | pywicta/io/geometry_converter.py | jeremiedecock/pywi-cta | 1185f7dfa48d60116472c12ffc423be78a250fc9 | [
"MIT"
] | 1 | 2018-10-02T08:34:53.000Z | 2018-10-02T08:34:53.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Jérémie DECOCK (http://www.jdhp.org)
# This script is provided under the terms and conditions of the MIT license:
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (th... | 38.598174 | 111 | 0.595292 |
93cf70fdfac2f4bec740ce868a8771da43eac1ad | 2,065 | py | Python | python/src/aoc/year2017/day7.py | ocirne/adventofcode | ea9b5f1b48a04284521e85c96b420ed54adf55f0 | [
"Unlicense"
] | 1 | 2021-02-16T21:30:04.000Z | 2021-02-16T21:30:04.000Z | python/src/aoc/year2017/day7.py | ocirne/adventofcode | ea9b5f1b48a04284521e85c96b420ed54adf55f0 | [
"Unlicense"
] | null | null | null | python/src/aoc/year2017/day7.py | ocirne/adventofcode | ea9b5f1b48a04284521e85c96b420ed54adf55f0 | [
"Unlicense"
] | null | null | null | from collections import Counter
from dataclasses import dataclass
from aoc.util import load_example, load_input
@dataclass
class Node:
name: str
weight: int
total_weight: int = 0
parent: str = None
children: list = None
def prepare_tree(lines):
parents = {}
nodes = {}
for line in lin... | 26.818182 | 101 | 0.630508 |
93cf75bd2957b51906800d7a49fcdddce0917db6 | 20,746 | py | Python | distributed/deploy/spec.py | marco-neumann-jdas/distributed | 86b5743ae1be52c80ebe440f5b58e8529fe2817e | [
"BSD-3-Clause"
] | null | null | null | distributed/deploy/spec.py | marco-neumann-jdas/distributed | 86b5743ae1be52c80ebe440f5b58e8529fe2817e | [
"BSD-3-Clause"
] | null | null | null | distributed/deploy/spec.py | marco-neumann-jdas/distributed | 86b5743ae1be52c80ebe440f5b58e8529fe2817e | [
"BSD-3-Clause"
] | null | null | null | import asyncio
import atexit
from contextlib import suppress
import copy
import logging
import math
import weakref
import dask
from tornado import gen
from .adaptive import Adaptive
from .cluster import Cluster
from ..core import rpc, CommClosedError, Status
from ..utils import (
LoopRunner,
silence_logging,
... | 33.353698 | 100 | 0.587294 |
93cf9b9b40dc7912898554151ace0ae212e2613e | 2,757 | py | Python | test/integration/rmq_2_sysmon/main.py | mjpernot/rmq-sysmon | 728f696a451b6c870feb22e53be09bfcd7ed3c77 | [
"MIT"
] | null | null | null | test/integration/rmq_2_sysmon/main.py | mjpernot/rmq-sysmon | 728f696a451b6c870feb22e53be09bfcd7ed3c77 | [
"MIT"
] | null | null | null | test/integration/rmq_2_sysmon/main.py | mjpernot/rmq-sysmon | 728f696a451b6c870feb22e53be09bfcd7ed3c77 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Classification (U)
"""Program: main.py
Description: Integration testing of main in rmq_2_sysmon.py.
Usage:
test/integration/rmq_2_sysmon/main.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < (2, 7):
import unit... | 24.39823 | 77 | 0.642728 |
93cff66b143ea5ffafd0965a70f49b5981e27283 | 32,006 | py | Python | tests/integration/test_jsme.py | brybackGMet/dash-bio | 31cc7828e26094c4c49b08374dc515ef25637834 | [
"MIT"
] | 1 | 2021-11-14T23:27:07.000Z | 2021-11-14T23:27:07.000Z | tests/integration/test_jsme.py | apblair/dash-bio | aab01c520460e69eda29e07c97c3a9f9aef61f60 | [
"MIT"
] | null | null | null | tests/integration/test_jsme.py | apblair/dash-bio | aab01c520460e69eda29e07c97c3a9f9aef61f60 | [
"MIT"
] | null | null | null | import time
import dash
import dash_html_components as html
from dash.testing.errors import TestingTimeoutError
import dash_bio
from common_features import simple_app_layout
_COMPONENT_ID = 'test-jsme'
_TEST_SMILES = 'O=C(Nc1cccc(Cl)c1)c3cncc4nnc(c2ccc(OC(F)F)cc2)n34'
# Selectors
_DRAW_BOARD_SELECTOR = 'div > div ... | 31.564103 | 100 | 0.668593 |
93cffeb1941ed14e65c0454d63707a93eb6dd98f | 6,183 | py | Python | experiments/vitchyr/nips2018/rl_with_vae/sawyer_push_and_reach/grill.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | experiments/vitchyr/nips2018/rl_with_vae/sawyer_push_and_reach/grill.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/vitchyr/nips2018/rl_with_vae/sawyer_push_and_reach/grill.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | from rlkit.envs.mujoco.sawyer_push_and_reach_env import \
SawyerPushAndReachXYEnv, SawyerPushAndReachXYEasyEnv
from rlkit.envs.mujoco.sawyer_push_env import SawyerPushXYEnv
from rlkit.envs.multitask.point2d import MultitaskImagePoint2DEnv
from rlkit.envs.multitask.pusher2d import FullPusher2DEnv
from rlkit.images.c... | 42.9375 | 177 | 0.63335 |
93d0037c99d43288a63e1564560c2fcbe5e81254 | 15,520 | py | Python | gui/qt/slp_add_token_dialog.py | pvyhnal-generalbytes/Electron-Cash-SLP | 0da284467e390ca92cd43c52d97cd0de5ad1292c | [
"MIT"
] | 1 | 2020-02-20T05:49:29.000Z | 2020-02-20T05:49:29.000Z | gui/qt/slp_add_token_dialog.py | tomasiCF/Electron-Cash-SLP | 0da284467e390ca92cd43c52d97cd0de5ad1292c | [
"MIT"
] | null | null | null | gui/qt/slp_add_token_dialog.py | tomasiCF/Electron-Cash-SLP | 0da284467e390ca92cd43c52d97cd0de5ad1292c | [
"MIT"
] | null | null | null |
import copy
import datetime
from functools import partial
import json
import threading
import html
import traceback
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from electroncash import networks
from electroncash.address import Address, PublicKey
from electroncash.bitcoin import... | 37.669903 | 168 | 0.619974 |
93d061573b3d7790a6ff9db7f80e7520e2ca1fc2 | 13,145 | py | Python | rlbook/bandits.py | joseph-jnl/rlbook | 37c5270bb8f49acff7ed4b2bd8c8780810f0fb0e | [
"MIT"
] | 1 | 2021-09-30T06:45:13.000Z | 2021-09-30T06:45:13.000Z | rlbook/bandits.py | joseph-jnl/rlbook | 37c5270bb8f49acff7ed4b2bd8c8780810f0fb0e | [
"MIT"
] | null | null | null | rlbook/bandits.py | joseph-jnl/rlbook | 37c5270bb8f49acff7ed4b2bd8c8780810f0fb0e | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from abc import ABCMeta, abstractmethod
from concurrent.futures import ProcessPoolExecutor
from multiprocessing import cpu_count
from typing import Callable, Type, Dict
from rlbook.testbeds import Testbed
import warnings
from collections import namedtuple
import logging
from itert... | 35.720109 | 115 | 0.583948 |
93d091f2289e3741f511653ab370698dbb299052 | 4,675 | py | Python | rl/tools/utils/logz.py | Leonardo-H/DR-PG | dc5467ddd73a7b89938aac9d44735b019a3fd7d7 | [
"Apache-2.0"
] | 2 | 2019-11-25T01:56:49.000Z | 2021-05-20T03:22:59.000Z | rl/tools/utils/logz.py | Leonardo-H/DR-PG | dc5467ddd73a7b89938aac9d44735b019a3fd7d7 | [
"Apache-2.0"
] | null | null | null | rl/tools/utils/logz.py | Leonardo-H/DR-PG | dc5467ddd73a7b89938aac9d44735b019a3fd7d7 | [
"Apache-2.0"
] | 1 | 2019-11-24T02:30:38.000Z | 2019-11-24T02:30:38.000Z | """
Some simple logging functionality, inspired by rllab's logging.
Assumes that each diagnostic gets logged each iteration
Call logz.configure_output_dir() to start logging to a
tab-separated-values file (some_folder_name/log.txt)
To load the learning curves, you can do, for example
A = np.genfromtxt('/tmp/expt_14... | 30.16129 | 125 | 0.61861 |
93d0c46cce50cd225d324ac5d36bbc0c573bd57e | 469 | py | Python | google_sheet_loader.py | BadWolf1023/Lounge-Season-Reset-Updater-Bot | 39374afb88805a345121954b3f2dc66571f3cdbd | [
"MIT"
] | null | null | null | google_sheet_loader.py | BadWolf1023/Lounge-Season-Reset-Updater-Bot | 39374afb88805a345121954b3f2dc66571f3cdbd | [
"MIT"
] | null | null | null | google_sheet_loader.py | BadWolf1023/Lounge-Season-Reset-Updater-Bot | 39374afb88805a345121954b3f2dc66571f3cdbd | [
"MIT"
] | null | null | null | '''
Created on Aug 5, 2021
@author: willg
'''
import gspread
gc = gspread.service_account(filename='credentials.json')
master_sheet_url = ""
WORKSHEET_NAME = "Master List"
SHEET_WORKING_RANGE = "A2:F"
def get_sheet_data():
print(master_sheet_url)
SPREADSHEET_ID = master_sheet_url.split("/d/")[1].split("/")... | 22.333333 | 67 | 0.735608 |
93d0fd85c36dd263e37090f12ab51a9ed5ed8dd2 | 324 | py | Python | worker/samples/context.py | mixslice/bake | ba452da5b988f4ba68201a8bdb8c2d29920e1c28 | [
"MIT"
] | 2 | 2020-05-17T07:35:54.000Z | 2021-08-01T21:27:51.000Z | worker/samples/context.py | mixslice/bake | ba452da5b988f4ba68201a8bdb8c2d29920e1c28 | [
"MIT"
] | null | null | null | worker/samples/context.py | mixslice/bake | ba452da5b988f4ba68201a8bdb8c2d29920e1c28 | [
"MIT"
] | null | null | null | # context to include source code into tests
# each test case shall import this file and then start writing.
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
from cook import effect
from cook import chain
from cook import bake
from cook import translate
from cook import worker
from convert import jsonhel... | 23.142857 | 63 | 0.790123 |
93d1122a13971df7749a2393a92326bf50fd3d3e | 11,182 | py | Python | src/sage/rings/polynomial/toy_variety.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 3 | 2016-06-19T14:48:31.000Z | 2022-01-28T08:46:01.000Z | src/sage/rings/polynomial/toy_variety.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/rings/polynomial/toy_variety.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | 7 | 2021-11-08T10:01:59.000Z | 2022-03-03T11:25:52.000Z | """
Educational Versions of Groebner Basis Algorithms: Triangular Factorization.
In this file is the implementation of two algorithms in [Laz92]_.
The main algorithm is ``Triangular``; a secondary algorithm, necessary for the
first, is ``ElimPolMin``. As per Lazard's formulation, the implementation works
with any ter... | 31.234637 | 110 | 0.654892 |
93d113fc51b2b8ad64e5894f19a7a4906a1f9870 | 21 | py | Python | scripts/__init__.py | Leonardo-H/DR-PG | dc5467ddd73a7b89938aac9d44735b019a3fd7d7 | [
"Apache-2.0"
] | 2 | 2019-11-25T01:56:49.000Z | 2021-05-20T03:22:59.000Z | scripts/__init__.py | Leonardo-H/DR-PG | dc5467ddd73a7b89938aac9d44735b019a3fd7d7 | [
"Apache-2.0"
] | null | null | null | scripts/__init__.py | Leonardo-H/DR-PG | dc5467ddd73a7b89938aac9d44735b019a3fd7d7 | [
"Apache-2.0"
] | 1 | 2019-11-24T02:30:38.000Z | 2019-11-24T02:30:38.000Z | from scripts import * | 21 | 21 | 0.809524 |
93d1309ef2ac5e9c6f0a51a1c460be19b6b78281 | 14,920 | py | Python | src/graphics/tguim/toplevelwrappergraphics.py | facade-technologies-inc/facile | 4c9134dced71734641fed605e152880cd9ddefe3 | [
"MIT"
] | 2 | 2020-09-17T20:51:18.000Z | 2020-11-03T15:58:10.000Z | src/graphics/tguim/toplevelwrappergraphics.py | facade-technologies-inc/facile | 4c9134dced71734641fed605e152880cd9ddefe3 | [
"MIT"
] | 97 | 2020-08-26T05:07:08.000Z | 2022-03-28T16:01:49.000Z | src/graphics/tguim/toplevelwrappergraphics.py | facade-technologies-inc/facile | 4c9134dced71734641fed605e152880cd9ddefe3 | [
"MIT"
] | null | null | null | """
..
/------------------------------------------------------------------------------\
| -- FACADE TECHNOLOGIES INC. CONFIDENTIAL -- |
|------------------------------------------------------------------------------|
| ... | 43.121387 | 119 | 0.554692 |
93d14b921a494555a903eb9e50b61af7a5ded4d3 | 1,839 | py | Python | test/test_web_search.py | funkyeah/tiddlyweb | 2346e6c05aa03ae9c8f2687d9ef9e46103267a8e | [
"BSD-3-Clause"
] | null | null | null | test/test_web_search.py | funkyeah/tiddlyweb | 2346e6c05aa03ae9c8f2687d9ef9e46103267a8e | [
"BSD-3-Clause"
] | null | null | null | test/test_web_search.py | funkyeah/tiddlyweb | 2346e6c05aa03ae9c8f2687d9ef9e46103267a8e | [
"BSD-3-Clause"
] | null | null | null | """
Test search via the web.
"""
import httplib2
import simplejson
from fixtures import muchdata, reset_textstore, _teststore, initialize_app
def setup_module(module):
initialize_app()
reset_textstore()
module.store = _teststore()
muchdata(module.store)
def test_simple_search():
http = httplib2... | 28.734375 | 111 | 0.663404 |
93d1be4eb20611c0093b992fb953b7f9da621b97 | 2,507 | py | Python | local/experiment_triplet.py | sumeetsk/NEXT-1 | c42badbcaeb0ab79ab1f74b6303ecc3864b1c7ee | [
"Apache-2.0"
] | null | null | null | local/experiment_triplet.py | sumeetsk/NEXT-1 | c42badbcaeb0ab79ab1f74b6303ecc3864b1c7ee | [
"Apache-2.0"
] | null | null | null | local/experiment_triplet.py | sumeetsk/NEXT-1 | c42badbcaeb0ab79ab1f74b6303ecc3864b1c7ee | [
"Apache-2.0"
] | null | null | null | import os, sys
# import launch_experiment. We assume that it is located in the next-discovery top level directory.
sys.path.append("../")
from launch_experiment import *
target_file = 'strangefruit30.json'
experiment_list = []
alg_ids = ['RandomSampling','RandomSampling','UncertaintySampling','CrowdKernel','STE']
#... | 33.878378 | 109 | 0.728759 |
93d1d4966b433860fd6b8b92acbe2047c2bdf654 | 6,584 | py | Python | efficientnet/efficientnet_test.py | KellyHwong/semi-conductor-image-classification-first | 2c718e26f66bfe169562c70bbc41872a9621d436 | [
"MIT"
] | 1 | 2021-03-31T10:24:01.000Z | 2021-03-31T10:24:01.000Z | efficientnet/efficientnet_test.py | AI-Huang/semi-conductor-image-classification-first | 2c718e26f66bfe169562c70bbc41872a9621d436 | [
"MIT"
] | 2 | 2020-11-13T18:41:41.000Z | 2021-01-28T10:55:38.000Z | efficientnet/efficientnet_test.py | KellyHwong/semi-conductor-image-classification-first | 2c718e26f66bfe169562c70bbc41872a9621d436 | [
"MIT"
] | 1 | 2020-12-27T15:10:58.000Z | 2020-12-27T15:10:58.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Date : Mar-11-20 21:07
# @Author : Your Name (you@example.org)
# @Link : http://example.org
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from absl import app
from absl import flags
from a... | 38.057803 | 178 | 0.623177 |
93d1dd0b70428bb3376988db1707319cab1f4a71 | 1,838 | py | Python | leetcode_python/Recursion/largest-bst-subtree.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Recursion/largest-bst-subtree.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Recursion/largest-bst-subtree.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # Given a binary tree, find the largest subtree which is a Binary Search Tree (BST), where largest means subtree with largest number of nodes in it.
# Note:
# A subtree must include all of its descendants.
# Here's an example:
# 10
# / \
# 5 15
# / \ \
# 1 8 7
# The Largest BST Subtree in this c... | 29.645161 | 151 | 0.599021 |
93d20b9d8feefc65e145f75651dc1644ca837c82 | 9,382 | py | Python | scripts/maya/nwFenixCommitter/View.py | RadicalTeapot/nwave | 948b1112d7d39d026f46ca06e5911fc276d553f5 | [
"MIT"
] | null | null | null | scripts/maya/nwFenixCommitter/View.py | RadicalTeapot/nwave | 948b1112d7d39d026f46ca06e5911fc276d553f5 | [
"MIT"
] | null | null | null | scripts/maya/nwFenixCommitter/View.py | RadicalTeapot/nwave | 948b1112d7d39d026f46ca06e5911fc276d553f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""View of the Fenix Committer."""
from PySide2 import QtWidgets
from ui import UI
class View(QtWidgets.QMainWindow):
"""Class for the view of the Fenix Committer.
Attributes
----------
objectName: str
The name of the tool.
"""
object_name = 'fenix_commiter... | 35.270677 | 80 | 0.660946 |
93d214cc8816e5b6445d23197c44571089775f22 | 7,153 | py | Python | sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_maintenance_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_maintenance_management_client.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_maintenance_management_client.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 ... | 55.449612 | 173 | 0.757584 |
93d220900c8154a7b247f607964a420d8d41acf7 | 23,236 | py | Python | userbot/plugins/animation4.py | kumar451/CatUserbot | 44fab853232fad163fee63565cc4f3e645596527 | [
"MIT"
] | null | null | null | userbot/plugins/animation4.py | kumar451/CatUserbot | 44fab853232fad163fee63565cc4f3e645596527 | [
"MIT"
] | null | null | null | userbot/plugins/animation4.py | kumar451/CatUserbot | 44fab853232fad163fee63565cc4f3e645596527 | [
"MIT"
] | null | null | null | from userbot import CMD_HELP
from telethon import events
import asyncio
import os
import logging
import random
import sys
from userbot import utils
from userbot.utils import admin_cmd
from userbot import ALIVE_NAME
import random, re
import importlib.util
from collections import deque
DEF = str(ALIVE_NAME) if ALIVE_NAM... | 65.638418 | 1,808 | 0.278878 |
93d23010a9f7ef0be93c515240140f2acf6c3d63 | 6,525 | py | Python | 02-Homework/13-AWS-Lex/Solutions/Lex-Bot-With-Lambda/lambda_function.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-04-13T07:14:34.000Z | 2021-04-13T07:14:34.000Z | 02-Homework/13-AWS-Lex/Solutions/Lex-Bot-With-Lambda/lambda_function.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 2 | 2021-06-02T03:14:19.000Z | 2022-02-11T23:21:24.000Z | 02-Homework/13-AWS-Lex/Solutions/Lex-Bot-With-Lambda/lambda_function.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-05-07T13:26:50.000Z | 2021-05-07T13:26:50.000Z | ### Required Libraries ###
from datetime import datetime
from dateutil.relativedelta import relativedelta
### Functionality Helper Functions ###
def parse_int(n):
"""
Securely converts a non-integer value to integer.
"""
try:
return int(n)
except ValueError:
return float("nan")
de... | 30.348837 | 111 | 0.621456 |
93d235c8f0dd94a7bc1b3431806b03425ea0708a | 728 | py | Python | tests/project/conftest.py | acolytec3/brownie | e00e1f26f5b05e963fe50ffe198634c9e8876589 | [
"MIT"
] | null | null | null | tests/project/conftest.py | acolytec3/brownie | e00e1f26f5b05e963fe50ffe198634c9e8876589 | [
"MIT"
] | null | null | null | tests/project/conftest.py | acolytec3/brownie | e00e1f26f5b05e963fe50ffe198634c9e8876589 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import pytest
test_source = """
pragma solidity ^0.5.0;
library Bar {
function baz(uint a, uint b) external pure returns (uint) {
return a + b;
}
}
contract Foo {
address payable owner;
function baz(uint a, uint b) external view returns (uint) {
return Bar.baz(a... | 16.930233 | 76 | 0.641484 |
93d25688a60985ca06ff85a7cde847f34069039d | 233 | py | Python | activemq_xml/datadog_checks/activemq_xml/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | activemq_xml/datadog_checks/activemq_xml/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | activemq_xml/datadog_checks/activemq_xml/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:45:42.000Z | 2018-08-15T05:45:42.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from .activemq_xml import ActiveMQXML
from .__about__ import __version__
__all__ = [
"__version__",
"ActiveMQXML"
]
| 19.416667 | 59 | 0.729614 |
93d2571fad7b3941bd2ccf13cffd20e450f99e82 | 90,995 | py | Python | salt/modules/postgres.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2018-09-19T22:42:54.000Z | 2018-09-19T22:42:54.000Z | salt/modules/postgres.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | null | null | null | salt/modules/postgres.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2019-07-23T13:42:23.000Z | 2019-07-23T13:42:23.000Z | # -*- coding: utf-8 -*-
'''
Module to provide Postgres compatibility to salt.
:configuration: In order to connect to Postgres, certain configuration is
required in /etc/salt/minion on the relevant minions. Some sample configs
might look like::
postgres.host: 'localhost'
postgres.port: '5432'
... | 29.193134 | 90 | 0.531326 |
93d28760e3b7e32c0f2ff2cc354e65dd26062531 | 23,346 | py | Python | tf/edgeml/trainer/bonsaiTrainer.py | krantikiran/EdgeML | e5c7bd7c56884ca61f6d54cedb0074553cfdc896 | [
"MIT"
] | 1 | 2020-03-26T17:19:54.000Z | 2020-03-26T17:19:54.000Z | tf/edgeml/trainer/bonsaiTrainer.py | krantikiran/EdgeML | e5c7bd7c56884ca61f6d54cedb0074553cfdc896 | [
"MIT"
] | 2 | 2020-03-26T02:59:12.000Z | 2020-04-23T19:09:00.000Z | tf/edgeml/trainer/bonsaiTrainer.py | krantikiran/EdgeML | e5c7bd7c56884ca61f6d54cedb0074553cfdc896 | [
"MIT"
] | 3 | 2020-03-25T18:45:39.000Z | 2020-12-17T19:09:54.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
from __future__ import print_function
import tensorflow as tf
import edgeml.utils as utils
import numpy as np
import os
import sys
class BonsaiTrainer:
def __init__(self, bonsaiObj, lW, lT, lV, lZ, sW, sT, sV, sZ,
... | 41.614973 | 102 | 0.517005 |
93d2a5f2b68c55bc47ea59a3b08fb0babce10b99 | 25,654 | py | Python | models/utils.py | LandAndLand/ClinicalNotesICU | 0665a4ce61da110012e24eaa5500247ad9d0bea0 | [
"MIT"
] | 6 | 2019-11-14T21:49:54.000Z | 2021-02-23T09:15:24.000Z | models/utils.py | LandAndLand/ClinicalNotesICU | 0665a4ce61da110012e24eaa5500247ad9d0bea0 | [
"MIT"
] | 3 | 2020-05-07T14:18:18.000Z | 2020-07-20T02:59:02.000Z | models/utils.py | LandAndLand/ClinicalNotesICU | 0665a4ce61da110012e24eaa5500247ad9d0bea0 | [
"MIT"
] | 8 | 2020-01-05T13:59:28.000Z | 2022-01-03T06:55:59.000Z | import json
import pandas as pd
import os
import config
import tensorflow as tf
from sklearn import metrics
import logging
import pickle
import argparse
import sys
import numpy as np
from matplotlib import pyplot
sys.path.insert(0, '..')
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument(
... | 35.046448 | 104 | 0.586224 |
93d2af426b7a9bef94925915ff74244188032faf | 4,115 | py | Python | demos/demo_mlp.py | MJHutchinson/nasbot | 2a982b1e917d2481a3110bdafd4ed2b390abf4a0 | [
"MIT"
] | null | null | null | demos/demo_mlp.py | MJHutchinson/nasbot | 2a982b1e917d2481a3110bdafd4ed2b390abf4a0 | [
"MIT"
] | null | null | null | demos/demo_mlp.py | MJHutchinson/nasbot | 2a982b1e917d2481a3110bdafd4ed2b390abf4a0 | [
"MIT"
] | null | null | null | """
A demo of NASBOT on a MLP (Multi-Layer Perceptron) architecture search problem.
-- kandasamy@cs.cmu.edu
"""
from argparse import Namespace
import numpy as np
import time
import os
# Local
from nn.nn_constraint_checkers import get_nn_domain_from_constraints
from nn.nn_visualise import visualise_nn
from opt impo... | 38.820755 | 89 | 0.743378 |
93d2ba2ea84c699276e9722645731de6c2c92a39 | 3,211 | py | Python | sysinv/sysinv/sysinv/sysinv/tests/objects/test_host.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/tests/objects/test_host.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/tests/objects/test_host.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# coding=utf-8
#
#
# Copyright (c) 2013-2014 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#
from sysinv.db import api as db_api
from sysinv.db.sqlalchemy import models
from sysinv import objects
from sysinv.tests.db import base
from sysinv.tests.db impo... | 31.792079 | 78 | 0.64061 |
93d2bc0f43ac3393aa96959c3817723eb47aaf44 | 1,311 | py | Python | scripts/docker/build_visit_docker_cleanup.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | scripts/docker/build_visit_docker_cleanup.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | scripts/docker/build_visit_docker_cleanup.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | #
# Helper script to cleanup tpl build dirs to reduce
# our docker image size
#
import sys
import glob
import os
import shutil
from os.path import join as pjoin
def home_dir():
return "/home/visit/"
def check_to_keep(path):
res = False
if path.count("third-party") > 0:
res = True... | 24.735849 | 60 | 0.57132 |
93d2c4c3770a96e38518bcee68b27ec85dea9a0a | 2,744 | py | Python | plotly/tests/test_optional/test_offline/test_offline.py | awesome-archive/plotly.py | 0af4ef6abd0fe9907268d266304de630f94cda60 | [
"MIT"
] | null | null | null | plotly/tests/test_optional/test_offline/test_offline.py | awesome-archive/plotly.py | 0af4ef6abd0fe9907268d266304de630f94cda60 | [
"MIT"
] | null | null | null | plotly/tests/test_optional/test_offline/test_offline.py | awesome-archive/plotly.py | 0af4ef6abd0fe9907268d266304de630f94cda60 | [
"MIT"
] | null | null | null | """
test__offline
"""
from __future__ import absolute_import
from nose.tools import raises
from nose.plugins.attrib import attr
from unittest import TestCase
import json
import plotly
# TODO: matplotlib-build-wip
from plotly.tools import _matplotlylib_imported
if _matplotlylib_imported:
import matplotlib
... | 30.488889 | 79 | 0.664359 |
93d2ef011800b538c79b97d4fde3a80474f7b661 | 1,232 | py | Python | practise/deletetree.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | practise/deletetree.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | practise/deletetree.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
def getsuccess(self, cur):
while cur and cur.left:
cur = cur.left
return cur
def deleteNode(self,... | 21.241379 | 59 | 0.553571 |
93d2f797fe0252a2d06e236de94bdacdec34bc54 | 1,437 | py | Python | alipay/aop/api/domain/AlipayOpenPublicAdvertDeleteModel.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/AlipayOpenPublicAdvertDeleteModel.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/AlipayOpenPublicAdvertDeleteModel.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 AlipayOpenPublicAdvertDeleteModel(object):
def __init__(self):
self._advert_group = None
self._advert_id = None
@property
def advert_group(self):
return self._adv... | 25.660714 | 75 | 0.60334 |
93d2fe9a7298124d2a3578338f5c03dd0979b65d | 13,648 | py | Python | python_modules/dagster/dagster_tests/core_tests/test_stdout.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/test_stdout.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/test_stdout.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import multiprocessing
import os
import random
import string
import sys
import tempfile
import time
import pytest
from dagster import (
DagsterEventType,
InputDefinition,
ModeDefinition,
execute_pipeline,
fs_io_manager,
pipeline,
reconstructable,
resource,
solid,
)
from dagster.cor... | 35.634465 | 100 | 0.666325 |
93d3133372ad91a5670430304e304dfbf25cb09b | 225 | py | Python | acp_calendar/forms.py | luiscberrocal/django-acp-calendar | 7251d7cbb1ba16983bbc3ba9af6178eb31408bee | [
"BSD-3-Clause"
] | 1 | 2016-10-05T05:17:35.000Z | 2016-10-05T05:17:35.000Z | acp_calendar/forms.py | luiscberrocal/django-acp-calendar | 7251d7cbb1ba16983bbc3ba9af6178eb31408bee | [
"BSD-3-Clause"
] | 17 | 2016-09-30T13:43:20.000Z | 2021-06-10T20:44:40.000Z | acp_calendar/forms.py | luiscberrocal/django-acp-calendar | 7251d7cbb1ba16983bbc3ba9af6178eb31408bee | [
"BSD-3-Clause"
] | 6 | 2016-04-11T14:41:44.000Z | 2017-10-20T21:16:39.000Z | from django import forms
from django.utils.translation import ugettext_lazy as _
class CalculatorForm(forms.Form):
start_date = forms.DateField(label=_('Start date'))
end_date = forms.DateField(label=_('End date'))
| 28.125 | 55 | 0.76 |
93d33723b5b02d5b420e0d2360673dec606a3552 | 4,832 | py | Python | sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # 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 ... | 43.531532 | 133 | 0.67053 |
93d339a557069285e9b93929de30b5bcbf061e1a | 5,860 | py | Python | src/onevision/utils/rich.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/utils/rich.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/utils/rich.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Extend Rich API: https://github.com/willmcgugan/rich
"""
from typing import Optional
from multipledispatch import dispatch
from munch import Munch
from rich.console import Console
from rich.panel import Panel
from rich.pretty import Pretty
from rich.progress import Ba... | 27.255814 | 82 | 0.616041 |
93d376271139997fcdbd25eea67cb8b09064de73 | 8,557 | py | Python | NBA Project/venv/Lib/site-packages/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 1 | 2020-08-08T21:56:11.000Z | 2020-08-08T21:56:11.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 2 | 2021-03-31T19:54:17.000Z | 2021-06-02T02:33:56.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# color
# -----
@property
def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000'... | 37.530702 | 84 | 0.569592 |
93d3792391b820f089813d179849f6bf0fb07c2a | 2,819 | py | Python | durabledict/redis.py | robertvaugh/durabledict | 3c7f8e88d8018aa29fd979cbfbb88e6f21ea27c3 | [
"Apache-2.0"
] | 42 | 2015-02-26T19:54:41.000Z | 2022-02-21T10:00:42.000Z | durabledict/redis.py | robertvaugh/durabledict | 3c7f8e88d8018aa29fd979cbfbb88e6f21ea27c3 | [
"Apache-2.0"
] | 7 | 2015-03-27T13:43:04.000Z | 2021-12-02T21:18:38.000Z | durabledict/redis.py | robertvaugh/durabledict | 3c7f8e88d8018aa29fd979cbfbb88e6f21ea27c3 | [
"Apache-2.0"
] | 14 | 2015-03-28T15:28:04.000Z | 2020-01-13T20:44:03.000Z | from durabledict.base import ConnectionDurableDict
class RedisDict(ConnectionDurableDict):
"""
Dictionary-style access to a redis hash table. Populates a cache and a local
in-memory to avoid multiple hits to the database.
Functions just like you'd expect it::
mydict = RedisDict('my_redis_ke... | 33.559524 | 80 | 0.621497 |
93d37d046fccd50496fe96e2714742d3c5e3222c | 2,139 | py | Python | RNNS/utils/wrdembdGen.py | CenIII/Text-style-transfer-DeleteRetrieve | 2b7aa017765dcae65b42fc94d3ccaddc57ac8661 | [
"MIT"
] | null | null | null | RNNS/utils/wrdembdGen.py | CenIII/Text-style-transfer-DeleteRetrieve | 2b7aa017765dcae65b42fc94d3ccaddc57ac8661 | [
"MIT"
] | null | null | null | RNNS/utils/wrdembdGen.py | CenIII/Text-style-transfer-DeleteRetrieve | 2b7aa017765dcae65b42fc94d3ccaddc57ac8661 | [
"MIT"
] | null | null | null | import gensim
import fnmatch
import os
import pickle
import numpy as np
# from symspellpy.symspellpy import SymSpell, Verbosity # import the module
# initial_capacity = 83000
# # maximum edit distance per dictionary precalculation
# max_edit_distance_dictionary = 2
# prefix_length = 7
# sym_spell = SymSpell(initial_c... | 27.423077 | 118 | 0.694717 |
93d38f213670dcf5e1cc6d44059ec56a1efab83f | 598 | py | Python | setup.py | mborgerson/claripy | 45b01c10caa0001b4e210e449ad5618880d1773b | [
"BSD-2-Clause"
] | null | null | null | setup.py | mborgerson/claripy | 45b01c10caa0001b4e210e449ad5618880d1773b | [
"BSD-2-Clause"
] | null | null | null | setup.py | mborgerson/claripy | 45b01c10caa0001b4e210e449ad5618880d1773b | [
"BSD-2-Clause"
] | null | null | null | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'VERSION'), encoding='utf8') as f:
version = f.read().strip()
setup(
name='claripy',
version=version,
python_requires='>=3.6',
packages=find_packages(),
install_requires=[
'z3-solve... | 23 | 84 | 0.605351 |
93d3c103f3a09e0d2fdfa5d2acb3cd7c38748b7b | 3,349 | py | Python | nicos_jcns/dls01/setups/dls.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_jcns/dls01/setups/dls.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_jcns/dls01/setups/dls.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | # -*- coding: utf-8 -*-
description = 'Dynamic light scattering setup'
group = 'basic'
includes = []
sysconfig = dict(
datasinks = ['dlssink'],
)
tango_base = 'tango://localhost:10000/dls/'
devices = dict(
card1 = device('nicos_mlz.kws1.devices.dls.DLSCard',
description = 'DLS correlator card 1',
... | 34.173469 | 83 | 0.612422 |
93d3c841d11dfb281cb4286d9bed93cceed3def1 | 8,811 | py | Python | src/tests/basic_deployment.py | coreycb/charm-keystone-ldap | 73c23c65931b6cbba9e7d8506d92647694cbb03f | [
"Apache-2.0"
] | null | null | null | src/tests/basic_deployment.py | coreycb/charm-keystone-ldap | 73c23c65931b6cbba9e7d8506d92647694cbb03f | [
"Apache-2.0"
] | null | null | null | src/tests/basic_deployment.py | coreycb/charm-keystone-ldap | 73c23c65931b6cbba9e7d8506d92647694cbb03f | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2017 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 40.603687 | 79 | 0.602883 |
93d3eae2822bce23efa850278f9fbf4827c05e23 | 3,954 | py | Python | salt/modules/publish.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | 1 | 2015-10-06T22:25:22.000Z | 2015-10-06T22:25:22.000Z | salt/modules/publish.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | salt/modules/publish.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | '''
Publish a command from a minion to a target
'''
# Import python libs
import ast
# Import salt libs
import salt.crypt
import salt.payload
from salt._compat import string_types, integer_types
def _publish(
tgt,
fun,
arg=None,
expr_form='glob',
returner='',
timeout=5... | 29.954545 | 77 | 0.630754 |
93d3eda6f36e78ca41de4bbbf7a7567a7c06e855 | 3,040 | py | Python | nets/tf_unet/layers.py | Guo-Xiaoqing/Skin-Seg | a23fabc5478d9d199778b51dd7def82252ad309d | [
"MIT"
] | 14 | 2020-01-13T07:53:12.000Z | 2022-01-03T17:36:05.000Z | nets/tf_unet/layers.py | CityU-AIM-Group/Skin-Seg | a23fabc5478d9d199778b51dd7def82252ad309d | [
"MIT"
] | 1 | 2021-10-08T08:11:04.000Z | 2021-10-08T08:39:45.000Z | nets/tf_unet/layers.py | CityU-AIM-Group/Skin-Seg | a23fabc5478d9d199778b51dd7def82252ad309d | [
"MIT"
] | 4 | 2020-01-13T07:53:14.000Z | 2021-04-08T11:58:53.000Z | # tf_unet is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# tf_unet is distributed in the hope that it will be useful,
# but WITHOUT... | 39.480519 | 130 | 0.680921 |
93d3f4b7325000596c9196b1cecda2cfebbe1127 | 5,158 | py | Python | dorothy/modules/persistence/change_user_state.py | prasadatdoshii/dorothy | 942eef1b1674ef0fd4d0de97f1ffec994c9a8556 | [
"Apache-2.0"
] | 87 | 2020-12-08T17:16:13.000Z | 2022-03-30T03:30:16.000Z | dorothy/modules/persistence/change_user_state.py | prasadatdoshii/dorothy | 942eef1b1674ef0fd4d0de97f1ffec994c9a8556 | [
"Apache-2.0"
] | null | null | null | dorothy/modules/persistence/change_user_state.py | prasadatdoshii/dorothy | 942eef1b1674ef0fd4d0de97f1ffec994c9a8556 | [
"Apache-2.0"
] | 18 | 2020-12-09T15:42:00.000Z | 2022-03-28T16:58:38.000Z | #
# Licensed to Elasticsearch under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file exce... | 34.61745 | 120 | 0.692129 |
93d3ff6aeed432824cb6f5a88605ca4e616ccdb7 | 2,088 | py | Python | srfnef/corrections/delay/detector_delay.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | srfnef/corrections/delay/detector_delay.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | srfnef/corrections/delay/detector_delay.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
'''
@author: Minghao Guo
@contact: mh.guo0111@gmail.com
@software: nef
@file: detector_delay.py
@date: 9/2/2019
@desc:
'''
import numpy as np
import srfnef as nef
from srfnef.adapters.gate_single_loader import GateSingleLoader
from scipy import sparse
from scipy.sparse.linalg import lsqr
def max_shi... | 34.8 | 94 | 0.579981 |
93d41452951467442f678105046c6471185a48b4 | 3,807 | py | Python | backend/backend/settings.py | defnngj/quick | 98031a0fddf325820ec135a62253468f46aa2ba6 | [
"Apache-2.0"
] | 1 | 2021-12-21T16:25:29.000Z | 2021-12-21T16:25:29.000Z | backend/backend/settings.py | defnngj/quick | 98031a0fddf325820ec135a62253468f46aa2ba6 | [
"Apache-2.0"
] | null | null | null | backend/backend/settings.py | defnngj/quick | 98031a0fddf325820ec135a62253468f46aa2ba6 | [
"Apache-2.0"
] | 1 | 2022-03-26T14:01:28.000Z | 2022-03-26T14:01:28.000Z | """
Django settings for backend project.
Generated by 'django-admin startproject' using Django 3.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib... | 24.882353 | 91 | 0.704229 |
93d4204895269a78168e0bf33a640b4bfe1d9d12 | 15,186 | py | Python | trac/tests/notification.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/tests/notification.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/tests/notification.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2020 Edgewall Software
# Copyright (C) 2005-2006 Emmanuel Blot <emmanuel.blot@free.fr>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at ht... | 32.310638 | 88 | 0.560582 |
93d420c46061ecce6237d892f8990e5540ab7073 | 4,620 | py | Python | analysis/means_dist.py | CubeSkyy/ILU-RL | 676d88587e1d8638487de1b5a3f8785a7375ad1a | [
"MIT"
] | null | null | null | analysis/means_dist.py | CubeSkyy/ILU-RL | 676d88587e1d8638487de1b5a3f8785a7375ad1a | [
"MIT"
] | null | null | null | analysis/means_dist.py | CubeSkyy/ILU-RL | 676d88587e1d8638487de1b5a3f8785a7375ad1a | [
"MIT"
] | 2 | 2021-03-13T15:38:05.000Z | 2021-05-08T22:25:36.000Z | import os
import tarfile
import pandas as pd
import argparse
from pathlib import Path
import configparser
import tempfile
import shutil
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
import seaborn as sns
plt.style.use('ggplot')
FIGURE_X = 6.0
FIGURE_Y = 4.0
def get_arguments():
parser... | 29.426752 | 120 | 0.622078 |
93d43839068d5fe40ab642bf29baf0d261531656 | 8,611 | py | Python | cls_utils/job.py | prmurali1leo/Engineering_challenge | d73dcba265587c22f0869880bf372cfaa045bfa6 | [
"MIT"
] | null | null | null | cls_utils/job.py | prmurali1leo/Engineering_challenge | d73dcba265587c22f0869880bf372cfaa045bfa6 | [
"MIT"
] | null | null | null | cls_utils/job.py | prmurali1leo/Engineering_challenge | d73dcba265587c22f0869880bf372cfaa045bfa6 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from hashlib import md5
import datetime
import pyarrow.parquet as pq
import pyarrow as pa
from src.dimension_surrogate_resolver import DimensionSurrogateResolver
def run():
for dt in ["20160201", "20160301"]:
create_fact_dimension_tables(dt)
display_output()
de... | 42.004878 | 120 | 0.648124 |
93d43985be13bfa3b35404a00cf04535e09b5092 | 826 | py | Python | survae/transforms/bijections/permute_axes.py | alisiahkoohi/survae_flows | e1747b05524c7ab540a211ed360ab3e67bc3e96d | [
"MIT"
] | 262 | 2020-07-05T20:57:44.000Z | 2022-03-28T02:24:43.000Z | survae/transforms/bijections/permute_axes.py | alisiahkoohi/survae_flows | e1747b05524c7ab540a211ed360ab3e67bc3e96d | [
"MIT"
] | 17 | 2020-08-15T05:43:34.000Z | 2022-01-31T12:24:21.000Z | survae/transforms/bijections/permute_axes.py | alisiahkoohi/survae_flows | e1747b05524c7ab540a211ed360ab3e67bc3e96d | [
"MIT"
] | 35 | 2020-08-24T06:55:37.000Z | 2022-02-11T05:17:58.000Z | import torch
from collections.abc import Iterable
from survae.transforms.bijections import Bijection
class PermuteAxes(Bijection):
def __init__(self, permutation):
super(PermuteAxes, self).__init__()
assert isinstance(permutation, Iterable), 'permutation must be an Iterable'
assert permut... | 35.913043 | 117 | 0.693705 |
93d4acbd2671868d31001113d0c6f710d5036f6c | 388 | py | Python | tests/test_examples_ex_time_vis_chart.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | null | null | null | tests/test_examples_ex_time_vis_chart.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | null | null | null | tests/test_examples_ex_time_vis_chart.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | null | null | null | """Test the file examples/ex_time_vis_chart.py."""
import time
import pytest
from .configuration import no_log_errors
from .examples import ex_time_vis_chart
@pytest.mark.INTERACTIVE()
def test_smoke_test_ex_time_vis_chart(dash_duo):
"""Test ex_time_vis_chart."""
dash_duo.start_server(ex_time_vis_chart.app... | 20.421053 | 52 | 0.773196 |
93d4b56d9edb6b65964d67e6206157f06f4d7f05 | 4,928 | py | Python | analysis/hist.py | CubeSkyy/ILU-RL | 676d88587e1d8638487de1b5a3f8785a7375ad1a | [
"MIT"
] | null | null | null | analysis/hist.py | CubeSkyy/ILU-RL | 676d88587e1d8638487de1b5a3f8785a7375ad1a | [
"MIT"
] | null | null | null | analysis/hist.py | CubeSkyy/ILU-RL | 676d88587e1d8638487de1b5a3f8785a7375ad1a | [
"MIT"
] | 2 | 2021-03-13T15:38:05.000Z | 2021-05-08T22:25:36.000Z | """This script makes a histogram from the info.json output from experiment
Use this script to determine the best categorical breakdowns
USAGE:
-----
From root directory with files saved on root
> python analysis/hist.py 20200929124206.116251/intersection_20200929-1242061601379726.138305/
UPD... | 31.793548 | 98 | 0.600244 |
93d4cbf0766f51672b79f7957245dec82a3aca7d | 2,938 | py | Python | mdrsl/data_structures/rules/multi_target_class_association_rule.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 3 | 2020-08-03T19:25:44.000Z | 2021-06-27T22:25:55.000Z | mdrsl/data_structures/rules/multi_target_class_association_rule.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | null | null | null | mdrsl/data_structures/rules/multi_target_class_association_rule.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 2 | 2020-08-07T22:54:28.000Z | 2021-02-18T06:11:01.000Z | from mdrsl.data_structures.rules.generalized_rule_part import GeneralizedAntecedent
from mdrsl.data_structures.rules.rule_part import Consequent
class MCAR:
id = 0
def __init__(self, antecedent: GeneralizedAntecedent, consequent: Consequent, support: float, confidence: float):
self.antecedent: Genera... | 31.591398 | 118 | 0.561266 |
93d51f0aad793df1528168eeb812dbe860ced749 | 3,279 | py | Python | src/plots.py | jenfly/monsoon-dynamics | e42c768bf9dc5f1f8246cf1121668d2a9f937706 | [
"MIT"
] | 2 | 2018-12-18T03:21:04.000Z | 2020-09-23T08:09:34.000Z | src/plots.py | jenfly/monsoon-dynamics | e42c768bf9dc5f1f8246cf1121668d2a9f937706 | [
"MIT"
] | null | null | null | src/plots.py | jenfly/monsoon-dynamics | e42c768bf9dc5f1f8246cf1121668d2a9f937706 | [
"MIT"
] | 2 | 2019-04-22T22:59:54.000Z | 2021-09-17T06:46:07.000Z | import numpy as np
import matplotlib.pyplot as plt
import atmos as atm
def add_labels(grp, labels, pos, fontsize, fontweight='bold'):
"""Add labels to subplots in a figure
Parameters
----------
grp : atm.FigGroup object
Instance of atm.FigGroup class for the subplots to annotate
labe... | 31.228571 | 79 | 0.573041 |
93d52be6a68c2f72d46c36e3567d67e36f45288b | 1,078 | py | Python | exos/20191202/lexique-able.py | afafe78/python-im | c831eb92c163084bb3c9098e40d28e7ba8600319 | [
"MIT"
] | 7 | 2016-09-29T07:20:25.000Z | 2021-03-15T15:00:06.000Z | exos/20191202/lexique-able.py | afafe78/python-im | c831eb92c163084bb3c9098e40d28e7ba8600319 | [
"MIT"
] | null | null | null | exos/20191202/lexique-able.py | afafe78/python-im | c831eb92c163084bb3c9098e40d28e7ba8600319 | [
"MIT"
] | 11 | 2017-01-12T18:50:49.000Z | 2021-02-28T22:44:29.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
## Pour chaque verbe du premier groupe (utilisez le lemme) vous vérifierez s'il existe un adjectif en -able. Vous donnerez les décomptes en résultat (combien de verbes avec adjectif -able, combien sans)
import csv
import re
data = "Lexique383.tsv"
verbs = set()
adjs_abl... | 30.8 | 202 | 0.583488 |
93d5602e501716b16e97dcb04c979aac3d4a3343 | 1,128 | py | Python | exceptions/exception_handling.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | exceptions/exception_handling.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | exceptions/exception_handling.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | try:
print(7 / 0)
except ZeroDivisionError:
print("Division by Zero will produce a black hole!")
try:
print("Hello!")
print("Nick" / 0)
except ZeroDivisionError:
print("Someone divided something by zero")
except (ValueError, TypeError):
print("You can't divide your name by zero!")
try:
pri... | 21.692308 | 112 | 0.675532 |
93d59363430bc883cd595a30f1e8564eb1b8c0a9 | 45,589 | py | Python | python_modules/libraries/dagster-pyspark/dagster_pyspark/types.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-pyspark/dagster_pyspark/types.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-pyspark/dagster_pyspark/types.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | from pyspark.sql import DataFrame as NativeSparkDataFrame
from dagster import (
Any,
AssetMaterialization,
Bool,
DagsterInvariantViolationError,
Enum,
EnumValue,
Field,
Float,
Int,
Permissive,
PythonObjectDagsterType,
String,
dagster_type_loader,
dagster_type_mat... | 46.805955 | 272 | 0.426594 |
93d594ab63cb2d879463467e60c328834edbf5d2 | 16,888 | py | Python | salt/modules/keystone.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | 1 | 2016-12-20T20:11:21.000Z | 2016-12-20T20:11:21.000Z | salt/modules/keystone.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | null | null | null | salt/modules/keystone.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | null | null | null | '''
Module for handling openstack keystone calls.
:optdepends: - keystoneclient Python adapter
:configuration: This module is not usable until the following are specified
either in a pillar or in the minion's config file::
keystone.user: admin
keystone.password: verybadpass
keystone.ten... | 28.383193 | 146 | 0.581123 |
93d60723ccf181d4af74d9ad4163578c8322ae67 | 28,584 | py | Python | parlai/agents/cvae/modules.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 17 | 2020-03-27T17:25:52.000Z | 2021-11-19T03:46:25.000Z | parlai/agents/cvae/modules.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 3 | 2020-11-01T10:12:52.000Z | 2021-12-10T09:06:44.000Z | parlai/agents/cvae/modules.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 3 | 2020-05-04T04:37:42.000Z | 2021-07-19T11:09:37.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Module files as torch.nn.Module subclasses for Seq2seqAgent."""
import math
import torch
import torch.nn as nn
import... | 42.284024 | 136 | 0.598971 |
93d612145650688bb8662a5f890d092dcb669e3b | 551 | py | Python | sequence_classification/datasets/valley/__init__.py | piotermiarer/Sequence-Classification | 05b5491cc8470f477a160fb4207aacd1b12aa5ed | [
"MIT"
] | 1 | 2021-03-14T17:22:41.000Z | 2021-03-14T17:22:41.000Z | sequence_classification/datasets/valley/__init__.py | piotermiarer/Sequence-Classification | 05b5491cc8470f477a160fb4207aacd1b12aa5ed | [
"MIT"
] | 23 | 2018-11-17T21:05:31.000Z | 2019-01-15T09:58:33.000Z | sequence_classification/datasets/valley/__init__.py | piotermiarer/Sequence-Classification | 05b5491cc8470f477a160fb4207aacd1b12aa5ed | [
"MIT"
] | 1 | 2020-07-31T06:09:31.000Z | 2020-07-31T06:09:31.000Z | import re
from ..utils import DatasetLoader, Dataset, get_X_y
class ValleyDataset(DatasetLoader):
@staticmethod
def load_data(name='Valley'):
valley_data = []
with open(ValleyDataset.get_dataset_file(['valley', 'valley_data.txt']), 'r') as f:
file_content = f.readlines()
... | 29 | 91 | 0.595281 |
93d618acbb73e6676cdf6d99597526f4b5225bd1 | 1,578 | py | Python | code_server/get_final_data.py | Dragon-M-Ren/grad_code | d814b81adaec709d5dffd737f0c350953cc361fd | [
"Apache-2.0"
] | null | null | null | code_server/get_final_data.py | Dragon-M-Ren/grad_code | d814b81adaec709d5dffd737f0c350953cc361fd | [
"Apache-2.0"
] | null | null | null | code_server/get_final_data.py | Dragon-M-Ren/grad_code | d814b81adaec709d5dffd737f0c350953cc361fd | [
"Apache-2.0"
] | null | null | null | import os
import pickle as pkl
data_path = './processed_output'
data_inc_path = './processed_inc_output'
cur_line = ''
train_size_list = [40, 60, 100, 140, 180, 220, 260, 300, 400, 500, 600, 800, 1000, 1200, 1400]
'''
write_file_path = os.path.join(data_path, 'global')
write_file_name = 'result'
w = open(os.path.j... | 27.206897 | 132 | 0.661597 |
93d61da124c8ddf2fbab60c5f65ae7fe0fee5b54 | 946 | py | Python | setup.py | MathPhysSim/spinningup | b54c2505916dbfef67f73ee9610a9cbe2a746688 | [
"MIT"
] | null | null | null | setup.py | MathPhysSim/spinningup | b54c2505916dbfef67f73ee9610a9cbe2a746688 | [
"MIT"
] | null | null | null | setup.py | MathPhysSim/spinningup | b54c2505916dbfef67f73ee9610a9cbe2a746688 | [
"MIT"
] | null | null | null | import sys
from os.path import join
from setuptools import setup
assert sys.version_info.major == 3 and sys.version_info.minor >= 6, \
"The Spinning Up repo is designed to work with Python 3.6 and greater." \
+ "Please install it before proceeding."
with open(join("spinup", "version.py")) as version_file:
... | 25.567568 | 77 | 0.587738 |
93d64dfe104005817d0f20be27418ab46e54e45d | 8,601 | py | Python | Utilities/Maintenance/vtk_submitter_summary.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 1 | 2020-05-04T05:59:07.000Z | 2020-05-04T05:59:07.000Z | Utilities/Maintenance/vtk_submitter_summary.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | null | null | null | Utilities/Maintenance/vtk_submitter_summary.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 5 | 2015-10-09T04:12:29.000Z | 2021-12-15T16:57:11.000Z | #!/usr/bin/python
"""
This module scrapes test results from a day's dashboard that explain the
configuration of the submitting machine. It is useful to find under tested spaces
in the option and platform set.
To use it get to a command line and run:
python vtk_submitter_summary.py
That will load the day's results, sav... | 30.392226 | 126 | 0.657482 |
93d64ea640cd8eb77e47c60e3726d7fdf358fb9f | 5,636 | py | Python | benchmark/imagenet/sampler.py | animeshtrivedi/surf-ml | 73102c69f303d5b289841e6116a607561e36595c | [
"Apache-2.0"
] | 9 | 2020-10-21T11:40:51.000Z | 2021-09-25T07:50:22.000Z | benchmark/imagenet/sampler.py | animeshtrivedi/surf-ml | 73102c69f303d5b289841e6116a607561e36595c | [
"Apache-2.0"
] | null | null | null | benchmark/imagenet/sampler.py | animeshtrivedi/surf-ml | 73102c69f303d5b289841e6116a607561e36595c | [
"Apache-2.0"
] | null | null | null | import glob
from skimage import io
import os
import shutil
import time
from tqdm import tqdm
import argparse
# Imagenet_dir /nfs/managed_datasets/imagenet-full/
class ImageNetDataset:
def __init__(self, imagenet_dir, train, scratch_dir, copy_files: bool, num_classes=1):
super(ImageNetDataset, self).__init_... | 44.377953 | 146 | 0.622605 |
93d6717ff3dcfefea3b68e86ff4825cebfc0bce5 | 1,459 | py | Python | model/AbstractGANModel.py | demetoir/ALLGANS | 2f972db5e9a65f18aee0695d817f4acc221e54da | [
"MIT"
] | 11 | 2018-01-25T15:31:54.000Z | 2019-12-17T06:12:57.000Z | model/AbstractGANModel.py | demetoir/ALLGANs | 2f972db5e9a65f18aee0695d817f4acc221e54da | [
"MIT"
] | 19 | 2018-01-29T16:12:09.000Z | 2018-02-15T15:56:48.000Z | model/AbstractGANModel.py | demetoir/ALLGANs | 2f972db5e9a65f18aee0695d817f4acc221e54da | [
"MIT"
] | 2 | 2018-02-06T00:31:55.000Z | 2018-02-19T15:29:10.000Z | from model.AbstractModel import AbstractModel
from dict_keys.input_shape_keys import *
class AbstractGANModel(AbstractModel):
VERSION = 1.0
AUTHOR = 'demetoir'
def __init__(self, logger_path):
super().__init__(logger_path)
def load_input_shapes(self, input_shapes):
shape_... | 29.77551 | 90 | 0.620288 |
93d68becd9682ca07d02d33d2eabde99e254283e | 3,155 | py | Python | elit/layers/embeddings/fast_text.py | emorynlp/levi-graph-amr-parser | f71f1056c13181b8db31d6136451fb8d57114819 | [
"Apache-2.0"
] | 9 | 2021-07-12T22:05:47.000Z | 2022-02-22T03:10:14.000Z | elit/layers/embeddings/fast_text.py | emorynlp/levi-graph-amr-parser | f71f1056c13181b8db31d6136451fb8d57114819 | [
"Apache-2.0"
] | 4 | 2021-08-31T08:28:37.000Z | 2022-03-28T05:52:14.000Z | elit/layers/embeddings/fast_text.py | emorynlp/levi-graph-amr-parser | f71f1056c13181b8db31d6136451fb8d57114819 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2020-05-27 15:06
import os
import sys
from typing import Optional, Callable
import fasttext
import torch
from torch import nn
from torch.nn.utils.rnn import pad_sequence
from elit.common.configurable import AutoConfigurable
from elit.common.transform import EmbeddingNam... | 31.55 | 87 | 0.651981 |
93d6b0ceba48499c65183cbb5fd5411e0efe53a3 | 2,130 | py | Python | cifr/models/losses/contextual_loss/modules/contextual.py | shi510/cifr-pytorch | 8e9aec5e520f0c1d89e97fd60abc7d72ff1a2854 | [
"Apache-2.0"
] | null | null | null | cifr/models/losses/contextual_loss/modules/contextual.py | shi510/cifr-pytorch | 8e9aec5e520f0c1d89e97fd60abc7d72ff1a2854 | [
"Apache-2.0"
] | null | null | null | cifr/models/losses/contextual_loss/modules/contextual.py | shi510/cifr-pytorch | 8e9aec5e520f0c1d89e97fd60abc7d72ff1a2854 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
from .vgg import VGG19
from .. import functional as F
from ..config import LOSS_TYPES
class ContextualLoss(nn.Module):
"""
Creates a criterion that measures the contextual loss.
Parameters
---
band_width : int, optional
a band_width parameter described ... | 31.791045 | 75 | 0.55446 |
93d6ce78a9cf30e803faeda47893564a7b991093 | 4,184 | py | Python | intersight/models/storage_flex_flash_controller_props_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/storage_flex_flash_controller_props_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/storage_flex_flash_controller_props_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class StorageFlexFlashControllerPropsList(object):
"""
... | 27.168831 | 99 | 0.585325 |
93d6e35c64cfdd938d53998c271fb81e4edb6ed2 | 334 | py | Python | atlas/settings/messaging.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | null | null | null | atlas/settings/messaging.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | 15 | 2015-01-06T13:41:52.000Z | 2022-03-30T10:37:25.000Z | atlas/settings/messaging.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | 1 | 2017-07-20T08:01:24.000Z | 2017-07-20T08:01:24.000Z | from .local import IDDS_MESSAGING_PASSWORD
TEST_CONFIG = {"connection":{'host':'0.0.0.0','port':61613},"queue":"A.B.C.D"}
IDDS_PRODUCTION_CONFIG = {"queue":'/queue/Consumer.prodsys.atlas.idds',
"connection":{'host':'atlas-mb.cern.ch','port':61013 ,'username':'atlasidds','password':IDDS_MESSAG... | 66.8 | 139 | 0.673653 |
93d6eec369e48080191b5fa084efb827bb14fee6 | 935 | py | Python | tarakania_rpg/commands/rpg/inventory/command_inventory.py | MKokyn/discord-bot | 00f58512739be9b2eec1adb16214c72da59e696b | [
"MIT"
] | null | null | null | tarakania_rpg/commands/rpg/inventory/command_inventory.py | MKokyn/discord-bot | 00f58512739be9b2eec1adb16214c72da59e696b | [
"MIT"
] | null | null | null | tarakania_rpg/commands/rpg/inventory/command_inventory.py | MKokyn/discord-bot | 00f58512739be9b2eec1adb16214c72da59e696b | [
"MIT"
] | null | null | null | from handler import BaseCommand, Context, Arguments, CommandResult
from rpg.player import Player, UnknownPlayer
from utils.formatting import codeblock
class Command(BaseCommand):
async def run(self, ctx: Context, args: Arguments) -> CommandResult:
try:
player = await Player.from_id(ctx.author... | 30.16129 | 72 | 0.611765 |
93d7023755a42f82d492a31d7eaac94139da92a1 | 7,130 | py | Python | bin/keep_fld.py | victoriamorris/CatBridge | a91164f85ffcb93eb17c786d4a178a559242f7c9 | [
"MIT"
] | null | null | null | bin/keep_fld.py | victoriamorris/CatBridge | a91164f85ffcb93eb17c786d4a178a559242f7c9 | [
"MIT"
] | null | null | null | bin/keep_fld.py | victoriamorris/CatBridge | a91164f85ffcb93eb17c786d4a178a559242f7c9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf8 -*-
"""Script to count the number of records present within one or more file(s) of MARC records"""
from catbridge_tools import *
__author__ = 'Victoria Morris'
__license__ = 'MIT License'
__version__ = '1.0.0'
__status__ = '4 - Beta Development'
NAME = 'keep_fl... | 44.5625 | 111 | 0.476438 |
93d72ed0f187216af9b0aa9f2214f4e7a304e1d6 | 4,291 | py | Python | flu/src/polarizer_statistics.py | iosonofabio/FitnessInference | 3de97a9301733ac9e47ebc78f4e76f7530ccb538 | [
"MIT"
] | 11 | 2015-08-24T05:20:56.000Z | 2021-08-13T13:58:31.000Z | flu/src/polarizer_statistics.py | iosonofabio/FitnessInference | 3de97a9301733ac9e47ebc78f4e76f7530ccb538 | [
"MIT"
] | 3 | 2015-08-24T04:43:25.000Z | 2021-07-06T00:33:44.000Z | flu/src/polarizer_statistics.py | iosonofabio/FitnessInference | 3de97a9301733ac9e47ebc78f4e76f7530ccb538 | [
"MIT"
] | 3 | 2019-08-30T18:52:49.000Z | 2021-06-15T06:47:04.000Z | #!/ebio/ag-neher/share/programs/bin/python2.7
################################################################################
#
# author: Richard Neher
# email: richard.neher@tuebingen.mpg.de
#
# Reference: Richard A. Neher, Colin A Russell, Boris I Shraiman.
# "Predicting evolution from the shape of gene... | 44.237113 | 136 | 0.693778 |
93d73ea382ad2f8f02324476d9620a48ef467253 | 3,825 | py | Python | tests/test_chat_downloader.py | xenova/ChatReplayDownloader | ff9ddb1f840fa06d0cc3976badf75c1fffebd003 | [
"MIT"
] | 306 | 2021-02-03T12:19:14.000Z | 2022-03-31T02:07:20.000Z | tests/test_chat_downloader.py | z1001123/chat-downloader | ef68e28ac5898ed3e424ca1b9fbbbe73377cbb1e | [
"MIT"
] | 79 | 2021-02-03T11:48:29.000Z | 2022-03-28T19:14:18.000Z | tests/test_chat_downloader.py | z1001123/chat-downloader | ef68e28ac5898ed3e424ca1b9fbbbe73377cbb1e | [
"MIT"
] | 53 | 2021-02-09T21:55:11.000Z | 2022-03-28T21:17:40.000Z | import os
import sys
import unittest
# Allow direct execution
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # noqa
from chat_downloader import ChatDownloader
from chat_downloader.sites import (
get_all_sites,
BaseChatDownloader
)
from chat_downloader.debugging import (
... | 30.6 | 122 | 0.606013 |
93d75f3cb05c4f1bf53ecedbf6240d87a07cd778 | 15,736 | py | Python | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import pytest
import functools
from devtools_testutils import recorded_by_proxy, set_custom_default_matcher
from azure.ai.formrecognizer import FormConte... | 44.577904 | 147 | 0.703482 |
93d764d9419b54d76590655aef271a967947daf9 | 650 | py | Python | models/models.py | a373648449/fotoplace-ai | 24b2b08aa605d52a93a7496446fb5d707ac95005 | [
"BSD-3-Clause"
] | 12 | 2019-06-05T05:29:58.000Z | 2022-03-31T08:33:00.000Z | models/models.py | a373648449/fotoplace-ai | 24b2b08aa605d52a93a7496446fb5d707ac95005 | [
"BSD-3-Clause"
] | 1 | 2021-05-18T22:20:05.000Z | 2021-05-18T22:20:05.000Z | models/models.py | a373648449/fotoplace-ai | 24b2b08aa605d52a93a7496446fb5d707ac95005 | [
"BSD-3-Clause"
] | null | null | null | def create_model(opt):
print(opt.model)
if opt.model == 'cyclegan':
assert(opt.dataset_mode == 'unaligned')
from .cyclegan import CycleGANModel
model = CycleGANModel()
elif opt.model == 'DSTN':
assert(opt.dataset_mode == 'unaligned')
from .DSTN import DSTN
mod... | 32.5 | 66 | 0.603077 |
93d7669cc3b2231eeebf2dd75d0150df65e3fe90 | 39,634 | py | Python | ascmhl/commands.py | ascmitc/mhl | f7671941d0ef12d05a5043fb45f621e7ad2c3981 | [
"MIT"
] | 28 | 2019-10-07T18:59:29.000Z | 2022-03-19T23:05:04.000Z | ascmhl/commands.py | ascmitc/mhl | f7671941d0ef12d05a5043fb45f621e7ad2c3981 | [
"MIT"
] | 93 | 2019-08-14T18:02:39.000Z | 2022-03-18T19:34:57.000Z | ascmhl/commands.py | ascmitc/mhl | f7671941d0ef12d05a5043fb45f621e7ad2c3981 | [
"MIT"
] | 8 | 2020-11-04T14:33:42.000Z | 2022-02-15T04:19:25.000Z | """
__author__ = "Patrick Renner, Alexander Sahm"
__copyright__ = "Copyright 2020, Pomfort GmbH"
__license__ = "MIT"
__maintainer__ = "Patrick Renner, Alexander Sahm"
__email__ = "opensource@pomfort.com"
"""
import datetime
import os
import platform
import click
from lxml import etree
from . import logger
from . im... | 40.034343 | 120 | 0.676086 |
93d774c6baedfa8a68d0d91431321fe938bcb215 | 3,316 | py | Python | src/python/pants/build_graph/remote_sources.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | src/python/pants/build_graph/remote_sources.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | 1 | 2018-09-04T17:37:34.000Z | 2018-09-04T19:42:58.000Z | src/python/pants/build_graph/remote_sources.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.base.exceptions import TargetDefinitionException
from pants.base.payload import Payload
from pants.base.payload_field import PrimitiveField
from pants.build_graph.address import... | 40.439024 | 100 | 0.722557 |
93d7acbebc8c7539203235c5fcb223f57b9e1474 | 2,768 | py | Python | tabular_rl_DORA&supervised/supervised_rule.py | AlexDoumas/BrPong_1 | 372913513932c95bc502f5d03700ec9ba61c6a9b | [
"CECILL-B"
] | 3 | 2020-06-22T15:02:23.000Z | 2021-05-05T14:03:25.000Z | tabular_rl_DORA&supervised/supervised_rule.py | AlexDoumas/BrPong_1 | 372913513932c95bc502f5d03700ec9ba61c6a9b | [
"CECILL-B"
] | null | null | null | tabular_rl_DORA&supervised/supervised_rule.py | AlexDoumas/BrPong_1 | 372913513932c95bc502f5d03700ec9ba61c6a9b | [
"CECILL-B"
] | null | null | null | import gym
import numpy as np
from collections import defaultdict
from relational_Q_learning import RelationalQLearningAgent
def follow_ball(rel_state):
"""Hand-coded policy to follow the ball. Useful for debugging.
Args:
rel_state: relational representation of the screen (str).
Returns:
A... | 30.086957 | 82 | 0.573338 |
93d80c84767063b25e542a90ae7816b54985fea7 | 4,489 | py | Python | seven23/api/saas/views.py | sebastienbarbier/seven23_server | a085f7aa84cf9d282e6d873ba6c1c1deed74db90 | [
"MIT"
] | 27 | 2019-03-07T17:23:59.000Z | 2022-01-29T16:08:09.000Z | seven23/api/saas/views.py | sebastienbarbier/seven23_server | a085f7aa84cf9d282e6d873ba6c1c1deed74db90 | [
"MIT"
] | 31 | 2017-06-14T08:19:48.000Z | 2022-01-26T14:55:39.000Z | seven23/api/saas/views.py | sebastienbarbier/seven23_server | a085f7aa84cf9d282e6d873ba6c1c1deed74db90 | [
"MIT"
] | 14 | 2019-07-22T09:49:13.000Z | 2021-12-21T08:52:02.000Z | """
Views for api/va/transactions
"""
import stripe
import json
import os
import markdown2
import urllib.parse
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework import status
from django.db import models
from rest_framework.decorators import api_view
fro... | 31.612676 | 106 | 0.677211 |
93d8173bd3ced2feefc2a78d84d5bc83982ffc64 | 1,012 | py | Python | peartree/plot.py | yiyange/peartree | eb4fdab7a8484a621a0ee78d7723858b5ca2ac27 | [
"MIT"
] | null | null | null | peartree/plot.py | yiyange/peartree | eb4fdab7a8484a621a0ee78d7723858b5ca2ac27 | [
"MIT"
] | null | null | null | peartree/plot.py | yiyange/peartree | eb4fdab7a8484a621a0ee78d7723858b5ca2ac27 | [
"MIT"
] | null | null | null | import os
import networkx as nx
import osmnx as ox
def generate_plot(G: nx.MultiDiGraph, use_agg=False):
# Load matplotlib only when plot requested
import matplotlib # noqa
if use_agg:
# Force matplotlib to not use any Xwindows backend
matplotlib.use('Agg')
# TODO: Build out custom ... | 34.896552 | 64 | 0.536561 |
93d81cdaebb06073f566863c55f86e1aa8f05e0e | 2,349 | py | Python | var/spack/repos/builtin/packages/wi4mpi/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/wi4mpi/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/wi4mpi/package.py | joequant/spack | e028ee0d5903045e1cdeb57550cbff61f2ffb2fa | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Wi4mpi(CMakePackage):
"""WI4MPI: Wrapper Interface For MPI performing a light tra... | 41.946429 | 96 | 0.651341 |
93d82b037ce9e3daf16769deddf05f766ff5c342 | 1,914 | py | Python | setup.py | carver/eth-account | 10d6fa0d82c2fb601b300ae3e380a8c0f7a3d295 | [
"MIT"
] | null | null | null | setup.py | carver/eth-account | 10d6fa0d82c2fb601b300ae3e380a8c0f7a3d295 | [
"MIT"
] | null | null | null | setup.py | carver/eth-account | 10d6fa0d82c2fb601b300ae3e380a8c0f7a3d295 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import (
setup,
find_packages,
)
extras_require={
'test': [
"pytest==3.3.2",
"tox>=2.9.1,<3",
],
'lint': [
"flake8==3.4.1",
"isort>=4.2.15,<5",
],
'doc': [
"Sphinx>=1.6.5,<2",
"sphi... | 26.583333 | 99 | 0.561651 |
93d8ac85b690a8f35ea987ba0cd6c82f32dea6ce | 13,106 | py | Python | train.py | ysbsb/ReXNet-PyTorch | 0b62dfb1fc765096dcfc9cf98b81305c61461e9b | [
"MIT"
] | 2 | 2020-12-18T04:57:07.000Z | 2020-12-18T04:57:16.000Z | train.py | ysbsb/ReXNet-PyTorch | 0b62dfb1fc765096dcfc9cf98b81305c61461e9b | [
"MIT"
] | 2 | 2021-09-13T11:04:42.000Z | 2021-09-13T11:05:06.000Z | train.py | ysbsb/ReXNet-PyTorch | 0b62dfb1fc765096dcfc9cf98b81305c61461e9b | [
"MIT"
] | 1 | 2021-11-08T08:14:07.000Z | 2021-11-08T08:14:07.000Z | import time
import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
from torch.utils.data import Dataset, DataLoader
import torch.utils.data
import torchvision.transforms as transforms
from torchvision.datasets import CIFAR10, CIFAR100, ImageNet, ImageFolder
from utils import... | 35.808743 | 95 | 0.590493 |
93d8afb493fe46a385b123fd1b0a55c342911df4 | 2,949 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/page_block_video.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/page_block_video.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/page_block_video.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 35.107143 | 150 | 0.613767 |
93d8edcd0db79ab34c87390202c875a18f8c0b02 | 11,907 | py | Python | utils/project.py | zhouzhenghong-gt/self-supervised-3D-DSA-reconstruction-SSDR-network | f1d7b147636927cd798f359c36d9084c2614ceed | [
"MIT"
] | 3 | 2021-12-02T04:14:06.000Z | 2022-01-05T06:33:55.000Z | utils/project.py | zhouzhenghong-gt/self-supervised-3D-DSA-reconstruction-SSDR-network | f1d7b147636927cd798f359c36d9084c2614ceed | [
"MIT"
] | 1 | 2021-12-17T11:03:54.000Z | 2021-12-20T07:22:04.000Z | utils/project.py | zhouzhenghong-gt/self-supervised-3D-DSA-reconstructio-network | f1d7b147636927cd798f359c36d9084c2614ceed | [
"MIT"
] | null | null | null | import cv2
import math
import SimpleITK as sitk
import numpy as np
def resize_image_itk(itkimage, newSize, resamplemethod=sitk.sitkNearestNeighbor):
resampler = sitk.ResampleImageFilter()
originSize = itkimage.GetSize()
originSpacing = itkimage.GetSpacing()
newSize = np.array(newSize,float)
... | 49 | 157 | 0.593432 |
93d9122989b0689416f9d73a07a34e4b000690df | 2,879 | py | Python | tests/unit/parser/test_parser_reference.py | guillaumegenthial/fromconfig | 1feecb9d9a3d67f9ed94a3fe17905e6226b954c7 | [
"Apache-2.0"
] | null | null | null | tests/unit/parser/test_parser_reference.py | guillaumegenthial/fromconfig | 1feecb9d9a3d67f9ed94a3fe17905e6226b954c7 | [
"Apache-2.0"
] | null | null | null | tests/unit/parser/test_parser_reference.py | guillaumegenthial/fromconfig | 1feecb9d9a3d67f9ed94a3fe17905e6226b954c7 | [
"Apache-2.0"
] | 1 | 2021-05-25T20:11:51.000Z | 2021-05-25T20:11:51.000Z | """Tests for parser.reference."""
import pytest
import fromconfig
@pytest.mark.parametrize(
"config, expected",
[
pytest.param({"x": 1, "y": 2}, {"x": 1, "y": 2}, id="none"),
pytest.param({"x": 1, "y": "@x"}, {"x": 1, "y": 1}, id="simple"),
pytest.param({"x": 1, "y": "@x", "z": "@x"}... | 37.38961 | 99 | 0.52935 |
93d912e1d09035d00a866738f3cf5a06052296d5 | 1,120 | py | Python | setup.py | dgraziotin/datadeck | aec1848cd659eea81924b015ac516aee53b17189 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2015-09-17T06:12:32.000Z | 2015-09-17T06:12:32.000Z | setup.py | dgraziotin/datadeck | aec1848cd659eea81924b015ac516aee53b17189 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | setup.py | dgraziotin/datadeck | aec1848cd659eea81924b015ac516aee53b17189 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # from ez_setup import use_setuptools
# use_setuptools()
from setuptools import setup, find_packages
from datadeck import __version__, __license__, __description__
__description_long__ = open('README').read()
setup(
name='datadeck',
version=__version__,
# metadata
author='Daniel Graziotin',
author_... | 28 | 87 | 0.6625 |
93d915fa0ead18e6d0d9c5a1db720757f8efdbd3 | 3,675 | py | Python | mailer.py | mrityunjaykumar911/gmailMailerPy | 3afccda6ebdf3d2d378e07c7766a3a32231095bf | [
"MIT"
] | null | null | null | mailer.py | mrityunjaykumar911/gmailMailerPy | 3afccda6ebdf3d2d378e07c7766a3a32231095bf | [
"MIT"
] | null | null | null | mailer.py | mrityunjaykumar911/gmailMailerPy | 3afccda6ebdf3d2d378e07c7766a3a32231095bf | [
"MIT"
] | null | null | null | #!/usr/local/bin/python
"""
Filename: mailer.py
Author: mrityunjaykumar
Date: 01/02/19
author_email: mrkumar@cs.stonybrook.edu
"""
from __future__ import print_function
import base64
import pickle
import os.path
from email.mime.text import MIMEText
from google... | 31.956522 | 100 | 0.661769 |
93d91e2eff09028f174602ccb82f9da6faa231ee | 7,599 | py | Python | vyperlogix/gds/moon.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/gds/moon.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/gds/moon.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | '''
Script to print moon phase times for a given year, which should be the
single parameter passed on the command line. The times will be converted
to your local time by the ut_offset value, which gets added to the
calculated universal time for the phase. You'll want to modify the
ConvertToLocalTime() function to ma... | 39.994737 | 599 | 0.590341 |
93d92105de468f872eab5ca75c8be28efa7244cf | 709 | py | Python | policies/named_policies/ElspethV3.py | TeamJumpstart/InformatiCup2021 | a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4 | [
"MIT"
] | 10 | 2021-04-18T17:54:02.000Z | 2021-07-26T19:58:41.000Z | policies/named_policies/ElspethV3.py | DiddiZ/InformatiCup2021 | a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4 | [
"MIT"
] | 1 | 2021-04-21T15:13:41.000Z | 2021-04-21T15:13:41.000Z | policies/named_policies/ElspethV3.py | DiddiZ/InformatiCup2021 | a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4 | [
"MIT"
] | 1 | 2021-04-20T09:42:50.000Z | 2021-04-20T09:42:50.000Z | from heuristics import CompositeHeuristic, PathLengthHeuristic, RandomHeuristic, RandomProbingHeuristic, RegionHeuristic
from policies import HeuristicPolicy
# Variant of Elspeth with closing_iterations working
pol = HeuristicPolicy(
CompositeHeuristic(
[
PathLengthHeuristic(20),
Ra... | 29.541667 | 120 | 0.586742 |
93d92ff95d33046044da0de21201af34fd25f888 | 15,583 | py | Python | trax/tf_numpy/extensions/extensions_test.py | yakovkeselman/trax | 615432bbc58ffb5bdf83a771e8f8b470995456db | [
"Apache-2.0"
] | null | null | null | trax/tf_numpy/extensions/extensions_test.py | yakovkeselman/trax | 615432bbc58ffb5bdf83a771e8f8b470995456db | [
"Apache-2.0"
] | null | null | null | trax/tf_numpy/extensions/extensions_test.py | yakovkeselman/trax | 615432bbc58ffb5bdf83a771e8f8b470995456db | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 33.656587 | 80 | 0.673875 |
93d931705bdc20709fe027968a56abc9072fc409 | 845 | py | Python | distil_ui/billing/panel.py | openstacker/distil-ui | a0452b11ee92f71d046f445025f4387d15e890ba | [
"Apache-2.0"
] | null | null | null | distil_ui/billing/panel.py | openstacker/distil-ui | a0452b11ee92f71d046f445025f4387d15e890ba | [
"Apache-2.0"
] | null | null | null | distil_ui/billing/panel.py | openstacker/distil-ui | a0452b11ee92f71d046f445025f4387d15e890ba | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Catalyst IT Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 31.296296 | 74 | 0.771598 |
93d962c07edf47b74474a308a7e4e25650f8e4d7 | 692 | py | Python | random/draw_circle.py | Dmendoza3/Phyton | e6c563609724b2dadcd767d2bfc291090ac2f58e | [
"MIT"
] | null | null | null | random/draw_circle.py | Dmendoza3/Phyton | e6c563609724b2dadcd767d2bfc291090ac2f58e | [
"MIT"
] | null | null | null | random/draw_circle.py | Dmendoza3/Phyton | e6c563609724b2dadcd767d2bfc291090ac2f58e | [
"MIT"
] | null | null | null | import math
ofile = open("circle.txt", "w")
def printGrid():
for x in grid:
print("[", end="", file=ofile)
for y in x:
print(y, end=", ", file=ofile)
print("]", file=ofile)
w = 20
h = 20
grid = [[" " for x in range(w)] for y in range(h)]
origin = (10, 10)
radius = 5
for an... | 21.625 | 55 | 0.528902 |
93d9749de039afa8ff3ac0e4ef341a6edbbddaea | 678 | py | Python | setup.py | abhilashabhilash3/Robust-vision-based-obstacle-detection | e8f48a2dd157a02844cde893e4944ae920361d20 | [
"MIT"
] | null | null | null | setup.py | abhilashabhilash3/Robust-vision-based-obstacle-detection | e8f48a2dd157a02844cde893e4944ae920361d20 | [
"MIT"
] | null | null | null | setup.py | abhilashabhilash3/Robust-vision-based-obstacle-detection | e8f48a2dd157a02844cde893e4944ae920361d20 | [
"MIT"
] | 1 | 2020-06-08T16:30:03.000Z | 2020-06-08T16:30:03.000Z | import sys
if sys.version_info.major == 3:
from setuptools import setup
setup(
name='anomaly_detector',
version='0.0.1',
author='Ludwig Waffenschmidt',
packages=['feature_extractor', 'anomaly_model', 'common', 'scripts'],
package_dir={'': 'anomaly_detector'}
)
else:... | 28.25 | 77 | 0.648968 |
93d98d2707510730fd94aa9f2fac398a41ec8436 | 3,569 | py | Python | intersight/models/task_ucs_task4_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/task_ucs_task4_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/task_ucs_task4_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class TaskUcsTask4Ref(object):
"""
NOTE: This class... | 23.793333 | 77 | 0.536285 |
93d9d788a7ab1d97dec839e70a9929e897c8b66c | 9,542 | py | Python | test/core/rules/std_test.py | swanderz/sqlfluff | 668f23500ce5d06f4de67333a8957811c2df485f | [
"MIT"
] | null | null | null | test/core/rules/std_test.py | swanderz/sqlfluff | 668f23500ce5d06f4de67333a8957811c2df485f | [
"MIT"
] | null | null | null | test/core/rules/std_test.py | swanderz/sqlfluff | 668f23500ce5d06f4de67333a8957811c2df485f | [
"MIT"
] | 1 | 2021-03-07T21:49:52.000Z | 2021-03-07T21:49:52.000Z | """Tests for the standard set of rules."""
import pytest
from sqlfluff.core import Linter
from sqlfluff.core.rules.base import BaseRule, LintResult, LintFix
from sqlfluff.core.rules import get_ruleset
from sqlfluff.core.rules.doc_decorators import document_configuration
from sqlfluff.core.config import FluffConfig
fro... | 33.598592 | 99 | 0.616537 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.