hexsha
stringlengths
40
40
size
int64
2
1.05M
ext
stringclasses
9 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
193
max_stars_repo_name
stringlengths
6
109
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
36.6k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
193
max_issues_repo_name
stringlengths
6
109
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
29.8k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
193
max_forks_repo_name
stringlengths
6
109
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
11.2k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.05M
avg_line_length
float64
1
404k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
2d71835871c82851618b745fd00d532b335e9d94
311
py
Python
jobs/migrations/0006_remove_job_file.py
timptner/farafmb.de
2b154278d8b44ea3adecafcb8554c1b0b0055e01
[ "MIT" ]
null
null
null
jobs/migrations/0006_remove_job_file.py
timptner/farafmb.de
2b154278d8b44ea3adecafcb8554c1b0b0055e01
[ "MIT" ]
1
2022-02-17T20:28:19.000Z
2022-02-17T20:28:19.000Z
jobs/migrations/0006_remove_job_file.py
timptner/farafmb.de
2b154278d8b44ea3adecafcb8554c1b0b0055e01
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-11-03 14:33 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('jobs', '0005_job_group'), ] operations = [ migrations.RemoveField( model_name='job', name='file', ), ]
17.277778
47
0.569132
2d71a93d28a8c8598473628963f93b91998fd0fa
1,175
py
Python
apollo/common/abstract/models.py
Aukbit/apollo
0afd1360f5a102335c55afaf138e0ecb96644128
[ "MIT" ]
null
null
null
apollo/common/abstract/models.py
Aukbit/apollo
0afd1360f5a102335c55afaf138e0ecb96644128
[ "MIT" ]
null
null
null
apollo/common/abstract/models.py
Aukbit/apollo
0afd1360f5a102335c55afaf138e0ecb96644128
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger(__name__) import simplejson as json from datetime import datetime from blinker import signal from cassandra.cqlengine import columns from cassandra.cqlengine.models import Model from ...common.mixins.json import JsonMixin class AbstractBaseModel(Model, JsonMixin): """ ...
28.658537
75
0.667234
2d71b661659aaf43a68dcd38e499ef81856a9bca
1,339
py
Python
mininet/examples/vnf_netconf.py
5GExchange/escape
eb35d460597a0386b18dd5b6a5f62a3f30eed5fa
[ "Apache-2.0" ]
10
2016-11-16T16:26:16.000Z
2021-04-26T17:20:28.000Z
mininet/examples/vnf_netconf.py
5GExchange/escape
eb35d460597a0386b18dd5b6a5f62a3f30eed5fa
[ "Apache-2.0" ]
3
2017-04-20T11:29:17.000Z
2017-11-06T17:12:12.000Z
mininet/examples/vnf_netconf.py
5GExchange/escape
eb35d460597a0386b18dd5b6a5f62a3f30eed5fa
[ "Apache-2.0" ]
10
2017-03-27T13:58:52.000Z
2020-06-24T22:42:51.000Z
#!/usr/bin/python """ This example shows how to create an empty Mininet object (without a topology object) and add nodes to it manually. """ from mininet.net import Mininet from mininet.node import Controller, RemoteController from mininet.cli import CLI from mininet.log import setLogLevel, info from time import slee...
23.910714
70
0.626587
2d71d07e73529d8a76370098558cde732f2be249
1,506
py
Python
Tools/Scripts/webkitpy/port/jsc_only.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
6
2021-07-05T16:09:39.000Z
2022-03-06T22:44:42.000Z
Tools/Scripts/webkitpy/port/jsc_only.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
7
2022-03-15T13:25:39.000Z
2022-03-15T13:25:44.000Z
Tools/Scripts/webkitpy/port/jsc_only.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
null
null
null
# Copyright (C) 2018 Igalia S.L. # # 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 notice, this # list of conditions and the following disclaimer. #...
48.580645
81
0.77158
2d71e871c057e693652bde9723502aadc2153857
1,269
py
Python
quizzes/urls.py
aeronlroach/django-quiz
96c0965138d56e8d3b335edb6d6b7c3f67753031
[ "MIT" ]
null
null
null
quizzes/urls.py
aeronlroach/django-quiz
96c0965138d56e8d3b335edb6d6b7c3f67753031
[ "MIT" ]
null
null
null
quizzes/urls.py
aeronlroach/django-quiz
96c0965138d56e8d3b335edb6d6b7c3f67753031
[ "MIT" ]
1
2020-04-16T20:41:53.000Z
2020-04-16T20:41:53.000Z
from django.urls import path from . import views app_name = 'quizzes' urlpatterns = [ # ex: /quizzes/ # Shows all quizzes path('', views.IndexView.as_view(), name='index'), # ex: /quizzes/1/ # Shows all categories and questions of quiz # The 'name' value as called by the {% url %} template ta...
38.454545
120
0.688731
2d7212043bd10e337365a1ca099369599f56375b
2,945
py
Python
app/user/views.py
chivalry/structured-flask
c6930d87a7364b86a3ab3db03c93c04235f1e93b
[ "MIT" ]
3
2019-04-15T00:54:43.000Z
2019-05-18T01:05:00.000Z
app/user/views.py
chivalry/structured-flask
c6930d87a7364b86a3ab3db03c93c04235f1e93b
[ "MIT" ]
6
2019-04-15T01:37:29.000Z
2019-04-24T18:47:24.000Z
app/user/views.py
chivalry/structured-flask
c6930d87a7364b86a3ab3db03c93c04235f1e93b
[ "MIT" ]
1
2019-04-23T04:04:18.000Z
2019-04-23T04:04:18.000Z
from flask import (render_template, Blueprint, url_for, redirect, flash, request, current_app, abort) from flask_login import login_user, logout_user, login_required from flask_mail import Message from itsdangerous import URLSafeTimedSerializer from itsdangerous.exc import BadSignature from . import...
39.797297
94
0.683192
2d721915925f4287b392a658b8a9a249540acb87
5,566
py
Python
fastai/basic_data.py
joshfp/fastai
eb455070adaea072b4771e340d48a371c6c0c4e2
[ "Apache-2.0" ]
1
2019-01-29T22:13:29.000Z
2019-01-29T22:13:29.000Z
fastai/basic_data.py
jamesrequa/fastai
794365cd7f734b5e1027d7e19c99e648fbb9a12b
[ "Apache-2.0" ]
null
null
null
fastai/basic_data.py
jamesrequa/fastai
794365cd7f734b5e1027d7e19c99e648fbb9a12b
[ "Apache-2.0" ]
null
null
null
"`fastai.data` loads and manages datasets with `DataBunch`" from .torch_core import * __all__ = ['SingleItemDataset', 'SingleClassificationDataset', 'DataBunch', 'DatasetBase', 'DeviceDataLoader', 'LabelDataset'] class DatasetBase(Dataset): "Base class for all fastai datasets." def __len__(self): return len(s...
44.174603
126
0.6811
2d723bce7003b1af01922b9ba111d8ccdce65b80
1,681
py
Python
PR_Pillow_floodfill/PR-testcases/ff_partial_set.py
yo1995/Daily_Python_Tasks
211255deead5023cdcea1db4f49a53eedfe762b6
[ "MIT" ]
14
2018-05-21T05:12:25.000Z
2021-11-28T14:49:55.000Z
PR_Pillow_floodfill/PR-testcases/ff_partial_set.py
yo1995/Daily_Python_Tasks
211255deead5023cdcea1db4f49a53eedfe762b6
[ "MIT" ]
2
2018-11-28T20:59:37.000Z
2021-07-27T22:39:33.000Z
PR_Pillow_floodfill/PR-testcases/ff_partial_set.py
yo1995/Daily_Python_Tasks
211255deead5023cdcea1db4f49a53eedfe762b6
[ "MIT" ]
6
2019-03-21T01:07:57.000Z
2021-03-29T03:24:33.000Z
import time from PIL import Image import sys import psutil import os def _color_diff(rgb1, rgb2): """ Uses 1-norm distance to calculate difference between two rgb values. """ return abs(rgb1[0]-rgb2[0]) + abs(rgb1[1]-rgb2[1]) + abs(rgb1[2]-rgb2[2]) def flood_fill_partial(image, xy, value, thresh=0):...
28.982759
77
0.499703
2d7278e47e0596aac3157ef65ce1fe71a9eba323
3,341
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_configuration.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_configuration.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_configuration.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
48.42029
172
0.698593
2d72870b2a01c6b66ed3281cdc673b5d03ec5eeb
9,743
py
Python
main.py
ZucchiniTang/CarND-Semantic-Segmentation
dcebb25dc8e57d2895ecdd5b7858ca0c5c12b16e
[ "MIT" ]
null
null
null
main.py
ZucchiniTang/CarND-Semantic-Segmentation
dcebb25dc8e57d2895ecdd5b7858ca0c5c12b16e
[ "MIT" ]
null
null
null
main.py
ZucchiniTang/CarND-Semantic-Segmentation
dcebb25dc8e57d2895ecdd5b7858ca0c5c12b16e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os.path import tensorflow as tf import helper import warnings from distutils.version import LooseVersion import project_tests as tests import scipy.misc # Check TensorFlow Version assert LooseVersion(tf.__version__) >= LooseVersion('1.0'), 'Please use TensorFlow version 1.0 or newer. You...
46.395238
221
0.777379
2d728ecab25c702afca39e49a79f37c45c1da5f7
1,039
py
Python
manage.py
genomics-geek/exome_slicer
e1e69fac4ec634b07bab353a191ce783ec766c53
[ "MIT" ]
2
2018-04-09T14:09:59.000Z
2019-09-24T08:27:23.000Z
manage.py
genomics-geek/exome_slicer
e1e69fac4ec634b07bab353a191ce783ec766c53
[ "MIT" ]
4
2018-01-24T18:41:20.000Z
2018-12-07T16:41:09.000Z
manage.py
genomics-geek/exome_slicer
e1e69fac4ec634b07bab353a191ce783ec766c53
[ "MIT" ]
1
2018-01-17T23:56:52.000Z
2018-01-17T23:56:52.000Z
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure tha...
33.516129
77
0.659288
2d72acfe3d492bc530070422c17ccf8ba7e4661d
14,922
py
Python
experiments/memory/tf_bptt_ddpg_exp.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
1
2020-10-23T14:40:09.000Z
2020-10-23T14:40:09.000Z
experiments/memory/tf_bptt_ddpg_exp.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/memory/tf_bptt_ddpg_exp.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
1
2021-05-27T20:38:45.000Z
2021-05-27T20:38:45.000Z
""" Use an oracle qfunction to train a policy in bptt-ddpg style. """ import random import numpy as np import tensorflow as tf from hyperopt import hp from rlkit.data_management.ocm_subtraj_replay_buffer import ( OcmSubtrajReplayBuffer ) from rlkit.envs.memory.high_low import HighLow from rlkit.exploration_strate...
34.068493
80
0.578207
2d72dc618ec10a27e3196dafbd9ad6318ece3ab6
47,032
py
Python
metadata-ingestion/src/datahub/ingestion/source/usage/bigquery_usage.py
cuong-pham/datahub
cb4eb001758f55622add0f4dc3650cf483609cba
[ "Apache-2.0" ]
289
2022-03-16T00:30:15.000Z
2022-03-31T23:16:21.000Z
metadata-ingestion/src/datahub/ingestion/source/usage/bigquery_usage.py
cuong-pham/datahub
cb4eb001758f55622add0f4dc3650cf483609cba
[ "Apache-2.0" ]
155
2022-03-15T19:43:07.000Z
2022-03-31T20:33:41.000Z
metadata-ingestion/src/datahub/ingestion/source/usage/bigquery_usage.py
cuong-pham/datahub
cb4eb001758f55622add0f4dc3650cf483609cba
[ "Apache-2.0" ]
46
2022-03-15T19:08:32.000Z
2022-03-31T17:56:26.000Z
import atexit import collections import heapq import json import logging import os import re import textwrap import time from dataclasses import dataclass, field from datetime import datetime from typing import Any, Dict, Iterable, List, MutableMapping, Optional, Union, cast import cachetools from google.cloud.bigquer...
39.063123
194
0.628359
2d732361559a958fb54321701426608917d1c858
579
py
Python
test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_operations/__init__.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
35
2018-04-03T12:15:53.000Z
2022-03-11T14:03:34.000Z
test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_operations/__init__.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
652
2017-08-28T22:44:41.000Z
2022-03-31T21:20:31.000Z
test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_operations/__init__.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
29
2017-08-28T20:57:01.000Z
2022-03-11T14:03:38.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
41.357143
94
0.580311
2d73250a573578beead21ec6e6fdd9cc1b49cb9b
775
py
Python
experiments/distfunc_training/vae_training/tabletop_3obj/conf.py
s-tian/mbold
85309809e35777b843dafc37d047b84962f17062
[ "Apache-2.0", "CC-BY-4.0", "MIT" ]
16
2021-04-20T20:01:10.000Z
2022-03-29T03:19:39.000Z
experiments/distfunc_training/vae_training/tabletop_3obj/conf.py
s-tian/mbold
85309809e35777b843dafc37d047b84962f17062
[ "Apache-2.0", "CC-BY-4.0", "MIT" ]
null
null
null
experiments/distfunc_training/vae_training/tabletop_3obj/conf.py
s-tian/mbold
85309809e35777b843dafc37d047b84962f17062
[ "Apache-2.0", "CC-BY-4.0", "MIT" ]
1
2021-05-04T00:32:40.000Z
2021-05-04T00:32:40.000Z
import os from classifier_control.classifier.utils.general_utils import AttrDict from classifier_control.classifier.utils.logger import TdistClassifierLogger current_dir = os.path.dirname(os.path.realpath(__file__)) from classifier_control.classifier.models.latent_space import LatentSpace configuration = { 'model'...
29.807692
145
0.704516
2d734c0bd121a7659ee75a2288fca7682d6286a0
1,706
py
Python
examples/basic_example_custom/__main__.py
clumpytuna/ydb-python-sdk
f09d8db19f62032738ed77dabb3672c3e0f86cc3
[ "Apache-2.0" ]
null
null
null
examples/basic_example_custom/__main__.py
clumpytuna/ydb-python-sdk
f09d8db19f62032738ed77dabb3672c3e0f86cc3
[ "Apache-2.0" ]
null
null
null
examples/basic_example_custom/__main__.py
clumpytuna/ydb-python-sdk
f09d8db19f62032738ed77dabb3672c3e0f86cc3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import argparse import basic_example import client_node import master_node import logging if __name__ == '__main__': parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description="""\033[92mYandex.Database examples binary.\x1b[0m\n""") ...
36.297872
97
0.611372
2d739bf5c082ec6e1351366e73851b470e22e090
945
py
Python
ext/NN/Torch/02_TASK/nn.py
Jie-Yuan/1_DataMining
f5338388b4f883233f350d4fb9c5903180883430
[ "Apache-2.0" ]
14
2019-06-25T13:46:32.000Z
2020-10-27T02:04:59.000Z
ext/NN/Torch/02_TASK/nn.py
Jie-Yuan/2_DataMining
f5338388b4f883233f350d4fb9c5903180883430
[ "Apache-2.0" ]
null
null
null
ext/NN/Torch/02_TASK/nn.py
Jie-Yuan/2_DataMining
f5338388b4f883233f350d4fb9c5903180883430
[ "Apache-2.0" ]
7
2019-06-25T13:26:16.000Z
2020-10-27T02:05:03.000Z
# encoding: utf-8 import torch import numpy as np def gen_data(num=1000): x = torch.unsqueeze(torch.linspace(-1, 1, num), dim=1) # x data (tensor), shape=(100, 1) y = x.pow(2) + 0.2 * torch.rand(x.size()) y = y.mean(0) return x.squeeze(), y class Net(torch.nn.Module): def __init__(self): s...
26.25
93
0.569312
2d73a6ef9ef08c6d70d5722b65f75c8a97df5490
5,633
py
Python
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
38.848276
133
0.650098
2d73c9b64973389e9f677dfeb443fe8dcfc706ed
3,113
py
Python
hrl_dynamic_mpc/src/record_angles.py
gt-ros-pkg/hrl-haptic-manip
6458187075033ecd3a22fbcdc1a632df39b0cba1
[ "Apache-2.0" ]
1
2017-07-13T14:58:35.000Z
2017-07-13T14:58:35.000Z
hrl_dynamic_mpc/src/record_angles.py
gt-ros-pkg/hrl-haptic-manip
6458187075033ecd3a22fbcdc1a632df39b0cba1
[ "Apache-2.0" ]
null
null
null
hrl_dynamic_mpc/src/record_angles.py
gt-ros-pkg/hrl-haptic-manip
6458187075033ecd3a22fbcdc1a632df39b0cba1
[ "Apache-2.0" ]
2
2017-03-08T14:44:22.000Z
2019-07-15T23:46:35.000Z
# # # Copyright (c) 2013, Georgia Tech Research Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, ...
37.059524
104
0.704786
2d73e36f5cca31fe11c1855c902af84ac3024bb9
1,927
py
Python
test/unit/DatabaseTest.py
rmmilewi/pira
58d6510af3d3dfc0581921d9e00bf24d026a8c44
[ "BSD-3-Clause" ]
6
2019-08-15T17:00:33.000Z
2020-10-01T13:01:02.000Z
test/unit/DatabaseTest.py
rmmilewi/pira
58d6510af3d3dfc0581921d9e00bf24d026a8c44
[ "BSD-3-Clause" ]
null
null
null
test/unit/DatabaseTest.py
rmmilewi/pira
58d6510af3d3dfc0581921d9e00bf24d026a8c44
[ "BSD-3-Clause" ]
1
2020-02-18T21:10:11.000Z
2020-02-18T21:10:11.000Z
""" File: DatabaseTest.py License: Part of the PIRA project. Licensed under BSD 3 clause license. See LICENSE.txt file at https://github.com/jplehr/pira/LICENSE.txt Description: Tests for the argument mapping """ import sys sys.path.append('..') import lib.Database as d import lib.tables as tbls import unittest impo...
26.040541
138
0.740529
2d74033135ba29d6bd99ed9c4934e01cb7539250
11,217
py
Python
powerline/segments/vim.py
zhaocai/powerline
8aae1145835b4b2a71f1ed71b81d490e2907bd39
[ "MIT" ]
null
null
null
powerline/segments/vim.py
zhaocai/powerline
8aae1145835b4b2a71f1ed71b81d490e2907bd39
[ "MIT" ]
null
null
null
powerline/segments/vim.py
zhaocai/powerline
8aae1145835b4b2a71f1ed71b81d490e2907bd39
[ "MIT" ]
null
null
null
# vim:fileencoding=utf-8:noet from __future__ import absolute_import, division import os try: import vim except ImportError: vim = {} # NOQA from subprocess import Popen, PIPE from powerline.bindings.vim import vim_get_func, getbufvar, vim_getbufoption from powerline.theme import requires_segment_info from powerl...
27.358537
111
0.718998
2d740bd949ac97acb1fa4ae1ed0670ba51c7091d
21,854
py
Python
iotronic_lightningrod/lightningrod.py
Zakaria-Ben/iotronic-lightning-rod
4a3eff68bd1db2d57beee0e8c51fbb14fcc0877a
[ "Apache-2.0" ]
null
null
null
iotronic_lightningrod/lightningrod.py
Zakaria-Ben/iotronic-lightning-rod
4a3eff68bd1db2d57beee0e8c51fbb14fcc0877a
[ "Apache-2.0" ]
null
null
null
iotronic_lightningrod/lightningrod.py
Zakaria-Ben/iotronic-lightning-rod
4a3eff68bd1db2d57beee0e8c51fbb14fcc0877a
[ "Apache-2.0" ]
1
2018-05-18T13:01:03.000Z
2018-05-18T13:01:03.000Z
# Copyright 2017 MDSLAB - University of Messina 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 # # ...
31.764535
79
0.503157
2d743e41d5507d2b0e92fbddeacb402aeab32df7
1,693
py
Python
dvc/repo/checkout.py
drorata/dvc
b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0
[ "Apache-2.0" ]
2
2019-06-23T14:24:48.000Z
2019-07-08T12:22:53.000Z
dvc/repo/checkout.py
drorata/dvc
b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0
[ "Apache-2.0" ]
null
null
null
dvc/repo/checkout.py
drorata/dvc
b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0
[ "Apache-2.0" ]
1
2019-09-02T00:29:40.000Z
2019-09-02T00:29:40.000Z
from __future__ import unicode_literals import logging from dvc.exceptions import CheckoutErrorSuggestGit from dvc.progress import ProgressCallback logger = logging.getLogger(__name__) def _cleanup_unused_links(self, all_stages): used = [ out.fspath for stage in all_stages for out in s...
28.694915
79
0.688718
2d74466afac52e5a55adc30e69272a8b3f3ded60
10,226
py
Python
species/util/read_util.py
vandalt/species
527dd900a60c4d691bd490569cd3b2007f9beead
[ "MIT" ]
null
null
null
species/util/read_util.py
vandalt/species
527dd900a60c4d691bd490569cd3b2007f9beead
[ "MIT" ]
null
null
null
species/util/read_util.py
vandalt/species
527dd900a60c4d691bd490569cd3b2007f9beead
[ "MIT" ]
null
null
null
""" Utility functions for reading data. """ import math import warnings from typing import Dict, Tuple, Union import numpy as np from typeguard import typechecked from scipy.integrate import simps from scipy.ndimage.filters import gaussian_filter from species.core import box, constants from species.read import rea...
32.881029
103
0.604929
2d745b0509fb9e65c758a617ada1c5da71c961e4
1,172
py
Python
Quantize/QFullyConnect_test.py
stevenygd/TensorQuant-Experiment
f084b57c22a3c2d4fa49d77b56a35e9017149789
[ "Apache-2.0" ]
null
null
null
Quantize/QFullyConnect_test.py
stevenygd/TensorQuant-Experiment
f084b57c22a3c2d4fa49d77b56a35e9017149789
[ "Apache-2.0" ]
null
null
null
Quantize/QFullyConnect_test.py
stevenygd/TensorQuant-Experiment
f084b57c22a3c2d4fa49d77b56a35e9017149789
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf import numpy as np import Quantizers import QFullyConnect as QFC from tensorflow.python.ops import standard_ops input_width = input_height = 28 batch_size = 10 input_channels = 8 output_channels = 6 fixed_size = 8 fixed_prec = 4 inputs_vals = np.arange(input_width*input_height*input_channels...
25.478261
146
0.763652
2d7478f5a87ee270663b31ae52eaa1e21d4f887c
1,289
py
Python
services/traction/api/db/repositories/tenant_webhooks.py
Open-Earth-Foundation/traction
908b555a7f408a88541b7692d3730e37a297c919
[ "Apache-2.0" ]
12
2022-01-29T20:30:03.000Z
2022-03-29T11:46:14.000Z
services/traction/api/db/repositories/tenant_webhooks.py
Open-Earth-Foundation/traction
908b555a7f408a88541b7692d3730e37a297c919
[ "Apache-2.0" ]
38
2021-11-22T17:52:50.000Z
2022-03-31T17:52:00.000Z
services/traction/api/db/repositories/tenant_webhooks.py
Open-Earth-Foundation/traction
908b555a7f408a88541b7692d3730e37a297c919
[ "Apache-2.0" ]
9
2021-11-22T18:05:48.000Z
2022-03-29T11:25:08.000Z
from typing import Type from uuid import UUID from sqlalchemy import select from api.db.errors import DoesNotExist from api.db.models.tenant_webhook import ( TenantWebhookCreate, TenantWebhookUpdate, TenantWebhookRead, TenantWebhook, ) from api.db.repositories.base import BaseRepository class TenantW...
28.644444
82
0.701319
2d747a9e7527e6469ac5de1200973f3b731b2187
4,063
py
Python
dhutil/tools.py
adfoucart/deephisto
f70fbaad9f95a9b9f2e420c9c33d46bdfab5bdf9
[ "MIT" ]
1
2021-10-05T13:44:43.000Z
2021-10-05T13:44:43.000Z
dhutil/tools.py
adfoucart/deephisto
f70fbaad9f95a9b9f2e420c9c33d46bdfab5bdf9
[ "MIT" ]
null
null
null
dhutil/tools.py
adfoucart/deephisto
f70fbaad9f95a9b9f2e420c9c33d46bdfab5bdf9
[ "MIT" ]
1
2021-11-02T14:25:13.000Z
2021-11-02T14:25:13.000Z
import time ''' Print iterations progress From Benjamin Cordier on https://stackoverflow.com/a/34325723 ''' def printProgressBar(iteration, total, prefix = '', suffix = '', decimals = 1, length = 100, fill = '*', printEnd = "\r"): """ Call in a loop to create terminal progress bar @params: iteratio...
28.02069
122
0.576175
2d74a998923e5a66ea6cc89592e322f782f7c9e4
1,369
py
Python
final_project/machinetranslation/translator.py
Endersetup/xzceb-flask_eng_fr
c5de85a74e733f4de30dfc17dde4e094dda5ccdb
[ "Apache-2.0" ]
null
null
null
final_project/machinetranslation/translator.py
Endersetup/xzceb-flask_eng_fr
c5de85a74e733f4de30dfc17dde4e094dda5ccdb
[ "Apache-2.0" ]
null
null
null
final_project/machinetranslation/translator.py
Endersetup/xzceb-flask_eng_fr
c5de85a74e733f4de30dfc17dde4e094dda5ccdb
[ "Apache-2.0" ]
null
null
null
''' Language Translation ''' import os from ibm_watson import LanguageTranslatorV3 from ibm_cloud_sdk_core.authenticators import IAMAuthenticator from dotenv import load_dotenv load_dotenv() # Load .env file apikey = os.environ['apikey'] # Get apikey url = os.environ['url'] # Get url of translator service # Create t...
33.390244
72
0.726077
2d74b732f8ca9c72c33debfc0658b28b89cfede6
2,069
py
Python
alipay/aop/api/domain/MarketResult.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/MarketResult.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/MarketResult.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.PriceDetailDTO import PriceDetailDTO class MarketResult(object): def __init__(self): self._price_detail_list = None self._scene = None @property def ...
30.426471
86
0.59014
2d74cd9e4822a334cfe85a6d87f3b07ec9e43aa8
2,243
py
Python
gobbli/model/mtdnn/src/data_utils/vocab.py
awesome-archive/gobbli
71aacbdc1184871b164185dc0c9f615f07b83173
[ "Apache-2.0" ]
2,075
2019-02-25T08:54:38.000Z
2022-03-31T10:44:50.000Z
gobbli/model/mtdnn/src/data_utils/vocab.py
awesome-archive/gobbli
71aacbdc1184871b164185dc0c9f615f07b83173
[ "Apache-2.0" ]
176
2019-03-12T02:58:42.000Z
2022-03-22T20:17:23.000Z
gobbli/model/mtdnn/src/data_utils/vocab.py
awesome-archive/gobbli
71aacbdc1184871b164185dc0c9f615f07b83173
[ "Apache-2.0" ]
437
2019-03-11T21:36:21.000Z
2022-03-29T02:40:53.000Z
# Copyright (c) Microsoft. All rights reserved. import tqdm import unicodedata PAD = 'PADPAD' UNK = 'UNKUNK' STA= 'BOSBOS' END = 'EOSEOS' PAD_ID = 0 UNK_ID = 1 STA_ID = 2 END_ID = 3 class Vocabulary(object): INIT_LEN = 4 def __init__(self, neat=False): self.neat = neat if not neat: ...
27.691358
108
0.559519
2d7513871eab221659bef6bb8b62548a1d5c9584
1,421
py
Python
acled_confict_data/acled_conflict_data.py
icpac-igad/eahw-data-pre-processing
e8e47839bfaa2689cf2f7f80f943e976cd304337
[ "MIT" ]
null
null
null
acled_confict_data/acled_conflict_data.py
icpac-igad/eahw-data-pre-processing
e8e47839bfaa2689cf2f7f80f943e976cd304337
[ "MIT" ]
null
null
null
acled_confict_data/acled_conflict_data.py
icpac-igad/eahw-data-pre-processing
e8e47839bfaa2689cf2f7f80f943e976cd304337
[ "MIT" ]
null
null
null
import os import sys import pandas as pd import geopandas as gpd utils_path = os.path.join(os.path.abspath(os.getenv('PROCESSING_DIR')), 'utils') if utils_path not in sys.path: sys.path.append(utils_path) import util_files import logging # Set up logging # Get the top-level logger object logger = logging.getLog...
27.862745
133
0.764251
2d751b12c6cfa5e93f8f0ad50ef39a556bce02ed
7,116
py
Python
qute_style/widgets/grips.py
TilmanK/QuteStyle
6afcffcd92f763484f58bf4c82e0495b84a28785
[ "MIT" ]
1
2022-03-29T14:43:31.000Z
2022-03-29T14:43:31.000Z
qute_style/widgets/grips.py
TilmanK/QuteStyle
6afcffcd92f763484f58bf4c82e0495b84a28785
[ "MIT" ]
10
2022-03-28T21:57:20.000Z
2022-03-31T17:52:01.000Z
qute_style/widgets/grips.py
TilmanK/QuteStyle
6afcffcd92f763484f58bf4c82e0495b84a28785
[ "MIT" ]
3
2022-03-29T15:36:14.000Z
2022-03-30T11:32:34.000Z
"""Custom widgets for grips to resize the application.""" import logging from typing import TYPE_CHECKING from PyQt5.QtCore import QRect, Qt, pyqtSignal from PyQt5.QtGui import QCursor, QMouseEvent from PyQt5.QtWidgets import QSizeGrip, QWidget log = logging.getLogger( f"qute_style.{__name__}" ) # pylint: disabl...
36.121827
79
0.574761
2d75277ab277813d9d1b880d51d28de0b3e763c2
1,393
py
Python
models/LinearProj.py
iclr2021-paper1937/separation_concentration_deepnets
31a54b5b459f0269bb49e401fe8856c1c7da0343
[ "BSD-3-Clause" ]
7
2021-03-20T16:21:32.000Z
2021-12-30T21:03:15.000Z
models/LinearProj.py
iclr2021-paper1937/separation_concentration_deepnets
31a54b5b459f0269bb49e401fe8856c1c7da0343
[ "BSD-3-Clause" ]
1
2022-02-08T08:39:43.000Z
2022-02-09T05:24:10.000Z
models/LinearProj.py
iclr2021-paper1937/separation_concentration_deepnets
31a54b5b459f0269bb49e401fe8856c1c7da0343
[ "BSD-3-Clause" ]
null
null
null
import torch.nn as nn import torch import numpy as np class LinearProj(nn.Module): def __init__(self, standardization, proj, P_kernel_size=1, frame_kernel_size=1, frame_stride=1): super(LinearProj, self).__init__() self.standardization = standardization self.proj = proj self.P_kern...
42.212121
118
0.625987
2d757ffdec49a1c258825a9103f694c298959d73
2,063
py
Python
tree/seirialiseandde.py
mengyangbai/leetcode
e7a6906ecc5bce665dec5d0f057b302a64d50f40
[ "MIT" ]
null
null
null
tree/seirialiseandde.py
mengyangbai/leetcode
e7a6906ecc5bce665dec5d0f057b302a64d50f40
[ "MIT" ]
null
null
null
tree/seirialiseandde.py
mengyangbai/leetcode
e7a6906ecc5bce665dec5d0f057b302a64d50f40
[ "MIT" ]
null
null
null
# Definition for a binary tree node. class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None class Codec: def serialize(self, root): """ Encodes a tree to a single string. :type root: TreeNode :rtype: str ""...
27.506667
73
0.515754
2d75cd91ca643198aff9bc6562b7fa064962e41d
2,916
py
Python
tensorbay/cli/draft.py
Machearn/tensorbay-python-sdk
0171385365f1d7317ac5c5dc11d6affccadddbee
[ "MIT" ]
null
null
null
tensorbay/cli/draft.py
Machearn/tensorbay-python-sdk
0171385365f1d7317ac5c5dc11d6affccadddbee
[ "MIT" ]
null
null
null
tensorbay/cli/draft.py
Machearn/tensorbay-python-sdk
0171385365f1d7317ac5c5dc11d6affccadddbee
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # Copyright 2021 Graviti. Licensed under MIT License. # """Implementation of gas draft.""" from typing import Dict, Optional import click from ..client.gas import DatasetClientType from ..client.struct import ROOT_COMMIT_ID from ..exception import ResourceNotExistError from .tbrn import TBR...
31.695652
97
0.69273
2d75d9f04d979f8ac3acb2ecdc515e6a19938acc
1,892
py
Python
src/test/sr-benchmark/run.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/test/sr-benchmark/run.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/test/sr-benchmark/run.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# Tom Fogal, originally Sun Aug 5 13:44:41 PDT 2007 # Revamped Mon Jul 14 13:49:23 EDT 2008 import os import sys rootdir=os.environ['V_DIR'] # where are the data files? datadir=rootdir + "/data" def SetSRMode(): ra = GetRenderingAttributes() ra.scalableActivationMode = ra.Always SetRenderingAttributes(ra...
24.571429
69
0.631607
2d75ec1a36f065b6b8550e42e93cc4059890b436
1,046
py
Python
taroapp/jfilter.py
PetrSixta/taro
afe0caf0e0feb6948c4cc80217b5c5d11418859b
[ "MIT" ]
null
null
null
taroapp/jfilter.py
PetrSixta/taro
afe0caf0e0feb6948c4cc80217b5c5d11418859b
[ "MIT" ]
26
2021-04-05T12:32:21.000Z
2022-03-22T12:53:44.000Z
taroapp/jfilter.py
PetrSixta/taro
afe0caf0e0feb6948c4cc80217b5c5d11418859b
[ "MIT" ]
1
2021-04-16T21:04:53.000Z
2021-04-16T21:04:53.000Z
import datetime import re from taro.jobs.execution import ExecutionState class AllFilter: def __init__(self): self.filters = [] def __ilshift__(self, j_filter): self.filters.append(j_filter) return self def __call__(self, job_info): return all(f(job_info) for f in self....
22.255319
108
0.716061
2d75fb2c301cd58ce4d5b5d58efa1efe40958d8f
896
py
Python
app/__init__.py
ii-Python/iiPython.cf-2
fc2df23a81cf4b02585d38db972577a3b746606a
[ "MIT" ]
null
null
null
app/__init__.py
ii-Python/iiPython.cf-2
fc2df23a81cf4b02585d38db972577a3b746606a
[ "MIT" ]
null
null
null
app/__init__.py
ii-Python/iiPython.cf-2
fc2df23a81cf4b02585d38db972577a3b746606a
[ "MIT" ]
null
null
null
# Copyright 2021 iiPython # Modules import os from flask import Flask from dotenv import load_dotenv from .database import DBLoader # Initialization load_dotenv() os.environ["_IIPYTHON_ROOT"] = os.path.abspath(os.path.dirname(__file__)) app = Flask( "iiPython", template_folder = os.path.join(os.environ["_IIPY...
23.578947
83
0.708705
2d7609861d1ac712793804fd5b085eb288f5096c
1,686
py
Python
python-app/app.py
gabisurita/kinto-codegen-tutorial
b5921ec603df031f9ff25683b7a3fbed5af79094
[ "MIT" ]
2
2017-03-02T13:12:24.000Z
2017-10-22T10:31:09.000Z
python-app/app.py
gabisurita/kinto-codegen-tutorial
b5921ec603df031f9ff25683b7a3fbed5af79094
[ "MIT" ]
null
null
null
python-app/app.py
gabisurita/kinto-codegen-tutorial
b5921ec603df031f9ff25683b7a3fbed5af79094
[ "MIT" ]
null
null
null
import swagger_client # Configure HTTP basicAuth swagger_client.configuration.username = 'Gabi' swagger_client.configuration.password = 'ILoveCats' # create a client instance client = swagger_client.KintoApi() # Our bucket data (we can define it as a dict) buck = { 'data': { 'id': 'openapi', 'des...
28.576271
75
0.685053
2d76233799a7811549c4dea17ce6d596b734f469
3,878
py
Python
authentication_service/models/organisation_create.py
hedleyroos/core-management-layer
2a25bf5fb44fd511b8b2626ec09a4bc05098334c
[ "BSD-3-Clause" ]
null
null
null
authentication_service/models/organisation_create.py
hedleyroos/core-management-layer
2a25bf5fb44fd511b8b2626ec09a4bc05098334c
[ "BSD-3-Clause" ]
90
2018-01-23T10:30:01.000Z
2019-01-31T10:53:42.000Z
authentication_service/models/organisation_create.py
hedleyroos/core-management-layer
2a25bf5fb44fd511b8b2626ec09a4bc05098334c
[ "BSD-3-Clause" ]
1
2021-08-17T14:16:23.000Z
2021-08-17T14:16:23.000Z
# coding: utf-8 """ Authentication Service API This is the API that will be exposed by the Authentication Service. The Authentication Service facilitates user registration and login via web-based flows as defined for the OpenID Connect specification. # noqa: E501 OpenAPI spec version: 1.0 Generated...
27.7
222
0.576328
2d764be3519948eea5f2e1b69fa3899841ca0da0
4,437
py
Python
rl/experimenter/rollout.py
Leonardo-H/DR-PG
dc5467ddd73a7b89938aac9d44735b019a3fd7d7
[ "Apache-2.0" ]
2
2019-11-25T01:56:49.000Z
2021-05-20T03:22:59.000Z
rl/experimenter/rollout.py
Leonardo-H/DR-PG
dc5467ddd73a7b89938aac9d44735b019a3fd7d7
[ "Apache-2.0" ]
null
null
null
rl/experimenter/rollout.py
Leonardo-H/DR-PG
dc5467ddd73a7b89938aac9d44735b019a3fd7d7
[ "Apache-2.0" ]
1
2019-11-24T02:30:38.000Z
2019-11-24T02:30:38.000Z
import numpy as np import copy class RO(object): """ A collection of Rollout instances. It has attributes: rollouts: a list of Rollout instances, each records one rollout. obs, acs, sts, rws, lps: np.ndarrays of concatenated statistics max_n_rollouts: the maximal numbe...
37.601695
102
0.60311
2d766a33965f2176da083e7243bfcd53d44e39c2
321
py
Python
diverta2019-2/A.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
2
2022-01-22T07:56:58.000Z
2022-01-24T00:29:37.000Z
diverta2019-2/A.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
diverta2019-2/A.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
import sys sys.setrecursionlimit(10 ** 6) stdin = sys.stdin def main(): ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() N, K = na() if K == 1: print(0) else: print(N - K) if __name__ == "__main__": main()...
16.05
57
0.542056
2d766d18c830e8ebc32507cc39a8e89a58eb1d78
219
py
Python
geoapps/create/__init__.py
RichardScottOZ/geoapps
5b3c1d4fd11add45992e8b2497312ac014272b69
[ "MIT" ]
34
2020-07-14T10:26:08.000Z
2022-02-15T06:07:10.000Z
tests/__init__.py
sebhmg/geoapps
1463ba4ec3c914abdc7403e54eca0ee2bbc3f4f4
[ "MIT" ]
224
2020-09-07T19:02:33.000Z
2022-03-30T22:32:02.000Z
tests/__init__.py
sebhmg/geoapps
1463ba4ec3c914abdc7403e54eca0ee2bbc3f4f4
[ "MIT" ]
6
2021-03-24T03:16:34.000Z
2022-02-18T16:25:04.000Z
# Copyright (c) 2021 Mira Geoscience Ltd. # # This file is part of geoapps. # # geoapps is distributed under the terms and conditions of the MIT License # (see LICENSE file at the root of this source code package).
31.285714
75
0.73516
2d76b84c4001cdc6bf611660933aebafe230a1c9
4,609
py
Python
invenio_circulation/ext.py
NRodriguezcuellar/invenio-circulation
8e0c977849eb76ba9a342542dae3b6a6ef5bae16
[ "MIT" ]
1
2018-10-29T10:45:03.000Z
2018-10-29T10:45:03.000Z
invenio_circulation/ext.py
NRodriguezcuellar/invenio-circulation
8e0c977849eb76ba9a342542dae3b6a6ef5bae16
[ "MIT" ]
1
2020-06-09T15:23:04.000Z
2020-06-09T15:23:04.000Z
invenio_circulation/ext.py
NRodriguezcuellar/invenio-circulation
8e0c977849eb76ba9a342542dae3b6a6ef5bae16
[ "MIT" ]
1
2020-01-13T17:10:13.000Z
2020-01-13T17:10:13.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2018 CERN. # Copyright (C) 2018 RERO. # # Invenio-Circulation is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """Invenio module for the circulation of bibliographic items.""" from copy import ...
34.140741
79
0.661966
2d76e9e3d7742687421c302da810724a4d5fc034
1,704
py
Python
colorization/evaluate.py
AltumTek/deep-koalarization
b5a16751a40484ca4990e0b9c005fe31c3301812
[ "MIT" ]
null
null
null
colorization/evaluate.py
AltumTek/deep-koalarization
b5a16751a40484ca4990e0b9c005fe31c3301812
[ "MIT" ]
null
null
null
colorization/evaluate.py
AltumTek/deep-koalarization
b5a16751a40484ca4990e0b9c005fe31c3301812
[ "MIT" ]
1
2018-07-01T17:10:40.000Z
2018-07-01T17:10:40.000Z
import tensorflow as tf from keras import backend as K from colorization import Colorization from colorization.training_utils import evaluation_pipeline, \ checkpointing_system, plot_evaluation, metrics_system # PARAMETERS run_id = 'run{}'.format(1) val_number_of_images = 100 batch_size = 10 batches = val_number_...
30.981818
76
0.714202
2d76f6584b82fe986982b5594805e3cd726d8488
4,070
py
Python
gygax/bot/agent.py
tmacro/hitman_agent
dab124adbac6e16b9f494246a49624f7af9c28da
[ "BSD-3-Clause" ]
1
2017-07-29T13:02:28.000Z
2017-07-29T13:02:28.000Z
gygax/bot/agent.py
tmacro/hitman_agent
dab124adbac6e16b9f494246a49624f7af9c28da
[ "BSD-3-Clause" ]
null
null
null
gygax/bot/agent.py
tmacro/hitman_agent
dab124adbac6e16b9f494246a49624f7af9c28da
[ "BSD-3-Clause" ]
null
null
null
from threading import Thread, Event, Timer, RLock from queue import Queue, Empty from .dispatch import Dispatcher, Proxy from ..util.log import getLogger from ..util.config import config from ..util.crypto import rand_key from ..util.time import convert_delta, is_delta, is_walltime, secs_until, to_datetime from ..api.s...
29.280576
85
0.700246
2d76f672d784b007ae7b1848d53c6fe637d18009
36,158
py
Python
openbb_terminal/stocks/behavioural_analysis/ba_controller.py
JerBouma/OpenBBTerminal
0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27
[ "MIT" ]
null
null
null
openbb_terminal/stocks/behavioural_analysis/ba_controller.py
JerBouma/OpenBBTerminal
0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27
[ "MIT" ]
null
null
null
openbb_terminal/stocks/behavioural_analysis/ba_controller.py
JerBouma/OpenBBTerminal
0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27
[ "MIT" ]
null
null
null
"""Behavioural Analysis Controller Module""" __docformat__ = "numpy" import argparse import logging from datetime import datetime, timedelta from typing import List import yfinance as yf from prompt_toolkit.completion import NestedCompleter from openbb_terminal import feature_flags as obbff from openbb_terminal.comm...
35.658777
117
0.544748
2d7724ec18884fed3d91061c9f46bfdc5d4da35b
157
py
Python
learning_augmented_online_algorithms/__init__.py
liv20/learning_augmented_online_algorithms
2fce62f425e670e2623975888acca8738f328b20
[ "MIT" ]
null
null
null
learning_augmented_online_algorithms/__init__.py
liv20/learning_augmented_online_algorithms
2fce62f425e670e2623975888acca8738f328b20
[ "MIT" ]
null
null
null
learning_augmented_online_algorithms/__init__.py
liv20/learning_augmented_online_algorithms
2fce62f425e670e2623975888acca8738f328b20
[ "MIT" ]
2
2022-03-23T06:42:16.000Z
2022-03-23T06:43:41.000Z
from .btc_data_loader import BTCDataLoader from .algorithms import OMSThresholdFunction, OWTThresholdFunction, OneMaxSearchAlgorithm, OneWayTradingAlgorithm
52.333333
113
0.898089
2d773539884b4abd23691c508ff23148c96507d5
450
bzl
Python
example/third_party/commons_collections.bzl
wix-playground/rules_maven_third_party
ff0b486df194779d7d8e6c9102cd12138e3305c3
[ "Apache-2.0" ]
null
null
null
example/third_party/commons_collections.bzl
wix-playground/rules_maven_third_party
ff0b486df194779d7d8e6c9102cd12138e3305c3
[ "Apache-2.0" ]
null
null
null
example/third_party/commons_collections.bzl
wix-playground/rules_maven_third_party
ff0b486df194779d7d8e6c9102cd12138e3305c3
[ "Apache-2.0" ]
null
null
null
load("@rules_maven_third_party//:import_external.bzl", import_external = "import_external") def dependencies(): import_external( name = "commons_collections_commons_collections", artifact = "commons-collections:commons-collections:3.1", artifact_sha256 = "c1547d185ba6880bcc2da261c5f7533512b...
45
93
0.777778
2d778c8f91a4f9ea20fc92181faff318d84f8dc1
662
py
Python
components/amp-utility/python/ustruct.py
ekmixon/AliOS-Things
00334295af8aa474d818724149726ca93da4645d
[ "Apache-2.0" ]
4,538
2017-10-20T05:19:03.000Z
2022-03-30T02:29:30.000Z
components/amp-utility/python/ustruct.py
ekmixon/AliOS-Things
00334295af8aa474d818724149726ca93da4645d
[ "Apache-2.0" ]
1,088
2017-10-21T07:57:22.000Z
2022-03-31T08:15:49.000Z
components/amp-utility/python/ustruct.py
willianchanlovegithub/AliOS-Things
637c0802cab667b872d3b97a121e18c66f256eab
[ "Apache-2.0" ]
1,860
2017-10-20T05:22:35.000Z
2022-03-27T10:54:14.000Z
# * coding: UTF8 * """ 该模块实现的功能是原始数据类型打包和解压缩 支持的大小/字节顺序前缀: @, <, >, !. 支持的格式编码: b, B, h, H, i, I, l, L, q, Q, s, P, f, d 后两个取决于浮点支持 函数 ---------- """ def calcsize(fmt): """ 返回需存入给定 fmt 的字节数量 """ pass def pack(fmt, v1, v2): """ 根据格式字符串fmt,打包 v1, v2, … 值。返回值为一个解码该值的字节对象 """ pass def pack_...
13.24
69
0.574018
2d77922e6d41d27b6e4de49adc0885d1d8590a1b
944
py
Python
services/traction/acapy_wrapper/models/v20_cred_bound_offer_request.py
Open-Earth-Foundation/traction
908b555a7f408a88541b7692d3730e37a297c919
[ "Apache-2.0" ]
12
2022-01-29T20:30:03.000Z
2022-03-29T11:46:14.000Z
services/traction/acapy_wrapper/models/v20_cred_bound_offer_request.py
Open-Earth-Foundation/traction
908b555a7f408a88541b7692d3730e37a297c919
[ "Apache-2.0" ]
38
2021-11-22T17:52:50.000Z
2022-03-31T17:52:00.000Z
services/traction/acapy_wrapper/models/v20_cred_bound_offer_request.py
Open-Earth-Foundation/traction
908b555a7f408a88541b7692d3730e37a297c919
[ "Apache-2.0" ]
9
2021-11-22T18:05:48.000Z
2022-03-29T11:25:08.000Z
# coding: utf-8 from __future__ import annotations from datetime import date, datetime # noqa: F401 import re # noqa: F401 from typing import Any, Dict, List, Optional # noqa: F401 from pydantic import AnyUrl, BaseModel, EmailStr, validator # noqa: F401 from acapy_wrapper.models.v20_cred_filter import V20CredFil...
31.466667
96
0.774364
2d779c62fd4267abe0a860f48c70929ef30160aa
10,032
py
Python
gis4wrf/plugin/ui/options.py
XavierCLL/gis4wrf
686b167d656f5f1835858f1b94de4423091f957c
[ "MIT" ]
111
2018-06-13T15:34:52.000Z
2022-03-23T04:59:53.000Z
gis4wrf/plugin/ui/options.py
XavierCLL/gis4wrf
686b167d656f5f1835858f1b94de4423091f957c
[ "MIT" ]
190
2018-06-14T15:08:37.000Z
2022-03-02T14:02:54.000Z
gis4wrf/plugin/ui/options.py
XavierCLL/gis4wrf
686b167d656f5f1835858f1b94de4423091f957c
[ "MIT" ]
29
2018-06-13T15:35:05.000Z
2022-01-27T03:18:18.000Z
# GIS4WRF (https://doi.org/10.5281/zenodo.1288569) # Copyright (c) 2018 D. Meyer and M. Riechert. Licensed under MIT. from typing import Tuple, Callable import os import platform import multiprocessing import subprocess import webbrowser from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import ( QHBoxLayout, QV...
43.055794
146
0.652811
2d779de9e8468a3382500f8e73a159ec5a5819ad
1,998
py
Python
tests/admm/test_ppp.py
vishalbelsare/sporco
afc3dae3ab81d84a23e8487812670ecb7457e869
[ "BSD-3-Clause" ]
217
2016-06-13T16:41:26.000Z
2022-03-22T06:31:05.000Z
tests/admm/test_ppp.py
vishalbelsare/sporco
afc3dae3ab81d84a23e8487812670ecb7457e869
[ "BSD-3-Clause" ]
21
2016-06-13T23:28:35.000Z
2022-02-17T23:20:01.000Z
tests/admm/test_ppp.py
vishalbelsare/sporco
afc3dae3ab81d84a23e8487812670ecb7457e869
[ "BSD-3-Clause" ]
47
2016-12-14T13:08:33.000Z
2021-12-12T01:59:49.000Z
from builtins import object import numpy as np from sporco.admm import ppp import sporco.prox as sp import sporco.metric as sm class TestSet01(object): def setup_method(self, method): np.random.seed(12345) def test_01(self): N = 64 lmbda = 0.1 s = np.random.randn(N, 1) ...
27
77
0.493994
2d77a13d9821eda07cf5386f03c34ffbbf60fadf
357
py
Python
docs/build/html/plot_module-3.py
marcoalsina/araucaria
78039106ae27d3fdef9265503c33f33992199d8e
[ "BSD-2-Clause" ]
8
2021-07-11T22:54:21.000Z
2022-02-16T20:22:25.000Z
docs/build/html/plot_module-3.py
marcoalsina/araucaria
78039106ae27d3fdef9265503c33f33992199d8e
[ "BSD-2-Clause" ]
null
null
null
docs/build/html/plot_module-3.py
marcoalsina/araucaria
78039106ae27d3fdef9265503c33f33992199d8e
[ "BSD-2-Clause" ]
null
null
null
import matplotlib.pyplot as plt from araucaria.testdata import get_testpath from araucaria.io import read_dnd from araucaria.xas import pre_edge from araucaria.plot import fig_pre_edge fpath = get_testpath('dnd_testfile1.dat') group = read_dnd(fpath, scan='mu') pre = pre_edge(group, update=True) fig, ax = fig_p...
32.454545
43
0.789916
2d77c494666ffb5d5eb669ea97d297b6d80a099c
34,323
py
Python
pysd/py_backend/functions.py
swhatelse/pysd
dc6288b477056ac5f2af0cac215d233009858bac
[ "MIT" ]
null
null
null
pysd/py_backend/functions.py
swhatelse/pysd
dc6288b477056ac5f2af0cac215d233009858bac
[ "MIT" ]
null
null
null
pysd/py_backend/functions.py
swhatelse/pysd
dc6288b477056ac5f2af0cac215d233009858bac
[ "MIT" ]
null
null
null
""" functions.py These are supports for functions that are included in modeling software but have no straightforward equivalent in python. """ from __future__ import division, absolute_import from functools import wraps import pandas as pd import pandas as _pd import numpy as np from . import utils import imp impo...
34.084409
202
0.609387
2d77cdff6c37b634981823f5b94148e9251be9ac
773
py
Python
oscar/lib/python2.7/site-packages/django/conf/locale/hi/formats.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/django/conf/locale/hi/formats.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/django/conf/locale/hi/formats.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' TIME_FORMAT = 'g:i...
30.92
78
0.737387
2d77de0d4c89008b46d07d48f5952c9d4fd371fa
1,500
py
Python
docs/conf.py
annuupadhyayPS/pamqp
cf7b3d2ba367ff8226b1a6a1fbf6931162de3574
[ "BSD-3-Clause" ]
38
2015-08-24T06:52:59.000Z
2022-02-06T09:48:15.000Z
docs/conf.py
annuupadhyayPS/pamqp
cf7b3d2ba367ff8226b1a6a1fbf6931162de3574
[ "BSD-3-Clause" ]
33
2015-01-05T19:28:05.000Z
2022-02-13T22:31:36.000Z
docs/conf.py
annuupadhyayPS/pamqp
cf7b3d2ba367ff8226b1a6a1fbf6931162de3574
[ "BSD-3-Clause" ]
21
2015-05-06T08:33:28.000Z
2022-02-19T19:39:33.000Z
import datetime import pkg_resources import sphinx_material html_theme = 'sphinx_material' html_theme_path = sphinx_material.html_theme_path() html_context = sphinx_material.get_html_context() html_sidebars = { "**": ["globaltoc.html", "searchbox.html"] } html_theme_options = { 'base_url': 'http://pamqp.readt...
26.315789
70
0.698
2d77f3d7c7dfd746921701603e7280e40896ddfe
476
py
Python
dayu_widgets_tag/__init__.py
muyr/dayu_widgets_tag
2150eac1a87eda55e759f9451878320a38869b6a
[ "MIT" ]
10
2019-08-27T01:28:30.000Z
2022-03-21T07:10:06.000Z
dayu_widgets_tag/__init__.py
muyr/dayu_widgets_tag
2150eac1a87eda55e759f9451878320a38869b6a
[ "MIT" ]
null
null
null
dayu_widgets_tag/__init__.py
muyr/dayu_widgets_tag
2150eac1a87eda55e759f9451878320a38869b6a
[ "MIT" ]
4
2020-03-25T04:07:53.000Z
2022-02-16T14:18:01.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################### # Author: Mu yanru # Date : 2019.8 # Email : muyanru345@163.com ################################################################### # Import local modules from dayu_widgets_tag.checkable_tag import MChec...
22.666667
67
0.508403
2d7815b10bbff62f854fdcdf35d06c41962283f0
2,238
py
Python
hdltools/vcd/__init__.py
brunosmmm/hdltools
a98ca8c4d168740fa229c939a7b1f31ea73eec24
[ "MIT" ]
2
2020-02-28T13:02:39.000Z
2021-06-30T09:15:35.000Z
hdltools/vcd/__init__.py
brunosmmm/hdltools
a98ca8c4d168740fa229c939a7b1f31ea73eec24
[ "MIT" ]
1
2020-03-22T17:32:45.000Z
2020-03-23T15:43:39.000Z
hdltools/vcd/__init__.py
brunosmmm/hdltools
a98ca8c4d168740fa229c939a7b1f31ea73eec24
[ "MIT" ]
null
null
null
"""Value change dump stuff.""" class VCDObject: """Abstract VCD object class.""" class VCDScope(VCDObject): """VCD scope.""" def __init__(self, *scopes: str): """Initialize. Parameters ---------- scopes List of scope names """ self._scopes = []...
26.329412
69
0.533512
2d785e1c3893e0982a63764f61e74e68b58053c2
2,658
py
Python
src/spice_demo/demo.py
itsthere-academy/code-samples
23535c3ec032abaa481f7f0df2f9794a98fd0aeb
[ "Apache-2.0" ]
null
null
null
src/spice_demo/demo.py
itsthere-academy/code-samples
23535c3ec032abaa481f7f0df2f9794a98fd0aeb
[ "Apache-2.0" ]
null
null
null
src/spice_demo/demo.py
itsthere-academy/code-samples
23535c3ec032abaa481f7f0df2f9794a98fd0aeb
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Piotr Szukalski # 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 writin...
28.580645
111
0.667795
2d786a6f9ec8d630fc40c96a5c97352f62ab63f3
389
py
Python
pytest_zigzag/session_messages.py
ryan-rs/pytest-zigzag
7116357ab680a5a9bac47af3ac428f706cee0e93
[ "Apache-2.0" ]
1
2021-01-19T23:59:54.000Z
2021-01-19T23:59:54.000Z
pytest_zigzag/session_messages.py
ryan-rs/pytest-zigzag
7116357ab680a5a9bac47af3ac428f706cee0e93
[ "Apache-2.0" ]
3
2018-08-23T19:44:46.000Z
2019-02-21T22:04:29.000Z
pytest_zigzag/session_messages.py
ryan-rs/pytest-zigzag
7116357ab680a5a9bac47af3ac428f706cee0e93
[ "Apache-2.0" ]
3
2018-08-17T00:37:15.000Z
2018-08-21T14:54:56.000Z
# -*- coding: utf-8 -*- class SessionMessages(object): """A class to contain a list of messages""" def __init__(self): self._lst = [] def __getitem__(self, item): return self._lst[item] def __getattr__(self, method): return getattr(self._lst, method) def drain(self): ...
21.611111
48
0.586118
2d786a92f9dfcb98caa25b5a745b7dd16a64c6fe
506
py
Python
src/health_receive.py
mnuyens/forseti2
3c6d76ffac2b64d51f03d3922e3b388a4e35f1a8
[ "Apache-2.0" ]
1
2015-03-07T04:48:53.000Z
2015-03-07T04:48:53.000Z
src/health_receive.py
mnuyens/forseti2
3c6d76ffac2b64d51f03d3922e3b388a4e35f1a8
[ "Apache-2.0" ]
null
null
null
src/health_receive.py
mnuyens/forseti2
3c6d76ffac2b64d51f03d3922e3b388a4e35f1a8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2.7 import lcm import time import forseti2 import settings lc = lcm.LCM(settings.LCM_URI) def health_handler(channel, data): msg = forseti2.health.decode(data) print('forseti2.health:' + 'channel=' + str(channel) + ', uptime=' + str(msg.uptime) + '...
21.083333
53
0.602767
2d7886e96b0a93963c2c3fde18e7e9346bcdc012
8,668
py
Python
tests/unit_tests/test_cli.py
manuel-sommer/DrHeader
c2098d592578b046e77df44445651b66394e0d49
[ "MIT" ]
null
null
null
tests/unit_tests/test_cli.py
manuel-sommer/DrHeader
c2098d592578b046e77df44445651b66394e0d49
[ "MIT" ]
null
null
null
tests/unit_tests/test_cli.py
manuel-sommer/DrHeader
c2098d592578b046e77df44445651b66394e0d49
[ "MIT" ]
null
null
null
import json import os import os.path import tempfile from unittest import mock import unittest2 import xmlunittest import yaml from click import ClickException from click.testing import CliRunner from drheader import cli from drheader.cli_utils import file_junit_report class TestCli(unittest2.TestCase): def se...
45.862434
117
0.683779
2d7888ea9d0d22683531e6a26358c8b7411e785c
8,343
py
Python
kg/script/testscripts.py
kevinsogo/compgen
c765fdb3008d41f409836a45ad5a506db6a99e74
[ "MIT" ]
6
2019-11-30T17:03:13.000Z
2021-09-30T05:08:31.000Z
kg/script/testscripts.py
kevinsogo/compgen
c765fdb3008d41f409836a45ad5a506db6a99e74
[ "MIT" ]
1
2020-01-20T12:13:03.000Z
2020-01-20T12:13:03.000Z
kg/script/testscripts.py
kevinsogo/compgen
c765fdb3008d41f409836a45ad5a506db6a99e74
[ "MIT" ]
null
null
null
from collections import defaultdict from itertools import islice, count from subprocess import PIPE import os.path from .formats import * from .programs import * from .utils import * class TestScriptError(Exception): ... def find_matches(cmd, generators): for prog in generators: if prog.matches_abbr(cmd)...
41.30198
150
0.571497
2d78a3e7485f3adf3b5e325700e32cbef06ca709
5,848
py
Python
util/data/gen/dhcpcsvc.DLL.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
util/data/gen/dhcpcsvc.DLL.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
util/data/gen/dhcpcsvc.DLL.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
symbols = [] exports = [{'type': 'function', 'name': 'DhcpAcquireParameters', 'address': '0x7ffb35663f40'}, {'type': 'function', 'name': 'DhcpAcquireParametersByBroadcast', 'address': '0x7ffb356640d0'}, {'type': 'function', 'name': 'DhcpCApiCleanup', 'address': '0x7ffb35664260'}, {'type': 'function', 'name': 'DhcpCApiI...
2,924
5,835
0.691689
2d78ba59bcb7714a5514b8cb697bfbffb135a9e4
195
py
Python
spa/models/session.py
fergalmoran/dss.api
d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073
[ "BSD-2-Clause" ]
null
null
null
spa/models/session.py
fergalmoran/dss.api
d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073
[ "BSD-2-Clause" ]
null
null
null
spa/models/session.py
fergalmoran/dss.api
d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073
[ "BSD-2-Clause" ]
null
null
null
from django.db import models from spa.models import BaseModel, UserProfile class Session(BaseModel): jwt_token = models.CharField(max_length=2048) user = models.ForeignKey(UserProfile)
24.375
49
0.784615
2d78c666d92b21e376f8b0d8f286a9058c8a93fe
12,185
py
Python
tests/CNN/t01_cnn_noise_variability.py
michaelStettler/BVS
947f1e505ccc3ebcf1926c8f52924d823bd1e101
[ "Apache-2.0" ]
null
null
null
tests/CNN/t01_cnn_noise_variability.py
michaelStettler/BVS
947f1e505ccc3ebcf1926c8f52924d823bd1e101
[ "Apache-2.0" ]
null
null
null
tests/CNN/t01_cnn_noise_variability.py
michaelStettler/BVS
947f1e505ccc3ebcf1926c8f52924d823bd1e101
[ "Apache-2.0" ]
null
null
null
import os import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from utils.load_config import load_config from utils.load_from_csv import load_from_csv from utils.extraction_model import load_extraction_model plt.style.use('ggplot') """ run: python -m tests.CNN.t01_cnn_noise_variability """ de...
44.470803
137
0.590973
2d78d613b5dff2fbd01ce8c338fe9de585846516
2,550
py
Python
venv/Lib/site-packages/pyrogram/raw/types/secure_credentials_encrypted.py
D1ne2021/jjhhhjj
a090da30983b3ef276dfe4cef2ded4526f36002a
[ "MIT" ]
2
2021-12-13T07:09:55.000Z
2022-01-12T12:15:20.000Z
venv/Lib/site-packages/pyrogram/raw/types/secure_credentials_encrypted.py
hoangkiet1906/Botcie_ver1
c133b915edde06dac690a7dc6ca160f6792fc4c8
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pyrogram/raw/types/secure_credentials_encrypted.py
hoangkiet1906/Botcie_ver1
c133b915edde06dac690a7dc6ca160f6792fc4c8
[ "MIT" ]
null
null
null
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2021 Dan <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free...
31.481481
106
0.612549
2d78fbb932cbaada1f8b254a5827a0535b24cc28
1,829
py
Python
runtests.py
aericson/django-bower-cdn
f1ddf20c0225ed1ec77d5c39f4037282381d1bb7
[ "MIT" ]
null
null
null
runtests.py
aericson/django-bower-cdn
f1ddf20c0225ed1ec77d5c39f4037282381d1bb7
[ "MIT" ]
null
null
null
runtests.py
aericson/django-bower-cdn
f1ddf20c0225ed1ec77d5c39f4037282381d1bb7
[ "MIT" ]
null
null
null
import sys try: from django.conf import settings settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, MIDDLEWARE_CLASSES=[ ], ROOT_URLCONF='cdn_js.urls'...
24.716216
85
0.579005
2d790e6fed3ad1bba666a44c5af28525f8c0fa48
1,010
py
Python
lib/functions/slack/apps/memo.py
haandol/serverless-slack-bot
0f5017cf968817807a46c3cb3f6d3c5ab98e5052
[ "MIT" ]
3
2020-07-18T06:36:57.000Z
2020-07-25T03:31:34.000Z
lib/functions/slack/apps/memo.py
haandol/serverless-slack-bot
0f5017cf968817807a46c3cb3f6d3c5ab98e5052
[ "MIT" ]
1
2021-08-13T11:27:21.000Z
2021-08-13T11:27:21.000Z
lib/functions/slack/apps/memo.py
haandol/bee-bot
0f5017cf968817807a46c3cb3f6d3c5ab98e5052
[ "MIT" ]
null
null
null
import re import boto3 from . import on_command KEY_PATH = '/BEEBOT/MEMO/' def convert_key(key): if re.search(r'[^a-zA-Z0-9.-_]', key): return None return f'{KEY_PATH}{key}' @on_command(['ㅁㅁ', '메모', 'memo']) def run(robot, channel, user, tokens): '''메모를 해드립니다. - !memo 이름 "저장할 내용"''' robot.l...
26.578947
83
0.572277
2d792f36e730ad5f89e3ffb7d582a6dec2d4bb78
7,356
py
Python
ideas/views.py
fossabot/flaam-api
d11651aa77c4b7c5e26b6443f9699e0a4bec4354
[ "MIT" ]
1
2022-01-07T04:01:06.000Z
2022-01-07T04:01:06.000Z
ideas/views.py
fossabot/flaam-api
d11651aa77c4b7c5e26b6443f9699e0a4bec4354
[ "MIT" ]
26
2021-11-14T06:02:59.000Z
2022-03-29T14:17:39.000Z
ideas/views.py
fossabot/flaam-api
d11651aa77c4b7c5e26b6443f9699e0a4bec4354
[ "MIT" ]
1
2022-01-05T18:51:01.000Z
2022-01-05T18:51:01.000Z
from django.db.models import Count from django.shortcuts import get_object_or_404 from drf_yasg import openapi from drf_yasg.utils import swagger_auto_schema from rest_framework import status from rest_framework.exceptions import ParseError from rest_framework.generics import ListCreateAPIView, RetrieveUpdateAPIView fr...
29.075099
77
0.576944
2d79595953133b383c3296f57d4bce859603c7d2
3,946
py
Python
LSTM.py
qing42102/deep_learning_examples
d7695673e0c4bfe211f303ea5444765e8d4fe5f4
[ "MIT" ]
null
null
null
LSTM.py
qing42102/deep_learning_examples
d7695673e0c4bfe211f303ea5444765e8d4fe5f4
[ "MIT" ]
null
null
null
LSTM.py
qing42102/deep_learning_examples
d7695673e0c4bfe211f303ea5444765e8d4fe5f4
[ "MIT" ]
null
null
null
# To add a new cell, type '# %%' # To add a new markdown cell, type '# %% [markdown]' # %% import tensorflow as tf import tensorflow.keras as keras import numpy as np import matplotlib.pyplot as plt # %% def mean_per_joint_position_error(y_actual: tf.Tensor, y_pred: tf.Tensor): ''' y_pred and y_actual are 4 di...
40.265306
107
0.764065
2d796085312e5e944c4bfb1233eb5f50d50be44c
7,433
py
Python
experiments/2021-02-18-knockouts/hpcc/old/aggregate_knockouts.py
amlalejini/plastic-evolvability-avida
909d944e52a102e09dd714a8b7e0f2274c4a8072
[ "MIT" ]
2
2021-09-16T14:47:43.000Z
2021-10-31T04:55:16.000Z
experiments/2021-02-18-knockouts/hpcc/old/aggregate_knockouts.py
amlalejini/evolutionary-consequences-of-plasticity
909d944e52a102e09dd714a8b7e0f2274c4a8072
[ "MIT" ]
null
null
null
experiments/2021-02-18-knockouts/hpcc/old/aggregate_knockouts.py
amlalejini/evolutionary-consequences-of-plasticity
909d944e52a102e09dd714a8b7e0f2274c4a8072
[ "MIT" ]
2
2020-08-19T20:01:14.000Z
2020-12-21T21:24:12.000Z
''' Aggregate data ''' import argparse, os, sys, errno, subprocess, csv phenotypic_traits = ["not","nand","and","ornot","or","andnot"]#,"nor","xor","equals"] even_traits = {"not", "and", "or"}#, "nor", "equals"} odd_traits = {"nand", "ornot", "andnot", "xor"}#, "equals"} even_profile = "101010"#101" odd_profile = "01...
40.617486
230
0.579039
2d796f4efa288d9caa8e4704390ef8f3e9e85725
957
py
Python
myauths/views.py
benoitboyer/DjangoBio
415e048e7207f4abc6ac9b6bde7b7c7043aab78a
[ "MIT" ]
null
null
null
myauths/views.py
benoitboyer/DjangoBio
415e048e7207f4abc6ac9b6bde7b7c7043aab78a
[ "MIT" ]
null
null
null
myauths/views.py
benoitboyer/DjangoBio
415e048e7207f4abc6ac9b6bde7b7c7043aab78a
[ "MIT" ]
null
null
null
from django.contrib.auth import login, authenticate from django.contrib.auth.forms import UserCreationForm from django.contrib.auth import logout from django.shortcuts import render, redirect from django.contrib.auth import views from .forms import SignUpForm class LoginView(views.LoginView): template_name= 'myauths...
30.870968
73
0.68652
2d798189c5de5e503521495b5313d0ba45b1b591
10,121
py
Python
toontown/cogdominium/CogdoMazeGameGuis.py
LittleNed/toontown-stride
1252a8f9a8816c1810106006d09c8bdfe6ad1e57
[ "Apache-2.0" ]
3
2020-01-02T08:43:36.000Z
2020-07-05T08:59:02.000Z
toontown/cogdominium/CogdoMazeGameGuis.py
NoraTT/Historical-Commits-Project-Altis-Source
fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179
[ "Apache-2.0" ]
null
null
null
toontown/cogdominium/CogdoMazeGameGuis.py
NoraTT/Historical-Commits-Project-Altis-Source
fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179
[ "Apache-2.0" ]
4
2019-06-20T23:45:23.000Z
2020-10-14T20:30:15.000Z
from direct.gui.DirectLabel import DirectLabel from direct.gui.DirectGui import DirectFrame, DGG from direct.task.Task import Task from direct.interval.MetaInterval import Sequence, Parallel from direct.interval.FunctionInterval import Wait, Func from pandac.PandaModules import TextNode, NodePath, Point3, CardMaker fro...
38.777778
291
0.666041
2d79832c3da14978d3db7649ffca9e31b571b18f
3,678
py
Python
LinuxInfo.py
ashiscs/Cinfo
7e8fa8ce19f323425fab6117e68ac2678b4e17dc
[ "MIT" ]
2
2019-08-04T17:07:15.000Z
2020-02-27T21:10:33.000Z
LinuxInfo.py
ashiscs/Cinfo
7e8fa8ce19f323425fab6117e68ac2678b4e17dc
[ "MIT" ]
null
null
null
LinuxInfo.py
ashiscs/Cinfo
7e8fa8ce19f323425fab6117e68ac2678b4e17dc
[ "MIT" ]
null
null
null
''' Author : Deepak Chauhan GitHub : https://github.com/royaleagle73 Email : 2018PGCACA63@nitjsr.ac.in ''' import os import threading from timeit import default_timer as timer from tabulate import tabulate from lib.linux import get_browsers from lib.linux import get_drives from lib.linux import get_hw_info from lib....
34.055556
119
0.740076
2d79a0e70efe9591202a55baba2b34a6a462ce90
604
py
Python
navycut/contrib/mail/sister.py
FlaskAio/navycut
40f378f1710a26645df8d726c4d1caf33097da50
[ "MIT" ]
4
2021-09-22T09:23:04.000Z
2022-03-05T05:58:46.000Z
navycut/contrib/mail/sister.py
FlaskAio/navycut
40f378f1710a26645df8d726c4d1caf33097da50
[ "MIT" ]
21
2021-09-27T03:19:21.000Z
2022-03-31T03:20:59.000Z
navycut/contrib/mail/sister.py
FlaskAio/navycut
40f378f1710a26645df8d726c4d1caf33097da50
[ "MIT" ]
null
null
null
from navycut.core.app_config import AppSister from . import mail """ The default app to deliver the mail service. Internally it's using the flask-mail ("https://pypi.org/project/Flask-Mail/") module. Special thanks to Matt Wright("https://github.com/mattupstate") to provide this module to us to write a fullstack proj...
27.454545
71
0.754967
2d79a9429136b2a30c362c4f5576d16487b547cb
5,938
py
Python
music.py
sabo/steven
4c7b4e350e7cdafbb3f491701d1d99a518cb54d8
[ "Unlicense" ]
null
null
null
music.py
sabo/steven
4c7b4e350e7cdafbb3f491701d1d99a518cb54d8
[ "Unlicense" ]
null
null
null
music.py
sabo/steven
4c7b4e350e7cdafbb3f491701d1d99a518cb54d8
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python2 """Methods for dealing with our sound making thingies.""" from mingus.containers.note import Note from mingus.containers.track import Track from mingus.containers.composition import Composition from mingus.containers.instrument import MidiInstrument from mingus.midi import Sequencer import time ...
31.924731
80
0.647524
2d79b828e4dc05f9b1a0abec15d79893a8cc04ff
7,711
py
Python
data/level/level10.py
levelupai/match3-level-similarity
cc9b28b8741b41bea1273c8bc9b4d265d79a1dca
[ "Apache-2.0" ]
null
null
null
data/level/level10.py
levelupai/match3-level-similarity
cc9b28b8741b41bea1273c8bc9b4d265d79a1dca
[ "Apache-2.0" ]
6
2020-07-04T02:53:08.000Z
2022-03-11T23:53:14.000Z
data/level/level10.py
levelupai/match3-level-similarity
cc9b28b8741b41bea1273c8bc9b4d265d79a1dca
[ "Apache-2.0" ]
3
2019-12-31T11:42:59.000Z
2021-03-28T20:06:13.000Z
data = { 'level_index': 10, 'move_count': 23, 'board_info': { (0, 1): { 'base': (4, 1), 'cover': (63, 1), 'prev': (0, -1), 'next': (0, 1), 'fall_point': (0, -1) }, (0, 2): { 'prev': (0, -1), 'next': (...
23.225904
33
0.200752
2d79e7e15e9b75ebbd8d5f320cb4db7aab4ab9b8
1,486
py
Python
src/dataset/info/MnistTransformedInfo.py
dhruvtapasvi/implementation
964980f431517f4548a87172a05107cdf700fb84
[ "MIT" ]
1
2020-05-25T10:24:58.000Z
2020-05-25T10:24:58.000Z
src/dataset/info/MnistTransformedInfo.py
dhruvtapasvi/implementation
964980f431517f4548a87172a05107cdf700fb84
[ "MIT" ]
1
2017-12-18T02:16:44.000Z
2017-12-18T02:16:44.000Z
src/dataset/info/MnistTransformedInfo.py
dhruvtapasvi/implementation
964980f431517f4548a87172a05107cdf700fb84
[ "MIT" ]
null
null
null
from enum import Enum import math from config import routes RANGE = (0, 255) RANDOM_GENERATION_SEED = "GENERATE_MNIST_TRANSFORMED" IMAGE_DIMENSIONS = (64, 64) LABEL_DIMENSIONS = (6,) PADDING = ((18, 18), (18, 18)) TRANSFORM_MIN_MAX_ROTATIONS = (0, 2.0 * math.pi) TRANSFORM_SHEAR_FACTOR = 0.14 TRANSFORM_LOG2_STRETCH_...
37.15
114
0.798116
2d7a42f51373a49df26e74a1d0dc7ca589c073da
12,293
py
Python
tests/scripts/thread-cert/Cert_5_3_02_RealmLocal.py
sarah-iot/openthread
8210a02400c145eb862b65e32040ed0415ba36c2
[ "BSD-3-Clause" ]
69
2021-12-16T01:34:09.000Z
2022-03-31T08:27:39.000Z
tests/scripts/thread-cert/Cert_5_3_02_RealmLocal.py
xuyirio/openthread
349041bc61e899acdccefea455c3401c05e1318b
[ "BSD-3-Clause" ]
6
2022-01-12T18:22:08.000Z
2022-03-25T10:19:27.000Z
tests/scripts/thread-cert/Cert_5_3_02_RealmLocal.py
xuyirio/openthread
349041bc61e899acdccefea455c3401c05e1318b
[ "BSD-3-Clause" ]
21
2021-12-20T09:05:45.000Z
2022-03-28T02:52:28.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 # ...
41.530405
184
0.629139
2d7a64c2958aad1dcbd1cf3193f3ac625cae15fd
1,934
py
Python
camply/notifications/silent_notifications.py
grantland/camply
aec4c6b82380fdc85f254563d8e8de290edc05ad
[ "MIT" ]
null
null
null
camply/notifications/silent_notifications.py
grantland/camply
aec4c6b82380fdc85f254563d8e8de290edc05ad
[ "MIT" ]
null
null
null
camply/notifications/silent_notifications.py
grantland/camply
aec4c6b82380fdc85f254563d8e8de290edc05ad
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Author:: Justin Flannery (mailto:juftin@juftin.com) """ Silent Notifications """ from abc import ABC import logging from pprint import pformat from typing import List from camply.containers import AvailableCampsite from camply.notifications.base_notifications import BaseNotifications l...
26.861111
74
0.58635
2d7a69771a0032bf39815943a27c94e12cbd437d
2,593
py
Python
algorithms/first_choice_hill_climbing.py
nazaruka/Catan-AI
d7c91c7011ac82ad41d3b80a29c73c23ab7b579e
[ "MIT" ]
9
2019-07-16T15:28:00.000Z
2022-02-08T00:53:39.000Z
algorithms/first_choice_hill_climbing.py
nazaruka/Catan-AI
d7c91c7011ac82ad41d3b80a29c73c23ab7b579e
[ "MIT" ]
2
2020-01-09T15:27:58.000Z
2020-09-23T18:04:41.000Z
algorithms/first_choice_hill_climbing.py
nazaruka/Catan-AI
d7c91c7011ac82ad41d3b80a29c73c23ab7b579e
[ "MIT" ]
5
2019-08-07T16:51:38.000Z
2021-05-06T04:01:32.000Z
from abc import ABC, abstractmethod from typing import Iterable, Any AbstractHillClimbingState = Any AbstractHillClimbingStateEvaluation = Any class AbstractHillClimbableSpace(ABC): @abstractmethod def get_neighbors(self, state: AbstractHillClimbingState) -> Iterable[AbstractHillClimbingState]: """...
32.822785
121
0.683764
2d7a91e8132b3a93228355a31e10f62ab74187a5
1,699
py
Python
putil/compat3.py
pmacosta/putil
416cea52df8221981727e25d133e9b4e3f464798
[ "MIT" ]
6
2015-12-15T04:09:08.000Z
2020-02-21T01:40:57.000Z
putil/compat3.py
pmacosta/putil
416cea52df8221981727e25d133e9b4e3f464798
[ "MIT" ]
null
null
null
putil/compat3.py
pmacosta/putil
416cea52df8221981727e25d133e9b4e3f464798
[ "MIT" ]
2
2016-01-21T23:29:17.000Z
2020-02-21T01:41:05.000Z
# compat3.py # Copyright (c) 2013-2016 Pablo Acosta-Serafini # See LICENSE for details # pylint: disable=C0111,W0122,W0613 ### # Functions ### def _ex_type_str(exobj): """ Returns a string corresponding to the exception type """ return str(exobj).split("'")[1].split('.')[-1] def _get_ex_msg(obj): """ Ge...
23.929577
70
0.649205
2d7a9ecf89cb1c9a4ef176a1f9996899b316782b
1,900
py
Python
app/utils.py
greenhub-project/dataset-converter
f9a7f48007f27ddd1ed32b72b2886875afab8153
[ "MIT" ]
null
null
null
app/utils.py
greenhub-project/dataset-converter
f9a7f48007f27ddd1ed32b72b2886875afab8153
[ "MIT" ]
null
null
null
app/utils.py
greenhub-project/dataset-converter
f9a7f48007f27ddd1ed32b72b2886875afab8153
[ "MIT" ]
null
null
null
import pickle import numpy as np import pandas as pd import pyarrow.parquet as pq import subprocess from subprocess import Popen def typecast_ints(gl_int): if gl_int is not None: return gl_int.apply(pd.to_numeric, downcast='unsigned') return None def typecast_floats(gl_float): if gl_float is not None: ...
25.333333
65
0.696316
2d7b1e4f3e53f646dd66153b8f3fb49a59393d73
1,082
py
Python
fkie_iop_builder/cmake/cpy.py
Project-SwaG/iop_core
91946773fe02e5a9de1b46235bacdcc394d84518
[ "BSD-3-Clause" ]
8
2018-05-30T23:20:48.000Z
2021-05-04T07:21:30.000Z
fkie_iop_builder/cmake/cpy.py
Project-SwaG/iop_core
91946773fe02e5a9de1b46235bacdcc394d84518
[ "BSD-3-Clause" ]
5
2018-05-06T22:17:27.000Z
2021-05-18T15:42:50.000Z
fkie_iop_builder/cmake/cpy.py
fkie/iop_core
738e8538e9ab4193d3957d75e184a55d09a3c7b2
[ "BSD-3-Clause" ]
7
2018-11-10T14:19:53.000Z
2022-01-09T07:47:32.000Z
# ROS/IOP Bridge # Copyright (c) 2017 Fraunhofer # # This program is dual licensed; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 as published by the Free Software Foundation, or # enter into a proprietary license agreement with the copyright # holder. # # This...
33.8125
67
0.746765
2d7b21c63d0666a7f6ff69f69e02ed6522e67e22
734
py
Python
examples/simple_example/model.py
HarshilShrivastava/SMCPy
e3c958023aab3f3143e70de5a52e3c195e536dd1
[ "NASA-1.3" ]
1
2020-02-11T22:37:43.000Z
2020-02-11T22:37:43.000Z
examples/simple_example/model.py
HarshilShrivastava/SMCPy
e3c958023aab3f3143e70de5a52e3c195e536dd1
[ "NASA-1.3" ]
null
null
null
examples/simple_example/model.py
HarshilShrivastava/SMCPy
e3c958023aab3f3143e70de5a52e3c195e536dd1
[ "NASA-1.3" ]
null
null
null
import numpy as np from smcpy.model.base_model import BaseModel class Model(BaseModel): """ Defines a simple linear model for MCMC and fit tests. """ def __init__(self, x): """ Class is instanced with a support, x, defining points where the model will be evaluated (i.e., y(x))...
27.185185
73
0.555858
2d7b2e2ddd80051371e19114aa8907556f2dfa0a
11,087
py
Python
libcity/evaluator/map_matching_evaluator.py
LibCity/Bigscity-LibCity-Docs-zh_CN
2be639c3fe7d75727ade18f473d6f625900f73f2
[ "Apache-2.0" ]
5
2021-09-28T12:32:50.000Z
2022-02-03T09:04:35.000Z
libcity/evaluator/map_matching_evaluator.py
aptx1231/Bigscity-TrafficDL-Docs-zh_CN
2be639c3fe7d75727ade18f473d6f625900f73f2
[ "Apache-2.0" ]
null
null
null
libcity/evaluator/map_matching_evaluator.py
aptx1231/Bigscity-TrafficDL-Docs-zh_CN
2be639c3fe7d75727ade18f473d6f625900f73f2
[ "Apache-2.0" ]
1
2021-12-16T05:10:35.000Z
2021-12-16T05:10:35.000Z
import os import json import datetime import pandas as pd import networkx as nx from libcity.utils import ensure_dir from logging import getLogger from libcity.evaluator.abstract_evaluator import AbstractEvaluator class MapMatchingEvaluator(AbstractEvaluator): def __init__(self, config): self.metrics = ...
44.88664
109
0.52061
2d7b320702c8f725969dcbd9eed477fdc0b79df6
858
py
Python
cp-book/ch2/nonlineards/set/_11062_AndysSecondDictionary.py
andrey-yemelyanov/competitive-programming
f5c5fc9a5951a81dbae1250e17cd3d51a96b7a47
[ "MIT" ]
null
null
null
cp-book/ch2/nonlineards/set/_11062_AndysSecondDictionary.py
andrey-yemelyanov/competitive-programming
f5c5fc9a5951a81dbae1250e17cd3d51a96b7a47
[ "MIT" ]
null
null
null
cp-book/ch2/nonlineards/set/_11062_AndysSecondDictionary.py
andrey-yemelyanov/competitive-programming
f5c5fc9a5951a81dbae1250e17cd3d51a96b7a47
[ "MIT" ]
null
null
null
# Problem name: 11062 Andy's Second Dictionary # Problem url: https://uva.onlinejudge.org/external/110/11062.pdf # Author: Andrey Yemelyanov import sys import math import re def readline(): return sys.stdin.readline().strip() def read_lines(): lines = [] for line in sys.stdin: lines.append(line.strip()) return...
19.5
81
0.658508
2d7b69ce2f44672a90b6664467a2227d415e1ac6
701
py
Python
ext/DB/redis/utils.py
Jie-Yuan/1_DataMining
f5338388b4f883233f350d4fb9c5903180883430
[ "Apache-2.0" ]
14
2019-06-25T13:46:32.000Z
2020-10-27T02:04:59.000Z
ext/DB/redis/utils.py
Jie-Yuan/2_DataMining
f5338388b4f883233f350d4fb9c5903180883430
[ "Apache-2.0" ]
null
null
null
ext/DB/redis/utils.py
Jie-Yuan/2_DataMining
f5338388b4f883233f350d4fb9c5903180883430
[ "Apache-2.0" ]
7
2019-06-25T13:26:16.000Z
2020-10-27T02:05:03.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Project : tql-Python. # @File : utils # @Time : 2019-07-02 18:49 # @Author : yuanjie # @Email : yuanjie@xiaomi.com # @Software : PyCharm # @Description : from redis import StrictRedis, ConnectionPool # 多个Redis实例共享一个连接池,避免每次建立、释...
23.366667
70
0.601997
2d7b6ee0ec1218bdab73c9fd82e4c94fa6193b71
829
py
Python
code/main.py
ankurshaswat/AlphaGo-Zero
54d45e5ed4a3ee3b5a2e73bed4a04d6160cec6ef
[ "MIT" ]
1
2020-12-04T18:39:04.000Z
2020-12-04T18:39:04.000Z
code/main.py
ankurshaswat/AlphaGo-Zero
54d45e5ed4a3ee3b5a2e73bed4a04d6160cec6ef
[ "MIT" ]
null
null
null
code/main.py
ankurshaswat/AlphaGo-Zero
54d45e5ed4a3ee3b5a2e73bed4a04d6160cec6ef
[ "MIT" ]
null
null
null
from Coach import Coach from Go.go_game import GoGame as Game from Go.pytorch.NNet import NNetWrapper as nn from utils import * args = dotdict({ 'numIters': 1000, 'numEps': 100, 'tempThreshold': 15, 'updateThreshold': 0.6, 'maxlenOfQueue': 200000, 'numMCTSSims': 2, 'arenaCompare': 40, '...
23.027778
65
0.627262
2d7bb006c59bd4107bd96d51cf11a836bdfe6fbf
4,121
py
Python
pantsuitUp/pantsuitUp/settings.py
PantsuitUp/Whack2017
9463b90b0a38a5ccc57062190cc692db7155b3a0
[ "Apache-2.0" ]
null
null
null
pantsuitUp/pantsuitUp/settings.py
PantsuitUp/Whack2017
9463b90b0a38a5ccc57062190cc692db7155b3a0
[ "Apache-2.0" ]
4
2020-06-05T17:52:33.000Z
2022-03-11T23:17:53.000Z
pantsuitUp/pantsuitUp/settings.py
PantsuitUp/Whack2017
9463b90b0a38a5ccc57062190cc692db7155b3a0
[ "Apache-2.0" ]
null
null
null
""" Django settings for pantsuitUp project on Heroku. For more info, see: https://github.com/heroku/heroku-django-template For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/setti...
30.525926
91
0.717302
2d7bc25515e7db7cc34a9a32b5f2d0a5a09cc315
5,841
py
Python
spartan/examples/mnist_mlp.py
spartan-array/spartan
fdcf059ce7e48688648d793d632dc5961f4e72b5
[ "Apache-2.0" ]
156
2015-01-10T21:54:25.000Z
2021-10-17T14:13:57.000Z
spartan/examples/mnist_mlp.py
spartan-array/spartan
fdcf059ce7e48688648d793d632dc5961f4e72b5
[ "Apache-2.0" ]
8
2015-01-05T16:34:18.000Z
2015-12-11T08:12:28.000Z
spartan/examples/mnist_mlp.py
spartan-array/spartan
fdcf059ce7e48688648d793d632dc5961f4e72b5
[ "Apache-2.0" ]
24
2015-01-10T21:55:48.000Z
2021-04-14T08:09:34.000Z
import sys import os import math import numpy as np import numpy.random import scipy.io as si import spartan import time def _extract(prefix, md, max_dig): ret = [] for dig in range(max_dig): samples = md[prefix + str(dig)] labels = np.empty([samples.shape[0], 1], dtype=np.float) labels.fill(dig) ...
33
85
0.610512
2d7bc452721c52cdd37c876c90d1ada868f77762
10,733
py
Python
shapelyShortestPath3.py
bendemott/Python-Shapely-Examples
feda19bb4bf32e6d387d717bcc95bfc39057696f
[ "MIT" ]
3
2017-11-21T14:51:16.000Z
2018-12-06T08:07:09.000Z
shapelyShortestPath3.py
deep0072/Python-Shapely-Examples
feda19bb4bf32e6d387d717bcc95bfc39057696f
[ "MIT" ]
null
null
null
shapelyShortestPath3.py
deep0072/Python-Shapely-Examples
feda19bb4bf32e6d387d717bcc95bfc39057696f
[ "MIT" ]
4
2016-09-20T06:00:34.000Z
2021-05-18T09:42:53.000Z
''' This script builds a matrix of vertices, draws paths between them to connect the vertices. Once the vertices are connected we pick two random vertices and determine the shortest route between them. Disclaimer: ----------- This is kind of a mess, I threw it together rather quickly. The code is just kind of 'fun' ex...
37.010345
460
0.678655
2d7bdce35f33ae5a7e37c5de8ee6d53cd6854192
3,401
py
Python
genrl/environments/vec_env/normalize.py
mehulrastogi/genrl
589a3619497b38eaa376168c78b9f84d4ff434e5
[ "MIT" ]
390
2020-05-03T17:34:02.000Z
2022-03-05T11:29:07.000Z
genrl/environments/vec_env/normalize.py
mehulrastogi/genrl
589a3619497b38eaa376168c78b9f84d4ff434e5
[ "MIT" ]
306
2020-05-03T05:53:53.000Z
2022-03-12T00:27:28.000Z
genrl/environments/vec_env/normalize.py
mehulrastogi/genrl
589a3619497b38eaa376168c78b9f84d4ff434e5
[ "MIT" ]
64
2020-05-05T20:23:30.000Z
2022-03-30T08:43:10.000Z
from typing import Any, Tuple import numpy as np from genrl.environments.vec_env.utils import RunningMeanStd from genrl.environments.vec_env.vector_envs import VecEnv from genrl.environments.vec_env.wrappers import VecEnvWrapper class VecNormalize(VecEnvWrapper): """ Wrapper to implement Normalization of ob...
32.390476
99
0.646281
2d7c3837b4546bdb16e5684b030d7f242ab3c010
7,766
py
Python
tests/test_yuan.py
fscm/multicurrency
5eabdcbfbf427dcafe08d4d05cfce8c9348aeb91
[ "MIT" ]
2
2021-03-26T18:19:57.000Z
2021-07-27T01:15:50.000Z
tests/test_yuan.py
fscm/multicurrency
5eabdcbfbf427dcafe08d4d05cfce8c9348aeb91
[ "MIT" ]
null
null
null
tests/test_yuan.py
fscm/multicurrency
5eabdcbfbf427dcafe08d4d05cfce8c9348aeb91
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- # # copyright: 2020-2022, Frederico Martins # author: Frederico Martins <http://github.com/fscm> # license: SPDX-License-Identifier: MIT """Tests for the Yuan currency representation(s).""" from decimal import Context from pytest import raises from multicurrency import Currency from multicurre...
33.912664
79
0.520474
2d7c969eb132d626802e0e89d1871820912d1dcf
352
py
Python
app/core/migrations/0002_auto_20200522_0420.py
daikikuchi/recipe-app-api
ebafc56e5be6fc70369d157f6941d529d3001b9f
[ "MIT" ]
null
null
null
app/core/migrations/0002_auto_20200522_0420.py
daikikuchi/recipe-app-api
ebafc56e5be6fc70369d157f6941d529d3001b9f
[ "MIT" ]
null
null
null
app/core/migrations/0002_auto_20200522_0420.py
daikikuchi/recipe-app-api
ebafc56e5be6fc70369d157f6941d529d3001b9f
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2020-05-22 04:20 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.RenameField( model_name='user', old_name='is_stuff', new_na...
18.526316
48
0.571023
2d7caa0efeb8eaab9dab4d5be09eb9f7e9303e96
1,407
py
Python
migration/couch/release_7/1.migration_to_remove_survey_response_with_delete_form_code.py
ICT4H/dcs-web
fb0f53fad4401cfac1c1789ff28b9d5bda40c975
[ "Apache-2.0" ]
1
2015-11-02T09:11:12.000Z
2015-11-02T09:11:12.000Z
migration/couch/release_7/1.migration_to_remove_survey_response_with_delete_form_code.py
ICT4H/dcs-web
fb0f53fad4401cfac1c1789ff28b9d5bda40c975
[ "Apache-2.0" ]
null
null
null
migration/couch/release_7/1.migration_to_remove_survey_response_with_delete_form_code.py
ICT4H/dcs-web
fb0f53fad4401cfac1c1789ff28b9d5bda40c975
[ "Apache-2.0" ]
null
null
null
import sys from datawinners.main.couchdb.utils import all_db_names if __name__ == "__main__" and __package__ is None: sys.path.insert(0, ".") import logging from mangrove.datastore.documents import SurveyResponseDocument from datawinners.main.database import get_db_manager from migration.couch.utils import migrat...
34.317073
92
0.724236
2d7cae70b46c252320e704b2a773068400376ebc
9,226
py
Python
sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
46.59596
193
0.639389
2d7cb0787b1c137b71b32e3491641dfc4b859237
2,401
py
Python
setup.py
anshikg/cloudformation-cli
d9f294f784a69061aa2f1a76425bbbde48540156
[ "Apache-2.0" ]
null
null
null
setup.py
anshikg/cloudformation-cli
d9f294f784a69061aa2f1a76425bbbde48540156
[ "Apache-2.0" ]
null
null
null
setup.py
anshikg/cloudformation-cli
d9f294f784a69061aa2f1a76425bbbde48540156
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os.path import re from setuptools import setup HERE = os.path.abspath(os.path.dirname(__file__)) def read(*parts): with open(os.path.join(HERE, *parts), "r", encoding="utf-8") as fp: return fp.read() # https://packaging.python.org/guides/single-sourcing-package-version/ de...
32.890411
88
0.622657