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
f7fdb318437a941360b8499d5a8e3f2e59604c63
7,565
py
Python
ALREC_Method/stmarc/train_new_method_v4_for_atd.py
proy3/Abnormal_Trajectory_Classifier
a6b27c6847262e9703a0f3404c85c135415c1d4c
[ "MIT" ]
6
2019-10-29T03:05:14.000Z
2022-03-18T05:14:25.000Z
ALREC_Method/rene/train_new_method_v4_for_atd.py
proy3/Abnormal_Trajectory_Classifier
a6b27c6847262e9703a0f3404c85c135415c1d4c
[ "MIT" ]
1
2022-03-11T03:49:34.000Z
2022-03-11T03:49:34.000Z
ALREC_Method/rouen/train_new_method_v4_for_atd.py
proy3/Abnormal_Trajectory_Classifier
a6b27c6847262e9703a0f3404c85c135415c1d4c
[ "MIT" ]
1
2021-12-15T09:21:26.000Z
2021-12-15T09:21:26.000Z
""" Train Abnormal trajectory detection with deep autoencoder. """ import warnings warnings.simplefilter(action='ignore', category=FutureWarning) import ae_utilities as aeu import input_data as data import abnormal_data_generation as adg import dataset_defines as dd import numpy as np import os abspath = os.path.abs...
49.444444
118
0.645605
f7fdb428b910bb6d6e131170f6089015f3491cb8
1,400
py
Python
memoize/decorator.py
ECrownofFire/chaos
0cfbb85ab52654967909aef54eff3a0e62b641bd
[ "MIT" ]
1,804
2017-05-23T02:34:27.000Z
2017-05-26T00:44:44.000Z
memoize/decorator.py
ECrownofFire/chaos
0cfbb85ab52654967909aef54eff3a0e62b641bd
[ "MIT" ]
345
2017-05-20T23:55:12.000Z
2017-06-19T07:48:58.000Z
memoize/decorator.py
ECrownofFire/chaos
0cfbb85ab52654967909aef54eff3a0e62b641bd
[ "MIT" ]
248
2017-05-23T02:00:07.000Z
2017-05-26T00:00:28.000Z
from functools import wraps import time import inspect from . import helpers def memoize(ttl_spec, whitelist=None, blacklist=None, key_fn=helpers._json_keyify, backend=lambda fn: dict(), get_now=time.time): """ memoize/cache the decorated function for ttl amount of time """ ttl = hel...
29.787234
80
0.566429
f7fde8a0153e5f47b6098d1748aa541f4af9a7f2
964
py
Python
vortidplenigilo.py
corcra/esperanto
be8f6eda63c4f20b6f7667a50f9b85d3dba32258
[ "MIT" ]
15
2015-11-15T15:15:55.000Z
2018-05-05T19:13:01.000Z
vortidplenigilo.py
corcra/esperanto
be8f6eda63c4f20b6f7667a50f9b85d3dba32258
[ "MIT" ]
1
2015-11-19T15:11:32.000Z
2015-11-19T15:12:06.000Z
vortidplenigilo.py
corcra/esperanto
be8f6eda63c4f20b6f7667a50f9b85d3dba32258
[ "MIT" ]
2
2015-11-28T13:15:35.000Z
2016-03-03T09:24:17.000Z
#!/usr/bin/env ipython # coding=utf-8 # This is intended to be run on a cronjob from __future__ import print_function import tweepy from creds import consumer_key, consumer_secret, access_token, access_token_secret from soup import tweet_soup from parse_EO_full import eo_to_en import random # --- set up API --- # au...
27.542857
82
0.708506
f7fe22be8e9933d73e58f8f86a8508c7b07bfe49
7,375
py
Python
glib/glib-2.46.2/glib/glib.py
imx6uldev/depedency_tools
0748392a4e97ded2a770b6fbcab281dd3fda2db7
[ "MIT" ]
null
null
null
glib/glib-2.46.2/glib/glib.py
imx6uldev/depedency_tools
0748392a4e97ded2a770b6fbcab281dd3fda2db7
[ "MIT" ]
1
2020-10-13T07:38:31.000Z
2020-10-13T07:38:31.000Z
migrate/glib/glib/glib.py
zhongliangkang/twemproxy41
8dc3664145b0fcdd32fa321720235a9db9b3cece
[ "Apache-2.0" ]
1
2020-02-04T15:39:06.000Z
2020-02-04T15:39:06.000Z
import gdb import sys if sys.version_info[0] >= 3: long = int # This is not quite right, as local vars may override symname def read_global_var (symname): return gdb.selected_frame().read_var(symname) def g_quark_to_string (quark): if quark == None: return None quark = long(quark) if quar...
28.585271
122
0.532068
f7fe38c9a4b8c5796670a8aa33b5cb1b8bbd7c39
5,246
py
Python
src/jetson/Sensors/sensors_simple.py
ichalkiad/VW_challenge
333222010ecf3d1ca4a0e181239f761c975453e9
[ "Apache-2.0" ]
1
2017-08-16T08:42:49.000Z
2017-08-16T08:42:49.000Z
src/jetson/Sensors/sensors_simple.py
ichalkiad/VW_challenge
333222010ecf3d1ca4a0e181239f761c975453e9
[ "Apache-2.0" ]
4
2017-08-09T23:01:30.000Z
2017-08-24T16:44:13.000Z
src/jetson/Sensors/sensors_simple.py
yhalk/vw_challenge_ECR
c1ff50070d0f7367ccfbf473c69e90fd2be5e85e
[ "Apache-2.0" ]
null
null
null
import paho.mqtt.client as mqtt import ev3dev.ev3 as ev3 import ctypes import numpy as np import sys import cv2 from Sensors.mpu6050.mpu6050 import MPU6050 import smbus from Sensors.odometry import Odometry import sys, serial from serial.tools import list_ports class Sensor(object): def __init__(self, *args, **kwa...
43
280
0.609989
f7fe3f64ab7d9812e1dfd30423018d4e5b38e582
11,395
py
Python
sdf/analytics.py
drgmk/sdf
a44e66a82f876dda079686b32c767370276c38a1
[ "MIT" ]
1
2020-07-01T15:55:16.000Z
2020-07-01T15:55:16.000Z
sdf/analytics.py
drgmk/sdf
a44e66a82f876dda079686b32c767370276c38a1
[ "MIT" ]
4
2017-03-28T19:18:09.000Z
2021-09-21T08:17:45.000Z
sdf/analytics.py
drgmk/sdf
a44e66a82f876dda079686b32c767370276c38a1
[ "MIT" ]
1
2020-07-13T19:39:15.000Z
2020-07-13T19:39:15.000Z
'''Analytic routines for debris disks.''' import numpy as np from . import photometry from . import filter from . import utils class BB_Disk(object): '''A blackbody disk class. Takes multiple temperatures, the purpose being for use to show disk properties in parameter spaces such as fractional l...
37.731788
101
0.526196
f7fe47a4927438bfc838f1831fa8c68f9d1deb1a
1,873
py
Python
ginga/mockw/ImageViewCanvasMock.py
Cadair/ginga
5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8
[ "BSD-3-Clause" ]
null
null
null
ginga/mockw/ImageViewCanvasMock.py
Cadair/ginga
5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8
[ "BSD-3-Clause" ]
null
null
null
ginga/mockw/ImageViewCanvasMock.py
Cadair/ginga
5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8
[ "BSD-3-Clause" ]
null
null
null
# # ImageViewCanvasMock.py -- A Ginga image widget with canvas drawing in mock # widget set # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # ...
34.054545
76
0.610785
f7fe81eb8b18aea5e9f85788db3c3c72624547db
1,278
py
Python
hs_core/tests/api/rest/test_resource_meta.py
hydroshare/hydroshare
bf9888bbe61507aff070b1dfcec2fdec1921468d
[ "BSD-3-Clause" ]
178
2015-01-08T23:03:36.000Z
2022-03-03T13:56:45.000Z
hs_core/tests/api/rest/test_resource_meta.py
hydroshare/hydroshare
bf9888bbe61507aff070b1dfcec2fdec1921468d
[ "BSD-3-Clause" ]
4,125
2015-01-01T14:26:15.000Z
2022-03-31T16:38:55.000Z
hs_core/tests/api/rest/test_resource_meta.py
hydroshare/hydroshare
bf9888bbe61507aff070b1dfcec2fdec1921468d
[ "BSD-3-Clause" ]
53
2015-03-15T17:56:51.000Z
2022-03-17T00:32:16.000Z
import os import json import tempfile import shutil from lxml import etree from rest_framework import status from hs_core.hydroshare import resource from .base import HSRESTTestCase class TestResourceMetadata(HSRESTTestCase): def setUp(self): super(TestResourceMetadata, self).setUp() self.rty...
33.631579
81
0.656495
f7fe983d9f3c9724263133f0b77deed272534129
1,764
py
Python
src/main/py/ltprg/game/color/properties/get_stim_embeddings.py
forkunited/ltprg
4e40d3571d229023df0f845c68643024e04bc202
[ "MIT" ]
11
2017-08-03T15:42:19.000Z
2021-02-04T12:43:35.000Z
src/main/py/ltprg/game/color/properties/get_stim_embeddings.py
forkunited/ltprg
4e40d3571d229023df0f845c68643024e04bc202
[ "MIT" ]
null
null
null
src/main/py/ltprg/game/color/properties/get_stim_embeddings.py
forkunited/ltprg
4e40d3571d229023df0f845c68643024e04bc202
[ "MIT" ]
1
2021-02-04T12:43:37.000Z
2021-02-04T12:43:37.000Z
from __future__ import division import numpy as np import sys sys.path.append('../../../../../../../../Packages/mungpy/src/main/py/mung/') import torch import torch.nn as nn from torch.autograd import Variable import time from data import DataSet from alexnet import PartialAlexnet, rgb_to_alexnet_input from colorspace_...
33.283019
76
0.707483
f7feac26a36903f73b984dcc0360155b4034e6fc
8,257
py
Python
src/tantale/livestatus/parser.py
redref/tantale
358748e7d4a1d87ee48168a03ed68acefb2b9ca2
[ "Apache-2.0" ]
null
null
null
src/tantale/livestatus/parser.py
redref/tantale
358748e7d4a1d87ee48168a03ed68acefb2b9ca2
[ "Apache-2.0" ]
null
null
null
src/tantale/livestatus/parser.py
redref/tantale
358748e7d4a1d87ee48168a03ed68acefb2b9ca2
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 import traceback import logging from six import b as bytes from tantale.livestatus.query import Query from tantale.livestatus.command import Command from tantale.livestatus.mapping import * class Parser(object): def __init__(self): self.log = logging.getLogger('tantale.livestatus') d...
36.056769
77
0.475354
f7ff31f42e5b26cbf413226fb48b06e483fc6c0e
95,067
py
Python
lib/matplotlib/transforms.py
pmarshwx/matplotlib
12be528dbf2114f7c25abf60de8100cb2d4494af
[ "MIT", "BSD-3-Clause" ]
null
null
null
lib/matplotlib/transforms.py
pmarshwx/matplotlib
12be528dbf2114f7c25abf60de8100cb2d4494af
[ "MIT", "BSD-3-Clause" ]
null
null
null
lib/matplotlib/transforms.py
pmarshwx/matplotlib
12be528dbf2114f7c25abf60de8100cb2d4494af
[ "MIT", "BSD-3-Clause" ]
null
null
null
""" matplotlib includes a framework for arbitrary geometric transformations that is used determine the final position of all elements drawn on the canvas. Transforms are composed into trees of :class:`TransformNode` objects whose actual value depends on their children. When the contents of children change, their pare...
34.159899
94
0.591541
f7ff3ca0c18cb91c08e9be2931bae83818bf7916
3,768
py
Python
test/unit/helper/test_helper.py
hanneshauer/python-client
e5909ed4e364d0c980f80e48b3af4acf77bff08e
[ "Apache-2.0" ]
null
null
null
test/unit/helper/test_helper.py
hanneshauer/python-client
e5909ed4e364d0c980f80e48b3af4acf77bff08e
[ "Apache-2.0" ]
null
null
null
test/unit/helper/test_helper.py
hanneshauer/python-client
e5909ed4e364d0c980f80e48b3af4acf77bff08e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software...
28.330827
82
0.556263
f7ff72d1afddf700afb1487426bc4bfd6bebd700
5,409
py
Python
lib/datasets/factory.py
denglixi/faster-rcnn.pytorch
12158fa2ec998ba3733a4696b7a4e08a35c157e3
[ "MIT" ]
null
null
null
lib/datasets/factory.py
denglixi/faster-rcnn.pytorch
12158fa2ec998ba3733a4696b7a4e08a35c157e3
[ "MIT" ]
null
null
null
lib/datasets/factory.py
denglixi/faster-rcnn.pytorch
12158fa2ec998ba3733a4696b7a4e08a35c157e3
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Factory method for easily getting imdbs by name.""" from __future__ ...
40.669173
207
0.623405
f7ff762a24e5e6fb13bc8f7e21fa0a320773288c
1,223
py
Python
ml/models/random_forest.py
refactoring-ai/Machine-Learning
908d35322a06a7b1709d83f731033a939a864c6b
[ "MIT" ]
5
2020-09-02T19:46:37.000Z
2021-04-21T15:41:11.000Z
ml/models/random_forest.py
refactoring-ai/Machine-Learning
908d35322a06a7b1709d83f731033a939a864c6b
[ "MIT" ]
16
2020-08-04T08:07:50.000Z
2021-03-23T08:15:30.000Z
ml/models/random_forest.py
refactoring-ai/Machine-Learning
908d35322a06a7b1709d83f731033a939a864c6b
[ "MIT" ]
1
2021-04-17T18:34:47.000Z
2021-04-17T18:34:47.000Z
from sklearn.ensemble import RandomForestClassifier from configs import CORE_COUNT, SEED from ml.models.base import SupervisedMLRefactoringModel class RandomForestRefactoringModel(SupervisedMLRefactoringModel): def feature_reduction(self) -> bool: return False def params_to_tune(self): retur...
34.942857
67
0.604252
f7ffa21c257ba1e17cc8c6621957e39dccd105d8
14,480
py
Python
softlearning/algorithms/sac.py
JiazhengChai/synergy_DRL
c08e78e5fe39d9d46213e1bf07b8dafc2195b05a
[ "MIT" ]
2
2020-01-07T04:12:42.000Z
2021-12-21T22:25:31.000Z
softlearning/algorithms/sac.py
JiazhengChai/synergy_DRL
c08e78e5fe39d9d46213e1bf07b8dafc2195b05a
[ "MIT" ]
11
2019-11-29T02:59:34.000Z
2022-03-12T00:07:28.000Z
softlearning/algorithms/sac.py
JiazhengChai/synergy_DRL
c08e78e5fe39d9d46213e1bf07b8dafc2195b05a
[ "MIT" ]
1
2020-04-28T12:06:40.000Z
2020-04-28T12:06:40.000Z
from collections import OrderedDict from numbers import Number import numpy as np import tensorflow as tf from tensorflow.python.training import training_util from .rl_algorithm import RLAlgorithm def td_target(reward, discount, next_value): return reward + discount * next_value class SAC(RLAlgorithm): ""...
33.364055
80
0.59261
f7ffb892e8610fda995948c4c171e6e76e5d5004
9,578
py
Python
DropDtw-Code/train.py
Crossmdl/Crossmdl
49f245349cc32f750bc33ef891b2ee90f60317a6
[ "MIT" ]
null
null
null
DropDtw-Code/train.py
Crossmdl/Crossmdl
49f245349cc32f750bc33ef891b2ee90f60317a6
[ "MIT" ]
null
null
null
DropDtw-Code/train.py
Crossmdl/Crossmdl
49f245349cc32f750bc33ef891b2ee90f60317a6
[ "MIT" ]
null
null
null
import os import torch import argparse import random import torch import numpy as np import pytorch_lightning as pl import torchmetrics from copy import deepcopy, copy import pickle as pkl from paths import PROJECT_PATH, WEIGHTS_PATH from models.nets import EmbeddingsMapping from models.losses import compute_clust_l...
48.619289
171
0.687409
f7ffcf3141c9a7705268082eb3e32b2c0285b192
840
py
Python
SmallObjectAugmentation/Helpers.py
riciche/SimpleCVReproduction
4075de39f9c61f1359668a413f6a5d98903fcf97
[ "Apache-2.0" ]
923
2020-01-11T06:36:53.000Z
2022-03-31T00:26:57.000Z
SmallObjectAugmentation/Helpers.py
riciche/SimpleCVReproduction
4075de39f9c61f1359668a413f6a5d98903fcf97
[ "Apache-2.0" ]
25
2020-02-27T08:35:46.000Z
2022-01-25T08:54:19.000Z
SmallObjectAugmentation/Helpers.py
riciche/SimpleCVReproduction
4075de39f9c61f1359668a413f6a5d98903fcf97
[ "Apache-2.0" ]
262
2020-01-02T02:19:40.000Z
2022-03-23T04:56:16.000Z
import glob import cv2 as cv2 import numpy as np import matplotlib.pyplot as plt # import random import math from tqdm import tqdm def load_images(path): image_list = [] images = glob.glob(path) for index in range(len(images)): image = cv2.cvtColor(cv2.imread(images[index]), cv2.COLOR_BGR2RGB) ...
21.538462
74
0.672619
f7fff262cc16ee1944b9c7c01e1a4feef815e52e
14,803
py
Python
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/_file_services_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/_file_services_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/_file_services_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 ...
43.538235
221
0.694656
f7ffff8e2c23d4349b4f870e5d0fb30bb2f3b2a3
12,427
py
Python
cleverhans/train.py
iamgroot42/cleverhans
53da9cd6daf9d7457800831c3eaa75f729a39145
[ "MIT" ]
21
2019-06-07T17:05:30.000Z
2022-02-07T03:25:15.000Z
cleverhans/train.py
iamgroot42/cleverhans
53da9cd6daf9d7457800831c3eaa75f729a39145
[ "MIT" ]
7
2019-12-16T22:20:01.000Z
2022-02-10T00:45:21.000Z
cleverhans/train.py
iamgroot42/cleverhans
53da9cd6daf9d7457800831c3eaa75f729a39145
[ "MIT" ]
8
2019-06-11T03:06:29.000Z
2022-01-18T04:18:27.000Z
""" Multi-replica synchronous training NOTE: This module is much more free to change than many other modules in CleverHans. CleverHans is very conservative about changes to any code that affects the output of benchmark tests (attacks, evaluation methods, etc.). This module provides *model training* functionality not ...
40.087097
79
0.692042
790019d09eb81c29d6d6712867240f600e2c9dc0
3,343
py
Python
services/endorser/api/core/config.py
Open-Earth-Foundation/traction
908b555a7f408a88541b7692d3730e37a297c919
[ "Apache-2.0" ]
12
2022-01-29T20:30:03.000Z
2022-03-29T11:46:14.000Z
services/endorser/api/core/config.py
Open-Earth-Foundation/traction
908b555a7f408a88541b7692d3730e37a297c919
[ "Apache-2.0" ]
38
2021-11-22T17:52:50.000Z
2022-03-31T17:52:00.000Z
services/endorser/api/core/config.py
Open-Earth-Foundation/traction
908b555a7f408a88541b7692d3730e37a297c919
[ "Apache-2.0" ]
9
2021-11-22T18:05:48.000Z
2022-03-29T11:25:08.000Z
import logging import os from enum import Enum from functools import lru_cache from typing import Optional from pydantic import BaseSettings, PostgresDsn logger = logging.getLogger(__name__) class EnvironmentEnum(str, Enum): PRODUCTION = "production" LOCAL = "local" class GlobalConfig(BaseSettings): T...
30.669725
107
0.714029
79003124fbb1cb58aae990f0214882ce3dfac658
5,878
py
Python
mdrsl/rule_models/mids/objective_function/mids_objective_function_statistics.py
joschout/Multi-Directional-Rule-Set-Learning
ef0620b115f4e0fd7fba3e752d238a8020c1ca6b
[ "Apache-2.0" ]
3
2020-08-03T19:25:44.000Z
2021-06-27T22:25:55.000Z
mdrsl/rule_models/mids/objective_function/mids_objective_function_statistics.py
joschout/Multi-Directional-Rule-Set-Learning
ef0620b115f4e0fd7fba3e752d238a8020c1ca6b
[ "Apache-2.0" ]
null
null
null
mdrsl/rule_models/mids/objective_function/mids_objective_function_statistics.py
joschout/Multi-Directional-Rule-Set-Learning
ef0620b115f4e0fd7fba3e752d238a8020c1ca6b
[ "Apache-2.0" ]
2
2020-08-07T22:54:28.000Z
2021-02-18T06:11:01.000Z
from typing import Optional, Dict from tabulate import tabulate import pandas as pd from mdrsl.utils.value_collection import ValueCollector class MIDSObjectiveFunctionStatistics: def __init__(self): self.last_f0: Optional[int] = None self.last_f1: Optional[int] = None self.last_f2: Opti...
35.409639
81
0.525859
7900355bbe26186ac5dbd81b76fbdbe822cdd10a
105,956
py
Python
models/transformer.py
NCTUMLlab/Adversarial-Masking-Transformers-for-Language-Understanding
b43fb91cf99ee3ffaf137cd0be87b67448995c9b
[ "MIT" ]
null
null
null
models/transformer.py
NCTUMLlab/Adversarial-Masking-Transformers-for-Language-Understanding
b43fb91cf99ee3ffaf137cd0be87b67448995c9b
[ "MIT" ]
null
null
null
models/transformer.py
NCTUMLlab/Adversarial-Masking-Transformers-for-Language-Understanding
b43fb91cf99ee3ffaf137cd0be87b67448995c9b
[ "MIT" ]
1
2021-06-01T17:58:43.000Z
2021-06-01T17:58:43.000Z
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import numpy...
45.987847
169
0.625363
79005df4d98ef9f7d776dc6ceae1987c1fcee100
8,010
py
Python
tools/check_target_files_vintf.py
FabriSC/Alioth-SC
bbe9723401b351c2a34b09a30978373d456d20a2
[ "MIT" ]
null
null
null
tools/check_target_files_vintf.py
FabriSC/Alioth-SC
bbe9723401b351c2a34b09a30978373d456d20a2
[ "MIT" ]
null
null
null
tools/check_target_files_vintf.py
FabriSC/Alioth-SC
bbe9723401b351c2a34b09a30978373d456d20a2
[ "MIT" ]
1
2022-03-30T04:47:35.000Z
2022-03-30T04:47:35.000Z
#!/usr/bin/env python # # Copyright (C) 2019 The Android Open Source Project # # 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 req...
32.962963
80
0.705243
79007d5b8ec7c37cab25ce2888d47369bb4eb40a
10,403
py
Python
tutorial/deprecated/tutorial_a2c_with_infinite_env/a2c.py
Purple-PI/rlstructures
9b201b083715bbda2f3534b010c84e11dfc0a1c7
[ "MIT" ]
281
2021-01-13T14:20:23.000Z
2022-03-23T08:46:56.000Z
tutorial/deprecated/tutorial_a2c_with_infinite_env/a2c.py
Purple-PI/rlstructures
9b201b083715bbda2f3534b010c84e11dfc0a1c7
[ "MIT" ]
2
2021-01-22T23:28:34.000Z
2021-04-29T22:05:42.000Z
tutorial/deprecated/tutorial_a2c_with_infinite_env/a2c.py
Purple-PI/rlstructures
9b201b083715bbda2f3534b010c84e11dfc0a1c7
[ "MIT" ]
13
2021-01-15T14:53:32.000Z
2022-03-22T11:12:54.000Z
# # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # from rlstructures.logger import Logger, TFLogger from rlstructures import DictTensor, TemporalDictTensor from rlstructures import logging...
42.461224
136
0.612323
790086155fac3be5e7a46c4cd0fb18fbd1b1b996
3,702
py
Python
yardstick/dispatcher/http.py
kkltcjk/kklt
5388eb439616a442dde496ef77ba6b71169369e0
[ "Apache-2.0" ]
null
null
null
yardstick/dispatcher/http.py
kkltcjk/kklt
5388eb439616a442dde496ef77ba6b71169369e0
[ "Apache-2.0" ]
null
null
null
yardstick/dispatcher/http.py
kkltcjk/kklt
5388eb439616a442dde496ef77ba6b71169369e0
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 IBM Corp # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
35.257143
79
0.603998
7900954e9b27e49fd025c56ca1ab18a6e8667b43
14,230
py
Python
train_pose_euler_crop.py
msieb1/LTCN
c9432891327774edf8193e885cc4f10f53fcaa60
[ "MIT" ]
1
2020-08-21T03:47:33.000Z
2020-08-21T03:47:33.000Z
train_pose_euler_crop.py
msieb1/LTCN
c9432891327774edf8193e885cc4f10f53fcaa60
[ "MIT" ]
null
null
null
train_pose_euler_crop.py
msieb1/LTCN
c9432891327774edf8193e885cc4f10f53fcaa60
[ "MIT" ]
null
null
null
import matplotlib matplotlib.use('Agg') import os from os.path import join import argparse import torch import numpy as np import pickle import sys import datetime sys.path.append('./utils') from torch import optim from torch import nn from torch import multiprocessing from torch.optim import lr_scheduler from torch.a...
43.650307
169
0.646381
7900f081a429cddbd00caa87f27fe51153cc6f27
6,431
py
Python
Q/questionnaire/q_urls.py
ES-DOC/esdoc-questionnaire
9301eda375c4046323265b37ba96d94c94bf8b11
[ "MIT" ]
null
null
null
Q/questionnaire/q_urls.py
ES-DOC/esdoc-questionnaire
9301eda375c4046323265b37ba96d94c94bf8b11
[ "MIT" ]
477
2015-01-07T18:22:27.000Z
2017-07-17T15:05:48.000Z
Q/questionnaire/q_urls.py
ES-DOC/esdoc-questionnaire
9301eda375c4046323265b37ba96d94c94bf8b11
[ "MIT" ]
null
null
null
#################### # ES-DOC CIM Questionnaire # Copyright (c) 2017 ES-DOC. All rights reserved. # # University of Colorado, Boulder # http://cires.colorado.edu/ # # This project is distributed according to the terms of the MIT license [http://www.opensource.org/licenses/MIT]. #################### from djan...
46.941606
195
0.664438
7900fe6b4324af019ea50bf8ebbfcd7c728fc238
3,829
py
Python
stock_trading_backend/agent/neural_network_model.py
iryzhkov/stock-trading-backend
7161026b7b4deb78a934b66550c85a27c6b32933
[ "MIT" ]
1
2021-01-27T18:24:02.000Z
2021-01-27T18:24:02.000Z
stock_trading_backend/agent/neural_network_model.py
iryzhkov/stock-trading-backend
7161026b7b4deb78a934b66550c85a27c6b32933
[ "MIT" ]
null
null
null
stock_trading_backend/agent/neural_network_model.py
iryzhkov/stock-trading-backend
7161026b7b4deb78a934b66550c85a27c6b32933
[ "MIT" ]
null
null
null
"""Polynomial model class used by agents for building stuff. """ from torch import nn, optim import torch import torch.nn.functional as F from stock_trading_backend.agent.model import Model class NNModel(nn.Module): """Torch neural network model. """ def __init__(self, num_inputs, num_hidden_layers, num...
34.495495
89
0.648211
790142b269f640eaae6cdf66f9c7a34c83d113b9
460
py
Python
test/test_tiddler_fields_as_strings.py
funkyeah/tiddlyweb
2346e6c05aa03ae9c8f2687d9ef9e46103267a8e
[ "BSD-3-Clause" ]
null
null
null
test/test_tiddler_fields_as_strings.py
funkyeah/tiddlyweb
2346e6c05aa03ae9c8f2687d9ef9e46103267a8e
[ "BSD-3-Clause" ]
null
null
null
test/test_tiddler_fields_as_strings.py
funkyeah/tiddlyweb
2346e6c05aa03ae9c8f2687d9ef9e46103267a8e
[ "BSD-3-Clause" ]
null
null
null
""" Make sure that tiddler fields which are not strings are stringified, otherwise, the text serialization will assplode. """ from tiddlyweb.serializer import Serializer from tiddlyweb.model.tiddler import Tiddler def setup_module(module): pass def test_float_field(): tiddler = Tiddler('foo', 'bar') t...
20.909091
56
0.719565
7901540d8570ef9a1bfd9dec9917f2c247c1890c
3,382
py
Python
app/user/tests/test_user_api.py
reallyusefulengine/django_rest_recipe
49943404bfe4b6a84c3b4f6d8332f952982b3281
[ "MIT" ]
null
null
null
app/user/tests/test_user_api.py
reallyusefulengine/django_rest_recipe
49943404bfe4b6a84c3b4f6d8332f952982b3281
[ "MIT" ]
null
null
null
app/user/tests/test_user_api.py
reallyusefulengine/django_rest_recipe
49943404bfe4b6a84c3b4f6d8332f952982b3281
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework.test import APIClient from rest_framework import status CREATE_USER_URL = reverse('user:create') TOKEN_URL = reverse('user:token') def create_user(**params): return get_user_model(...
37.577778
77
0.63631
790154b62d7337a78a9bce3b537685b14b4ca1a2
13,300
py
Python
oscar/lib/python2.7/site-packages/prompt_toolkit/contrib/telnet/server.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/prompt_toolkit/contrib/telnet/server.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/prompt_toolkit/contrib/telnet/server.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
""" Telnet server. Example usage:: class MyTelnetApplication(TelnetApplication): def client_connected(self, telnet_connection): # Set CLI with simple prompt. telnet_connection.set_application( telnet_connection.create_prompt_application(...)) def...
32.598039
98
0.60015
79015f55f04aee062f85e9234f10a50e4771d3b4
178
py
Python
files/judgeFileType.py
sdyz5210/python
78f9999f94d92d9ca7fde6f18acec7d3abd422ef
[ "BSD-3-Clause" ]
null
null
null
files/judgeFileType.py
sdyz5210/python
78f9999f94d92d9ca7fde6f18acec7d3abd422ef
[ "BSD-3-Clause" ]
null
null
null
files/judgeFileType.py
sdyz5210/python
78f9999f94d92d9ca7fde6f18acec7d3abd422ef
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/evn python # -*- coding: utf-8 -*- # python version 2.7.6 import magic mime = magic.Magic(mime=True) print mime.from_file("/Users/mac/Documents/data/fastq/8.fastq")
19.777778
63
0.696629
79016cd7b072ebe0a6633862ea0beada1a4ce8ca
186
py
Python
dataset_utils/general_utils.py
kareemjano/image_toolbox
ea9e1654142a1492e7e462b4f0a8245f4ee430ae
[ "Apache-2.0" ]
null
null
null
dataset_utils/general_utils.py
kareemjano/image_toolbox
ea9e1654142a1492e7e462b4f0a8245f4ee430ae
[ "Apache-2.0" ]
null
null
null
dataset_utils/general_utils.py
kareemjano/image_toolbox
ea9e1654142a1492e7e462b4f0a8245f4ee430ae
[ "Apache-2.0" ]
null
null
null
from collections import defaultdict def list_to_map(Xs, ys): labels_map = defaultdict(list) for x, y in list(zip(Xs, ys)): labels_map[y].append(x) return labels_map
23.25
35
0.682796
79016e655840dcf25f5b90b8bffc280f87a56c79
4,446
py
Python
pandas_ta/overlap/hilo.py
MyBourse/pandas-ta
5998e92e39b71cd79a6e75d7c599492181af5f65
[ "MIT" ]
2
2021-03-30T01:23:14.000Z
2021-04-02T18:04:51.000Z
pandas_ta/overlap/hilo.py
lukaszbinden/pandas-ta
98478f8bf049a4c8748d6f3c795f4f335ced05ca
[ "MIT" ]
null
null
null
pandas_ta/overlap/hilo.py
lukaszbinden/pandas-ta
98478f8bf049a4c8748d6f3c795f4f335ced05ca
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from numpy import NaN as npNaN from pandas import DataFrame, Series # from pandas_ta.overlap.ma import ma from .ma import ma from pandas_ta.utils import get_offset, verify_series def hilo(high, low, close, high_length=None, low_length=None, mamode=None, offset=None, **kwargs): """Indicator...
34.734375
111
0.65857
79017c0607032cf5f29a9166dd2136111da20517
3,223
py
Python
demo.py
ijinmao/CAM-Localization
dfa214be984f77d577dba1065e2c63e0c1b0b82b
[ "MIT" ]
4
2017-09-07T05:55:58.000Z
2019-09-05T04:02:41.000Z
demo.py
ijinmao/CAM-Localization
dfa214be984f77d577dba1065e2c63e0c1b0b82b
[ "MIT" ]
null
null
null
demo.py
ijinmao/CAM-Localization
dfa214be984f77d577dba1065e2c63e0c1b0b82b
[ "MIT" ]
1
2019-04-02T05:03:25.000Z
2019-04-02T05:03:25.000Z
import numpy as np import cv2 import matplotlib.pylab as plt from keras.preprocessing.image import load_img from keras.models import model_from_json from models import ( create_cam_model, preprocess_image, get_cam_img ) # Define CAM conv layer name CAM_CONV_LAYER = 'cam_conv_layer' def read_model(model_path, wei...
25.784
97
0.730996
7901adeebc4eddb9811775a1dd8834093c7ac65d
2,057
py
Python
examples/pylab_examples/mri_with_eeg.py
yuvallanger/matplotlib
e0020d318a9a9685594c6bff4631f74599321459
[ "MIT", "BSD-3-Clause" ]
8
2017-04-11T08:55:30.000Z
2022-03-25T04:31:26.000Z
examples/pylab_examples/mri_with_eeg.py
epgauss/matplotlib
c9898ea9a30c67c579ab27cd61b68e2abae0fb0e
[ "MIT", "BSD-3-Clause" ]
null
null
null
examples/pylab_examples/mri_with_eeg.py
epgauss/matplotlib
c9898ea9a30c67c579ab27cd61b68e2abae0fb0e
[ "MIT", "BSD-3-Clause" ]
14
2015-10-05T04:15:46.000Z
2020-06-11T18:06:02.000Z
#!/usr/bin/env python """ This now uses the imshow command instead of pcolor which *is much faster* """ from __future__ import division, print_function import numpy as np from matplotlib.pyplot import * from matplotlib.collections import LineCollection import matplotlib.cbook as cbook # I use if 1 to break up the di...
26.037975
71
0.618376
7901bfee3778dd08118d7ec1c5e0e0d9e7c93415
1,004
py
Python
alipay/aop/api/response/AlipayBossFncSettleSettlementbillCreateResponse.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/response/AlipayBossFncSettleSettlementbillCreateResponse.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/response/AlipayBossFncSettleSettlementbillCreateResponse.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.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.SettlementbillOpenApiDTO import SettlementbillOpenApiDTO class AlipayBossFncSettleSettlementbillCreateResponse(AlipayResponse): def __init__(self): super...
33.466667
120
0.74004
7901c99ab98015bba242cc58af0f02592b798a4d
3,920
py
Python
advbench/lib/meters.py
constrainedlearning/advbench
68f9f6d77268aad45517ca84d383b996724cc976
[ "MIT" ]
null
null
null
advbench/lib/meters.py
constrainedlearning/advbench
68f9f6d77268aad45517ca84d383b996724cc976
[ "MIT" ]
null
null
null
advbench/lib/meters.py
constrainedlearning/advbench
68f9f6d77268aad45517ca84d383b996724cc976
[ "MIT" ]
null
null
null
import time try: import wandb wandb_log=True except ImportError: wandb_log=False import numpy as np from advbench.lib.plotting import plot_perturbed_wandb from einops import rearrange class AverageMeter: """Computes and stores the average and current value""" def __init__(self, avg_mom=0.5): ...
29.923664
135
0.53801
7901f88050817b7d944fde8456d5af6133e7ce35
723
py
Python
app/main/forms.py
edumorris/pomodoro
cde372be1d5c37dd8221ebd40b684d07fbb472b5
[ "MIT" ]
null
null
null
app/main/forms.py
edumorris/pomodoro
cde372be1d5c37dd8221ebd40b684d07fbb472b5
[ "MIT" ]
null
null
null
app/main/forms.py
edumorris/pomodoro
cde372be1d5c37dd8221ebd40b684d07fbb472b5
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField,PasswordField,SubmitField, ValidationError, BooleanField, TextAreaField,SelectField from wtforms.validators import Required,Email,EqualTo from ..models import User class CommentForm(FlaskForm): comment = TextAreaField('Your comment:', validators=[Requ...
48.2
158
0.75657
7902045a8bcac920a9e2f9d298a662706cdcfa87
7,289
py
Python
train.py
petersvenningsson/radar-Bayesian-human-motion
728db0f39c107faccf9d711670177aac74456e3f
[ "MIT" ]
1
2022-02-01T20:42:24.000Z
2022-02-01T20:42:24.000Z
train.py
petersvenningsson/radar-Bayesian-human-motion
728db0f39c107faccf9d711670177aac74456e3f
[ "MIT" ]
null
null
null
train.py
petersvenningsson/radar-Bayesian-human-motion
728db0f39c107faccf9d711670177aac74456e3f
[ "MIT" ]
null
null
null
import argparse import numpy as np from sklearn.metrics import accuracy_score, jaccard_score, balanced_accuracy_score import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import dataloader import track from classifiers import ObservationsConditionsClassifier from classifiers import ClassifierComp...
40.949438
189
0.664563
7902350dee2a3d3b50074578b7417126b6253c64
3,756
py
Python
external/sbml/bindings/python/test/sbml/TestConstraint_newSetters.py
dchandran/evolvenetworks
072f9e1292552f691a86457ffd16a5743724fb5e
[ "BSD-3-Clause" ]
1
2019-08-22T17:17:41.000Z
2019-08-22T17:17:41.000Z
external/sbml/bindings/python/test/sbml/TestConstraint_newSetters.py
dchandran/evolvenetworks
072f9e1292552f691a86457ffd16a5743724fb5e
[ "BSD-3-Clause" ]
null
null
null
external/sbml/bindings/python/test/sbml/TestConstraint_newSetters.py
dchandran/evolvenetworks
072f9e1292552f691a86457ffd16a5743724fb5e
[ "BSD-3-Clause" ]
null
null
null
# # @file TestConstraint_newSetters.py # @brief Constraint unit tests for new set function API # # @author Akiya Jouraku (Python conversion) # @author Sarah Keating # # $Id$ # $HeadURL$ # # This test file was converted from src/sbml/test/TestConstraint_newSetters.c # with the help of conversion sciprt (ctest_...
32.947368
79
0.660011
7902482a6fb74642b39229bc8a84f18d19d023ff
2,777
py
Python
tests/utils/test_pnc.py
hjmodi/atomic-reactor
547f3edd28628dc59a98c4928a0ecf280f5983cb
[ "BSD-3-Clause" ]
null
null
null
tests/utils/test_pnc.py
hjmodi/atomic-reactor
547f3edd28628dc59a98c4928a0ecf280f5983cb
[ "BSD-3-Clause" ]
null
null
null
tests/utils/test_pnc.py
hjmodi/atomic-reactor
547f3edd28628dc59a98c4928a0ecf280f5983cb
[ "BSD-3-Clause" ]
null
null
null
""" Copyright (c) 2021 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from io import BufferedReader, BytesIO import pytest import requests import responses from flexmock import flexmock from atomic_reactor.uti...
33.457831
95
0.695355
79027676c5ca108e115bc437519299eb7bbd02f4
1,713
py
Python
coffee-maturation/src/models/non_maximum.py
dahem/coffe-images
2af526c57c08317829e0b99af83b11c9fb9182da
[ "MIT" ]
null
null
null
coffee-maturation/src/models/non_maximum.py
dahem/coffe-images
2af526c57c08317829e0b99af83b11c9fb9182da
[ "MIT" ]
null
null
null
coffee-maturation/src/models/non_maximum.py
dahem/coffe-images
2af526c57c08317829e0b99af83b11c9fb9182da
[ "MIT" ]
null
null
null
import numpy as np def non_max_suppression_fast(boxes, overlapThresh): # if there are no boxes, return an empty list if len(boxes) == 0: return [] # if the boxes are integers, convert them to floats (due to divisions) if boxes.dtype.kind == "i": boxes = boxes.astype("float") # initial...
24.126761
108
0.615879
79028f78d8a408e97a58606dd5ac6bc08df170f3
5,531
py
Python
igemm_codegen.py
aska-0096/iGEMMgen
cff8507355d86e47f5b099cd9b8a81d94fab93d7
[ "MIT" ]
20
2020-04-14T14:39:24.000Z
2022-02-23T19:37:04.000Z
igemm_codegen.py
aska-0096/iGEMMgen
cff8507355d86e47f5b099cd9b8a81d94fab93d7
[ "MIT" ]
38
2020-04-21T12:23:07.000Z
2021-12-31T02:26:21.000Z
igemm_codegen.py
aska-0096/iGEMMgen
cff8507355d86e47f5b099cd9b8a81d94fab93d7
[ "MIT" ]
9
2020-04-20T06:34:16.000Z
2022-02-23T19:37:06.000Z
################################################################################ # # MIT License # # Copyright (c) 2020 Advanced Micro Devices, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # ...
42.875969
196
0.685952
79029440277e967106f528a1a3f24a2937e0ceee
27,758
py
Python
readthedocs/api/v3/serializers.py
mehrdad-khojastefar/readthedocs.org
b958bb8d04c454324d612345890b13af54a19eb6
[ "MIT" ]
2,092
2019-06-29T07:47:30.000Z
2022-03-31T14:54:59.000Z
readthedocs/api/v3/serializers.py
mehrdad-khojastefar/readthedocs.org
b958bb8d04c454324d612345890b13af54a19eb6
[ "MIT" ]
2,389
2019-06-29T04:22:55.000Z
2022-03-31T22:57:49.000Z
readthedocs/api/v3/serializers.py
mehrdad-khojastefar/readthedocs.org
b958bb8d04c454324d612345890b13af54a19eb6
[ "MIT" ]
1,185
2019-06-29T21:49:31.000Z
2022-03-30T09:57:15.000Z
import datetime import urllib from django.conf import settings from django.contrib.auth.models import User from django.urls import reverse from django.utils.translation import ugettext as _ from rest_flex_fields import FlexFieldsModelSerializer from rest_flex_fields.serializers import FlexFieldsSerializerMixin from re...
28.180711
89
0.595468
7902958aba3b36b6c985cbc6b8b862ef5e83942c
9,239
py
Python
deepchembed/dce.py
hanghu/AutoChemCluster
2ab4ae996b300a90637b124707905201c89d74d8
[ "MIT" ]
2
2019-05-15T06:31:35.000Z
2019-08-31T13:13:21.000Z
deepchembed/dce.py
hanghu/AutoChemCluster
2ab4ae996b300a90637b124707905201c89d74d8
[ "MIT" ]
7
2019-05-02T19:01:40.000Z
2022-02-10T00:11:00.000Z
deepchembed/dce.py
hanghu/AutoChemCluster
2ab4ae996b300a90637b124707905201c89d74d8
[ "MIT" ]
1
2019-08-17T11:34:56.000Z
2019-08-17T11:34:56.000Z
""" DeepChEmbed (DCE) Models """ from dimreducer import DeepAutoEncoder from cluster import KMeansLayer from cluster import KMeans from keras import Model from keras import optimizers from keras.utils import normalize import numpy as np class DCE(): """ The class to build a deep chemical embedding model. ...
41.430493
79
0.573763
7902c0eb5175879fdc97f1cf09a1cd5cc8374bfd
4,994
py
Python
models/official/unet3d/unet_main.py
tensorflow/tpu-demos
8aac591077e5781785aa6c22bc400472ba14dada
[ "Apache-2.0" ]
65
2017-07-28T03:47:42.000Z
2018-02-04T20:54:18.000Z
models/official/unet3d/unet_main.py
tensorflow/tpu-demos
8aac591077e5781785aa6c22bc400472ba14dada
[ "Apache-2.0" ]
10
2017-08-11T22:55:40.000Z
2018-02-07T01:11:28.000Z
models/official/unet3d/unet_main.py
tensorflow/tpu-demos
8aac591077e5781785aa6c22bc400472ba14dada
[ "Apache-2.0" ]
28
2017-07-28T08:20:06.000Z
2018-01-28T16:28:12.000Z
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.928058
80
0.718662
7902e69fa7db7f459fe2c262ca5e329f7363bc68
1,353
py
Python
interpolML/interpolML/model/model.py
MiguelMque/interpolML
980d55583285ba1d289de69b5c05c65fc34097f5
[ "MIT" ]
null
null
null
interpolML/interpolML/model/model.py
MiguelMque/interpolML
980d55583285ba1d289de69b5c05c65fc34097f5
[ "MIT" ]
null
null
null
interpolML/interpolML/model/model.py
MiguelMque/interpolML
980d55583285ba1d289de69b5c05c65fc34097f5
[ "MIT" ]
null
null
null
from typing import Any from copy import deepcopy class Model: def __init__(self, name: str, model, freq: str): self.name = name self.model = model self.freq = freq self.train = None self.test = None self.prediction = None self.pred_col = "prediction" ...
27.612245
92
0.597931
79033e329aeeed6995605fb7fa079108c03ba683
8,699
py
Python
awx/main/dispatch/worker/callback.py
Mayses/awx
35441694a9707d0d2f57c701970db22110091163
[ "Apache-2.0" ]
1
2021-08-02T10:37:09.000Z
2021-08-02T10:37:09.000Z
awx/main/dispatch/worker/callback.py
Mayses/awx
35441694a9707d0d2f57c701970db22110091163
[ "Apache-2.0" ]
2
2019-03-01T19:08:10.000Z
2020-03-12T09:14:27.000Z
awx/main/dispatch/worker/callback.py
hostinger/awx
dac01b14e2c04c201a162ea03ef8386d822e3923
[ "Apache-2.0" ]
24
2020-11-27T08:37:35.000Z
2021-03-08T13:27:15.000Z
import cProfile import json import logging import os import pstats import signal import tempfile import time import traceback from django.conf import settings from django.utils.timezone import now as tz_now from django.db import DatabaseError, OperationalError, connection as django_connection from django.db.utils impo...
40.840376
136
0.550178
79034b377e53dbe27bcfc9791d8775eae11ab645
4,532
py
Python
notebook-samples/unsupervised/pred_electricity_consumption.py
MarkMoretto/python-examples-main
37b8c41d2f175029f4536ca970f037ff19b4e951
[ "MIT" ]
1
2020-07-21T23:24:25.000Z
2020-07-21T23:24:25.000Z
notebook-samples/unsupervised/pred_electricity_consumption.py
MarkMoretto/python-examples-main
37b8c41d2f175029f4536ca970f037ff19b4e951
[ "MIT" ]
4
2021-06-29T00:38:57.000Z
2022-01-15T00:22:15.000Z
notebook-samples/unsupervised/pred_electricity_consumption.py
MarkMoretto/python-examples-main
37b8c41d2f175029f4536ca970f037ff19b4e951
[ "MIT" ]
null
null
null
""" Purpose: Unsupervised learning sampler Date created: 2020-11-06 Ref repo: https://github.com/White-Link/UnsupervisedScalableRepresentationLearningTimeSeries Local folder: C:/Users/Work1/Desktop/Info/GitHub/python-examples-main/notebook-samples/unsupervised Contributor(s): Mark M. """ import os from pathlib...
23.978836
115
0.703442
790371ae35706b91f27bf2d89e39770f3441a18b
4,910
py
Python
superset/sql_parse.py
gabe-lyons/incubator-superset
7669cdb8c51bcc3f298aff2a14cbfeea3cbf5f13
[ "Apache-2.0" ]
4
2018-07-25T17:12:13.000Z
2020-12-28T10:26:53.000Z
superset/sql_parse.py
ksangeet9ap/incubator-superset
f417172071503e48bdbbe00d8254c204928a5d3e
[ "Apache-2.0" ]
1
2018-02-22T23:29:06.000Z
2018-02-23T21:44:00.000Z
superset/sql_parse.py
ksangeet9ap/incubator-superset
f417172071503e48bdbbe00d8254c204928a5d3e
[ "Apache-2.0" ]
4
2020-03-07T11:58:42.000Z
2020-05-26T02:07:27.000Z
# -*- coding: utf-8 -*- # pylint: disable=C,R,W from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import sqlparse from sqlparse.sql import Identifier, IdentifierList from sqlparse.tokens import Keyword, N...
34.822695
79
0.614868
79038b3e118983bc62e021442b3e8f2c6f1fa0d7
1,003
py
Python
examples/outlook/send_message.py
stardust85/Office365-REST-Python-Client
cd369c607c7d137a000734e9c5e8f03ae3e3c603
[ "MIT" ]
null
null
null
examples/outlook/send_message.py
stardust85/Office365-REST-Python-Client
cd369c607c7d137a000734e9c5e8f03ae3e3c603
[ "MIT" ]
null
null
null
examples/outlook/send_message.py
stardust85/Office365-REST-Python-Client
cd369c607c7d137a000734e9c5e8f03ae3e3c603
[ "MIT" ]
null
null
null
from office365.graph.graph_client import GraphClient from settings import settings def get_token(auth_ctx): """Acquire token via client credential flow (ADAL Python library is utilized)""" token = auth_ctx.acquire_token_with_client_credentials( "https://graph.microsoft.com", settings['client_c...
27.861111
84
0.612164
7903a0d0a7d350892d692d86b8bbd1dc00694d86
257
py
Python
settings/__init__.py
ppold/lambtastic
29d96f0f111a950a6ecd7af1cdc172addd64de04
[ "Unlicense" ]
null
null
null
settings/__init__.py
ppold/lambtastic
29d96f0f111a950a6ecd7af1cdc172addd64de04
[ "Unlicense" ]
1
2021-06-01T21:53:04.000Z
2021-06-01T21:53:04.000Z
settings/__init__.py
ppold/lambtastic
29d96f0f111a950a6ecd7af1cdc172addd64de04
[ "Unlicense" ]
null
null
null
""" core app configuration """ import os environment = os.getenv('LAMBTASTIC_ENV', 'development') if environment == 'testing': from .testing import * elif environment == 'production': from .production import * else: from .development import *
21.416667
56
0.696498
7903b2cc28f548b837773d028e06bc2268565a94
24,145
py
Python
.venv/Lib/site-packages/rich/pretty.py
jefferdo/gpt-3-client
7acbc5f518fe3fcb55d0bdcbf93fc87b103b1148
[ "MIT" ]
null
null
null
.venv/Lib/site-packages/rich/pretty.py
jefferdo/gpt-3-client
7acbc5f518fe3fcb55d0bdcbf93fc87b103b1148
[ "MIT" ]
76
2020-07-31T05:33:39.000Z
2022-03-28T05:04:17.000Z
rich/pretty.py
shyovn/rich
a05a5a1c2f95f25db70ac3657e99f0bab652e2cd
[ "MIT" ]
null
null
null
import builtins import os import sys from array import array from collections import Counter, defaultdict, deque from dataclasses import dataclass, fields, is_dataclass from itertools import islice from typing import ( TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Optional, Set, ...
34.741007
134
0.566163
7903b71f344fdae0aaa535b9d1dc6746718b0d4e
6,074
py
Python
models/fdconv1d_lstm/train.py
rovo98/model-unkown-dfa-diagnosis-based-on-running-logs
f80c838dea6a8313165fbf10d64d5dc935cc036c
[ "Apache-2.0" ]
null
null
null
models/fdconv1d_lstm/train.py
rovo98/model-unkown-dfa-diagnosis-based-on-running-logs
f80c838dea6a8313165fbf10d64d5dc935cc036c
[ "Apache-2.0" ]
4
2020-04-30T07:57:42.000Z
2020-09-27T06:52:00.000Z
models/fdconv1d_lstm/train.py
rovo98/model-unkown-dfa-diagnosis-based-on-running-logs
f80c838dea6a8313165fbf10d64d5dc935cc036c
[ "Apache-2.0" ]
null
null
null
# author rovo98 import os import tensorflow as tf from tensorflow.keras.utils import plot_model from tensorflow.keras.callbacks import EarlyStopping from model_data_input import load_processed_dataset from models.fdconv1d_lstm.model import build_fdconv1d_lstm from models.utils.misc import running_timer from models.u...
43.697842
114
0.689167
7903eb73c3f6b1512edfad4b6b076a4433ccc540
347
py
Python
pools/eventlet.py
JohnStarich/python-pool-performance
5a8428ca95240932e0b1b0d7064bf8020e0b1f2e
[ "MIT" ]
32
2016-08-05T20:54:57.000Z
2021-11-16T19:28:12.000Z
pools/eventlet.py
ktosiu/python-pool-performance
5a8428ca95240932e0b1b0d7064bf8020e0b1f2e
[ "MIT" ]
1
2018-10-26T10:43:16.000Z
2018-10-31T07:37:20.000Z
pools/eventlet.py
ktosiu/python-pool-performance
5a8428ca95240932e0b1b0d7064bf8020e0b1f2e
[ "MIT" ]
7
2017-03-18T21:27:53.000Z
2022-02-11T01:40:48.000Z
from pools import PoolTest import eventlet class EventletPool(PoolTest): def init_pool(self, worker_count): return eventlet.GreenPool(worker_count) def map(self, work_func, inputs): return self.pool.imap(work_func, inputs) def init_network_resource(self): return eventlet.import_p...
24.785714
58
0.731988
79040eed931a507c8701c847570903d6715a6f2e
9,615
py
Python
arcface/resnet_cbam.py
DerryHub/the-TaobaoLive-Commodity-Identify-Competition
7e5e5c4fbddd9949fe01810d58bd7994889c007c
[ "MIT" ]
4
2020-08-15T14:49:37.000Z
2022-01-16T08:34:07.000Z
arcface/resnet_cbam.py
weilin-droid/the-TaobaoLive-Commodity-Identify-Competition
7e5e5c4fbddd9949fe01810d58bd7994889c007c
[ "MIT" ]
null
null
null
arcface/resnet_cbam.py
weilin-droid/the-TaobaoLive-Commodity-Identify-Competition
7e5e5c4fbddd9949fe01810d58bd7994889c007c
[ "MIT" ]
2
2021-05-26T05:16:09.000Z
2021-06-09T09:07:49.000Z
import torch import torch.nn as nn import math from arcface.utils import l2_norm, Flatten, SentVec_TFIDF model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth', 'resnet50': 'https://download.pytorch.org...
33.618881
87
0.562142
7904170d3c8142ffcd70d73d75dd5cdaa82082ab
1,122
py
Python
scripts/pivot_cluster_day.py
isabella232/allsongsconsidered-poll
f4b63effcf57c6b6680eac9f11a55cd0541e358c
[ "MIT" ]
3
2018-01-04T12:07:28.000Z
2018-04-10T02:10:27.000Z
scripts/pivot_cluster_day.py
nprapps/allsongsconsidered-poll
f4b63effcf57c6b6680eac9f11a55cd0541e358c
[ "MIT" ]
1
2021-02-24T06:47:12.000Z
2021-02-24T06:47:12.000Z
scripts/pivot_cluster_day.py
isabella232/allsongsconsidered-poll
f4b63effcf57c6b6680eac9f11a55cd0541e358c
[ "MIT" ]
3
2018-08-03T22:10:04.000Z
2022-03-23T11:33:55.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import sys import numpy as np import pandas as pd def run(args): data = pd.read_csv(sys.stdin) # Find maximum rank value and increase by one to use as a fill_value # on the pivot with cluster by day # notfound_value = grouped['rank'].max()...
29.526316
76
0.564171
79042e70f30245770d9db6b182ee23c020d301ec
7,960
py
Python
utils/lib_classifier.py
eddylamhw/trAIner24
ac7cf1b95a2ecdfc44d11451984b016524ed7657
[ "MIT" ]
1
2021-11-25T16:32:51.000Z
2021-11-25T16:32:51.000Z
utils/lib_classifier.py
eddylamhw/trAIner24
ac7cf1b95a2ecdfc44d11451984b016524ed7657
[ "MIT" ]
null
null
null
utils/lib_classifier.py
eddylamhw/trAIner24
ac7cf1b95a2ecdfc44d11451984b016524ed7657
[ "MIT" ]
null
null
null
''' This script includes: 1. ClassifierOfflineTrain This is for offline training. The input data are the processed features. 2. class ClassifierOnlineTest(object) This is for online testing. The input data are the raw skeletons. It uses FeatureGenerator to extract features, and then use ClassifierOffli...
35.855856
97
0.629899
79043c4a2b502fc7c643b0638228e702db778599
2,611
py
Python
neuro-cli/tests/unit/formatters/test_blob_formatters.py
neuro-inc/platform-client-python
012e355249ea900b76f9ce4209fb9d029652f9b2
[ "Apache-2.0" ]
11
2020-10-11T15:38:11.000Z
2021-11-09T11:29:50.000Z
neuro-cli/tests/unit/formatters/test_blob_formatters.py
neuro-inc/platform-client-python
012e355249ea900b76f9ce4209fb9d029652f9b2
[ "Apache-2.0" ]
611
2020-09-30T21:27:52.000Z
2022-01-10T10:44:44.000Z
neuro-cli/tests/unit/formatters/test_blob_formatters.py
neuro-inc/platform-client-python
012e355249ea900b76f9ce4209fb9d029652f9b2
[ "Apache-2.0" ]
1
2020-10-05T15:10:24.000Z
2020-10-05T15:10:24.000Z
from datetime import datetime from typing import Any, List, Union import pytest from neuro_sdk import BlobCommonPrefix, BlobObject, Bucket, BucketEntry from neuro_cli.formatters.blob_storage import ( BaseBlobFormatter, LongBlobFormatter, SimpleBlobFormatter, ) class TestBlobFormatter: buckets: Lis...
29.011111
87
0.542704
79044aafe60974ffe22e1146ae93d53991ba1bf9
23,871
py
Python
src/nfc/llcp/llc.py
javgh/bitpay-brick
688cb3403111494bba5f453ea681515e03bf43b4
[ "MIT" ]
15
2016-11-20T15:38:49.000Z
2021-08-23T02:59:49.000Z
src/nfc/llcp/llc.py
javgh/bitpay-brick
688cb3403111494bba5f453ea681515e03bf43b4
[ "MIT" ]
null
null
null
src/nfc/llcp/llc.py
javgh/bitpay-brick
688cb3403111494bba5f453ea681515e03bf43b4
[ "MIT" ]
3
2016-11-21T11:57:13.000Z
2019-03-24T21:12:41.000Z
# -*- coding: latin-1 -*- # ----------------------------------------------------------------------------- # Copyright 2009-2011 Stephen Tiedemann <stephen.tiedemann@googlemail.com> # # Licensed under the EUPL, Version 1.1 or - as soon they # will be approved by the European Commission - subsequent # versions of the EU...
38.011146
79
0.548071
7904526d4f781baed9cdc8dc4972204a7a65ec51
236
py
Python
some-euler/p31.py
rik0/rk-exempla
811f859a0980b0636bbafa2656893d988c4d0e32
[ "MIT" ]
1
2017-02-20T21:04:47.000Z
2017-02-20T21:04:47.000Z
some-euler/p31.py
rik0/rk-exempla
811f859a0980b0636bbafa2656893d988c4d0e32
[ "MIT" ]
null
null
null
some-euler/p31.py
rik0/rk-exempla
811f859a0980b0636bbafa2656893d988c4d0e32
[ "MIT" ]
2
2017-02-20T21:04:49.000Z
2021-05-18T11:29:16.000Z
import constraint coins = [1, 2, 5, 10, 20, 50, 100, 200] CSP = constraint.Problem() for coin in coins: CSP.addVariable(coin, range(0, 201, coin)) CSP.addConstraint(constraint.ExactSumConstraint(200)) print len(CSP.getSolutions())
26.222222
53
0.724576
79045746d76c6cba54bceacab6b61a83a5825c4e
1,328
py
Python
components/contrib/_converters/KerasModelHdf5/to_TensorflowSavedModel/component.py
Iuiu1234/pipelines
1e032f550ce23cd40bfb6827b995248537b07d08
[ "Apache-2.0" ]
2,860
2018-05-24T04:55:01.000Z
2022-03-31T13:49:56.000Z
components/contrib/_converters/KerasModelHdf5/to_TensorflowSavedModel/component.py
Iuiu1234/pipelines
1e032f550ce23cd40bfb6827b995248537b07d08
[ "Apache-2.0" ]
7,331
2018-05-16T09:03:26.000Z
2022-03-31T23:22:04.000Z
components/contrib/_converters/KerasModelHdf5/to_TensorflowSavedModel/component.py
Iuiu1234/pipelines
1e032f550ce23cd40bfb6827b995248537b07d08
[ "Apache-2.0" ]
1,359
2018-05-15T11:05:41.000Z
2022-03-31T09:42:09.000Z
from kfp.components import create_component_from_func, InputPath, OutputPath def keras_convert_hdf5_model_to_tf_saved_model( model_path: InputPath('KerasModelHdf5'), converted_model_path: OutputPath('TensorflowSavedModel'), ): '''Converts Keras HDF5 model to Tensorflow SavedModel format. Args: ...
39.058824
182
0.734187
790476bfb1348ab4e0cb7a3cfe0c76769a6bf9e2
9,966
py
Python
mmcls/models/backbones/mobilenet_v2.py
ChaseMonsterAway/mmclassification
85d26b8eb2fc799599c42ca33831c40707311bd7
[ "Apache-2.0" ]
null
null
null
mmcls/models/backbones/mobilenet_v2.py
ChaseMonsterAway/mmclassification
85d26b8eb2fc799599c42ca33831c40707311bd7
[ "Apache-2.0" ]
null
null
null
mmcls/models/backbones/mobilenet_v2.py
ChaseMonsterAway/mmclassification
85d26b8eb2fc799599c42ca33831c40707311bd7
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import torch.nn as nn import torch.utils.checkpoint as cp from mmcv.cnn import ConvModule from mmcv.runner import BaseModule from torch.nn.modules.batchnorm import _BatchNorm from mmcls.models.utils import make_divisible from ..builder import BACKBONES from .base_backbon...
36.639706
173
0.553783
79048490556fde1b61605b3bb2be4bfa21cfe9d0
2,046
py
Python
src/spaceone/inventory/api/v1/network_type.py
choonho/inventory
cc89757490d28fecb7ffccdfd6f89d4c0aa40da5
[ "Apache-2.0" ]
null
null
null
src/spaceone/inventory/api/v1/network_type.py
choonho/inventory
cc89757490d28fecb7ffccdfd6f89d4c0aa40da5
[ "Apache-2.0" ]
null
null
null
src/spaceone/inventory/api/v1/network_type.py
choonho/inventory
cc89757490d28fecb7ffccdfd6f89d4c0aa40da5
[ "Apache-2.0" ]
null
null
null
from spaceone.api.inventory.v1 import network_type_pb2, network_type_pb2_grpc from spaceone.core.pygrpc import BaseAPI class NetworkType(BaseAPI, network_type_pb2_grpc.NetworkTypeServicer): pb2 = network_type_pb2 pb2_grpc = network_type_pb2_grpc def create(self, request, context): params, metada...
43.531915
118
0.726784
790489aa109a3810fa6f0d208b39f83eb3d71525
1,688
py
Python
kite/venv/lib/python3.7/site-packages/bs4/tests/test_htmlparser.py
pxuanqui/Edge-Assisted-Cart
2edd1f7023ab0b02f5733e2e9204bac4623eeeac
[ "BSD-3-Clause" ]
27
2019-10-28T05:03:18.000Z
2021-06-09T00:16:22.000Z
kite/venv/lib/python3.7/site-packages/bs4/tests/test_htmlparser.py
pxuanqui/Edge-Assisted-Cart
2edd1f7023ab0b02f5733e2e9204bac4623eeeac
[ "BSD-3-Clause" ]
47
2018-11-16T19:18:01.000Z
2021-12-01T19:40:44.000Z
virtual/lib/python3.6/site-packages/bs4/tests/test_htmlparser.py
catherine244/Reviews
30138f5ad09a39c1b6866c8bacf3fd0c89abbd00
[ "MIT" ]
9
2019-11-02T06:44:18.000Z
2021-11-08T11:46:19.000Z
"""Tests to ensure that the html.parser tree builder generates good trees.""" from pdb import set_trace import pickle from bs4.testing import SoupTest, HTMLTreeBuilderSmokeTest from bs4.builder import HTMLParserTreeBuilder from bs4.builder._htmlparser import BeautifulSoupHTMLParser class HTMLParserTreeBuilderSmokeTes...
35.166667
79
0.690758
79048cff42ce750f3a33344f76f2a01c5367ca07
485
py
Python
wargame/designpatterns/pythonic_orcfighter.py
jeantardelli/wargameRepo
1e11ae40281f7eafa65ea6e40e045304b20e3824
[ "MIT" ]
1
2020-12-01T20:30:27.000Z
2020-12-01T20:30:27.000Z
wargame/designpatterns/pythonic_orcfighter.py
jeantardelli/wargameRepo
1e11ae40281f7eafa65ea6e40e045304b20e3824
[ "MIT" ]
null
null
null
wargame/designpatterns/pythonic_orcfighter.py
jeantardelli/wargameRepo
1e11ae40281f7eafa65ea6e40e045304b20e3824
[ "MIT" ]
null
null
null
"""pythonic_orcfighter This is one of the different GameUnits that are used in the desing patterns examples. :copyright: 2020, Jean Tardelli :license: The MIT license (MIT). See LICENSE file for further details. """ from pythonic_abstractgameunit import AbstractGameUnit class OrcFighter(AbstractGameUnit): """Cr...
30.3125
85
0.736082
7904a3040e8c6bf9902569d51ccd6879143a4351
1,963
py
Python
DailyCodingProblem/84_Amazon_Find_Islands_From_Matrix.py
RafayAK/CodingPrep
718eccb439db0f6e727806964766a40e8234c8a9
[ "MIT" ]
5
2019-09-07T17:31:17.000Z
2022-03-05T09:59:46.000Z
DailyCodingProblem/84_Amazon_Find_Islands_From_Matrix.py
RafayAK/CodingPrep
718eccb439db0f6e727806964766a40e8234c8a9
[ "MIT" ]
null
null
null
DailyCodingProblem/84_Amazon_Find_Islands_From_Matrix.py
RafayAK/CodingPrep
718eccb439db0f6e727806964766a40e8234c8a9
[ "MIT" ]
2
2019-09-07T17:31:24.000Z
2019-10-28T16:10:52.000Z
""" This problem was asked by Amazon. Given a matrix of 1s and 0s, return the number of "islands" in the matrix. A 1 represents land and 0 represents water, so an island is a group of 1s that are neighboring whose perimeter is surrounded by water. For example, this matrix has 4 islands. 1 0 0 0 0 0 0 1 1 0 0 1 1 0 0...
21.107527
74
0.496689
7904ab641d3683007eb6f39dfe08fafe512112a5
4,181
py
Python
scripts/asmt_merge_vacc_exetera.py
deng113jie/ExeTeraCovid
ee9ec90983d7c2c711962c7fe9ac25251392e41b
[ "Apache-2.0" ]
3
2021-03-23T14:23:06.000Z
2021-12-29T16:54:42.000Z
scripts/asmt_merge_vacc_exetera.py
deng113jie/ExeTeraCovid
ee9ec90983d7c2c711962c7fe9ac25251392e41b
[ "Apache-2.0" ]
29
2021-02-22T12:12:53.000Z
2021-09-27T10:52:25.000Z
scripts/asmt_merge_vacc_exetera.py
deng113jie/ExeTeraCovid
ee9ec90983d7c2c711962c7fe9ac25251392e41b
[ "Apache-2.0" ]
1
2021-03-08T15:00:30.000Z
2021-03-08T15:00:30.000Z
from datetime import datetime import numpy as np import exetera.core.session as sess from exetera.core import dataframe ADATA = '/home/jd21/data/processed_May17_processed.hdf5' VDATA = '/home/jd21/data/vacc.0603.h5' DSTDATA = '/home/jd21/data/full_merge.h5' def asmt_merge_vacc(): """ Merge assessment df wi...
45.945055
153
0.643387
7904b168a4116b84fb89d03c6509bd216b10c0ed
5,765
py
Python
py/util/config.py
PurdueMINDS/MCLV-RBM
46b1f90b52447687983113f37a5ce2c66b8f0465
[ "Apache-2.0" ]
4
2018-07-21T14:36:09.000Z
2021-01-27T15:40:04.000Z
py/util/config.py
PurdueMINDS/MCLV-RBM
46b1f90b52447687983113f37a5ce2c66b8f0465
[ "Apache-2.0" ]
null
null
null
py/util/config.py
PurdueMINDS/MCLV-RBM
46b1f90b52447687983113f37a5ce2c66b8f0465
[ "Apache-2.0" ]
1
2018-07-21T14:36:10.000Z
2018-07-21T14:36:10.000Z
# Copyright 2017 Bruno Ribeiro, Mayank Kakodkar, Pedro Savarese # # 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 applicabl...
44.346154
104
0.580225
7904b9ec43363d65c6c7499691923c70ca846c82
781
py
Python
setup.oci.py
busunkim96/cc-utils
aa864b1fad3061410907d6b93b8aee8cd25f33b5
[ "Apache-2.0" ]
15
2018-04-18T13:25:30.000Z
2022-03-04T09:25:41.000Z
setup.oci.py
busunkim96/cc-utils
aa864b1fad3061410907d6b93b8aee8cd25f33b5
[ "Apache-2.0" ]
221
2018-04-12T06:29:43.000Z
2022-03-27T03:01:40.000Z
setup.oci.py
busunkim96/cc-utils
aa864b1fad3061410907d6b93b8aee8cd25f33b5
[ "Apache-2.0" ]
29
2018-04-11T14:42:23.000Z
2021-11-09T16:26:32.000Z
import setuptools import os own_dir = os.path.abspath(os.path.dirname(__file__)) def requirements(): with open(os.path.join(own_dir, 'requirements.oci.txt')) as f: for line in f.readlines(): line = line.strip() if not line or line.startswith('#'): continue ...
19.04878
66
0.583867
7904cd5db58cc10f04e8b8ed06a0c5b09d965fe6
544
py
Python
setup.py
akumor/python-rastervectoranalysis
33370f8d104d3b69ce4c689783818512e7f864f2
[ "Apache-2.0" ]
null
null
null
setup.py
akumor/python-rastervectoranalysis
33370f8d104d3b69ce4c689783818512e7f864f2
[ "Apache-2.0" ]
null
null
null
setup.py
akumor/python-rastervectoranalysis
33370f8d104d3b69ce4c689783818512e7f864f2
[ "Apache-2.0" ]
null
null
null
try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description': 'Raster Vector Analysis', 'author': 'Jan Kumor', 'url': 'http://github.com/akumor/python-rastervectoranalysis', 'download_url': 'http://github.com/akumor/python-rastervectoranalysis'...
27.2
75
0.667279
7904e32998681c19d1931c5a6a712a8fc6b22f7e
26,232
py
Python
schmidt_funcs.py
johnarban/arban
dcd2d0838f72c39bf3a52aabfa74d6ea28933d02
[ "MIT" ]
null
null
null
schmidt_funcs.py
johnarban/arban
dcd2d0838f72c39bf3a52aabfa74d6ea28933d02
[ "MIT" ]
null
null
null
schmidt_funcs.py
johnarban/arban
dcd2d0838f72c39bf3a52aabfa74d6ea28933d02
[ "MIT" ]
null
null
null
import numpy as np from PIL import Image, ImageDraw from scipy import interpolate, ndimage, stats, signal, integrate, misc from astropy.io import ascii, fits from astropy.wcs import WCS from astropy.coordinates import SkyCoord import astropy.units as u import astropy.constants as c import corner as triangle # formerly...
30.970484
116
0.564692
7904f2d70ef6781d9d24239fa046eef91f73a28c
2,720
py
Python
6/server.py
mesilliac/multitude
eccab96f496217971d19d2a4592fe48ee837fb3e
[ "CC0-1.0" ]
2
2017-08-22T19:11:58.000Z
2017-10-10T22:14:33.000Z
6/server.py
mesilliac/multitude
eccab96f496217971d19d2a4592fe48ee837fb3e
[ "CC0-1.0" ]
null
null
null
6/server.py
mesilliac/multitude
eccab96f496217971d19d2a4592fe48ee837fb3e
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/python # coding: utf-8 """A simple webserver.""" # python 2.7 compatibility from __future__ import print_function, unicode_literals # based on tornado import tornado.ioloop import tornado.web import tornado.websocket import sys import json def make_app(): """Create and return the main Tornado web app...
31.627907
74
0.606985
790519040488b2751b8ca57d8241ea867d38f82f
6,597
py
Python
modules/youtube_music.py
mavroudo/jarvis-discord
918540a67d7ac48584e8efd6a06385ec5228f4d5
[ "MIT" ]
null
null
null
modules/youtube_music.py
mavroudo/jarvis-discord
918540a67d7ac48584e8efd6a06385ec5228f4d5
[ "MIT" ]
null
null
null
modules/youtube_music.py
mavroudo/jarvis-discord
918540a67d7ac48584e8efd6a06385ec5228f4d5
[ "MIT" ]
null
null
null
import os import discord import youtube_dl as ytdl class MusicPlayer: ''' This module is responsible for connecting and disconnecting the bot from a voice channel, downloading songs from youtube and add them in the queue . Basic music functions like pause, resume, stop and play, in order to give ...
43.117647
120
0.621949
7905d0bcd302b5858170c94d003ee28831928a26
2,464
py
Python
master/searx-master/searx/engines/duckduckgo_images.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
4
2018-09-07T15:35:24.000Z
2019-03-27T09:48:12.000Z
master/searx-master/searx/engines/duckduckgo_images.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
371
2020-03-04T21:51:56.000Z
2022-03-31T20:59:11.000Z
master/searx-master/searx/engines/duckduckgo_images.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
3
2019-06-18T19:57:17.000Z
2020-11-06T03:55:08.000Z
""" DuckDuckGo (Images) @website https://duckduckgo.com/ @provide-api yes (https://duckduckgo.com/api), but images are not supported @using-api no @results JSON (site requires js to get images) @stable no (JSON can change) @parse url, title, img_src @todo avoid extra...
27.076923
103
0.631088
7905e60159629ca5c376e64caf6d3c85fa260c4a
1,016
py
Python
src/schemathesis/cli/output/short.py
chr1st1ank/schemathesis
f2e160d56c1fdce9eac7fee5875b209c8944f54a
[ "MIT" ]
1
2021-06-22T20:01:24.000Z
2021-06-22T20:01:24.000Z
src/schemathesis/cli/output/short.py
RonnyPfannschmidt/schemathesis
3542d91d2e7402235e7b2dc995ed7017a0265ff6
[ "MIT" ]
null
null
null
src/schemathesis/cli/output/short.py
RonnyPfannschmidt/schemathesis
3542d91d2e7402235e7b2dc995ed7017a0265ff6
[ "MIT" ]
null
null
null
import click from ...runner import events from . import default def handle_after_execution(context: events.ExecutionContext, event: events.AfterExecution) -> None: context.endpoints_processed += 1 default.display_execution_result(context, event) if context.endpoints_processed == event.schema.endpoints_co...
36.285714
99
0.748031
79060b9bb3f6d7260b99d143dbf8615f9dd467fe
36,469
py
Python
pyiron_atomistics/vasp/outcar.py
pyiron/pyiron_atomistic
0cd4c910806f44dfc829ddd642e323efcf7e36d5
[ "BSD-3-Clause" ]
14
2021-01-18T10:03:56.000Z
2022-03-01T20:59:35.000Z
pyiron_atomistics/vasp/outcar.py
pyiron/pyiron_atomistics
0cd4c910806f44dfc829ddd642e323efcf7e36d5
[ "BSD-3-Clause" ]
569
2018-04-12T06:37:14.000Z
2022-03-31T18:06:27.000Z
pyiron_atomistics/vasp/outcar.py
pyiron/pyiron_atomistic
0cd4c910806f44dfc829ddd642e323efcf7e36d5
[ "BSD-3-Clause" ]
6
2018-10-23T09:48:48.000Z
2022-02-13T12:13:00.000Z
# coding: utf-8 # Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department # Distributed under the terms of "New BSD License", see the LICENSE file. from collections import OrderedDict import numpy as np import warnings import scipy.constants import re __author__ = "S...
37.365779
129
0.56681
79062be30a913ab25a06164b9800864bb79d5e79
333
py
Python
tests/test-failinfo_refcount.py
lwllvyb/libfiu-hack
a41612d78fbce5e2a33745837c2ec735cc22fd6e
[ "MIT" ]
null
null
null
tests/test-failinfo_refcount.py
lwllvyb/libfiu-hack
a41612d78fbce5e2a33745837c2ec735cc22fd6e
[ "MIT" ]
null
null
null
tests/test-failinfo_refcount.py
lwllvyb/libfiu-hack
a41612d78fbce5e2a33745837c2ec735cc22fd6e
[ "MIT" ]
null
null
null
""" Test that we keep references to failinfo as needed. """ import fiu # Object we'll use for failinfo finfo = [1, 2, 3] fiu.enable('p1', failinfo = finfo) assert fiu.fail('p1') assert fiu.failinfo('p1') is finfo finfo_id = id(finfo) del finfo assert fiu.failinfo('p1') == [1, 2, 3] assert id(fiu.failinfo('p1')) ...
15.136364
51
0.666667
790632599ec0c5e0db7b70a082f0a63ae4a7dec4
26,693
py
Python
lib/python2.7/matplotlib/projections/polar.py
ashley8jain/IITD-complaint-system-web
21a94601cba710f558d1689b87cfc391a1541c9f
[ "BSD-3-Clause" ]
1
2017-01-25T00:38:48.000Z
2017-01-25T00:38:48.000Z
lib/python2.7/matplotlib/projections/polar.py
ashley8jain/IITD-complaint-system-web
21a94601cba710f558d1689b87cfc391a1541c9f
[ "BSD-3-Clause" ]
null
null
null
lib/python2.7/matplotlib/projections/polar.py
ashley8jain/IITD-complaint-system-web
21a94601cba710f558d1689b87cfc391a1541c9f
[ "BSD-3-Clause" ]
null
null
null
import math import warnings import numpy as np import matplotlib rcParams = matplotlib.rcParams from matplotlib.axes import Axes import matplotlib.axis as maxis from matplotlib import cbook from matplotlib import docstring from matplotlib.patches import Circle from matplotlib.path import Path from matplotlib.ticker i...
35.076216
106
0.559173
790656792cf1a06755ecb98d07fc56893c0250cc
3,151
py
Python
tests/test_docs/test_standalone_transaction/test_standalone_transaction.py
valory-xyz/agents-aea
8f38efa96041b0156ed1ae328178e395dbabf2fc
[ "Apache-2.0" ]
28
2021-10-31T18:54:14.000Z
2022-03-17T13:10:43.000Z
tests/test_docs/test_standalone_transaction/test_standalone_transaction.py
valory-xyz/agents-aea
8f38efa96041b0156ed1ae328178e395dbabf2fc
[ "Apache-2.0" ]
66
2021-10-31T11:55:48.000Z
2022-03-31T06:26:23.000Z
tests/test_docs/test_standalone_transaction/test_standalone_transaction.py
valory-xyz/agents-aea
8f38efa96041b0156ed1ae328178e395dbabf2fc
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2022 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
35.404494
95
0.671215
79070d17a4163f46519228f051f77c1390ac6edb
1,285
py
Python
tf2onnx/tflite/LessOptions.py
LoicDagnas/tensorflow-onnx
6691850e79047d05d85017573170fd8240393b57
[ "Apache-2.0" ]
1,473
2018-03-16T02:47:33.000Z
2022-03-31T03:43:52.000Z
tf2onnx/tflite/LessOptions.py
LoicDagnas/tensorflow-onnx
6691850e79047d05d85017573170fd8240393b57
[ "Apache-2.0" ]
1,208
2018-03-14T09:58:49.000Z
2022-03-31T17:56:20.000Z
tf2onnx/tflite/LessOptions.py
LoicDagnas/tensorflow-onnx
6691850e79047d05d85017573170fd8240393b57
[ "Apache-2.0" ]
350
2018-04-03T03:48:40.000Z
2022-03-30T11:23:55.000Z
# SPDX-License-Identifier: Apache-2.0 # automatically generated by the FlatBuffers compiler, do not modify # namespace: tflite import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class LessOptions(object): __slots__ = ['_tab'] @classmethod def GetRootAs(cls, buf, offset=0...
32.125
114
0.705837
790710a4696737e320d90c8c3b766f346cca7bef
2,133
py
Python
bot.py
sagol/umorilibot
89e4bdc9771c21326768171099ee9872dc40b194
[ "MIT" ]
1
2021-02-19T11:13:24.000Z
2021-02-19T11:13:24.000Z
bot.py
sagol/umorilibot
89e4bdc9771c21326768171099ee9872dc40b194
[ "MIT" ]
null
null
null
bot.py
sagol/umorilibot
89e4bdc9771c21326768171099ee9872dc40b194
[ "MIT" ]
null
null
null
from sources import Sources from stories import Stories class Bot(): def __init__(self, config): self.url = config.get_url() self.sources = None self.stories = None def load(self): self.sources = Sources(self.url) self.stories = Stories(self.sources) ...
34.403226
95
0.547586
79072799f7f744d11592756ce43654976d9a7ea8
1,619
py
Python
tests/test_nexus.py
ghuls/weblogo
7eab5d1b8a8ec38786fa426af84bd77950835524
[ "MIT" ]
108
2015-08-21T10:39:22.000Z
2022-03-04T22:10:49.000Z
tests/test_nexus.py
ghuls/weblogo
7eab5d1b8a8ec38786fa426af84bd77950835524
[ "MIT" ]
60
2015-07-21T22:55:52.000Z
2022-03-24T21:20:00.000Z
tests/test_nexus.py
ghuls/weblogo
7eab5d1b8a8ec38786fa426af84bd77950835524
[ "MIT" ]
40
2015-08-04T00:18:23.000Z
2021-12-30T13:41:54.000Z
#!/usr/bin/env python import unittest from weblogo.seq_io._nexus import Nexus from . import data_stream class test_nexus(unittest.TestCase): def test_create(self): n = Nexus() self.assertNotEqual(n, None) def test_parse_f0(self): f = data_stream("nexus/test_Nexus_input.nex") ...
23.463768
62
0.536751
7907502c72435035b8773b2e9d3de98a759ac87a
17,141
py
Python
evolution/diversity.py
narendasan/neural-mmo
36a588db0021cccd7275cebef2cbdc5ee8eb40d5
[ "MIT" ]
null
null
null
evolution/diversity.py
narendasan/neural-mmo
36a588db0021cccd7275cebef2cbdc5ee8eb40d5
[ "MIT" ]
null
null
null
evolution/diversity.py
narendasan/neural-mmo
36a588db0021cccd7275cebef2cbdc5ee8eb40d5
[ "MIT" ]
null
null
null
from pdb import set_trace as TT import numpy as np import scipy from scipy.spatial import ConvexHull import skimage from skimage.morphology import disk import skbio global trg_image trg_image = None def diversity_calc(config): div_calc_name = config.FITNESS_METRIC return get_div_calc(div_calc_name) def get_div...
37.589912
225
0.687066
790765f7d394af7b8ea9033521908c3ce8929ca0
2,852
py
Python
defoe/alto/queries/keyword_concordance_by_word.py
kallewesterling/defoe
d72af2f748fd4363a4718c93bb0b0284b8cb1f3e
[ "MIT" ]
2
2022-02-14T12:10:54.000Z
2022-02-14T12:35:44.000Z
defoe/alto/queries/keyword_concordance_by_word.py
kallewesterling/defoe
d72af2f748fd4363a4718c93bb0b0284b8cb1f3e
[ "MIT" ]
17
2022-02-09T21:46:14.000Z
2022-02-25T14:55:09.000Z
defoe/alto/queries/keyword_concordance_by_word.py
kallewesterling/defoe
d72af2f748fd4363a4718c93bb0b0284b8cb1f3e
[ "MIT" ]
1
2022-02-14T13:19:08.000Z
2022-02-14T13:19:08.000Z
""" Gets concordance for keywords and groups by word. """ from defoe import query_utils from defoe.alto.query_utils import get_page_matches def do_query(archives, config_file=None, logger=None, context=None): """ Gets concordance for keywords and groups by word. config_file must be the path to a configu...
31
75
0.547686
79077298425f95eefa6233036c8a6843840ee10f
2,515
py
Python
plot_conditionals_with_tis.py
samiemostafavi/conditional-latency-probability-prediction
a196f2db8c6f30f8613797b6a23bffd77a01e1e3
[ "MIT" ]
null
null
null
plot_conditionals_with_tis.py
samiemostafavi/conditional-latency-probability-prediction
a196f2db8c6f30f8613797b6a23bffd77a01e1e3
[ "MIT" ]
null
null
null
plot_conditionals_with_tis.py
samiemostafavi/conditional-latency-probability-prediction
a196f2db8c6f30f8613797b6a23bffd77a01e1e3
[ "MIT" ]
null
null
null
import numpy as np import pyarrow as pa import pyarrow.parquet as pq import pyarrow.compute as pc import matplotlib.pyplot as plt import seaborn as sns from pr3d.nonbayesian import ConditionalGammaEVM # load dataset first file_addresses = ['dataset_onehop_processed.parquet'] table = pa.concat_tables( pq.read_tabl...
31.049383
99
0.662425
79077e9bac0a3bae6b1a07981b053ed053545a65
7,146
py
Python
test/test_spatial_interpolation.py
rgaensler/gcode
c6a6b617a04490dedefb2bae7b596a2e12ab4ab1
[ "MIT" ]
null
null
null
test/test_spatial_interpolation.py
rgaensler/gcode
c6a6b617a04490dedefb2bae7b596a2e12ab4ab1
[ "MIT" ]
314
2020-02-26T12:37:17.000Z
2021-08-02T00:32:32.000Z
test/test_spatial_interpolation.py
rgaensler/gcode
c6a6b617a04490dedefb2bae7b596a2e12ab4ab1
[ "MIT" ]
2
2020-11-12T16:07:48.000Z
2020-11-16T09:14:48.000Z
from math import pi, sqrt from typing import List import numpy as np import pytest from src.kinematics.forward_kinematics import get_tform from src.prechecks.spatial_interpolation import linear_interpolation, circular_interpolation @pytest.mark.parametrize("start,end,ds,expected_points", [ ...
47.64
110
0.34047
79079afb5049c4952a78491f534997124403c2b1
999
py
Python
sdk/communication/azure-communication-networktraversal/azure/communication/networktraversal/_generated/models/_communication_network_traversal_client_enums.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
sdk/communication/azure-communication-networktraversal/azure/communication/networktraversal/_generated/models/_communication_network_traversal_client_enums.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/communication/azure-communication-networktraversal/azure/communication/networktraversal/_generated/models/_communication_network_traversal_client_enums.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 ...
43.434783
99
0.648649
7907b99c86f63ebda9f0e3eb4ef5f5e50c0aacaa
204
py
Python
maingui/urls.py
edgarceron/agent_console
a75501957722a349c7276e4d199425897f351bc0
[ "BSD-3-Clause" ]
null
null
null
maingui/urls.py
edgarceron/agent_console
a75501957722a349c7276e4d199425897f351bc0
[ "BSD-3-Clause" ]
3
2021-03-30T13:46:24.000Z
2021-09-22T19:18:18.000Z
maingui/urls.py
edgarceron/agent_console
a75501957722a349c7276e4d199425897f351bc0
[ "BSD-3-Clause" ]
null
null
null
""" Contains the urls for the maingui module""" from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('login', views.login, name='login'), ]
20.4
47
0.661765
7907d5d8da7a9d75d151f7561ae03dee7c281322
10,916
py
Python
algorithm/python/topological_sort.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
null
null
null
algorithm/python/topological_sort.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
null
null
null
algorithm/python/topological_sort.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
null
null
null
#--------------------------------------------------------------- # ALGORITHM DEMO : TOPLOGICAL SORT #--------------------------------------------------------------- # Topological Sort is a algorithm can find "ordering" on an "order dependency" graph # Concept # https://blog.techbridge.cc/2020/05/10/leetcode-topologica...
30.322222
146
0.563576
7907e2ef9017c5ca381a123f82ee9a08309d578c
3,199
py
Python
server/app/scrapers/maarten.py
damienallen/makelaardij-notify
ea8e37e1b0f867487b90590c5273e7fb25d868cf
[ "MIT" ]
null
null
null
server/app/scrapers/maarten.py
damienallen/makelaardij-notify
ea8e37e1b0f867487b90590c5273e7fb25d868cf
[ "MIT" ]
15
2021-02-13T23:46:28.000Z
2021-02-25T15:36:08.000Z
server/app/scrapers/maarten.py
damienallen/makelaardij-notify
ea8e37e1b0f867487b90590c5273e7fb25d868cf
[ "MIT" ]
null
null
null
import asyncio from typing import List from app.common import SkipListing from app.scrapers.base import BaseScraper class MaartenScraper(BaseScraper): MAKELAARDIJ: str = "maarten" BASE_URL: str = "https://www.maartenmakelaardij.nl" # Specific functions async def extract_object_urls(self, soup) -> L...
29.897196
87
0.546733
7908015094df0f7d24b375510cc3e85e33122519
11,743
py
Python
PNet/train_pnet.py
mangye16/ReID-Label-Noise
89aa11f68c275a0bcff232d9a5c3ae152c9276af
[ "MIT" ]
11
2020-04-03T09:01:36.000Z
2022-03-11T08:12:16.000Z
PNet/train_pnet.py
mangye16/ReID-Label-Noise
89aa11f68c275a0bcff232d9a5c3ae152c9276af
[ "MIT" ]
null
null
null
PNet/train_pnet.py
mangye16/ReID-Label-Noise
89aa11f68c275a0bcff232d9a5c3ae152c9276af
[ "MIT" ]
3
2020-12-18T11:53:05.000Z
2022-01-12T16:35:45.000Z
# -*- coding: UTF-8 -*- from __future__ import print_function, division import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.optim import lr_scheduler from torch.autograd import Variable from torchvision import datasets, models, transforms from tensorboardX import ...
38.755776
154
0.664311
790804f388e72af2f2b67453edb3a003c8e8aa74
576
py
Python
test/rules/test_fires_child.py
rileyhazard/SmartVA-Analyze-1
0573eeff27d03f54e7506db4f1631c0cd9f54bbb
[ "MIT" ]
4
2019-01-23T12:57:47.000Z
2020-04-18T17:13:08.000Z
test/rules/test_fires_child.py
rileyhazard/SmartVA-Analyze-1
0573eeff27d03f54e7506db4f1631c0cd9f54bbb
[ "MIT" ]
4
2019-01-09T22:10:07.000Z
2022-02-16T04:57:06.000Z
test/rules/test_fires_child.py
rileyhazard/SmartVA-Analyze-1
0573eeff27d03f54e7506db4f1631c0cd9f54bbb
[ "MIT" ]
11
2018-12-11T22:01:13.000Z
2022-01-07T11:38:02.000Z
from smartva.rules import fires_child as fires from smartva.data.constants import * VA = Child def test_pass(): row = { VA.BURN: YES, VA.INJURY_DAYS: 0, } assert fires.logic_rule(row) is True def test_fail_fires(): row = { VA.BURN: NO, VA.INJURY_DAYS: 0, } ...
15.157895
46
0.604167
79083036c4c19017232d49b3487ba0475de179c0
625
py
Python
indra/tests/test_tas.py
djinnome/indra
382b7f236e0b1422c96a268ef873530b5e92d48f
[ "BSD-2-Clause" ]
null
null
null
indra/tests/test_tas.py
djinnome/indra
382b7f236e0b1422c96a268ef873530b5e92d48f
[ "BSD-2-Clause" ]
null
null
null
indra/tests/test_tas.py
djinnome/indra
382b7f236e0b1422c96a268ef873530b5e92d48f
[ "BSD-2-Clause" ]
null
null
null
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str from indra.sources.tas.api import _load_data, process_csv def test_load_data(): data = _load_data() assert len(data) > 100, len(data) def test_processor(): tp = process_csv(affinity_class_limit=10) ...
29.761905
72
0.7296
7908573ec9d313bf3168d98f4cf7ead29d9e6104
1,590
py
Python
tests/test_job_slurm.py
boazbk/mle-scheduler
4cf83873d9beb75b19b2deb9baf4394931b9624d
[ "MIT" ]
26
2021-11-12T15:06:54.000Z
2022-03-29T20:42:17.000Z
tests/test_job_slurm.py
boazbk/mle-scheduler
4cf83873d9beb75b19b2deb9baf4394931b9624d
[ "MIT" ]
4
2021-12-12T20:37:40.000Z
2022-03-01T10:18:14.000Z
tests/test_job_slurm.py
boazbk/mle-scheduler
4cf83873d9beb75b19b2deb9baf4394931b9624d
[ "MIT" ]
1
2021-12-13T17:24:02.000Z
2021-12-13T17:24:02.000Z
from mle_scheduler.cluster.slurm.helpers_launch_slurm import slurm_generate_startup_file job_arguments = { "num_logical_cores": 5, "partition": "standard", "job_name": "test_job", "num_gpus": 1, "gpu_type": "RTX2080", "env_name": "test_env", "use_conda_venv": True, "script": "python run...
32.44898
88
0.510063
7908689ce4a719ab15bd49a368a87f9cad7c6d61
11,740
py
Python
tensorflow/contrib/lite/python/op_hint.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
71
2017-05-25T16:02:15.000Z
2021-06-09T16:08:08.000Z
tensorflow/contrib/lite/python/op_hint.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
133
2017-04-26T16:49:49.000Z
2019-10-15T11:39:26.000Z
tensorflow/contrib/lite/python/op_hint.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
31
2018-09-11T02:17:17.000Z
2021-12-15T10:33:35.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.993528
80
0.725639
79088521341c908e9acfbace2f7914850759e997
3,642
py
Python
code_examples/tensorflow/kernel_benchmarks/dense.py
Splendon/examples
ed4a8a01857b6ddca49559141acf5d0986eb01e1
[ "MIT" ]
null
null
null
code_examples/tensorflow/kernel_benchmarks/dense.py
Splendon/examples
ed4a8a01857b6ddca49559141acf5d0986eb01e1
[ "MIT" ]
null
null
null
code_examples/tensorflow/kernel_benchmarks/dense.py
Splendon/examples
ed4a8a01857b6ddca49559141acf5d0986eb01e1
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Benchmark a single Dense layer with no host/device data transfers. The Items/sec reported at the end of the benchmark is based on wall time. Run with -h or --help for options. """ import inspect import os import sys import tensorflow as tf from tensorflow.python.ipu import utils def dense(...
33.109091
87
0.635365
7908919fd9c2722e099a3815953cf94ccddb5d9a
439
py
Python
array/twosum.py
mengyangbai/leetcode
e7a6906ecc5bce665dec5d0f057b302a64d50f40
[ "MIT" ]
null
null
null
array/twosum.py
mengyangbai/leetcode
e7a6906ecc5bce665dec5d0f057b302a64d50f40
[ "MIT" ]
null
null
null
array/twosum.py
mengyangbai/leetcode
e7a6906ecc5bce665dec5d0f057b302a64d50f40
[ "MIT" ]
null
null
null
class Solution: def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ lookup = dict(((v, i) for i, v in enumerate(nums))) return next(( (i+1, lookup.get(target-v)+1) for i, v in enumerate(nums) ...
29.266667
59
0.498861
7908a4da11350dcc729f2f370f826d6e172bbe48
780
py
Python
RandomWords.py
Makemeproud/BitcoinGenerator
10e2864a2254635153c757beece028c85a31e1ca
[ "Apache-2.0" ]
null
null
null
RandomWords.py
Makemeproud/BitcoinGenerator
10e2864a2254635153c757beece028c85a31e1ca
[ "Apache-2.0" ]
null
null
null
RandomWords.py
Makemeproud/BitcoinGenerator
10e2864a2254635153c757beece028c85a31e1ca
[ "Apache-2.0" ]
1
2022-02-27T14:57:19.000Z
2022-02-27T14:57:19.000Z
#!/usr/bin/env python ''' Pull random words from http://world.std.com/~reinhold/diceware.wordlist.asc Written 2013 Hal Canary. Dedicated to the public domain. ''' import random,math,sys,os useDevRandom = True dicewareWordlist = '~/Downloads/diceware.wordlist.asc' with open(os.path.expanduser(dicewareWordlist)) as f: ...
28.888889
75
0.723077