hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
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
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
edf05b399b9f068366d11eadfffffe4ec1a483a1
578
py
Python
gym_envs/np_frozenlake.py
ranok92/deepirl
88c7e76986243cf0b988d8d7dc0eef6b58e07864
[ "MIT" ]
2
2019-01-04T22:03:15.000Z
2019-04-03T00:16:11.000Z
gym_envs/np_frozenlake.py
ranok92/deepirl
88c7e76986243cf0b988d8d7dc0eef6b58e07864
[ "MIT" ]
null
null
null
gym_envs/np_frozenlake.py
ranok92/deepirl
88c7e76986243cf0b988d8d7dc0eef6b58e07864
[ "MIT" ]
null
null
null
''' Wrapper around frozenlake-v0 that outputs one-hot numpy vectors instead of integers as the state space. ''' import pdb from gym.envs.toy_text import frozen_lake import numpy as np import sys sys.path.insert(0, '..') # NOQA:E402:w from utils import to_oh class FrozenLakeNP(frozen_lake.FrozenLakeEnv): def re...
23.12
74
0.648789
e615a49a7dbf7905b05e1c8b3444cef29732b4e9
93,473
py
Python
qa/rpc-tests/p2p-segwit.py
cryptotetsuya/shin4
73e81561294aef178e13ae5f5501de5e7431c8c2
[ "MIT" ]
null
null
null
qa/rpc-tests/p2p-segwit.py
cryptotetsuya/shin4
73e81561294aef178e13ae5f5501de5e7431c8c2
[ "MIT" ]
null
null
null
qa/rpc-tests/p2p-segwit.py
cryptotetsuya/shin4
73e81561294aef178e13ae5f5501de5e7431c8c2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test...
45.641113
143
0.658062
eb43e0611c6463324317b4e32b7d075dd28a3a37
5,805
py
Python
axelrod/tests/unit/test_gambler.py
t0nyt93/Axelroddd
66d95378d3ece8b32afeb1c77d305397bd9a815e
[ "MIT" ]
null
null
null
axelrod/tests/unit/test_gambler.py
t0nyt93/Axelroddd
66d95378d3ece8b32afeb1c77d305397bd9a815e
[ "MIT" ]
null
null
null
axelrod/tests/unit/test_gambler.py
t0nyt93/Axelroddd
66d95378d3ece8b32afeb1c77d305397bd9a815e
[ "MIT" ]
1
2019-03-11T08:56:09.000Z
2019-03-11T08:56:09.000Z
"""Test for the Gambler strategy. Most tests come form the LookerUp test suite. """ import copy import axelrod from .test_player import TestPlayer, TestMatch C, D = axelrod.Actions.C, axelrod.Actions.D class TestGambler(TestPlayer): name = "Gambler" player = axelrod.Gambler expected_classifier = { ...
29.617347
78
0.579845
f316fcd4a4ce94c124193ad5cd32388ef4d7d99b
1,964
py
Python
yt_concate/pipline/steps/get_video_list.py
nikibacon/yt-concate
a8aff16997c9fd898e73a296a7e235b0b1c668bd
[ "MIT" ]
null
null
null
yt_concate/pipline/steps/get_video_list.py
nikibacon/yt-concate
a8aff16997c9fd898e73a296a7e235b0b1c668bd
[ "MIT" ]
null
null
null
yt_concate/pipline/steps/get_video_list.py
nikibacon/yt-concate
a8aff16997c9fd898e73a296a7e235b0b1c668bd
[ "MIT" ]
null
null
null
import urllib.request import json from yt_concate.pipline.steps.step import Step # global variable 都不變的話會用全大寫 from yt_concate.settings import API_KEY class GetVideoList(Step): def process(self, data, inputs, utils, logger): channel_id = inputs['channel_id'] if utils.video_list_file_exists(channe...
35.709091
119
0.57943
eb182a2fb32efbfc161df98b9b176d48b2cbab77
4,850
py
Python
tests/unit/network_services/traffic_profile/test_fixed.py
kkltcjk/yardstick-moon
de48b16d1385cc26e83f8886d148d642c59e3d64
[ "Apache-2.0" ]
null
null
null
tests/unit/network_services/traffic_profile/test_fixed.py
kkltcjk/yardstick-moon
de48b16d1385cc26e83f8886d148d642c59e3d64
[ "Apache-2.0" ]
null
null
null
tests/unit/network_services/traffic_profile/test_fixed.py
kkltcjk/yardstick-moon
de48b16d1385cc26e83f8886d148d642c59e3d64
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2016-2017 Intel Corporation # # 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 a...
39.430894
78
0.506186
65e31f56764319899f31be787742d2f7410c7d50
1,208
py
Python
app/sql/config/DbConfig.py
fredpan/Prosopagnosia_Web_Server
b56b58eccdbbde6b158802d49f7bcc1b44b18b69
[ "Apache-2.0" ]
null
null
null
app/sql/config/DbConfig.py
fredpan/Prosopagnosia_Web_Server
b56b58eccdbbde6b158802d49f7bcc1b44b18b69
[ "Apache-2.0" ]
null
null
null
app/sql/config/DbConfig.py
fredpan/Prosopagnosia_Web_Server
b56b58eccdbbde6b158802d49f7bcc1b44b18b69
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 EraO Prosopagnosia Helper Dev Team, Liren Pan, Yixiao Hong, Hongzheng Xu, Stephen Huang, Tiancong Wang # # Supervised by Prof. Steve Mann (http://www.eecg.toronto.edu/~mann/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with th...
43.142857
120
0.728477
202cd481ebebd2eb54b8f1fab433e974985b212f
49,984
py
Python
src/transformers/utils/dummy_tf_objects.py
yhl48/transformers
b320d87eceb369ea22d5cd73866499851cb2cca3
[ "Apache-2.0" ]
1
2022-03-28T15:28:54.000Z
2022-03-28T15:28:54.000Z
src/transformers/utils/dummy_tf_objects.py
yhl48/transformers
b320d87eceb369ea22d5cd73866499851cb2cca3
[ "Apache-2.0" ]
null
null
null
src/transformers/utils/dummy_tf_objects.py
yhl48/transformers
b320d87eceb369ea22d5cd73866499851cb2cca3
[ "Apache-2.0" ]
null
null
null
# This file is autogenerated by the command `make fix-copies`, do not edit. # flake8: noqa from ..utils import DummyObject, requires_backends class TensorFlowBenchmarkArguments(metaclass=DummyObject): _backends = ["tf"] def __init__(self, *args, **kwargs): requires_backends(self, ["tf"]) class Tens...
22.647938
75
0.676516
e93be4f26c8c5bdc42cfc0e258f4a5b0ae6ab693
4,096
py
Python
modin/pandas/test/test_concat.py
zeevikal/modin
2128f80280092902c61d738d9d2ef551bc4ffaf4
[ "Apache-2.0" ]
null
null
null
modin/pandas/test/test_concat.py
zeevikal/modin
2128f80280092902c61d738d9d2ef551bc4ffaf4
[ "Apache-2.0" ]
null
null
null
modin/pandas/test/test_concat.py
zeevikal/modin
2128f80280092902c61d738d9d2ef551bc4ffaf4
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import pytest import pandas import modin.pandas as pd from modin.pandas.utils import from_pandas, to_pandas pd.DEFAULT_NPARTITIONS = 4 @pytest.fixture def ray_df_equals_pandas(ray_df, pandas_df): return ...
25.128834
88
0.590088
2f37b48333271cbe66800e7a0397b62def02c340
536
py
Python
subscription/migrations/0009_auto_20200603_1210.py
BuildForSDG/dijiElimu
514a90d6f0480516aa209891224cf9dfe6be1607
[ "MIT" ]
null
null
null
subscription/migrations/0009_auto_20200603_1210.py
BuildForSDG/dijiElimu
514a90d6f0480516aa209891224cf9dfe6be1607
[ "MIT" ]
20
2020-05-12T12:11:01.000Z
2022-03-12T00:33:12.000Z
subscription/migrations/0009_auto_20200603_1210.py
BuildForSDG/dijiElimu
514a90d6f0480516aa209891224cf9dfe6be1607
[ "MIT" ]
4
2020-05-06T03:57:04.000Z
2020-05-20T06:30:28.000Z
# Generated by Django 3.0.6 on 2020-06-03 12:10 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('course', '0007_auto_20200603_0823'), ('subscription', '0008_subscription_user'), ] operations = [ m...
25.52381
112
0.643657
599fe1aae2942a8aeab57f3d400bed460e015324
9,440
py
Python
dataset/psenet/psenet_synth.py
wenjunyoung/PAN_PLUS
c893ff4775c8ff137a21c15d34fb93b9394dbfe5
[ "Apache-2.0" ]
null
null
null
dataset/psenet/psenet_synth.py
wenjunyoung/PAN_PLUS
c893ff4775c8ff137a21c15d34fb93b9394dbfe5
[ "Apache-2.0" ]
null
null
null
dataset/psenet/psenet_synth.py
wenjunyoung/PAN_PLUS
c893ff4775c8ff137a21c15d34fb93b9394dbfe5
[ "Apache-2.0" ]
null
null
null
import numpy as np from PIL import Image from torch.utils import data import cv2 import random import torchvision.transforms as transforms import torch import pyclipper import Polygon as plg import math import string import scipy.io as scio synth_root_dir = './data/SynthText/' synth_train_data_dir = synth_root_dir syn...
32.108844
115
0.5625
1eff7f41ff5d54ae199137f59fb15f578ac53067
46,149
py
Python
MetaScreener/external_sw/mgltools/MGLToolsPckgs/MolKit/pdbWriter.py
bio-hpc/metascreener
6900497629f601c4b6c0c37da26de58ffa221988
[ "Apache-2.0" ]
8
2021-12-14T21:30:01.000Z
2022-02-14T11:30:03.000Z
MetaScreener/external_sw/mgltools/MGLToolsPckgs/MolKit/pdbWriter.py
bio-hpc/metascreener
6900497629f601c4b6c0c37da26de58ffa221988
[ "Apache-2.0" ]
null
null
null
MetaScreener/external_sw/mgltools/MGLToolsPckgs/MolKit/pdbWriter.py
bio-hpc/metascreener
6900497629f601c4b6c0c37da26de58ffa221988
[ "Apache-2.0" ]
null
null
null
############################################################################# # # Author: Kevin Chan, Michel F. SANNER # # Copyright: M. Sanner TSRI 2000 # ############################################################################# # # $Header: /opt/cvs/python/packages/share1.5/MolKit/pdbWriter.py,v 1.29 2014/07/09 ...
38.58612
107
0.497302
3d805506b40d844981dff551a05750793cddf6a9
2,835
py
Python
examples/rsa/schelling.py
hicala/pyro
bc607f8cf817a8ee7cdebc83dfa51c233d5f13ae
[ "Apache-2.0" ]
null
null
null
examples/rsa/schelling.py
hicala/pyro
bc607f8cf817a8ee7cdebc83dfa51c233d5f13ae
[ "Apache-2.0" ]
null
null
null
examples/rsa/schelling.py
hicala/pyro
bc607f8cf817a8ee7cdebc83dfa51c233d5f13ae
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 """ Schelling coordination game: Two spies, Alice and Bob, want to meet. They must choose between two locations without communicating by recursively reasoning about one another. Taken from: http://forestdb.org/models/schelling.ht...
32.965116
82
0.710758
769ef68f1cab80c37bd6063c30ca2eff02c93891
49,825
py
Python
edb/schema/constraints.py
jamilabreu/edgedb
6d3f222e4c5d3300f483b4e06e8f747c6381f313
[ "Apache-2.0" ]
null
null
null
edb/schema/constraints.py
jamilabreu/edgedb
6d3f222e4c5d3300f483b4e06e8f747c6381f313
[ "Apache-2.0" ]
null
null
null
edb/schema/constraints.py
jamilabreu/edgedb
6d3f222e4c5d3300f483b4e06e8f747c6381f313
[ "Apache-2.0" ]
null
null
null
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB 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...
34.338387
79
0.585509
5afd11571e500a59f1295e5f371c29c6e3af7f94
3,963
py
Python
examples/example_sim_rigid_chain.py
addy1997/warp
1c231e3eda88a39ce8142b9727e918d2a3e4a4b1
[ "MIT", "Unlicense", "Apache-2.0", "0BSD" ]
null
null
null
examples/example_sim_rigid_chain.py
addy1997/warp
1c231e3eda88a39ce8142b9727e918d2a3e4a4b1
[ "MIT", "Unlicense", "Apache-2.0", "0BSD" ]
null
null
null
examples/example_sim_rigid_chain.py
addy1997/warp
1c231e3eda88a39ce8142b9727e918d2a3e4a4b1
[ "MIT", "Unlicense", "Apache-2.0", "0BSD" ]
null
null
null
# Copyright (c) 2022 NVIDIA CORPORATION. All rights reserved. # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this software and relate...
28.510791
123
0.593237
72ebaa077b093b0a53e753401721c90f815d88cc
2,326
py
Python
features/environment.py
pablodoramas/behave
bfda54448906d919ffd3fa4424b6d3c155a5388b
[ "BSD-2-Clause" ]
8
2016-01-06T09:19:45.000Z
2021-05-29T11:58:10.000Z
features/environment.py
pablodoramas/behave
bfda54448906d919ffd3fa4424b6d3c155a5388b
[ "BSD-2-Clause" ]
1
2022-02-16T20:56:42.000Z
2022-02-16T20:56:42.000Z
features/environment.py
pablodoramas/behave
bfda54448906d919ffd3fa4424b6d3c155a5388b
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: UTF-8 -*- # FILE: features/environemnt.py from __future__ import absolute_import, print_function from behave.tag_matcher import \ ActiveTagMatcher, setup_active_tag_values, print_active_tags from behave4cmd0.setup_command_shell import setup_command_shell_processors4behave from behave import python_fe...
36.920635
81
0.671969
ebb6ce5ee0430b5d9dd1f5c04ffd7abf080fb5de
2,184
py
Python
magenta/models/coconet/export_saved_model.py
nkjulia/magenta
063d320d59276a15afa0f8a3a8d386ad74594070
[ "Apache-2.0" ]
2,785
2020-06-05T03:00:48.000Z
2022-03-31T20:59:43.000Z
magenta/models/coconet/export_saved_model.py
nkjulia/magenta
063d320d59276a15afa0f8a3a8d386ad74594070
[ "Apache-2.0" ]
242
2020-06-04T18:35:42.000Z
2022-03-30T09:14:18.000Z
magenta/models/coconet/export_saved_model.py
nkjulia/magenta
063d320d59276a15afa0f8a3a8d386ad74594070
[ "Apache-2.0" ]
745
2020-06-05T02:32:45.000Z
2022-03-30T04:44:20.000Z
# Copyright 2021 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
37.655172
76
0.723901
bb92072a203dbcbc75120c1ac04b2bf6162b34a0
10,381
py
Python
PyFitch.py
donfbecker/PyFitch
b45c0307fe70bb4158d24c6a8be579e3109fecf8
[ "MIT" ]
null
null
null
PyFitch.py
donfbecker/PyFitch
b45c0307fe70bb4158d24c6a8be579e3109fecf8
[ "MIT" ]
null
null
null
PyFitch.py
donfbecker/PyFitch
b45c0307fe70bb4158d24c6a8be579e3109fecf8
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import shutil import sys import glob import numpy as np import tflite_runtime.interpreter as tflite from PIL import Image from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore i...
30.804154
114
0.635584
c0f1462f299f24e1c3663511f9f852aea1084658
744
py
Python
backend/app/models/post.py
adriangb/fastapi-blog
e4db152065648470ad7c2116b84edcdf289f3efc
[ "MIT" ]
57
2021-02-22T02:21:57.000Z
2022-03-25T07:30:09.000Z
backend/app/models/post.py
adriangb/fastapi-blog
e4db152065648470ad7c2116b84edcdf289f3efc
[ "MIT" ]
5
2021-05-30T22:21:55.000Z
2022-01-22T23:41:51.000Z
backend/app/models/post.py
adriangb/fastapi-blog
e4db152065648470ad7c2116b84edcdf289f3efc
[ "MIT" ]
5
2021-10-09T20:14:43.000Z
2022-02-21T07:31:54.000Z
from datetime import datetime from sqlalchemy import TIMESTAMP, Integer, String from sqlalchemy.orm import relationship from sqlalchemy.sql.schema import Column, ForeignKey from app.db.base import Base from . import user class Post(Base): __tablename__: str = "posts" id: int = Column(Integer, primary_key=...
31
69
0.725806
56e26f9e6e83e5e82955a52aa864e27becbc7b6b
2,715
py
Python
building_dataset.py
samshad/Stack-Twitter-Big5
0716503dc2992ed53dca3730bcea0adef5e15dd2
[ "MIT" ]
null
null
null
building_dataset.py
samshad/Stack-Twitter-Big5
0716503dc2992ed53dca3730bcea0adef5e15dd2
[ "MIT" ]
null
null
null
building_dataset.py
samshad/Stack-Twitter-Big5
0716503dc2992ed53dca3730bcea0adef5e15dd2
[ "MIT" ]
null
null
null
import pandas as pd import ast main_data = pd.read_csv('Data/Stack+Twitter+Ocean Data.csv') twitter = pd.read_csv('Data/twitter_data.csv') personality = pd.read_csv('Data/personality_data_twitter.csv') stackoverflow = pd.read_csv('Data/stackoverflow_data.csv') # stackoverflow['top_tags_question'] = stackoverflow['to...
49.363636
111
0.673665
3156ba119a8cba024ee4a8a65ed35360411ecf20
1,436
py
Python
ai/STA/Tactic/TacticBook.py
wonwon0/RobocupStrategyIA
891028f616d476b05b23b40924d7c99502a718e3
[ "MIT" ]
null
null
null
ai/STA/Tactic/TacticBook.py
wonwon0/RobocupStrategyIA
891028f616d476b05b23b40924d7c99502a718e3
[ "MIT" ]
null
null
null
ai/STA/Tactic/TacticBook.py
wonwon0/RobocupStrategyIA
891028f616d476b05b23b40924d7c99502a718e3
[ "MIT" ]
null
null
null
# Under MIT License, see LICENSE.txt from .GoGetBall import GoGetBall from .ProtectGoal import GoalKeeper from .GoToPosition import GoToPosition from .RotateAroundBall import RotateAroundBall from .Stop import Stop from .ProtectZone import ProtectZone from .DemoFollowBall import DemoFollowBall from .GoToPositionNoPath...
35.9
81
0.657382
eb1a483e6f1a1b05e2f46cfa1577695feece260e
24,386
py
Python
napari/components/add_layers_mixin.py
mrocklin/napari
b61d9ae570e30091a97b6c76e37cd95fe5b296b6
[ "BSD-3-Clause" ]
null
null
null
napari/components/add_layers_mixin.py
mrocklin/napari
b61d9ae570e30091a97b6c76e37cd95fe5b296b6
[ "BSD-3-Clause" ]
1
2020-10-15T19:31:09.000Z
2020-10-15T19:39:33.000Z
napari/components/add_layers_mixin.py
mrocklin/napari
b61d9ae570e30091a97b6c76e37cd95fe5b296b6
[ "BSD-3-Clause" ]
null
null
null
import inspect import itertools import os from functools import lru_cache from logging import getLogger from typing import Any, Dict, List, Optional, Sequence, Set, Union from .. import layers from ..layers.image._image_utils import guess_labels from ..layers.utils.stack_utils import split_channels from ..plugins.io i...
39.91162
79
0.605429
398e71395fa2866d9c558fe8549a86efe6cc9dc2
117,126
py
Python
salt/utils/cloud.py
jflowers84/salt
cbe1cfa4d94b1b39679f5b8a06335675152ef80e
[ "Apache-2.0", "MIT" ]
null
null
null
salt/utils/cloud.py
jflowers84/salt
cbe1cfa4d94b1b39679f5b8a06335675152ef80e
[ "Apache-2.0", "MIT" ]
null
null
null
salt/utils/cloud.py
jflowers84/salt
cbe1cfa4d94b1b39679f5b8a06335675152ef80e
[ "Apache-2.0", "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' Utility functions for salt.cloud ''' # Import python libs from __future__ import absolute_import, print_function, unicode_literals import errno import os import stat import codecs import shutil import hashlib import socket import tempfile import time import subprocess import multiprocessing...
35.785518
123
0.556529
7fc009c5cf9eaf5f9d256357b1c7544eaa676592
2,088
py
Python
src/python/merge_hospitals.py
samurai-madrid/data-processing
c8572419dbc140291afd5cc804936ee6f94d0f6a
[ "MIT" ]
1
2020-09-26T21:06:59.000Z
2020-09-26T21:06:59.000Z
src/python/merge_hospitals.py
samurai-madrid/data-processing
c8572419dbc140291afd5cc804936ee6f94d0f6a
[ "MIT" ]
null
null
null
src/python/merge_hospitals.py
samurai-madrid/data-processing
c8572419dbc140291afd5cc804936ee6f94d0f6a
[ "MIT" ]
1
2020-09-26T21:07:55.000Z
2020-09-26T21:07:55.000Z
import sys, getopt import utils import pandas as pd import DatasetPaths import yaml KEY = 'Hospital' COLUMNS_TO_KEEP = ['Hospital','km0_x','km0_y'] def merge_hospitals(df_samur, df_hospitals): df_hospitals = df_hospitals[['name_orig','Hospital','hospital_x','hospital_y']] df_samur.rename(columns={'Hospital':'Hospi...
40.941176
150
0.728448
f07ba7b05f223c285b85819c70f49978e80ec184
6,672
py
Python
src/modules/attenStereoNet_pac_psm.py
ccj5351/DAFStereoNets
66b720a4abbac9097a794eacef034bab641771d9
[ "MIT" ]
19
2020-10-16T02:21:13.000Z
2022-03-25T10:49:47.000Z
src/modules/attenStereoNet_pac_psm.py
ccj5351/DAFStereoNets
66b720a4abbac9097a794eacef034bab641771d9
[ "MIT" ]
null
null
null
src/modules/attenStereoNet_pac_psm.py
ccj5351/DAFStereoNets
66b720a4abbac9097a794eacef034bab641771d9
[ "MIT" ]
5
2020-10-21T06:29:34.000Z
2022-03-07T05:02:42.000Z
# !/usr/bin/env python3 # -*-coding:utf-8-*- # @file: attenStereoNet_pac_psm.py # @brief: # @author: Changjiang Cai, ccai1@stevens.edu, caicj5351@gmail.com # @version: 0.0.1 # @creation date: 17-12-2019 # @last modified: Sat 01 Feb 2020 07:28:24 PM EST from __future__ import print_function import torch import torch.nn ...
40.932515
102
0.569095
bb4ebe5f33be779eaebdc93a73339804113fc6c7
15,415
py
Python
pyocd/commands/execution_context.py
Kris-b50122/pyOCD
df605c7aa04d72c5187ab652445063cc232cf378
[ "Apache-2.0" ]
null
null
null
pyocd/commands/execution_context.py
Kris-b50122/pyOCD
df605c7aa04d72c5187ab652445063cc232cf378
[ "Apache-2.0" ]
null
null
null
pyocd/commands/execution_context.py
Kris-b50122/pyOCD
df605c7aa04d72c5187ab652445063cc232cf378
[ "Apache-2.0" ]
null
null
null
# pyOCD debugger # Copyright (c) 2015-2020 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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...
37.144578
117
0.621278
0a25fcbbbd18544cf099ee24464178df56632234
1,379
py
Python
herders/migrations/0027_auto_20210317_0522.py
Itori/swarfarm
7192e2d8bca093b4254023bbec42b6a2b1887547
[ "Apache-2.0" ]
66
2017-09-11T04:46:00.000Z
2021-03-13T00:02:42.000Z
herders/migrations/0027_auto_20210317_0522.py
Itori/swarfarm
7192e2d8bca093b4254023bbec42b6a2b1887547
[ "Apache-2.0" ]
133
2017-09-24T21:28:59.000Z
2021-04-02T10:35:31.000Z
herders/migrations/0027_auto_20210317_0522.py
Itori/swarfarm
7192e2d8bca093b4254023bbec42b6a2b1887547
[ "Apache-2.0" ]
28
2017-08-30T19:04:32.000Z
2020-11-16T04:09:00.000Z
# Generated by Django 2.2.17 on 2021-03-17 12:22 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('herders', '0026_auto_20210301_1052'), ] operations = [ migrations.AddField( model_name='artifa...
39.4
165
0.659898
7be3ddd3bf202222e51862d237440739853f6555
2,012
py
Python
test/bak/minimal_community_install_test.py
pmi-kbase/KBaseSynCom
9f048011be9efefc615ee4cdfb1e86e9809a28db
[ "MIT" ]
null
null
null
test/bak/minimal_community_install_test.py
pmi-kbase/KBaseSynCom
9f048011be9efefc615ee4cdfb1e86e9809a28db
[ "MIT" ]
null
null
null
test/bak/minimal_community_install_test.py
pmi-kbase/KBaseSynCom
9f048011be9efefc615ee4cdfb1e86e9809a28db
[ "MIT" ]
1
2022-01-25T17:28:24.000Z
2022-01-25T17:28:24.000Z
import unittest import logging import sys import os # noqa: F401 import time import hashlib import subprocess import uuid class MinimalCommunityInstallTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.__LOGGER = logging.getLogger('MinimalCommunityInstallTest') cls.__LOGGER.setLe...
35.298246
102
0.617296
cfc427bffb7b4a25018dce4875eb81a33ddbe987
9,595
py
Python
sockeye/lr_scheduler.py
xingniu/sockeye
130a650068dd1540231e8d15eec65f051a684f9e
[ "Apache-2.0" ]
3
2019-06-03T17:29:49.000Z
2021-07-11T05:51:53.000Z
sockeye/lr_scheduler.py
xingniu/sockeye
130a650068dd1540231e8d15eec65f051a684f9e
[ "Apache-2.0" ]
null
null
null
sockeye/lr_scheduler.py
xingniu/sockeye
130a650068dd1540231e8d15eec65f051a684f9e
[ "Apache-2.0" ]
1
2021-07-11T05:51:54.000Z
2021-07-11T05:51:54.000Z
# Copyright 2017--2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may not # use this file except in compliance with the License. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fi...
42.268722
120
0.658155
5885aacc4aa8b1ddad824661d3b82b59b50ab61d
8,881
py
Python
dpg_pn/utils.py
tttslab/armos
6003a9e90ea5ed586f8e45d7d8b872fdad58e26a
[ "MIT" ]
null
null
null
dpg_pn/utils.py
tttslab/armos
6003a9e90ea5ed586f8e45d7d8b872fdad58e26a
[ "MIT" ]
null
null
null
dpg_pn/utils.py
tttslab/armos
6003a9e90ea5ed586f8e45d7d8b872fdad58e26a
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import random import configparser import librosa from multiprocessing import Process from multiprocessing import Queue import TractSeqToWave_Func conf = configparser.SafeConfigParser() conf.read("config.ini") IN_SIZE = int(conf...
48.005405
160
0.568179
067ef1d222d867ac00637e863099055e69b522f0
165
py
Python
TwitchClipVault/Vault/urls.py
leekcake/TwitchClipVault
c60faaf68939771f06468a8c430e0c52e9baa217
[ "MIT" ]
null
null
null
TwitchClipVault/Vault/urls.py
leekcake/TwitchClipVault
c60faaf68939771f06468a8c430e0c52e9baa217
[ "MIT" ]
null
null
null
TwitchClipVault/Vault/urls.py
leekcake/TwitchClipVault
c60faaf68939771f06468a8c430e0c52e9baa217
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('view/<str:videoId>', views.view, name='view') ]
20.625
55
0.654545
428d4f341715c69d52176c5ac61269510511dfb6
99,347
py
Python
Lib/test/test_shutil.py
umoqnier/cpython
d8ca2354ed30c12b9ce37c4535222b700a727b32
[ "CNRI-Python-GPL-Compatible" ]
2
2020-01-04T07:21:53.000Z
2020-10-02T17:32:24.000Z
Lib/test/test_shutil.py
umoqnier/cpython
d8ca2354ed30c12b9ce37c4535222b700a727b32
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Lib/test/test_shutil.py
umoqnier/cpython
d8ca2354ed30c12b9ce37c4535222b700a727b32
[ "CNRI-Python-GPL-Compatible" ]
2
2019-11-16T02:03:51.000Z
2019-11-16T02:10:57.000Z
# Copyright (C) 2003 Python Software Foundation import unittest import unittest.mock import shutil import tempfile import sys import stat import os import os.path import errno import functools import pathlib import subprocess import random import string import contextlib import io from shutil import (make_archive, ...
39.691171
92
0.604689
130492c3858b4d5c23b4428dd210cfff0cf53f19
4,481
py
Python
tests/test_estimators/test_demographic_parity.py
lahdjirayhan/scikit-lego
5dd145df796c4d254cd505727c9db01484ebc39c
[ "MIT" ]
784
2019-03-01T21:35:53.000Z
2022-03-30T11:22:46.000Z
tests/test_estimators/test_demographic_parity.py
lahdjirayhan/scikit-lego
5dd145df796c4d254cd505727c9db01484ebc39c
[ "MIT" ]
382
2019-02-27T10:38:53.000Z
2022-03-31T07:22:24.000Z
tests/test_estimators/test_demographic_parity.py
lahdjirayhan/scikit-lego
5dd145df796c4d254cd505727c9db01484ebc39c
[ "MIT" ]
112
2019-03-01T19:34:37.000Z
2022-03-30T14:10:29.000Z
import warnings import pytest import numpy as np try: from cvxpy import SolverError except ImportError: pass from sklearn.linear_model import LogisticRegression from sklego.common import flatten from sklego.linear_model import DemographicParityClassifier, FairClassifier from sklego.metrics import p_percent_sc...
30.482993
112
0.677974
60d69e6f9e2f265c0d30a97500e43b251f79867c
241
py
Python
data_collection/gazette/spiders/mg_associacao_municipios.py
Jefersonalves/diario-oficial
9a4bdfe2e31414c993d88831a67160c49a5ee657
[ "MIT" ]
2
2020-10-16T20:06:19.000Z
2020-10-20T01:59:30.000Z
data_collection/gazette/spiders/mg_associacao_municipios.py
Jefersonalves/diario-oficial
9a4bdfe2e31414c993d88831a67160c49a5ee657
[ "MIT" ]
4
2021-02-10T02:36:48.000Z
2022-03-02T14:55:34.000Z
data_collection/gazette/spiders/mg_associacao_municipios.py
Jefersonalves/diario-oficial
9a4bdfe2e31414c993d88831a67160c49a5ee657
[ "MIT" ]
null
null
null
from gazette.spiders.base import SigpubGazetteSpider class MgAssociacaoMunicipiosSpider(SigpubGazetteSpider): name = "mg_associacao_municipios" TERRITORY_ID = "3100000" CALENDAR_URL = "http://www.diariomunicipal.com.br/amm-mg"
30.125
61
0.788382
d78b8a31ba522378e07ebe572fea755e7708b306
13,230
py
Python
jasmin/routing/Routes.py
paradiseng/jasmin
16c54261a6a1a82db64311ee2a235f6c966c14ab
[ "Apache-2.0" ]
750
2015-01-02T23:09:54.000Z
2022-03-29T11:00:29.000Z
jasmin/routing/Routes.py
diwacreation3/jasmin
16c54261a6a1a82db64311ee2a235f6c966c14ab
[ "Apache-2.0" ]
806
2015-01-01T16:17:06.000Z
2022-03-29T20:36:03.000Z
jasmin/routing/Routes.py
diwacreation3/jasmin
16c54261a6a1a82db64311ee2a235f6c966c14ab
[ "Apache-2.0" ]
509
2015-01-16T20:15:25.000Z
2022-03-30T12:57:03.000Z
# pylint: disable=W0401,W0611,W0231 """ More info: http://docs.jasminsms.com/en/latest/routing/index.html """ import random from jasmin.routing.Bills import SubmitSmBill from jasmin.routing.Filters import Filter from jasmin.routing.Routables import Routable from jasmin.routing.jasminApi import * class InvalidRouteP...
34.724409
108
0.621315
d7f8a47a65f25d7561c83bcc474896f4ce941ee7
935
py
Python
google-sheet-api.py
blaze1522/iiserp-sem6
38a2aea3a82e3771099a0eedfcdd953a727f749a
[ "MIT" ]
null
null
null
google-sheet-api.py
blaze1522/iiserp-sem6
38a2aea3a82e3771099a0eedfcdd953a727f749a
[ "MIT" ]
2
2021-02-10T11:26:31.000Z
2021-02-11T08:27:20.000Z
google-sheet-api.py
blaze1522/iiserp-sem6
38a2aea3a82e3771099a0eedfcdd953a727f749a
[ "MIT" ]
2
2021-02-10T09:06:30.000Z
2021-08-07T19:02:50.000Z
import gspread import pandas as pd import os # Documentation: https://gspread.readthedocs.io/en/latest/oauth2.html # Linux: Move service_account.json to ~/.config/gspread/service_account.json # Windows: Add %APPDATA%\gspread\service_account.json to PATH variable gc = gspread.service_account() #Or move servi...
33.392857
81
0.690909
375a9712e990f4ef6d09113dd86ee2a9b6482946
3,921
py
Python
zcommon/shell.py
LamaAni/zcommon.py
4d2df1d431638edc439fff09981a0458c3a8dea8
[ "MIT" ]
null
null
null
zcommon/shell.py
LamaAni/zcommon.py
4d2df1d431638edc439fff09981a0458c3a8dea8
[ "MIT" ]
null
null
null
zcommon/shell.py
LamaAni/zcommon.py
4d2df1d431638edc439fff09981a0458c3a8dea8
[ "MIT" ]
null
null
null
import os import sys import logging from typing import List from enum import Enum try: import colorama colorama.init() except Exception: pass class OS_SIMPLE_TYPES(Enum): windows = "windows" linux = "linux" mac = "mac" other = "other" OS_TYPE: OS_SIMPLE_TYPES = OS_SIMPLE_TYPES.other i...
28.208633
114
0.624586
9ec87809cc0a9358d98c31876fc29dfd335dc53c
388
py
Python
pyfe/context.py
sparkingdark/PyFE
2a437f1043826c8b76231196306a96f9629a0e9b
[ "Apache-2.0" ]
37
2020-05-22T15:24:48.000Z
2021-12-07T16:47:43.000Z
pyfe/context.py
sparkingdark/PyFE
2a437f1043826c8b76231196306a96f9629a0e9b
[ "Apache-2.0" ]
3
2020-06-09T10:30:28.000Z
2021-09-12T14:04:37.000Z
pyfe/context.py
sparkingdark/PyFE
2a437f1043826c8b76231196306a96f9629a0e9b
[ "Apache-2.0" ]
5
2020-05-26T15:26:14.000Z
2021-08-23T15:17:56.000Z
from charm.toolbox.pairinggroup import G1 from charm.toolbox.pairinggroup import G2 from charm.toolbox.pairinggroup import PairingGroup from charm.toolbox.pairinggroup import pair class Context: def __init__(self): self.group = PairingGroup('MNT159') self.g1 = self.group.random(G1) self.g...
25.866667
51
0.716495
ec119a49ae5810dae090d71cacafc6a34db7dc1c
4,439
py
Python
quex/engine/state_machine/check/tail.py
Liby99/quex
45f3d21d5df3307376e175cca2d8473e26cb5622
[ "MIT" ]
null
null
null
quex/engine/state_machine/check/tail.py
Liby99/quex
45f3d21d5df3307376e175cca2d8473e26cb5622
[ "MIT" ]
1
2022-01-31T18:08:44.000Z
2022-01-31T18:08:44.000Z
quex/engine/state_machine/check/tail.py
Liby99/quex
45f3d21d5df3307376e175cca2d8473e26cb5622
[ "MIT" ]
null
null
null
# Project Quex (http://quex.sourceforge.net); License: MIT; # (C) 2005-2020 Frank-Rene Schaefer; #_______________________________________________________________________________ """PURPOSE: Given two state machines A and T, determine whether A ends with T. """ import quex.engine.state_machine.check.outrun ...
39.990991
83
0.623113
58ba25256ef7160140001b4bea776928b7455a3c
9,513
py
Python
InfoField.py
tyomies123/asteroid-game
aa2b198fc6da88d3c988edec52cef372f893ae4d
[ "MIT" ]
1
2019-12-17T18:42:20.000Z
2019-12-17T18:42:20.000Z
InfoField.py
tyomies123/asteroid-game
aa2b198fc6da88d3c988edec52cef372f893ae4d
[ "MIT" ]
null
null
null
InfoField.py
tyomies123/asteroid-game
aa2b198fc6da88d3c988edec52cef372f893ae4d
[ "MIT" ]
null
null
null
import pygame from Boundary import Boundary from DisplayObject import DisplayObject #Creating numbers to display player ammo, hp and enemy hp class NumberFactory(): def __init__(self): self.numbers = {'0':'assets/zero.png', '1':'assets/one.png', '2' :'assets/two.png', '3':'assets/three.png', ...
38.51417
126
0.582676
01d264ec393aea159c76a34caeadb7c5bd885b1e
574
py
Python
ledpi_controller/yaml_processor.py
muhlba91/ledpi-controller
5cb8bdd40b4fc26a8c9bfb7b3394b6b53e60780b
[ "MIT" ]
1
2021-01-23T12:40:34.000Z
2021-01-23T12:40:34.000Z
ledpi_controller/yaml_processor.py
muhlba91/ledpi-controller
5cb8bdd40b4fc26a8c9bfb7b3394b6b53e60780b
[ "MIT" ]
3
2021-01-08T09:55:51.000Z
2021-05-13T08:39:13.000Z
ledpi_controller/yaml_processor.py
muhlba91/ledpi-controller
5cb8bdd40b4fc26a8c9bfb7b3394b6b53e60780b
[ "MIT" ]
null
null
null
"""YAML reader and writer.""" import yaml from ledpi_controller.state import State class YamlProcessor: def __init__(self, file): self.file = file def load(self): with open(self.file) as stream: return yaml.unsafe_load(stream) def write(self, doc): with open(self.fi...
21.259259
55
0.618467
5dbacf0e7319f9ce36ea5101deb9efb91909d19c
2,094
py
Python
compiler/modules/hierarchical_predecode2x4.py
panicmarvin/OpenRAM
abf47bab50adb48337c59b72ccd6023c1999f3fc
[ "BSD-3-Clause" ]
null
null
null
compiler/modules/hierarchical_predecode2x4.py
panicmarvin/OpenRAM
abf47bab50adb48337c59b72ccd6023c1999f3fc
[ "BSD-3-Clause" ]
null
null
null
compiler/modules/hierarchical_predecode2x4.py
panicmarvin/OpenRAM
abf47bab50adb48337c59b72ccd6023c1999f3fc
[ "BSD-3-Clause" ]
1
2020-01-23T07:12:52.000Z
2020-01-23T07:12:52.000Z
from tech import drc import debug import design from vector import vector from hierarchical_predecode import hierarchical_predecode class hierarchical_predecode2x4(hierarchical_predecode): """ Pre 2x4 decoder used in hierarchical_decoder. """ def __init__(self): hierarchical_predecode.__init__(...
34.327869
99
0.56829
6c04876685227a179a01f42de39c1d4cf314d94a
1,913
py
Python
molpy/molpy.py
Lihua1990/molpy
b4284fdc06ced9429f67f540a7e383c23415a6dc
[ "MIT" ]
1
2020-03-11T10:46:48.000Z
2020-03-11T10:46:48.000Z
molpy/molpy.py
Lihua1990/molpy
b4284fdc06ced9429f67f540a7e383c23415a6dc
[ "MIT" ]
3
2020-02-12T14:59:39.000Z
2020-02-13T17:34:13.000Z
molpy/molpy.py
Lihua1990/molpy
b4284fdc06ced9429f67f540a7e383c23415a6dc
[ "MIT" ]
null
null
null
""" molpy.py A really cool molecule manipulation package. Handles the primary functions """ from .util import distance import numpy as np def canvas(with_attribution=True): """ Placeholder function to show example docstring (NumPy format) Replace this function and doc string for your own project Par...
24.844156
74
0.658651
32f024e0e298cb7d08a18c693dc4be6193e4059c
22,354
py
Python
src/azure-cli/azure/cli/command_modules/acs/_params.py
bim-msft/azure-cli
c673f94fdef812f6cbd46118b62584d3169d1d38
[ "MIT" ]
1
2020-11-29T19:26:37.000Z
2020-11-29T19:26:37.000Z
src/azure-cli/azure/cli/command_modules/acs/_params.py
bim-msft/azure-cli
c673f94fdef812f6cbd46118b62584d3169d1d38
[ "MIT" ]
2
2021-01-15T09:24:07.000Z
2021-01-15T09:30:10.000Z
src/azure-cli/azure/cli/command_modules/acs/_params.py
bim-msft/azure-cli
c673f94fdef812f6cbd46118b62584d3169d1d38
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
63.68661
203
0.695625
75bbaa25e281f230fb9622ccebcf399e6f7b4b1c
5,192
py
Python
kashgari/embeddings/word_embedding.py
ericperfect/Bert_Position_BiLSTM_Attention_CRF_LSTMDecoder
6c38d25572612ffc74c9c35c3e9c7382deca334c
[ "Apache-2.0" ]
16
2020-12-02T13:44:20.000Z
2022-03-16T00:49:34.000Z
kashgari/embeddings/word_embedding.py
ericperfect/Bert_Position_BiLSTM_Attention_CRF_LSTMDecoder
6c38d25572612ffc74c9c35c3e9c7382deca334c
[ "Apache-2.0" ]
1
2022-01-11T08:14:05.000Z
2022-02-25T09:29:17.000Z
kashgari/embeddings/word_embedding.py
ericperfect/Bert_Position_BiLSTM_Attention_CRF_LSTMDecoder
6c38d25572612ffc74c9c35c3e9c7382deca334c
[ "Apache-2.0" ]
3
2021-06-18T00:00:58.000Z
2022-03-26T11:35:24.000Z
# encoding: utf-8 # author: BrikerMan # contact: eliyar917@gmail.com # blog: https://eliyar.biz # file: w2v_embedding.py # time: 2019-05-20 17:32 import logging from typing import Union, Optional, Dict, Any, List, Tuple import numpy as np from gensim.models import KeyedVectors from tensorflow import keras from kas...
37.352518
119
0.565678
4c691151fd07b1b90dedbc0d9906cc4cf3bf2f45
10,208
py
Python
neutron/tests/unit/test_agent_netns_cleanup.py
petrutlucian94/neutron
44976d12bbe72331e536d92bb46e35a8835a75ce
[ "Apache-2.0" ]
1
2016-04-23T21:33:31.000Z
2016-04-23T21:33:31.000Z
neutron/tests/unit/test_agent_netns_cleanup.py
petrutlucian94/neutron
44976d12bbe72331e536d92bb46e35a8835a75ce
[ "Apache-2.0" ]
null
null
null
neutron/tests/unit/test_agent_netns_cleanup.py
petrutlucian94/neutron
44976d12bbe72331e536d92bb46e35a8835a75ce
[ "Apache-2.0" ]
4
2015-04-14T10:06:51.000Z
2019-10-02T01:28:34.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 OpenStack Foundation. # 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....
40.031373
79
0.596199
a24197bdc12551f74b204be6c69eb5c06250bbfd
1,708
py
Python
dreamplace/ops/fence_region/figures.py
Eternity666/DREAMPlace
f694cddc39486e3ef2d5ae36431d8b21d1c397bd
[ "BSD-3-Clause" ]
323
2019-02-28T10:09:53.000Z
2022-03-24T04:00:01.000Z
dreamplace/ops/fence_region/figures.py
Eternity666/DREAMPlace
f694cddc39486e3ef2d5ae36431d8b21d1c397bd
[ "BSD-3-Clause" ]
61
2019-06-10T08:47:09.000Z
2022-03-31T13:38:18.000Z
dreamplace/ops/fence_region/figures.py
Eternity666/DREAMPlace
f694cddc39486e3ef2d5ae36431d8b21d1c397bd
[ "BSD-3-Clause" ]
109
2019-03-22T17:32:16.000Z
2022-03-26T14:31:05.000Z
from math import sqrt from shapely import affinity GM = (sqrt(5) - 1.0) / 2.0 W = 8.0 H = W * GM SIZE = (W, H) BLUE = "#6699cc" GRAY = "#999999" DARKGRAY = "#333333" YELLOW = "#ffcc33" GREEN = "#339933" RED = "#ff3333" BLACK = "#000000" COLOR_ISVALID = { True: BLUE, False: RED, } def plot_line(ax, ob, colo...
23.081081
103
0.62822
4b578a72282cccc67d98179b009bf7c28e0030db
86,398
py
Python
tests/test_utils/test_box3d.py
konyul/monovideo
f50db55c324c2ab4a66d414b47f0558b72a3a009
[ "Apache-2.0" ]
5
2022-01-26T13:03:12.000Z
2022-01-27T03:59:09.000Z
tests/test_utils/test_box3d.py
konyul/monovideo
f50db55c324c2ab4a66d414b47f0558b72a3a009
[ "Apache-2.0" ]
1
2022-03-31T08:33:12.000Z
2022-03-31T08:35:55.000Z
tests/test_utils/test_box3d.py
konyul/monovideo
f50db55c324c2ab4a66d414b47f0558b72a3a009
[ "Apache-2.0" ]
1
2022-03-30T04:08:39.000Z
2022-03-30T04:08:39.000Z
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch import unittest from mmdet3d.core.bbox import (BaseInstance3DBoxes, Box3DMode, CameraInstance3DBoxes, Coord3DMode, DepthInstance3DBoxes, LiDARInstance3DBoxes, ...
48.105791
79
0.486122
f9414fa3c9430d5a01340b2642f8ee129162b91b
1,039
py
Python
dynamic_storages/tests/fields/test_dynamic_storage_fields.py
mcclory/django-dynamic-storages
3e7be3cf1b53faa20c8f52ed29384aed23fa5fd0
[ "BSD-3-Clause" ]
2
2021-03-06T03:13:21.000Z
2021-03-06T15:02:31.000Z
dynamic_storages/tests/fields/test_dynamic_storage_fields.py
mcclory/django-dynamic-storages
3e7be3cf1b53faa20c8f52ed29384aed23fa5fd0
[ "BSD-3-Clause" ]
null
null
null
dynamic_storages/tests/fields/test_dynamic_storage_fields.py
mcclory/django-dynamic-storages
3e7be3cf1b53faa20c8f52ed29384aed23fa5fd0
[ "BSD-3-Clause" ]
null
null
null
import glob import os import random from django.core.management.utils import get_random_secret_key from test_plus.test import TestCase from .. import TEST_FILES_DIR, TEST_IMAGES_DIR from ..factories import TestFileStorageModelFactory, TestImageStorageModelFactory from ..models import TestFileStorageModel, TestImageSt...
28.861111
81
0.712223
db6dfa26311c6c35be436904d176504d76f42fd7
767
py
Python
daktari/os.py
sonocent/daktari
41528a87ce83305bef5acd86df7705fd96535113
[ "MIT" ]
1
2022-01-27T15:38:08.000Z
2022-01-27T15:38:08.000Z
daktari/os.py
sonocent/daktari
41528a87ce83305bef5acd86df7705fd96535113
[ "MIT" ]
7
2021-05-18T09:45:02.000Z
2021-12-06T17:26:57.000Z
daktari/os.py
sonocent/daktari
41528a87ce83305bef5acd86df7705fd96535113
[ "MIT" ]
null
null
null
import logging from os import environ import distro class OS: OS_X = "osx" GENERIC = "generic" UBUNTU = "ubuntu" def detect_os() -> str: (id_name, _, _) = distro.linux_distribution() if id_name == "Darwin": return OS.OS_X elif id_name == "Ubuntu": return OS.UBUNTU else: ...
20.72973
67
0.629726
ff561ddbf0e37afad1b4ed69c49b4c46a03dce26
5,927
py
Python
src/quicknlp/models/cvae.py
jalajthanaki/quick-nlp
861a54c9e30de076a2316cb6712d934de4058cc5
[ "MIT" ]
287
2018-04-10T10:58:09.000Z
2022-03-22T02:05:40.000Z
src/quicknlp/models/cvae.py
scutcyr/quick-nlp
861a54c9e30de076a2316cb6712d934de4058cc5
[ "MIT" ]
1
2018-07-03T17:10:03.000Z
2018-07-03T17:10:03.000Z
src/quicknlp/models/cvae.py
scutcyr/quick-nlp
861a54c9e30de076a2316cb6712d934de4058cc5
[ "MIT" ]
51
2018-04-10T11:38:02.000Z
2021-10-17T06:23:43.000Z
from typing import List, Union import torch import torch.nn as nn from fastai.core import V, to_gpu from quicknlp.utils import assert_dims, concat_bidir_state from .hred import HRED HParam = Union[List[int], int] class CVAE(HRED): """Basic CVAE model see: T. Zhao, R. Zhao, and M. Eskenazi, “Learning Discou...
55.392523
180
0.626118
c8efed3e79232b9516d7cc9ae932653eb4f75e46
6,780
py
Python
LAB2/search.py
Yalfoosh/UI-Labosi
6c8f5796cafe603012ae94b9bd2adf4642c6a1e2
[ "Apache-2.0" ]
null
null
null
LAB2/search.py
Yalfoosh/UI-Labosi
6c8f5796cafe603012ae94b9bd2adf4642c6a1e2
[ "Apache-2.0" ]
null
null
null
LAB2/search.py
Yalfoosh/UI-Labosi
6c8f5796cafe603012ae94b9bd2adf4642c6a1e2
[ "Apache-2.0" ]
3
2018-03-26T13:40:24.000Z
2019-06-07T14:02:26.000Z
import util import copy from util import Queue from game import Directions from game import Agent from game import Actions class SearchNode: """ This class represents a node in the graph which represents the search problem. """ def __init__(self, position, parent=None, transition=None, cost=0, heuris...
33.564356
107
0.629056
c3e4286d0adb48d3480fbad791ca4095e9bbbefa
7,317
py
Python
test/ibm/test_filter_backends.py
daka1510/qiskit-ibm-provider
74fdae4457e6f15ba445a8742a25ac7a714ea51b
[ "Apache-2.0" ]
null
null
null
test/ibm/test_filter_backends.py
daka1510/qiskit-ibm-provider
74fdae4457e6f15ba445a8742a25ac7a714ea51b
[ "Apache-2.0" ]
null
null
null
test/ibm/test_filter_backends.py
daka1510/qiskit-ibm-provider
74fdae4457e6f15ba445a8742a25ac7a714ea51b
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
36.954545
85
0.620473
3a6c737c69972a0d3ec2697b0c807170c6786cc6
528
py
Python
blog/urls.py
TeeblaQ1/zuriblogapp
dd3759358deee2169fadc1c900a98a8dcac03adc
[ "MIT" ]
null
null
null
blog/urls.py
TeeblaQ1/zuriblogapp
dd3759358deee2169fadc1c900a98a8dcac03adc
[ "MIT" ]
null
null
null
blog/urls.py
TeeblaQ1/zuriblogapp
dd3759358deee2169fadc1c900a98a8dcac03adc
[ "MIT" ]
null
null
null
from django.urls import path from .views import BlogListView, BlogCreateView, BlogUpdateView, BlogDeleteView, postDetailView urlpatterns = [ path('', BlogListView.as_view(), name='home'), #path('post/<int:pk>', BlogDetailView.as_view(), name='detail'), path('post/<int:pk>', postDetailView, name='detail'), ...
44
95
0.691288
8f8d0a100280505d76de69ac794099396de17a02
8,572
py
Python
sdk/python/pulumi_aws/ebs/snapshot.py
mdop-wh/pulumi-aws
05bb32e9d694dde1c3b76d440fd2cd0344d23376
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ebs/snapshot.py
mdop-wh/pulumi-aws
05bb32e9d694dde1c3b76d440fd2cd0344d23376
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ebs/snapshot.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 ...
38.78733
145
0.616776
a3d2723d7d7532ea6a79a48373f71eaa14200f09
2,490
py
Python
sql-cli/tests/test_opensearchsql_cli.py
amarouane-ABDELHAK/sql
2bacfca74d5fb15a7dc3a78e138cb19ad4c8fe40
[ "Apache-2.0" ]
null
null
null
sql-cli/tests/test_opensearchsql_cli.py
amarouane-ABDELHAK/sql
2bacfca74d5fb15a7dc3a78e138cb19ad4c8fe40
[ "Apache-2.0" ]
null
null
null
sql-cli/tests/test_opensearchsql_cli.py
amarouane-ABDELHAK/sql
2bacfca74d5fb15a7dc3a78e138cb19ad4c8fe40
[ "Apache-2.0" ]
null
null
null
""" Copyright OpenSearch Contributors SPDX-License-Identifier: Apache-2.0 """ import mock import pytest from prompt_toolkit.shortcuts import PromptSession from prompt_toolkit.input.defaults import create_pipe_input from src.opensearch_sql_cli.opensearch_buffer import opensearch_is_multiline from .utils import estest,...
37.164179
132
0.704016
51289e0c67dc081a7864914957a2a0dc296da9f9
11,200
py
Python
Ch06_Code/GUI_queues_put_get.py
arifmudi/Python-GUI-Programming-Cookbook-Third-Edition
942c151a62ef422bb6fdd15b4b141a07c699cb9a
[ "MIT" ]
68
2019-08-23T10:54:38.000Z
2022-03-09T20:21:39.000Z
Ch06_Code/GUI_queues_put_get.py
arifmudi/Python-GUI-Programming-Cookbook-Third-Edition
942c151a62ef422bb6fdd15b4b141a07c699cb9a
[ "MIT" ]
null
null
null
Ch06_Code/GUI_queues_put_get.py
arifmudi/Python-GUI-Programming-Cookbook-Third-Edition
942c151a62ef422bb6fdd15b4b141a07c699cb9a
[ "MIT" ]
46
2019-09-03T18:04:29.000Z
2022-03-30T01:06:52.000Z
''' Created on May 28, 2019 Ch06 @author: Burkhard A. Meier ''' #====================== # imports #====================== import tkinter as tk from tkinter import ttk from tkinter import scrolledtext from tkinter import Menu from tkinter import messagebox as msg from tkinter import Spinbox from time impor...
41.481481
135
0.540268
e94309cb7dbfd72122e8a71de882bfe8b6d1a4ee
800
py
Python
src/noise.py
quangduyhcmut/Simple_Image_ProcessinUIg_G
546bf33ee4ad0904594dfe702e7c864472c617bc
[ "MIT" ]
null
null
null
src/noise.py
quangduyhcmut/Simple_Image_ProcessinUIg_G
546bf33ee4ad0904594dfe702e7c864472c617bc
[ "MIT" ]
null
null
null
src/noise.py
quangduyhcmut/Simple_Image_ProcessinUIg_G
546bf33ee4ad0904594dfe702e7c864472c617bc
[ "MIT" ]
null
null
null
import cv2 import numpy as np from skimage.util import random_noise # Load the image img = cv2.imread("input/Lenna.png") # Add salt-and-pepper noise to the image. noise_img = random_noise(img, mode='s&p',amount=0.3) # The above function returns a floating-point image # on the range [0, 1], thus we changed it to '...
29.62963
68
0.75125
7f7d9b7ea377a792bc7e1c3099f4b38f9e2cdc6c
10,500
py
Python
tools/build_travis.py
Eric-Yang-China/core
26e9aa4b4e79a589c579a4880f0fbb36343d4100
[ "Apache-2.0" ]
null
null
null
tools/build_travis.py
Eric-Yang-China/core
26e9aa4b4e79a589c579a4880f0fbb36343d4100
[ "Apache-2.0" ]
null
null
null
tools/build_travis.py
Eric-Yang-China/core
26e9aa4b4e79a589c579a4880f0fbb36343d4100
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2 """ Travis-CI build script mbed SDK Copyright (c) 2011-2013 ARM Limited 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 Unle...
56.756757
151
0.521143
b8fb32d8bbd66f2ce6c52058c1b4fea0c623bab7
6,392
py
Python
BeMAp_package/alignment/make_target_centered.py
yusuketsuda/BeMAp
b64608730e5a819f83170e34c72a7b3d609ff12c
[ "MIT" ]
null
null
null
BeMAp_package/alignment/make_target_centered.py
yusuketsuda/BeMAp
b64608730e5a819f83170e34c72a7b3d609ff12c
[ "MIT" ]
null
null
null
BeMAp_package/alignment/make_target_centered.py
yusuketsuda/BeMAp
b64608730e5a819f83170e34c72a7b3d609ff12c
[ "MIT" ]
null
null
null
from Bio import SeqIO import pandas as pd import numpy as np import math import re import os def invert_new(pdDataFrame, No_genes, pd_column_index, gene_description): pdDataFrame_dict = pdDataFrame.to_dict() new_pdDataFrame_dict = {} for i in No_genes.index: new_pdDataFrame_dict[i] = list(pdDataFr...
43.482993
142
0.629537
407a9244e727197497bf01ebcc8c36a1738cb867
2,613
py
Python
test/test_chain.py
micetti/TweetsOnBlocks
e9355a0d35c0bfe1755d80fc64ae2d781c762e30
[ "MIT" ]
null
null
null
test/test_chain.py
micetti/TweetsOnBlocks
e9355a0d35c0bfe1755d80fc64ae2d781c762e30
[ "MIT" ]
null
null
null
test/test_chain.py
micetti/TweetsOnBlocks
e9355a0d35c0bfe1755d80fc64ae2d781c762e30
[ "MIT" ]
null
null
null
from blockchain.chain import Chain from blockchain.block import Block class TestChain: def test_chain_constructor(self): test_chain = Chain() assert len(test_chain.chain) == 1 assert type(test_chain.get_latest_block()) == Block assert test_chain.get_latest_block().data == 'first Bl...
31.107143
69
0.667432
802cc2e89354c42324a89144bc4f24ad1a134ed4
6,729
py
Python
onnxruntime/test/testdata/transform/fusion/matmul_scale_gen.py
smkarlap/onnxruntime
417929b049829c44bcd59c0d0eae7ae6c71ab111
[ "MIT" ]
1
2022-03-11T18:47:48.000Z
2022-03-11T18:47:48.000Z
onnxruntime/test/testdata/transform/fusion/matmul_scale_gen.py
Nifury/onnxruntime
7871c4b16f33634d83ef8b3e3f25ae80e9ec0f26
[ "MIT" ]
null
null
null
onnxruntime/test/testdata/transform/fusion/matmul_scale_gen.py
Nifury/onnxruntime
7871c4b16f33634d83ef8b3e3f25ae80e9ec0f26
[ "MIT" ]
null
null
null
import onnx from onnx import helper from onnx import TensorProto from onnx import OperatorSetIdProto onnxdomain = OperatorSetIdProto() onnxdomain.version = 12 # The empty string ("") or absence of this field implies the operator set that is defined as part of the ONNX specification. onnxdomain.domain = "" msdomain = ...
30.447964
124
0.622975
f2da688c3f79a83f6f1258d4ece76d43e48e4bfb
871
py
Python
api/views.py
ahasan09/drf_shoestore
3e8ba29f48dc968c36fae29184f370f1f89385f6
[ "MIT" ]
null
null
null
api/views.py
ahasan09/drf_shoestore
3e8ba29f48dc968c36fae29184f370f1f89385f6
[ "MIT" ]
null
null
null
api/views.py
ahasan09/drf_shoestore
3e8ba29f48dc968c36fae29184f370f1f89385f6
[ "MIT" ]
null
null
null
from rest_framework import viewsets from django.shortcuts import render from .serializer import ShoeSerializer, ShoeTypeSerializer, ShoeColorSerializer, ManufacturerSerializer from .models import Shoe, ShoeType, ShoeColor, Manufacturer # Create your views here. def index(request): return render(request, 'index.h...
28.096774
103
0.789897
e5a3385c7e8cb3c9fe56c26bf4413655dacd9574
2,921
py
Python
internals/approval_defs.py
Acidburn0zzz/chromium-dashboard
dabcfb780f28c2d81f55b7bfc8df3cf77f22ec7d
[ "Apache-2.0" ]
2
2016-07-03T21:00:15.000Z
2021-04-16T07:53:50.000Z
internals/approval_defs.py
FarhanAliRaza/chromium-dashboard
dabcfb780f28c2d81f55b7bfc8df3cf77f22ec7d
[ "Apache-2.0" ]
null
null
null
internals/approval_defs.py
FarhanAliRaza/chromium-dashboard
dabcfb780f28c2d81f55b7bfc8df3cf77f22ec7d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2021 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
28.920792
74
0.725094
79da2f9d080a212e1343dab6176e0f13ab95078b
512
py
Python
hackerrank/Python/Integers Come In All Sizes/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
4
2020-07-24T01:59:50.000Z
2021-07-24T15:14:08.000Z
hackerrank/Python/Integers Come In All Sizes/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
hackerrank/Python/Integers Come In All Sizes/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
import io import unittest from contextlib import redirect_stdout from unittest.mock import patch class TestQ(unittest.TestCase): @patch('builtins.input', side_effect=[ '9', '29', '7', '27', ]) def test_case_0(self, input_mock=None): text_trap = io.StringIO() ...
22.26087
80
0.642578
69a86b461aff4417a8820f6ea0a8b8fdd652e8b6
8,692
py
Python
mr_reduction/mr_direct_beam_finder.py
mdoucet/MagnetismReflectometer
f5e25682ce95ff4e8799627ad8ff01583d0d3990
[ "Apache-2.0" ]
null
null
null
mr_reduction/mr_direct_beam_finder.py
mdoucet/MagnetismReflectometer
f5e25682ce95ff4e8799627ad8ff01583d0d3990
[ "Apache-2.0" ]
1
2020-05-28T14:24:14.000Z
2020-05-28T14:24:14.000Z
mr_reduction/mr_direct_beam_finder.py
mdoucet/MagnetismReflectometer
f5e25682ce95ff4e8799627ad8ff01583d0d3990
[ "Apache-2.0" ]
null
null
null
#pylint: disable=bare-except, invalid-name, too-many-nested-blocks, too-many-arguments, too-many-instance-attributes, too-many-locals, too-few-public-methods """ Find a suitable direct beam file for a data set. """ from __future__ import (absolute_import, division, print_function) import sys import json import math...
46.983784
157
0.514266
a0f4d89914ef72109da888e3354f7264315b66f3
188
py
Python
Curso/ExMundo1/Ex006DobroTriploRaizQ.py
DavidBitner/Aprendizado-Python
e1dcf18f9473c697fc2302f34a2d3e025ca6c969
[ "MIT" ]
null
null
null
Curso/ExMundo1/Ex006DobroTriploRaizQ.py
DavidBitner/Aprendizado-Python
e1dcf18f9473c697fc2302f34a2d3e025ca6c969
[ "MIT" ]
null
null
null
Curso/ExMundo1/Ex006DobroTriploRaizQ.py
DavidBitner/Aprendizado-Python
e1dcf18f9473c697fc2302f34a2d3e025ca6c969
[ "MIT" ]
null
null
null
n = int(input('Digite um numero:')) print('O dobro do numero é: {}!'.format(n*2)) print('O triplo do numero é: {}!'.format(n*3)) print('A raiz quadrada do numero é: {}!'.format(n**(1/2)))
37.6
58
0.617021
6c56a5776dd567bd25d3d3c1adeb6a609d474a66
10,931
py
Python
src/oci/license_manager/models/create_license_record_details.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/license_manager/models/create_license_record_details.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/license_manager/models/create_license_record_details.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
32.055718
245
0.64898
89f040bf8547c56db424411ceee615bb3bb6f7a5
1,013
py
Python
myapp/models.py
coderrohanpahwa/events
fa3180de0f8214955bc075a305612103d532eefd
[ "MIT" ]
null
null
null
myapp/models.py
coderrohanpahwa/events
fa3180de0f8214955bc075a305612103d532eefd
[ "MIT" ]
null
null
null
myapp/models.py
coderrohanpahwa/events
fa3180de0f8214955bc075a305612103d532eefd
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class DetailsOfEvent(models.Model): name=models.CharField(max_length=100) description=models.TextField() date=models.DateField() def __str__(self): return self.name choices=( ("Organise","organise"), ("Attend","Attend"), ("Spo...
29.794118
61
0.711747
20a8b422823177cb6f6dbf205e46e4474a4babe2
403
py
Python
simple-ui/web_app.py
ankitshaw/Question-Answering-System
38b64799526c02af580e768a3989771ab05e2f81
[ "MIT" ]
null
null
null
simple-ui/web_app.py
ankitshaw/Question-Answering-System
38b64799526c02af580e768a3989771ab05e2f81
[ "MIT" ]
null
null
null
simple-ui/web_app.py
ankitshaw/Question-Answering-System
38b64799526c02af580e768a3989771ab05e2f81
[ "MIT" ]
null
null
null
"""Main module for the streamlit app""" import streamlit as st import pages.upload import pages.search PAGES = { "Search": pages.search, "Upload": pages.upload, } def main(): """Main function of the App""" st.sidebar.title("Navigation") selection = st.sidebar.radio("Go to", list(PAGES.keys())) ...
18.318182
61
0.645161
f175e6d707da7ca4f962909d5b28bf9345f21471
14,215
py
Python
tests/oauth1/rfc5849/endpoints/test_base.py
kdazzle/oauthlib
b1a902c822c869da8a465e4fe472bd29075fc7a9
[ "BSD-3-Clause" ]
null
null
null
tests/oauth1/rfc5849/endpoints/test_base.py
kdazzle/oauthlib
b1a902c822c869da8a465e4fe472bd29075fc7a9
[ "BSD-3-Clause" ]
null
null
null
tests/oauth1/rfc5849/endpoints/test_base.py
kdazzle/oauthlib
b1a902c822c869da8a465e4fe472bd29075fc7a9
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals, absolute_import from mock import MagicMock from re import sub from ....unittest import TestCase from oauthlib.common import safe_string_equals from oauthlib.oauth1 import Client, RequestValidator from oauthlib.oauth1.rfc5849 import errors, SIGNATURE_RSA, SIGNATURE_HMAC from oa...
39.706704
88
0.623145
d9772733c613d0d881cea43eee55a1234f8b9fa7
1,790
py
Python
billing/models/amazon_fps_models.py
litchfield/merchant
e4fba8a88a326bbde39c26e937c17d5283817320
[ "BSD-3-Clause" ]
null
null
null
billing/models/amazon_fps_models.py
litchfield/merchant
e4fba8a88a326bbde39c26e937c17d5283817320
[ "BSD-3-Clause" ]
null
null
null
billing/models/amazon_fps_models.py
litchfield/merchant
e4fba8a88a326bbde39c26e937c17d5283817320
[ "BSD-3-Clause" ]
null
null
null
from django.db import models class AmazonFPSResponse(models.Model): """ See This doc for a list of fields available, and what they mean. http://docs.aws.amazon.com/AmazonFPS/latest/FPSAPIReference/AWSFPSIPNDetails.html """ buyerEmail = models.EmailField() buyerName = models.CharField(max_length=75) ...
45.897436
89
0.743017
f576648837b3641a368a50270e538e64d7099c56
900
py
Python
step1_choose_center.py
JunchuangYang/DensityPeakCluster-
9af56be896ef523ae07251ab09b6e9dc6c662316
[ "MIT" ]
8
2019-09-10T12:44:06.000Z
2021-11-05T16:12:54.000Z
step1_choose_center.py
tenglang123/DensityPeakCluster-2
9af56be896ef523ae07251ab09b6e9dc6c662316
[ "MIT" ]
null
null
null
step1_choose_center.py
tenglang123/DensityPeakCluster-2
9af56be896ef523ae07251ab09b6e9dc6c662316
[ "MIT" ]
4
2019-12-10T01:15:46.000Z
2022-01-11T11:27:20.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- import logging from plot import * from cluster import * def plot(data, auto_select_dc = False): logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) dpcluster = DensityPeakCluster() ''' rho:各个点的局部密度的数组 rc:截断距离 ''' distances, m...
32.142857
126
0.741111
b8472c4801aa193b9322c9070cd5602a87dc0334
1,190
py
Python
app/core/models.py
nouman-10/RestAPI-for-Recipes
9f73cb07a6803ee3491729522246a1a39316679e
[ "MIT" ]
null
null
null
app/core/models.py
nouman-10/RestAPI-for-Recipes
9f73cb07a6803ee3491729522246a1a39316679e
[ "MIT" ]
null
null
null
app/core/models.py
nouman-10/RestAPI-for-Recipes
9f73cb07a6803ee3491729522246a1a39316679e
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import ( AbstractBaseUser, BaseUserManager, PermissionsMixin, ) class UserManager(BaseUserManager): def create_user(self, email, password=None, **extra_fields): """Creates and saves a new user""" if not email: rai...
29.02439
76
0.681513
6341ee034d1a7d38e256129808c7cf57aa65bbed
10,090
py
Python
src/test/tests/plots/mesh.py
cstatz/visit
f352f3984fa77392e81acbaa6943778a779f0435
[ "BSD-3-Clause" ]
null
null
null
src/test/tests/plots/mesh.py
cstatz/visit
f352f3984fa77392e81acbaa6943778a779f0435
[ "BSD-3-Clause" ]
null
null
null
src/test/tests/plots/mesh.py
cstatz/visit
f352f3984fa77392e81acbaa6943778a779f0435
[ "BSD-3-Clause" ]
1
2020-03-18T23:17:43.000Z
2020-03-18T23:17:43.000Z
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: mesh.py # # Tests: mesh - 3D structured, single domain # - 3D point, single domain # - 2D point, single domain # - 3D unstru...
27.123656
84
0.634985
2005488d2cd373c9a43993d701a2622be88fcf16
4,930
py
Python
appraise/wmt16/validators.py
yuyang-huang/Appraise
05b956e90ec47d79125e71e2f7acacbec37ff4b3
[ "BSD-3-Clause" ]
68
2015-03-20T15:39:30.000Z
2022-03-03T13:44:31.000Z
appraise/wmt16/validators.py
yuyang-huang/Appraise
05b956e90ec47d79125e71e2f7acacbec37ff4b3
[ "BSD-3-Clause" ]
30
2015-04-12T13:14:51.000Z
2021-05-06T11:42:18.000Z
appraise/wmt16/validators.py
yuyang-huang/Appraise
05b956e90ec47d79125e71e2f7acacbec37ff4b3
[ "BSD-3-Clause" ]
24
2016-03-15T09:38:08.000Z
2021-01-06T02:52:43.000Z
# -*- coding: utf-8 -*- """ Project: Appraise evaluation system Author: Christian Federmann <cfedermann@gmail.com> """ import logging from xml.etree.ElementTree import Element, fromstring, ParseError from django.core.exceptions import ValidationError from appraise.settings import LOG_LEVEL, LOG_HANDLER # Setup log...
32.434211
77
0.604868
cbae51646fe06beeea552bc4efe8dcef1eb35cfc
6,104
py
Python
invenio_communities/views/communities.py
rekt-hard/invenio-communities
4711cb9bcd930079c3b237e910781eaadbb4d98b
[ "MIT" ]
null
null
null
invenio_communities/views/communities.py
rekt-hard/invenio-communities
4711cb9bcd930079c3b237e910781eaadbb4d98b
[ "MIT" ]
null
null
null
invenio_communities/views/communities.py
rekt-hard/invenio-communities
4711cb9bcd930079c3b237e910781eaadbb4d98b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016-2021 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Routes for community-related pages provided by Invenio-Communities.""" from flask...
29.77561
79
0.659404
a6d31be122e50d5c091848f87a49de2cd8e4bcf0
4,521
py
Python
notebooks/notebooks/benchmarking.py
grchristensen/avpd
f7617844ae454a93825aa231e04c125cb4e58a20
[ "Apache-2.0" ]
null
null
null
notebooks/notebooks/benchmarking.py
grchristensen/avpd
f7617844ae454a93825aa231e04c125cb4e58a20
[ "Apache-2.0" ]
9
2021-03-04T20:29:54.000Z
2021-03-31T22:03:51.000Z
notebooks/notebooks/benchmarking.py
grchristensen/avpd
f7617844ae454a93825aa231e04c125cb4e58a20
[ "Apache-2.0" ]
3
2021-01-30T02:19:07.000Z
2021-04-11T19:48:37.000Z
import numpy as np from numpy import ndarray # import numpy as np # from tqdm import tqdm # # def texts_from_author(dataset, author, feature_extractor): # author_data = dataset.loc[author] # # author_texts_df = author_data.groupby("text_id") # # def sentences_to_text(group): # group = group.sort_va...
32.292857
89
0.655607
6ca2531834f9d5a6792fd25c4e9f3dfaac8b8719
4,763
py
Python
tests/test_model_sarimax.py
khrapovs/hcl-model
879740e6072c2ff45864040db0b8364b55de1f44
[ "MIT" ]
null
null
null
tests/test_model_sarimax.py
khrapovs/hcl-model
879740e6072c2ff45864040db0b8364b55de1f44
[ "MIT" ]
5
2022-02-09T12:38:04.000Z
2022-02-21T15:25:06.000Z
tests/test_model_sarimax.py
khrapovs/hcl-model
879740e6072c2ff45864040db0b8364b55de1f44
[ "MIT" ]
1
2022-02-17T09:59:22.000Z
2022-02-17T09:59:22.000Z
import pandas as pd from hcl_model.model_sarimax import SARIMAXModel from tests.test_model_common import TestModelCommon class TestSARIMAX(TestModelCommon): def test_model_fit(self) -> None: endog, exog = self.generate_data() model = SARIMAXModel(trend="n") y_train = endog[self.lbl_valu...
38.41129
107
0.636784
4da806ef7fb497258e33215ef6971ea5d50944cd
987
py
Python
Examples/put_worksheet_shape.py
aspose-cells-cloud/aspose-cells-cloud-python
0189236d38053dc67f7edc754b5101f17262cee8
[ "MIT" ]
3
2018-05-23T03:16:26.000Z
2020-11-07T11:42:41.000Z
Examples/put_worksheet_shape.py
aspose-cells-cloud/aspose-cells-cloud-python
0189236d38053dc67f7edc754b5101f17262cee8
[ "MIT" ]
null
null
null
Examples/put_worksheet_shape.py
aspose-cells-cloud/aspose-cells-cloud-python
0189236d38053dc67f7edc754b5101f17262cee8
[ "MIT" ]
4
2018-08-29T18:45:05.000Z
2021-03-25T07:59:56.000Z
import os import sys ABSPATH = os.path.abspath(os.path.realpath(os.path.dirname(__file__)) + "/..") sys.path.append(ABSPATH) import asposecellscloud from asposecellscloud.rest import ApiException from asposecellscloud.apis.cells_api import CellsApi import AuthUtil from asposecellscloud.models import CalculationOptions...
34.034483
158
0.734549
0d90ad908e3e12c564cc0cd472bda639863f3ee9
5,137
py
Python
fasttest/runner/case_analysis.py
Hanlen520/fasttest
f302adabc0250d1540a6bf97605cef81ce929bc2
[ "MIT" ]
17
2020-03-26T10:02:29.000Z
2021-04-22T09:03:44.000Z
fasttest/runner/case_analysis.py
Hanlen520/fasttest
f302adabc0250d1540a6bf97605cef81ce929bc2
[ "MIT" ]
null
null
null
fasttest/runner/case_analysis.py
Hanlen520/fasttest
f302adabc0250d1540a6bf97605cef81ce929bc2
[ "MIT" ]
5
2020-02-21T01:45:09.000Z
2021-04-21T19:59:08.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import re import sys import traceback from fasttest.common import Var from fasttest.runner.action_analysis import ActionAnalysis class CaseAnalysis(object): def __init__(self): self.action_nalysis = ActionAnalysis() self.testcase_steps = [...
43.533898
123
0.455908
58bc325b32677283ad75597f434677782ba4f37b
1,302
py
Python
examples/anscombe_lines_no_points.py
andrewhw/VizThoughts
738a6e05a22a6cb377b61b236c7b894e7d2194c6
[ "CC-BY-4.0" ]
null
null
null
examples/anscombe_lines_no_points.py
andrewhw/VizThoughts
738a6e05a22a6cb377b61b236c7b894e7d2194c6
[ "CC-BY-4.0" ]
null
null
null
examples/anscombe_lines_no_points.py
andrewhw/VizThoughts
738a6e05a22a6cb377b61b236c7b894e7d2194c6
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python # Example adapted from: # https://seaborn.pydata.org/examples/anscombes_quartet.html import sys import pandas as pd import seaborn as sns from matplotlib import pyplot as plt # set overall theme for seaborn plotting sns.set_theme(style="ticks") # Load the example dataset for Anscombe's q...
27.125
71
0.709677
2b77cb895e7b43676a24bcb965a126cb65861981
9,946
py
Python
tests/test_02_dxf_graphics/test_237_mline.py
jpsantos-mf/ezdxf
2b542a551b2cfc3c0920a5dbf302ff58cea90fbd
[ "MIT" ]
1
2021-06-05T09:15:15.000Z
2021-06-05T09:15:15.000Z
tests/test_02_dxf_graphics/test_237_mline.py
jpsantos-mf/ezdxf
2b542a551b2cfc3c0920a5dbf302ff58cea90fbd
[ "MIT" ]
null
null
null
tests/test_02_dxf_graphics/test_237_mline.py
jpsantos-mf/ezdxf
2b542a551b2cfc3c0920a5dbf302ff58cea90fbd
[ "MIT" ]
null
null
null
# Copyright (c) 2018-2020 Manfred Moitzi # License: MIT License from typing import cast import pytest import math from unittest.mock import MagicMock import ezdxf from ezdxf.audit import Auditor from ezdxf.lldxf import const from ezdxf.lldxf.tagwriter import TagCollector from ezdxf.lldxf.tags import Tags from ezdxf.e...
29.252941
74
0.624774
e0cde222a5f5dbe6545c933dad99fd36f05f5531
9,183
py
Python
tests/test_workflow_build_combinations.py
tschoonj/cgat-daisy
f85a2c82ca04f352aad00660cfc14a9aa6773168
[ "MIT" ]
1
2020-06-29T14:39:42.000Z
2020-06-29T14:39:42.000Z
tests/test_workflow_build_combinations.py
tschoonj/cgat-daisy
f85a2c82ca04f352aad00660cfc14a9aa6773168
[ "MIT" ]
1
2019-05-15T20:50:37.000Z
2019-05-15T20:50:37.000Z
tests/test_workflow_build_combinations.py
tschoonj/cgat-daisy
f85a2c82ca04f352aad00660cfc14a9aa6773168
[ "MIT" ]
1
2021-11-11T13:22:56.000Z
2021-11-11T13:22:56.000Z
import pytest from daisy.workflow import build_combinations def test_one_option(): assert build_combinations( {"option1": ["value1", "value2"]}) == \ [{'option1': 'value1'}, {'option1': 'value2'}] def test_two_options(): assert build_combinations( {'option1': ["value1", "val...
38.746835
92
0.516607
d12cb160efcec522b469d30ffdacf4ae0e0be2b3
1,299
py
Python
api/tests/opentrons/drivers/smoothie_drivers/test_parse_utils.py
knownmed/opentrons
d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c
[ "Apache-2.0" ]
null
null
null
api/tests/opentrons/drivers/smoothie_drivers/test_parse_utils.py
knownmed/opentrons
d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c
[ "Apache-2.0" ]
null
null
null
api/tests/opentrons/drivers/smoothie_drivers/test_parse_utils.py
knownmed/opentrons
d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c
[ "Apache-2.0" ]
null
null
null
import pytest from opentrons.drivers import utils from opentrons.drivers.smoothie_drivers import parse_utils from opentrons.drivers.utils import ParseError def test_parse_position_response(): good_data = "ok M114.2 X:10 Y:20 Z:30 A:40 B:50 C:60" res = parse_utils.parse_position_response(good_data) expecte...
24.055556
68
0.613549
27b0c96d84004428e5e9bee6a43c3b85f5db2f3e
707
py
Python
Python/Tensorflow/hello.py
GeorgiyDemo/scrapheap
1d298eb63e0e6a8fc92ab84a05372d2ed33beba1
[ "MIT" ]
null
null
null
Python/Tensorflow/hello.py
GeorgiyDemo/scrapheap
1d298eb63e0e6a8fc92ab84a05372d2ed33beba1
[ "MIT" ]
null
null
null
Python/Tensorflow/hello.py
GeorgiyDemo/scrapheap
1d298eb63e0e6a8fc92ab84a05372d2ed33beba1
[ "MIT" ]
1
2019-03-14T15:48:23.000Z
2019-03-14T15:48:23.000Z
from matplotlib.pyplot import plot import tensorflow as tf import numpy as np import matplotlib.pyplot as plt from tensorflow import keras model = tf.keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])]) model.compile(optimizer="sgd", loss="mean_squared_error") # y = 2x xs = np.array([1.0, 10.0, 5.0, 2.0, ...
25.25
75
0.687412
9da3bbed5215cbadcd61157957346f7a8f603e60
8,290
py
Python
botcmd.py
JuEeHa/hynneflip
e3e78e80e2a7f0bac8a0961f7cfe051f2f050446
[ "Unlicense" ]
null
null
null
botcmd.py
JuEeHa/hynneflip
e3e78e80e2a7f0bac8a0961f7cfe051f2f050446
[ "Unlicense" ]
null
null
null
botcmd.py
JuEeHa/hynneflip
e3e78e80e2a7f0bac8a0961f7cfe051f2f050446
[ "Unlicense" ]
null
null
null
import threading import unicodedata from collections import namedtuple import linguistics Entry = namedtuple('Entry', ['hymmnos', 'word_class', 'pronunciation', 'meaning_ja', 'meaning_en', 'dialect']) hymmnos_lexicon = [] hymmnos_lexicon_by_hymmnos = {} hymmnos_lexicon_lock = threading.Lock() Emotion = namedtuple('E...
32.382813
113
0.72316
d2f4664f89b08aadcf21f13c78baddcee5e1091e
2,902
py
Python
telemetry/telemetry/story/story_unittest.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
telemetry/telemetry/story/story_unittest.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
telemetry/telemetry/story/story_unittest.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from telemetry import story from telemetry.story import shared_state # pylint: disable=abstract-method class SharedStateBar(shared_state.S...
34.963855
80
0.703653
9a8ed34d199778b3c87308a4724518f1f039d236
2,781
py
Python
prediction/anfis-module/utils/extractData.py
HPCC-Cloud-Computing/press
776f820116b853c9413c8771e8d0832238e88b1a
[ "MIT" ]
2
2018-01-19T15:53:02.000Z
2018-01-19T20:07:48.000Z
prediction/anfis-module/utils/extractData.py
HPCC-Cloud-Computing/press
776f820116b853c9413c8771e8d0832238e88b1a
[ "MIT" ]
5
2017-04-22T18:47:37.000Z
2018-02-27T17:25:13.000Z
prediction/anfis-module/utils/extractData.py
HPCC-Cloud-Computing/press
776f820116b853c9413c8771e8d0832238e88b1a
[ "MIT" ]
null
null
null
import json import numpy as np import pandas as pd FILE_DIRECTORY = "dataset/dru_10_minutes.csv" HEADER = ["time_stamp", "numberOfTaskIndex", "numberOfMachineId", "meanCPUUsage", "canonical memory usage", "AssignMem", "unmapped_cache_usage", "page_cache_usage", "max_mem_usage", "mean_dis...
34.7625
110
0.635023
ce0bccba0e6812f7cfb2e0c228a2c7963aa7fd11
1,301
py
Python
query_analysis/nlu/media/comic.py
JK-River/RobotAIEngine
9113a73792c3f2d3e02558b25817915fb760d6e5
[ "Apache-2.0" ]
69
2017-03-05T09:12:52.000Z
2021-11-10T03:45:34.000Z
query_analysis/nlu/media/comic.py
vevenlcf/RobotAIEngine
9113a73792c3f2d3e02558b25817915fb760d6e5
[ "Apache-2.0" ]
2
2018-05-01T13:58:21.000Z
2018-06-15T11:59:54.000Z
query_analysis/nlu/media/comic.py
vevenlcf/RobotAIEngine
9113a73792c3f2d3e02558b25817915fb760d6e5
[ "Apache-2.0" ]
47
2017-03-15T08:20:37.000Z
2021-10-30T16:26:50.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2016,小忆机器人 All rights reserved. 摘 要:相声语义 创 建 者:余菲 创建日期:17/2/10 """ from nlu.rule import Rule from nlu.media.common import * from utils.utils import attach_perperty class Comic(object): """ 相声语义 """ # 标识是mode领域 service = ...
29.568182
114
0.578017
504c44c960328e180227d67af63af2fc674537c9
7,938
py
Python
formencode/declarative.py
satosi-k/formencode
f840ed8c9b5926e68491f4ff710cc26d8c9f3ee0
[ "Python-2.0" ]
null
null
null
formencode/declarative.py
satosi-k/formencode
f840ed8c9b5926e68491f4ff710cc26d8c9f3ee0
[ "Python-2.0" ]
null
null
null
formencode/declarative.py
satosi-k/formencode
f840ed8c9b5926e68491f4ff710cc26d8c9f3ee0
[ "Python-2.0" ]
null
null
null
""" Declarative objects for FormEncode. Declarative objects have a simple protocol: you can use classes in lieu of instances and they are equivalent, and any keyword arguments you give to the constructor will override those instance variables. (So if a class is received, we'll simply instantiate an instance with no ar...
34.513043
79
0.576216
e69643c93340bde6a5d7f9134b7bca7f83d4bb24
612
py
Python
main.py
eddaughe/Dictionaries
b42ae2d651d05bfd32dcbd6bcdd04af9f6565043
[ "MIT" ]
null
null
null
main.py
eddaughe/Dictionaries
b42ae2d651d05bfd32dcbd6bcdd04af9f6565043
[ "MIT" ]
null
null
null
main.py
eddaughe/Dictionaries
b42ae2d651d05bfd32dcbd6bcdd04af9f6565043
[ "MIT" ]
null
null
null
if __name__ == '__main__': birthdays = { 'Peter Ginsberg': '04/15/1981', 'Daylon Kinsinger': '01/17/1969', 'Griffin Matherly': '09/21/2000', 'Adam Gontier': '07/14/1979', 'Dustin Bates': '02/23/1972'} print('Welcome to the birthday dictionary. We know the birthdays of:')...
36
74
0.581699
c0f9e882e0f10988cd07dd6266508962cb230cc6
1,221
py
Python
comicolorization/models/normalize.py
DwangoMediaVillage/Comicolorization
98f323e78baceae0b1086f01ac51b5e8a7515abb
[ "MIT" ]
122
2017-08-21T10:01:07.000Z
2022-03-21T13:52:19.000Z
comicolorization/models/normalize.py
DwangoMediaVillage/Comicolorization
98f323e78baceae0b1086f01ac51b5e8a7515abb
[ "MIT" ]
7
2017-10-20T15:12:13.000Z
2022-01-30T23:04:37.000Z
comicolorization/models/normalize.py
DwangoMediaVillage/Comicolorization
98f323e78baceae0b1086f01ac51b5e8a7515abb
[ "MIT" ]
26
2017-08-22T08:11:20.000Z
2022-03-09T14:59:18.000Z
import typing import chainer from comicolorization import utility class ColorNormalize(chainer.Chain): def __init__(self, type, in_min, in_max): # type: (str, typing.Tuple, typing.Tuple) -> None super(ColorNormalize, self).__init__() self.type = type self.in_min = in_min se...
32.131579
112
0.579034
fe7020d35a9978e458f5ba68a3f24946cd9fbd77
7,865
py
Python
captum/attr/_utils/summarizer.py
aravipati12/captum
ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
[ "BSD-3-Clause" ]
1
2019-11-10T06:51:11.000Z
2019-11-10T06:51:11.000Z
captum/attr/_utils/summarizer.py
aravipati12/captum
ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
[ "BSD-3-Clause" ]
4
2020-11-20T21:05:39.000Z
2022-03-18T15:28:01.000Z
captum/attr/_utils/summarizer.py
aravipati12/captum
ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 from typing import Dict, List, Optional, Tuple, Type, Union from torch import Tensor from captum.attr._utils.stat import MSE, Count, Max, Mean, Min, Stat, StdDev, Sum, Var from captum.log import log_usage class Summarizer: r""" This class simply wraps over a given a set of Summarizer...
33.900862
87
0.602797
0cf1a940cd04f5a00baa866405008be880a2e9fa
1,571
py
Python
code/utils/cluster/general.py
yanxi0830/IIC
77641baebca36d5e5f7c9ec25c0755d14524dd4e
[ "MIT" ]
null
null
null
code/utils/cluster/general.py
yanxi0830/IIC
77641baebca36d5e5f7c9ec25c0755d14524dd4e
[ "MIT" ]
null
null
null
code/utils/cluster/general.py
yanxi0830/IIC
77641baebca36d5e5f7c9ec25c0755d14524dd4e
[ "MIT" ]
null
null
null
import torch import torchvision from torch.optim import Adam _opt_dict = {"Adam": Adam} def get_opt(name): return _opt_dict[name] def config_to_str(config): attrs = vars(config) string_val = "Config: -----\n" string_val += "\n".join("%s: %s" % item for item in attrs.items()) string_val += "\n--...
25.33871
70
0.583705
1fa358ca282e84b324fc105e405f6897600675d1
5,270
py
Python
build/env/lib/python2.6/site-packages/logilab_astng-0.24.3-py2.6.egg/logilab/astng/test/unittest_regrtest.py
lockhart39/HueQualityAndIngestionApp
c75e55a43a8bdeb7aa0f5bf2101ec72b01dcac1c
[ "Apache-2.0" ]
1
2018-05-07T05:40:36.000Z
2018-05-07T05:40:36.000Z
build/env/lib/python2.6/site-packages/logilab_astng-0.24.3-py2.6.egg/logilab/astng/test/unittest_regrtest.py
lockhart39/HueQualityAndIngestionApp
c75e55a43a8bdeb7aa0f5bf2101ec72b01dcac1c
[ "Apache-2.0" ]
null
null
null
build/env/lib/python2.6/site-packages/logilab_astng-0.24.3-py2.6.egg/logilab/astng/test/unittest_regrtest.py
lockhart39/HueQualityAndIngestionApp
c75e55a43a8bdeb7aa0f5bf2101ec72b01dcac1c
[ "Apache-2.0" ]
null
null
null
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as publis...
36.597222
85
0.673245
c852bc7ecf6d67bc972cd1fe27b667ad4242d6fc
51,010
py
Python
python/ccxt/idex.py
pcriadoperez/ccxt
fd0db4bad42f4f937c401cdb4cd0bcc4e716282e
[ "MIT" ]
null
null
null
python/ccxt/idex.py
pcriadoperez/ccxt
fd0db4bad42f4f937c401cdb4cd0bcc4e716282e
[ "MIT" ]
null
null
null
python/ccxt/idex.py
pcriadoperez/ccxt
fd0db4bad42f4f937c401cdb4cd0bcc4e716282e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import Authenticati...
38.038777
142
0.507489
383197950d3044912396ec6c80bb30688949dc55
27,501
py
Python
jupyterlab/labapp.py
VinayaSathyanarayana/jupyterlab
b1f4648bf7775a88ed97185caec073d48fe6a2f4
[ "BSD-3-Clause" ]
null
null
null
jupyterlab/labapp.py
VinayaSathyanarayana/jupyterlab
b1f4648bf7775a88ed97185caec073d48fe6a2f4
[ "BSD-3-Clause" ]
null
null
null
jupyterlab/labapp.py
VinayaSathyanarayana/jupyterlab
b1f4648bf7775a88ed97185caec073d48fe6a2f4
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 """A tornado based Jupyter lab server.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import json import os import os.path as osp from os.path import join as pjoin import sys from jinja2 import Environment, FileSystemLoader from jupyter_core.ap...
37.063342
159
0.656085
8783855367318e36c617893ea9bd0299d0632e4e
290
py
Python
Dataset/Leetcode/train/70/45.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/train/70/45.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/train/70/45.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
class Solution: def XXX(self, n: int) -> int: i = 1 # 爬到1台阶仅有1种方法 j = 2 # 爬到2台阶有2种方法 for _ in range(3, n): # 自底向上递推 F(n)=F(n-1)+F(n-2) i, j = j, i + j # 每次仅保留前两个值,依次往后推算 return i + j if n > 2 else n # 注意当n=1,n=2时的情况
32.222222
65
0.448276
67dc89e31900f351839571d880557949297ca490
6,413
py
Python
beast/plotting/plot_cmd_with_fits.py
lea-hagen/beast
44d12e3ae9039fc4ad8c64721babd8f9901c48aa
[ "BSD-3-Clause" ]
null
null
null
beast/plotting/plot_cmd_with_fits.py
lea-hagen/beast
44d12e3ae9039fc4ad8c64721babd8f9901c48aa
[ "BSD-3-Clause" ]
null
null
null
beast/plotting/plot_cmd_with_fits.py
lea-hagen/beast
44d12e3ae9039fc4ad8c64721babd8f9901c48aa
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import argparse from astropy.io import fits from astropy.coordinates import SkyCoord from astropy import units as u import copy __all__ = ["plot_cmd_with_fits"] def plot_cmd_with_fits( data_fits_file, beast_fits_file, mag1_filter="F475W", mag2_filter...
27.761905
88
0.618899
300e1703b177765ea3df7c35fbbfae3d0aa8817a
1,340
py
Python
subresource-integrity/tools/generate_javascript.py
ziransun/wpt
ab8f451eb39eb198584d547f5d965ef54df2a86a
[ "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
subresource-integrity/tools/generate_javascript.py
ziransun/wpt
ab8f451eb39eb198584d547f5d965ef54df2a86a
[ "BSD-3-Clause" ]
7,642
2018-05-28T09:38:03.000Z
2022-03-31T20:55:48.000Z
subresource-integrity/tools/generate_javascript.py
ziransun/wpt
ab8f451eb39eb198584d547f5d965ef54df2a86a
[ "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
from __future__ import print_function from os import path, listdir from hashlib import sha512, sha256, md5 from base64 import b64encode import re JS_DIR = path.normpath(path.join(__file__, "..", "..")) ''' Yield each file in the javascript directory ''' def js_files(): for f in listdir(JS_DIR): if path.isfile(...
24.363636
62
0.677612