hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c030240bf8377477ec7d529a689afa0d531c5fd
203
py
Python
conf.py
cremdelape/Escape-the-Monster
59620418001da00dcf8cc0035544a901b7756d5d
[ "MIT" ]
null
null
null
conf.py
cremdelape/Escape-the-Monster
59620418001da00dcf8cc0035544a901b7756d5d
[ "MIT" ]
null
null
null
conf.py
cremdelape/Escape-the-Monster
59620418001da00dcf8cc0035544a901b7756d5d
[ "MIT" ]
null
null
null
WIDTH = 1366 HEIGHT = 768 # The dimensions of the boat and the monster DIM = 30 RADIUS = 300 FPS = 30 BOAT_SPEED = 5 MONSTER_SPEED = 20 BLUE = (156, 211, 255) WHITE = (255, 255, 255) BLACK = (0, 0, 0)
14.5
44
0.655172
WIDTH = 1366 HEIGHT = 768 DIM = 30 RADIUS = 300 FPS = 30 BOAT_SPEED = 5 MONSTER_SPEED = 20 BLUE = (156, 211, 255) WHITE = (255, 255, 255) BLACK = (0, 0, 0)
true
true
1c030277beb239a0dcb9f627187277f1ee272182
3,929
py
Python
testfixtures/tests/test_log_capture.py
Alexhuszagh/XLDiscoverer
60937b1f7f2e23af4219eb26519d6b83fb4232d6
[ "Apache-2.0", "MIT" ]
null
null
null
testfixtures/tests/test_log_capture.py
Alexhuszagh/XLDiscoverer
60937b1f7f2e23af4219eb26519d6b83fb4232d6
[ "Apache-2.0", "MIT" ]
null
null
null
testfixtures/tests/test_log_capture.py
Alexhuszagh/XLDiscoverer
60937b1f7f2e23af4219eb26519d6b83fb4232d6
[ "Apache-2.0", "MIT" ]
null
null
null
# Copyright (c) 2008-2013 Simplistix Ltd # See license.txt for license details. from testfixtures import log_capture, compare, Comparison as C, LogCapture from unittest import TestCase from logging import getLogger root = getLogger() one = getLogger('one') two = getLogger('two') child = getLogger('one.child') clas...
28.889706
74
0.526597
from testfixtures import log_capture, compare, Comparison as C, LogCapture from unittest import TestCase from logging import getLogger root = getLogger() one = getLogger('one') two = getLogger('two') child = getLogger('one.child') class TestLog_Capture(TestCase): @log_capture('two', 'one.child') @log_capt...
true
true
1c0302ecacbd699e8f9ef488abf794ab63861370
10,006
py
Python
tests/lava/lib/dnf/connect/test_connect.py
srrisbud/lava-dnf
6cdd59e8d8de2f5625524576b76940a1de51712f
[ "BSD-3-Clause" ]
null
null
null
tests/lava/lib/dnf/connect/test_connect.py
srrisbud/lava-dnf
6cdd59e8d8de2f5625524576b76940a1de51712f
[ "BSD-3-Clause" ]
null
null
null
tests/lava/lib/dnf/connect/test_connect.py
srrisbud/lava-dnf
6cdd59e8d8de2f5625524576b76940a1de51712f
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2021 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ import unittest import numpy as np import typing as ty from lava.magma.core.process.ports.ports import InPort, OutPort from lava.magma.core.process.process import AbstractProcess from lava.lib.dnf.connect...
41.176955
80
0.642315
import unittest import numpy as np import typing as ty from lava.magma.core.process.ports.ports import InPort, OutPort from lava.magma.core.process.process import AbstractProcess from lava.lib.dnf.connect.connect import connect from lava.lib.dnf.connect.exceptions import MisconfiguredConnectError from lava.lib.dnf.o...
true
true
1c03038c97318a2903c4111785a1238e53e5b23b
408
py
Python
unlocode/migrations/0021_auto_20160212_1539.py
chadgates/locmaster
2a607341d3444996e24b048bfb5245174aedd45d
[ "BSD-3-Clause" ]
null
null
null
unlocode/migrations/0021_auto_20160212_1539.py
chadgates/locmaster
2a607341d3444996e24b048bfb5245174aedd45d
[ "BSD-3-Clause" ]
null
null
null
unlocode/migrations/0021_auto_20160212_1539.py
chadgates/locmaster
2a607341d3444996e24b048bfb5245174aedd45d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-02-12 15:39 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('unlocode', '0020_auto_20160212_1515'), ] operations = [ migrations.RenameModel( ...
20.4
48
0.627451
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('unlocode', '0020_auto_20160212_1515'), ] operations = [ migrations.RenameModel( old_name='LocChangeTags', new_name='LocChangeTag', ...
true
true
1c0305103e96d1b7db80ee8fbff9503b9904a3e1
605
bzl
Python
source/bazel/deps/threadpool/get.bzl
luxe/unilang
6c8a431bf61755f4f0534c6299bd13aaeba4b69e
[ "MIT" ]
33
2019-05-30T07:43:32.000Z
2021-12-30T13:12:32.000Z
source/bazel/deps/threadpool/get.bzl
luxe/unilang
6c8a431bf61755f4f0534c6299bd13aaeba4b69e
[ "MIT" ]
371
2019-05-16T15:23:50.000Z
2021-09-04T15:45:27.000Z
source/bazel/deps/threadpool/get.bzl
luxe/unilang
6c8a431bf61755f4f0534c6299bd13aaeba4b69e
[ "MIT" ]
6
2019-08-22T17:37:36.000Z
2020-11-07T07:15:32.000Z
# Do not edit this file directly. # It was auto-generated by: code/programs/reflexivity/reflexive_refresh load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") def threadpool(): http_archive( name="threadpool" , build_file="//bazel/deps/threadpool:build.BUILD" , sha256="44e...
35.588235
108
0.719008
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") def threadpool(): http_archive( name="threadpool" , build_file="//bazel/deps/threadpool:build.BUILD" , sha256="44e7d6de0ef5380b86dfea74bbd53545319cdc06a50d7a1095b04d8a949242c2" , strip_prefix="threadpool-06e635df...
true
true
1c0305a5b0d6cd3020fbd127f6f15b58ce8b9294
1,017
py
Python
superset/tasks/celery_app.py
franksam007/incubator-superset
a0f572eb3ea4b89cb435a8af20436f8e1d34814e
[ "Apache-2.0" ]
108
2018-01-22T11:09:59.000Z
2021-01-15T10:53:04.000Z
superset/tasks/celery_app.py
franksam007/incubator-superset
a0f572eb3ea4b89cb435a8af20436f8e1d34814e
[ "Apache-2.0" ]
203
2019-05-31T11:13:10.000Z
2020-03-31T02:50:54.000Z
superset/tasks/celery_app.py
zhwXF/Superset
14c3488c79f8f3cdbd1123e8f7a92f8746c2db09
[ "Apache-2.0", "CC-BY-4.0", "MIT" ]
24
2018-01-19T22:54:39.000Z
2020-11-12T13:04:25.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
36.321429
62
0.774828
from superset import app from superset.utils.core import get_celery_app config = app.config app = get_celery_app(config)
true
true
1c0305ddc255ed5055c79141f51da98502d0ff37
11,883
py
Python
lbry/stream/descriptor.py
mkroman/lbry-sdk
6e4f6fa92dcd8d25c7b6f5ad2d20b3b4d52c208e
[ "MIT" ]
2
2020-03-25T09:56:58.000Z
2020-03-25T09:56:59.000Z
lbry/stream/descriptor.py
mkroman/lbry-sdk
6e4f6fa92dcd8d25c7b6f5ad2d20b3b4d52c208e
[ "MIT" ]
null
null
null
lbry/stream/descriptor.py
mkroman/lbry-sdk
6e4f6fa92dcd8d25c7b6f5ad2d20b3b4d52c208e
[ "MIT" ]
null
null
null
import os import json import binascii import logging import typing import asyncio import re from collections import OrderedDict from cryptography.hazmat.primitives.ciphers.algorithms import AES from lbry.blob import MAX_BLOB_SIZE from lbry.blob.blob_info import BlobInfo from lbry.blob.blob_file import AbstractBlob, Blo...
41.404181
118
0.617268
import os import json import binascii import logging import typing import asyncio import re from collections import OrderedDict from cryptography.hazmat.primitives.ciphers.algorithms import AES from lbry.blob import MAX_BLOB_SIZE from lbry.blob.blob_info import BlobInfo from lbry.blob.blob_file import AbstractBlob, Blo...
true
true
1c030611b70a07d633bf16b08a66a00bac111801
917
py
Python
powerline_shell/segments/uptime.py
Dakedres/powerline-shell
352d26846aa5d3beb6c92ee26588536bc399117c
[ "MIT" ]
2,656
2017-11-28T05:11:53.000Z
2022-03-31T14:10:18.000Z
powerline_shell/segments/uptime.py
djangolee/powerline-shell
a9b8c9bb39dbfb7ec3c639e497b5a76fa6dcb8cc
[ "MIT" ]
193
2017-11-28T23:20:17.000Z
2022-03-25T12:57:55.000Z
powerline_shell/segments/uptime.py
djangolee/powerline-shell
a9b8c9bb39dbfb7ec3c639e497b5a76fa6dcb8cc
[ "MIT" ]
387
2017-11-29T22:33:39.000Z
2022-03-31T18:24:35.000Z
import subprocess import re from ..utils import BasicSegment, decode class Segment(BasicSegment): def add_to_powerline(self): powerline = self.powerline try: output = decode(subprocess.check_output(['uptime'], stderr=subprocess.STDOUT)) raw_uptime = re.search('(?<=up).+(?=,...
43.666667
90
0.577972
import subprocess import re from ..utils import BasicSegment, decode class Segment(BasicSegment): def add_to_powerline(self): powerline = self.powerline try: output = decode(subprocess.check_output(['uptime'], stderr=subprocess.STDOUT)) raw_uptime = re.search('(?<=up).+(?=,...
true
true
1c0306b62e18a86957f6702f321168bc78722e03
2,281
py
Python
lite/tools/cmake_tools/parse_kernel_registry.py
jiangjiajun/Paddle-Lite
7d61350f0308ef02a09b8c045523ebab5d87f01b
[ "Apache-2.0" ]
6
2019-11-14T08:20:02.000Z
2021-06-24T02:04:33.000Z
lite/tools/cmake_tools/parse_kernel_registry.py
jiangjiajun/Paddle-Lite
7d61350f0308ef02a09b8c045523ebab5d87f01b
[ "Apache-2.0" ]
null
null
null
lite/tools/cmake_tools/parse_kernel_registry.py
jiangjiajun/Paddle-Lite
7d61350f0308ef02a09b8c045523ebab5d87f01b
[ "Apache-2.0" ]
1
2021-12-30T01:41:11.000Z
2021-12-30T01:41:11.000Z
# Copyright (c) 2019 PaddlePaddle 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 appli...
32.585714
74
0.587462
from __future__ import print_function import sys import logging from ast import RegisterLiteKernelParser if len(sys.argv) != 7: print("Error: parse_kernel_registry.py requires six inputs!") exit(1) ops_list_path = sys.argv[1] dest_path = sys.argv[2] minkernels_list_path = sys.argv[3] tailored = sys.argv[4] wi...
true
true
1c0309148aa2f5a02f1459351b4573be2da155f6
4,422
py
Python
xblock/test/test_field_data.py
ffedoroff/XBlock
ce5a02aff444bb2c3134ae03853f5b7add0ba308
[ "Apache-2.0" ]
null
null
null
xblock/test/test_field_data.py
ffedoroff/XBlock
ce5a02aff444bb2c3134ae03853f5b7add0ba308
[ "Apache-2.0" ]
null
null
null
xblock/test/test_field_data.py
ffedoroff/XBlock
ce5a02aff444bb2c3134ae03853f5b7add0ba308
[ "Apache-2.0" ]
null
null
null
""" Tests of the utility FieldData's defined by xblock """ from __future__ import absolute_import, division, print_function, unicode_literals from mock import Mock import pytest from xblock.core import XBlock from xblock.exceptions import InvalidScopeError from xblock.fields import Scope, String from xblock.field_da...
34.27907
96
0.670511
from __future__ import absolute_import, division, print_function, unicode_literals from mock import Mock import pytest from xblock.core import XBlock from xblock.exceptions import InvalidScopeError from xblock.fields import Scope, String from xblock.field_data import SplitFieldData, ReadOnlyFieldData from xblock.tes...
true
true
1c0309cb8d9231fcd9574566a20176d1c20c74d1
1,559
py
Python
myshopify/scraping/utils.py
mortendaehli/my-shopify-inventory-utils
92f3598efb9c05ed706709f3021f8d12fa93ab50
[ "Unlicense" ]
null
null
null
myshopify/scraping/utils.py
mortendaehli/my-shopify-inventory-utils
92f3598efb9c05ed706709f3021f8d12fa93ab50
[ "Unlicense" ]
27
2022-02-06T17:48:01.000Z
2022-02-11T13:57:38.000Z
myshopify/scraping/utils.py
mortendaehli/my-shopify-inventory-utils
92f3598efb9c05ed706709f3021f8d12fa93ab50
[ "Unlicense" ]
null
null
null
from io import BytesIO from typing import List from retry import retry import requests from bs4 import BeautifulSoup, Comment from PIL import Image def get_clean_text_from_soup(soup: BeautifulSoup) -> str: # kill all script and style elements for script in soup(["script", "style"]): script.extract() ...
28.345455
78
0.697883
from io import BytesIO from typing import List from retry import retry import requests from bs4 import BeautifulSoup, Comment from PIL import Image def get_clean_text_from_soup(soup: BeautifulSoup) -> str: for script in soup(["script", "style"]): script.extract() text = soup.get_text() ...
true
true
1c0309d6fa2e7126d6d08a6aaa10fb2646ebed67
4,960
py
Python
ml_source/src/blocktorch/blocktorch/tests/automl_tests/test_engine_base.py
blocktorch/blocktorch
044aa269813ab22c5fd27f84272e5fb540fc522b
[ "MIT" ]
1
2021-09-23T12:23:02.000Z
2021-09-23T12:23:02.000Z
ml_source/src/blocktorch/blocktorch/tests/automl_tests/test_engine_base.py
blocktorch/blocktorch
044aa269813ab22c5fd27f84272e5fb540fc522b
[ "MIT" ]
null
null
null
ml_source/src/blocktorch/blocktorch/tests/automl_tests/test_engine_base.py
blocktorch/blocktorch
044aa269813ab22c5fd27f84272e5fb540fc522b
[ "MIT" ]
null
null
null
import logging from unittest.mock import MagicMock, patch import numpy as np import pandas as pd from blocktorch.automl.automl_search import AutoMLSearch from blocktorch.automl.engine import evaluate_pipeline, train_pipeline from blocktorch.automl.engine.engine_base import JobLogger from blocktorch.automl.utils impor...
32.847682
86
0.685685
import logging from unittest.mock import MagicMock, patch import numpy as np import pandas as pd from blocktorch.automl.automl_search import AutoMLSearch from blocktorch.automl.engine import evaluate_pipeline, train_pipeline from blocktorch.automl.engine.engine_base import JobLogger from blocktorch.automl.utils impor...
true
true
1c030adde0e41a0a8915689ea9acc2fc058bdc44
3,741
py
Python
PronunciationAssessment/Python/sample.py
jiajzhan/Cognitive-Speech-TTS
ce10ef9cc24fe02d06e3078eabb79922aa9d0409
[ "MIT" ]
385
2017-04-14T08:22:31.000Z
2022-03-29T05:21:14.000Z
PronunciationAssessment/Python/sample.py
jiajzhan/Cognitive-Speech-TTS
ce10ef9cc24fe02d06e3078eabb79922aa9d0409
[ "MIT" ]
107
2017-04-12T03:08:08.000Z
2022-01-24T05:39:55.000Z
PronunciationAssessment/Python/sample.py
jiajzhan/Cognitive-Speech-TTS
ce10ef9cc24fe02d06e3078eabb79922aa9d0409
[ "MIT" ]
373
2017-04-14T10:57:23.000Z
2022-03-29T02:58:10.000Z
# # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. # # Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services # # Copyright (c) Microsoft Corporation # All rights reserved. # # MIT License: # Permission is hereby granted, free of charge, to ...
44.535714
203
0.737236
import requests import base64 import json import time subscriptionKey = "{SubscriptionKey}" region = "{Region}" WaveHeader16K16BitMono = bytes([ 82, 73, 70, 70, 78, 128, 0, 0, 87, 65, 86, 69, 102, 109, 116, 32, 18, 0, 0, 0, 1, 0, 1, 0, 128, 62, 0, 0, 0, 125, 0, 0, 2, 0, 16, 0, 0, 0, 100, 97, 116, 97, 0, 0, 0, 0 ]) ...
true
true
1c030bfa67bcb7c0189b25c0c234eea463a2c3b7
3,922
py
Python
Train Size MNIST MLP.py
rknightly/neural-mnist
42189508f6e41b8b8f93d30fc78bd598c7d47dc5
[ "MIT" ]
null
null
null
Train Size MNIST MLP.py
rknightly/neural-mnist
42189508f6e41b8b8f93d30fc78bd598c7d47dc5
[ "MIT" ]
null
null
null
Train Size MNIST MLP.py
rknightly/neural-mnist
42189508f6e41b8b8f93d30fc78bd598c7d47dc5
[ "MIT" ]
null
null
null
from __future__ import print_function import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense from keras.optimizers import RMSprop import matplotlib.pyplot as plt import numpy as np # Prepare Data batch_size = 128 num_classes = 10 epochs = 20 # the data, split ...
32.413223
96
0.700408
from __future__ import print_function import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense from keras.optimizers import RMSprop import matplotlib.pyplot as plt import numpy as np batch_size = 128 num_classes = 10 epochs = 20 (x_train, y_train), (x_test, y_te...
true
true
1c030d3eedf3ce2b71a65acce1c5ec5ef4d71948
1,304
py
Python
lib/depoison/__main__.py
EleutherAI/depoison
f5697e3bf625d445f2bf56efe4b85906ebfb7edf
[ "MIT" ]
null
null
null
lib/depoison/__main__.py
EleutherAI/depoison
f5697e3bf625d445f2bf56efe4b85906ebfb7edf
[ "MIT" ]
null
null
null
lib/depoison/__main__.py
EleutherAI/depoison
f5697e3bf625d445f2bf56efe4b85906ebfb7edf
[ "MIT" ]
null
null
null
# fixes poison directory bug import os import argparse if __name__ == "__main__": del_str = f'[a-z,0-9]' is_gs = lambda x: x.startswith("gs://") def bucket_name(path): if is_gs: return path.replace("gs://", "").split("/")[0] else: raise ValueError(f"{path} is not a...
35.243243
104
0.595859
import os import argparse if __name__ == "__main__": del_str = f'[a-z,0-9]' is_gs = lambda x: x.startswith("gs://") def bucket_name(path): if is_gs: return path.replace("gs://", "").split("/")[0] else: raise ValueError(f"{path} is not a cloud bucket path") pa...
true
true
1c030e32a152ec1a34ad3b544ff9fd528e088b4e
4,811
py
Python
convert_model.py
NoVarlok/sova-tts-vocoder
1d44a7247341e404e503fb0de386af5f16d36806
[ "Apache-2.0" ]
45
2020-08-26T05:50:27.000Z
2021-01-27T15:40:09.000Z
convert_model.py
NoVarlok/sova-tts-vocoder
1d44a7247341e404e503fb0de386af5f16d36806
[ "Apache-2.0" ]
null
null
null
convert_model.py
NoVarlok/sova-tts-vocoder
1d44a7247341e404e503fb0de386af5f16d36806
[ "Apache-2.0" ]
3
2021-01-05T17:24:23.000Z
2022-03-31T15:20:21.000Z
# ***************************************************************************** # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions...
47.166667
108
0.676782
import sys import copy import torch def _check_model_old_version(model): if hasattr(model.WN[0], 'res_layers') or hasattr(model.WN[0], 'cond_layers'): return True else: return False def _update_model_res_skip(old_model, new_model): for idx in range(0, len(new_model.WN)): wavenet ...
true
true
1c030f1ac9bbb6a35b18880a6f3b0e91f5a8e159
12,437
py
Python
person/models.py
Aananda-giri/ioe_auto_attend
f55e532365e9f2da17437c554286d01754e7ac00
[ "Apache-2.0" ]
null
null
null
person/models.py
Aananda-giri/ioe_auto_attend
f55e532365e9f2da17437c554286d01754e7ac00
[ "Apache-2.0" ]
1
2021-12-18T15:50:33.000Z
2021-12-18T15:50:33.000Z
person/models.py
Aananda-giri/ioee
66d22167203915094dad0f587cf427d9ad1c6c35
[ "Apache-2.0" ]
1
2021-10-31T13:09:04.000Z
2021-10-31T13:09:04.000Z
#database='brainmap' # Create your models here. #from dateutil.relativedelta import relativedelta import uuid import datetime from django.db import models from django.utils import timezone from nepali_datetime_field.models import NepaliDateField #from user.models import User # python3 manage.py makemigrations per...
40.511401
1,166
0.693254
import uuid import datetime from django.db import models from django.utils import timezone from nepali_datetime_field.models import NepaliDateField from django.contrib.postgres.fields import ArrayField from django.contrib.auth.models import User class Person(models.Model): id = models.UUIDField(prima...
true
true
1c030f734330f5002ec1b25f48ffb10910665e04
271
py
Python
app/schemas/model.py
ParvezMullah/product_details
0aabb12e1062fe9911f05915a50dd5a9b75f21e5
[ "Apache-1.1" ]
null
null
null
app/schemas/model.py
ParvezMullah/product_details
0aabb12e1062fe9911f05915a50dd5a9b75f21e5
[ "Apache-1.1" ]
null
null
null
app/schemas/model.py
ParvezMullah/product_details
0aabb12e1062fe9911f05915a50dd5a9b75f21e5
[ "Apache-1.1" ]
null
null
null
from pydantic import BaseModel from datetime import datetime from typing import Optional class Model(BaseModel): id: int name: str created_at: datetime updated_at: Optional[datetime] = None is_active: bool class Config: orm_mode = True
18.066667
41
0.708487
from pydantic import BaseModel from datetime import datetime from typing import Optional class Model(BaseModel): id: int name: str created_at: datetime updated_at: Optional[datetime] = None is_active: bool class Config: orm_mode = True
true
true
1c03102a22917e0b797e649f848ec489a620087f
320
py
Python
backend/database/user/migrations/0008_remove_kalas_picture.py
HansErikHeum/tdt4140_2020_gruppe42
a916b5a003a174a343e0625ca501b542907cda72
[ "MIT" ]
null
null
null
backend/database/user/migrations/0008_remove_kalas_picture.py
HansErikHeum/tdt4140_2020_gruppe42
a916b5a003a174a343e0625ca501b542907cda72
[ "MIT" ]
null
null
null
backend/database/user/migrations/0008_remove_kalas_picture.py
HansErikHeum/tdt4140_2020_gruppe42
a916b5a003a174a343e0625ca501b542907cda72
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2020-03-20 14:21 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('user', '0007_kalas_picture'), ] operations = [ migrations.RemoveField( model_name='kalas', name='picture', ), ]
17.777778
47
0.58125
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('user', '0007_kalas_picture'), ] operations = [ migrations.RemoveField( model_name='kalas', name='picture', ), ]
true
true
1c0310c8b71f6f2f71f8c7ac77e9c762bb0eb4f1
10,570
py
Python
modules/transformer/encoder.py
AndreaSottana/deep_learning_models
a6bcd8e8fd4cd3fbce3542554e824ee5b58471fc
[ "MIT" ]
1
2020-06-14T12:05:03.000Z
2020-06-14T12:05:03.000Z
modules/transformer/encoder.py
AndreaSottana/deep_learning_models
a6bcd8e8fd4cd3fbce3542554e824ee5b58471fc
[ "MIT" ]
null
null
null
modules/transformer/encoder.py
AndreaSottana/deep_learning_models
a6bcd8e8fd4cd3fbce3542554e824ee5b58471fc
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from typing import Tuple import logging from .sublayers import MultiHeadAttention, LayerNormalization, PositionWiseFeedForward from .sublayers import EmbeddingLayer, PositionalEncoding logger = logging.getLogger(__name__) class EncoderLayer(nn.Module): """ This class imple...
67.324841
121
0.67947
import torch import torch.nn as nn from typing import Tuple import logging from .sublayers import MultiHeadAttention, LayerNormalization, PositionWiseFeedForward from .sublayers import EmbeddingLayer, PositionalEncoding logger = logging.getLogger(__name__) class EncoderLayer(nn.Module): def __init__(self, num_h...
true
true
1c031179ada8feec76fdbc44b65827e033f0a193
4,942
py
Python
scrape_utils.py
jherberg462/smf-mod-bot
67d4b49bd28018eadaab72bf16dc6ada7350b824
[ "MIT" ]
null
null
null
scrape_utils.py
jherberg462/smf-mod-bot
67d4b49bd28018eadaab72bf16dc6ada7350b824
[ "MIT" ]
null
null
null
scrape_utils.py
jherberg462/smf-mod-bot
67d4b49bd28018eadaab72bf16dc6ada7350b824
[ "MIT" ]
null
null
null
import requests from datetime import datetime, timedelta, timezone from bs4 import BeautifulSoup from threads_classes import Thread, All_threads import time def process_new_posts(AllThreads, highest_postID, domain='https://bitcointalk.org'): ''' inputs: Al...
33.849315
98
0.585795
import requests from datetime import datetime, timedelta, timezone from bs4 import BeautifulSoup from threads_classes import Thread, All_threads import time def process_new_posts(AllThreads, highest_postID, domain='https://bitcointalk.org'): low_postID=float('inf') ...
true
true
1c031189cb486630dcd2ae0acb9312195f409af4
3,408
py
Python
app/app/settings.py
JosepLagunas/recipe-app-api
eada64a9a6fb68b70f54e45ce8410da4b6ea8506
[ "MIT" ]
null
null
null
app/app/settings.py
JosepLagunas/recipe-app-api
eada64a9a6fb68b70f54e45ce8410da4b6ea8506
[ "MIT" ]
null
null
null
app/app/settings.py
JosepLagunas/recipe-app-api
eada64a9a6fb68b70f54e45ce8410da4b6ea8506
[ "MIT" ]
null
null
null
""" Django settings for app project. Generated by 'django-admin startproject' using Django 2.1.15. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os # Bu...
25.244444
91
0.6875
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'clzm0ne3wi=cdnuxzi#z@=!6tzo537$&s$n=psvj_8qx%p1q_7' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
1c03132787f5dafb91a105da01abe94efc3658e4
39,917
py
Python
spyder/plugins/editor/utils/editor.py
neophnx/spyder
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
[ "MIT" ]
2
2019-04-25T08:25:37.000Z
2019-04-25T08:25:43.000Z
spyder/plugins/editor/utils/editor.py
neophnx/spyder
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
[ "MIT" ]
null
null
null
spyder/plugins/editor/utils/editor.py
neophnx/spyder
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2013-2016 Colin Duquesnoy and others (see pyqode/AUTHORS.rst) # Copyright (c) 2016- Spyder Project Contributors (see AUTHORS.txt) # # Distributed under the terms of the MIT License # (see NOTICE.txt i...
35.640179
84
0.584513
import functools import weakref from qtpy.QtCore import QTimer, Qt from qtpy.QtGui import (QColor, QTextBlockUserData, QTextCursor, QTextBlock, QTextDocument, QCursor) from qtpy.QtWidgets import QApplication from spyder.py3compat import to_text_string def drift_color(base_color, factor=110...
true
true
1c0313445f016a2afaa08d1524ade0c3bff36759
904
py
Python
archiv/migrations/0006_auto_20210503_0954.py
acdh-oeaw/freud-app
6faa371151c2f1846cb96a62b0f5151720dd0e3b
[ "MIT" ]
null
null
null
archiv/migrations/0006_auto_20210503_0954.py
acdh-oeaw/freud-app
6faa371151c2f1846cb96a62b0f5151720dd0e3b
[ "MIT" ]
null
null
null
archiv/migrations/0006_auto_20210503_0954.py
acdh-oeaw/freud-app
6faa371151c2f1846cb96a62b0f5151720dd0e3b
[ "MIT" ]
null
null
null
# Generated by Django 3.2 on 2021-05-03 09:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('archiv', '0005_frdcollationsample'), ] operations = [ migrations.RenameField( model_name='frdcollationsample', old_nam...
25.111111
58
0.559735
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('archiv', '0005_frdcollationsample'), ] operations = [ migrations.RenameField( model_name='frdcollationsample', old_name='data', new_name='data_html', ...
true
true
1c0313ad4b753ec4d1c298f1ba3696301217e045
936
py
Python
isi_sdk_8_2_1/test/test_quota_quotas_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_2_1/test/test_quota_quotas_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_2_1/test/test_quota_quotas_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 8 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_8_2_1 from i...
22.829268
96
0.715812
from __future__ import absolute_import import unittest import isi_sdk_8_2_1 from isi_sdk_8_2_1.models.quota_quotas_extended import QuotaQuotasExtended from isi_sdk_8_2_1.rest import ApiException class TestQuotaQuotasExtended(unittest.TestCase): def setUp(self): pass def tearDown(self): ...
true
true
1c03156746c48501d0020efc9b249f0ec1c1d52c
1,341
py
Python
setup.py
sz3/pogui
58d8e7028f7a0fdaefdfdec0adce8b21a2567250
[ "MIT" ]
3
2020-02-22T21:58:07.000Z
2021-07-18T04:23:04.000Z
setup.py
sz3/pogui
58d8e7028f7a0fdaefdfdec0adce8b21a2567250
[ "MIT" ]
null
null
null
setup.py
sz3/pogui
58d8e7028f7a0fdaefdfdec0adce8b21a2567250
[ "MIT" ]
null
null
null
from os import path from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='pogui', license='MIT', url='https://github.com/sz3/pogui', version='0.0.4', ent...
24.833333
86
0.576435
from os import path from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='pogui', license='MIT', url='https://github.com/sz3/pogui', version='0.0.4', ent...
true
true
1c0315e7b7d8a60b260316e43d779d51c178b2ad
1,543
py
Python
tests/st/mindsponge/test_polypeptide_bond/test_case_bond.py
mindspore-ai/mindscience
b5269245915695de2d99fb290fef662c241db189
[ "Apache-2.0" ]
3
2021-11-10T06:17:50.000Z
2022-03-21T14:25:30.000Z
tests/st/mindsponge/test_polypeptide_bond/test_case_bond.py
mindspore-ai/mindscience
b5269245915695de2d99fb290fef662c241db189
[ "Apache-2.0" ]
null
null
null
tests/st/mindsponge/test_polypeptide_bond/test_case_bond.py
mindspore-ai/mindscience
b5269245915695de2d99fb290fef662c241db189
[ "Apache-2.0" ]
1
2021-12-05T11:41:29.000Z
2021-12-05T11:41:29.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
40.605263
104
0.689566
import numpy as np import pytest from mindspore import context from simulation_poly_bond import Simulation context.set_context(mode=context.GRAPH_MODE, device_target="GPU", device_id=0, save_graphs=False) @pytest.mark.level0 @pytest.mark.platform_x86_gpu_training @pytest.mark.env_onecard def test_case_poly(): a...
true
true
1c0315fb2d9e7524f2d07f9d1bd6a9c50ef9860d
623
py
Python
nnfs/initializers/random.py
akshaykurmi/neural-networks-from-scratch
54d62d9f5adb102d14267a922a515fa79bf52bd6
[ "MIT" ]
2
2019-09-13T22:31:21.000Z
2020-11-28T18:51:14.000Z
nnfs/initializers/random.py
akshaykurmi/neural-networks-from-scratch
54d62d9f5adb102d14267a922a515fa79bf52bd6
[ "MIT" ]
null
null
null
nnfs/initializers/random.py
akshaykurmi/neural-networks-from-scratch
54d62d9f5adb102d14267a922a515fa79bf52bd6
[ "MIT" ]
null
null
null
import numpy as np class RandomUniform: def __init__(self, min_value=-0.05, max_value=0.05, seed=None): self.min_value = min_value self.max_value = max_value np.random.seed(seed) def initialize(self, shape): return np.random.uniform(self.min_value, self.max_value, shape) cla...
28.318182
74
0.683788
import numpy as np class RandomUniform: def __init__(self, min_value=-0.05, max_value=0.05, seed=None): self.min_value = min_value self.max_value = max_value np.random.seed(seed) def initialize(self, shape): return np.random.uniform(self.min_value, self.max_value, shape) cla...
true
true
1c0316a4c5c02f39bd340fe0803133e486713dc8
8,536
py
Python
snooble/oauth.py
MrJohz/snooble
fa3478fed834e5147dc4e4936a59074a4b5afca7
[ "MIT" ]
null
null
null
snooble/oauth.py
MrJohz/snooble
fa3478fed834e5147dc4e4936a59074a4b5afca7
[ "MIT" ]
null
null
null
snooble/oauth.py
MrJohz/snooble
fa3478fed834e5147dc4e4936a59074a4b5afca7
[ "MIT" ]
null
null
null
from . import utils from .utils import cbc from requests.auth import HTTPBasicAuth from urllib.parse import urljoin __all__ = [ # constants 'SCRIPT_KIND', 'EXPLICIT_KIND', 'IMPLICIT_KIND', 'APPLICATION_INSTALLED_KIND', 'APPLICATION_EXPLICIT_KIND', 'ALL_SCOPES', # Classes 'OAuth', 'Authorization' ]...
43.774359
89
0.662371
from . import utils from .utils import cbc from requests.auth import HTTPBasicAuth from urllib.parse import urljoin __all__ = [ 'SCRIPT_KIND', 'EXPLICIT_KIND', 'IMPLICIT_KIND', 'APPLICATION_INSTALLED_KIND', 'APPLICATION_EXPLICIT_KIND', 'ALL_SCOPES', 'OAuth', 'Authorization' ] SCRIPT_KIND = "scrip...
true
true
1c0316a97a4afcd44f7ce335b9d7fd0e011ccc3c
26,825
py
Python
pandas/tests/test_algos.py
michaelaye/pandas
c6110e25b3eceb2f25022c2aa9ccea03c0b8b359
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
3
2017-02-25T14:06:43.000Z
2017-05-25T05:18:03.000Z
pandas/tests/test_algos.py
michaelaye/pandas
c6110e25b3eceb2f25022c2aa9ccea03c0b8b359
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
11
2020-06-05T17:24:17.000Z
2022-03-11T23:15:26.000Z
pandas/tests/test_algos.py
michaelaye/pandas
c6110e25b3eceb2f25022c2aa9ccea03c0b8b359
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
3
2017-02-25T15:26:47.000Z
2017-12-20T06:27:07.000Z
# -*- coding: utf-8 -*- from pandas.compat import range import numpy as np from numpy.random import RandomState from pandas.core.api import Series, Categorical, CategoricalIndex import pandas as pd from pandas import compat import pandas.core.algorithms as algos import pandas.util.testing as tm import pandas.hashtab...
38.103693
79
0.595154
from pandas.compat import range import numpy as np from numpy.random import RandomState from pandas.core.api import Series, Categorical, CategoricalIndex import pandas as pd from pandas import compat import pandas.core.algorithms as algos import pandas.util.testing as tm import pandas.hashtable as hashtable from pan...
true
true
1c03177934b10a504ac677da78487bc103e747bc
9,272
py
Python
stubs.min/Autodesk/Revit/DB/__init___parts/FilteredElementCollector.py
denfromufa/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2017-07-07T11:15:45.000Z
2017-07-07T11:15:45.000Z
stubs.min/Autodesk/Revit/DB/__init___parts/FilteredElementCollector.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/Autodesk/Revit/DB/__init___parts/FilteredElementCollector.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class FilteredElementCollector(object,IEnumerable[Element],IEnumerable,IDisposable): """ This class is used to search,filter and iterate through a set of elements. FilteredElementCollector(document: Document,viewId: ElementId) FilteredElementCollector(document: Document,elementIds: ICollection[ElementId])...
34.857143
215
0.712036
class FilteredElementCollector(object,IEnumerable[Element],IEnumerable,IDisposable): Applies an ElementDesignOptionFilter to the collector. Returns the first element to pass the filter(s). Returns: The first element. pass def FirstElementId(self): FirstElementId(self: FilteredElementCollector) -> ...
true
true
1c031799c0369993725486dd2e1a238ced57640c
315
py
Python
src/data_clusters/configuration/server_vars.py
pure-cheekbones/hot-bot-pol-pot
107082318659e402261bbccacaccc7a701c2d8ba
[ "MIT" ]
3
2021-08-29T07:45:30.000Z
2021-08-29T21:10:18.000Z
src/data_clusters/configuration/server_vars.py
pure-cheekbones/hot-bot-pol-pot
107082318659e402261bbccacaccc7a701c2d8ba
[ "MIT" ]
null
null
null
src/data_clusters/configuration/server_vars.py
pure-cheekbones/hot-bot-pol-pot
107082318659e402261bbccacaccc7a701c2d8ba
[ "MIT" ]
2
2021-10-04T15:07:41.000Z
2022-01-07T17:42:37.000Z
from os import environ from json import load from src.data_clusters import server_config_coll config = list(server_config_coll.find({}))[0] server = { "token": environ["token"], "openweather_appid": environ["openweather_appid"], "unsplash_access_key": environ["unsplash_access_key"], **config, }
22.5
58
0.726984
from os import environ from json import load from src.data_clusters import server_config_coll config = list(server_config_coll.find({}))[0] server = { "token": environ["token"], "openweather_appid": environ["openweather_appid"], "unsplash_access_key": environ["unsplash_access_key"], **config, }
true
true
1c03181b3f2ab61e61b795d31e1eb2569fbe0d35
6,707
py
Python
pretrain.py
ArgentLo/PPNW-KAIS
5e69bdd3a3b9c5f90134663a52696094d8b54b15
[ "Unlicense", "MIT" ]
1
2021-04-21T15:57:58.000Z
2021-04-21T15:57:58.000Z
pretrain.py
ArgentLo/PPNW-KAIS
5e69bdd3a3b9c5f90134663a52696094d8b54b15
[ "Unlicense", "MIT" ]
null
null
null
pretrain.py
ArgentLo/PPNW-KAIS
5e69bdd3a3b9c5f90134663a52696094d8b54b15
[ "Unlicense", "MIT" ]
null
null
null
import argparse import os import numpy as np import tensorflow as tf from tqdm import tqdm from util.gmf import PairwiseGMF from util.helper import BaseConfig from util.data import Dataset from util.evaluation import evaluate_model, get_eval, get_model_scores parser = argparse.ArgumentParser(formatter_class=argparse....
49.681481
151
0.587893
import argparse import os import numpy as np import tensorflow as tf from tqdm import tqdm from util.gmf import PairwiseGMF from util.helper import BaseConfig from util.data import Dataset from util.evaluation import evaluate_model, get_eval, get_model_scores parser = argparse.ArgumentParser(formatter_class=argparse....
true
true
1c03182c35e8386104be6c25486f84edbb79b385
458
py
Python
data/scripts/templates/object/draft_schematic/droid/component/shared_repair_module.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/draft_schematic/droid/component/shared_repair_module.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/draft_schematic/droid/component/shared_repair_module.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/droid/component/shared_repair_module.iff" result.attribute...
26.941176
84
0.731441
from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/droid/component/shared_repair_module.iff" result.attribute_template_id = -1 result.stfName("string_id_table","") return result
true
true
1c03184577d6835bc597dd36dc83fab890c3fe72
2,192
py
Python
sanic_ext/extensions/templating/render.py
SheldonXLD/sanic-ext
357275540b9105b8092a0e7499e4067b2728277a
[ "MIT" ]
null
null
null
sanic_ext/extensions/templating/render.py
SheldonXLD/sanic-ext
357275540b9105b8092a0e7499e4067b2728277a
[ "MIT" ]
null
null
null
sanic_ext/extensions/templating/render.py
SheldonXLD/sanic-ext
357275540b9105b8092a0e7499e4067b2728277a
[ "MIT" ]
null
null
null
from __future__ import annotations from inspect import isawaitable from typing import TYPE_CHECKING, Any, Dict, Optional, Union from sanic import Sanic from sanic.compat import Header from sanic.exceptions import SanicException from sanic.response import HTTPResponse if TYPE_CHECKING: from jinja2 import Environm...
28.467532
79
0.617701
from __future__ import annotations from inspect import isawaitable from typing import TYPE_CHECKING, Any, Dict, Optional, Union from sanic import Sanic from sanic.compat import Header from sanic.exceptions import SanicException from sanic.response import HTTPResponse if TYPE_CHECKING: from jinja2 import Environm...
true
true
1c03185e180ba3c744844e943f4ff6d0d56ab003
5,145
py
Python
bin/delete_storage_pool.py
GOMYWAY-NETWORKS-LLC/karesansui
f4ba1cf6f88cf76c3e4dbc444139d73134f7c9d1
[ "MIT" ]
54
2015-01-09T16:49:34.000Z
2022-02-03T10:08:30.000Z
bin/delete_storage_pool.py
GOMYWAY-NETWORKS-LLC/karesansui
f4ba1cf6f88cf76c3e4dbc444139d73134f7c9d1
[ "MIT" ]
2
2016-02-22T08:23:36.000Z
2021-05-10T04:13:01.000Z
bin/delete_storage_pool.py
GOMYWAY-NETWORKS-LLC/karesansui
f4ba1cf6f88cf76c3e4dbc444139d73134f7c9d1
[ "MIT" ]
27
2015-08-21T13:33:49.000Z
2021-11-19T02:56:20.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of Karesansui. # # Copyright (C) 2012 HDE, 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 # in the Software without restriction, incl...
40.511811
121
0.617687
import os import sys import re import logging from optparse import OptionParser from ksscommand import KssCommand, KssCommandException, KssCommandOptException import __cmd__ try: import karesansui from karesansui import __version__ from karesansui.lib.virt.virt import KaresansuiVirtConnection from k...
false
true
1c0318d9db2da551ee418d6c5fa959132185145d
1,017
py
Python
tests/bm_mesh_normal_consistency.py
theycallmepeter/pytorch3d_PBR
bc83c23969ff7843fc05d2da001952b368926174
[ "BSD-3-Clause" ]
null
null
null
tests/bm_mesh_normal_consistency.py
theycallmepeter/pytorch3d_PBR
bc83c23969ff7843fc05d2da001952b368926174
[ "BSD-3-Clause" ]
null
null
null
tests/bm_mesh_normal_consistency.py
theycallmepeter/pytorch3d_PBR
bc83c23969ff7843fc05d2da001952b368926174
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. from itertools import product import torch from fvcore.common.benchmark import benchmark from test_m...
26.763158
72
0.6706
from itertools import product import torch from fvcore.common.benchmark import benchmark from test_mesh_normal_consistency import TestMeshNormalConsistency def bm_mesh_normal_consistency() -> None: devices = ["cpu"] if torch.cuda.is_available(): devices.append("cuda") kwargs_list...
true
true
1c0319b88434b1592e7e8f627a5c58858a4e0c7e
19,233
py
Python
monofair2/monoloco/monoloco/eval/eval_kitti.py
galvinw/fairmotdocker
032d50a4025788b97ca36b0d97b7df15ddb5986c
[ "MIT" ]
null
null
null
monofair2/monoloco/monoloco/eval/eval_kitti.py
galvinw/fairmotdocker
032d50a4025788b97ca36b0d97b7df15ddb5986c
[ "MIT" ]
null
null
null
monofair2/monoloco/monoloco/eval/eval_kitti.py
galvinw/fairmotdocker
032d50a4025788b97ca36b0d97b7df15ddb5986c
[ "MIT" ]
2
2021-11-15T03:01:28.000Z
2021-11-15T03:20:20.000Z
""" Evaluate MonStereo code on KITTI dataset using ALE metric """ # pylint: disable=attribute-defined-outside-init import os import math import logging import copy import datetime from collections import defaultdict import numpy as np try: import tabulate TABULATE = copy.copy(tabulate.tabulate) except Import...
41.901961
120
0.553112
import os import math import logging import copy import datetime from collections import defaultdict import numpy as np try: import tabulate TABULATE = copy.copy(tabulate.tabulate) except ImportError: TABULATE = None from ..utils import get_iou_matches, get_task_error, get_pixel_error, check_conditions,...
true
true
1c0319f3c297cb6cf5b88ca729b2e4f0d31c32a0
3,834
py
Python
bin/lastpass_event_reporting.py
splunk/TA-lastpass
53594bb093d2723b5926fc29ae988b1eb8b11bd1
[ "Apache-2.0" ]
null
null
null
bin/lastpass_event_reporting.py
splunk/TA-lastpass
53594bb093d2723b5926fc29ae988b1eb8b11bd1
[ "Apache-2.0" ]
1
2021-04-08T15:14:50.000Z
2021-04-08T15:14:50.000Z
bin/lastpass_event_reporting.py
splunk/TA-lastpass
53594bb093d2723b5926fc29ae988b1eb8b11bd1
[ "Apache-2.0" ]
1
2022-03-27T09:31:22.000Z
2022-03-27T09:31:22.000Z
import ta_lastpass_declare import os import sys import time import datetime import json import modinput_wrapper.base_modinput from solnlib.packages.splunklib import modularinput as smi import input_module_lastpass_event_reporting as input_module bin_dir = os.path.basename(__file__) ''' Do not edit this file!...
40.357895
195
0.641628
import ta_lastpass_declare import os import sys import time import datetime import json import modinput_wrapper.base_modinput from solnlib.packages.splunklib import modularinput as smi import input_module_lastpass_event_reporting as input_module bin_dir = os.path.basename(__file__) class ModInputlastpass_event_r...
true
true
1c031ad512c43c55f3227e0bd6dad10c07fb2561
7,103
py
Python
agent0/deepq/trainer.py
zhoubin-me/agent0
1184827077e43dfa63e1f24a004fcc6c3e3d5130
[ "MIT" ]
null
null
null
agent0/deepq/trainer.py
zhoubin-me/agent0
1184827077e43dfa63e1f24a004fcc6c3e3d5130
[ "MIT" ]
null
null
null
agent0/deepq/trainer.py
zhoubin-me/agent0
1184827077e43dfa63e1f24a004fcc6c3e3d5130
[ "MIT" ]
null
null
null
import json import os import time from abc import ABC import numpy as np import ray import torch from agent0.common.utils import LinearSchedule, set_random_seed from agent0.deepq.actor import Actor from agent0.deepq.agent import Agent from agent0.deepq.config import Config from ray import tune from ray.tune.trial impo...
40.588571
118
0.589469
import json import os import time from abc import ABC import numpy as np import ray import torch from agent0.common.utils import LinearSchedule, set_random_seed from agent0.deepq.actor import Actor from agent0.deepq.agent import Agent from agent0.deepq.config import Config from ray import tune from ray.tune.trial impo...
true
true
1c031b4ea91e3d21c538dd73e06dfdc6d23c41d9
8,851
py
Python
fixtures/vcenter_gateway.py
vkolli/contrail-test-perf
db04b8924a2c330baabe3059788b149d957a7d67
[ "Apache-2.0" ]
1
2017-06-13T04:42:34.000Z
2017-06-13T04:42:34.000Z
fixtures/vcenter_gateway.py
vkolli/contrail-test-perf
db04b8924a2c330baabe3059788b149d957a7d67
[ "Apache-2.0" ]
null
null
null
fixtures/vcenter_gateway.py
vkolli/contrail-test-perf
db04b8924a2c330baabe3059788b149d957a7d67
[ "Apache-2.0" ]
null
null
null
from vcenter import * from vnc_api.vnc_api import * from lif_fixture import LogicalInterfaceFixture from physical_device_fixture import PhysicalDeviceFixture from pif_fixture import PhysicalInterfaceFixture from port_fixture import PortFixture from openstack import OpenstackAuth, OpenstackOrchestrator from contrailapi...
38.650655
135
0.633149
from vcenter import * from vnc_api.vnc_api import * from lif_fixture import LogicalInterfaceFixture from physical_device_fixture import PhysicalDeviceFixture from pif_fixture import PhysicalInterfaceFixture from port_fixture import PortFixture from openstack import OpenstackAuth, OpenstackOrchestrator from contrailapi...
true
true
1c031b6ca54b937ab15ba618cbca8c5df6d620b5
9,054
py
Python
api/app/resources/theq/csrs.py
mafzalzadeh/queue-management
c4ff9d4a82ad378ef35a9c46b97fdfddc3ed34a7
[ "Apache-2.0" ]
null
null
null
api/app/resources/theq/csrs.py
mafzalzadeh/queue-management
c4ff9d4a82ad378ef35a9c46b97fdfddc3ed34a7
[ "Apache-2.0" ]
null
null
null
api/app/resources/theq/csrs.py
mafzalzadeh/queue-management
c4ff9d4a82ad378ef35a9c46b97fdfddc3ed34a7
[ "Apache-2.0" ]
null
null
null
'''Copyright 2018 Province of British Columbia 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,...
49.747253
127
0.568257
from datetime import datetime from flask import g from flask_restx import Resource from qsystem import api, db, application, api_call_with_retry from sqlalchemy import exc, or_ from app.models.bookings import Exam, ExamType, Booking from app.models.theq import Citizen, CSR, Period, ServiceReq, SRState from app.schemas...
true
true
1c031bebab699feda764650455651e82ebfe7fba
529
py
Python
apps/webapp/migrations/0007_auto_20201007_1725.py
garrisok/gffa
0b25bedf3ec8d36cbc8f588cd366ec8fa17c23c3
[ "MIT" ]
1
2021-03-04T21:27:10.000Z
2021-03-04T21:27:10.000Z
apps/webapp/migrations/0007_auto_20201007_1725.py
garrisok/gffa
0b25bedf3ec8d36cbc8f588cd366ec8fa17c23c3
[ "MIT" ]
null
null
null
apps/webapp/migrations/0007_auto_20201007_1725.py
garrisok/gffa
0b25bedf3ec8d36cbc8f588cd366ec8fa17c23c3
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-10-07 21:25 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('webapp', '0006_starship'), ] operations = [ migrations.RenameModel( old_name='Starship', new_name='Starships', ), ...
24.045455
125
0.584121
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('webapp', '0006_starship'), ] operations = [ migrations.RenameModel( old_name='Starship', new_name='Starships', ), migrations.AlterModelOptions( ...
true
true
1c031c8150a744aae9f3a0e7c2606c7602f8479b
13,120
py
Python
resources/Wireshark/WiresharkDissectorFoo/test/suite_mergecap.py
joshis1/C_Programming
4a8003321251448a167bfca0b595c5eeab88608d
[ "MIT" ]
2
2020-09-11T05:51:42.000Z
2020-12-31T11:42:02.000Z
resources/Wireshark/WiresharkDissectorFoo/test/suite_mergecap.py
joshis1/C_Programming
4a8003321251448a167bfca0b595c5eeab88608d
[ "MIT" ]
null
null
null
resources/Wireshark/WiresharkDissectorFoo/test/suite_mergecap.py
joshis1/C_Programming
4a8003321251448a167bfca0b595c5eeab88608d
[ "MIT" ]
null
null
null
# # -*- coding: utf-8 -*- # Wireshark tests # By Gerald Combs <gerald@wireshark.org> # # Ported from a set of Bash scripts which were copyright 2005 Ulf Lamping # # SPDX-License-Identifier: GPL-2.0-or-later # '''Mergecap tests''' import re import subprocesstest import fixtures testout_pcap = 'testout.pcap' testout_pc...
45.397924
143
0.642912
import re import subprocesstest import fixtures testout_pcap = 'testout.pcap' testout_pcapng = 'testout.pcapng' file_type_to_descr = { 'pcap': 'Wireshark/tcpdump/... - pcap', 'pcapng': 'Wireshark/... - pcapng', } file_type_to_testout = { 'pcap': testout_pcap, 'pcapng': testout_pcapng, } def check_m...
true
true
1c031dcde361bcf10210c48f5ed23ca9b1a884d3
4,049
py
Python
support/install-yara.py
mehrdad-shokri/retdec
a82f16e97b163afe789876e0a819489c5b9b358e
[ "MIT", "Zlib", "BSD-3-Clause" ]
4,816
2017-12-12T18:07:09.000Z
2019-04-17T02:01:04.000Z
support/install-yara.py
mehrdad-shokri/retdec
a82f16e97b163afe789876e0a819489c5b9b358e
[ "MIT", "Zlib", "BSD-3-Clause" ]
514
2017-12-12T18:22:52.000Z
2019-04-16T16:07:11.000Z
support/install-yara.py
mehrdad-shokri/retdec
a82f16e97b163afe789876e0a819489c5b9b358e
[ "MIT", "Zlib", "BSD-3-Clause" ]
579
2017-12-12T18:38:02.000Z
2019-04-11T13:32:53.000Z
#!/usr/bin/env python3 """Install all the *.yara files. Usage: install-yara.py yarac-path install-path yara-patterns-path compile yarac-path Path to the yarac binary to use for YARA rules compilation. install-path Path to the installation directory where to place the results. yara-patterns-pa...
35.208696
134
0.660904
import fnmatch import multiprocessing.pool import os import pathlib import shutil import subprocess import sys import threading def print_help(): print('Usage: %s yarac-path install-path yara-patterns-path compile' % sys.argv[0]) def get_arguments(): if len(sys.argv) != 5: print_help() sys...
true
true
1c031dee20c1af9f9143195657e4f0f234750467
511
py
Python
blockchain/Transaction.py
Adasumizox/crypto
45cb3cd19007a1b319efea20137a04a83afcf975
[ "MIT" ]
null
null
null
blockchain/Transaction.py
Adasumizox/crypto
45cb3cd19007a1b319efea20137a04a83afcf975
[ "MIT" ]
null
null
null
blockchain/Transaction.py
Adasumizox/crypto
45cb3cd19007a1b319efea20137a04a83afcf975
[ "MIT" ]
null
null
null
from decimal import Decimal from blockchain.database import schemas class Transaction(): def __init__(self, sender: schemas.User, receiver: schemas.User, amount: float): assert amount > 0, "Nice try" assert self.sender.balance >= amount, "You cannot overdraft in this system" self.sender =...
36.5
84
0.696673
from decimal import Decimal from blockchain.database import schemas class Transaction(): def __init__(self, sender: schemas.User, receiver: schemas.User, amount: float): assert amount > 0, "Nice try" assert self.sender.balance >= amount, "You cannot overdraft in this system" self.sender =...
true
true
1c031e3e65630b5dd6a9aa75a14d1b7b8e79cd61
1,903
py
Python
nsl/collections/_ns.py
ericsnowcurrently/nsl
e676e2b7aff180a4074a662e4f5e1ee9d87b8cb2
[ "BSD-2-Clause" ]
null
null
null
nsl/collections/_ns.py
ericsnowcurrently/nsl
e676e2b7aff180a4074a662e4f5e1ee9d87b8cb2
[ "BSD-2-Clause" ]
null
null
null
nsl/collections/_ns.py
ericsnowcurrently/nsl
e676e2b7aff180a4074a662e4f5e1ee9d87b8cb2
[ "BSD-2-Clause" ]
null
null
null
from collections import namedtuple import functools ################################################# # record types # XXX Add as_namedtuple() keyword args (for defaults). # XXX Add nt.as_subclass() classmethod. # XXX Add nt.with_defaults() classmethod. # XXX Support using as_namedtuple() with classes that have base...
29.276923
79
0.604834
from collections import namedtuple import functools def _update_wrapper_ns(ns, wrapped): for attr in functools.WRAPPER_ASSIGNMENTS: try: ns[attr] = getattr(wrapped, attr) except AttributeError: pass def as_namedtuple(cls, fields=None): if fields is None: ...
true
true
1c031f4ed3e9222d30fd199ea5f3edb12a4ba306
5,354
py
Python
Classes/__init__.py
tofolo17/PyTruco
218846a5012ef119c0aa4baa94cde6ce1ee404c5
[ "MIT" ]
null
null
null
Classes/__init__.py
tofolo17/PyTruco
218846a5012ef119c0aa4baa94cde6ce1ee404c5
[ "MIT" ]
null
null
null
Classes/__init__.py
tofolo17/PyTruco
218846a5012ef119c0aa4baa94cde6ce1ee404c5
[ "MIT" ]
null
null
null
from random import randint, choice from Functions import * class Humano: def __init__(self, cartas: list): self.cartas = cartas def joga_carta(self): escolha = int(input("Sua vez. Qual a sua escolha? ")) carta = escolhe(self.cartas, escolha) print(f"Humano joga {carta}.") ...
34.766234
105
0.565185
from random import randint, choice from Functions import * class Humano: def __init__(self, cartas: list): self.cartas = cartas def joga_carta(self): escolha = int(input("Sua vez. Qual a sua escolha? ")) carta = escolhe(self.cartas, escolha) print(f"Humano joga {carta}.") ...
true
true
1c031fdd0481b8b656130b990cca3feed66ff0ee
24,247
py
Python
pontoon/sync/tests/test_vcs_models.py
foss4/pontoon
0503cc78f00e1e9d23c1ca885fe74a627563fc82
[ "BSD-3-Clause" ]
1,145
2015-05-15T01:08:16.000Z
2022-03-31T14:23:45.000Z
pontoon/sync/tests/test_vcs_models.py
foss4/pontoon
0503cc78f00e1e9d23c1ca885fe74a627563fc82
[ "BSD-3-Clause" ]
1,365
2015-05-04T21:54:18.000Z
2022-03-30T16:53:49.000Z
pontoon/sync/tests/test_vcs_models.py
foss4/pontoon
0503cc78f00e1e9d23c1ca885fe74a627563fc82
[ "BSD-3-Clause" ]
667
2015-05-04T21:33:45.000Z
2022-03-30T10:25:33.000Z
import tempfile import os from http.client import HTTPException from pathlib import Path from unittest.mock import Mock, patch, PropertyMock, MagicMock from pontoon.base.models import ( Locale, Project, Repository, ) from pontoon.base.tests import ( CONTAINS, LocaleFactory, ProjectFactory, ...
35.191582
92
0.637069
import tempfile import os from http.client import HTTPException from pathlib import Path from unittest.mock import Mock, patch, PropertyMock, MagicMock from pontoon.base.models import ( Locale, Project, Repository, ) from pontoon.base.tests import ( CONTAINS, LocaleFactory, ProjectFactory, ...
true
true
1c031feee89ada2e819e76b607808b10725ddff0
584
py
Python
app/auth/form.py
youqingkui/wx.youqingkui.me
e0d8f85431b7c4f935f5688374c24f5253299221
[ "MIT" ]
1
2016-05-13T08:43:34.000Z
2016-05-13T08:43:34.000Z
app/auth/form.py
youqingkui/wx.youqingkui.me
e0d8f85431b7c4f935f5688374c24f5253299221
[ "MIT" ]
null
null
null
app/auth/form.py
youqingkui/wx.youqingkui.me
e0d8f85431b7c4f935f5688374c24f5253299221
[ "MIT" ]
null
null
null
#!/usr/bin/env python #coding=utf-8 from flask.ext.wtf import Form from wtforms import StringField, PasswordField, BooleanField, SubmitField from wtforms.validators import Required, Length, Email, Regexp, EqualTo from wtforms import ValidationError from ..model.users import User class LoginForm(Form): email = Str...
38.933333
73
0.695205
from flask.ext.wtf import Form from wtforms import StringField, PasswordField, BooleanField, SubmitField from wtforms.validators import Required, Length, Email, Regexp, EqualTo from wtforms import ValidationError from ..model.users import User class LoginForm(Form): email = StringField('Email', validators=[Requir...
true
true
1c03201329519a414cc29a46184ec0ff0444cc18
65,880
py
Python
milvus/grpc_gen/milvus_pb2.py
yamasite/pymilvus
784565ae96716753947146f97a0570c0da8422ac
[ "Apache-2.0" ]
null
null
null
milvus/grpc_gen/milvus_pb2.py
yamasite/pymilvus
784565ae96716753947146f97a0570c0da8422ac
[ "Apache-2.0" ]
null
null
null
milvus/grpc_gen/milvus_pb2.py
yamasite/pymilvus
784565ae96716753947146f97a0570c0da8422ac
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: milvus.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protob...
41.696203
6,298
0.679979
import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym...
true
true
1c032017ab09fd2c68dd0926e84bfe2de6bb3b6b
1,517
py
Python
python/stack-and-queue/queue.py
Samerodeh/data-structures-and-algorithms
29658d630ccf20cc77fab966668013778cd6895e
[ "MIT" ]
null
null
null
python/stack-and-queue/queue.py
Samerodeh/data-structures-and-algorithms
29658d630ccf20cc77fab966668013778cd6895e
[ "MIT" ]
1
2021-07-27T15:09:50.000Z
2021-07-27T15:09:50.000Z
python/stack-and-queue/queue.py
Samerodeh/data-structures-and-algorithms
29658d630ccf20cc77fab966668013778cd6895e
[ "MIT" ]
1
2021-11-08T05:36:32.000Z
2021-11-08T05:36:32.000Z
class Node: def __init__(self, value): self.value = value self.next = None class Queue(object): def __init__(self, size): self.queue = [] self.size = size def enqueue(self, value): '''This function adds an value to the rear end of the queue ''' if(self.isFull() !...
25.283333
89
0.556361
class Node: def __init__(self, value): self.value = value self.next = None class Queue(object): def __init__(self, size): self.queue = [] self.size = size def enqueue(self, value): if(self.isFull() != True): self.queue.insert(0, value) else: ...
true
true
1c03203da0ddf8738a5c2578cda1fb5eb38a024a
8,002
py
Python
zephyrus_sc2_parser/gamedata/67188/building_data.py
dareonion/zephyrus-sc2-parser
0e31ac86e4546466eba44f37ed13ab2880fe5d39
[ "MIT" ]
28
2020-03-11T14:07:12.000Z
2022-03-24T23:53:08.000Z
zephyrus_sc2_parser/gamedata/67188/building_data.py
dareonion/zephyrus-sc2-parser
0e31ac86e4546466eba44f37ed13ab2880fe5d39
[ "MIT" ]
19
2020-06-25T11:59:43.000Z
2022-03-27T23:11:00.000Z
zephyrus_sc2_parser/gamedata/67188/building_data.py
dareonion/zephyrus-sc2-parser
0e31ac86e4546466eba44f37ed13ab2880fe5d39
[ "MIT" ]
4
2020-06-24T21:12:15.000Z
2021-11-19T15:27:35.000Z
# Version 67188 buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_...
4,001
7,986
0.613722
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priori...
true
true
1c0320610bbcca3cf801c4cb954706e601c15267
644
py
Python
content/migrations/0011_auto_20161230_1032.py
jaymcgrath/ewe_ebooks
06ffa6c881d205ab00a55c195ee79bccd2da77ec
[ "MIT" ]
4
2016-12-05T18:32:48.000Z
2019-01-26T21:42:53.000Z
content/migrations/0011_auto_20161230_1032.py
jaymcgrath/ewe_ebooks
06ffa6c881d205ab00a55c195ee79bccd2da77ec
[ "MIT" ]
14
2016-11-30T01:03:59.000Z
2019-01-26T21:37:25.000Z
content/migrations/0011_auto_20161230_1032.py
jaymcgrath/ewe_ebooks
06ffa6c881d205ab00a55c195ee79bccd2da77ec
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-30 18:32 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('content', '0010_bot_description'), ] operations = [ migrations.AlterField( ...
30.666667
241
0.625776
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('content', '0010_bot_description'), ] operations = [ migrations.AlterField( model_name='bot', name='post_frequency', ...
true
true
1c032077b49d2e00db4d6d1c287b8f35a3a81b8b
3,219
py
Python
MusicSpeech.py
ctralie/Math412S2017
27b32eabf079a7f8bc5dadf1acbc1e8442cfa639
[ "Apache-2.0" ]
7
2017-03-21T16:04:55.000Z
2021-04-29T13:33:49.000Z
MusicSpeech.py
ctralie/Math412S2017
27b32eabf079a7f8bc5dadf1acbc1e8442cfa639
[ "Apache-2.0" ]
null
null
null
MusicSpeech.py
ctralie/Math412S2017
27b32eabf079a7f8bc5dadf1acbc1e8442cfa639
[ "Apache-2.0" ]
null
null
null
""" Programmer: Chris Tralie (ctralie@alumni.princeton.edu) Purpose: To show how TDA can be used to quantify how periodic an audio clip is. Simple example with music versus speech. Show how doing a delay embedding on raw audio is a bad idea when the length of the period is on the order of seconds, and how "audio novel...
30.951923
74
0.653619
import numpy as np import matplotlib.pyplot as plt from sklearn.decomposition import PCA import scipy.interpolate as interp from TDA import * from SlidingWindow import * from MusicFeatures import * import scipy.io.wavfile if __name__ == '__main__': FsMusic, XMusic = scipy.io.wavfile.read("journey.wav") F...
true
true
1c0320d0effaf4ce627fe70f905c81bb7a7f6be0
6,311
py
Python
test/units/modules/network/os10/test_os10_config.py
pprakashsamy/dellemc_networking.os10
c4e667851d189c04fd3e4faf33da45b7485f3929
[ "Apache-2.0" ]
null
null
null
test/units/modules/network/os10/test_os10_config.py
pprakashsamy/dellemc_networking.os10
c4e667851d189c04fd3e4faf33da45b7485f3929
[ "Apache-2.0" ]
null
null
null
test/units/modules/network/os10/test_os10_config.py
pprakashsamy/dellemc_networking.os10
c4e667851d189c04fd3e4faf33da45b7485f3929
[ "Apache-2.0" ]
null
null
null
# # (c) 2020 Red Hat Inc. # # (c) 2020 Dell Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ve...
41.794702
97
0.693076
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from units.compat.mock import patch from ansible_collections.dellemc_networking.os10.plugins.modules import os10_config from units.modules.utils import set_module_args from .os10_module import TestDellos10Module, load_fixture cl...
true
true
1c03217ba072a80dfb381dc6b165db40e83dfec1
5,036
py
Python
chmap/examples/LBCC_calc_pipeline.py
predsci/CHD
35f29d1b62861f4ffed57b38d18689b282664bcf
[ "Apache-2.0" ]
3
2021-06-29T00:23:47.000Z
2021-09-17T18:29:05.000Z
chmap/examples/LBCC_calc_pipeline.py
predsci/CHD
35f29d1b62861f4ffed57b38d18689b282664bcf
[ "Apache-2.0" ]
null
null
null
chmap/examples/LBCC_calc_pipeline.py
predsci/CHD
35f29d1b62861f4ffed57b38d18689b282664bcf
[ "Apache-2.0" ]
1
2021-12-08T06:26:18.000Z
2021-12-08T06:26:18.000Z
""" Example of Limb Brightening Correction Coefficient (LBCC) calculation """ import os import time import datetime import numpy as np import chmap.database.db_classes as db_class from chmap.database.db_funs import init_db_conn import chmap.data.corrections.lbcc.LBCC_theoretic_funcs as lbcc_funcs start_time_tot = ti...
44.566372
119
0.71525
import os import time import datetime import numpy as np import chmap.database.db_classes as db_class from chmap.database.db_funs import init_db_conn import chmap.data.corrections.lbcc.LBCC_theoretic_funcs as lbcc_funcs start_time_tot = time.time() hist_query_time_min = datetime.datetime(2011, 1, 1, 0, 0, 0) hist_...
true
true
1c0321f9d7d668c68212cb3de8330ca46190e2c0
9,523
py
Python
qiskit/providers/ibmq/api/rest/runtime.py
yoshida-ryuhei/qiskit-ibmq-provider
2ef10178dcd242dd38971e43749dcc49b8e9dd0d
[ "Apache-2.0" ]
null
null
null
qiskit/providers/ibmq/api/rest/runtime.py
yoshida-ryuhei/qiskit-ibmq-provider
2ef10178dcd242dd38971e43749dcc49b8e9dd0d
[ "Apache-2.0" ]
null
null
null
qiskit/providers/ibmq/api/rest/runtime.py
yoshida-ryuhei/qiskit-ibmq-provider
2ef10178dcd242dd38971e43749dcc49b8e9dd0d
[ "Apache-2.0" ]
1
2022-03-24T04:59:34.000Z
2022-03-24T04:59:34.000Z
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
28.426866
93
0.543001
import logging from typing import Dict, Any, Union, Optional import json from concurrent import futures from .base import RestAdapterBase from ..session import RetrySession from ...runtime.utils import RuntimeEncoder logger = logging.getLogger(__name__) class Runtime(RestAdapterBase): URL_MAP = { 'pr...
true
true
1c0322453c1afbf73bbf919679de75d76d9996f7
3,132
py
Python
examples/Mansell/TrackPlot.py
Rapid-Design-of-Systems-Laboratory/beluga-legacy
d14713d8211b64293c4427005cf02fbd58630598
[ "MIT" ]
1
2019-03-26T03:00:03.000Z
2019-03-26T03:00:03.000Z
examples/Mansell/TrackPlot.py
Rapid-Design-of-Systems-Laboratory/beluga-legacy
d14713d8211b64293c4427005cf02fbd58630598
[ "MIT" ]
null
null
null
examples/Mansell/TrackPlot.py
Rapid-Design-of-Systems-Laboratory/beluga-legacy
d14713d8211b64293c4427005cf02fbd58630598
[ "MIT" ]
1
2019-07-14T22:53:52.000Z
2019-07-14T22:53:52.000Z
#=============================================================================== # Plots optimal route through Geotiff terrain #=============================================================================== import gdal import dill from math import * import matplotlib.pyplot as plt from PIL import Image import numpy as...
33.677419
101
0.661877
import gdal import dill from math import * import matplotlib.pyplot as plt from PIL import Image import numpy as np from scipy import interpolate import scipy.ndimage as ndimage from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm f = open('data.dill','rb') out=dill.load(f) f.close() xsol=out['solution'][...
true
true
1c03259928e991f784a71b4c2a92f850cdbede83
316
py
Python
backend/main.py
DhiraPT111/TMJC_tech_for_good
866c787c827ecf6db5ba66ab5ab902f3a3d0a758
[ "MIT" ]
null
null
null
backend/main.py
DhiraPT111/TMJC_tech_for_good
866c787c827ecf6db5ba66ab5ab902f3a3d0a758
[ "MIT" ]
null
null
null
backend/main.py
DhiraPT111/TMJC_tech_for_good
866c787c827ecf6db5ba66ab5ab902f3a3d0a758
[ "MIT" ]
2
2020-08-30T11:00:55.000Z
2020-12-02T14:10:53.000Z
"""Runs the backend.""" import sys import classifier import object_detector def main(argv): image = b'asdf' screen = object_detector.DetectScreen(image) what_is_on_the_screen = classifier.ClassifyScreen(screen) print('got screen type', what_is_on_the_screen) if __name__ == '__main__': main(sys.argv)
18.588235
59
0.753165
import sys import classifier import object_detector def main(argv): image = b'asdf' screen = object_detector.DetectScreen(image) what_is_on_the_screen = classifier.ClassifyScreen(screen) print('got screen type', what_is_on_the_screen) if __name__ == '__main__': main(sys.argv)
true
true
1c0326adfb883fd8188e9c5863fdf9a7bab1152d
1,361
py
Python
auto_encoder/train_autoencoder_all.py
kourgeorge/deep_anomalies
04352a2a49197ec8cf3a2165014d79e3cf0511be
[ "MIT" ]
null
null
null
auto_encoder/train_autoencoder_all.py
kourgeorge/deep_anomalies
04352a2a49197ec8cf3a2165014d79e3cf0511be
[ "MIT" ]
null
null
null
auto_encoder/train_autoencoder_all.py
kourgeorge/deep_anomalies
04352a2a49197ec8cf3a2165014d79e3cf0511be
[ "MIT" ]
null
null
null
import auto_encoder.network as network import tensorflow as tf import utils import numpy as np num_epochs = 30 batch_size = 100 model_path = "./model/model.ckpt" saver = tf.train.Saver() with tf.Session() as sess: sess.run(network.init) num_iterations = int(utils.mnist.train.num_examples / batch_size) ...
34.025
123
0.663483
import auto_encoder.network as network import tensorflow as tf import utils import numpy as np num_epochs = 30 batch_size = 100 model_path = "./model/model.ckpt" saver = tf.train.Saver() with tf.Session() as sess: sess.run(network.init) num_iterations = int(utils.mnist.train.num_examples / batch_size) ...
true
true
1c032869dad4469c0b9c16bf78cb3f575d604fda
18,787
py
Python
app/auth/service.py
Anti-Counter021/Anti-YouTube-back-end
eca9b26b4a1feb7e516c0164e86c5d6444af8db5
[ "MIT" ]
null
null
null
app/auth/service.py
Anti-Counter021/Anti-YouTube-back-end
eca9b26b4a1feb7e516c0164e86c5d6444af8db5
[ "MIT" ]
null
null
null
app/auth/service.py
Anti-Counter021/Anti-YouTube-back-end
eca9b26b4a1feb7e516c0164e86c5d6444af8db5
[ "MIT" ]
null
null
null
from datetime import datetime from typing import Dict, Any, List, Union from uuid import uuid4 from fastapi import status, HTTPException, UploadFile, Request from fastapi.responses import RedirectResponse from passlib.utils import generate_password from pyotp import TOTP, random_base32 from sqlalchemy.ext.asyncio impo...
32.169521
120
0.646511
from datetime import datetime from typing import Dict, Any, List, Union from uuid import uuid4 from fastapi import status, HTTPException, UploadFile, Request from fastapi.responses import RedirectResponse from passlib.utils import generate_password from pyotp import TOTP, random_base32 from sqlalchemy.ext.asyncio impo...
true
true
1c0329607c5a80f1ac808217cb6fec583e2a5252
15,468
py
Python
python/ccxt/async_support/exx.py
diwenshi61/ccxt
ebdda10e7c4ed8841d572f3bfe198b5f0e949cf6
[ "MIT" ]
2
2019-05-30T21:49:40.000Z
2019-05-31T13:12:23.000Z
python/ccxt/async_support/exx.py
diwenshi61/ccxt
ebdda10e7c4ed8841d572f3bfe198b5f0e949cf6
[ "MIT" ]
1
2021-01-27T12:10:31.000Z
2021-01-27T12:11:16.000Z
python/ccxt/async_support/exx.py
diwenshi61/ccxt
ebdda10e7c4ed8841d572f3bfe198b5f0e949cf6
[ "MIT" ]
1
2021-02-03T10:27:04.000Z
2021-02-03T10:27:04.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange import hashlib import math from ccxt.base.errors import ExchangeError from ccxt.base....
35.722864
126
0.470261
from ccxt.async_support.base.exchange import Exchange import hashlib import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import ExchangeNotAvailable class exx(Exchange): def describe(self): ...
true
true
1c0329ea50bebf804909d285fa12673c2d60425e
27,411
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/passcriteria_446b54559dd1d3cb17c92e6361a2603a.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/passcriteria_446b54559dd1d3cb17c92e6361a2603a.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/passcriteria_446b54559dd1d3cb17c92e6361a2603a.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, ...
46.068908
654
0.638795
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files from typing import List, Any, Union class PassCriteria(Base): __slots__ = () _SDM_NAME = 'passCriteria' _SDM_ATT_MAP = { 'DataErrorThresholdMode': 'dataErrorThresholdMode', 'DataErrorThresholdValue': ...
true
true
1c032a338e02ee56710bf718519c7ced8db43724
3,086
py
Python
plastex/unittests/DOM/Document.py
lisiynos/lisiynos.github.io
5900ee6ab0055a8047dd2b54b8667d05f3a145c2
[ "MIT" ]
1
2019-03-02T17:20:25.000Z
2019-03-02T17:20:25.000Z
plastex/unittests/DOM/Document.py
lisiynos/lisiynos.github.io
5900ee6ab0055a8047dd2b54b8667d05f3a145c2
[ "MIT" ]
null
null
null
plastex/unittests/DOM/Document.py
lisiynos/lisiynos.github.io
5900ee6ab0055a8047dd2b54b8667d05f3a145c2
[ "MIT" ]
null
null
null
#!/usr/bin/env python import unittest from unittest import TestCase from plasTeX.DOM import * class DocumentTest(TestCase): def testCreateElement(self): doc = Document() node = doc.createAttribute('node') assert isinstance(node, Node) assert node.nodeName == 'node' def testCr...
27.309735
60
0.587816
import unittest from unittest import TestCase from plasTeX.DOM import * class DocumentTest(TestCase): def testCreateElement(self): doc = Document() node = doc.createAttribute('node') assert isinstance(node, Node) assert node.nodeName == 'node' def testCreateDocumentFragment(s...
true
true
1c032d4bd00e0f8945d8225ad6e4c8ca25b7a898
5,212
py
Python
rita/parser.py
rolandmueller/rita-dsl
d0457fcf220baaf7fa8f647bab36b5ff5ea9367b
[ "MIT" ]
66
2019-07-17T05:23:04.000Z
2022-03-15T12:06:06.000Z
rita/parser.py
rolandmueller/rita-dsl
d0457fcf220baaf7fa8f647bab36b5ff5ea9367b
[ "MIT" ]
90
2019-07-18T10:21:13.000Z
2021-11-09T19:54:57.000Z
rita/parser.py
rolandmueller/rita-dsl
d0457fcf220baaf7fa8f647bab36b5ff5ea9367b
[ "MIT" ]
3
2020-08-20T06:57:11.000Z
2022-03-03T16:11:45.000Z
import logging import ply.yacc as yacc from functools import partial from rita.lexer import RitaLexer from rita import macros logger = logging.getLogger(__name__) def stub(*args, **kwargs): return None def either(a, b): yield a yield b def load_macro(name, config): try: return partial(...
26.06
84
0.521489
import logging import ply.yacc as yacc from functools import partial from rita.lexer import RitaLexer from rita import macros logger = logging.getLogger(__name__) def stub(*args, **kwargs): return None def either(a, b): yield a yield b def load_macro(name, config): try: return partial(...
true
true
1c032f363f0a4c1c4f56124c2cd7ecaca58fb6ac
3,802
py
Python
var/spack/repos/builtin/packages/matlab/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-10T13:47:48.000Z
2019-04-17T13:05:17.000Z
var/spack/repos/builtin/packages/matlab/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
17
2019-03-21T15:54:00.000Z
2022-03-29T19:34:28.000Z
var/spack/repos/builtin/packages/matlab/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2018-04-06T09:04:11.000Z
2020-01-24T12:52:12.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) from spack import * import os import subprocess class Matlab(Package): """MATLAB (MATrix LABoratory) is a multi-para...
40.446809
103
0.678064
from spack import * import os import subprocess class Matlab(Package): homepage = "https://www.mathworks.com/products/matlab.html" manual_download = True version('R2019b', sha256='d60787263afb810283b7820c4c8d9cb1f854c7cb80f47e136643fd95bf5fbd59') version('R2018b', sha256='8cfcddd3878d3a69371c4e8387...
true
true
1c032f57667b0e03571cee6130b6fa8a14688c92
59,488
py
Python
chia/daemon/server.py
ageorge95/chia-blockchain
55f453d1e84d544ecad1b5c7a59c4439a6cbe1fa
[ "Apache-2.0" ]
null
null
null
chia/daemon/server.py
ageorge95/chia-blockchain
55f453d1e84d544ecad1b5c7a59c4439a6cbe1fa
[ "Apache-2.0" ]
3
2022-03-21T22:00:11.000Z
2022-03-21T22:00:40.000Z
chia/daemon/server.py
ageorge95/chia-blockchain
55f453d1e84d544ecad1b5c7a59c4439a6cbe1fa
[ "Apache-2.0" ]
null
null
null
import asyncio import json import logging import os import signal import ssl import subprocess import sys import time import traceback import uuid from concurrent.futures import ThreadPoolExecutor from enum import Enum from pathlib import Path from typing import Any, Dict, List, Optional, TextIO, Tuple, cast from webs...
39.500664
116
0.615603
import asyncio import json import logging import os import signal import ssl import subprocess import sys import time import traceback import uuid from concurrent.futures import ThreadPoolExecutor from enum import Enum from pathlib import Path from typing import Any, Dict, List, Optional, TextIO, Tuple, cast from webs...
true
true
1c032f6e83fac8351f2fd2037673651e86b4b90f
1,798
py
Python
tencentcloud/mgobe/v20190929/models.py
xuzixx/tencentcloud-sdk-python
98866ab9fd104cd6475b62fe78ff3fffd96d5ce0
[ "Apache-2.0" ]
null
null
null
tencentcloud/mgobe/v20190929/models.py
xuzixx/tencentcloud-sdk-python
98866ab9fd104cd6475b62fe78ff3fffd96d5ce0
[ "Apache-2.0" ]
null
null
null
tencentcloud/mgobe/v20190929/models.py
xuzixx/tencentcloud-sdk-python
98866ab9fd104cd6475b62fe78ff3fffd96d5ce0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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...
28.539683
82
0.651279
import warnings from tencentcloud.common.abstract_model import AbstractModel class DismissRoomRequest(AbstractModel): def __init__(self): self.GameId = None self.RoomId = None def _deserialize(self, params): self.GameId = params.get("GameId") self.RoomId = params.get("Room...
true
true
1c03309d6743b778c1e9a2b5dd16c5503f2340fa
9,193
py
Python
tests/redis/test_impl.py
AndreMiras/async-caches
d87ffc4d154617acc1622e21db536d9062be8cc4
[ "BSD-3-Clause" ]
29
2019-07-14T15:07:47.000Z
2022-03-20T14:41:14.000Z
tests/redis/test_impl.py
AndreMiras/async-caches
d87ffc4d154617acc1622e21db536d9062be8cc4
[ "BSD-3-Clause" ]
11
2019-07-14T03:29:08.000Z
2021-06-13T11:27:30.000Z
tests/redis/test_impl.py
AndreMiras/async-caches
d87ffc4d154617acc1622e21db536d9062be8cc4
[ "BSD-3-Clause" ]
4
2019-11-03T18:27:41.000Z
2021-05-19T07:55:33.000Z
import asyncio import pytest @pytest.mark.asyncio async def test_set_key_can_be_get(cache): await cache.set("test", "Ok!") assert await cache.get("test") == "Ok!" @pytest.mark.asyncio async def test_set_key_can_be_dict(cache): await cache.set("test", {"hello": "world"}) assert await cache.get("test...
28.908805
82
0.706298
import asyncio import pytest @pytest.mark.asyncio async def test_set_key_can_be_get(cache): await cache.set("test", "Ok!") assert await cache.get("test") == "Ok!" @pytest.mark.asyncio async def test_set_key_can_be_dict(cache): await cache.set("test", {"hello": "world"}) assert await cache.get("test...
true
true
1c0330a4be17d83b63989016c7f5a7af0d977af9
5,726
py
Python
var/spack/repos/builtin/packages/binutils/package.py
ajw1980/spack
a81106757db553f8870224856e51d9ac50c2a138
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/binutils/package.py
ajw1980/spack
a81106757db553f8870224856e51d9ac50c2a138
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/binutils/package.py
ajw1980/spack
a81106757db553f8870224856e51d9ac50c2a138
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import glob import sys class Binutils(AutotoolsPackage, GNUMirrorPackage): """GNU binutils, whic...
43.052632
96
0.660147
from spack import * import glob import sys class Binutils(AutotoolsPackage, GNUMirrorPackage): homepage = "http://www.gnu.org/software/binutils/" gnu_mirror_path = "binutils/binutils-2.28.tar.bz2" version('2.35', sha256='7d24660f87093670738e58bcc7b7b06f121c0fcb0ca8fc44368d675a5ef9cff7') version('2....
true
true
1c033234b9b8ada56edb1e67c67772e483ab544a
6,127
py
Python
examples/NUG_unstructured_contour_cellfill_PyNGL.py
yang69can/pyngl
78a7040ce9de4b7a442b0c3b5faecccab2f01426
[ "Apache-2.0" ]
125
2016-11-24T09:04:28.000Z
2022-01-22T14:06:56.000Z
examples/NUG_unstructured_contour_cellfill_PyNGL.py
yang69can/pyngl
78a7040ce9de4b7a442b0c3b5faecccab2f01426
[ "Apache-2.0" ]
52
2017-11-08T23:23:02.000Z
2022-03-20T03:17:39.000Z
examples/NUG_unstructured_contour_cellfill_PyNGL.py
yang69can/pyngl
78a7040ce9de4b7a442b0c3b5faecccab2f01426
[ "Apache-2.0" ]
25
2017-08-27T10:50:43.000Z
2022-01-29T14:56:05.000Z
# # File: # NUG_unstructured_contour_cellfill_PyNGL.py # # Synopsis: # Illustrates how to create cell-filled contours of unstructured data # # Categories: # contour plots # # Author: # Karin Meier-Fleischer # # Date of initial publication: # August 2015 # # Description: # This example shows ho...
37.588957
103
0.522931
from __future__ import print_function import numpy as np import math, time import sys,os import Ngl,Nio t1 = time.time() print("") diri = "./" fname = "ta_ps_850.nc" gname = "r2b4_amip.nc" ...
true
true
1c0332730c1e6ce1068b2fd4fe72fc630ba88fb1
794
py
Python
setup.py
ruizca/sixty
11bd3c0e7291fa7a5892db221f69ea472e610e76
[ "BSD-3-Clause" ]
null
null
null
setup.py
ruizca/sixty
11bd3c0e7291fa7a5892db221f69ea472e610e76
[ "BSD-3-Clause" ]
null
null
null
setup.py
ruizca/sixty
11bd3c0e7291fa7a5892db221f69ea472e610e76
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name="sixty", version="0.1", author="Angel Ruiz", author_email="angel.ruizca@gmail.com", description="Python wrapper for SIXTE", long_description=long_description, long_description_conte...
29.407407
55
0.628463
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name="sixty", version="0.1", author="Angel Ruiz", author_email="angel.ruizca@gmail.com", description="Python wrapper for SIXTE", long_description=long_description, long_description_conte...
true
true
1c0332ab43a0db40737639467b590e66cc0805db
12,225
py
Python
bench/bench.py
itcuihao/nsq-note
936ff05043f34204241ac62b5b8aa328724bec80
[ "MIT" ]
1
2019-03-27T09:59:44.000Z
2019-03-27T09:59:44.000Z
bench/bench.py
itcuihao/nsq-note
936ff05043f34204241ac62b5b8aa328724bec80
[ "MIT" ]
null
null
null
bench/bench.py
itcuihao/nsq-note
936ff05043f34204241ac62b5b8aa328724bec80
[ "MIT" ]
null
null
null
#!/usr/bin/env python import sys import logging import time import datetime import socket import warnings import hashlib import boto.ec2 import paramiko.client import paramiko.ssh_exception import tornado.options def ssh_connect_with_retries(host, retries=3, timeout=30): for i in range(retries): try: ...
38.203125
103
0.573661
import sys import logging import time import datetime import socket import warnings import hashlib import boto.ec2 import paramiko.client import paramiko.ssh_exception import tornado.options def ssh_connect_with_retries(host, retries=3, timeout=30): for i in range(retries): try: ssh_client = ...
true
true
1c0332b2cfef7f79fc7058fd926fc1e3e7828ecd
3,030
py
Python
nuvolaris/openwhisk.py
nuvolaris/nuvolaris-operator
4347ddbdbeccd39f5a839b8f650c6340218fe014
[ "Apache-2.0" ]
5
2021-11-30T12:10:16.000Z
2022-01-01T18:36:48.000Z
nuvolaris/openwhisk.py
nuvolaris/nuvolaris-operator
4347ddbdbeccd39f5a839b8f650c6340218fe014
[ "Apache-2.0" ]
9
2021-11-24T10:12:34.000Z
2022-03-05T19:08:08.000Z
nuvolaris/openwhisk.py
nuvolaris/nuvolaris-operator
4347ddbdbeccd39f5a839b8f650c6340218fe014
[ "Apache-2.0" ]
14
2021-11-30T20:09:20.000Z
2022-03-06T21:47:57.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
42.083333
104
0.708911
import nuvolaris.kustomize as kus import nuvolaris.kube as kube import nuvolaris.config as cfg import os, os.path import urllib.parse import logging import kopf CONTROLLER_SPEC = "state.controller.spec" def apihost(apiHost): url = urllib.parse.urlparse("https://pending") if len(apiHost) > 0 and "hostname" in ...
true
true
1c03331bb392ef61efd393bf508f02e6ce3f2864
5,876
py
Python
Src/StdLib/Lib/test/test_defaultdict.py
cwensley/ironpython2
f854444e1e08afc8850cb7c1a739a7dd2d10d32a
[ "Apache-2.0" ]
1,078
2016-07-19T02:48:30.000Z
2022-03-30T21:22:34.000Z
Src/StdLib/Lib/test/test_defaultdict.py
cwensley/ironpython2
f854444e1e08afc8850cb7c1a739a7dd2d10d32a
[ "Apache-2.0" ]
576
2017-05-21T12:36:48.000Z
2022-03-30T13:47:03.000Z
Src/StdLib/Lib/test/test_defaultdict.py
cwensley/ironpython2
f854444e1e08afc8850cb7c1a739a7dd2d10d32a
[ "Apache-2.0" ]
269
2017-05-21T04:44:47.000Z
2022-03-31T16:18:13.000Z
"""Unit tests for collections.defaultdict.""" import sys import os import copy import tempfile import unittest from test import test_support from collections import defaultdict def foobar(): return list class TestDefaultDict(unittest.TestCase): def test_basic(self): d1 = defaultdict() self....
31.934783
76
0.562287
"""Unit tests for collections.defaultdict.""" import sys import os import copy import tempfile import unittest from test import test_support from collections import defaultdict def foobar(): return list class TestDefaultDict(unittest.TestCase): def test_basic(self): d1 = defaultdict() self....
false
true
1c03339ced9afb33fd59b203db15b58cc63553fc
9,026
py
Python
pressurecooker/subtitles.py
kollivier/pressurecooker
a0f3cc3582dab6436aae7ab614b68c0ec4ca4f87
[ "MIT" ]
14
2017-01-10T09:33:03.000Z
2021-11-28T12:11:27.000Z
pressurecooker/subtitles.py
kollivier/pressurecooker
a0f3cc3582dab6436aae7ab614b68c0ec4ca4f87
[ "MIT" ]
174
2016-09-29T17:32:54.000Z
2022-03-29T15:02:48.000Z
pressurecooker/subtitles.py
kollivier/pressurecooker
a0f3cc3582dab6436aae7ab614b68c0ec4ca4f87
[ "MIT" ]
41
2016-08-29T23:26:17.000Z
2021-11-29T17:12:03.000Z
import codecs from pycaption import CaptionSet, WebVTTWriter from pycaption import WebVTTReader, SRTReader, SAMIReader, SCCReader, DFXPReader from pycaption import CaptionReadError, CaptionReadNoCaptions from pycaption.base import DEFAULT_LANGUAGE_CODE from le_utils.constants import file_formats LANGUAGE_CODE_UNKNOWN...
34.060377
98
0.684024
import codecs from pycaption import CaptionSet, WebVTTWriter from pycaption import WebVTTReader, SRTReader, SAMIReader, SCCReader, DFXPReader from pycaption import CaptionReadError, CaptionReadNoCaptions from pycaption.base import DEFAULT_LANGUAGE_CODE from le_utils.constants import file_formats LANGUAGE_CODE_UNKNOWN...
true
true
1c0334bb1e018eac6982d9566cf0992bc33927fa
1,585
py
Python
setup.py
velovix/debutizer
a56f269881e70cd50feea32134b2fa0e0d93a20c
[ "BSD-3-Clause" ]
2
2022-03-08T01:53:20.000Z
2022-03-08T01:53:26.000Z
setup.py
velovix/debutizer
a56f269881e70cd50feea32134b2fa0e0d93a20c
[ "BSD-3-Clause" ]
64
2021-10-19T01:03:43.000Z
2022-01-02T18:42:46.000Z
setup.py
velovix/debutizer
a56f269881e70cd50feea32134b2fa0e0d93a20c
[ "BSD-3-Clause" ]
null
null
null
from pathlib import Path from setuptools import find_packages, setup repository_root = Path(__file__).parent long_description = (repository_root / "README.md").read_text() setup( name="debutizer", version="0.12.1", description="A tool for managing APT packages", long_description=long_description, ...
26.416667
62
0.556467
from pathlib import Path from setuptools import find_packages, setup repository_root = Path(__file__).parent long_description = (repository_root / "README.md").read_text() setup( name="debutizer", version="0.12.1", description="A tool for managing APT packages", long_description=long_description, ...
true
true
1c03355ea71c324420147fcedcc9cd197b82d9e1
2,749
py
Python
workbench/scenarios.py
denmonz/xblock-sdk
976a3c12cde8f712b713b277a80b5d3b7ac0c674
[ "Apache-2.0" ]
50
2015-01-16T06:25:08.000Z
2021-10-02T15:45:37.000Z
workbench/scenarios.py
denmonz/xblock-sdk
976a3c12cde8f712b713b277a80b5d3b7ac0c674
[ "Apache-2.0" ]
122
2015-01-07T16:38:54.000Z
2021-12-19T18:33:38.000Z
workbench/scenarios.py
denmonz/xblock-sdk
976a3c12cde8f712b713b277a80b5d3b7ac0c674
[ "Apache-2.0" ]
79
2015-01-14T18:23:29.000Z
2021-09-14T17:27:13.000Z
"""Example scenarios to display in the workbench. This code is in the Workbench layer. """ import logging from collections import namedtuple from xblock.core import XBlock from django.conf import settings from django.template.defaultfilters import slugify from .runtime import WORKBENCH_KVS, WorkbenchRuntime log...
29.244681
81
0.689705
import logging from collections import namedtuple from xblock.core import XBlock from django.conf import settings from django.template.defaultfilters import slugify from .runtime import WORKBENCH_KVS, WorkbenchRuntime log = logging.getLogger(__name__) Scenario = namedtuple("Scenario", "description usage_id xml"...
true
true
1c0339b50179c716da34a15ee358d981e888d146
3,362
py
Python
test/audit_logs/test_audit_log.py
data-exp-lab/girder
25e5847eaefec75f02c83f8d46aa55dcc59acb01
[ "Apache-2.0" ]
1
2019-11-14T18:13:26.000Z
2019-11-14T18:13:26.000Z
test/audit_logs/test_audit_log.py
data-exp-lab/girder
25e5847eaefec75f02c83f8d46aa55dcc59acb01
[ "Apache-2.0" ]
1
2021-11-10T17:00:12.000Z
2021-11-10T17:00:12.000Z
test/audit_logs/test_audit_log.py
data-exp-lab/girder
25e5847eaefec75f02c83f8d46aa55dcc59acb01
[ "Apache-2.0" ]
3
2018-05-21T19:45:19.000Z
2019-04-08T19:53:07.000Z
import datetime import pytest import six from girder import auditLogger from girder.models.file import File from girder.models.folder import Folder from girder.models.upload import Upload from girder.models.user import User @pytest.fixture def recordModel(): from girder.plugins.audit_logs import Record yield ...
30.288288
87
0.657942
import datetime import pytest import six from girder import auditLogger from girder.models.file import File from girder.models.folder import Folder from girder.models.upload import Upload from girder.models.user import User @pytest.fixture def recordModel(): from girder.plugins.audit_logs import Record yield ...
true
true
1c0339f11e97f2522f9c2014a5edbe452484ac66
589
py
Python
test/oslib_test.py
shi-cong/review
c8da7128ea18ecaa5849f2066d321e70d6f97f70
[ "Apache-2.0" ]
8
2017-10-22T00:24:42.000Z
2017-11-24T01:23:52.000Z
test/oslib_test.py
shi-cong/review
c8da7128ea18ecaa5849f2066d321e70d6f97f70
[ "Apache-2.0" ]
2
2017-10-12T22:04:25.000Z
2017-10-12T23:43:48.000Z
test/oslib_test.py
shi-cong/review
c8da7128ea18ecaa5849f2066d321e70d6f97f70
[ "Apache-2.0" ]
null
null
null
from PYSTUDY.unittestlib import TestCase, run_one_test import import_module from PYSTUDY.oslib import parent_dir, listdir, getsize class OSlibTestCase(TestCase): def test_parent_dir(self): cwd = __file__ print('cwd:', cwd) print(parent_dir(cwd)) prd = parent_dir("/PYSTUDY/a") ...
24.541667
54
0.645161
from PYSTUDY.unittestlib import TestCase, run_one_test import import_module from PYSTUDY.oslib import parent_dir, listdir, getsize class OSlibTestCase(TestCase): def test_parent_dir(self): cwd = __file__ print('cwd:', cwd) print(parent_dir(cwd)) prd = parent_dir("/PYSTUDY/a") ...
true
true
1c033a16650023da5af2953a6b7a8c668aec3688
2,998
py
Python
sdk/python/pulumi_aws/ram/principal_association.py
Charliekenney23/pulumi-aws
55bd0390160d27350b297834026fee52114a2d41
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ram/principal_association.py
Charliekenney23/pulumi-aws
55bd0390160d27350b297834026fee52114a2d41
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ram/principal_association.py
Charliekenney23/pulumi-aws
55bd0390160d27350b297834026fee52114a2d41
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from .. import utilities, tables class PrincipalAssociation(pulumi.Cus...
44.746269
220
0.695464
import json import warnings import pulumi import pulumi.runtime from .. import utilities, tables class PrincipalAssociation(pulumi.CustomResource): principal: pulumi.Output[str] resource_share_arn: pulumi.Output[str] def __init__(__self__, resource_name, opts=None, principal=None, resource_share_arn=None,...
true
true
1c033a471a3d2458f2ef034f4ef444d6952d0e46
1,708
py
Python
tests/st/ops/gpu/test_flatten_op.py
ythlml/mindspore
028ae212624164044cfaa84f347fc502cb7fcb0f
[ "Apache-2.0" ]
7
2020-05-24T03:19:26.000Z
2020-05-24T03:20:00.000Z
tests/st/ops/gpu/test_flatten_op.py
ythlml/mindspore
028ae212624164044cfaa84f347fc502cb7fcb0f
[ "Apache-2.0" ]
null
null
null
tests/st/ops/gpu/test_flatten_op.py
ythlml/mindspore
028ae212624164044cfaa84f347fc502cb7fcb0f
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Huawei Technologies Co., Ltd # # 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...
31.62963
81
0.662178
import numpy as np import pytest import mindspore.context as context import mindspore.nn as nn from mindspore import Tensor from mindspore.ops import operations as P class NetFlatten(nn.Cell): def __init__(self): super(NetFlatten, self).__init__() self.flatten = P.Flatten() def construct(se...
true
true
1c033aad5680ab9205d5289e695ea4901fc15ddb
7,448
py
Python
UQ/uqtkScripts/file_utils.py
ORNL-Fusion/xolotl
993434bea0d3bca439a733a12af78034c911690c
[ "BSD-3-Clause" ]
13
2018-06-13T18:08:57.000Z
2021-09-30T02:39:01.000Z
UQ/uqtkScripts/file_utils.py
ORNL-Fusion/xolotl
993434bea0d3bca439a733a12af78034c911690c
[ "BSD-3-Clause" ]
97
2018-02-14T15:24:08.000Z
2022-03-29T16:29:48.000Z
UQ/uqtkScripts/file_utils.py
ORNL-Fusion/xolotl
993434bea0d3bca439a733a12af78034c911690c
[ "BSD-3-Clause" ]
18
2018-02-13T20:36:03.000Z
2022-01-04T14:54:16.000Z
#!/usr/bin/env python #===================================================================================== # The UQ Toolkit (UQTk) version 2.0 # Copyright (2013) Sandia Corporation # http://www.sandia.gov/UQToolkit/ # # Copyright (2013) Sandia Corporation....
35.807692
106
0.625134
import sys import numpy as np def extract_vars(samples_file_name,n_burnin,v_names,debug,stride=1): """From a file with samples in ascii format, with the first line containing the label for each column, extract the columns with the labels in v_names and return them in a numpy array. Remove n_burnin sa...
false
true
1c033b431e4c1cc57f6d18d1b44b970e0da27ea8
5,638
py
Python
Convolutional Neural Networks/ensemble/ensemble.py
swapnil96/ML-NeuralNetworks
025b6990e4a43989e865ca72425958cfd33a06b5
[ "MIT" ]
null
null
null
Convolutional Neural Networks/ensemble/ensemble.py
swapnil96/ML-NeuralNetworks
025b6990e4a43989e865ca72425958cfd33a06b5
[ "MIT" ]
null
null
null
Convolutional Neural Networks/ensemble/ensemble.py
swapnil96/ML-NeuralNetworks
025b6990e4a43989e865ca72425958cfd33a06b5
[ "MIT" ]
null
null
null
import numpy as np from keras.models import Sequential, Model, Input from keras.models import load_model from sklearn.utils import shuffle from keras.utils.np_utils import to_categorical from keras.layers import Dense, Dropout, Activation, Flatten, Average from keras.optimizers import Adam from keras.layers.normalizati...
32.034091
86
0.660695
import numpy as np from keras.models import Sequential, Model, Input from keras.models import load_model from sklearn.utils import shuffle from keras.utils.np_utils import to_categorical from keras.layers import Dense, Dropout, Activation, Flatten, Average from keras.optimizers import Adam from keras.layers.normalizati...
true
true
1c033b710003b469bbce155d506836c5e73f8633
11,049
py
Python
exifread/__init__.py
spectralskylight/skydataviewer
ac45fde11fb2cd1daa3f09bc30c2fad9391438df
[ "BSD-3-Clause" ]
1
2019-04-24T12:44:18.000Z
2019-04-24T12:44:18.000Z
exifread/__init__.py
spectralskylight/skydataviewer
ac45fde11fb2cd1daa3f09bc30c2fad9391438df
[ "BSD-3-Clause" ]
1
2020-06-17T01:58:35.000Z
2021-04-28T01:57:07.000Z
exifread/__init__.py
spectralskylight/skydataviewer
ac45fde11fb2cd1daa3f09bc30c2fad9391438df
[ "BSD-3-Clause" ]
4
2020-02-03T23:05:00.000Z
2021-04-28T02:28:43.000Z
""" Read Exif metadata from tiff and jpeg files. """ from .exif_log import get_logger from .classes import * from .tags import * from .utils import ord_ __version__ = '2.1.2' logger = get_logger() def increment_base(data, base): return ord_(data[base + 2]) * 256 + ord_(data[base + 3]) + 2 def process_file(f,...
42.011407
122
0.499321
from .exif_log import get_logger from .classes import * from .tags import * from .utils import ord_ __version__ = '2.1.2' logger = get_logger() def increment_base(data, base): return ord_(data[base + 2]) * 256 + ord_(data[base + 3]) + 2 def process_file(f, stop_tag=DEFAULT_STOP_TAG, details=True, strict=Fals...
true
true
1c033d10e9a8fb0613b10dab004bf079097346eb
11,609
py
Python
install/app_store/tk-maya/v0.9.1/hooks/tk-multi-publish2/basic/collector.py
JoanAzpeitia/lp_sg
e0ee79555e419dd2ae3a5f31e5515b3f40b22a62
[ "MIT" ]
null
null
null
install/app_store/tk-maya/v0.9.1/hooks/tk-multi-publish2/basic/collector.py
JoanAzpeitia/lp_sg
e0ee79555e419dd2ae3a5f31e5515b3f40b22a62
[ "MIT" ]
null
null
null
install/app_store/tk-maya/v0.9.1/hooks/tk-multi-publish2/basic/collector.py
JoanAzpeitia/lp_sg
e0ee79555e419dd2ae3a5f31e5515b3f40b22a62
[ "MIT" ]
1
2020-02-15T10:42:56.000Z
2020-02-15T10:42:56.000Z
# Copyright (c) 2017 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to ...
35.178788
80
0.585149
 import glob import os import maya.cmds as cmds import maya.mel as mel import sgtk HookBaseClass = sgtk.get_hook_baseclass() class MayaSessionCollector(HookBaseClass): """ Collector that operates on the maya session. Should inherit from the basic collector hook. """ @property def settings(s...
false
true
1c033d5f6d81d2b5d224ddebd8b33ae32cbe5824
12,199
py
Python
backend/app/app/api/api_v1/robots/config.py
H-HChen/rmt_web_devkit
ef38447320f98fbd44a330303c644d2915bf035a
[ "Apache-2.0" ]
null
null
null
backend/app/app/api/api_v1/robots/config.py
H-HChen/rmt_web_devkit
ef38447320f98fbd44a330303c644d2915bf035a
[ "Apache-2.0" ]
13
2021-05-20T02:29:19.000Z
2021-08-23T10:14:57.000Z
backend/app/app/api/api_v1/robots/config.py
H-HChen/rmt_web_devkit
ef38447320f98fbd44a330303c644d2915bf035a
[ "Apache-2.0" ]
3
2021-05-10T07:55:40.000Z
2022-02-28T16:52:01.000Z
from typing import Any, Optional from fastapi import APIRouter, Depends from sqlalchemy.orm import Session from app import models, schemas from app.api import deps from app.extensions.utils import list_to_tree from random import randint import rmt_py_wrapper import json import os import subprocess import re router =...
39.866013
156
0.690958
from typing import Any, Optional from fastapi import APIRouter, Depends from sqlalchemy.orm import Session from app import models, schemas from app.api import deps from app.extensions.utils import list_to_tree from random import randint import rmt_py_wrapper import json import os import subprocess import re router =...
true
true
1c033da4040621e5f2810a34d9c4ba488b610c2c
1,390
py
Python
test/xlog-py/dup_key.test.py
gdrbyKo1/tarantool
b299103c4e81ed520f35eb0511882369d6776d6d
[ "BSD-2-Clause" ]
1
2019-01-02T02:16:22.000Z
2019-01-02T02:16:22.000Z
test/xlog-py/dup_key.test.py
gdrbyKo1/tarantool
b299103c4e81ed520f35eb0511882369d6776d6d
[ "BSD-2-Clause" ]
null
null
null
test/xlog-py/dup_key.test.py
gdrbyKo1/tarantool
b299103c4e81ed520f35eb0511882369d6776d6d
[ "BSD-2-Clause" ]
1
2020-04-06T18:37:57.000Z
2020-04-06T18:37:57.000Z
import os import yaml #print """ #A test case for https://bugs.launchpad.net/tarantool/+bug/1052018 #panic_on_wal_error doesn't work for duplicate key errors #""" server.stop() server.deploy() server.admin("space = box.schema.space.create('test')") server.admin("index = box.space.test:create_index('primary')") serve...
25.272727
66
0.699281
import os import yaml #A test case for https://bugs.launchpad.net/tarantool/+bug/1052018 #panic_on_wal_error doesn't work for duplicate key errors #""" server.stop() server.deploy() server.admin("space = box.schema.space.create('test')") server.admin("index = box.space.test:create_index('primary')") server.admin("bo...
false
true
1c033e87d15b28d72a4465f1c07b0961c19bc625
15,264
py
Python
src/dependencies/Purchase_details.py
SohailChamadia/Digital-Assets
ca8be48cf57d7a4bdcc5af4832cbf8a807b255f8
[ "Apache-2.0" ]
1
2020-11-23T06:16:19.000Z
2020-11-23T06:16:19.000Z
src/dependencies/Purchase_details.py
SohailChamadia/Digital-Assets
ca8be48cf57d7a4bdcc5af4832cbf8a807b255f8
[ "Apache-2.0" ]
null
null
null
src/dependencies/Purchase_details.py
SohailChamadia/Digital-Assets
ca8be48cf57d7a4bdcc5af4832cbf8a807b255f8
[ "Apache-2.0" ]
null
null
null
from src.dependencies.imports import * class Purchase_details(LabelFrame): def __init__(self,master,db,flag): super(Purchase_details,self).__init__(master) self.grid() labelfont=('times',16,'bold') self.canvas = Canvas(self,bg="#bdc3c7") self.frame = LabelFrame(sel...
39.544041
92
0.461412
from src.dependencies.imports import * class Purchase_details(LabelFrame): def __init__(self,master,db,flag): super(Purchase_details,self).__init__(master) self.grid() labelfont=('times',16,'bold') self.canvas = Canvas(self,bg="#bdc3c7") self.frame = LabelFrame(sel...
true
true
1c033f2b82ca4360dfa7525ac897a6c123152c80
12,657
py
Python
Sentiment-Analysis/sent-analysis-app.py
umangtank/ML-CaPsule
e0a72c7f9f0e5733ec05f28ba1444d30276a731a
[ "MIT" ]
null
null
null
Sentiment-Analysis/sent-analysis-app.py
umangtank/ML-CaPsule
e0a72c7f9f0e5733ec05f28ba1444d30276a731a
[ "MIT" ]
null
null
null
Sentiment-Analysis/sent-analysis-app.py
umangtank/ML-CaPsule
e0a72c7f9f0e5733ec05f28ba1444d30276a731a
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import pickle import streamlit as st import base64 from PIL import Image #df = pd.read_csv('/content/drive/My Drive/amazonreviews.tsv',sep='\t') model=pickle.load(open('sentiment_analysis_model.p','rb')) st.set_page_config(page_title="Sentiment Analysis Web App",page_icon="",lay...
168.76
10,758
0.925022
import numpy as np import pandas as pd import pickle import streamlit as st import base64 from PIL import Image model=pickle.load(open('sentiment_analysis_model.p','rb')) st.set_page_config(page_title="Sentiment Analysis Web App",page_icon="",layout="centered",initial_sidebar_state="expanded",) st.title('Sentiment An...
true
true
1c033f5f2dc100dc37fcb430f2637eb4331a72f8
29,618
py
Python
test/test_pghoard.py
st3fan/sphinx-automation-experiment
c92c8400770c6c604e2451e4f1e71957fc4c5ef8
[ "Apache-2.0" ]
null
null
null
test/test_pghoard.py
st3fan/sphinx-automation-experiment
c92c8400770c6c604e2451e4f1e71957fc4c5ef8
[ "Apache-2.0" ]
null
null
null
test/test_pghoard.py
st3fan/sphinx-automation-experiment
c92c8400770c6c604e2451e4f1e71957fc4c5ef8
[ "Apache-2.0" ]
null
null
null
""" pghoard Copyright (c) 2015 Ohmu Ltd See LICENSE for details """ import datetime import io import json import os import sys import tarfile import time from pathlib import Path from unittest.mock import Mock, patch import pytest import pghoard.pghoard as pghoard_module from pghoard import common from pghoard.commo...
44.538346
124
0.605882
import datetime import io import json import os import sys import tarfile import time from pathlib import Path from unittest.mock import Mock, patch import pytest import pghoard.pghoard as pghoard_module from pghoard import common from pghoard.common import (BaseBackupFormat, FileType, create_alert_file, delete_alert...
true
true
1c033f83e94452c06504c2af69d81ebbec86d130
382
py
Python
Jumpscale/clients/etcd/EtcdFactory.py
threefoldtech/JumpscaleX
5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa
[ "Apache-2.0" ]
2
2019-05-09T07:21:25.000Z
2019-08-05T06:37:53.000Z
Jumpscale/clients/etcd/EtcdFactory.py
threefoldtech/JumpscaleX
5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa
[ "Apache-2.0" ]
664
2018-12-19T12:43:44.000Z
2019-08-23T04:24:42.000Z
Jumpscale/clients/etcd/EtcdFactory.py
threefoldtech/jumpscale10
5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa
[ "Apache-2.0" ]
7
2019-05-03T07:14:37.000Z
2019-08-05T12:36:52.000Z
from Jumpscale import j from .EtcdClient import EtcdClient JSConfigs = j.application.JSBaseConfigsClass class EtcdFactory(JSConfigs): __jslocation__ = "j.clients.etcd" _CHILDCLASS = EtcdClient def test(self): """ :return: """ # check is ubuntu 1804 # build etc...
16.608696
44
0.620419
from Jumpscale import j from .EtcdClient import EtcdClient JSConfigs = j.application.JSBaseConfigsClass class EtcdFactory(JSConfigs): __jslocation__ = "j.clients.etcd" _CHILDCLASS = EtcdClient def test(self):
true
true
1c033f9a275bc238d7d49e3b92c222f216b5df2c
1,100
py
Python
scripts/gro_to_plumedfiles.py
vymetal/ILBUS
964f0a29be4b203f2ae1840e160996fd4612f35d
[ "MIT" ]
null
null
null
scripts/gro_to_plumedfiles.py
vymetal/ILBUS
964f0a29be4b203f2ae1840e160996fd4612f35d
[ "MIT" ]
null
null
null
scripts/gro_to_plumedfiles.py
vymetal/ILBUS
964f0a29be4b203f2ae1840e160996fd4612f35d
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys print( sys.argv[0], " [index file] [list of reference structures] [ my index ] [ force constant ]", ) ndxfile = sys.argv[1] myind = int(sys.argv[3]) fc = float(sys.argv[4]) # load atomic indices for rmsd calculation, starting from 1 ndx = [] for i in open(ndxfile, "r").readlines(...
26.829268
86
0.613636
import sys print( sys.argv[0], " [index file] [list of reference structures] [ my index ] [ force constant ]", ) ndxfile = sys.argv[1] myind = int(sys.argv[3]) fc = float(sys.argv[4]) ndx = [] for i in open(ndxfile, "r").readlines(): i = i.strip().split() for x in i: ndx.append(int(x)) list0...
true
true
1c033fad6dd5e49aa9a3aa861f48db9ccfc2dc42
2,360
py
Python
sender.py
vineetred/crc
8373651c150ac1b3a6871c4c3205b031d6f26446
[ "MIT" ]
null
null
null
sender.py
vineetred/crc
8373651c150ac1b3a6871c4c3205b031d6f26446
[ "MIT" ]
null
null
null
sender.py
vineetred/crc
8373651c150ac1b3a6871c4c3205b031d6f26446
[ "MIT" ]
null
null
null
crc_32 = "100000100110000010001110110110111" #Opening the file text = open('input.txt') file_content= text.read() #Converting to binary output= ' '.join(format(ord(x), '08b') for x in file_content) #This converts the myfileStringBinary = output.replace(" ", "") #Polynomial division def remainder(inputString, divisor)...
30.649351
102
0.611864
crc_32 = "100000100110000010001110110110111" text = open('input.txt') file_content= text.read() output= ' '.join(format(ord(x), '08b') for x in file_content) myfileStringBinary = output.replace(" ", "") def remainder(inputString, divisor): crcAdded = list(inputString) crcAdded = crcAdded + list('0'*(len(crc_3...
true
true
1c0340525fe9ccb4374f19a2ffef9680d6415e46
2,148
py
Python
file_downloader/file_downloader.py
Pasanlaksitha/Directory-File-Download
ecf71e8924a864cbc5e9c63feda9b75897309624
[ "MIT" ]
3
2021-09-19T17:19:40.000Z
2021-11-20T08:53:31.000Z
file_downloader/file_downloader.py
Pasanlaksitha/Directory-File-Download
ecf71e8924a864cbc5e9c63feda9b75897309624
[ "MIT" ]
null
null
null
file_downloader/file_downloader.py
Pasanlaksitha/Directory-File-Download
ecf71e8924a864cbc5e9c63feda9b75897309624
[ "MIT" ]
null
null
null
import os import requests from bs4 import BeautifulSoup class FileDownloader: def __init__(self, url, log_file=None, use_url=True): self.log = log_file if use_url: print('[+]Starting...') if not url.endswith('/'): self.url = url + '/' ...
31.588235
77
0.45298
import os import requests from bs4 import BeautifulSoup class FileDownloader: def __init__(self, url, log_file=None, use_url=True): self.log = log_file if use_url: print('[+]Starting...') if not url.endswith('/'): self.url = url + '/' ...
true
true
1c0340cc2ea7ae490541ef9c9d40603d0aa054ab
2,794
py
Python
apps/spark/src/spark/urls.py
lonely7345/hue
bd4bee0e4e05ff220d9940f28c161a7b7c587b7b
[ "Apache-2.0" ]
1
2020-04-23T21:08:43.000Z
2020-04-23T21:08:43.000Z
apps/spark/src/spark/urls.py
bitsom/hue
0125266148bdcbab051f1ebc7480c4ca2ca8543b
[ "Apache-2.0" ]
null
null
null
apps/spark/src/spark/urls.py
bitsom/hue
0125266148bdcbab051f1ebc7480c4ca2ca8543b
[ "Apache-2.0" ]
1
2019-01-04T08:08:11.000Z
2019-01-04T08:08:11.000Z
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
49.017544
102
0.702219
from django.conf.urls.defaults import patterns, url urlpatterns = patterns('spark.views', url(r'^$', 'editor', name='index'), url(r'^editor/design/(?P<design_id>.+)$', 'editor', name='execute_design'), url(r'^editor/query/(?P<query_history_id>.+)$', 'editor', name='watch_query_history'), url(r'^editor/(?P<de...
true
true
1c0340ff71cb458010344efbc9807126b717634b
1,186
py
Python
tensorflow/contrib/eager/python/metrics.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
6
2022-02-04T18:12:24.000Z
2022-03-21T23:57:12.000Z
Lib/site-packages/tensorflow/contrib/eager/python/metrics.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/tensorflow/contrib/eager/python/metrics.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
1
2022-02-08T03:53:23.000Z
2022-02-08T03:53:23.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...
42.357143
81
0.705734
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.eager.python.metrics_impl import * from tensorflow.python.util.all_util import remove_undocumented _allowed_symbols = ['Accuracy', 'Mean', 'Metric', 'CategoricalAccuracy', ...
true
true
1c034177059c58682119b3f192f9fd565fc96bfa
1,122
py
Python
pygsti/extras/devices/__init__.py
drewrisinger/pyGSTi
dd4ad669931c7f75e026456470cf33ac5b682d0d
[ "Apache-2.0" ]
1
2021-12-19T15:11:09.000Z
2021-12-19T15:11:09.000Z
pygsti/extras/devices/__init__.py
drewrisinger/pyGSTi
dd4ad669931c7f75e026456470cf33ac5b682d0d
[ "Apache-2.0" ]
null
null
null
pygsti/extras/devices/__init__.py
drewrisinger/pyGSTi
dd4ad669931c7f75e026456470cf33ac5b682d0d
[ "Apache-2.0" ]
null
null
null
""" Exteneral Device Specifications Sub-package """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government r...
44.88
100
0.644385
from .devcore import * from . import ibmq_burlington from . import ibmq_essex from . import ibmq_london from . import ibmq_melbourne from . import ibmq_ourense from . import ibmq_rueschlikon from . import ibmq_tenerife from . import ibmq_vigo from . import ibmq_yorktown from . import rigetti_agave from . import rigett...
true
true
1c03418be6f37985f3a55b8af08e10e1774a89b2
319
py
Python
microblog.py
kudnx/microblog
40198e2771344ea59e82ab317e31503341994d4f
[ "MIT" ]
null
null
null
microblog.py
kudnx/microblog
40198e2771344ea59e82ab317e31503341994d4f
[ "MIT" ]
null
null
null
microblog.py
kudnx/microblog
40198e2771344ea59e82ab317e31503341994d4f
[ "MIT" ]
null
null
null
from app import create_app, db, cli from app.models import User, Post, Notification, Message, Task app = create_app() cli.register(app) @app.shell_context_processor def make_shell_context(): return {'db': db, 'User': User, 'Post': Post, 'Message': Message, 'Notification': Notification, 'Task': Task}
29
69
0.702194
from app import create_app, db, cli from app.models import User, Post, Notification, Message, Task app = create_app() cli.register(app) @app.shell_context_processor def make_shell_context(): return {'db': db, 'User': User, 'Post': Post, 'Message': Message, 'Notification': Notification, 'Task': Task}
true
true