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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38c2269bbda1f82e0644417b4f7e9f4daa4cbc8e | 302 | py | Python | examples/guessnum/validator.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | 6 | 2019-11-30T17:03:13.000Z | 2021-09-30T05:08:31.000Z | examples/guessnum/validator.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | 1 | 2020-01-20T12:13:03.000Z | 2020-01-20T12:13:03.000Z | examples/guessnum/validator.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | null | null | null | from sys import *
from kg.validators import * ### @import
bounds = {
'n': abs(+Var) <= 10**9,
'm': 1 <= +Var <= 100,
}
@validator(bounds=bounds)
def validate_file(file, *, lim):
[n, m] = file.read.int(lim.n).space.int(lim.m).eoln.eof
if __name__ == '__main__':
validate_file(stdin)
| 18.875 | 59 | 0.599338 |
38c22dea75ebebca4425853472e1c001448b101b | 1,451 | py | Python | nova/conf/console.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/conf/console.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/conf/console.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 1 | 2020-07-24T01:18:44.000Z | 2020-07-24T01:18:44.000Z | # Copyright 2016 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 32.977273 | 78 | 0.66368 |
38c236c1c864f190c74f167dbb6c69b995b4f6c9 | 3,457 | py | Python | Cheetah/TemplateCmdLineIface.py | CheetahTemplate3/cheetah3 | fa71bebcd926049a539f1d8fc3cb74425e5f4831 | [
"MIT"
] | 111 | 2017-03-04T11:35:50.000Z | 2022-02-15T08:10:28.000Z | Cheetah/TemplateCmdLineIface.py | CheetahTemplate3/cheetah3 | fa71bebcd926049a539f1d8fc3cb74425e5f4831 | [
"MIT"
] | 49 | 2017-03-21T18:31:43.000Z | 2022-02-20T11:30:40.000Z | Cheetah/TemplateCmdLineIface.py | CheetahTemplate3/cheetah3 | fa71bebcd926049a539f1d8fc3cb74425e5f4831 | [
"MIT"
] | 38 | 2017-03-21T00:44:43.000Z | 2021-09-18T09:45:13.000Z |
import sys
import os
import getopt
import os.path
try:
from cPickle import load
except ImportError:
from pickle import load
from json import load as jsonload
from .Version import Version
class Error(Exception):
pass
class CmdLineIface:
"""A command line interface to compiled Cheetah template modul... | 31.144144 | 79 | 0.520972 |
38c28851ee8f94b13495907e32f3e446d51e1ce8 | 13,856 | py | Python | thicom/augment.py | djib2011/thicom | 736ecde5b74e2e9753e15a8c946cc0586dde9dfb | [
"MIT"
] | 4 | 2019-01-20T14:57:19.000Z | 2019-06-19T07:42:43.000Z | thicom/augment.py | djib2011/thicom | 736ecde5b74e2e9753e15a8c946cc0586dde9dfb | [
"MIT"
] | null | null | null | thicom/augment.py | djib2011/thicom | 736ecde5b74e2e9753e15a8c946cc0586dde9dfb | [
"MIT"
] | null | null | null | from __future__ import print_function, division
from tqdm import tqdm
import numpy as np
import sys
import os
if sys.version[0] == '2': input = raw_input
class Combine:
def __init__(self, parent_dir='.', window=3, ratio=0.75, verbose=False, inter_patient_combinations=True, save=False,
save_dire... | 48.961131 | 120 | 0.57448 |
38c2b4e5e08aa757659280eb597bb26786128d4d | 459 | py | Python | examples/web.py | msabramo/diesel | a1ed7ed0358d0fec8592e23aafc3b7ec167ab649 | [
"BSD-3-Clause"
] | 224 | 2015-01-03T06:33:05.000Z | 2021-11-22T03:19:02.000Z | examples/web.py | dowski/diesel | d9824e467805caf40e0ba21b88a27db38e64c352 | [
"BSD-3-Clause"
] | 12 | 2015-01-01T03:35:15.000Z | 2021-05-22T23:37:28.000Z | examples/web.py | dowski/diesel | d9824e467805caf40e0ba21b88a27db38e64c352 | [
"BSD-3-Clause"
] | 37 | 2015-01-04T01:47:55.000Z | 2022-03-03T02:04:15.000Z | from diesel.web import DieselFlask, request
app = DieselFlask(__name__)
@app.route("/")
def hello():
name = request.args.get('name', 'world')
return "hello, %s!" % name
@app.route("/err")
def err():
a = b
return "never happens.."
if __name__ == '__main__':
import diesel
def t():
whil... | 19.956522 | 44 | 0.594771 |
38c2c6ed4a125c62a24dd636bb5d6c508f8aeba6 | 12,658 | py | Python | test_frcnn_all_datagen.py | So-dal/Keras_FasterRCNN_CustomDataset | 254a3e7b32d025d5ccabf527052d4ef457b29563 | [
"Apache-2.0"
] | null | null | null | test_frcnn_all_datagen.py | So-dal/Keras_FasterRCNN_CustomDataset | 254a3e7b32d025d5ccabf527052d4ef457b29563 | [
"Apache-2.0"
] | null | null | null | test_frcnn_all_datagen.py | So-dal/Keras_FasterRCNN_CustomDataset | 254a3e7b32d025d5ccabf527052d4ef457b29563 | [
"Apache-2.0"
] | null | null | null | from __future__ import division
import os
import cv2
import numpy as np
import pandas as pd
import sys
import pickle
from optparse import OptionParser
import time
import tensorflow as tf
from keras_frcnn import config
from keras import backend as K
from keras.layers import Input
from keras.models import Model
from kera... | 37.672619 | 164 | 0.608232 |
38c2d525e0d2e86af428a560852b7f4130011f92 | 8,346 | py | Python | asposewordscloud/models/downsample_options_data.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/downsample_options_data.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/downsample_options_data.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="downsample_options_data.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy... | 39.742857 | 310 | 0.627127 |
38c33df8559f05399c9ffc5babd5a3c6456f56b1 | 3,505 | py | Python | ENCODE_biosample_reporter.py | T2DREAM/pyencoded-tools | 75fa636995bfc9fe181f9af490ce70dde3f6ce21 | [
"MIT"
] | null | null | null | ENCODE_biosample_reporter.py | T2DREAM/pyencoded-tools | 75fa636995bfc9fe181f9af490ce70dde3f6ce21 | [
"MIT"
] | null | null | null | ENCODE_biosample_reporter.py | T2DREAM/pyencoded-tools | 75fa636995bfc9fe181f9af490ce70dde3f6ce21 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: latin-1 -*-
import argparse
import os.path
import encodedcc
import sys
import csv
EPILOG = '''
Biosample reporter made for Cricket Sloan
Follows specific format as per her requests
Writes data to stdout for capture by user
For more details:
%(prog)s --help
'''
def getAr... | 36.134021 | 116 | 0.574037 |
38c3437123b4bdfdf3255e291d8064dc052ae93f | 135 | py | Python | examples/ex09_van_allen_probes_mag_ephem.py | Septaris/das2py | ee657afe706f4aec6e016b17b63a093ed271f7f6 | [
"MIT"
] | null | null | null | examples/ex09_van_allen_probes_mag_ephem.py | Septaris/das2py | ee657afe706f4aec6e016b17b63a093ed271f7f6 | [
"MIT"
] | null | null | null | examples/ex09_van_allen_probes_mag_ephem.py | Septaris/das2py | ee657afe706f4aec6e016b17b63a093ed271f7f6 | [
"MIT"
] | null | null | null | # das2 python module example 10
# Plotting Van Allen Probe A Magnetometer data by time with geomagnetic
# Ephemeris annotations
| 19.285714 | 73 | 0.77037 |
38c349237aaef53d3e9c23e30fa27635b922ebdb | 2,707 | py | Python | jenkins/databricks/run-build.py | NVnavkumar/spark-rapids | ed7de6e27fc82dff06eea3fda9db30dd37635103 | [
"Apache-2.0"
] | null | null | null | jenkins/databricks/run-build.py | NVnavkumar/spark-rapids | ed7de6e27fc82dff06eea3fda9db30dd37635103 | [
"Apache-2.0"
] | null | null | null | jenkins/databricks/run-build.py | NVnavkumar/spark-rapids | ed7de6e27fc82dff06eea3fda9db30dd37635103 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 49.218182 | 214 | 0.743997 |
38c359c9e9079c43fe7d3e11952c862fc607e547 | 250 | py | Python | src/kol/request/CharpaneRequest.py | thedufer/pykol | bad8ff4bf2f4bc6a7a5b6dbbd9333ef5aaf3432a | [
"BSD-3-Clause"
] | 1 | 2016-05-08T12:10:32.000Z | 2016-05-08T12:10:32.000Z | src/kol/request/CharpaneRequest.py | thedufer/pykol | bad8ff4bf2f4bc6a7a5b6dbbd9333ef5aaf3432a | [
"BSD-3-Clause"
] | null | null | null | src/kol/request/CharpaneRequest.py | thedufer/pykol | bad8ff4bf2f4bc6a7a5b6dbbd9333ef5aaf3432a | [
"BSD-3-Clause"
] | null | null | null | from GenericRequest import GenericRequest
class CharpaneRequest(GenericRequest):
"Requests the user's character pane."
def __init__(self, session):
super(CharpaneRequest, self).__init__(session)
self.url = session.serverURL + 'charpane.php'
| 27.777778 | 48 | 0.784 |
38c36f682ff5bc7f89e192cf9ff9cd1140d8236e | 16,783 | py | Python | tests/test_ec2/test_subnets.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 2 | 2018-01-29T14:50:38.000Z | 2018-05-12T10:45:31.000Z | tests/test_ec2/test_subnets.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 2 | 2021-03-31T20:15:51.000Z | 2021-12-13T20:50:52.000Z | tests/test_ec2/test_subnets.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 12 | 2017-09-06T22:11:15.000Z | 2021-05-28T17:22:31.000Z | from __future__ import unicode_literals
# Ensure 'assert_raises' context manager support for Python 2.6
import tests.backport_assert_raises # noqa
from nose.tools import assert_raises
import boto3
import boto
import boto.vpc
from boto.exception import EC2ResponseError
from botocore.exceptions import ParamValidationEr... | 37.545861 | 184 | 0.684502 |
38c39432a56c497a8a8f8f295300ef5a86aab3e0 | 5,225 | py | Python | vpp/src/model.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | vpp/src/model.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | vpp/src/model.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | #coding=utf-8
from pretrainedmodels.models import *
from torch import nn
import types
import sys
sys.path.append('../')
import torch.nn.functional as F
def get_net_inceptionv3(config):
model = inceptionv3(pretrained="imagenet")
model.aux_logits = False
model.Conv2d_1a_3x3.conv = nn.Conv2d(config.channels, ... | 33.280255 | 98 | 0.594258 |
38c39ef40ef2e0a01964910ac8351e343f97272b | 978 | py | Python | 2020/09/day9.py | jscpeterson/advent-of-code-2020 | 69dce1b8ac752a63c4b064e46f0f7218a96bceb8 | [
"Apache-2.0"
] | null | null | null | 2020/09/day9.py | jscpeterson/advent-of-code-2020 | 69dce1b8ac752a63c4b064e46f0f7218a96bceb8 | [
"Apache-2.0"
] | null | null | null | 2020/09/day9.py | jscpeterson/advent-of-code-2020 | 69dce1b8ac752a63c4b064e46f0f7218a96bceb8 | [
"Apache-2.0"
] | null | null | null | from itertools import combinations
def get_data(filepath):
return [int(line) for line in open(filepath).readlines()]
def solve1(filepath, preamble):
inputs = get_data(filepath)
for i, line in enumerate(inputs):
if i <= preamble:
continue
sums = set(sum(comb) for comb in combina... | 31.548387 | 79 | 0.572597 |
38c3baf244914bf5d450d4fc1d4ccd6f5beb1b14 | 6,086 | py | Python | eucaconsole/layout.py | ccassler/eucaconsole | c555728685b0d76eed65919037d442d97b6e9dd6 | [
"BSD-2-Clause"
] | null | null | null | eucaconsole/layout.py | ccassler/eucaconsole | c555728685b0d76eed65919037d442d97b6e9dd6 | [
"BSD-2-Clause"
] | null | null | null | eucaconsole/layout.py | ccassler/eucaconsole | c555728685b0d76eed65919037d442d97b6e9dd6 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013-2014 Eucalyptus Systems, Inc.
#
# Redistribution and use of this software 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,
# this... | 46.815385 | 122 | 0.696517 |
38c3ca37c27ceac6c43049e39a91a229b67d7e37 | 3,623 | py | Python | swa/spotifyoauthredis.py | esolitos/spori.fi | 557db12983705eb2fc86b3ca21383ca5e3aa58fd | [
"MIT"
] | 1 | 2021-03-02T18:58:59.000Z | 2021-03-02T18:58:59.000Z | swa/spotifyoauthredis.py | esolitos/spori.fi | 557db12983705eb2fc86b3ca21383ca5e3aa58fd | [
"MIT"
] | null | null | null | swa/spotifyoauthredis.py | esolitos/spori.fi | 557db12983705eb2fc86b3ca21383ca5e3aa58fd | [
"MIT"
] | null | null | null | import json
import logging
from os import getenv
import spotipy
from swa.utils import http_server_info, redis_client
oauth_grants = "playlist-read-private playlist-modify-public playlist-modify-private"
class UserDataStorage:
"""
Redis based data storage.
"""
_key_prefix = 'swa-user'
_client = ... | 31.504348 | 117 | 0.654706 |
38c3e5fbe74e24327fa1af0992d64eacc4cdca2a | 11,719 | py | Python | src/lib/atlas_utils/acl_model.py | patrick-ubc/Huawei_HiFly_Drone | 5dae1b56f49c2b86c3b852bbc5e3a63e84ccd490 | [
"Apache-2.0"
] | 1 | 2021-09-21T23:23:59.000Z | 2021-09-21T23:23:59.000Z | src/lib/atlas_utils/acl_model.py | patrick-ubc/Huawei_HiFly_Drone | 5dae1b56f49c2b86c3b852bbc5e3a63e84ccd490 | [
"Apache-2.0"
] | 8 | 2021-07-05T21:41:53.000Z | 2022-02-15T19:46:13.000Z | src/lib/atlas_utils/acl_model.py | patrick-ubc/Huawei_HiFly_Drone | 5dae1b56f49c2b86c3b852bbc5e3a63e84ccd490 | [
"Apache-2.0"
] | 4 | 2021-06-11T22:47:04.000Z | 2021-07-29T19:57:13.000Z | """
Copyright (R) @huawei.com, all rights reserved
-*- coding:utf-8 -*-
CREATED: 2020-6-04 20:12:13
MODIFIED: 2020-6-28 14:04:45
"""
import acl
import struct
import numpy as np
import datetime
import sys
import os
import atlas_utils.constants as const
import atlas_utils.utils as utils
from atlas_utils.acl_logger imp... | 37.321656 | 79 | 0.586142 |
38c41e75207b3ad7685ed36c7dfe488be0adbc4c | 664 | py | Python | manage.py | tinystacks/aws-docker-templates-django | b0d7d3b499c746721258c255a82f091c2a6fff60 | [
"BSD-3-Clause"
] | 1 | 2021-10-01T00:21:58.000Z | 2021-10-01T00:21:58.000Z | manage.py | tinystacks/aws-docker-templates-django | b0d7d3b499c746721258c255a82f091c2a6fff60 | [
"BSD-3-Clause"
] | null | null | null | manage.py | tinystacks/aws-docker-templates-django | b0d7d3b499c746721258c255a82f091c2a6fff60 | [
"BSD-3-Clause"
] | 2 | 2021-07-27T17:33:27.000Z | 2021-09-18T10:51:04.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'itemsAPP.settings')
try:
from django.core.management import execute_from_command_line
except Imp... | 28.869565 | 73 | 0.679217 |
38c42ae3a1f6125a1b9d891de897a133725a45ed | 56,524 | py | Python | neutron/tests/unit/db/test_l3_hamode_db.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/db/test_l3_hamode_db.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/db/test_l3_hamode_db.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# 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... | 46.029316 | 79 | 0.625009 |
38c462dc0cfaefeb5e70a0866165651509bf8b19 | 2,179 | py | Python | src/utils/credentials_manager.py | SecondThundeR/spotichecker | 05787bae85cb0d9c5832939c72bad526eb419705 | [
"MIT"
] | null | null | null | src/utils/credentials_manager.py | SecondThundeR/spotichecker | 05787bae85cb0d9c5832939c72bad526eb419705 | [
"MIT"
] | null | null | null | src/utils/credentials_manager.py | SecondThundeR/spotichecker | 05787bae85cb0d9c5832939c72bad526eb419705 | [
"MIT"
] | null | null | null | """Utils for helping with credentials management.
This module contains functions for managing credentials for
further use in script.
This file can also be imported as a module and contains the following functions:
* initial_configuration - manages initial configuration of .ini file
* credentials_checker - che... | 32.522388 | 84 | 0.673245 |
38c48cbcf75790dbfbdad9254c567bbd25ecfc2f | 694 | py | Python | src/examples/reference/beziertangent.py | agarwalnaimish/pyprocessing | 46695c379c95a7b874f76257c37f44f4b59d39e9 | [
"MIT"
] | 3 | 2018-04-23T17:33:02.000Z | 2021-01-05T04:52:36.000Z | src/examples/reference/beziertangent.py | agarwalnaimish/pyprocessing | 46695c379c95a7b874f76257c37f44f4b59d39e9 | [
"MIT"
] | 1 | 2018-04-23T17:37:37.000Z | 2018-04-23T17:37:37.000Z | src/examples/reference/beziertangent.py | agarwalnaimish/pyprocessing | 46695c379c95a7b874f76257c37f44f4b59d39e9 | [
"MIT"
] | 2 | 2019-01-16T06:34:52.000Z | 2019-10-15T14:03:07.000Z | from pyprocessing import *
noFill()
bezier(85, 20, 10, 10, 90, 90, 15, 80);
steps = 6;
fill(255);
for i in range(steps+1):
t = i / float(steps);
# Get the location of the point
x = bezierPoint(85, 10, 90, 15, t);
y = bezierPoint(20, 10, 90, 80, t);
# Get the tangent points
tx = bezierTangent(85, 10, 90, 15... | 25.703704 | 53 | 0.595101 |
38c4be03ce6d3a8b98bd49fbb8e34b8a576130fd | 3,420 | py | Python | src/patching_obsolete_DBXREFS.py | ENCODE-DCC/geo-submission | 84f4adabd786b3e3ffadb4dfab5af7866100d32d | [
"MIT"
] | 1 | 2021-03-13T11:32:32.000Z | 2021-03-13T11:32:32.000Z | src/patching_obsolete_DBXREFS.py | ENCODE-DCC/geo-submission | 84f4adabd786b3e3ffadb4dfab5af7866100d32d | [
"MIT"
] | null | null | null | src/patching_obsolete_DBXREFS.py | ENCODE-DCC/geo-submission | 84f4adabd786b3e3ffadb4dfab5af7866100d32d | [
"MIT"
] | 3 | 2016-04-08T20:25:48.000Z | 2020-10-28T20:25:03.000Z | import requests, json, sys
HEADERS = {'accept': 'application/json'}
POST_HEADERS = {'accept': 'application/json', 'Content-Type': 'application/json'}
#SERVER = "https://test.encodedcc.org/"
SERVER = "https://www.encodeproject.org/"
DEBUG_ON = False
def getKeyPair(path_to_key_pair_file, server_name):
keysf = open... | 28.032787 | 98 | 0.633626 |
38c512cd7a891e17c2737f16e1115b6794bef45b | 274 | py | Python | tests/generic/snapshots/snap_test_normalizer.py | intellihr/interlagos | f09651b460f7f6030fcb9299be45eb83d199f136 | [
"MIT"
] | null | null | null | tests/generic/snapshots/snap_test_normalizer.py | intellihr/interlagos | f09651b460f7f6030fcb9299be45eb83d199f136 | [
"MIT"
] | null | null | null | tests/generic/snapshots/snap_test_normalizer.py | intellihr/interlagos | f09651b460f7f6030fcb9299be45eb83d199f136 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from snapshottest import Snapshot
snapshots = Snapshot()
snapshots['test_normalize 1'] = [
'otherwise',
'ibm',
'intellihr',
'poc',
'unknown'
]
| 16.117647 | 42 | 0.649635 |
38c5541d8423375fe29dc114a4cf3d939b82dd99 | 270 | py | Python | pni_customization/pni_customization/doctype/shift_order_employee/shift_order_employee.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/shift_order_employee/shift_order_employee.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/shift_order_employee/shift_order_employee.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Jigar Tarpara and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class ShiftOrderEmployee(Document):
pass
| 24.545455 | 52 | 0.781481 |
38c56ed123d43d10af5d35b7fba832ccab1f5226 | 626 | py | Python | geektime/40_valid_parentheses.py | mnxzyw/py-algorithms | fa404b455d7fd551ac3a38704bda6353da2529c0 | [
"Apache-2.0"
] | null | null | null | geektime/40_valid_parentheses.py | mnxzyw/py-algorithms | fa404b455d7fd551ac3a38704bda6353da2529c0 | [
"Apache-2.0"
] | null | null | null | geektime/40_valid_parentheses.py | mnxzyw/py-algorithms | fa404b455d7fd551ac3a38704bda6353da2529c0 | [
"Apache-2.0"
] | null | null | null | class Solution:
def is_valid(self, s: str) -> bool:
stack = []
sample = dict({
"}": "{",
"]": "[",
")": "(",
})
for c in s:
if not stack:
stack.append(c)
else:
if c in sample:
... | 23.185185 | 48 | 0.338658 |
38c5a06670967b873ca83173a24afc053e2201af | 6,234 | py | Python | GUI/WifiMonitor/TriDisplay.py | gchinellato/XD | f6c0134030c5e229a7b9c2621311c5204aed77af | [
"MIT"
] | 1 | 2019-10-15T20:31:39.000Z | 2019-10-15T20:31:39.000Z | GUI/WifiMonitor/TriDisplay.py | gchinellato/XD | f6c0134030c5e229a7b9c2621311c5204aed77af | [
"MIT"
] | null | null | null | GUI/WifiMonitor/TriDisplay.py | gchinellato/XD | f6c0134030c5e229a7b9c2621311c5204aed77af | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# NOTE: This will not run on the Raspberry PI itself
# It is just a simple OpenGL program to visualise the orientation of the sensors
# Copyright @ http://blog.bitify.co.uk/2013/11/3d-opengl-visualisation-of-data-from.html
import pygame
import time
from OpenGL.GL import *
from OpenGL.GLU import *
i... | 31.969231 | 100 | 0.45717 |
38c5c78b116cd812c20dbfcca987ce8c026e2f2b | 29,043 | py | Python | pex/bin/pex.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 1 | 2020-06-27T23:28:35.000Z | 2020-06-27T23:28:35.000Z | pex/bin/pex.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | null | null | null | pex/bin/pex.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
"""
The pex.bin.pex utility builds PEX environments and .pex files specified by
sources, requirements and their dependencies.
"""
from __future__ import absolute_import, print_function
i... | 35.591912 | 100 | 0.663912 |
38c5e4e48d1f7e22be4ec22327b388d5ae7d9931 | 7,574 | py | Python | mnist_data.py | lukasz-poluchowicz/spnet | 999b6aabc91bd0bf42959a362f29bee4a2d717f0 | [
"MIT"
] | null | null | null | mnist_data.py | lukasz-poluchowicz/spnet | 999b6aabc91bd0bf42959a362f29bee4a2d717f0 | [
"MIT"
] | null | null | null | mnist_data.py | lukasz-poluchowicz/spnet | 999b6aabc91bd0bf42959a362f29bee4a2d717f0 | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torchvision
import torchvision.transforms.functional as TF
from torchvision import transforms
import capsule as cps
_default_num_workers = 0
"""How many subprocesses to use for data loading."""
class MnistData:
def __init__(self, root_folder):
"""
Args:
... | 40.287234 | 120 | 0.610378 |
38c62c0144e3b2b750a7f600baebcb223d36120f | 483 | py | Python | infostop/__init__.py | michielbakker/infostop | 6d9b7c319bff07c347735cab77ea0b85e7ad4a99 | [
"MIT"
] | null | null | null | infostop/__init__.py | michielbakker/infostop | 6d9b7c319bff07c347735cab77ea0b85e7ad4a99 | [
"MIT"
] | null | null | null | infostop/__init__.py | michielbakker/infostop | 6d9b7c319bff07c347735cab77ea0b85e7ad4a99 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
This package implements stop location detection using Infomap.
"""
from .deprecated import label_trace
from .deprecated import label_static_points
from .deprecated import label_network
from .models import Infostop
from .models import SpatialInfomap
from .visualize import p... | 26.833333 | 62 | 0.817805 |
38c6328243217deb919b32334bfa8a346aea3a07 | 1,574 | py | Python | bigml/tests/test_21_projects.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | 1 | 2021-08-30T20:18:38.000Z | 2021-08-30T20:18:38.000Z | bigml/tests/test_21_projects.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | null | null | null | bigml/tests/test_21_projects.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | 1 | 2021-08-30T20:18:40.000Z | 2021-08-30T20:18:40.000Z | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2015-2019 BigML
#
# 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 requi... | 30.862745 | 75 | 0.670902 |
38c633303422f660223b6a97632369ae4a7ba874 | 3,508 | py | Python | crankycoin/services/test/test_apiClient.py | Rajatkalsotra/crankycoin | 41c7ac6226842fb867b5eaa554c3604e998507c2 | [
"MIT"
] | 162 | 2017-07-11T11:27:10.000Z | 2022-03-17T14:24:12.000Z | crankycoin/services/test/test_apiClient.py | Rajatkalsotra/crankycoin | 41c7ac6226842fb867b5eaa554c3604e998507c2 | [
"MIT"
] | 14 | 2017-09-05T08:38:55.000Z | 2021-06-05T13:44:10.000Z | crankycoin/services/test/test_apiClient.py | Rajatkalsotra/crankycoin | 41c7ac6226842fb867b5eaa554c3604e998507c2 | [
"MIT"
] | 63 | 2017-07-16T13:35:14.000Z | 2022-01-09T21:49:38.000Z | from unittest import TestCase, skip
from mock import Mock, patch
from crankycoin import config
from crankycoin.repository.peers import Peers
from crankycoin.services.api_client import ApiClient, requests
class TestApiClient(TestCase):
def setUp(self):
self.mock_peers = Mock(Peers)
self.subject =... | 39.863636 | 91 | 0.705245 |
38c64a1df83c20a431acc039cc6bd618eef713cd | 4,652 | py | Python | tutorial/fl_to_xlsx.py | 1ber/muriki | 16187b5e69b27b8b90e8c9974c3607ca9f79d06f | [
"Apache-2.0"
] | null | null | null | tutorial/fl_to_xlsx.py | 1ber/muriki | 16187b5e69b27b8b90e8c9974c3607ca9f79d06f | [
"Apache-2.0"
] | null | null | null | tutorial/fl_to_xlsx.py | 1ber/muriki | 16187b5e69b27b8b90e8c9974c3607ca9f79d06f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import os
from muriki.DataProperty import *
from muriki.DataEntity import *
## $./fl_to_xlsx.py fixed_length.txt fixed_length.xlsx
@data_entity( )
class StockDay( object ):
def __init__( self):
pass
@auto_data_property( fl_start=2, fl_length=8, data_type=date
,... | 28.716049 | 102 | 0.654557 |
38c66b6c9d16d2df10c435011389d8b6af2e5b35 | 895 | py | Python | sdks/python/test/test_ExternalAppId.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_ExternalAppId.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_ExternalAppId.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 22.375 | 85 | 0.709497 |
38c68f58cd772e0e60332d04407d8aca1fc50f25 | 543 | py | Python | intake_esm/__init__.py | Ouranosinc/intake-esm | c39ba18acfb35e7fad1dcf5c0c9807b50800a1c0 | [
"Apache-2.0"
] | 20 | 2019-03-03T22:05:19.000Z | 2020-04-20T23:47:13.000Z | intake_esm/__init__.py | Ouranosinc/intake-esm | c39ba18acfb35e7fad1dcf5c0c9807b50800a1c0 | [
"Apache-2.0"
] | 145 | 2019-02-15T04:07:49.000Z | 2020-06-25T19:03:18.000Z | intake_esm/__init__.py | Ouranosinc/intake-esm | c39ba18acfb35e7fad1dcf5c0c9807b50800a1c0 | [
"Apache-2.0"
] | 18 | 2019-03-10T15:25:59.000Z | 2020-06-08T09:56:03.000Z | #!/usr/bin/env python3
# flake8: noqa
""" Top-level module for intake_esm. """
# Import intake first to avoid circular imports during discovery.
import intake
from pkg_resources import DistributionNotFound, get_distribution
from . import tutorial
from .core import esm_datastore
from .derived import DerivedVariableRegi... | 31.941176 | 65 | 0.790055 |
38c6e7353b46488b3218e2f0f2d82feb4dc6c5e4 | 10,766 | py | Python | autograd/numpy/numpy_jvps.py | kewlcoder/autograd | ce3d9a4ad067a14cbf6ae27ccbd75936ff253752 | [
"MIT"
] | 6,119 | 2015-03-10T03:55:58.000Z | 2022-03-31T11:54:19.000Z | autograd/numpy/numpy_jvps.py | kewlcoder/autograd | ce3d9a4ad067a14cbf6ae27ccbd75936ff253752 | [
"MIT"
] | 523 | 2015-03-10T11:59:23.000Z | 2022-03-05T15:31:59.000Z | autograd/numpy/numpy_jvps.py | kewlcoder/autograd | ce3d9a4ad067a14cbf6ae27ccbd75936ff253752 | [
"MIT"
] | 949 | 2015-03-11T20:04:20.000Z | 2022-03-31T12:13:11.000Z | from . import numpy_wrapper as anp
from .numpy_vjps import (untake, balanced_eq, match_complex, replace_zero,
dot_adjoint_0, dot_adjoint_1, tensordot_adjoint_0,
tensordot_adjoint_1, nograd_functions)
from autograd.extend import (defjvp, defjvp_argnum, def_linear, vspace... | 43.764228 | 113 | 0.60626 |
38c6f24e2b940be0edf656db26d62c9779d18983 | 2,288 | py | Python | sdk/digitaltwins/azure-digitaltwins-core/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/digitaltwins/azure-digitaltwins-core/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/digitaltwins/azure-digitaltwins-core/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | #!/usr/bin/env python
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
# pylint:disable=missing-docstring
import re
import os.path
from io import open
from setuptools import find_packages, setup
# Change the PACKAGE... | 32.225352 | 107 | 0.623252 |
38c6f883e4f4e5da0af277a9b39612fbd8f0f82c | 28,213 | py | Python | zarr/storage.py | mementum/zarr | 696cb9cd2648767c0236b6789bbab2f5b4a62a84 | [
"MIT"
] | 1 | 2019-01-03T05:34:52.000Z | 2019-01-03T05:34:52.000Z | zarr/storage.py | rabernat/zarr | 696cb9cd2648767c0236b6789bbab2f5b4a62a84 | [
"MIT"
] | null | null | null | zarr/storage.py | rabernat/zarr | 696cb9cd2648767c0236b6789bbab2f5b4a62a84 | [
"MIT"
] | 1 | 2018-04-13T16:58:58.000Z | 2018-04-13T16:58:58.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, division
from collections import MutableMapping
import os
import tempfile
import json
import zipfile
import shutil
import atexit
import numpy as np
from zarr.util import normalize_shape, normalize_chunks, normalize_order, \
normaliz... | 29.511506 | 79 | 0.570659 |
38c711f3872ab505c6721cf6b86c1d8c2184a2b6 | 2,521 | py | Python | alipay/aop/api/domain/AlipayEcoDocTemplateCreateModel.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/AlipayEcoDocTemplateCreateModel.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/AlipayEcoDocTemplateCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayEcoDocTemplateCreateModel(object):
def __init__(self):
self._content_md_5 = None
self._content_type = None
self._convert_to_pdf = None
self._file_name = None... | 29.313953 | 79 | 0.608885 |
38c73564907f35fea014030e068ae62792f1a413 | 3,766 | py | Python | docusign_rooms/models/user_for_update.py | docusign/docusign-rooms-python-client | eb8cfd0e487a87bc43d54bfa9de784eb170a40d3 | [
"MIT"
] | 2 | 2020-11-11T01:38:45.000Z | 2021-11-14T17:00:43.000Z | docusign_rooms/models/user_for_update.py | docusign/docusign-rooms-python-client | eb8cfd0e487a87bc43d54bfa9de784eb170a40d3 | [
"MIT"
] | null | null | null | docusign_rooms/models/user_for_update.py | docusign/docusign-rooms-python-client | eb8cfd0e487a87bc43d54bfa9de784eb170a40d3 | [
"MIT"
] | 1 | 2021-11-14T17:00:32.000Z | 2021-11-14T17:00:32.000Z | # coding: utf-8
"""
DocuSign Rooms API - v2
An API for an integrator to access the features of DocuSign Rooms # noqa: E501
OpenAPI spec version: v2
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import... | 30.128 | 103 | 0.595592 |
38c73f626fc488258888e3cf7ffba08ef8ef78bd | 1,965 | py | Python | pyram/load/config.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | pyram/load/config.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 6 | 2020-02-17T13:44:43.000Z | 2020-06-25T15:35:05.000Z | pyram/load/config.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | import numpy as np
class Config():
"""
All string variables except for path are stored in lowercsae.
"""
def __init__(self,
cosmo=True,
sim_type=None,
dmo=False,
longint=False,
sink_path='./',
snap_dir='./',... | 22.078652 | 65 | 0.544529 |
38c751a80ccc84f14c8464daa76e929a1561cece | 3,697 | py | Python | joj/horse/apis/admin.py | joint-online-judge/horse | ec08ecd0528f6a4fad3fa5f5932aef1495721437 | [
"MIT"
] | 6 | 2020-12-28T07:05:52.000Z | 2022-01-16T04:44:02.000Z | joj/horse/apis/admin.py | joint-online-judge/horse | ec08ecd0528f6a4fad3fa5f5932aef1495721437 | [
"MIT"
] | 56 | 2021-02-02T02:21:52.000Z | 2022-03-13T02:39:05.000Z | joj/horse/apis/admin.py | joint-online-judge/horse | ec08ecd0528f6a4fad3fa5f5932aef1495721437 | [
"MIT"
] | 3 | 2021-01-28T17:52:58.000Z | 2021-12-17T17:42:42.000Z | from fastapi import Depends
from sqlmodel import select
from joj.horse import models, schemas
from joj.horse.models.permission import DefaultRole
from joj.horse.schemas.auth import Authentication
from joj.horse.schemas.base import StandardListResponse
from joj.horse.utils.errors import ForbiddenError
from joj.horse.ut... | 33.917431 | 88 | 0.72356 |
38c755a7d687bfb6b4adb96b6047c638eba3f5db | 3,242 | py | Python | src/crawl/unicrawl/spiders/heldb_courses.py | VictorLeP/Education4Climate | 7d419c96c759da2215504ac9051dd6f61d940b96 | [
"MIT"
] | 4 | 2021-09-24T16:17:57.000Z | 2022-01-31T17:32:16.000Z | src/crawl/unicrawl/spiders/heldb_courses.py | VictorLeP/Education4Climate | 7d419c96c759da2215504ac9051dd6f61d940b96 | [
"MIT"
] | 23 | 2021-08-02T07:38:47.000Z | 2022-02-11T14:16:56.000Z | src/crawl/unicrawl/spiders/heldb_courses.py | VictorLeP/Education4Climate | 7d419c96c759da2215504ac9051dd6f61d940b96 | [
"MIT"
] | 3 | 2021-11-20T06:06:44.000Z | 2022-03-11T07:44:43.000Z | # -*- coding: utf-8 -*-
from abc import ABC
from pathlib import Path
import pandas as pd
import scrapy
from src.crawl.utils import cleanup
from settings import YEAR, CRAWLING_OUTPUT_FOLDER
BASE_URL = "https://www.heldb.be/ficheue/{}"
PROG_DATA_PATH = Path(__file__).parent.absolute().joinpath(
f'../../../../{CRAW... | 36.840909 | 115 | 0.572486 |
38c78e704123ac9078086bbfd26f708119220a6b | 3,153 | py | Python | django_extended/forms/date.py | dalou/django-extended | a7ba952ea7089cfb319b4615ae098579c9ab14f9 | [
"BSD-3-Clause"
] | 1 | 2015-12-14T17:16:04.000Z | 2015-12-14T17:16:04.000Z | django_extended/forms/date.py | dalou/django-extended | a7ba952ea7089cfb319b4615ae098579c9ab14f9 | [
"BSD-3-Clause"
] | null | null | null | django_extended/forms/date.py | dalou/django-extended | a7ba952ea7089cfb319b4615ae098579c9ab14f9 | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
import time
import re
import os
import logging
from django.conf import settings
from django import forms
from django.core.validators import EMPTY_VALUES
from django.template import Context
from django.forms.widgets import FileInput as OriginalFileInput
from django.utils.encoding import force_unicode... | 30.317308 | 83 | 0.584206 |
38c7900e078199fdc4589b718907b880c53f4b6f | 13,991 | py | Python | board/tests.py | shift-board/shiftboard | 1e49a93d70a18a1f799d5bf2101ca67eb79031a9 | [
"MIT"
] | 1 | 2021-04-25T18:27:22.000Z | 2021-04-25T18:27:22.000Z | board/tests.py | shift-board/shiftboard | 1e49a93d70a18a1f799d5bf2101ca67eb79031a9 | [
"MIT"
] | 16 | 2021-04-14T00:44:32.000Z | 2021-05-02T22:23:01.000Z | board/tests.py | shift-board/shiftboard | 1e49a93d70a18a1f799d5bf2101ca67eb79031a9 | [
"MIT"
] | null | null | null | import uuid
from django.contrib.auth.models import User
from django.test import TestCase, tag
from django.urls import reverse
from django.utils import timezone
from board.models import Board, Image, Post
from board.views import get_post_dict
# Create your tests here.
class BoardModelTests(TestCase):
"""
A... | 32.765808 | 130 | 0.532557 |
38c7a28d97ab411810f68237d19e455f16a9aca5 | 7,802 | py | Python | third_party/fid_tf/classifier_metrics_numpy.py | kpandey008/DiffuseVAE | b505894668ac1e4ef9a66ec220f5b40f5c83629e | [
"MIT"
] | 90 | 2022-01-04T05:53:13.000Z | 2022-03-31T02:04:46.000Z | third_party/fid_tf/classifier_metrics_numpy.py | kpandey008/DiffuseVAE | b505894668ac1e4ef9a66ec220f5b40f5c83629e | [
"MIT"
] | 2 | 2022-01-28T04:15:40.000Z | 2022-02-17T13:47:54.000Z | third_party/fid_tf/classifier_metrics_numpy.py | kpandey008/DiffuseVAE | b505894668ac1e4ef9a66ec220f5b40f5c83629e | [
"MIT"
] | 5 | 2022-01-13T08:25:11.000Z | 2022-02-09T18:40:37.000Z | """
Direct NumPy port of tfgan.eval.classifier_metrics
"""
# CREDITS: https://github.com/hojonathanho/diffusion/blob/1e0dceb3b3495bbe19116a5e1b3596cd0706c543/diffusion_tf/tpu_utils/classifier_metrics_numpy.py
import numpy as np
import scipy.special
def log_softmax(x, axis):
return x - scipy.special.logsumexp(x, ... | 43.104972 | 149 | 0.696232 |
38c7b56acc93c7fa82179f588c0f42b09de3c590 | 10,422 | py | Python | txdav/carddav/datastore/file.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | txdav/carddav/datastore/file.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | txdav/carddav/datastore/file.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | # -*- test-case-name: txdav.carddav.datastore.test.test_file -*-
##
# Copyright (c) 2010-2015 Apple Inc. 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.ap... | 30.652941 | 121 | 0.663596 |
38c7b6e2614e5ef76ed0fdab1339af3909799977 | 10,305 | py | Python | mmgen/ops/stylegan3/ops/bias_act.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | mmgen/ops/stylegan3/ops/bias_act.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | mmgen/ops/stylegan3/ops/bias_act.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this sof... | 33.457792 | 79 | 0.568559 |
38c7cc089cc76c7351109d66d8a5e44e142fece4 | 8,566 | py | Python | common/audio.py | yaatehr/ChordShed | 5b04fd086792898bf41dd9a88f4ab1b1656a3f9e | [
"MIT"
] | null | null | null | common/audio.py | yaatehr/ChordShed | 5b04fd086792898bf41dd9a88f4ab1b1656a3f9e | [
"MIT"
] | null | null | null | common/audio.py | yaatehr/ChordShed | 5b04fd086792898bf41dd9a88f4ab1b1656a3f9e | [
"MIT"
] | null | null | null | #####################################################################
#
# audio.py
#
# Copyright (c) 2015, Eran Egozy
#
# Released under the MIT License (http://opensource.org/licenses/MIT)
#
#####################################################################
import sys
sys.path.append('.')
sys.path.append('..')
im... | 33.592157 | 101 | 0.572729 |
38c7d11fff89538fed6e75e2cdea8198e7cab24d | 980 | py | Python | testing/conftest.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | testing/conftest.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | testing/conftest.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""Alta3 Research | controlling pytest behaviors with conftest.py"""
import pytest
import requests
# functions and methods are called callable as they can be called.
# in python a line preceded by an @ sign is called a "decorator"
# think of a package wrapped in a gift...
# the decorator doesn't a... | 42.608696 | 91 | 0.744898 |
38c7d5ad0403aa5a1e26c03d812d76042012247f | 744 | py | Python | Leetcode/medium/largest-number.py | jen-sjen/data-structures-basics-leetcode | addac32974b16e0a37aa60c210ab7820b349b279 | [
"MIT"
] | 6 | 2021-07-29T03:26:20.000Z | 2022-01-28T15:11:45.000Z | Leetcode/medium/largest-number.py | jen-sjen/data-structures-basics-leetcode | addac32974b16e0a37aa60c210ab7820b349b279 | [
"MIT"
] | 2 | 2021-09-30T09:47:23.000Z | 2022-01-31T03:08:24.000Z | Leetcode/medium/largest-number.py | jen-sjen/data-structures-basics-leetcode | addac32974b16e0a37aa60c210ab7820b349b279 | [
"MIT"
] | 5 | 2021-08-10T06:41:11.000Z | 2022-01-29T17:50:20.000Z | """
# LARGEST NUMBER
Given a list of non-negative integers nums, arrange them such that they form the largest number.
Note: The result may be very large, so you need to return a string instead of an integer.
Example 1:
Input: nums = [10,2]
Output: "210"
Example 2:
Input: nums = [3,30,34,5,9]
Output: "9534330"
E... | 17.302326 | 96 | 0.635753 |
38c7dc50b7f6c2d7093a2914656df30e010801bb | 7,679 | py | Python | examples/utils.py | simonr98/Reinforcement-Learning-with-Videos | e40cec6b8d817276375e940696b290fc4e1e8bc7 | [
"MIT"
] | 25 | 2020-12-02T23:13:29.000Z | 2022-02-25T07:57:30.000Z | examples/utils.py | simonr98/Reinforcement-Learning-with-Videos | e40cec6b8d817276375e940696b290fc4e1e8bc7 | [
"MIT"
] | 8 | 2020-12-12T14:11:58.000Z | 2021-12-10T20:06:04.000Z | examples/utils.py | simonr98/Reinforcement-Learning-with-Videos | e40cec6b8d817276375e940696b290fc4e1e8bc7 | [
"MIT"
] | 8 | 2020-12-25T19:43:15.000Z | 2021-10-13T02:53:58.000Z | import multiprocessing
import argparse
from distutils.util import strtobool
import json
from ray.tune import sample_from
import rl_with_videos.algorithms.utils as alg_utils
import rl_with_videos.environments.utils as env_utils
from rl_with_videos.misc.utils import datetimestamp
DEFAULT_UNIVERSE = 'gym'
DEFAULT_DOMA... | 31.600823 | 80 | 0.596692 |
38c7ff56cec6d3533a3cd1b4e83d96481b0c5a23 | 4,875 | py | Python | examples/consume-ges-meson/conanfile.py | ulricheck/gst-conan | 5758a0fed73b213e9f9977fee9c1560bf397549c | [
"Apache-2.0"
] | null | null | null | examples/consume-ges-meson/conanfile.py | ulricheck/gst-conan | 5758a0fed73b213e9f9977fee9c1560bf397549c | [
"Apache-2.0"
] | null | null | null | examples/consume-ges-meson/conanfile.py | ulricheck/gst-conan | 5758a0fed73b213e9f9977fee9c1560bf397549c | [
"Apache-2.0"
] | 1 | 2021-02-13T19:50:07.000Z | 2021-02-13T19:50:07.000Z | # These parameters should match the conan packages that you have built using `gst-conan create ...`
GST_CONAN_VERSION="1.14.4"
GST_CONAN_USER="my_conan_user"
GST_CONAN_CHANNEL="my_conan_channel"
from conans import ConanFile, Meson
import glob
import json
import os
import shutil
class ExampleConsumeGesMeson(ConanFile... | 42.391304 | 125 | 0.618667 |
38c8340968297ab73985c3609a29fb00c46ec134 | 5,561 | py | Python | experiments/ashvin/rfeatures/rlbench/open_drawer_vision/state_joint_angles1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/rfeatures/rlbench/open_drawer_vision/state_joint_angles1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/rfeatures/rlbench/open_drawer_vision/state_joint_angles1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import gym
import rlkit.torch.pytorch_util as ptu
from rlkit.data_management.obs_dict_replay_buffer import ObsDictRelabelingBuffer
from rlkit.exploration_strategies.base import \
PolicyWrappedWithExplorationStrategy
from rlkit.exploration_strategies.gaussian_and_epislon import \
GaussianAndEpislonStrategy
from... | 35.647436 | 130 | 0.654199 |
38c835f0cf726779b202e444e6bbc4f17a43c489 | 1,188 | py | Python | publication_backbone/plugins/picture/models.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | 6 | 2016-05-19T14:59:51.000Z | 2020-03-19T10:08:29.000Z | publication_backbone/plugins/picture/models.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | null | null | null | publication_backbone/plugins/picture/models.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
from future.utils import python_2_unicode_compatible
from future.builtins import str
from django.utils.translation import ugettext_lazy as _
from fluent_contents.extensions import PluginImageField, PluginUrlField
from fluent_contents.models.db import ContentItem
from django.conf import sett... | 36 | 171 | 0.762626 |
38c88dc6877325edca850b5c8ea5e2a9025cb7b3 | 457 | py | Python | bflib/items/armor/base.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | bflib/items/armor/base.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | bflib/items/armor/base.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from bflib import units
from bflib.items import listing
from bflib.items.base import Item
from bflib.keywords.items import WearLocation
@listing.register_type
class Armor(Item):
armor_class = 0
armor_type = None
wear_locations = WearLocation,
weight = units.Pound
@listing.register_type
class Clothin... | 16.321429 | 45 | 0.7593 |
38c8a6cd200373420856c99338b8dbf1dbc21033 | 6,353 | py | Python | atom/nucleus/python/test/test_account_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_account_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_account_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import nucleus_api
from nu... | 25.930612 | 73 | 0.662679 |
38c8c65d90eda3a6afeb85e696c6d144774468db | 957 | py | Python | liveness.py | kavinyao/Liu | cc012daff19d6d1dad8d088a255ece7092c4c3b1 | [
"MIT"
] | 1 | 2015-02-05T08:33:21.000Z | 2015-02-05T08:33:21.000Z | liveness.py | kavinyao/Liu | cc012daff19d6d1dad8d088a255ece7092c4c3b1 | [
"MIT"
] | null | null | null | liveness.py | kavinyao/Liu | cc012daff19d6d1dad8d088a255ece7092c4c3b1 | [
"MIT"
] | null | null | null | from liu import *
# construct CFG
cfg = ControlFlowGraph()
n2 = cfg.new_block(Assign(Var('i'), Subtract(Var('m'), Const('1'))))
n3 = cfg.new_block(Assign(Var('j'), Var('n')))
n4 = cfg.new_block(Assign(Var('a'), Var('u1')))
n5 = cfg.new_block(Assign(Var('i'), Add(Var('i'), Const('1'))))
n6 = cfg.new_block(Assign(Var('j... | 29.90625 | 68 | 0.657262 |
38c8c81f5f8321bf93c806186e06d6e775caa706 | 5,788 | py | Python | siliconcompiler/scheduler.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | 1 | 2022-03-10T03:56:49.000Z | 2022-03-10T03:56:49.000Z | siliconcompiler/scheduler.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | null | null | null | siliconcompiler/scheduler.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | null | null | null | import base64
import os
import shlex
import subprocess
import time
###########################################################################
def _deferstep(chip, step, index, active, error):
'''
Helper method to run an individual step on a slurm cluster.
If a base64-encoded 'decrypt_key' is set in the Ch... | 43.518797 | 91 | 0.555287 |
38c8ea06442ab0d07fb1003e02f4d6829c35e9f1 | 202 | py | Python | tftbot/__init__.py | adithyabsk/roambot | 6616d5848bc6a485cf1a86caccfe47b6e38fe063 | [
"MIT"
] | 4 | 2022-01-06T21:59:53.000Z | 2022-03-11T20:04:11.000Z | tftbot/__init__.py | adithyabsk/tftbot | 842e14baf7818b9d0026e6b452f536bec2a326d2 | [
"MIT"
] | null | null | null | tftbot/__init__.py | adithyabsk/tftbot | 842e14baf7818b9d0026e6b452f536bec2a326d2 | [
"MIT"
] | null | null | null | """A Roam Research Twitter that tweets out a random tweet from a roam graph."""
from tftbot.bot import ObsidianTwitterBot, RoamTwitterBot
__all__ = [
"RoamTwitterBot",
"ObsidianTwitterBot",
]
| 22.444444 | 79 | 0.737624 |
38c8ef6c63406a773f2e81190dbbb116bb7ce916 | 5,862 | py | Python | context_exploration/evaluation/quadrant_pendulum_evaluation.py | EmbodiedVision/explorethecontext | d4bd0d4af980de16ede642c987878a55e089f736 | [
"MIT"
] | null | null | null | context_exploration/evaluation/quadrant_pendulum_evaluation.py | EmbodiedVision/explorethecontext | d4bd0d4af980de16ede642c987878a55e089f736 | [
"MIT"
] | null | null | null | context_exploration/evaluation/quadrant_pendulum_evaluation.py | EmbodiedVision/explorethecontext | d4bd0d4af980de16ede642c987878a55e089f736 | [
"MIT"
] | null | null | null | """
Copyright 2021 Max-Planck-Gesellschaft
Code author: Jan Achterhold, jan.achterhold@tuebingen.mpg.de
Embodied Vision Group, Max Planck Institute for Intelligent Systems, Tübingen
This source code is licensed under the MIT license found in the
LICENSE.md file in the root directory of this source tree or at
https://o... | 34.280702 | 87 | 0.636643 |
38c8efe1c8d68d8bdf78a787614dbe1951d9566b | 10,064 | py | Python | tsfs/TSF_Model_Prototype.py | nate-russell/timeseries_viz_demo | 4ab6a79bd368999b694086124c737a269739d4d5 | [
"MIT"
] | null | null | null | tsfs/TSF_Model_Prototype.py | nate-russell/timeseries_viz_demo | 4ab6a79bd368999b694086124c737a269739d4d5 | [
"MIT"
] | null | null | null | tsfs/TSF_Model_Prototype.py | nate-russell/timeseries_viz_demo | 4ab6a79bd368999b694086124c737a269739d4d5 | [
"MIT"
] | null | null | null | '''
This page has everything you need to make your own Time Series Forecasting Model that conforms to the API!
TSF_MODEL -> The inherited class and description
test_TSF_Subclass -> Handy function to test if you TSF_Model sublcass is working. Check out __main__ to see it in action.
fit_method and forecast_method -> m... | 36.071685 | 172 | 0.579988 |
38c91db3e7dd7f6c47ef5aca5edef2088fe99c22 | 2,191 | py | Python | porcupine/plugins/run/common.py | Akuli/editor | cf98c538e75a07d825f9066e25a3752fdf7c3c29 | [
"MIT"
] | 1 | 2021-07-28T10:09:26.000Z | 2021-07-28T10:09:26.000Z | porcupine/plugins/run/common.py | Akuli/editor | cf98c538e75a07d825f9066e25a3752fdf7c3c29 | [
"MIT"
] | null | null | null | porcupine/plugins/run/common.py | Akuli/editor | cf98c538e75a07d825f9066e25a3752fdf7c3c29 | [
"MIT"
] | null | null | null | from __future__ import annotations
import dataclasses
import os
from pathlib import Path
from typing import Dict, List, Optional
from porcupine import tabs, utils
@dataclasses.dataclass
class Command:
command_format: str
cwd_format: str
external_terminal: bool
substitutions: Dict[str, str]
def ... | 30.430556 | 93 | 0.641716 |
38c92e67974a64ff324eba730aae250364952028 | 994 | py | Python | marqeta/response_models/msa_order_update_request.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 21 | 2019-04-12T09:02:17.000Z | 2022-02-18T11:39:06.000Z | marqeta/response_models/msa_order_update_request.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 1 | 2020-07-22T21:27:40.000Z | 2020-07-23T17:38:43.000Z | marqeta/response_models/msa_order_update_request.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 10 | 2019-05-08T14:20:37.000Z | 2021-09-20T18:09:26.000Z | from datetime import datetime, date
from marqeta.response_models import datetime_object
import json
import re
class MsaOrderUpdateRequest(object):
def __init__(self, json_response):
self.json_response = json_response
def __str__(self):
return json.dumps(self.json_response, default=self.json_s... | 26.864865 | 107 | 0.694165 |
38c93fc26ffd7ae446fda45f91933392f6712e06 | 1,829 | py | Python | examples/fox/test.py | probcomp/loom | 825188eae76e7106a6959f6a18312b0aa3338f83 | [
"BSD-3-Clause"
] | 2 | 2019-10-25T17:57:22.000Z | 2020-07-14T02:37:34.000Z | examples/fox/test.py | probcomp/loom | 825188eae76e7106a6959f6a18312b0aa3338f83 | [
"BSD-3-Clause"
] | 1 | 2019-12-13T03:08:05.000Z | 2019-12-13T03:08:05.000Z | examples/fox/test.py | probcomp/loom | 825188eae76e7106a6959f6a18312b0aa3338f83 | [
"BSD-3-Clause"
] | 1 | 2020-06-22T11:23:43.000Z | 2020-06-22T11:23:43.000Z | # Copyright (c) 2014, Salesforce.com, Inc. All rights reserved.
# Copyright (c) 2015, Google, Inc.
#
# 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
... | 43.547619 | 74 | 0.761618 |
38c96b7f8e94eda74d32d79cda7a40dbe6a5c95b | 11,898 | py | Python | lightdlf_old/cpu/core.py | sgaseretto/lightdlf | 3c05127976da87477c0984766d56649965b912ba | [
"Apache-2.0"
] | 1 | 2019-12-10T17:23:40.000Z | 2019-12-10T17:23:40.000Z | lightdlf_old/cpu/core.py | sgaseretto/lightdlf | 3c05127976da87477c0984766d56649965b912ba | [
"Apache-2.0"
] | 2 | 2021-05-20T11:53:03.000Z | 2021-09-27T23:59:55.000Z | lightdlf_old/cpu/core.py | sgaseretto/lightdlf | 3c05127976da87477c0984766d56649965b912ba | [
"Apache-2.0"
] | null | null | null | import numpy as np
class Tensor(object):
def __init__(self, data,
autograd=False,
creators=None,
creation_op=None,
id=None):
'''
Inicializa un tensor utilizando numpy
@data: una lista de numeros
@creators: lista ... | 38.7557 | 106 | 0.517902 |
38c983a2f22ce03acc0525c9dd2c53e03f1a4928 | 6,590 | py | Python | tensormonk/layers/condconv2d.py | Tensor46/TensorMONK | 67617d3fdf8fde072ba9cab42de7d67c79b17494 | [
"MIT"
] | 29 | 2018-07-06T23:57:23.000Z | 2022-03-08T20:38:57.000Z | tensormonk/layers/condconv2d.py | sparupat/TensorMONK | 7a2699a28299a89b186e0eb17ed6e9feaea5429e | [
"MIT"
] | 3 | 2018-12-14T22:21:26.000Z | 2020-06-19T02:13:34.000Z | tensormonk/layers/condconv2d.py | sparupat/TensorMONK | 7a2699a28299a89b186e0eb17ed6e9feaea5429e | [
"MIT"
] | 8 | 2018-07-06T23:58:03.000Z | 2021-04-12T01:35:54.000Z | """ TensorMONK :: layers :: CondConv2d """
__all__ = ["CondConv2d"]
import torch
import torch.nn as nn
import torch.nn.functional as F
class CondConv2d(torch.nn.Module):
r"""Conditional Convolution (`"CondConv: Conditionally Parameterized
Convolutions for Efficient Inference"
<https://arxiv.org/pdf/1904... | 43.355263 | 79 | 0.54431 |
38c99c280c3c88f47abfbba617d4edbb98f4e042 | 4,378 | py | Python | galpy/snapshot/snapshotMovies.py | turnergarrow/galpy | 7132eddbf2dab491fe137790e31eacdc604b0534 | [
"BSD-3-Clause"
] | 1 | 2019-02-07T10:58:17.000Z | 2019-02-07T10:58:17.000Z | galpy/snapshot/snapshotMovies.py | BurcuAkbulut/galpy | cabb42bef3b4f88a2f593cdb123452cd41451db3 | [
"BSD-3-Clause"
] | null | null | null | galpy/snapshot/snapshotMovies.py | BurcuAkbulut/galpy | cabb42bef3b4f88a2f593cdb123452cd41451db3 | [
"BSD-3-Clause"
] | 1 | 2020-07-30T06:14:31.000Z | 2020-07-30T06:14:31.000Z | #Functions to turn snapshots into movies
from __future__ import print_function
import re
import os, os.path
import tempfile
import shutil
import subprocess
import math as m
import galpy.util.bovy_plot as bovy_plot
from Snapshot import *
def snapshotToMovie(snap,filename,*args,**kwargs):
"""
NAME:
snapsh... | 29.38255 | 77 | 0.520101 |
38c9a61bb50a0c1eb39868bd554a4bce18e259c5 | 157,683 | py | Python | core/tests/test_utils.py | Sneakyhydra/oppia | 3685a209947fe273ed1767415020abcaa20d25b0 | [
"Apache-2.0"
] | 2 | 2022-03-27T23:15:17.000Z | 2022-03-27T23:15:32.000Z | core/tests/test_utils.py | Sneakyhydra/oppia | 3685a209947fe273ed1767415020abcaa20d25b0 | [
"Apache-2.0"
] | null | null | null | core/tests/test_utils.py | Sneakyhydra/oppia | 3685a209947fe273ed1767415020abcaa20d25b0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | 41.192006 | 114 | 0.62462 |
38c9a7e70be1b5f3dfe241af4367041c3bf50726 | 1,685 | py | Python | gwlfe/Input/WaterBudget/AvGroundWater.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | null | null | null | gwlfe/Input/WaterBudget/AvGroundWater.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 6 | 2018-07-24T22:46:28.000Z | 2018-07-29T19:13:09.000Z | gwlfe/Input/WaterBudget/AvGroundWater.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 1 | 2018-07-24T18:22:01.000Z | 2018-07-24T18:22:01.000Z | from numpy import sum
from numpy import zeros
from gwlfe.Input.WaterBudget.GroundWatLE_1 import GroundWatLE_1
from gwlfe.Input.WaterBudget.GroundWatLE_1 import GroundWatLE_1_f
from gwlfe.Memoization import memoize
def AvGroundWater(NYrs, DaysMonth, Temp, InitSnow_0, Prec, NRur, NUrb, Area, CNI_0,
A... | 52.65625 | 119 | 0.627893 |
38c9c9b0e253c1b7d3d2e2f6fa2a336f688d97f5 | 8,516 | py | Python | Housekeeping.py | sanjaythakur/Uncertainty-aware-Imitation-Learning-on-Multiple-Tasks-using-Bayesian-Neural-Networks | dc3740d341ce4f34c1e4b309d9afa61acb6f58e9 | [
"Apache-2.0"
] | 8 | 2018-10-18T16:01:57.000Z | 2020-05-16T22:42:39.000Z | Housekeeping.py | sanjaythakur/Uncertainty-aware-Imitation-Learning-on-Multiple-Tasks-using-Bayesian-Neural-Networks | dc3740d341ce4f34c1e4b309d9afa61acb6f58e9 | [
"Apache-2.0"
] | null | null | null | Housekeeping.py | sanjaythakur/Uncertainty-aware-Imitation-Learning-on-Multiple-Tasks-using-Bayesian-Neural-Networks | dc3740d341ce4f34c1e4b309d9afa61acb6f58e9 | [
"Apache-2.0"
] | 3 | 2019-02-18T02:28:56.000Z | 2019-10-24T09:17:41.000Z | import numpy as np
############## Specific to MuJoCo tasks only #################################
#ALL_MUJOCO_TASK_IDENTITIES = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19])
ALL_MUJOCO_TASK_IDENTITIES = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
NUMBER_VALIDATION_TRIALS = 10
DEMONSTR... | 37.515419 | 215 | 0.733091 |
38c9ff1c81e8461ca8627dbda3cf47a4873942e7 | 3,181 | py | Python | lib/galaxy/__init__.py | bioinfo-center-pasteur-fr/galaxy-pasteur | 0be2c0194ce9615d9efa08affc0e6735b656855a | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/__init__.py | bioinfo-center-pasteur-fr/galaxy-pasteur | 0be2c0194ce9615d9efa08affc0e6735b656855a | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/__init__.py | bioinfo-center-pasteur-fr/galaxy-pasteur | 0be2c0194ce9615d9efa08affc0e6735b656855a | [
"CC-BY-3.0"
] | null | null | null | """
Galaxy root package -- this is a namespace package.
"""
__import__( "pkg_resources" ).declare_namespace( __name__ )
import re
import os
import sys
import platform
import pkg_resources
# MAREUIL
# patch get_platform() for better ABI recognition
def _get_build_platform():
plat = pkg_resources._get_build_platfo... | 33.135417 | 131 | 0.653568 |
38ca28033d7952c2d76b44f172648edb3f921796 | 4,491 | py | Python | boozo/cli.py | skillplot/pyboozo | 8013704b0d50bbb5a578fbf3a19d3d478d8b6816 | [
"Apache-2.0"
] | null | null | null | boozo/cli.py | skillplot/pyboozo | 8013704b0d50bbb5a578fbf3a19d3d478d8b6816 | [
"Apache-2.0"
] | null | null | null | boozo/cli.py | skillplot/pyboozo | 8013704b0d50bbb5a578fbf3a19d3d478d8b6816 | [
"Apache-2.0"
] | null | null | null | ## Copyright (c) 2020 mangalbhaskar.
"""Create the required project structure and the environment configurations."""
__author__ = 'mangalbhaskar'
import os
import pathlib
import shutil
import sys
import click
# this = sys.modules[__name__]
this_dir = os.path.dirname(__file__)
from .boot._log_ import log
from .bo... | 33.766917 | 118 | 0.656424 |
38ca3986905cad11b5a8e2c746395884889a04af | 2,560 | py | Python | swift/codegen/generators/trapgen.py | RasmusWL/ql | 298f4ab899dcb12414d4fd5112956b82effd140f | [
"MIT"
] | null | null | null | swift/codegen/generators/trapgen.py | RasmusWL/ql | 298f4ab899dcb12414d4fd5112956b82effd140f | [
"MIT"
] | 4 | 2022-02-17T06:25:43.000Z | 2022-02-23T15:55:30.000Z | swift/codegen/generators/trapgen.py | jketema/codeql | 09578015886a0c59c2d21c9d09d565742803a5a4 | [
"MIT"
] | null | null | null | """
C++ trap entry generation
`generate(opts, renderer)` will generate `TrapTags.h` (for types of labels) and `TrapEntries.h` (for trap emission) out
of a dbscheme file.
Each table in the `dbscheme` gets a corresponding `struct` defined in `TrapEntries.h` with a field for each column and
an appropriate streaming oper... | 26.947368 | 119 | 0.641797 |
38ca4c19c9aab0ffc587350d39634ab5cf7caab7 | 14,631 | py | Python | tbonlineproject/post/migrations/0001_initial.py | nathangeffen/tbonline3 | 1b8a3af8d2dc1ee8083ca6638d025e94bd98f253 | [
"MIT"
] | null | null | null | tbonlineproject/post/migrations/0001_initial.py | nathangeffen/tbonline3 | 1b8a3af8d2dc1ee8083ca6638d025e94bd98f253 | [
"MIT"
] | 3 | 2021-06-08T23:57:13.000Z | 2022-01-13T03:42:01.000Z | tbonlineproject/post/migrations/0001_initial.py | nathangeffen/tbonline-2 | 0d5869197e66a0057fa07cb99f21dde7f5b47c30 | [
"MIT"
] | null | null | null | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'BasicPost'
db.create_table('post_basicpost', (
('id', self.gf('django.db.model... | 70.341346 | 173 | 0.593466 |
38ca500516bd4490b7f990c182c3a3f9b8a13765 | 11,448 | py | Python | vyperlogix/wx/ObjectAttrValidator2.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/wx/ObjectAttrValidator2.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/wx/ObjectAttrValidator2.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | # ObjectAttrValidator.py
#
# ------------------------------------------------------------
# Copyright 2004 by Samuel Reynolds. All rights reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyr... | 27.192399 | 89 | 0.700384 |
38ca5e352fe00d4012432a8eb12128457bde0260 | 2,730 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/help/edit_user_info.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/functions/help/edit_user_info.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/help/edit_user_info.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... | 32.5 | 121 | 0.623077 |
38ca9babdef7af10d4febd2c5c77bba038d81731 | 458 | py | Python | docsim/methods/methods/fuzzy/param.py | tarohi24/docsim | 4879bcc889c32470a27094eb183c2ce15ae2f1fb | [
"MIT"
] | 1 | 2020-04-29T13:52:29.000Z | 2020-04-29T13:52:29.000Z | docsim/methods/methods/fuzzy/param.py | tarohi24/docsim | 4879bcc889c32470a27094eb183c2ce15ae2f1fb | [
"MIT"
] | 136 | 2019-09-19T03:36:21.000Z | 2019-11-28T08:50:45.000Z | docsim/methods/methods/fuzzy/param.py | tarohi24/docsim | 4879bcc889c32470a27094eb183c2ce15ae2f1fb | [
"MIT"
] | null | null | null | from __future__ import annotations
from dataclasses import dataclass
from docsim.methods.common.types import Param
@dataclass
class FuzzyParam(Param):
n_words: str
model: str
coef: float
@classmethod
def from_args(cls, args) -> FuzzyParam:
param: FuzzyParam = FuzzyParam(n_words=args.n_wo... | 24.105263 | 60 | 0.60262 |
38cac1d7bdd3df96005d910c6048d588fc648539 | 10,953 | py | Python | log_reg.py | acadTags/caml-mimic | 4d81c3ef5ed5ad76fa9a728f9494d7871fa050be | [
"MIT"
] | 1 | 2019-12-05T15:23:11.000Z | 2019-12-05T15:23:11.000Z | log_reg.py | acadTags/caml-mimic | 4d81c3ef5ed5ad76fa9a728f9494d7871fa050be | [
"MIT"
] | null | null | null | log_reg.py | acadTags/caml-mimic | 4d81c3ef5ed5ad76fa9a728f9494d7871fa050be | [
"MIT"
] | null | null | null | """
Reads (or writes) BOW-formatted notes and performs scikit-learn logistic regression
"""
# this file seems not compatible with the others. -HD
import csv
import numpy as np
import os
import pickle
import sys
import time
from collections import Counter, defaultdict
from scipy.sparse import csr_matrix
from sklear... | 35.911475 | 177 | 0.578563 |
38cacf61a9d174bcf3006e3dfba47b09af8c61ff | 761 | py | Python | stests/core/mq/middleware/group_callbacks.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 4 | 2020-03-10T15:28:17.000Z | 2021-10-02T11:41:17.000Z | stests/core/mq/middleware/group_callbacks.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 1 | 2020-03-25T11:31:44.000Z | 2020-03-25T11:31:44.000Z | stests/core/mq/middleware/group_callbacks.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 9 | 2020-02-25T18:43:42.000Z | 2021-08-10T17:08:42.000Z | import redis
from dramatiq.rate_limits.backends import RedisBackend
from dramatiq.middleware import GroupCallbacks
from stests.core.utils import env
# Environment variables required by this module.
class EnvVars:
# Redis host.
DB = env.get_var('BROKER_REDIS_DB', 0, int)
# Redis protocol.
HOST = env... | 26.241379 | 104 | 0.725361 |
38cb10f0ce3ce875e33e97b70425be07eaec7447 | 4,997 | py | Python | tracker.py | Shall-Chee/Vision-based-Vehicle-Detection-and-Tracking | dff14e34779f142daa3254934f1e001e0777733f | [
"MIT"
] | null | null | null | tracker.py | Shall-Chee/Vision-based-Vehicle-Detection-and-Tracking | dff14e34779f142daa3254934f1e001e0777733f | [
"MIT"
] | null | null | null | tracker.py | Shall-Chee/Vision-based-Vehicle-Detection-and-Tracking | dff14e34779f142daa3254934f1e001e0777733f | [
"MIT"
] | 1 | 2021-12-17T20:15:08.000Z | 2021-12-17T20:15:08.000Z | '''
EKF filter for tracking
'''
import numpy as np
import cv2
from numpy.linalg import inv
from scipy.linalg import block_diag
from ast import literal_eval
import matplotlib.pyplot as plt
import imageio
from skimage import img_as_ubyte
from utils import plot_cbox
class EKF:
def __init__(self, state, fps = 1, P_... | 27.010811 | 87 | 0.564739 |
38cb126d6c56abc3ecd2ff84aed968518e1855fb | 1,263 | py | Python | lib/spack/spack/schema/mirrors.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | lib/spack/spack/schema/mirrors.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | lib/spack/spack/schema/mirrors.py | joequant/spack | e028ee0d5903045e1cdeb57550cbff61f2ffb2fa | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Schema for mirrors.yaml configuration file.
.. literalinclude:: _spack_root/lib/spack/spack/schema/mirrors.py
:line... | 27.456522 | 73 | 0.488519 |
38cb267c0015e1f7ef827d26aa072f005a271708 | 3,979 | py | Python | alipay/aop/api/request/KoubeiTradeOrderAggregateQueryRequest.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/request/KoubeiTradeOrderAggregateQueryRequest.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/request/KoubeiTradeOrderAggregateQueryRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.KoubeiTradeOrderAggregateQueryModel import KoubeiTradeOrderAggregateQueryModel
class KoubeiTradeOrderAggregateQueryRequest(object):
... | 27.441379 | 148 | 0.645388 |
38cb44738ab5c59442127f07645b2b519ed06a56 | 4,042 | py | Python | src/operation/execution.py | tobytoyin/TesterFactory | 150a2625f8fb4eb50d600611d990a8bb8fed96a4 | [
"MIT"
] | null | null | null | src/operation/execution.py | tobytoyin/TesterFactory | 150a2625f8fb4eb50d600611d990a8bb8fed96a4 | [
"MIT"
] | null | null | null | src/operation/execution.py | tobytoyin/TesterFactory | 150a2625f8fb4eb50d600611d990a8bb8fed96a4 | [
"MIT"
] | null | null | null | from selenium.webdriver.support.ui import WebDriverWait
from src.setup.setup_dir import create_output_path
class Execution:
"""
Set of functions to use selenium webdriver
Arguments:
------
`driver` (Selenium webdriver): A predefined webdriver;
`cache` (Process object, iterator): A set of data... | 36.089286 | 97 | 0.582385 |
38cb471e92827953970fd06b362654f193453196 | 960 | py | Python | location_app/views.py | AnmolChachra/django-location-app | 883d5e3c203e7ca358888e28f5b8d5409805c741 | [
"MIT"
] | 1 | 2021-03-24T20:29:27.000Z | 2021-03-24T20:29:27.000Z | location_app/views.py | AnmolChachra/django-location-app | 883d5e3c203e7ca358888e28f5b8d5409805c741 | [
"MIT"
] | 1 | 2021-03-19T02:27:24.000Z | 2021-03-19T02:27:24.000Z | location_app/views.py | AnmolChachra/django-location-app | 883d5e3c203e7ca358888e28f5b8d5409805c741 | [
"MIT"
] | null | null | null | from django.urls import reverse
from django.shortcuts import render, redirect
from django.contrib import messages
from django.utils.translation import ugettext_lazy as _
from .conf import settings
from location_app.forms import LocationForm
def index(request):
"""
View for the 'LocationForm' form
"""
if request.... | 27.428571 | 99 | 0.738542 |
38cb49993477ca3b925327009c34a22a8c9352f6 | 4,776 | py | Python | google-cloud-sdk/.install/.backup/lib/surface/compute/project_info/set_usage_bucket.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/compute/project_info/set_usage_bucket.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/compute/project_info/set_usage_bucket.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2014 Google Inc. 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 applicable law or ag... | 38.829268 | 80 | 0.698911 |
38cb57cfa206475482a9bd3303e3f7e3b418c7e0 | 2,437 | py | Python | 2016/day02_bathroom_security/python/src/test_solutions.py | tlake/advent-of-code | 17c729af2af5f1d95ba6ff68771a82ca6d00b05d | [
"MIT"
] | null | null | null | 2016/day02_bathroom_security/python/src/test_solutions.py | tlake/advent-of-code | 17c729af2af5f1d95ba6ff68771a82ca6d00b05d | [
"MIT"
] | null | null | null | 2016/day02_bathroom_security/python/src/test_solutions.py | tlake/advent-of-code | 17c729af2af5f1d95ba6ff68771a82ca6d00b05d | [
"MIT"
] | null | null | null | """Tests."""
from common import ThreeByThreeKeypad, Urinator
class TestClass1:
"""Poop."""
def test_that_i_know_what_a_keypad_looks_like(self):
"""."""
kp = ThreeByThreeKeypad()
assert(kp.center.number == 5)
assert(kp.center.up.number == 2)
assert(kp.center.up.up.nu... | 34.323944 | 83 | 0.604432 |
38cb64704d7299c0180f81e8d677d737c01cdaf4 | 1,549 | py | Python | mc2pbrt/method.py | PbrtCraft/mc2pbrt | 145c844a7ec0fb3ee3c83dba67c2f8cdcf888ed4 | [
"MIT"
] | 3 | 2019-10-04T17:56:50.000Z | 2019-11-11T13:39:24.000Z | mc2pbrt/method.py | PbrtCraft/mc2pbrt | 145c844a7ec0fb3ee3c83dba67c2f8cdcf888ed4 | [
"MIT"
] | 8 | 2019-10-12T03:53:23.000Z | 2022-03-12T00:01:21.000Z | mc2pbrt/method.py | PbrtCraft/mc2pbrt | 145c844a7ec0fb3ee3c83dba67c2f8cdcf888ed4 | [
"MIT"
] | 1 | 2019-02-12T23:41:00.000Z | 2019-02-12T23:41:00.000Z | import typing
from pbrtwriter import PbrtWriter
def create(name, params):
type_map = {
"PathTracing": PathTracing,
"path": PathTracing,
"BidirectionalPathTracing": BidirectionalPathTracing,
"bdpt": BidirectionalPathTracing,
"MetropolisLightTransport": MetropolisLightTransp... | 29.226415 | 81 | 0.690768 |
38cb6bc679f1c6ddb5686c4d3e301e4a30eb50d1 | 3,962 | py | Python | alipay/aop/api/request/AlipayOpenAppBoyiBoyiCreateRequest.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/request/AlipayOpenAppBoyiBoyiCreateRequest.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/request/AlipayOpenAppBoyiBoyiCreateRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayOpenAppBoyiBoyiCreateModel import AlipayOpenAppBoyiBoyiCreateModel
class AlipayOpenAppBoyiBoyiCreateRequest(object):
def ... | 27.324138 | 148 | 0.643614 |
38cb7504dd67499a80068a2215afb1229b552972 | 1,298 | py | Python | instructors/lessons/regular_expressions/examples/beatles_sample_exercise.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 46 | 2017-09-27T20:19:36.000Z | 2020-12-08T10:07:19.000Z | instructors/lessons/regular_expressions/examples/beatles_sample_exercise.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 6 | 2018-01-09T08:07:37.000Z | 2020-09-07T12:25:13.000Z | instructors/lessons/regular_expressions/examples/beatles_sample_exercise.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 18 | 2017-10-10T02:06:51.000Z | 2019-12-01T10:18:13.000Z | """
Goal:
List all problematic permutations of the band name for The Beatles and correct it.
With a single letter replace, we are missing the transpose failure possibility in the test_set_of_filenames
"""
import re
test_set_of_filenames = ['the beatles', 'The Beatles', 'Beatles, The',"Tje Beatjes", 'Da Beat... | 27.617021 | 111 | 0.718028 |
38cb831cd98514a98ad1661dab2cd07ba5aa7df2 | 492 | py | Python | setup.py | matyasselmeci/dask_condor | 889382edd28307244733ac77173361a2af623fc1 | [
"Apache-2.0"
] | 3 | 2018-09-06T13:36:50.000Z | 2020-05-26T13:43:35.000Z | setup.py | matyasselmeci/dask_condor | 889382edd28307244733ac77173361a2af623fc1 | [
"Apache-2.0"
] | 17 | 2017-05-18T16:47:39.000Z | 2018-12-14T21:41:38.000Z | setup.py | matyasselmeci/dask_condor | 889382edd28307244733ac77173361a2af623fc1 | [
"Apache-2.0"
] | 4 | 2017-04-13T20:52:05.000Z | 2018-11-22T15:05:08.000Z | #!/usr/bin/env python
from setuptools import setup
with open("requirements.txt") as f:
install_requires = f.read().strip().split("\n")
setup(
name='dask_condor',
version='0.0.20181214',
description='HTCondor backend for Dask.Distributed',
author='Matyas Selmeci',
author_email='matyas@cs.wisc.... | 25.894737 | 56 | 0.70122 |
38cbac86741d9bc7101609f0d836072c1286a9fa | 202 | py | Python | app/forms.py | ELTE-DH/pystyl | 84e99e6faa962bc0aba561f129abd597fb4b7792 | [
"BSD-3-Clause"
] | 48 | 2015-09-21T08:24:09.000Z | 2022-01-06T08:41:23.000Z | app/forms.py | ELTE-DH/pystyl | 84e99e6faa962bc0aba561f129abd597fb4b7792 | [
"BSD-3-Clause"
] | 7 | 2015-09-18T14:21:23.000Z | 2021-05-10T09:29:18.000Z | app/forms.py | ELTE-DH/pystyl | 84e99e6faa962bc0aba561f129abd597fb4b7792 | [
"BSD-3-Clause"
] | 15 | 2016-05-20T11:31:30.000Z | 2021-03-30T13:13:41.000Z | from flask.ext.wtf import Form
from wtforms import StringField
from wtforms.validators import DataRequired
class SettingsForm(Form):
filename = StringField('filename', validators=[DataRequired()]) | 28.857143 | 67 | 0.80198 |
38cbad911e8b2d912062cef5e4a16bc0cfb01d4b | 1,390 | py | Python | ufora/scripts/s3tool.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | ufora/scripts/s3tool.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | ufora/scripts/s3tool.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | #!/usr/bin/env python
# Copyright 2015 Ufora Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 26.730769 | 76 | 0.698561 |
38cbbad7860b1073153224032c456a4222196fdb | 1,391 | py | Python | src-cpp/server42/docker_entrypoint.py | mfyuce/open-kilda | 44f0580c028b8b56aa59536e62003bc416f07180 | [
"Apache-2.0"
] | null | null | null | src-cpp/server42/docker_entrypoint.py | mfyuce/open-kilda | 44f0580c028b8b56aa59536e62003bc416f07180 | [
"Apache-2.0"
] | null | null | null | src-cpp/server42/docker_entrypoint.py | mfyuce/open-kilda | 44f0580c028b8b56aa59536e62003bc416f07180 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import os
import sys
import logging
import docker
import netifaces
import subprocess
logger = logging.getLogger()
NETWORK_LAB_NAME = os.environ.get("LAB_NET")
if NETWORK_LAB_NAME is None:
logging.error('environment variable LAB_NET is not defined')
raise SystemExit(1)
NETWORK_LAB_IFACE =... | 36.605263 | 186 | 0.727534 |
38cc062b03ac9828e92583dd8f721c9e559c9de0 | 3,459 | py | Python | datautils/news/sample_data.py | nbro/contextual-bandit-recommender | 0176dad94e0e791327dc2f50e38aa3ab4e327673 | [
"MIT"
] | null | null | null | datautils/news/sample_data.py | nbro/contextual-bandit-recommender | 0176dad94e0e791327dc2f50e38aa3ab4e327673 | [
"MIT"
] | null | null | null | datautils/news/sample_data.py | nbro/contextual-bandit-recommender | 0176dad94e0e791327dc2f50e38aa3ab4e327673 | [
"MIT"
] | null | null | null | import os
from subprocess import Popen
import numpy as np
news_data_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "v1"))
ARTICLE_POOL_LENGTH = 20
# ARTICLE_POOL remains the same
def parse_uv_event(user_visit):
"""Parser for a user event string.
"""
try:
uv_event = {}
... | 28.352459 | 93 | 0.577624 |
38cc0e8407a5bd508359dc44b9933e48fc5060fd | 900,431 | py | Python | phonenumbers/geodata/data10.py | albertpadin/supercode-validate-phone-number | d2cc06091693524da8a08b86f62ad431e8620d0f | [
"MIT"
] | null | null | null | phonenumbers/geodata/data10.py | albertpadin/supercode-validate-phone-number | d2cc06091693524da8a08b86f62ad431e8620d0f | [
"MIT"
] | null | null | null | phonenumbers/geodata/data10.py | albertpadin/supercode-validate-phone-number | d2cc06091693524da8a08b86f62ad431e8620d0f | [
"MIT"
] | null | null | null | """Per-prefix data, mapping each prefix to a dict of locale:name.
Auto-generated file, do not edit by hand.
"""
from ..util import u
# Copyright (C) 2011-2016 The Libphonenumber Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licens... | 89.836476 | 139 | 0.644468 |
38cc37a580082c4e43db0f3c5b1ecf1f41f9544a | 3,621 | py | Python | tests/integration/modules/cmdmod.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | 1 | 2015-10-06T22:25:22.000Z | 2015-10-06T22:25:22.000Z | tests/integration/modules/cmdmod.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | tests/integration/modules/cmdmod.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | import os
import integration
class CMDModuleTest(integration.ModuleCase):
'''
Validate the cmd module
'''
def test_run(self):
'''
cmd.run
'''
shell = os.environ['SHELL']
self.assertTrue(self.run_function('cmd.run', ['echo $SHELL']))
self.assertEqual(
... | 29.439024 | 78 | 0.531621 |
38cc3f22c724ec1197c9138535873af4b0f3c7c9 | 755 | py | Python | course/AlgoDesign/3/shopping/shopping.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 8 | 2015-06-07T13:25:48.000Z | 2022-03-22T23:14:50.000Z | course/AlgoDesign/3/shopping/shopping.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 30 | 2016-01-29T01:36:41.000Z | 2018-09-19T07:01:22.000Z | course/AlgoDesign/3/shopping/shopping.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | null | null | null | #! /usr/bin/python
# 2012-04-16 00:08:12 liuyang1@dorm
# least cost shopping
# usage: shopping.py
infile1="input.txt"
infile2="offer.txt"
outfile="output.txt"
def shopping(lst,offer):
pass
def main(inFile1,inFile2,outFile):
b=int(inFile1.readline())
lst=[]
for i in range(b):
record=inFile1.readline()
record=... | 20.972222 | 39 | 0.70596 |
38cc9fd112e4e9e410ea4eafcb8378af2a2058be | 34 | py | Python | tests/__init__.py | funtastix/pyrinnaitouch | 13dbec80306fb0880906f6bfb44a2a55b1f8a111 | [
"MIT"
] | null | null | null | tests/__init__.py | funtastix/pyrinnaitouch | 13dbec80306fb0880906f6bfb44a2a55b1f8a111 | [
"MIT"
] | null | null | null | tests/__init__.py | funtastix/pyrinnaitouch | 13dbec80306fb0880906f6bfb44a2a55b1f8a111 | [
"MIT"
] | null | null | null | """Init file for test package."""
| 17 | 33 | 0.647059 |
38cce8df0b5ab5cd06367ec92fe1784c99502d17 | 5,869 | py | Python | yaksh/grader.py | patilnayan92/online | 0f9a8d8da5aa84a408a9a8e5825a045f6c86f481 | [
"Python-2.0"
] | 2 | 2019-03-06T02:17:25.000Z | 2019-10-03T17:43:26.000Z | yaksh/grader.py | patilnayan92/online | 0f9a8d8da5aa84a408a9a8e5825a045f6c86f481 | [
"Python-2.0"
] | null | null | null | yaksh/grader.py | patilnayan92/online | 0f9a8d8da5aa84a408a9a8e5825a045f6c86f481 | [
"Python-2.0"
] | 4 | 2019-02-01T16:10:40.000Z | 2020-08-30T02:44:39.000Z | #!/usr/bin/env python
from __future__ import unicode_literals
import sys
import pwd
import os
import stat
import contextlib
from os.path import isdir, dirname, abspath, join, isfile, exists
import signal
import traceback
from multiprocessing import Process, Queue
import subprocess
import re
try:
from SimpleXMLRPCS... | 32.425414 | 79 | 0.633498 |
38cd278aedda70bdb651b74830c6760179bbd58d | 120 | py | Python | Chapter 8/08/PaxHeader/recipe63.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | Chapter 8/08/PaxHeader/recipe63.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | Chapter 8/08/PaxHeader/recipe63.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | 15 uid=2057284
20 ctime=1295583198
20 atime=1296413440
24 SCHILY.dev=234881026
23 SCHILY.ino=29811607
18 SCHILY.nlink=1
| 17.142857 | 23 | 0.825 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.