hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | 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 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fe90eb5d4db9dcb42eabad6cf0007baab0fc7833 | 18,598 | py | Python | levels/sombie.py | superhasduper/PythonGames | 64995d3e0b619006a2cf80d0da3c0fdf97db6fd9 | [
"MIT"
] | 1 | 2019-07-07T19:55:39.000Z | 2019-07-07T19:55:39.000Z | levels/sombie.py | superhasduper/PythonGames | 64995d3e0b619006a2cf80d0da3c0fdf97db6fd9 | [
"MIT"
] | null | null | null | levels/sombie.py | superhasduper/PythonGames | 64995d3e0b619006a2cf80d0da3c0fdf97db6fd9 | [
"MIT"
] | null | null | null | import arcade
import os
SPRITE_SCALING = 0.5
SPRITE_NATIVE_SIZE = 128
SPRITE_SIZE = int(SPRITE_NATIVE_SIZE * SPRITE_SCALING)
SCREEN_WIDTH = SPRITE_SIZE * 14
SCREEN_HEIGHT = SPRITE_SIZE * 10
MOVEMENT_SPEED = 5
COIN_SCALE = 0.7
class Room:
"""
This class holds all the information about the
... | 36.324219 | 124 | 0.614367 | 8,102 | 0.435638 | 0 | 0 | 0 | 0 | 0 | 0 | 3,206 | 0.172384 |
fe916e74f3d8c5dd73c18e07f1aa14f15ee3d8d0 | 4,869 | py | Python | venv/lib/python3.6/site-packages/gevent/testing/openfiles.py | Guillaume-Fernandez/phishfinder | b459a30202fd5dfb1340b43c70363705de7cedd9 | [
"MIT"
] | 10 | 2021-03-23T03:46:19.000Z | 2022-03-08T07:20:25.000Z | venv/lib/python3.6/site-packages/gevent/testing/openfiles.py | Guillaume-Fernandez/phishfinder | b459a30202fd5dfb1340b43c70363705de7cedd9 | [
"MIT"
] | 7 | 2021-05-21T16:51:48.000Z | 2022-03-12T00:50:26.000Z | venv/lib/python3.6/site-packages/gevent/testing/openfiles.py | Guillaume-Fernandez/phishfinder | b459a30202fd5dfb1340b43c70363705de7cedd9 | [
"MIT"
] | 4 | 2021-04-21T00:49:34.000Z | 2021-11-21T09:18:29.000Z | # Copyright (c) 2018 gevent community
#
# 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, di... | 38.642857 | 139 | 0.657835 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,513 | 0.516122 |
fe93e83fe7e8770b4f2c1e2cf97bec6cd0abb158 | 1,628 | py | Python | examples/multiprocess_example.py | ct-clmsn/distributed-tensorflow-orchestration | c841659881e98209149bd6e3e09774a50e3c748e | [
"Apache-2.0"
] | 5 | 2016-07-27T08:25:17.000Z | 2022-02-07T19:41:45.000Z | examples/multiprocess_example.py | ct-clmsn/distributed-tensorflow-orchestration | c841659881e98209149bd6e3e09774a50e3c748e | [
"Apache-2.0"
] | null | null | null | examples/multiprocess_example.py | ct-clmsn/distributed-tensorflow-orchestration | c841659881e98209149bd6e3e09774a50e3c748e | [
"Apache-2.0"
] | 1 | 2022-02-07T19:41:46.000Z | 2022-02-07T19:41:46.000Z | '''
marathon_example.py
performs a simple matrix multiply using 3 compute nodes
'''
def parseargs():
parser = argparse.ArgumentParser(description='Marathon for TensorFlow.')
parser.add_argument('--n_tasks', default=1, help='an integer for the accumulator')
parser.add_argument('--cpu', default=100.0, ... | 34.638298 | 116 | 0.673219 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 449 | 0.275799 |
fe97b6953c22bb335b56638721adf4a720e34f5f | 2,922 | py | Python | FAUCovidCrawler/AWSLambda/lambda_function.py | Awannaphasch2016/CDKFAUCovid19Cralwer | a84d90612314cb4d4618da95238617a524b1b280 | [
"MIT"
] | null | null | null | FAUCovidCrawler/AWSLambda/lambda_function.py | Awannaphasch2016/CDKFAUCovid19Cralwer | a84d90612314cb4d4618da95238617a524b1b280 | [
"MIT"
] | null | null | null | FAUCovidCrawler/AWSLambda/lambda_function.py | Awannaphasch2016/CDKFAUCovid19Cralwer | a84d90612314cb4d4618da95238617a524b1b280 | [
"MIT"
] | null | null | null | '''
Original code contributor: mentzera
Article link: https://aws.amazon.com/blogs/big-data/building-a-near-real-time-discovery-platform-with-aws/
'''
import boto3
import json
import twitter_to_es
# from Examples.Demo.AWS_Related.TwitterStreamWithAWS.LambdaWithS3Trigger import \
# twitter_to_es
from tweet_utils i... | 33.204545 | 142 | 0.589322 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,481 | 0.506845 |
fe97e4775b3fbd1abdf826717d17fd4e96f2144c | 353 | py | Python | user_messages/context_processors.py | everaccountable/django-user-messages | 101d539b785bdb440bf166fb16ad25eb66e4174a | [
"MIT"
] | 21 | 2018-04-18T17:58:12.000Z | 2022-01-19T12:41:01.000Z | user_messages/context_processors.py | everaccountable/django-user-messages | 101d539b785bdb440bf166fb16ad25eb66e4174a | [
"MIT"
] | 4 | 2018-04-24T11:04:15.000Z | 2022-02-03T18:35:21.000Z | user_messages/context_processors.py | everaccountable/django-user-messages | 101d539b785bdb440bf166fb16ad25eb66e4174a | [
"MIT"
] | 7 | 2018-03-04T16:03:44.000Z | 2022-02-03T15:50:39.000Z | from django.contrib.messages.constants import DEFAULT_LEVELS
from user_messages.api import get_messages
def messages(request):
"""
Return a lazy 'messages' context variable as well as
'DEFAULT_MESSAGE_LEVELS'.
"""
return {
"messages": get_messages(request=request),
"DEFAULT_MESSAG... | 23.533333 | 60 | 0.708215 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.373938 |
fe98a505a6e3e05977900098d14a4c4efb60654a | 502 | py | Python | Day_5/highest_score.py | ecanro/100DaysOfCode_Python | a86ebe5a793fd4743e0de87454ba76925efdd23d | [
"MIT"
] | null | null | null | Day_5/highest_score.py | ecanro/100DaysOfCode_Python | a86ebe5a793fd4743e0de87454ba76925efdd23d | [
"MIT"
] | null | null | null | Day_5/highest_score.py | ecanro/100DaysOfCode_Python | a86ebe5a793fd4743e0de87454ba76925efdd23d | [
"MIT"
] | null | null | null | ## Highest Score
# 🚨 Don't change the code below 👇
student_scores = input("Input a list of student scores: ").split()
for n in range(0, len(student_scores)):
student_scores[n] = int(student_scores[n])
print(student_scores)
# 🚨 Don't change the code above 👆
# Write your code below this row 👇
highest_score = 0... | 26.421053 | 66 | 0.721116 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.4294 |
fe9913a9a0d00104117bbc4e7f42cf9196b11854 | 8,791 | py | Python | finetune/finetune.py | zaixizhang/MGSSL | fdb7e78bb927d735ed64dc78fb792adb13352e1c | [
"Apache-2.0"
] | 43 | 2021-10-15T01:11:36.000Z | 2022-03-31T02:05:41.000Z | finetune/finetune.py | zaixizhang/MGSSL | fdb7e78bb927d735ed64dc78fb792adb13352e1c | [
"Apache-2.0"
] | 5 | 2021-12-09T08:07:22.000Z | 2022-03-02T07:34:34.000Z | finetune/finetune.py | zaixizhang/MGSSL | fdb7e78bb927d735ed64dc78fb792adb13352e1c | [
"Apache-2.0"
] | 7 | 2021-11-23T01:15:36.000Z | 2022-03-07T16:30:30.000Z | import argparse
from loader import MoleculeDataset
from torch_geometric.data import DataLoader
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from tqdm import tqdm
import numpy as np
from model import GNN, GNN_graphpred
from sklearn.metrics import roc_auc_score
from ... | 42.674757 | 176 | 0.657604 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,005 | 0.228074 |
fe995885e2a5bd2844820d9d11a66c6433d1051b | 1,166 | py | Python | jumpscale/packages/vdc_dashboard/bottle/api/exceptions.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 13 | 2020-09-02T09:05:08.000Z | 2022-03-12T02:43:24.000Z | jumpscale/packages/vdc_dashboard/bottle/api/exceptions.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 1,998 | 2020-06-15T11:46:10.000Z | 2022-03-24T22:12:41.000Z | jumpscale/packages/vdc_dashboard/bottle/api/exceptions.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 8 | 2020-09-29T06:50:35.000Z | 2021-06-14T03:30:52.000Z | from jumpscale.core import exceptions
class BaseError(exceptions.Base):
"""a generic base error for bcdb rest, with status code"""
def __init__(self, status, *args, **kwargs):
super().__init__(*args, *kwargs)
self.status = status
class VDCNotFound(BaseError):
pass
class MissingAuthori... | 13.55814 | 62 | 0.732419 | 1,068 | 0.915952 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.049743 |
fe99a748e2fcbf259f6611afd0ca5930032c99b6 | 5,703 | py | Python | neurokit2/signal/signal_plot.py | gutierrezps/NeuroKit | a30f76e64b4108abdc652a20391dc0288c62501d | [
"MIT"
] | 1 | 2022-03-20T21:09:34.000Z | 2022-03-20T21:09:34.000Z | neurokit2/signal/signal_plot.py | Lei-I-Zhang/NeuroKit | a30f76e64b4108abdc652a20391dc0288c62501d | [
"MIT"
] | null | null | null | neurokit2/signal/signal_plot.py | Lei-I-Zhang/NeuroKit | a30f76e64b4108abdc652a20391dc0288c62501d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from ..events import events_plot
from ..stats import standardize as nk_standardize
def signal_plot(
signal, sampling_rate=None, subplots=False, standardize=False, labels=None, **kwargs
):
"""Plot signal with events... | 33.946429 | 109 | 0.57198 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,142 | 0.375592 |
fe9d9591df2f2c4858eb64ae4def8e712c9e40a0 | 1,183 | py | Python | migrations/versions/1a89721126f7_only_one_validation_per_mission_user_.py | MTES-MCT/mobilic-api | b3754de2282262fd60a27dc90e40777df9c1e230 | [
"MIT"
] | null | null | null | migrations/versions/1a89721126f7_only_one_validation_per_mission_user_.py | MTES-MCT/mobilic-api | b3754de2282262fd60a27dc90e40777df9c1e230 | [
"MIT"
] | 8 | 2021-04-19T17:47:55.000Z | 2022-02-16T17:40:18.000Z | migrations/versions/1a89721126f7_only_one_validation_per_mission_user_.py | MTES-MCT/mobilic-api | b3754de2282262fd60a27dc90e40777df9c1e230 | [
"MIT"
] | null | null | null | """Only one validation per mission, user and actor
Revision ID: 1a89721126f7
Revises: fa96dfc8237d
Create Date: 2021-10-14 11:22:01.124488
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "1a89721126f7"
down_revision = "fa96dfc8237d"
branch_labels = None
depends... | 23.66 | 117 | 0.633136 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 916 | 0.774303 |
fe9dfa2f69a678e6192380ed28bf692cc55ff822 | 1,979 | py | Python | packages/facilities/rtdb/python/rtdb2_get.py | Falcons-Robocup/code | 2281a8569e7f11cbd3238b7cc7341c09e2e16249 | [
"Apache-2.0"
] | 2 | 2021-01-15T13:27:19.000Z | 2021-08-04T08:40:52.000Z | packages/facilities/rtdb/python/rtdb2_get.py | Falcons-Robocup/code | 2281a8569e7f11cbd3238b7cc7341c09e2e16249 | [
"Apache-2.0"
] | null | null | null | packages/facilities/rtdb/python/rtdb2_get.py | Falcons-Robocup/code | 2281a8569e7f11cbd3238b7cc7341c09e2e16249 | [
"Apache-2.0"
] | 5 | 2018-05-01T10:39:31.000Z | 2022-03-25T03:02:35.000Z | # Copyright 2020 Jan Feitsma (Falcons)
# SPDX-License-Identifier: Apache-2.0
#!/usr/bin/python
import os
import sys
import argparse
from rtdb2 import RtDB2Store, RTDB2_DEFAULT_PATH
import rtdb2tools
from hexdump import hexdump
# Main structure of the program
if __name__ == "__main__":
# Argument parsing.
des... | 42.106383 | 186 | 0.723598 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,031 | 0.52097 |
fe9ed7b6294e532592cc4dcafea632566b56df4d | 2,219 | py | Python | algorithms/A3C/atari/atari_env_deprecated.py | what3versin/reinforce_py | 46769da50aea65346cd3a300b55306d25f1f2683 | [
"MIT"
] | 1 | 2018-11-09T02:56:27.000Z | 2018-11-09T02:56:27.000Z | algorithms/A3C/atari/atari_env_deprecated.py | syd951186545/reinforce_py | 46769da50aea65346cd3a300b55306d25f1f2683 | [
"MIT"
] | null | null | null | algorithms/A3C/atari/atari_env_deprecated.py | syd951186545/reinforce_py | 46769da50aea65346cd3a300b55306d25f1f2683 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import division
import os
import gym
import numpy as np
from skimage.transform import resize
from skimage.color import rgb2gray
class Atari(object):
s_dim = [84, 84, 1]
a_dim = 3
def __init__(self, args, record_video=False):
self.env = gym.m... | 32.632353 | 80 | 0.581794 | 2,032 | 0.915728 | 0 | 0 | 0 | 0 | 0 | 0 | 161 | 0.072555 |
fe9f7091809e30b40cd88cb5967081a6b1484eed | 5,935 | py | Python | content/_build/jupyter_execute/macm.py | NBCLab/nimare-paper | 2b9e70febcfde4ca12420adc3c2910ff622252f2 | [
"MIT"
] | 3 | 2020-10-20T10:24:04.000Z | 2021-12-20T13:31:01.000Z | content/_build/jupyter_execute/macm.py | NBCLab/nimare-paper | 2b9e70febcfde4ca12420adc3c2910ff622252f2 | [
"MIT"
] | 20 | 2021-03-07T17:18:48.000Z | 2022-03-09T15:13:02.000Z | content/_build/jupyter_execute/macm.py | NBCLab/nimare-paper | 2b9e70febcfde4ca12420adc3c2910ff622252f2 | [
"MIT"
] | 3 | 2020-05-05T14:42:18.000Z | 2021-11-30T19:52:27.000Z | #!/usr/bin/env python
# coding: utf-8
# # Meta-Analytic Coactivation Modeling
# In[1]:
# First, import the necessary modules and functions
import os
from datetime import datetime
import matplotlib.pyplot as plt
from myst_nb import glue
from repo2data.repo2data import Repo2Data
import nimare
start = datetime.now(... | 36.411043 | 392 | 0.752148 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,466 | 0.583993 |
fe9f96734192b94aa40844f25ed620f799a5da53 | 50,863 | py | Python | cisco-ios-xe/ydk/models/cisco_ios_xe/CISCO_IPSLA_ECHO_MIB.py | Maikor/ydk-py | b86c4a7c570ae3b2c5557d098420446df5de4929 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xe/ydk/models/cisco_ios_xe/CISCO_IPSLA_ECHO_MIB.py | Maikor/ydk-py | b86c4a7c570ae3b2c5557d098420446df5de4929 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xe/ydk/models/cisco_ios_xe/CISCO_IPSLA_ECHO_MIB.py | Maikor/ydk-py | b86c4a7c570ae3b2c5557d098420446df5de4929 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """ CISCO_IPSLA_ECHO_MIB
This MIB module defines the templates for IP SLA operations of
ICMP echo, UDP echo and TCP connect.
The ICMP echo operation measures end\-to\-end response time between
a Cisco router and any IP enabled device by computing the time
taken between sending an ICMP echo request message to the
d... | 55.527293 | 720 | 0.624855 | 49,758 | 0.978275 | 0 | 0 | 0 | 0 | 0 | 0 | 36,648 | 0.720524 |
fea2c153f85345b8df258b2faf5084ce932ff128 | 4,057 | py | Python | example/model-parallel/matrix_factorization/train.py | tkameyama/incubator-mxnet | 47b0bdd00e7c5e1c9a448809b02e68c0e4b72e96 | [
"Apache-2.0"
] | 1 | 2022-01-22T02:29:24.000Z | 2022-01-22T02:29:24.000Z | example/model-parallel/matrix_factorization/train.py | tkameyama/incubator-mxnet | 47b0bdd00e7c5e1c9a448809b02e68c0e4b72e96 | [
"Apache-2.0"
] | null | null | null | example/model-parallel/matrix_factorization/train.py | tkameyama/incubator-mxnet | 47b0bdd00e7c5e1c9a448809b02e68c0e4b72e96 | [
"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... | 36.881818 | 98 | 0.682031 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,685 | 0.415332 |
fea4ed769af71f922b55fc3fe0ad5f2f54ffbfef | 762 | py | Python | scripts/libfranka_gui_gripper_run.py | nbfigueroa/franka_interactive_controllers | 7befdd5fbaa3c7a83b931292fab39ab98754a60c | [
"MIT"
] | 6 | 2021-12-08T09:32:57.000Z | 2022-03-20T09:22:29.000Z | scripts/libfranka_gui_gripper_run.py | nbfigueroa/franka_interactive_controllers | 7befdd5fbaa3c7a83b931292fab39ab98754a60c | [
"MIT"
] | null | null | null | scripts/libfranka_gui_gripper_run.py | nbfigueroa/franka_interactive_controllers | 7befdd5fbaa3c7a83b931292fab39ab98754a60c | [
"MIT"
] | 3 | 2022-02-01T12:30:47.000Z | 2022-03-24T10:31:04.000Z | #!/usr/bin/env python3
import shlex
from tkinter import *
from tkinter import messagebox
from psutil import Popen
top = Tk()
top.title("Franka Gripper Control")
top.geometry("300x75")
def open():
node_process = Popen(shlex.split('rosrun franka_interactive_controllers libfranka_gripper_run 1'))
messagebox.showinfo... | 25.4 | 99 | 0.745407 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 270 | 0.354331 |
fea585d93413c287bd31eaa0525d97e26cbdcd0b | 742 | py | Python | codeforces.com/1669F/solution.py | zubtsov/competitive-programming | 919d63130144347d7f6eddcf8f5bc2afb85fddf3 | [
"MIT"
] | null | null | null | codeforces.com/1669F/solution.py | zubtsov/competitive-programming | 919d63130144347d7f6eddcf8f5bc2afb85fddf3 | [
"MIT"
] | null | null | null | codeforces.com/1669F/solution.py | zubtsov/competitive-programming | 919d63130144347d7f6eddcf8f5bc2afb85fddf3 | [
"MIT"
] | null | null | null | for i in range(int(input())):
number_of_candies = int(input())
candies_weights = list(map(int, input().split()))
bob_pos = number_of_candies - 1
alice_pos = 0
bob_current_weight = 0
alice_current_weight = 0
last_equal_candies_total_number = 0
while alice_pos <= bob_pos:
if al... | 29.68 | 91 | 0.665768 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fea64ce26f29e53484b8013f735f948fef203460 | 12,293 | py | Python | client/client_build.py | patriotemeritus/grr | bf2b9268c8b9033ab091e27584986690438bd7c3 | [
"Apache-2.0"
] | 1 | 2015-06-24T09:07:20.000Z | 2015-06-24T09:07:20.000Z | client/client_build.py | patriotemeritus/grr | bf2b9268c8b9033ab091e27584986690438bd7c3 | [
"Apache-2.0"
] | 3 | 2020-02-11T22:29:15.000Z | 2021-06-10T17:44:31.000Z | client/client_build.py | wandec/grr | 7fb7e6d492d1325a5fe1559d3aeae03a301c4baa | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""This tool builds or repacks the client binaries.
This handles invocations for the build across the supported platforms including
handling Visual Studio, pyinstaller and other packaging mechanisms.
"""
import logging
import os
import platform
import time
# pylint: disable=unused-import
from ... | 35.631884 | 80 | 0.663467 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,487 | 0.365004 |
fea677c9a939d2a74e86aae5f8b7734e53289cfd | 1,549 | py | Python | Greyatom-projects/code.py | naveena41/greyatom-python-for-data-science | 3aa63878ff12e0e8cdf0e63bafe9b4a2c082f7b1 | [
"MIT"
] | null | null | null | Greyatom-projects/code.py | naveena41/greyatom-python-for-data-science | 3aa63878ff12e0e8cdf0e63bafe9b4a2c082f7b1 | [
"MIT"
] | null | null | null | Greyatom-projects/code.py | naveena41/greyatom-python-for-data-science | 3aa63878ff12e0e8cdf0e63bafe9b4a2c082f7b1 | [
"MIT"
] | null | null | null | # --------------
# Code starts here
# Create the lists
class_1 = ['geoffrey hinton', 'andrew ng', 'sebastian raschka', 'yoshu bengio']
class_2 = ['hilary mason', 'carla gentry', 'corinna cortes']
# Concatenate both the strings
new_class = class_1+class_2
print(new_class)
# Append the list
new_class.append('p... | 24.983871 | 163 | 0.701097 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 911 | 0.588121 |
fea776840ba3b32f75565766babfd041aa64ab68 | 1,830 | py | Python | environments/recommenders/recsim_wrapper_test.py | jackblandin/ml-fairness-gym | dce1feaacf2588e0a2d6187e896796241a25ed81 | [
"Apache-2.0"
] | null | null | null | environments/recommenders/recsim_wrapper_test.py | jackblandin/ml-fairness-gym | dce1feaacf2588e0a2d6187e896796241a25ed81 | [
"Apache-2.0"
] | null | null | null | environments/recommenders/recsim_wrapper_test.py | jackblandin/ml-fairness-gym | dce1feaacf2588e0a2d6187e896796241a25ed81 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2022 The ML Fairness Gym 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 applicab... | 31.551724 | 74 | 0.742623 | 858 | 0.468852 | 0 | 0 | 0 | 0 | 0 | 0 | 755 | 0.412568 |
fea7d2eca288a3ef4c60e731703c65a5e9641808 | 3,034 | py | Python | moss_client_cli.py | mernst32/dl-searchcode-code | 504fe59df245ba123ad8ad6e45f03b17de6ef236 | [
"MIT"
] | null | null | null | moss_client_cli.py | mernst32/dl-searchcode-code | 504fe59df245ba123ad8ad6e45f03b17de6ef236 | [
"MIT"
] | null | null | null | moss_client_cli.py | mernst32/dl-searchcode-code | 504fe59df245ba123ad8ad6e45f03b17de6ef236 | [
"MIT"
] | null | null | null | import argparse
import csv
import os
from moss_client.core import submit_and_dl, parse_moss_reports
data_folder = 'data'
def handle_input(user_id, base_folder, parse, only_parse, join_file, batch):
global data_folder
abs_path = os.path.abspath(os.path.dirname(__file__))
root_data_folder = os.path.join(ab... | 57.245283 | 123 | 0.680949 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,151 | 0.379367 |
fea81883e0bc239697344b2c58f07b4a45f346d3 | 6,495 | py | Python | catkin_ws/src/localization/src/localization_node.py | DiegoOrtegoP/Software | 4a07dd2dab29db910ca2e26848fa6b53b7ab00cd | [
"CC-BY-2.0"
] | 12 | 2016-04-14T12:21:46.000Z | 2021-06-18T07:51:40.000Z | catkin_ws/src/localization/src/localization_node.py | DiegoOrtegoP/Software | 4a07dd2dab29db910ca2e26848fa6b53b7ab00cd | [
"CC-BY-2.0"
] | 14 | 2017-03-03T23:33:05.000Z | 2018-04-03T18:07:53.000Z | catkin_ws/src/localization/src/localization_node.py | DiegoOrtegoP/Software | 4a07dd2dab29db910ca2e26848fa6b53b7ab00cd | [
"CC-BY-2.0"
] | 113 | 2016-05-03T06:11:42.000Z | 2019-06-01T14:37:38.000Z | #!/usr/bin/env python
import rospy
#from apriltags_ros.msg import AprilTagDetectionArray
from duckietown_msgs.msg import AprilTagsWithInfos
import tf2_ros
from tf2_msgs.msg import TFMessage
import tf.transformations as tr
from geometry_msgs.msg import Transform, TransformStamped
import numpy as np
from localization imp... | 45.41958 | 147 | 0.652194 | 5,606 | 0.863125 | 0 | 0 | 0 | 0 | 0 | 0 | 1,541 | 0.237259 |
fea8219f00f084855cf10ddacc7d1729db19658a | 1,030 | py | Python | gen_data/get_teams.py | wusui/NCAA2019 | d33a69926dc2d5355f33f9b69e39475c54d03c56 | [
"MIT"
] | null | null | null | gen_data/get_teams.py | wusui/NCAA2019 | d33a69926dc2d5355f33f9b69e39475c54d03c56 | [
"MIT"
] | null | null | null | gen_data/get_teams.py | wusui/NCAA2019 | d33a69926dc2d5355f33f9b69e39475c54d03c56 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# pylint: disable=W0223
"""
Get a list of teams
"""
from html.parser import HTMLParser
import requests
class ChkTeams(HTMLParser):
"""
Extract team names from page
"""
def __init__(self):
HTMLParser.__init__(self)
self.retval = []
def handle_starttag(self, tag, a... | 20.196078 | 74 | 0.590291 | 354 | 0.343689 | 0 | 0 | 0 | 0 | 0 | 0 | 334 | 0.324272 |
fea8cf21ba50623dff52ac8ea09d727a155060be | 32,904 | py | Python | pysnmp-with-texts/Nortel-MsCarrier-MscPassport-SubnetInterfaceMIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/Nortel-MsCarrier-MscPassport-SubnetInterfaceMIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/Nortel-MsCarrier-MscPassport-SubnetInterfaceMIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module Nortel-MsCarrier-MscPassport-SubnetInterfaceMIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Nortel-MsCarrier-MscPassport-SubnetInterfaceMIB
# Produced by pysmi-0.3.4 at Wed May 1 14:31:21 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.... | 197.02994 | 2,993 | 0.792973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13,763 | 0.418277 |
fea8eab09203e9965fd3c37311110a5d329a6d18 | 2,882 | py | Python | svgserver/app.py | omniscale/svgserver | a98f75ec9547fda25941129e854af046ba8f5dfe | [
"Apache-2.0"
] | 2 | 2018-10-18T07:15:58.000Z | 2020-04-09T20:42:07.000Z | svgserver/app.py | omniscale/svgserver | a98f75ec9547fda25941129e854af046ba8f5dfe | [
"Apache-2.0"
] | null | null | null | svgserver/app.py | omniscale/svgserver | a98f75ec9547fda25941129e854af046ba8f5dfe | [
"Apache-2.0"
] | 2 | 2019-06-20T01:29:59.000Z | 2021-12-01T12:18:55.000Z | import codecs
import tempfile
from contextlib import closing
from .cgi import CGIClient
from .combine import CombineSVG
from .mapserv import MapServer, InternalError
from .tree import build_tree
def _recursive_add_layer(nodes, params, svg, mapserver, translations):
for node in nodes:
group_name = format... | 29.408163 | 90 | 0.586051 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 397 | 0.137752 |
feaaec4a50d5a134457fe10cd74a02481c434561 | 440 | py | Python | 11_app/script/purchase_order.py | israillaky/ERPOSAPP11 | 90dd26213fecce7f6301bfa2f2356d8f5d3a8086 | [
"MIT"
] | null | null | null | 11_app/script/purchase_order.py | israillaky/ERPOSAPP11 | 90dd26213fecce7f6301bfa2f2356d8f5d3a8086 | [
"MIT"
] | null | null | null | 11_app/script/purchase_order.py | israillaky/ERPOSAPP11 | 90dd26213fecce7f6301bfa2f2356d8f5d3a8086 | [
"MIT"
] | null | null | null | import frappe
@frappe.whitelist()
def filt_itemby_supplier(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""Select parent from `tabItem Supplier` where supplier= %s""",(filters.get("supplier")));
@frappe.whitelist()
def filteritem(doctype, txt, searchfield, start, page_len, filters... | 44 | 117 | 0.740909 | 0 | 0 | 0 | 0 | 420 | 0.954545 | 0 | 0 | 162 | 0.368182 |
feab2f73df218463681f43ce0d3584c476b63adb | 925 | py | Python | src/common/bio/smiles.py | duttaprat/proteinGAN | 92b32192ab959e327e1d713d09fc9b40dc01d757 | [
"MIT"
] | 8 | 2020-12-23T21:44:47.000Z | 2021-07-09T05:46:16.000Z | src/common/bio/smiles.py | duttaprat/proteinGAN | 92b32192ab959e327e1d713d09fc9b40dc01d757 | [
"MIT"
] | null | null | null | src/common/bio/smiles.py | duttaprat/proteinGAN | 92b32192ab959e327e1d713d09fc9b40dc01d757 | [
"MIT"
] | null | null | null | from common.bio.constants import SMILES_CHARACTER_TO_ID, ID_TO_SMILES_CHARACTER
def from_smiles_to_id(data, column):
"""Converts sequences from smiles to ids
Args:
data: data that contains characters that need to be converted to ids
column: a column of the dataframe that contains characters that ... | 28.030303 | 102 | 0.721081 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 550 | 0.594595 |
feab97b0913494abc7216c346f3470dd95d2e154 | 1,001 | py | Python | test/lib_config_test.py | yokoyama-flogics/ibp_monitor_2 | 1a7df55a524ff3a7908df330e7e02c9f27e24ae0 | [
"BSD-2-Clause"
] | 3 | 2017-11-23T13:29:47.000Z | 2021-01-08T09:28:35.000Z | test/lib_config_test.py | yokoyama-flogics/ibp_monitor_2 | 1a7df55a524ff3a7908df330e7e02c9f27e24ae0 | [
"BSD-2-Clause"
] | null | null | null | test/lib_config_test.py | yokoyama-flogics/ibp_monitor_2 | 1a7df55a524ff3a7908df330e7e02c9f27e24ae0 | [
"BSD-2-Clause"
] | 2 | 2018-02-15T08:11:24.000Z | 2021-01-08T09:28:43.000Z | import os
import sys
import unittest
# Set Python search path to the parent directory
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from lib.config import *
class TestLibConfig(unittest.TestCase):
def test_config_noconfigfile(self):
config = BeaconConfigParser('not_exist.cfg')
wit... | 33.366667 | 70 | 0.679321 | 765 | 0.764236 | 0 | 0 | 0 | 0 | 0 | 0 | 201 | 0.200799 |
feac612781029aac47e6d21c85d8519de53dcb55 | 7,188 | py | Python | tests/test_installation.py | phdye/nimporter | 64eccc74950811e03efdde50649e84ca1fe87ae4 | [
"MIT"
] | null | null | null | tests/test_installation.py | phdye/nimporter | 64eccc74950811e03efdde50649e84ca1fe87ae4 | [
"MIT"
] | null | null | null | tests/test_installation.py | phdye/nimporter | 64eccc74950811e03efdde50649e84ca1fe87ae4 | [
"MIT"
] | null | null | null | """
Test to make sure that libraries built with Nimporter can be installed via Pip.
"""
import sys, os, subprocess, shutil, pkg_resources, json, warnings
from pathlib import Path
import pytest
import nimporter
PYTHON = 'python' if sys.platform == 'win32' else 'python3'
PIP = 'pip' if shutil.which('pip') else 'pip3'
... | 38.854054 | 80 | 0.564969 | 0 | 0 | 0 | 0 | 6,856 | 0.953812 | 0 | 0 | 1,872 | 0.260434 |
feae2347f1d740037425173028bb1b3d8af9f2a3 | 153 | py | Python | hotpot_sample_dict.py | bvanaken/pytorch-pretrained-BERT | 71c1660fb082fa5ebde4afd8c7db2bc96b80bb59 | [
"Apache-2.0"
] | 1 | 2022-02-06T15:59:12.000Z | 2022-02-06T15:59:12.000Z | hotpot_sample_dict.py | bvanaken/pytorch-pretrained-BERT | 71c1660fb082fa5ebde4afd8c7db2bc96b80bb59 | [
"Apache-2.0"
] | null | null | null | hotpot_sample_dict.py | bvanaken/pytorch-pretrained-BERT | 71c1660fb082fa5ebde4afd8c7db2bc96b80bb59 | [
"Apache-2.0"
] | null | null | null | samples = {
"2_brother_plays": {
"question_parts": [range(1, 13), range(13, 17)],
"sp_parts": [range(20, 43), range(50, 60)]
}
}
| 21.857143 | 56 | 0.51634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.281046 |
feb04d32f16beda0e1b583eb23a6f47a91df44ef | 695 | py | Python | src/applications/blog/migrations/0003_post_author.py | alexander-sidorov/tms-z43 | 61ecd204f5de4e97ff0300f6ef91c36c2bcda31c | [
"MIT"
] | 2 | 2020-12-17T20:19:21.000Z | 2020-12-22T12:46:43.000Z | src/applications/blog/migrations/0003_post_author.py | alexander-sidorov/tms-z43 | 61ecd204f5de4e97ff0300f6ef91c36c2bcda31c | [
"MIT"
] | 4 | 2021-04-20T08:40:30.000Z | 2022-02-10T07:50:30.000Z | src/applications/blog/migrations/0003_post_author.py | alexander-sidorov/tms-z43 | 61ecd204f5de4e97ff0300f6ef91c36c2bcda31c | [
"MIT"
] | 1 | 2021-02-10T06:42:19.000Z | 2021-02-10T06:42:19.000Z | # Generated by Django 3.1.7 on 2021-03-24 17:41
import django.db.models.deletion
from django.conf import settings
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("blo... | 24.821429 | 66 | 0.604317 | 515 | 0.741007 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.132374 |
feb0e950cc084ec84da234840633db92453d5121 | 16,227 | py | Python | sdk/python/pulumi_aws/cloudformation/stack_set.py | mdop-wh/pulumi-aws | 05bb32e9d694dde1c3b76d440fd2cd0344d23376 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/cloudformation/stack_set.py | mdop-wh/pulumi-aws | 05bb32e9d694dde1c3b76d440fd2cd0344d23376 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/cloudformation/stack_set.py | mdop-wh/pulumi-aws | 05bb32e9d694dde1c3b76d440fd2cd0344d23376 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
from .. import ... | 57.747331 | 403 | 0.680841 | 15,859 | 0.977322 | 0 | 0 | 7,675 | 0.472977 | 0 | 0 | 10,666 | 0.6573 |
feb1798a65bfb807865b5bcdd876a894d5048086 | 319 | py | Python | code/config/imports.py | farioso-fernando/cover-meu-beat | b15a9c0c97086e51e42cee4dd40e7d0650130d0e | [
"MIT"
] | null | null | null | code/config/imports.py | farioso-fernando/cover-meu-beat | b15a9c0c97086e51e42cee4dd40e7d0650130d0e | [
"MIT"
] | null | null | null | code/config/imports.py | farioso-fernando/cover-meu-beat | b15a9c0c97086e51e42cee4dd40e7d0650130d0e | [
"MIT"
] | null | null | null | from kivy.uix.screenmanager import ScreenManager
from kivy.uix.boxlayout import BoxLayout
from kivy.lang.builder import Builder
from kivy.animation import Animation
from kivy.core.window import Window
from kivymd.app import MDApp
import kivymd
import kivy
print(
)
def version():
kivy.require('2.0.0')
print(
) | 16.789474 | 48 | 0.789969 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.021944 |
feb1c1e0c98bd37c082895d1888d0fe15b8aaccf | 19,367 | py | Python | claripy/vsa/valueset.py | kwalberg/claripy | b5cfa0a355eaa3cd5403e1d81f0b80bb3db20c90 | [
"BSD-2-Clause"
] | null | null | null | claripy/vsa/valueset.py | kwalberg/claripy | b5cfa0a355eaa3cd5403e1d81f0b80bb3db20c90 | [
"BSD-2-Clause"
] | null | null | null | claripy/vsa/valueset.py | kwalberg/claripy | b5cfa0a355eaa3cd5403e1d81f0b80bb3db20c90 | [
"BSD-2-Clause"
] | null | null | null | import functools
import itertools
import numbers
from ..backend_object import BackendObject
from ..annotation import Annotation
def normalize_types_two_args(f):
@functools.wraps(f)
def normalizer(self, region, o):
"""
Convert any object to an object that we can process.
"""
if ... | 29.795385 | 120 | 0.58357 | 18,128 | 0.936025 | 0 | 0 | 8,201 | 0.423452 | 0 | 0 | 5,494 | 0.283678 |
feb21c64003d71c234c911e57ed8a4baa217c7cb | 2,663 | py | Python | fardaastationapi.py | sina-cb/fardaastationapi | 0e27afe05195f346e17fd52e1c30b853c954a3b0 | [
"Apache-2.0"
] | null | null | null | fardaastationapi.py | sina-cb/fardaastationapi | 0e27afe05195f346e17fd52e1c30b853c954a3b0 | [
"Apache-2.0"
] | 1 | 2017-12-21T19:54:36.000Z | 2018-01-08T02:05:11.000Z | fardaastationapi.py | sina-cb/fardaastationapi | 0e27afe05195f346e17fd52e1c30b853c954a3b0 | [
"Apache-2.0"
] | null | null | null | import logging
from episodes import find_updates, db, count_all
from logging import error as logi
from flask import Flask, jsonify, request
def create_app(config, debug=False, testing=False, config_overrides=None):
app = Flask(__name__)
app.config.from_object(config)
app.config['JSON_AS_ASCII'] = False
... | 33.708861 | 119 | 0.592189 | 0 | 0 | 0 | 0 | 1,900 | 0.713481 | 0 | 0 | 962 | 0.361247 |
feb27ff41ef1690499bd0cbcb5cc15ed8e07d63d | 868 | py | Python | pytglib/api/types/can_transfer_ownership_result_password_too_fresh.py | iTeam-co/pytglib | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 6 | 2019-10-30T08:57:27.000Z | 2021-02-08T14:17:43.000Z | pytglib/api/types/can_transfer_ownership_result_password_too_fresh.py | iTeam-co/python-telegram | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 1 | 2021-08-19T05:44:10.000Z | 2021-08-19T07:14:56.000Z | pytglib/api/types/can_transfer_ownership_result_password_too_fresh.py | iTeam-co/python-telegram | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 5 | 2019-12-04T05:30:39.000Z | 2021-05-21T18:23:32.000Z |
from ..utils import Object
class CanTransferOwnershipResultPasswordTooFresh(Object):
"""
The 2-step verification was enabled recently, user needs to wait
Attributes:
ID (:obj:`str`): ``CanTransferOwnershipResultPasswordTooFresh``
Args:
retry_after (:obj:`int`):
Time le... | 26.30303 | 96 | 0.68318 | 836 | 0.963134 | 0 | 0 | 205 | 0.236175 | 0 | 0 | 512 | 0.589862 |
feb49cfe9fd1f9a9e260952a3552e9f39bc9e707 | 12,199 | py | Python | catapult.py | spraakbanken/sparv-catapult | 03273985ceea6feef47a56084c595580d0338f7d | [
"MIT"
] | null | null | null | catapult.py | spraakbanken/sparv-catapult | 03273985ceea6feef47a56084c595580d0338f7d | [
"MIT"
] | 2 | 2021-12-13T19:47:29.000Z | 2021-12-15T16:14:50.000Z | catapult.py | spraakbanken/sparv-catapult | 03273985ceea6feef47a56084c595580d0338f7d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# catapult: runs python scripts in already running processes to eliminate the
# python interpreter startup time.
#
# The lexicon for sparv.saldo.annotate and sparv.saldo.compound can be pre-loaded and
# shared between processes. See the variable annotators in handle and start.
#
# Run scripts in... | 32.617647 | 111 | 0.61792 | 201 | 0.016477 | 0 | 0 | 198 | 0.016231 | 0 | 0 | 4,556 | 0.373473 |
feb55dc64767ea42fd4dbdb633eb49cefc5afea8 | 2,445 | py | Python | tests/test_sentiments.py | rajeshkumargp/TextBlob | a8709368f2a8a8ba4d87730111f8b6675d0735cd | [
"MIT"
] | 6,608 | 2015-01-02T13:13:16.000Z | 2022-03-31T13:44:41.000Z | tests/test_sentiments.py | rajeshkumargp/TextBlob | a8709368f2a8a8ba4d87730111f8b6675d0735cd | [
"MIT"
] | 277 | 2015-01-01T15:08:55.000Z | 2022-03-28T20:00:06.000Z | tests/test_sentiments.py | rajeshkumargp/TextBlob | a8709368f2a8a8ba4d87730111f8b6675d0735cd | [
"MIT"
] | 1,110 | 2015-01-01T22:04:39.000Z | 2022-03-20T20:39:26.000Z | from __future__ import unicode_literals
import unittest
from nose.tools import * # PEP8 asserts
from nose.plugins.attrib import attr
from textblob.sentiments import PatternAnalyzer, NaiveBayesAnalyzer, DISCRETE, CONTINUOUS
class TestPatternSentiment(unittest.TestCase):
def setUp(self):
self.analyzer = ... | 35.434783 | 89 | 0.685481 | 2,062 | 0.843354 | 0 | 0 | 721 | 0.294888 | 0 | 0 | 304 | 0.124335 |
feb57d630ade4f4d7aefdadbe2f5755982d89a54 | 127 | py | Python | src/unicef_security/apps.py | unicef/unicef-security | cc51ba52cddb845b8174cf3dc94706f0334453b2 | [
"Apache-2.0"
] | null | null | null | src/unicef_security/apps.py | unicef/unicef-security | cc51ba52cddb845b8174cf3dc94706f0334453b2 | [
"Apache-2.0"
] | 10 | 2019-04-24T14:33:49.000Z | 2020-12-19T01:07:06.000Z | src/unicef_security/apps.py | unicef/unicef-security | cc51ba52cddb845b8174cf3dc94706f0334453b2 | [
"Apache-2.0"
] | 1 | 2019-04-11T15:34:18.000Z | 2019-04-11T15:34:18.000Z | from django.apps import AppConfig
class Config(AppConfig):
name = 'unicef_security'
verbose_name = "UNICEF Security"
| 18.142857 | 36 | 0.740157 | 90 | 0.708661 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.267717 |
feb6feac24e99949d73380d3a6510ebf108ac24b | 229 | py | Python | utils/pretty-tests.py | isJuhn/pcsx2_ipc | 51f92d51aec05dffa82d418c97fc1d628b2ed40f | [
"MIT"
] | 7 | 2021-07-09T20:23:19.000Z | 2022-03-14T06:56:14.000Z | utils/pretty-tests.py | isJuhn/pcsx2_ipc | 51f92d51aec05dffa82d418c97fc1d628b2ed40f | [
"MIT"
] | 2 | 2021-03-07T16:14:44.000Z | 2021-03-30T07:48:05.000Z | utils/pretty-tests.py | isJuhn/pcsx2_ipc | 51f92d51aec05dffa82d418c97fc1d628b2ed40f | [
"MIT"
] | 1 | 2021-03-07T15:59:31.000Z | 2021-03-07T15:59:31.000Z | import json
import sys
f=open(sys.argv[1])
y = json.loads(f.read())
print("Tests results: " + str(y["result"]))
print("Tests duration: " + str(y["duration"]))
print("Tests output:\n~~~~~~~~~~~~~~~~~~~~\n" + str(y["stdout"]))
| 25.444444 | 66 | 0.576419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.436681 |
feb7b66503cd218d51059640f9914912cefb66a6 | 14,533 | py | Python | tests/scripts/thread-cert/test_network_layer.py | AdityaHPatwardhan/openthread | a201e9d5d0273bb51fa20efc8758be20a725018e | [
"BSD-3-Clause"
] | 2,962 | 2016-05-11T15:06:06.000Z | 2022-03-27T20:06:16.000Z | tests/scripts/thread-cert/test_network_layer.py | AdityaHPatwardhan/openthread | a201e9d5d0273bb51fa20efc8758be20a725018e | [
"BSD-3-Clause"
] | 5,899 | 2016-05-11T19:21:49.000Z | 2022-03-31T18:17:20.000Z | tests/scripts/thread-cert/test_network_layer.py | AdityaHPatwardhan/openthread | a201e9d5d0273bb51fa20efc8758be20a725018e | [
"BSD-3-Clause"
] | 1,113 | 2016-05-11T15:37:42.000Z | 2022-03-31T09:37:04.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | 29.538618 | 103 | 0.718021 | 11,562 | 0.795569 | 0 | 0 | 0 | 0 | 0 | 0 | 2,076 | 0.142847 |
feb8045cb4a0a0c1c1b374f1a7ddff3513dfcc95 | 7,079 | py | Python | salt/modules/kernelpkg_linux_apt.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 9,425 | 2015-01-01T05:59:24.000Z | 2022-03-31T20:44:05.000Z | salt/modules/kernelpkg_linux_apt.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 33,507 | 2015-01-01T00:19:56.000Z | 2022-03-31T23:48:20.000Z | salt/modules/kernelpkg_linux_apt.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 5,810 | 2015-01-01T19:11:45.000Z | 2022-03-31T02:37:20.000Z | """
Manage Linux kernel packages on APT-based systems
"""
import functools
import logging
import re
try:
from salt.utils.versions import LooseVersion as _LooseVersion
from salt.exceptions import CommandExecutionError
HAS_REQUIRED_LIBS = True
except ImportError:
HAS_REQUIRED_LIBS = False
log = loggin... | 24.49481 | 98 | 0.638932 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,036 | 0.570137 |
feb9338f0d564ca62f3ee051a6a33301b2ea1017 | 1,818 | py | Python | main.py | david-slatinek/running-a-program-on-the-CPU-vs.-on-the-GPU | 971b911efee8f52c5950ba777b79e58a4f840024 | [
"Apache-2.0"
] | null | null | null | main.py | david-slatinek/running-a-program-on-the-CPU-vs.-on-the-GPU | 971b911efee8f52c5950ba777b79e58a4f840024 | [
"Apache-2.0"
] | null | null | null | main.py | david-slatinek/running-a-program-on-the-CPU-vs.-on-the-GPU | 971b911efee8f52c5950ba777b79e58a4f840024 | [
"Apache-2.0"
] | null | null | null | import json
import numpy as np
from numba import jit
from timeit import default_timer as timer
# Constant, used in the formula.
# Defined here to speed up the calculation, i.e. it's calculated only once
# and then placed in the formula.
SQRT_2PI = np.float32(np.sqrt(2 * np.pi))
# This function will run on the CPU.
d... | 25.605634 | 98 | 0.633663 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 733 | 0.40319 |
feb98f525f627b833eb5f7cdfb89e344a5f06574 | 103 | py | Python | src/jj_analyzer/__init__.py | ninetymiles/jj-logcat-analyzer | d4ae0fddfefc303ae9c17e6c9e08aad6a231e036 | [
"Apache-1.1"
] | null | null | null | src/jj_analyzer/__init__.py | ninetymiles/jj-logcat-analyzer | d4ae0fddfefc303ae9c17e6c9e08aad6a231e036 | [
"Apache-1.1"
] | null | null | null | src/jj_analyzer/__init__.py | ninetymiles/jj-logcat-analyzer | d4ae0fddfefc303ae9c17e6c9e08aad6a231e036 | [
"Apache-1.1"
] | null | null | null | #! /usr/bin/python
import sys
if sys.version_info[0] == 3:
from .__main__ import *
else:
pass | 12.875 | 28 | 0.640777 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.174757 |
227dbc607b392dad80b7a078ce5ee4e6eb5704f6 | 5,605 | py | Python | utility_functions.py | Team-501-The-PowerKnights/Powerknights-Slack-Bot | 1ce25c954aa0c089aa93a3d63bd475d585d39bb6 | [
"Apache-2.0"
] | 1 | 2019-05-03T13:20:09.000Z | 2019-05-03T13:20:09.000Z | utility_functions.py | Team-501-The-PowerKnights/Powerknights-Slack-Bot | 1ce25c954aa0c089aa93a3d63bd475d585d39bb6 | [
"Apache-2.0"
] | 8 | 2019-05-04T17:06:21.000Z | 2020-05-29T12:37:06.000Z | utility_functions.py | Team-501-The-PowerKnights/Powerknights-Slack-Bot | 1ce25c954aa0c089aa93a3d63bd475d585d39bb6 | [
"Apache-2.0"
] | null | null | null | import datetime
def iso_extract_info(string):
"""
Will get all of the info and return it as an array
:param string: ISO formatted string that will be used for extraction
:return: array [year, month, day, military_time_hour, minutes, hours]
:note: every item is an int except for minutes
... | 31.846591 | 106 | 0.662979 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,221 | 0.396253 |
228079c406da2849bf07a999b9fbe4042daf4300 | 1,424 | py | Python | python/ch_06_Animatronic_Head.py | tallamjr/mbms | 6763faa870d1a16f272b3eade70b433ed3df0e51 | [
"MIT"
] | 18 | 2018-06-07T07:11:59.000Z | 2022-02-28T20:08:23.000Z | python/ch_06_Animatronic_Head.py | tallamjr/mbms | 6763faa870d1a16f272b3eade70b433ed3df0e51 | [
"MIT"
] | 1 | 2020-05-20T16:24:24.000Z | 2020-05-21T09:03:24.000Z | python/ch_06_Animatronic_Head.py | tallamjr/mbms | 6763faa870d1a16f272b3eade70b433ed3df0e51 | [
"MIT"
] | 8 | 2019-04-10T16:04:11.000Z | 2022-01-08T20:39:15.000Z | from microbit import *
import random, speech, radio
eye_angles = [50, 140, 60, 90, 140]
radio.off()
sentences = [
"Hello my name is Mike",
"What is your name",
"I am looking at you",
"Exterminate exterminate exterminate",
"Number Five is alive",
"I cant do that Dave",
"daisee daisee give ... | 21.575758 | 67 | 0.525281 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 328 | 0.230337 |
22807a6716e561a1f502377b8a28eba78ad26040 | 322 | py | Python | debugtalk.py | caoyp2/HRunDemo | 41810a2fd366c780ea8f2bf9b4328fdd60aba171 | [
"Apache-2.0"
] | null | null | null | debugtalk.py | caoyp2/HRunDemo | 41810a2fd366c780ea8f2bf9b4328fdd60aba171 | [
"Apache-2.0"
] | null | null | null | debugtalk.py | caoyp2/HRunDemo | 41810a2fd366c780ea8f2bf9b4328fdd60aba171 | [
"Apache-2.0"
] | null | null | null | import datetime
import time
def sleep(n_secs):
time.sleep(n_secs)
def get_timestamp():
dtime = datetime.datetime.now()
un_time = time.mktime(dtime.timetuple())
return str(un_time)
def print_docId(docId):
print(docId)
def print_phonepass(phone,password):
print(phone + "---------" + password)... | 16.947368 | 44 | 0.677019 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.034161 |
228122dba71ea421f33f3e5c51b862184d5fc4c8 | 205 | py | Python | hubcare/metrics/community_metrics/issue_template/urls.py | aleronupe/2019.1-hubcare-api | 3f031eac9559a10fdcf70a88ee4c548cf93e4ac2 | [
"MIT"
] | 7 | 2019-03-31T17:58:45.000Z | 2020-02-29T22:44:27.000Z | hubcare/metrics/community_metrics/issue_template/urls.py | aleronupe/2019.1-hubcare-api | 3f031eac9559a10fdcf70a88ee4c548cf93e4ac2 | [
"MIT"
] | 90 | 2019-03-26T01:14:54.000Z | 2021-06-10T21:30:25.000Z | hubcare/metrics/community_metrics/issue_template/urls.py | aleronupe/2019.1-hubcare-api | 3f031eac9559a10fdcf70a88ee4c548cf93e4ac2 | [
"MIT"
] | null | null | null | from django.urls import path
from issue_template.views import IssueTemplateView
urlpatterns = [
path(
'<str:owner>/<str:repo>/<str:token_auth>/',
IssueTemplateView.as_view()
),
]
| 18.636364 | 51 | 0.668293 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.204878 |
2283023fbf32c038ed31074c2a312a5a7aa70d38 | 5,248 | py | Python | src/hammer-vlsi/technology/sky130/sram_compiler/__init__.py | httpsgithu/hammer | 6099f4169a49f71cee2e24bb1052f273039505cd | [
"BSD-3-Clause"
] | 138 | 2017-08-15T18:56:55.000Z | 2022-03-29T05:23:37.000Z | src/hammer-vlsi/technology/sky130/sram_compiler/__init__.py | httpsgithu/hammer | 6099f4169a49f71cee2e24bb1052f273039505cd | [
"BSD-3-Clause"
] | 444 | 2017-09-11T01:15:37.000Z | 2022-03-31T17:30:33.000Z | src/hammer-vlsi/technology/sky130/sram_compiler/__init__.py | httpsgithu/hammer | 6099f4169a49f71cee2e24bb1052f273039505cd | [
"BSD-3-Clause"
] | 33 | 2017-10-30T14:23:53.000Z | 2022-03-25T01:36:13.000Z |
import os, tempfile, subprocess
from hammer_vlsi import MMMCCorner, MMMCCornerType, HammerTool, HammerToolStep, HammerSRAMGeneratorTool, SRAMParameters
from hammer_vlsi.units import VoltageValue, TemperatureValue
from hammer_tech import Library, ExtraLibrary
from typing import NamedTuple, Dict, Any, List
from abc imp... | 51.960396 | 126 | 0.582127 | 4,872 | 0.928354 | 0 | 0 | 0 | 0 | 0 | 0 | 2,586 | 0.492759 |
2283626d76b9fe6781848e584e29b4b24ab5e062 | 2,837 | py | Python | Section 4/nlp-4-ngrams.py | PacktPublishing/Hands-on-NLP-with-NLTK-and-scikit-learn- | 8bb2095093a822363675368a4216d30d14cac501 | [
"MIT"
] | 34 | 2018-08-14T09:59:13.000Z | 2021-11-08T13:12:50.000Z | Section 4/nlp-4-ngrams.py | anapatgl/Hands-on-NLP-with-NLTK-and-scikit-learn- | 8bb2095093a822363675368a4216d30d14cac501 | [
"MIT"
] | 1 | 2018-11-28T19:20:37.000Z | 2018-11-28T19:20:37.000Z | Section 4/nlp-4-ngrams.py | anapatgl/Hands-on-NLP-with-NLTK-and-scikit-learn- | 8bb2095093a822363675368a4216d30d14cac501 | [
"MIT"
] | 31 | 2018-08-07T07:34:33.000Z | 2022-03-15T08:50:44.000Z | import collections
import nltk
import os
from sklearn import (
datasets, model_selection, feature_extraction, linear_model, naive_bayes,
ensemble
)
def extract_features(corpus):
'''Extract TF-IDF features from corpus'''
sa_stop_words = nltk.corpus.stopwords.words("english")
# words that might in... | 36.844156 | 90 | 0.70638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 903 | 0.318294 |
2283d1768504ac50dd9ea43fb4e940fbaf88eee6 | 649 | py | Python | code/gcd_sequence/sol_443.py | bhavinjawade/project-euler-solutions | 56bf6a282730ed4b9b875fa081cf4509d9939d98 | [
"Apache-2.0"
] | 2 | 2020-07-16T08:16:32.000Z | 2020-10-01T07:16:48.000Z | code/gcd_sequence/sol_443.py | Psingh12354/project-euler-solutions | 56bf6a282730ed4b9b875fa081cf4509d9939d98 | [
"Apache-2.0"
] | null | null | null | code/gcd_sequence/sol_443.py | Psingh12354/project-euler-solutions | 56bf6a282730ed4b9b875fa081cf4509d9939d98 | [
"Apache-2.0"
] | 1 | 2021-05-07T18:06:08.000Z | 2021-05-07T18:06:08.000Z |
# -*- coding: utf-8 -*-
'''
File name: code\gcd_sequence\sol_443.py
Author: Vaidic Joshi
Date created: Oct 20, 2018
Python Version: 3.x
'''
# Solution to Project Euler Problem #443 :: GCD sequence
#
# For more information see:
# https://projecteuler.net/problem=443
# Problem Statement
'''
Let g(n) ... | 17.540541 | 62 | 0.644068 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 636 | 0.97546 |
22849e131dffff72236a4d1d46cddf477f92bab9 | 2,823 | py | Python | src/collectors/rabbitmq/rabbitmq.py | lreed/Diamond | 2772cdbc27a7ba3fedeb6d4241aeee9d2fcbdb80 | [
"MIT"
] | null | null | null | src/collectors/rabbitmq/rabbitmq.py | lreed/Diamond | 2772cdbc27a7ba3fedeb6d4241aeee9d2fcbdb80 | [
"MIT"
] | null | null | null | src/collectors/rabbitmq/rabbitmq.py | lreed/Diamond | 2772cdbc27a7ba3fedeb6d4241aeee9d2fcbdb80 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Collects data from RabbitMQ through the admin interface
#### Notes
* if two vhosts have the queues with the same name, the metrics will collide
#### Dependencies
* pyrabbit
"""
import diamond.collector
try:
from numbers import Number
Number # workaround for pyflakes issue #13
im... | 30.031915 | 78 | 0.54729 | 2,444 | 0.865746 | 0 | 0 | 0 | 0 | 0 | 0 | 728 | 0.257882 |
2284b104a47dc324bd27f42ce83e41850b152d6c | 27,170 | py | Python | nemo/collections/tts/torch/data.py | MalikIdreesHasanKhan/NeMo | 984fd34921e81659c4594a22ab142311808b3bb7 | [
"Apache-2.0"
] | 4,145 | 2019-09-13T08:29:43.000Z | 2022-03-31T18:31:44.000Z | nemo/collections/tts/torch/data.py | MalikIdreesHasanKhan/NeMo | 984fd34921e81659c4594a22ab142311808b3bb7 | [
"Apache-2.0"
] | 2,031 | 2019-09-17T16:51:39.000Z | 2022-03-31T23:52:41.000Z | nemo/collections/tts/torch/data.py | MalikIdreesHasanKhan/NeMo | 984fd34921e81659c4594a22ab142311808b3bb7 | [
"Apache-2.0"
] | 1,041 | 2019-09-13T10:08:21.000Z | 2022-03-30T06:37:38.000Z | # Copyright (c) 2021, NVIDIA CORPORATION & 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 42.386895 | 147 | 0.61325 | 25,649 | 0.94395 | 0 | 0 | 0 | 0 | 0 | 0 | 7,154 | 0.263286 |
2284c119fbaa59ef00a4dd53417eccef839221b3 | 1,140 | py | Python | anmotordesign/server.py | MarkWengSTR/ansys-maxwell-online | f9bbc535c7637d8f34abb241acfb97d1bdbe4103 | [
"MIT"
] | 8 | 2021-01-25T11:17:32.000Z | 2022-03-29T05:34:47.000Z | anmotordesign/server.py | MarkWengSTR/ansys-maxwell-online | f9bbc535c7637d8f34abb241acfb97d1bdbe4103 | [
"MIT"
] | 1 | 2021-06-14T18:40:16.000Z | 2021-08-25T14:37:21.000Z | anmotordesign/server.py | MarkWengSTR/ansys-maxwell-online | f9bbc535c7637d8f34abb241acfb97d1bdbe4103 | [
"MIT"
] | 8 | 2020-09-25T15:40:07.000Z | 2022-03-29T05:34:48.000Z | from flask import Flask, request, jsonify
from flask_cors import CORS
from run import run_ansys
from api.validate import spec_present, data_type_validate, spec_keys_validate, ansys_overload_check
ansys_processing_count = 0
# debug
# import ipdb; ipdb.set_trace()
app = Flask(__name__)
CORS(app) # local development co... | 25.909091 | 99 | 0.62193 | 0 | 0 | 0 | 0 | 735 | 0.644737 | 0 | 0 | 242 | 0.212281 |
2284f5a8afa9699354bd56f97faf33c044aeae81 | 160 | py | Python | cnn/donas_utils/dataset/__init__.py | eric8607242/darts | 34c79a0956039f56a6a87bfb7f4b1ae2af615bea | [
"Apache-2.0"
] | null | null | null | cnn/donas_utils/dataset/__init__.py | eric8607242/darts | 34c79a0956039f56a6a87bfb7f4b1ae2af615bea | [
"Apache-2.0"
] | null | null | null | cnn/donas_utils/dataset/__init__.py | eric8607242/darts | 34c79a0956039f56a6a87bfb7f4b1ae2af615bea | [
"Apache-2.0"
] | null | null | null | from .dataset import get_cifar100, get_cifar10, get_imagenet_lmdb, get_imagenet
__all__ = ["get_cifar100", "get_cifar10", "get_imagenet_lmdb", "get_imagenet"]
| 40 | 79 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.375 |
2285470cfe61c3208efb829c668012f4eb4c042d | 196 | py | Python | classifier/cross_validation.py | ahmdrz/spam-classifier | a9cc3916a7c22545c82f0bfae7e4b95f3b36248f | [
"MIT"
] | 1 | 2019-08-05T12:02:53.000Z | 2019-08-05T12:02:53.000Z | classifier/cross_validation.py | ahmdrz/spam-classifier | a9cc3916a7c22545c82f0bfae7e4b95f3b36248f | [
"MIT"
] | null | null | null | classifier/cross_validation.py | ahmdrz/spam-classifier | a9cc3916a7c22545c82f0bfae7e4b95f3b36248f | [
"MIT"
] | null | null | null | from sklearn.model_selection import KFold
def kfold_cross_validation(data, k=10):
kfold = KFold(n_splits=k)
for train, test in kfold.split(data):
yield data[train], data[test] | 32.666667 | 41 | 0.704082 | 0 | 0 | 149 | 0.760204 | 0 | 0 | 0 | 0 | 0 | 0 |
2285d8fefdc5efe988f942a7eb7b3f78ecd84063 | 310 | py | Python | category/models.py | captainxavier/AutoBlog | 44fb23628fe0210a3dcec80b91e1217d27ee9462 | [
"MIT"
] | null | null | null | category/models.py | captainxavier/AutoBlog | 44fb23628fe0210a3dcec80b91e1217d27ee9462 | [
"MIT"
] | null | null | null | category/models.py | captainxavier/AutoBlog | 44fb23628fe0210a3dcec80b91e1217d27ee9462 | [
"MIT"
] | null | null | null | from django.db import models
class Category(models.Model):
title = models.CharField(max_length=20)
class Meta:
db_table = 'category'
verbose_name = ("Category")
verbose_name_plural = ("Categories")
def __str__(self):
return self.title
| 15.5 | 45 | 0.590323 | 262 | 0.845161 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.103226 |
228727092b8b8c1cbde1234be034bd7032daae7a | 1,488 | py | Python | admin_tools/urls.py | aucoeur/WeVoteServer | 7b30bdbb59d6e0c19abc81237aa42fba7de1a432 | [
"MIT"
] | 44 | 2015-11-19T04:52:39.000Z | 2021-03-17T02:08:26.000Z | admin_tools/urls.py | aucoeur/WeVoteServer | 7b30bdbb59d6e0c19abc81237aa42fba7de1a432 | [
"MIT"
] | 748 | 2015-09-03T04:18:33.000Z | 2022-03-10T14:08:10.000Z | admin_tools/urls.py | aucoeur/WeVoteServer | 7b30bdbb59d6e0c19abc81237aa42fba7de1a432 | [
"MIT"
] | 145 | 2015-09-19T10:10:44.000Z | 2022-03-04T21:01:12.000Z | # admin_tools/urls.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from django.conf.urls import re_path
from . import views
urlpatterns = [
re_path(r'^$', views.admin_home_view, name='admin_home',),
re_path(r'^data_cleanup/$', views.data_cleanup_view, name='data_cleanup'),
re_path(r'^dat... | 55.111111 | 108 | 0.78293 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 694 | 0.466398 |
22875dd3eed7789c404cf71dae058c78660c2f50 | 3,414 | py | Python | hippynn/graphs/nodes/base/multi.py | tautomer/hippynn | df4504a5ea4680cfc61f490984dcddeac7ed99ee | [
"BSD-3-Clause"
] | 21 | 2021-11-17T00:56:35.000Z | 2022-03-22T05:57:11.000Z | hippynn/graphs/nodes/base/multi.py | tautomer/hippynn | df4504a5ea4680cfc61f490984dcddeac7ed99ee | [
"BSD-3-Clause"
] | 4 | 2021-12-17T16:16:53.000Z | 2022-03-16T23:50:38.000Z | hippynn/graphs/nodes/base/multi.py | tautomer/hippynn | df4504a5ea4680cfc61f490984dcddeac7ed99ee | [
"BSD-3-Clause"
] | 6 | 2021-11-30T21:09:31.000Z | 2022-03-18T07:07:32.000Z | """
A base node that provides several output tensors.
"""
from ....layers.algebra import Idx
from .base import SingleNode, Node
from .. import _debprint
from ...indextypes import IdxType
class IndexNode(SingleNode):
_input_names = ("parent",)
def __init__(self, name, parents, index, index_state=None):
... | 38.795455 | 110 | 0.626245 | 3,221 | 0.943468 | 0 | 0 | 171 | 0.050088 | 0 | 0 | 576 | 0.168717 |
22881ed2f077cedcedaa10dbf83c13905a622021 | 113 | py | Python | main_module/__init__.py | JohanNicander/python-test-architecture | 2418f861cb46c3fccaa21be94ee92c5862985a15 | [
"Apache-2.0"
] | null | null | null | main_module/__init__.py | JohanNicander/python-test-architecture | 2418f861cb46c3fccaa21be94ee92c5862985a15 | [
"Apache-2.0"
] | null | null | null | main_module/__init__.py | JohanNicander/python-test-architecture | 2418f861cb46c3fccaa21be94ee92c5862985a15 | [
"Apache-2.0"
] | null | null | null | from .zero import zero
from main_module._unittester import UnitTester
test = UnitTester(__name__)
del UnitTester | 22.6 | 46 | 0.840708 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
228856c2bad586d523ebf387bffc058ae9b589d7 | 4,151 | py | Python | barber/cutter.py | LSSTDESC/barber | 9dbe69e69a078ef3b70a316807517e2a4d4e60cd | [
"MIT"
] | null | null | null | barber/cutter.py | LSSTDESC/barber | 9dbe69e69a078ef3b70a316807517e2a4d4e60cd | [
"MIT"
] | 6 | 2020-04-28T15:20:08.000Z | 2020-04-28T15:37:02.000Z | barber/cutter.py | LSSTDESC/barber | 9dbe69e69a078ef3b70a316807517e2a4d4e60cd | [
"MIT"
] | null | null | null | import numpy as np
import numpy.random as npr
import scipy.optimize as spo
import tomo_challenge.metrics as tcm
# custom data type, could be replaced with/tie in to tree.py class
# cut_vals is (nfeat, nbins - 1) numpy array, float
# tree_ids is ((nbins,) * nfeat) numpy array, int
TreePars = namedtuple('TreePars', ['cu... | 35.478632 | 261 | 0.685859 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,538 | 0.611419 |
2288f93227622fced04679bfe49afbad16de4e0a | 480 | py | Python | examples/transfer/highscore.py | coding-world/matrix_max7219 | 3126604ee400a9ec1d25797f6957a2eae8a3f33c | [
"MIT"
] | null | null | null | examples/transfer/highscore.py | coding-world/matrix_max7219 | 3126604ee400a9ec1d25797f6957a2eae8a3f33c | [
"MIT"
] | null | null | null | examples/transfer/highscore.py | coding-world/matrix_max7219 | 3126604ee400a9ec1d25797f6957a2eae8a3f33c | [
"MIT"
] | null | null | null | import shelve
regal = shelve.open('score.txt')
def updateScore(neuerScore):
if('score' in regal):
score = regal['score']
if(neuerScore not in score):
score.insert(0, neuerScore)
score.sort()
ranking = score.index(neuerScore)
ranking = len(score)-ranking
else:
score = [neuerScore]
... | 20 | 46 | 0.66875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.110417 |
22896fc7355f1baa1a7f7d9e3165cdfe2c0b6611 | 165 | py | Python | src/node/ext/ldap/scope.py | enfold/node.ext.ldap | 28127057be6ba3092389f3c920575292d43d9f94 | [
"BSD-2-Clause"
] | 3 | 2016-04-22T00:37:17.000Z | 2020-04-03T07:14:54.000Z | src/node/ext/ldap/scope.py | enfold/node.ext.ldap | 28127057be6ba3092389f3c920575292d43d9f94 | [
"BSD-2-Clause"
] | 51 | 2015-02-10T11:14:01.000Z | 2021-05-05T11:06:59.000Z | src/node/ext/ldap/scope.py | enfold/node.ext.ldap | 28127057be6ba3092389f3c920575292d43d9f94 | [
"BSD-2-Clause"
] | 12 | 2016-08-09T09:39:35.000Z | 2020-04-18T14:53:56.000Z | # -*- coding: utf-8 -*-
import ldap
BASE = ldap.SCOPE_BASE
ONELEVEL = ldap.SCOPE_ONELEVEL
SUBTREE = ldap.SCOPE_SUBTREE
SCOPES = [BASE, ONELEVEL, SUBTREE]
del ldap
| 16.5 | 34 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.139394 |
2289dcddf267c6a1a0e8cb907450531ad79de492 | 493 | py | Python | urban-sound-classification/feature_merge.py | tensorflow-korea/tfk-notebooks | 67831acce7f435500377bf03e6bd9d15fdd5f1bc | [
"MIT"
] | 50 | 2016-06-18T12:52:29.000Z | 2021-12-10T07:13:20.000Z | urban-sound-classification/feature_merge.py | tensorflow-korea/tfk-notebooks | 67831acce7f435500377bf03e6bd9d15fdd5f1bc | [
"MIT"
] | null | null | null | urban-sound-classification/feature_merge.py | tensorflow-korea/tfk-notebooks | 67831acce7f435500377bf03e6bd9d15fdd5f1bc | [
"MIT"
] | 51 | 2016-04-30T16:38:05.000Z | 2021-01-15T18:12:03.000Z | import glob
import numpy as np
X = np.empty((0, 193))
y = np.empty((0, 10))
groups = np.empty((0, 1))
npz_files = glob.glob('./urban_sound_?.npz')
for fn in npz_files:
print(fn)
data = np.load(fn)
X = np.append(X, data['X'], axis=0)
y = np.append(y, data['y'], axis=0)
groups = np.append(groups, dat... | 22.409091 | 54 | 0.602434 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.097363 |
228ad78fbc730707861e4c8d9c262be93d22bf72 | 485 | py | Python | program/program/trackers/TrackerCorrelation.py | JankaSvK/thesis | c440ab8242b058f580fdf9d5a1d00708a1696561 | [
"MIT"
] | 1 | 2018-11-29T14:13:47.000Z | 2018-11-29T14:13:47.000Z | program/program/trackers/TrackerCorrelation.py | JankaSvK/thesis | c440ab8242b058f580fdf9d5a1d00708a1696561 | [
"MIT"
] | 3 | 2018-04-24T18:30:00.000Z | 2018-05-11T23:25:07.000Z | program/program/trackers/TrackerCorrelation.py | JankaSvK/thesis | c440ab8242b058f580fdf9d5a1d00708a1696561 | [
"MIT"
] | null | null | null | import dlib
class CorrelationTracker(object):
def init(self, image, bbox):
self.tracker = dlib.correlation_tracker()
x, y, x2, y2 = bbox
x2 += x
y2 += y
self.tracker.start_track(image, dlib.rectangle(x, y, x2, y2))
return True
def update(self, image):
s... | 28.529412 | 96 | 0.585567 | 470 | 0.969072 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
228b1c94896beb15138918d15679461767abdb01 | 3,238 | py | Python | examples/nlp/language_modeling/megatron_gpt_ckpt_to_nemo.py | rilango/NeMo | 6f23ff725c596f25fab6043d95e7c0b4a5f56331 | [
"Apache-2.0"
] | null | null | null | examples/nlp/language_modeling/megatron_gpt_ckpt_to_nemo.py | rilango/NeMo | 6f23ff725c596f25fab6043d95e7c0b4a5f56331 | [
"Apache-2.0"
] | null | null | null | examples/nlp/language_modeling/megatron_gpt_ckpt_to_nemo.py | rilango/NeMo | 6f23ff725c596f25fab6043d95e7c0b4a5f56331 | [
"Apache-2.0"
] | 1 | 2021-12-07T08:15:36.000Z | 2021-12-07T08:15:36.000Z | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 37.218391 | 218 | 0.734713 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,325 | 0.409203 |
228b861994dfd3c8d5b7524f5b44ae49bacc2148 | 6,007 | py | Python | sdk/python/pulumi_aws/apigateway/api_key.py | dixler/pulumi-aws | 88838ed6d412c092717a916b0b5b154f68226c3a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/apigateway/api_key.py | dixler/pulumi-aws | 88838ed6d412c092717a916b0b5b154f68226c3a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/apigateway/api_key.py | dixler/pulumi-aws | 88838ed6d412c092717a916b0b5b154f68226c3a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class ApiKey... | 45.507576 | 170 | 0.662227 | 5,697 | 0.948394 | 0 | 0 | 1,966 | 0.327285 | 0 | 0 | 3,470 | 0.577659 |
228b9e5c3d1a55dd867bb42f9e9fbbc7ed2e9fc5 | 10,684 | py | Python | SROMPy/optimize/ObjectiveFunction.py | jwarner308/SROMPy | 12007e4cd99c88446f10974a93050405c5cd925b | [
"Apache-2.0"
] | 23 | 2018-05-13T05:13:03.000Z | 2022-01-29T19:43:28.000Z | SROMPy/optimize/ObjectiveFunction.py | jwarner308/SROMPy | 12007e4cd99c88446f10974a93050405c5cd925b | [
"Apache-2.0"
] | 11 | 2018-03-28T13:13:44.000Z | 2022-03-30T18:56:57.000Z | SROMPy/optimize/ObjectiveFunction.py | jwarner308/SROMPy | 12007e4cd99c88446f10974a93050405c5cd925b | [
"Apache-2.0"
] | 19 | 2018-06-01T14:49:30.000Z | 2022-03-05T05:02:06.000Z | # Copyright 2018 United States Government as represented by the Administrator of
# the National Aeronautics and Space Administration. No copyright is claimed in
# the United States under Title 17, U.S. Code. All Other Rights Reserved.
# The Stochastic Reduced Order Models with Python (SROMPy) platform is licensed
# un... | 37.356643 | 80 | 0.624579 | 9,726 | 0.910333 | 0 | 0 | 0 | 0 | 0 | 0 | 4,584 | 0.429053 |
228bb0a969acb617ccc7d0b12b1281bd81283a5f | 4,016 | py | Python | test/utils.py | vasili-v/distcovery | e07882d55ebe2e4fd78a720764803e6b3e8cbc7d | [
"MIT"
] | null | null | null | test/utils.py | vasili-v/distcovery | e07882d55ebe2e4fd78a720764803e6b3e8cbc7d | [
"MIT"
] | null | null | null | test/utils.py | vasili-v/distcovery | e07882d55ebe2e4fd78a720764803e6b3e8cbc7d | [
"MIT"
] | null | null | null | import os
import errno
import sys
def mock_directory_tree(tree):
tree = dict([(os.path.join(*key), value) \
for key, value in tree.iteritems()])
def listdir(path):
try:
names = tree[path]
except KeyError:
raise OSError(errno.ENOENT, os.strerror(err... | 36.844037 | 80 | 0.493775 | 3,221 | 0.802042 | 0 | 0 | 0 | 0 | 0 | 0 | 1,169 | 0.291086 |
228d76877f0d9f67ffc6dc7483c7c0a95962b0f9 | 864 | py | Python | var/spack/repos/builtin/packages/perl-ipc-run/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2020-10-15T01:08:42.000Z | 2021-10-18T01:28:18.000Z | var/spack/repos/builtin/packages/perl-ipc-run/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2019-07-30T10:12:28.000Z | 2019-12-17T09:02:27.000Z | var/spack/repos/builtin/packages/perl-ipc-run/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 5 | 2019-07-30T09:42:14.000Z | 2021-01-25T05:39:20.000Z | # Copyright 2013-2019 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 PerlIpcRun(PerlPackage):
"""IPC::Run allows you to run and interact with child processes u... | 39.272727 | 100 | 0.730324 | 643 | 0.744213 | 0 | 0 | 0 | 0 | 0 | 0 | 691 | 0.799769 |
228d8328feac3519c1eb966b9a43a964120c8c6c | 1,369 | py | Python | tests/test_parser_create_site_users.py | WillAyd/tabcmd | 1ba4a6ce1586b5ec4286aca0edff0fbaa1c69f15 | [
"MIT"
] | null | null | null | tests/test_parser_create_site_users.py | WillAyd/tabcmd | 1ba4a6ce1586b5ec4286aca0edff0fbaa1c69f15 | [
"MIT"
] | null | null | null | tests/test_parser_create_site_users.py | WillAyd/tabcmd | 1ba4a6ce1586b5ec4286aca0edff0fbaa1c69f15 | [
"MIT"
] | null | null | null | import sys
import unittest
try:
from unittest import mock
except ImportError:
import mock
import argparse
from tabcmd.parsers.create_site_users_parser import CreateSiteUsersParser
from .common_setup import *
commandname = 'createsiteusers'
class CreateSiteUsersParserTest(unittest.TestCase):
@classmethod... | 37 | 90 | 0.720964 | 1,117 | 0.815924 | 0 | 0 | 205 | 0.149744 | 0 | 0 | 125 | 0.091308 |
228e4efae17879a415faffa2bdf7cfbc08f32c9f | 1,078 | py | Python | secretsmanager_env.py | iarlyy/secretsmanager-env | 3a34a4e9561e4651fa2975ff6f32b00ef0c0ca73 | [
"MIT"
] | 1 | 2020-02-13T17:11:29.000Z | 2020-02-13T17:11:29.000Z | secretsmanager_env.py | iarlyy/secretsmanager-env | 3a34a4e9561e4651fa2975ff6f32b00ef0c0ca73 | [
"MIT"
] | null | null | null | secretsmanager_env.py | iarlyy/secretsmanager-env | 3a34a4e9561e4651fa2975ff6f32b00ef0c0ca73 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import argparse
import json
import os
import boto3
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
description='''\
Output following the defined format.
Options are:
dotenv - dotenv style [default]
export - shell export style
std... | 24.5 | 99 | 0.670686 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 354 | 0.328386 |
228e74b0f9248fe2ef101b86260ca316c5578c5c | 1,730 | py | Python | 109.py | juandarr/ProjectEuler | 951705ac62f550d7fbecdc3f35ab8c38b53b9225 | [
"MIT"
] | null | null | null | 109.py | juandarr/ProjectEuler | 951705ac62f550d7fbecdc3f35ab8c38b53b9225 | [
"MIT"
] | null | null | null | 109.py | juandarr/ProjectEuler | 951705ac62f550d7fbecdc3f35ab8c38b53b9225 | [
"MIT"
] | null | null | null | """
Finds the number of distinct ways a player can checkout a score less than 100
Author: Juan Rios
"""
import math
def checkout_solutions(checkout,sequence,idx_sq,d):
'''
returns the number of solution for a given checkout value
'''
counter = 0
for double in d:
if double>checkout:
... | 28.360656 | 128 | 0.540462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 266 | 0.153757 |
228e9262ba137f922fefb676a2a9e3eabc4bf87c | 804 | py | Python | src/tevatron/tevax/loss.py | vjeronymo2/tevatron | 7235b0823b5c3cdf1c8ce8f67cb5f1209218086a | [
"Apache-2.0"
] | 95 | 2021-09-16T00:35:17.000Z | 2022-03-31T04:59:05.000Z | src/tevatron/tevax/loss.py | vjeronymo2/tevatron | 7235b0823b5c3cdf1c8ce8f67cb5f1209218086a | [
"Apache-2.0"
] | 16 | 2021-10-05T12:29:33.000Z | 2022-03-31T17:59:20.000Z | src/tevatron/tevax/loss.py | vjeronymo2/tevatron | 7235b0823b5c3cdf1c8ce8f67cb5f1209218086a | [
"Apache-2.0"
] | 15 | 2021-09-19T02:20:03.000Z | 2022-03-10T03:00:23.000Z | import jax.numpy as jnp
from jax import lax
import optax
import chex
def _onehot(labels: chex.Array, num_classes: int) -> chex.Array:
x = labels[..., None] == jnp.arange(num_classes).reshape((1,) * labels.ndim + (-1,))
x = lax.select(x, jnp.ones(x.shape), jnp.zeros(x.shape))
return x.astype(jnp.float32)
... | 36.545455 | 108 | 0.690299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.00995 |
228eb608e052e061a5945151be48c2a98a56d133 | 1,758 | py | Python | setup.py | kinnala/gammy | 85237d424001f77f296d724c95c8dec5803a8e1e | [
"MIT"
] | null | null | null | setup.py | kinnala/gammy | 85237d424001f77f296d724c95c8dec5803a8e1e | [
"MIT"
] | null | null | null | setup.py | kinnala/gammy | 85237d424001f77f296d724c95c8dec5803a8e1e | [
"MIT"
] | null | null | null | import os
from setuptools import setup, find_packages
import versioneer
if __name__ == "__main__":
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
meta = {}
base_dir = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(base_dir, 'gammy', '_m... | 30.842105 | 75 | 0.513083 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 575 | 0.327076 |
228f917fd03d25566ca49e7918c233c48b585119 | 88 | py | Python | fast-ml/main.py | gabrielstork/fast-ml | ce93c1263970ce7b958e1c3e932c70909bcc0e31 | [
"Apache-2.0"
] | 1 | 2021-07-26T15:37:30.000Z | 2021-07-26T15:37:30.000Z | fast-ml/main.py | gabrielstork/fast-ml | ce93c1263970ce7b958e1c3e932c70909bcc0e31 | [
"Apache-2.0"
] | null | null | null | fast-ml/main.py | gabrielstork/fast-ml | ce93c1263970ce7b958e1c3e932c70909bcc0e31 | [
"Apache-2.0"
] | null | null | null | import root
if __name__ == '__main__':
window = root.Root()
window.mainloop()
| 12.571429 | 26 | 0.636364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.113636 |
2290a77719ce3ea48bd13dc7fb8b6642fe413085 | 144 | py | Python | application/recommendations/__init__.py | QualiChain/qualichain_backend | cc6dbf1ae5d09e8d01cccde94326563b25d28b58 | [
"MIT"
] | null | null | null | application/recommendations/__init__.py | QualiChain/qualichain_backend | cc6dbf1ae5d09e8d01cccde94326563b25d28b58 | [
"MIT"
] | null | null | null | application/recommendations/__init__.py | QualiChain/qualichain_backend | cc6dbf1ae5d09e8d01cccde94326563b25d28b58 | [
"MIT"
] | null | null | null | from flask import Blueprint
recommendation_blueprint = Blueprint('recommendations', __name__)
from application.recommendations import routes | 20.571429 | 65 | 0.847222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.118056 |
2290bfd1c4b65da8f41f786b9bf73bcded25e4b1 | 4,203 | py | Python | predictors/scene_predictor.py | XenonLamb/higan | 6e7b47f91df23d8d6075d95921e664c9fa4f1306 | [
"MIT"
] | 83 | 2020-03-11T21:20:59.000Z | 2022-03-17T10:08:27.000Z | predictors/scene_predictor.py | XenonLamb/higan | 6e7b47f91df23d8d6075d95921e664c9fa4f1306 | [
"MIT"
] | 8 | 2020-04-16T14:37:42.000Z | 2021-09-20T20:18:06.000Z | predictors/scene_predictor.py | billzhonggz/higan | 168f24f7e3969bc8dc580e2c997463e76644c17f | [
"MIT"
] | 19 | 2020-04-13T02:55:51.000Z | 2022-01-28T06:37:25.000Z | # python 3.7
"""Predicts the scene category, attribute."""
import numpy as np
from PIL import Image
import torch
import torch.nn.functional as F
import torchvision.transforms as transforms
from .base_predictor import BasePredictor
from .scene_wideresnet import resnet18
__all__ = ['ScenePredictor']
N... | 36.232759 | 79 | 0.647395 | 3,817 | 0.908161 | 0 | 0 | 0 | 0 | 0 | 0 | 758 | 0.180347 |
22915424775bb0c1cd95df8d2deeb30cca4451ba | 1,845 | py | Python | python_test.py | jackKiZhu/mypython | 43eac97bec07338ed3b8b9473d4e4fae26f7140c | [
"MIT"
] | null | null | null | python_test.py | jackKiZhu/mypython | 43eac97bec07338ed3b8b9473d4e4fae26f7140c | [
"MIT"
] | null | null | null | python_test.py | jackKiZhu/mypython | 43eac97bec07338ed3b8b9473d4e4fae26f7140c | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = "mysql://root:mysql@127.0.0.1:3306/python_github"
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = True
db = SQLAlchemy(app)
class User(db.Model):
id = db.Column(db... | 32.368421 | 95 | 0.614634 | 264 | 0.136858 | 0 | 0 | 1,287 | 0.667185 | 0 | 0 | 667 | 0.345775 |
2291547d5512bbb1bda47b665f654ae2a6cde5f2 | 652 | py | Python | src/etc/gec/3.py | iml1111/algorithm-study | f21f6f9f43235248f3496f034a899f2314ab6fcc | [
"MIT"
] | null | null | null | src/etc/gec/3.py | iml1111/algorithm-study | f21f6f9f43235248f3496f034a899f2314ab6fcc | [
"MIT"
] | null | null | null | src/etc/gec/3.py | iml1111/algorithm-study | f21f6f9f43235248f3496f034a899f2314ab6fcc | [
"MIT"
] | null | null | null | from collections import deque
def solution(N, bus_stop):
answer = [[1300 for _ in range(N)] for _ in range(N)]
bus_stop = [(x-1, y-1) for x,y in bus_stop]
q = deque(bus_stop)
for x,y in bus_stop:
answer[x][y] = 0
while q:
x, y = q.popleft()
for nx, ny in ((x-1, y), (x+1, y)... | 27.166667 | 63 | 0.45092 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.015337 |
2293c25414f578bb3829ecd6692177ce5d098784 | 1,218 | py | Python | python/tree/0103_binary_tree_zigzag_level_order_traversal.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 6 | 2019-07-15T13:23:57.000Z | 2020-01-22T03:12:01.000Z | python/tree/0103_binary_tree_zigzag_level_order_traversal.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | null | null | null | python/tree/0103_binary_tree_zigzag_level_order_traversal.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 1 | 2019-07-24T02:15:31.000Z | 2019-07-24T02:15:31.000Z | class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
def zigzagLevelOrder(self, root):
"""
:type root: TreeNode
:rtype: List[List[int]]
"""
if not root:
return []
... | 21 | 46 | 0.374384 | 917 | 0.752874 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.062397 |
22941cdcf437ea8fe9f771e15f228dacff7fbb5f | 5,452 | py | Python | plaso/parsers/winreg_plugins/usbstor.py | berggren/plaso | 2658c80c5076f97a9a27272e73997bde8c39e875 | [
"Apache-2.0"
] | 2 | 2020-02-09T01:11:08.000Z | 2021-09-17T04:16:31.000Z | plaso/parsers/winreg_plugins/usbstor.py | berggren/plaso | 2658c80c5076f97a9a27272e73997bde8c39e875 | [
"Apache-2.0"
] | null | null | null | plaso/parsers/winreg_plugins/usbstor.py | berggren/plaso | 2658c80c5076f97a9a27272e73997bde8c39e875 | [
"Apache-2.0"
] | 1 | 2021-03-17T09:47:01.000Z | 2021-03-17T09:47:01.000Z | # -*- coding: utf-8 -*-
"""File containing a Windows Registry plugin to parse the USBStor key."""
from __future__ import unicode_literals
from plaso.containers import events
from plaso.containers import time_events
from plaso.lib import definitions
from plaso.parsers import logger
from plaso.parsers import winreg
fro... | 37.6 | 80 | 0.716985 | 5,021 | 0.920946 | 0 | 0 | 0 | 0 | 0 | 0 | 1,674 | 0.307043 |
2298b7f13b630423d0c12d2422ae336ad2ea8774 | 71 | py | Python | damn_vulnerable_python/evil.py | CodyKochmann/damn_vulnerable_python | 8a90ee3b70dddae96f9f0a8500ed9ba5693f3082 | [
"MIT"
] | 1 | 2018-05-22T03:27:54.000Z | 2018-05-22T03:27:54.000Z | damn_vulnerable_python/evil.py | CodyKochmann/damn_vulnerable_python | 8a90ee3b70dddae96f9f0a8500ed9ba5693f3082 | [
"MIT"
] | 2 | 2018-05-22T02:04:39.000Z | 2018-05-22T12:46:31.000Z | damn_vulnerable_python/evil.py | CodyKochmann/damn_vulnerable_python | 8a90ee3b70dddae96f9f0a8500ed9ba5693f3082 | [
"MIT"
] | null | null | null | ''' static analyzers are annoying so lets rename eval '''
evil = eval
| 17.75 | 57 | 0.704225 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.802817 |
229d03edb58694ea053e0d0cf56108a3ca34b32c | 17,257 | py | Python | rltoolkit/rltoolkit/acm/off_policy/ddpg_acm.py | MIMUW-RL/spp-rl | 86b96cdd220cc4eae86f7cfd26924c69b498dcc6 | [
"MIT"
] | 7 | 2020-06-15T12:25:53.000Z | 2021-11-03T01:08:47.000Z | rltoolkit/rltoolkit/acm/off_policy/ddpg_acm.py | MIMUW-RL/spp-rl | 86b96cdd220cc4eae86f7cfd26924c69b498dcc6 | [
"MIT"
] | null | null | null | rltoolkit/rltoolkit/acm/off_policy/ddpg_acm.py | MIMUW-RL/spp-rl | 86b96cdd220cc4eae86f7cfd26924c69b498dcc6 | [
"MIT"
] | 1 | 2020-12-21T11:21:22.000Z | 2020-12-21T11:21:22.000Z | import numpy as np
import torch
from torch.nn import functional as F
from rltoolkit.acm.off_policy import AcMOffPolicy
from rltoolkit.algorithms import DDPG
from rltoolkit.algorithms.ddpg.models import Actor, Critic
class DDPG_AcM(AcMOffPolicy, DDPG):
def __init__(
self, unbiased_update: bool = False, cu... | 39.042986 | 157 | 0.589963 | 16,275 | 0.943096 | 0 | 0 | 0 | 0 | 0 | 0 | 2,994 | 0.173495 |
229f21bdd7be594d33b1093f3cb181d2690aa326 | 3,714 | py | Python | pyroute/poi_osm.py | ftrimble/route-grower | d4343ecc9b13a3e1701c8460c8a1792d08b74567 | [
"Apache-2.0"
] | null | null | null | pyroute/poi_osm.py | ftrimble/route-grower | d4343ecc9b13a3e1701c8460c8a1792d08b74567 | [
"Apache-2.0"
] | null | null | null | pyroute/poi_osm.py | ftrimble/route-grower | d4343ecc9b13a3e1701c8460c8a1792d08b74567 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#----------------------------------------------------------------
# OSM POI handler for pyroute
#
#------------------------------------------------------
# Copyright 2007, Oliver White
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publ... | 29.244094 | 74 | 0.630856 | 2,556 | 0.688207 | 0 | 0 | 0 | 0 | 0 | 0 | 1,431 | 0.385299 |
22a0ba4419e5d5479b0eea3b85e6ded458dffecb | 13,025 | py | Python | pelutils/logger.py | peleiden/pelutils | 9860734c0e06481aa58a9f767a4cfb5129cb48ec | [
"BSD-3-Clause"
] | 3 | 2021-02-28T13:03:12.000Z | 2022-01-01T09:53:33.000Z | pelutils/logger.py | peleiden/pelutils | 9860734c0e06481aa58a9f767a4cfb5129cb48ec | [
"BSD-3-Clause"
] | 72 | 2020-10-13T09:20:01.000Z | 2022-02-26T09:12:21.000Z | pelutils/logger.py | peleiden/pelutils | 9860734c0e06481aa58a9f767a4cfb5129cb48ec | [
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
import os
import traceback as tb
from collections import defaultdict
from enum import IntEnum
from functools import update_wrapper
from itertools import chain
from typing import Any, Callable, DefaultDict, Generator, Iterable, Optional
from pelutils import get_timestamp, get_repo
fro... | 36.080332 | 123 | 0.61666 | 12,233 | 0.939194 | 0 | 0 | 1,203 | 0.092361 | 0 | 0 | 2,716 | 0.208522 |
22a11f4324f76cab0ee6ba121cab810e162f6104 | 10,942 | py | Python | tests/test_metrics.py | aaxelb/django-elasticsearch-metrics | 8a02ffc57f57257843834d4f84c41480f4e27fbd | [
"MIT"
] | 5 | 2018-08-21T19:48:39.000Z | 2021-04-01T22:11:31.000Z | tests/test_metrics.py | aaxelb/django-elasticsearch-metrics | 8a02ffc57f57257843834d4f84c41480f4e27fbd | [
"MIT"
] | 18 | 2018-07-26T16:04:53.000Z | 2018-08-30T19:31:30.000Z | tests/test_metrics.py | aaxelb/django-elasticsearch-metrics | 8a02ffc57f57257843834d4f84c41480f4e27fbd | [
"MIT"
] | 5 | 2019-04-01T17:47:08.000Z | 2022-01-28T17:23:11.000Z | import mock
import pytest
import datetime as dt
from django.utils import timezone
from elasticsearch_metrics import metrics
from elasticsearch_dsl import IndexTemplate
from elasticsearch_metrics import signals
from elasticsearch_metrics.exceptions import (
IndexTemplateNotFoundError,
IndexTemplateOutOfSyncErro... | 39.501805 | 88 | 0.683787 | 10,442 | 0.954305 | 0 | 0 | 3,063 | 0.279931 | 0 | 0 | 1,750 | 0.159934 |
22a124507f9c19ec78061c640c8a18dd5ea530ee | 180 | py | Python | 6 kyu/SumFibs.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 6 | 2020-09-03T09:32:25.000Z | 2020-12-07T04:10:01.000Z | 6 kyu/SumFibs.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 1 | 2021-12-13T15:30:21.000Z | 2021-12-13T15:30:21.000Z | 6 kyu/SumFibs.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | null | null | null | from functools import lru_cache
@lru_cache
def fib(n):
return n if n<2 else fib(n-1)+fib(n-2)
def sum_fibs(n):
return sum(j for j in (fib(i) for i in range(n+1)) if j%2==0) | 30 | 65 | 0.661111 | 0 | 0 | 0 | 0 | 65 | 0.361111 | 0 | 0 | 0 | 0 |
22a1b8da531316fb6c21092916dd14f6945d1c1d | 1,924 | py | Python | tests/unit/test_iris_helpers.py | jvegreg/ESMValCore | 03eb1c942bf1dc3be98cb30c3592b42e82a94f16 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_iris_helpers.py | jvegreg/ESMValCore | 03eb1c942bf1dc3be98cb30c3592b42e82a94f16 | [
"Apache-2.0"
] | 2 | 2022-03-02T16:16:06.000Z | 2022-03-10T12:58:49.000Z | tests/unit/test_iris_helpers.py | valeriupredoi/ESMValCore | b46b948c47d8579d997b28501f8588f5531aa354 | [
"Apache-2.0"
] | null | null | null | """Tests for :mod:`esmvalcore.iris_helpers`."""
import datetime
import iris
import numpy as np
import pytest
from cf_units import Unit
from esmvalcore.iris_helpers import date2num, var_name_constraint
@pytest.fixture
def cubes():
"""Test cubes."""
cubes = iris.cube.CubeList([
iris.cube.Cube(0.0, var... | 33.172414 | 72 | 0.677755 | 0 | 0 | 0 | 0 | 744 | 0.386694 | 0 | 0 | 254 | 0.132017 |
22a26cac9546e3d04238eea2e14e595751d5270c | 11,429 | py | Python | geo_regions.py | saeed-moghimi-noaa/Maxelev_plot | 5bb701d8cb7d64db4c89ea9d7993a8269e57e504 | [
"CC0-1.0"
] | null | null | null | geo_regions.py | saeed-moghimi-noaa/Maxelev_plot | 5bb701d8cb7d64db4c89ea9d7993a8269e57e504 | [
"CC0-1.0"
] | null | null | null | geo_regions.py | saeed-moghimi-noaa/Maxelev_plot | 5bb701d8cb7d64db4c89ea9d7993a8269e57e504 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Geo regions for map plot
"""
__author__ = "Saeed Moghimi"
__copyright__ = "Copyright 2017, UCAR/NOAA"
__license__ = "GPL"
__version__ = "1.0"
__email__ = "moghimis@gmail.com"
import matplotlib.pyplot as plt
from collections import defaultdict
defs = defaultdict(dic... | 34.116418 | 52 | 0.441683 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,649 | 0.319276 |
22a33ada09a97d4c429f1c99f360e9ceb37d5903 | 771 | py | Python | figures/plot_log_figure_paper.py | davidADSP/deepAI_paper | f612e80aa0e8507444228940c54554a83bc16119 | [
"MIT"
] | 21 | 2017-09-09T18:41:40.000Z | 2022-03-16T06:50:00.000Z | figures/plot_log_figure_paper.py | davidADSP/deepAI_paper | f612e80aa0e8507444228940c54554a83bc16119 | [
"MIT"
] | null | null | null | figures/plot_log_figure_paper.py | davidADSP/deepAI_paper | f612e80aa0e8507444228940c54554a83bc16119 | [
"MIT"
] | 6 | 2017-09-09T18:41:53.000Z | 2022-02-25T08:11:40.000Z | import numpy
import matplotlib.pyplot as plt
fig_convergence = plt.figure(1,figsize=(12,6))
x = numpy.loadtxt('log_deepAI_paper_nonlin_action_long.txt')
plt.subplot(122)
plt.plot(x[:,0])
plt.xlim([0,500])
plt.ylim([-10,200])
plt.xlabel('Steps')
plt.ylabel('Free Action')
plt.axvline(x=230.0,linestyle=':')
plt.axvline... | 24.09375 | 76 | 0.657588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.150454 |
22a452c901b5e5a2bc4953164caa1bd099196d19 | 2,938 | py | Python | setup.py | matiasgrana/nagios_sql | 7858b852cf539da418a1a289e8c06e386b62287a | [
"MIT"
] | null | null | null | setup.py | matiasgrana/nagios_sql | 7858b852cf539da418a1a289e8c06e386b62287a | [
"MIT"
] | 4 | 2017-08-08T13:42:39.000Z | 2019-11-25T10:29:29.000Z | setup.py | matiasgrana/nagios_sql | 7858b852cf539da418a1a289e8c06e386b62287a | [
"MIT"
] | 4 | 2019-01-28T13:58:09.000Z | 2019-11-29T14:01:07.000Z | #! python3
# Help from: http://www.scotttorborg.com/python-packaging/minimal.html
# https://docs.python.org/3/distutils/commandref.html#sdist-cmd
# https://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files
# https://docs.python.org/3.4/tutorial/modules.html
# Install it with python setup.py ins... | 32.285714 | 84 | 0.636147 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,614 | 0.549353 |
22a4a9fee06a32718975fa561659e922ae3f756e | 1,838 | py | Python | textnn/utils/test/test_progress_iterator.py | tongr/TextNN | a0294a197d3be284177214e8f019e9fed13dff1a | [
"Apache-2.0"
] | 1 | 2019-03-08T12:12:45.000Z | 2019-03-08T12:12:45.000Z | textnn/utils/test/test_progress_iterator.py | tongr/TextNN | a0294a197d3be284177214e8f019e9fed13dff1a | [
"Apache-2.0"
] | 16 | 2019-02-14T11:51:30.000Z | 2019-06-11T08:25:53.000Z | textnn/utils/test/test_progress_iterator.py | tongr/TextNN | a0294a197d3be284177214e8f019e9fed13dff1a | [
"Apache-2.0"
] | null | null | null | import io
import sys
from textnn.utils import ProgressIterator
#inspired by https://stackoverflow.com/a/34738440
def capture_sysout(cmd):
capturedOutput = io.StringIO() # Create StringIO object
sys.stdout = capturedOutput # and redirect stdout.
cmd() ... | 34.679245 | 76 | 0.541349 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 615 | 0.334603 |
22a5a69bd0005b87e47d0ff6d4ecd35b5d2cdf15 | 159 | py | Python | reach.py | NIKH0610/class5-homework | d4cfb1b28656a37002dff6b1b20bae1253b2ae80 | [
"MIT"
] | null | null | null | reach.py | NIKH0610/class5-homework | d4cfb1b28656a37002dff6b1b20bae1253b2ae80 | [
"MIT"
] | null | null | null | reach.py | NIKH0610/class5-homework | d4cfb1b28656a37002dff6b1b20bae1253b2ae80 | [
"MIT"
] | null | null | null | import os
import numpy as np
import pandas as pd
housing_df = pd.read_csv(filepath_or_buffer='~/C:\Users\nikhi\NIKH0610\class5-homework\toys-datasets\boston') | 31.8 | 109 | 0.805031 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.402516 |
22a5b5de1219dd90ee90a5e573d5793e913c42ca | 379 | py | Python | queries/general_queries.py | souparvo/airflow-plugins | 0ca7fa634335145b69671054680d5d67de329644 | [
"BSD-3-Clause"
] | null | null | null | queries/general_queries.py | souparvo/airflow-plugins | 0ca7fa634335145b69671054680d5d67de329644 | [
"BSD-3-Clause"
] | null | null | null | queries/general_queries.py | souparvo/airflow-plugins | 0ca7fa634335145b69671054680d5d67de329644 | [
"BSD-3-Clause"
] | null | null | null |
def insert_metatable():
"""SQL query to insert records from table insert into a table on a DB
"""
return """
INSERT INTO TABLE {{ params.target_schema }}.{{ params.target_table }} VALUES
('{{ params.schema }}', '{{ params.table }}', {{ ti.xcom_pull(key='hive_res', task_ids=params.count_inserts)[0... | 42.111111 | 165 | 0.62533 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 337 | 0.889182 |
22a5f31f1b502fe38b7dada2cca91916da3eb320 | 24,973 | py | Python | pyvisa_py/highlevel.py | Handfeger/pyvisa-py | fcfb45895cd44dd922985c3a9d8f3372c8318d63 | [
"MIT"
] | 1 | 2019-03-25T20:26:16.000Z | 2019-03-25T20:26:16.000Z | pyvisa_py/highlevel.py | Handfeger/pyvisa-py | fcfb45895cd44dd922985c3a9d8f3372c8318d63 | [
"MIT"
] | null | null | null | pyvisa_py/highlevel.py | Handfeger/pyvisa-py | fcfb45895cd44dd922985c3a9d8f3372c8318d63 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Highlevel wrapper of the VISA Library.
:copyright: 2014-2020 by PyVISA-py Authors, see AUTHORS for more details.
:license: MIT, see LICENSE for more details.
"""
import random
from collections import OrderedDict
from typing import Any, Dict, Iterable, List, Optional, Tuple, Union, cast
fr... | 31.893997 | 88 | 0.610019 | 24,407 | 0.977336 | 0 | 0 | 883 | 0.035358 | 0 | 0 | 14,074 | 0.563569 |
22a63f951029bec63e4f61cb892764b3e55fdcae | 13,219 | py | Python | detectron/utils/webly_vis.py | sisrfeng/NA-fWebSOD | 49cb75a9a0d557b05968c6b11b0f17a7043f2077 | [
"Apache-2.0"
] | 23 | 2020-03-30T11:48:33.000Z | 2022-03-11T06:34:31.000Z | detectron/utils/webly_vis.py | sisrfeng/NA-fWebSOD | 49cb75a9a0d557b05968c6b11b0f17a7043f2077 | [
"Apache-2.0"
] | 9 | 2020-09-28T07:15:16.000Z | 2022-03-25T08:11:06.000Z | detectron/utils/webly_vis.py | sisrfeng/NA-fWebSOD | 49cb75a9a0d557b05968c6b11b0f17a7043f2077 | [
"Apache-2.0"
] | 10 | 2020-03-30T11:48:34.000Z | 2021-06-02T06:12:36.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import cv2
import numpy as np
import os
import math
from PIL import Image, ImageDraw, ImageFont
from caffe2.python import workspace
from detectron.core.config import cf... | 37.341808 | 87 | 0.504577 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,467 | 0.110977 |
22a72547959131b60da1f328cdda0445ca0ed7eb | 13,740 | py | Python | salt/runner.py | StepOneInc/salt | ee210172c37bf0cee224794cd696b38e288e4073 | [
"Apache-2.0"
] | 1 | 2016-04-26T03:42:32.000Z | 2016-04-26T03:42:32.000Z | salt/runner.py | apergos/salt | 106c715d495a9c2bd747c8ca75745236b0d7fb41 | [
"Apache-2.0"
] | null | null | null | salt/runner.py | apergos/salt | 106c715d495a9c2bd747c8ca75745236b0d7fb41 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Execute salt convenience routines
'''
# Import python libs
from __future__ import print_function
from __future__ import absolute_import
import collections
import logging
import time
import sys
import multiprocessing
# Import salt libs
import salt.exceptions
import salt.loader
import salt.m... | 37.135135 | 118 | 0.527365 | 13,134 | 0.955895 | 1,718 | 0.125036 | 2,023 | 0.147234 | 0 | 0 | 5,476 | 0.398544 |
22a8b0a10c5a619e3d02f83382579627b355c5a9 | 186 | py | Python | .venv/lib/python3.8/site-packages/poetry/core/_vendor/lark/__pyinstaller/__init__.py | RivtLib/replit01 | ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7 | [
"MIT"
] | 1 | 2020-08-07T16:09:57.000Z | 2020-08-07T16:09:57.000Z | .venv/lib/python3.8/site-packages/poetry/core/_vendor/lark/__pyinstaller/__init__.py | RivtLib/replit01 | ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7 | [
"MIT"
] | null | null | null | .venv/lib/python3.8/site-packages/poetry/core/_vendor/lark/__pyinstaller/__init__.py | RivtLib/replit01 | ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7 | [
"MIT"
] | null | null | null | # For usage of lark with PyInstaller. See https://pyinstaller-sample-hook.readthedocs.io/en/latest/index.html
import os
def get_hook_dirs():
return [os.path.dirname(__file__)] | 31 | 110 | 0.747312 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.591398 |
22a8bf88232fd22e170f70f6a4d8e344cbe114aa | 4,257 | py | Python | pong-pg.py | s-gv/pong-keras | 38a0f25ae0e628f357512d085dc957720d83ece2 | [
"0BSD"
] | null | null | null | pong-pg.py | s-gv/pong-keras | 38a0f25ae0e628f357512d085dc957720d83ece2 | [
"0BSD"
] | null | null | null | pong-pg.py | s-gv/pong-keras | 38a0f25ae0e628f357512d085dc957720d83ece2 | [
"0BSD"
] | null | null | null | # Copyright (c) 2019 Sagar Gubbi. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import numpy as np
import gym
import tensorflow as tf
from tensorflow.keras.models import Sequential, Model
from tensorflow.keras.layers import Input,... | 33.257813 | 116 | 0.597369 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,137 | 0.267089 |