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
08f509629ea65c3c640988ec3fdf64db85c960a0
12,404
py
Python
fairseq/data/raw_audio_text_dataset.py
shamanez/BERT-like-is-All-You-Need
a6ba1f656da40103b3b5398961d18e5fc78e1efb
[ "MIT" ]
74
2020-08-19T07:52:46.000Z
2022-03-31T00:20:42.000Z
fairseq/data/raw_audio_text_dataset.py
shamanez/BERT-like-is-All-You-Need
a6ba1f656da40103b3b5398961d18e5fc78e1efb
[ "MIT" ]
23
2020-09-12T05:13:23.000Z
2021-09-16T13:49:31.000Z
fairseq/data/raw_audio_text_dataset.py
shamanez/BERT-like-is-All-You-Need
a6ba1f656da40103b3b5398961d18e5fc78e1efb
[ "MIT" ]
8
2020-12-04T10:25:50.000Z
2022-01-03T10:58:17.000Z
#change the line 331 import os import numpy as np import sys import torch from .import FairseqDataset import random import cv2 from PIL import Image from torchvision.transforms import CenterCrop, Resize, Compose, ToTensor import time class RawAudioTextDataset(FairseqDataset): def __init__(self, base_path,data...
30.62716
148
0.529345
import os import numpy as np import sys import torch from .import FairseqDataset import random import cv2 from PIL import Image from torchvision.transforms import CenterCrop, Resize, Compose, ToTensor import time class RawAudioTextDataset(FairseqDataset): def __init__(self, base_path,data_args,data_split,samp...
true
true
08f50a623162f4db3b4debb40d91627cf7dd1b6a
403
py
Python
First_Project/wsgi.py
anish011/first-project
5981f02990a1cd83afc2c04cc735202afd7350dc
[ "Apache-2.0" ]
null
null
null
First_Project/wsgi.py
anish011/first-project
5981f02990a1cd83afc2c04cc735202afd7350dc
[ "Apache-2.0" ]
null
null
null
First_Project/wsgi.py
anish011/first-project
5981f02990a1cd83afc2c04cc735202afd7350dc
[ "Apache-2.0" ]
null
null
null
""" WSGI config for First_Project project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO...
23.705882
78
0.791563
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'First_Project.settings') application = get_wsgi_application()
true
true
08f50b0e3f09bf66d057c1ab998fc403c94b78c6
8,939
py
Python
seglearn/tests/test_pipe.py
tylerwmarrs/seglearn
01fa65b3e326091671043f30c0310eead0e78bc2
[ "BSD-3-Clause" ]
null
null
null
seglearn/tests/test_pipe.py
tylerwmarrs/seglearn
01fa65b3e326091671043f30c0310eead0e78bc2
[ "BSD-3-Clause" ]
null
null
null
seglearn/tests/test_pipe.py
tylerwmarrs/seglearn
01fa65b3e326091671043f30c0310eead0e78bc2
[ "BSD-3-Clause" ]
null
null
null
# Author: David Burns # License: BSD import numpy as np import pandas as pd from sklearn.linear_model import Ridge from sklearn.preprocessing import StandardScaler from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import cross_validate from seglearn.pipe import Pype from seglearn.transf...
27.420245
91
0.581161
import numpy as np import pandas as pd from sklearn.linear_model import Ridge from sklearn.preprocessing import StandardScaler from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import cross_validate from seglearn.pipe import Pype from seglearn.transform import FeatureRep, SegmentX, Segm...
true
true
08f50b50147f652dc4f887ec9eeb2f9a700baa46
1,690
py
Python
naoqi-sdk-2.5.5.5-linux64/doc/_downloads/altabletservice_showwebview.py
applejenny66/docker_pepper
2469cc4db6585161a31ac44c8fcf2605d71318b1
[ "MIT" ]
null
null
null
naoqi-sdk-2.5.5.5-linux64/doc/_downloads/altabletservice_showwebview.py
applejenny66/docker_pepper
2469cc4db6585161a31ac44c8fcf2605d71318b1
[ "MIT" ]
null
null
null
naoqi-sdk-2.5.5.5-linux64/doc/_downloads/altabletservice_showwebview.py
applejenny66/docker_pepper
2469cc4db6585161a31ac44c8fcf2605d71318b1
[ "MIT" ]
1
2020-10-06T07:44:12.000Z
2020-10-06T07:44:12.000Z
#! /usr/bin/env python # -*- encoding: UTF-8 -*- """Example: Use showWebview Method""" import qi import argparse import sys import time def main(session): """ This example uses the showWebview method. To Test ALTabletService, you need to run the script ON the robot. """ # Get the service ALTable...
29.137931
98
0.613018
"""Example: Use showWebview Method""" import qi import argparse import sys import time def main(session): """ This example uses the showWebview method. To Test ALTabletService, you need to run the script ON the robot. """ try: tabletService = session.service("ALTabletService") ...
false
true
08f50c1583a0782f224453dfe8898beb14c209f1
5,103
py
Python
build/python/npre/umbral.py
DecentricCorp/secret-share
793ad5a84ffcccffc7c07be77d26513cea69deb7
[ "MIT" ]
8
2017-12-07T11:21:38.000Z
2022-01-09T04:48:24.000Z
build/python/npre/umbral.py
DecentricCorp/secret-share
793ad5a84ffcccffc7c07be77d26513cea69deb7
[ "MIT" ]
9
2018-01-29T15:35:43.000Z
2018-03-06T19:40:01.000Z
build/python/npre/umbral.py
DecentricCorp/secret-share
793ad5a84ffcccffc7c07be77d26513cea69deb7
[ "MIT" ]
null
null
null
''' Umbral: split-key proxy re-encryption for ECIES ''' import npre.elliptic_curve as ec from npre import curves from npre.constants import UNKNOWN_KFRAG from typing import Union from sha3 import keccak_256 as keccak from collections import namedtuple from functools import reduce from operator import mul from cryptogr...
30.017647
96
0.606898
import npre.elliptic_curve as ec from npre import curves from npre.constants import UNKNOWN_KFRAG from typing import Union from sha3 import keccak_256 as keccak from collections import namedtuple from functools import reduce from operator import mul from cryptography.hazmat.primitives import hashes from cryptography.h...
true
true
08f50c522f6c09b1540bc487a393a6034bcc069d
12,027
py
Python
tensorflow_graphics/nn/layer/tests/graph_convolution_test.py
jackd/graphics
736b99a3306e302674a9b7599e3e2857b85fdb74
[ "Apache-2.0" ]
null
null
null
tensorflow_graphics/nn/layer/tests/graph_convolution_test.py
jackd/graphics
736b99a3306e302674a9b7599e3e2857b85fdb74
[ "Apache-2.0" ]
null
null
null
tensorflow_graphics/nn/layer/tests/graph_convolution_test.py
jackd/graphics
736b99a3306e302674a9b7599e3e2857b85fdb74
[ "Apache-2.0" ]
1
2020-04-11T10:37:36.000Z
2020-04-11T10:37:36.000Z
# Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
40.09
80
0.65644
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import parameterized import numpy as np import tensorflow as tf import tensorflow_graphics.nn.layer.graph_convolution as gc_layer from tensorflow_graphics.util import test_case def _dense_...
true
true
08f50e6aeb1980353159df42321644bc99e192e3
3,184
py
Python
data/dataloaders.py
csalt-research/OpenASR-py
9aea6753689d87d321260d7eb0ea0544e1b3403a
[ "MIT" ]
2
2019-11-29T15:46:14.000Z
2021-05-28T06:54:41.000Z
data/dataloaders.py
csalt-research/OpenASR-py
9aea6753689d87d321260d7eb0ea0544e1b3403a
[ "MIT" ]
null
null
null
data/dataloaders.py
csalt-research/OpenASR-py
9aea6753689d87d321260d7eb0ea0544e1b3403a
[ "MIT" ]
null
null
null
import torch import glob import os from utils.logging import logger import numpy as np import random from itertools import islice def chunks(l, n): for i in range(0, len(l), n): yield l[i:i+n] """ Simple dataloader to cycle through a list of shard paths. """ class ShardedDataLoader(object): def __init...
33.166667
102
0.547111
import torch import glob import os from utils.logging import logger import numpy as np import random from itertools import islice def chunks(l, n): for i in range(0, len(l), n): yield l[i:i+n] class ShardedDataLoader(object): def __init__(self, shard_root_dir, batch_s...
true
true
08f50ec682d07bc5efe997d83ba2cedee13c4271
855
py
Python
notes/design/low-level/case-studies/parking-lot/tests/tests.py
Anmol-Singh-Jaggi/interview-notes
65af75e2b5725894fa5e13bb5cd9ecf152a0d652
[ "MIT" ]
6
2020-07-05T05:15:19.000Z
2021-01-24T20:17:14.000Z
notes/design/low-level/case-studies/parking-lot/tests/tests.py
Anmol-Singh-Jaggi/interview-notes
65af75e2b5725894fa5e13bb5cd9ecf152a0d652
[ "MIT" ]
null
null
null
notes/design/low-level/case-studies/parking-lot/tests/tests.py
Anmol-Singh-Jaggi/interview-notes
65af75e2b5725894fa5e13bb5cd9ecf152a0d652
[ "MIT" ]
2
2020-09-14T06:46:37.000Z
2021-06-15T09:17:21.000Z
import unittest from Driver import process_file class TestDriver(unittest.TestCase): def read_from_file(self, filepath): with open(filepath, "r") as content_file: content = content_file.read() return content def check_file(self, idx): in_file = "inputs/in" + idx + ".tx...
23.108108
56
0.59883
import unittest from Driver import process_file class TestDriver(unittest.TestCase): def read_from_file(self, filepath): with open(filepath, "r") as content_file: content = content_file.read() return content def check_file(self, idx): in_file = "inputs/in" + idx + ".tx...
true
true
08f50f46bef9866b5c04cef1ac6548631a5ed7d1
1,367
py
Python
twelve_biubiu.py
lingshen09/spring12-python
14326760a8bacee6561bc8e0dee9fbe71fe53f30
[ "MIT" ]
1
2021-04-05T03:31:32.000Z
2021-04-05T03:31:32.000Z
twelve_biubiu.py
lingshen09/spring12-python
14326760a8bacee6561bc8e0dee9fbe71fe53f30
[ "MIT" ]
null
null
null
twelve_biubiu.py
lingshen09/spring12-python
14326760a8bacee6561bc8e0dee9fbe71fe53f30
[ "MIT" ]
null
null
null
#! /usr/bin/env python #coding: utf-8 # env "planet_engine" # Permission: CN-2082-2 # Author: Li.Yi.Yi # 春节十二响 biu biu biu! import time ENGINE_ALL = ["2082001","2082002","2082003"] FUNERAL_FULL = "TOP LEVEL" CURVE_NATURAL = "CURVE_NATURAL" def set_engine_number_mask(engin_num): print("set_engine_number_mask star...
19.811594
72
0.637162
import time ENGINE_ALL = ["2082001","2082002","2082003"] FUNERAL_FULL = "TOP LEVEL" CURVE_NATURAL = "CURVE_NATURAL" def set_engine_number_mask(engin_num): print("set_engine_number_mask start") for n in engin_num: print("engin no:%s mask set" % n) print("set_engine_number_mask finish") return ...
true
true
08f50f985d4b0a9b808f67490ef34a70979139e1
3,313
py
Python
demo_imagenet.py
MashmallowWoR/ADef-master
1b0bd40cb3b0d555669f2c728bfb0c0b61b5dc04
[ "Apache-2.0" ]
4
2021-07-02T09:21:34.000Z
2021-12-19T08:26:14.000Z
demo_imagenet.py
MashmallowWoR/ADef-master
1b0bd40cb3b0d555669f2c728bfb0c0b61b5dc04
[ "Apache-2.0" ]
null
null
null
demo_imagenet.py
MashmallowWoR/ADef-master
1b0bd40cb3b0d555669f2c728bfb0c0b61b5dc04
[ "Apache-2.0" ]
2
2021-06-27T11:40:06.000Z
2021-07-04T13:28:07.000Z
import numpy as np import matplotlib.pyplot as plt import os import PIL.Image as Image import torch from torch.autograd import Variable import torchvision.models as models import torchvision.transforms as transforms from deformation import ADef from vector_fields import draw_vector_field path_to_resources = 'resourc...
29.061404
90
0.685783
import numpy as np import matplotlib.pyplot as plt import os import PIL.Image as Image import torch from torch.autograd import Variable import torchvision.models as models import torchvision.transforms as transforms from deformation import ADef from vector_fields import draw_vector_field path_to_resources = 'resourc...
true
true
08f50ff7f695663f2bb6d72ffdd86a315c9418d8
13,888
py
Python
sql/notify.py
xiandan-erizo/Archery
4ca008bd3edc4f2e536afd882a0792ea79655438
[ "Apache-2.0" ]
null
null
null
sql/notify.py
xiandan-erizo/Archery
4ca008bd3edc4f2e536afd882a0792ea79655438
[ "Apache-2.0" ]
null
null
null
sql/notify.py
xiandan-erizo/Archery
4ca008bd3edc4f2e536afd882a0792ea79655438
[ "Apache-2.0" ]
null
null
null
# -*- coding: UTF-8 -*- import datetime import re from itertools import chain from django.contrib.auth.models import Group from common.config import SysConfig from sql.models import QueryPrivilegesApply, Users, SqlWorkflow, ResourceGroup, ArchiveConfig from sql.utils.resource_group import auth_group_users from common....
43.810726
123
0.659274
import datetime import re from itertools import chain from django.contrib.auth.models import Group from common.config import SysConfig from sql.models import QueryPrivilegesApply, Users, SqlWorkflow, ResourceGroup, ArchiveConfig from sql.utils.resource_group import auth_group_users from common.utils.sendmsg import Msg...
true
true
08f5102c7998ca277a75754bba5044337112f6bf
769
py
Python
guestbook/views.py
hcpthanks/vCard
cc9a301f413961c398c355426013c0cc05fbb1b7
[ "MIT" ]
null
null
null
guestbook/views.py
hcpthanks/vCard
cc9a301f413961c398c355426013c0cc05fbb1b7
[ "MIT" ]
null
null
null
guestbook/views.py
hcpthanks/vCard
cc9a301f413961c398c355426013c0cc05fbb1b7
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect, reverse from django.http import HttpResponse from .models import Message # Create your views here. def post_message(request): """首页留言提交处理 """ #如果用户客户端提交方法是POST if request.method =='POST': # 得到想要的数据项 name = request.POST.get('name', '') ...
28.481481
66
0.592978
from django.shortcuts import render, redirect, reverse from django.http import HttpResponse from .models import Message def post_message(request): if request.method =='POST': name = request.POST.get('name', '') email = request.POST.get('email','') content = request.POST.get('m...
true
true
08f51056b431ed003ac27664322301a36a445b58
4,887
py
Python
timocom.bot/update.py
lour2002/timocom-delivery
e2b95604203897a0ca6d1899237691dd6070d906
[ "MIT" ]
null
null
null
timocom.bot/update.py
lour2002/timocom-delivery
e2b95604203897a0ca6d1899237691dd6070d906
[ "MIT" ]
null
null
null
timocom.bot/update.py
lour2002/timocom-delivery
e2b95604203897a0ca6d1899237691dd6070d906
[ "MIT" ]
null
null
null
import os import ssl import sys import certifi import urllib3 import requests from hashlib import md5 from urllib.request import urlretrieve from requests.exceptions import ConnectionError urllib3.disable_warnings() url_update = 'https://kcilk.company/update/update.php' url_md5hash = 'https://kcilk.company/update/md...
37.592308
114
0.559648
import os import ssl import sys import certifi import urllib3 import requests from hashlib import md5 from urllib.request import urlretrieve from requests.exceptions import ConnectionError urllib3.disable_warnings() url_update = 'https://kcilk.company/update/update.php' url_md5hash = 'https://kcilk.company/update/md...
true
true
08f5119e03ecf9116ff70093385d59b97d628704
1,673
py
Python
predict.py
AnglewoodJack/data_science_champ_rtsoft_case
e3951115765254df5e04543abbb4edb0749d6fe0
[ "MIT" ]
null
null
null
predict.py
AnglewoodJack/data_science_champ_rtsoft_case
e3951115765254df5e04543abbb4edb0749d6fe0
[ "MIT" ]
null
null
null
predict.py
AnglewoodJack/data_science_champ_rtsoft_case
e3951115765254df5e04543abbb4edb0749d6fe0
[ "MIT" ]
null
null
null
def predict(file_list, lock_period=None): ''' ''' # ---------------------------------------------IMPORT-PACKAGES------------------------------------------------------ import pickle import pandas as pd import numpy as np from preparation import data_preparation from datetime import timedelta # ---------------...
30.418182
117
0.530185
def predict(file_list, lock_period=None): import pickle import pandas as pd import numpy as np from preparation import data_preparation from datetime import timedelta with open('model.pickle', 'rb') as fp: data, xgb, gbr = pickle.load(fp) update = data_preparation(file_list, lock_period, impute=False) ...
true
true
08f512d8acd7c3f73c2cfb1fb57c3f211bf2889f
128
py
Python
app/main_page/__init__.py
larsertoff/pwp
1f156e3efc7b93345197329425e2928a470d3092
[ "MIT" ]
null
null
null
app/main_page/__init__.py
larsertoff/pwp
1f156e3efc7b93345197329425e2928a470d3092
[ "MIT" ]
null
null
null
app/main_page/__init__.py
larsertoff/pwp
1f156e3efc7b93345197329425e2928a470d3092
[ "MIT" ]
null
null
null
import flask main_page = flask.Blueprint('main_page', __name__, template_folder='templates') from app.main_page import routes
21.333333
79
0.804688
import flask main_page = flask.Blueprint('main_page', __name__, template_folder='templates') from app.main_page import routes
true
true
08f51345c078188538c1ada3ca673eb17f41b2f8
1,856
py
Python
cme/modules/nopac.py
retr0-13/CrackMapExec
e9bcd09bd2c862200a40ecdc431fcf56f0ae5b67
[ "BSD-2-Clause" ]
3
2021-10-31T14:50:29.000Z
2022-02-27T16:30:30.000Z
cme/modules/nopac.py
retr0-13/CrackMapExec
e9bcd09bd2c862200a40ecdc431fcf56f0ae5b67
[ "BSD-2-Clause" ]
null
null
null
cme/modules/nopac.py
retr0-13/CrackMapExec
e9bcd09bd2c862200a40ecdc431fcf56f0ae5b67
[ "BSD-2-Clause" ]
1
2022-03-20T22:09:54.000Z
2022-03-20T22:09:54.000Z
# Credit to https://exploit.ph/cve-2021-42287-cve-2021-42278-weaponisation.html # @exploitph @Evi1cg # module by @mpgn_x64 from binascii import unhexlify from impacket.krb5.kerberosv5 import getKerberosTGT from impacket.krb5 import constants from impacket.krb5.types import Principal class CMEModule: name = 'nopa...
51.555556
142
0.632543
from binascii import unhexlify from impacket.krb5.kerberosv5 import getKerberosTGT from impacket.krb5 import constants from impacket.krb5.types import Principal class CMEModule: name = 'nopac' description = "Check if the DC is vulnerable to CVE-2021-42278 and CVE-2021-42287 to impersonate DA from standard do...
true
true
08f5136774c1cf9475dbc79c9cf4e57b309645e7
2,633
py
Python
preprocessor/object_detection/fasterrcnn/test_fasterrcnn.py
koursaros-ai/hub
481aca8deb083ea0ec47337977e866ca1bd88141
[ "Apache-2.0" ]
36
2019-08-17T00:23:02.000Z
2021-08-18T12:12:59.000Z
preprocessor/object_detection/fasterrcnn/test_fasterrcnn.py
hanxiao/hub
58fa158040be38d3f190d8dcdbd281f36d66c6c0
[ "Apache-2.0" ]
1
2019-10-24T05:09:45.000Z
2019-10-24T05:09:45.000Z
preprocessor/object_detection/fasterrcnn/test_fasterrcnn.py
hanxiao/hub
58fa158040be38d3f190d8dcdbd281f36d66c6c0
[ "Apache-2.0" ]
11
2019-10-22T05:15:14.000Z
2020-04-25T16:04:01.000Z
# Tencent is pleased to support the open source community by making GNES available. # # Copyright (C) 2019 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...
44.627119
88
0.661603
import os import unittest import zipfile from gnes.cli.parser import set_preprocessor_parser, _set_client_parser from gnes.client.base import ZmqClient from gnes.proto import gnes_pb2, RequestGenerator, blob2array from gnes.service.base import ServiceManager from gnes.service.preprocessor import PreprocessorService ...
true
true
08f5138ccbcf6178fc2791ffbc81e47094b0f9f9
1,024
py
Python
tasks/task2/2_2.py
eweilow/si1336-simulation-and-modeling
98a8f4e8067a82584e8d6e4aa3b8c7bee6b0dc2b
[ "MIT" ]
null
null
null
tasks/task2/2_2.py
eweilow/si1336-simulation-and-modeling
98a8f4e8067a82584e8d6e4aa3b8c7bee6b0dc2b
[ "MIT" ]
null
null
null
tasks/task2/2_2.py
eweilow/si1336-simulation-and-modeling
98a8f4e8067a82584e8d6e4aa3b8c7bee6b0dc2b
[ "MIT" ]
1
2020-11-05T08:07:06.000Z
2020-11-05T08:07:06.000Z
import matplotlib.pyplot as plt import numpy as np from task_2_1 import run # need results from 2_1 first here... def sum(r, x0, round): r, vals = run(r, x0, round) summed = 0 for i in range(20, len(vals) - 1): summed += np.log(vals[i+1] / vals[i]) return summed / (len(vals) - 20) def runFo...
23.813953
71
0.641602
import matplotlib.pyplot as plt import numpy as np from task_2_1 import run def sum(r, x0, round): r, vals = run(r, x0, round) summed = 0 for i in range(20, len(vals) - 1): summed += np.log(vals[i+1] / vals[i]) return summed / (len(vals) - 20) def runFor(x0, round=False): rvals = np.lin...
true
true
08f5138e37d5af63ba705dc72c4347756cdbf9b8
15,400
py
Python
qbay/models.py
BerBer-alt/CISC327_Group8
d4c1878a0944d92ac88b4ae077e5f0324cdeab09
[ "MIT" ]
null
null
null
qbay/models.py
BerBer-alt/CISC327_Group8
d4c1878a0944d92ac88b4ae077e5f0324cdeab09
[ "MIT" ]
24
2021-09-24T21:12:17.000Z
2021-12-13T20:32:46.000Z
qbay/models.py
BerBer-alt/CISC327_Group8
d4c1878a0944d92ac88b4ae077e5f0324cdeab09
[ "MIT" ]
null
null
null
from qbay import app from flask_sqlalchemy import SQLAlchemy import re from datetime import datetime import difflib db = SQLAlchemy(app) # the class for user objects class User(db.Model): # email attribute with 120 maximum string length, can't be empty email = db.Column( db.String(120), unique=True, ...
35.483871
79
0.644416
from qbay import app from flask_sqlalchemy import SQLAlchemy import re from datetime import datetime import difflib db = SQLAlchemy(app) class User(db.Model): email = db.Column( db.String(120), unique=True, nullable=False, primary_key=True) # username attribute with 80 maximum string leng...
true
true
08f51415c2b25c03283e090f68a0de7ad13b6aea
772
py
Python
kronos_modeller/kronos_modeller/plot_handler.py
ecmwf/kronos
4f8c896baa634fc937f866d2bd05b438106c1663
[ "Apache-2.0" ]
4
2020-09-15T15:16:17.000Z
2021-08-17T14:02:28.000Z
kronos_modeller/kronos_modeller/plot_handler.py
ecmwf/kronos
4f8c896baa634fc937f866d2bd05b438106c1663
[ "Apache-2.0" ]
4
2020-09-12T07:22:35.000Z
2020-10-13T17:08:35.000Z
kronos_modeller/kronos_modeller/plot_handler.py
ecmwf/kronos
4f8c896baa634fc937f866d2bd05b438106c1663
[ "Apache-2.0" ]
null
null
null
# (C) Copyright 1996-2018 ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status as an intergov...
32.166667
80
0.735751
class PlotHandler(object): fig_handle_ID = 0 @staticmethod def get_fig_handle_ID(): PlotHandler.fig_handle_ID = PlotHandler.fig_handle_ID + 1 return PlotHandler.fig_handle_ID @staticmethod def print_fig_handle_ID(): print("PlotHandler.fig_handle_ID: ", PlotHandler.fig_h...
true
true
08f5141850361f3cbb9b437305f5fc7c7b9f019d
9,835
py
Python
yasc/utils.py
asmyczek/YASC
4f9f889980f4413872f70eb3e40b618e4a0db4b1
[ "MIT" ]
1
2021-05-27T14:38:16.000Z
2021-05-27T14:38:16.000Z
yasc/utils.py
asmyczek/YASC
4f9f889980f4413872f70eb3e40b618e4a0db4b1
[ "MIT" ]
null
null
null
yasc/utils.py
asmyczek/YASC
4f9f889980f4413872f70eb3e40b618e4a0db4b1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from enum import Enum from logging import StreamHandler from logging.handlers import RotatingFileHandler from collections import namedtuple, deque from pathlib import Path from multiprocessing import Lock, Value from datetime import datetime from queue import Queue import logging import json im...
31.931818
113
0.650534
from enum import Enum from logging import StreamHandler from logging.handlers import RotatingFileHandler from collections import namedtuple, deque from pathlib import Path from multiprocessing import Lock, Value from datetime import datetime from queue import Queue import logging import json import sys import os cla...
true
true
08f514a8613bc5b9d02b0d8f4dae2268f3eead60
3,036
py
Python
openstack_dashboard/dashboards/settings/password/forms.py
spandanb/horizon
4a96f2e2a2b087508c369e0bea891a29829a673d
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/settings/password/forms.py
spandanb/horizon
4a96f2e2a2b087508c369e0bea891a29829a673d
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/settings/password/forms.py
spandanb/horizon
4a96f2e2a2b087508c369e0bea891a29829a673d
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Centrin Data Systems 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...
42.760563
78
0.649209
from django.conf import settings from django.forms import ValidationError from django import http from django.utils.translation import ugettext_lazy as _ from django.views.decorators.debug import sensitive_variables from horizon import exceptions from horizon import forms from horizon import messages from horizon.u...
true
true
08f515f28cbcc6d806a991ce956ee1cf5952e7ef
378
py
Python
fibonacci.py
shuraj123/radius-program
1c5b89245f27e99adac916820b3dbb779b8d01c6
[ "MIT" ]
2
2021-05-28T16:46:35.000Z
2021-05-28T16:46:37.000Z
fibonacci.py
shuraj123/radius-program
1c5b89245f27e99adac916820b3dbb779b8d01c6
[ "MIT" ]
null
null
null
fibonacci.py
shuraj123/radius-program
1c5b89245f27e99adac916820b3dbb779b8d01c6
[ "MIT" ]
null
null
null
n = int(input("enter how many no of terms :")) n1,n2 = 0,1 count = 0 if n <= 0 : print("please enter a positive number:") elif n==1: print("Fibonacci sequence upto",nterms,":") print(n1) else: print("fibonacci numbers of sequence are :") while count < n: print(n1) n3...
22.235294
50
0.52381
n = int(input("enter how many no of terms :")) n1,n2 = 0,1 count = 0 if n <= 0 : print("please enter a positive number:") elif n==1: print("Fibonacci sequence upto",nterms,":") print(n1) else: print("fibonacci numbers of sequence are :") while count < n: print(n1) n3...
true
true
08f517e10b88c9ca08456b3ebf0489268e60da02
4,634
py
Python
hackday/teams/models.py
mpirnat/hackday
82a13665e2d93c80d6dfb1a1d5602495d01a243e
[ "MIT" ]
4
2015-05-21T19:44:09.000Z
2019-12-03T11:07:03.000Z
hackday/teams/models.py
mpirnat/hackday
82a13665e2d93c80d6dfb1a1d5602495d01a243e
[ "MIT" ]
3
2020-02-11T21:47:49.000Z
2021-06-10T17:28:44.000Z
hackday/teams/models.py
mpirnat/hackday
82a13665e2d93c80d6dfb1a1d5602495d01a243e
[ "MIT" ]
2
2016-01-05T13:39:09.000Z
2017-02-19T09:31:58.000Z
import time from django.contrib.auth.models import User from django.db import models from django import forms from django.template.defaultfilters import slugify from hackday.assets.models import Attachment, ImageAttachment, Link from hackday.charities.models import Charity from hackday.voting.moremodels import Catego...
30.893333
79
0.65451
import time from django.contrib.auth.models import User from django.db import models from django import forms from django.template.defaultfilters import slugify from hackday.assets.models import Attachment, ImageAttachment, Link from hackday.charities.models import Charity from hackday.voting.moremodels import Catego...
true
true
08f517e4215d9f77c78f556dcc4200b8f90a77db
1,525
py
Python
backend/django/core/migrations/0012_projectpermissions.py
RTIInternational/SMART
c95eaa088df33bac95aababdc560c10422eed6e3
[ "MIT" ]
185
2018-10-01T16:38:35.000Z
2022-03-16T14:39:04.000Z
backend/django/core/migrations/0012_projectpermissions.py
RTIInternational/SMART
c95eaa088df33bac95aababdc560c10422eed6e3
[ "MIT" ]
93
2018-12-07T15:33:44.000Z
2022-03-09T15:19:08.000Z
backend/django/core/migrations/0012_projectpermissions.py
RTIInternational/SMART
c95eaa088df33bac95aababdc560c10422eed6e3
[ "MIT" ]
30
2019-03-04T05:44:44.000Z
2022-03-19T17:07:14.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-09-18 17:09 from __future__ import unicode_literals import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
29.326923
86
0.427541
from __future__ import unicode_literals import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("core", "0011_merge_20170918_1650...
true
true
08f5182e5228fb3a317556e398bdbcf812042fcc
4,889
py
Python
qutip/tests/test_entropy.py
trxw/qutip
b923c973edd9a071d86eb849650661549f73585f
[ "BSD-3-Clause" ]
1
2015-11-06T06:35:06.000Z
2015-11-06T06:35:06.000Z
qutip/tests/test_entropy.py
trxw/qutip
b923c973edd9a071d86eb849650661549f73585f
[ "BSD-3-Clause" ]
null
null
null
qutip/tests/test_entropy.py
trxw/qutip
b923c973edd9a071d86eb849650661549f73585f
[ "BSD-3-Clause" ]
null
null
null
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met...
37.899225
79
0.617713
from qutip import * from numpy import allclose, linspace, log2 from numpy.testing import assert_, assert_equal, run_module_suite def test_EntropyVN(): a = linspace(0, 1, 20) for k in range(len(a)): x = a[k] * ket2dm(basis(2, 0)) y = (1 - a[k]) * ket2dm(basis(2, 1)) ...
true
true
08f51842d12c04cf0219c7216ab5ff357e2393bc
3,001
py
Python
hcec/edwards/testdata/ed25519.py
duwu/hcd
590966016bc42f9d043c16ad8438148ca40eff89
[ "ISC" ]
131
2018-07-19T13:01:41.000Z
2021-12-26T12:27:33.000Z
hcec/edwards/testdata/ed25519.py
duwu/hcd
590966016bc42f9d043c16ad8438148ca40eff89
[ "ISC" ]
32
2018-07-28T17:53:34.000Z
2022-01-06T05:32:46.000Z
hcec/edwards/testdata/ed25519.py
duwu/hcd
590966016bc42f9d043c16ad8438148ca40eff89
[ "ISC" ]
101
2018-08-22T03:31:11.000Z
2022-03-17T09:01:24.000Z
import hashlib b = 256 q = 2**255 - 19 l = 2**252 + 27742317777372353535851937790883648493 def H(m): return hashlib.sha512(m).digest() def expmod(b,e,m): if e == 0: return 1 t = expmod(b,e/2,m)**2 % m if e & 1: t = (t*b) % m return t def inv(x): return expmod(x,q-2,q) d = -121665 * in...
24.598361
91
0.534822
import hashlib b = 256 q = 2**255 - 19 l = 2**252 + 27742317777372353535851937790883648493 def H(m): return hashlib.sha512(m).digest() def expmod(b,e,m): if e == 0: return 1 t = expmod(b,e/2,m)**2 % m if e & 1: t = (t*b) % m return t def inv(x): return expmod(x,q-2,q) d = -121665 * in...
false
true
08f5184de14eac6198a376fd6a9209213d72cbf0
390
py
Python
users/migrations/0006_pic_faces.py
nhy17-thu/ImageProcessingWebsite
d90eaf115c870dd359bf5315f7b56f042270f31f
[ "MIT" ]
1
2021-03-29T12:40:39.000Z
2021-03-29T12:40:39.000Z
users/migrations/0006_pic_faces.py
nhy17-thu/FinalProject_Upgrade
d90eaf115c870dd359bf5315f7b56f042270f31f
[ "MIT" ]
null
null
null
users/migrations/0006_pic_faces.py
nhy17-thu/FinalProject_Upgrade
d90eaf115c870dd359bf5315f7b56f042270f31f
[ "MIT" ]
1
2021-03-29T12:40:42.000Z
2021-03-29T12:40:42.000Z
# Generated by Django 2.2.4 on 2019-09-13 06:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0005_auto_20190911_2212'), ] operations = [ migrations.AddField( model_name='pic', name='faces', ...
20.526316
62
0.589744
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0005_auto_20190911_2212'), ] operations = [ migrations.AddField( model_name='pic', name='faces', field=models.ImageField(blank=True, upload_to=...
true
true
08f51885f1d5299ca8ae85d211fc75ae5fea7b5b
19,354
py
Python
src/tests/api/test_permissions.py
gnomus/pretix
9a9ae3e7807c5fce12adeabf5e2bb81e6b32fb38
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/tests/api/test_permissions.py
gnomus/pretix
9a9ae3e7807c5fce12adeabf5e2bb81e6b32fb38
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/tests/api/test_permissions.py
gnomus/pretix
9a9ae3e7807c5fce12adeabf5e2bb81e6b32fb38
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import time import pytest from django.test import override_settings from django.utils.timezone import now from pretix.base.models import Organizer event_urls = [ (None, ''), (None, 'categories/'), ('can_view_orders', 'invoices/'), (None, 'items/'), ('can_view_orders', 'orders/'), ('can_view_o...
41.532189
118
0.677844
import time import pytest from django.test import override_settings from django.utils.timezone import now from pretix.base.models import Organizer event_urls = [ (None, ''), (None, 'categories/'), ('can_view_orders', 'invoices/'), (None, 'items/'), ('can_view_orders', 'orders/'), ('can_view_o...
true
true
08f518cad0229a199b0cc56117385b0234415580
1,659
py
Python
scripts/deregister_peer.py
mookkiah/docker-opendj
21efb729cb71c04481be8bd1574b1c3bead52ec2
[ "Apache-2.0" ]
null
null
null
scripts/deregister_peer.py
mookkiah/docker-opendj
21efb729cb71c04481be8bd1574b1c3bead52ec2
[ "Apache-2.0" ]
null
null
null
scripts/deregister_peer.py
mookkiah/docker-opendj
21efb729cb71c04481be8bd1574b1c3bead52ec2
[ "Apache-2.0" ]
null
null
null
import contextlib # import json import logging.config import os from pygluu.containerlib import get_manager from pygluu.containerlib.utils import exec_cmd from settings import LOGGING_CONFIG from utils import deregister_serf_peer from utils import guess_serf_addr DEFAULT_ADMIN_PW_PATH = "/opt/opendj/.pw" logging.co...
25.523077
102
0.640747
import contextlib import logging.config import os from pygluu.containerlib import get_manager from pygluu.containerlib.utils import exec_cmd from settings import LOGGING_CONFIG from utils import deregister_serf_peer from utils import guess_serf_addr DEFAULT_ADMIN_PW_PATH = "/opt/opendj/.pw" logging.config.dictConfi...
true
true
08f519b9d12cdf02e0e057fb5a890358ebffe090
1,650
py
Python
utilities/utils/random_code.py
annusgit/forestcoverUnet
8ba4eafc6e5d637d3b08fa20d029e25173f96074
[ "MIT" ]
25
2018-09-13T09:37:14.000Z
2021-12-07T07:12:56.000Z
utilities/utils/random_code.py
annusgit/forestcoverUnet
8ba4eafc6e5d637d3b08fa20d029e25173f96074
[ "MIT" ]
null
null
null
utilities/utils/random_code.py
annusgit/forestcoverUnet
8ba4eafc6e5d637d3b08fa20d029e25173f96074
[ "MIT" ]
6
2018-09-04T15:26:26.000Z
2021-09-14T12:42:43.000Z
""" Get the data in npy files in ~/Desktop/rit18_data and show as png files """ from __future__ import print_function from __future__ import division import os import cv2 import numpy as np from PIL import Image from scipy.misc import imsave import matplotlib.pyplot as plt def resize(arr): return np.resiz...
22.916667
75
0.566667
from __future__ import print_function from __future__ import division import os import cv2 import numpy as np from PIL import Image from scipy.misc import imsave import matplotlib.pyplot as plt def resize(arr): return np.resize(arr, new_shape=(800, 800)).astype(np.uint16) def rescale(arr): return (255 / ...
true
true
08f519e296efce6c9674cb8c8d6864d0f629a096
1,887
py
Python
plato/draw/matplotlib/DiskUnions.py
hillarypan/plato
181ad0e0e00b0b7486fa364200a8187d879a450e
[ "BSD-3-Clause" ]
null
null
null
plato/draw/matplotlib/DiskUnions.py
hillarypan/plato
181ad0e0e00b0b7486fa364200a8187d879a450e
[ "BSD-3-Clause" ]
null
null
null
plato/draw/matplotlib/DiskUnions.py
hillarypan/plato
181ad0e0e00b0b7486fa364200a8187d879a450e
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from ... import draw from .internal import PatchUser from matplotlib.patches import Circle, Wedge from matplotlib.transforms import Affine2D class DiskUnions(draw.DiskUnions, PatchUser): __doc__ = draw.DiskUnions.__doc__ def _render_patches(self, axes, aa_pixel_size=0, **kwargs): re...
39.3125
99
0.618442
import numpy as np from ... import draw from .internal import PatchUser from matplotlib.patches import Circle, Wedge from matplotlib.transforms import Affine2D class DiskUnions(draw.DiskUnions, PatchUser): __doc__ = draw.DiskUnions.__doc__ def _render_patches(self, axes, aa_pixel_size=0, **kwargs): re...
true
true
08f51aa3eb84b9260f0e785e12b9ae1665b7ede9
6,164
py
Python
extensions/sensorchecks/generic_sensorcheck.py
holitics/phenome-extensions
230d1494d0f0d7a1d747cb8af9413df46d8d0e25
[ "Apache-2.0" ]
1
2019-11-22T18:15:39.000Z
2019-11-22T18:15:39.000Z
extensions/sensorchecks/generic_sensorcheck.py
holitics/phenome-extensions
230d1494d0f0d7a1d747cb8af9413df46d8d0e25
[ "Apache-2.0" ]
1
2020-02-29T03:13:39.000Z
2020-02-29T03:19:29.000Z
extensions/sensorchecks/generic_sensorcheck.py
holitics/phenome-extensions
230d1494d0f0d7a1d747cb8af9413df46d8d0e25
[ "Apache-2.0" ]
null
null
null
# generic_sensorcheck.py, Copyright (c) 2019, Nicholas Saparoff <nick.saparoff@gmail.com>: Original implementation from phenome_core.core.base.base_action import BaseAction from phenome_core.core.base.healthscore import compute_health_score, add_health_score from phenome_core.util import math_functions from phenome_co...
35.630058
125
0.626217
from phenome_core.core.base.base_action import BaseAction from phenome_core.core.base.healthscore import compute_health_score, add_health_score from phenome_core.util import math_functions from phenome_core.core.parsers.generic_argument_parser import GenericArgumentParser from phenome_core.util.base_evaluator import B...
true
true
08f51ae1533bde82d1189ba570571d034f47f33f
18,588
py
Python
swe/interface.py
SebastianoF/pyro2
9d1787c2ee25d735a414db3da8c00287743a6fde
[ "BSD-3-Clause" ]
151
2018-08-14T12:52:22.000Z
2022-03-29T07:57:01.000Z
swe/interface.py
SebastianoF/pyro2
9d1787c2ee25d735a414db3da8c00287743a6fde
[ "BSD-3-Clause" ]
40
2015-03-25T15:45:44.000Z
2018-07-30T18:48:47.000Z
swe/interface.py
SebastianoF/pyro2
9d1787c2ee25d735a414db3da8c00287743a6fde
[ "BSD-3-Clause" ]
56
2018-10-10T16:54:59.000Z
2022-02-06T08:48:52.000Z
import numpy as np from numba import njit @njit(cache=True) def states(idir, ng, dx, dt, ih, iu, iv, ix, nspec, g, qv, dqv): r""" predict the cell-centered state to the edges in one-dimension using the reconstructed, limited slopes. We follow the convection here that ...
32.103627
117
0.447547
import numpy as np from numba import njit @njit(cache=True) def states(idir, ng, dx, dt, ih, iu, iv, ix, nspec, g, qv, dqv): qx, qy, nvar = qv.shape q_l = np.zeros_like(qv) q_r = np.zeros_like(qv) lvec = np.zeros((nvar, nvar)) rvec = np.zeros((nvar, nvar)) e...
true
true
08f51ba86948f5cf1e21a6bcc003ee1bd0c5ea8b
5,461
py
Python
deepchem/molnet/load_function/kaggle_datasets.py
ueser/deepchem
bc6494054f6d0c3e147489ac880143c4c0e5b90f
[ "MIT" ]
1
2018-07-03T07:35:17.000Z
2018-07-03T07:35:17.000Z
deepchem/molnet/load_function/kaggle_datasets.py
ueser/deepchem
bc6494054f6d0c3e147489ac880143c4c0e5b90f
[ "MIT" ]
null
null
null
deepchem/molnet/load_function/kaggle_datasets.py
ueser/deepchem
bc6494054f6d0c3e147489ac880143c4c0e5b90f
[ "MIT" ]
1
2021-12-10T22:37:54.000Z
2021-12-10T22:37:54.000Z
""" KAGGLE dataset loader. """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import time import numpy as np import deepchem from deepchem.molnet.load_function.kaggle_features import merck_descriptors def remove_missing_entries(dataset): """...
36.651007
120
0.68156
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import time import numpy as np import deepchem from deepchem.molnet.load_function.kaggle_features import merck_descriptors def remove_missing_entries(dataset): for i, (X, y, w, ids) in enumerate...
true
true
08f51cb563a35a3be7e201500324ead507d32099
4,047
py
Python
third_party/phkit/phkit/english/__init__.py
zh794390558/DeepSpeech
34178893327ad359cb816e55d7c66a10244fa08a
[ "Apache-2.0" ]
null
null
null
third_party/phkit/phkit/english/__init__.py
zh794390558/DeepSpeech
34178893327ad359cb816e55d7c66a10244fa08a
[ "Apache-2.0" ]
null
null
null
third_party/phkit/phkit/english/__init__.py
zh794390558/DeepSpeech
34178893327ad359cb816e55d7c66a10244fa08a
[ "Apache-2.0" ]
null
null
null
""" ### english from https://github.com/keithito/tacotron " Cleaners are transformations that run over the input text at both training and eval time. Cleaners can be selected by passing a comma-delimited list of cleaner names as the "cleaners" hyperparameter. Some cleaners are English-specific. You'll typically want ...
34.589744
95
0.636768
import re import random from . import cleaners from .symbols import symbols _symbol_to_id = {s: i for i, s in enumerate(symbols)} _id_to_symbol = {i: s for i, s in enumerate(symbols)} _curly_re = re.compile(r'(.*?)\{(.+?)\}(.*)') def get_arpabet(word, dictionary): word_arpabet = dictionary.lookup(word) if w...
true
true
08f51d23de0954e5c0ed2e7ef975fea539f7bbdb
6,183
py
Python
Project/train/train.py
wwymak/sagemaker-deployment
e2c81ab5044fc3653e133ffabb5478fb4eddc7fe
[ "MIT" ]
null
null
null
Project/train/train.py
wwymak/sagemaker-deployment
e2c81ab5044fc3653e133ffabb5478fb4eddc7fe
[ "MIT" ]
null
null
null
Project/train/train.py
wwymak/sagemaker-deployment
e2c81ab5044fc3653e133ffabb5478fb4eddc7fe
[ "MIT" ]
null
null
null
import argparse import json import os import pickle import sys import sagemaker_containers import pandas as pd import torch import torch.optim as optim import torch.utils.data from model import LSTMClassifier def model_fn(model_dir): """Load the PyTorch model from the `model_dir` directory.""" print("Loading ...
37.70122
107
0.657124
import argparse import json import os import pickle import sys import sagemaker_containers import pandas as pd import torch import torch.optim as optim import torch.utils.data from model import LSTMClassifier def model_fn(model_dir): print("Loading model.") model_info = {} model_info_path = os.path.j...
true
true
08f51ea14dd1db5a590aa43ba833b7b47aa5fd4b
2,899
py
Python
galaxy/objectstore/pulsar.py
jmchilton/pulsar
783b90cf0bce893a11c347fcaf6778b98e0bb062
[ "Apache-2.0" ]
null
null
null
galaxy/objectstore/pulsar.py
jmchilton/pulsar
783b90cf0bce893a11c347fcaf6778b98e0bb062
[ "Apache-2.0" ]
1
2015-02-21T18:48:19.000Z
2015-02-27T15:50:32.000Z
galaxy/objectstore/pulsar.py
jmchilton/pulsar
783b90cf0bce893a11c347fcaf6778b98e0bb062
[ "Apache-2.0" ]
3
2015-02-22T13:34:16.000Z
2020-10-01T01:28:04.000Z
from __future__ import absolute_import # Need to import pulsar_client absolutely. from ..objectstore import ObjectStore from pulsar.client.manager import ObjectStoreClientManager class PulsarObjectStore(ObjectStore): """ Object store implementation that delegates to a remote Pulsar server. This may be m...
39.175676
94
0.70783
from __future__ import absolute_import from ..objectstore import ObjectStore from pulsar.client.manager import ObjectStoreClientManager class PulsarObjectStore(ObjectStore): def __init__(self, config, config_xml): self.pulsar_client = self.__build_pulsar_client(config_xml) def exists(self, obj, **k...
true
true
08f51edb33bd7a1d2e1c2d9045d3d748fb0605e3
3,120
py
Python
sunnysouth/marketplace/views/users.py
EdwinBaezaDev/sunnysouthapp
a4a37452196db2a35b3c639ab38e62ce594ec29f
[ "MIT" ]
null
null
null
sunnysouth/marketplace/views/users.py
EdwinBaezaDev/sunnysouthapp
a4a37452196db2a35b3c639ab38e62ce594ec29f
[ "MIT" ]
null
null
null
sunnysouth/marketplace/views/users.py
EdwinBaezaDev/sunnysouthapp
a4a37452196db2a35b3c639ab38e62ce594ec29f
[ "MIT" ]
null
null
null
"""Users views.""" # Django REST Framework from rest_framework import mixins, status, viewsets from rest_framework.decorators import action from rest_framework.response import Response from rest_framework.permissions import ( AllowAny, IsAuthenticated, ) from rest_framework.exceptions import PermissionDenied f...
30.891089
80
0.708013
from rest_framework import mixins, status, viewsets from rest_framework.decorators import action from rest_framework.response import Response from rest_framework.permissions import ( AllowAny, IsAuthenticated, ) from rest_framework.exceptions import PermissionDenied from rest_framework.views import APIView fro...
true
true
08f52036a64d4907e3f00db70a2c3bd15cae35bf
405
py
Python
p041.py
scottwillmoore/project-euler
e8b24a72d88fc30e8ab701e2f56622c363600ea4
[ "MIT" ]
1
2018-07-09T09:19:58.000Z
2018-07-09T09:19:58.000Z
p041.py
scottwillmoore/project-euler
e8b24a72d88fc30e8ab701e2f56622c363600ea4
[ "MIT" ]
null
null
null
p041.py
scottwillmoore/project-euler
e8b24a72d88fc30e8ab701e2f56622c363600ea4
[ "MIT" ]
null
null
null
from itertools import permutations def is_prime(n): if n < 2: return False for x in range(2, int(n ** 0.5) + 1): if n % x == 0: return False return True pandigitals = [] for n in range(1, 10): digits = [str(n) for n in range(1, n + 1)] pandigitals += list(map(lambda t...
21.315789
77
0.582716
from itertools import permutations def is_prime(n): if n < 2: return False for x in range(2, int(n ** 0.5) + 1): if n % x == 0: return False return True pandigitals = [] for n in range(1, 10): digits = [str(n) for n in range(1, n + 1)] pandigitals += list(map(lambda t...
true
true
08f521fe8cd3aa66ead9d75fb9bf738ff32941f5
4,361
py
Python
test/frame/noise/test_action_space_noise.py
lorenzosteccanella/machin
9d3ce87dbed820b5019211b0690b54613084d9e4
[ "MIT" ]
287
2020-06-13T05:19:50.000Z
2022-03-31T04:46:32.000Z
test/frame/noise/test_action_space_noise.py
ikamensh/machin
af7b423c47bc1412530cf6c96c11bd3af9b3e239
[ "MIT" ]
19
2020-08-19T05:33:45.000Z
2022-03-27T15:16:03.000Z
test/frame/noise/test_action_space_noise.py
ikamensh/machin
af7b423c47bc1412530cf6c96c11bd3af9b3e239
[ "MIT" ]
44
2020-07-06T00:41:44.000Z
2022-03-29T17:05:08.000Z
from machin.frame.noise.action_space_noise import ( add_normal_noise_to_action, add_clipped_normal_noise_to_action, add_uniform_noise_to_action, add_ou_noise_to_action, ) import pytest import torch as t class TestAllActionSpaceNoise: ###############################################################...
38.254386
86
0.522587
from machin.frame.noise.action_space_noise import ( add_normal_noise_to_action, add_clipped_normal_noise_to_action, add_uniform_noise_to_action, add_ou_noise_to_action, ) import pytest import torch as t class TestAllActionSpaceNoise: param_add_normal_noise_to_action = [ (t.zer...
true
true
08f52305d640784da8d8fb26cf618726da107b3a
2,357
py
Python
spark_mapinput.py
pw2393/spark-bitcoin-parser
320eb30ffcc462b0607655d2f4002a82590fd120
[ "MIT" ]
11
2017-09-29T05:37:57.000Z
2022-02-04T06:34:17.000Z
spark_mapinput.py
pw2393/spark-bitcoin-parser
320eb30ffcc462b0607655d2f4002a82590fd120
[ "MIT" ]
2
2018-07-03T12:19:50.000Z
2019-10-19T21:24:53.000Z
spark_mapinput.py
pw2393/spark-bitcoin-parser
320eb30ffcc462b0607655d2f4002a82590fd120
[ "MIT" ]
3
2019-11-09T13:01:07.000Z
2021-12-03T04:20:29.000Z
""" Author: Peng Wu License: MIT """ # Initialize Spark Context: local multi-threads from pyspark import SparkConf, SparkContext output_folder = './csv/' def main(): # Initialize Spark Context: local multi-threads conf = SparkConf().setAppName("BTC-InputMapper") sc = SparkContext(conf=conf) # Load...
28.39759
117
0.602036
""" Author: Peng Wu License: MIT """ from pyspark import SparkConf, SparkContext output_folder = './csv/' def main(): conf = SparkConf().setAppName("BTC-InputMapper") sc = SparkContext(conf=conf) def parse_outputs(line): """ schema: txhash, nid, value, addr ...
false
true
08f5231c8fe42b057ed518438c1ad30b5effb556
1,034
py
Python
mapping.py
arch-cl0wn/Packmax
0b765562d02309775df60f13a5c5bc230cb835c4
[ "Unlicense" ]
1
2022-01-22T10:31:39.000Z
2022-01-22T10:31:39.000Z
mapping.py
arch-cl0wn/Packmax
0b765562d02309775df60f13a5c5bc230cb835c4
[ "Unlicense" ]
null
null
null
mapping.py
arch-cl0wn/Packmax
0b765562d02309775df60f13a5c5bc230cb835c4
[ "Unlicense" ]
null
null
null
import collections tnum=int(input("Enter the number of trucks: ")) tlist_dimensions=[] truck_dict={} for i in range(tnum): tlist_dimensions.append(float(input("Enter the length: "))) tlist_dimensions.append(float(input("Enter the breadth: "))) tlist_dimensions.append(float(input("Enter the height: "))) ...
29.542857
90
0.713733
import collections tnum=int(input("Enter the number of trucks: ")) tlist_dimensions=[] truck_dict={} for i in range(tnum): tlist_dimensions.append(float(input("Enter the length: "))) tlist_dimensions.append(float(input("Enter the breadth: "))) tlist_dimensions.append(float(input("Enter the height: "))) ...
true
true
08f5239ac9c53e289a5aff115851f63cd76299cb
2,060
py
Python
2020/src/day11b.py
Sujatha-Nagarajan/AdventOfCode
afce23c74fd0a72caa29c1604a582b21806e794e
[ "CC0-1.0" ]
1
2020-12-05T06:14:37.000Z
2020-12-05T06:14:37.000Z
2020/src/day11b.py
Sujatha-Nagarajan/AdventOfCode
afce23c74fd0a72caa29c1604a582b21806e794e
[ "CC0-1.0" ]
null
null
null
2020/src/day11b.py
Sujatha-Nagarajan/AdventOfCode
afce23c74fd0a72caa29c1604a582b21806e794e
[ "CC0-1.0" ]
null
null
null
from util import * from collections import defaultdict class GoOutException(Exception): pass lines = get_file_contents("../input/day11-sample.txt", False) lines = get_file_contents("../input/day11.txt", False) # start profiling start_profiling() def occupied_or_empty(row, col, rowinc, colinc): p = row ...
22.150538
65
0.474757
from util import * from collections import defaultdict class GoOutException(Exception): pass lines = get_file_contents("../input/day11-sample.txt", False) lines = get_file_contents("../input/day11.txt", False) start_profiling() def occupied_or_empty(row, col, rowinc, colinc): p = row m = col w...
true
true
08f523c4abe909ef500adec76786ecc682e7f3ad
1,051
py
Python
Two Pointers/019. Remove Nth Node From End of List.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
138
2020-02-08T05:25:26.000Z
2021-11-04T11:59:28.000Z
Two Pointers/019. Remove Nth Node From End of List.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
null
null
null
Two Pointers/019. Remove Nth Node From End of List.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
24
2021-01-02T07:18:43.000Z
2022-03-20T08:17:54.000Z
""" 19. Remove Nth Node From End of List Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the linked list becomes 1->2->3->5. """ # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None ...
25.634146
122
0.52902
class Solution: def removeNthFromEnd(self, head, n): fast, slow = head, head while n>0: fast = fast.next n-=1 if not fast: return head.next while fast and fast.next: fast = fast.next slow = slow.next slow.next = slow...
true
true
08f52411bf969e17bd9f21eddfed97f37942bf63
20
py
Python
test.py
zhouliang666/py18
33ccbaf5cd8705bc28858ee0bee37bd73a72b8ff
[ "MIT" ]
null
null
null
test.py
zhouliang666/py18
33ccbaf5cd8705bc28858ee0bee37bd73a72b8ff
[ "MIT" ]
null
null
null
test.py
zhouliang666/py18
33ccbaf5cd8705bc28858ee0bee37bd73a72b8ff
[ "MIT" ]
null
null
null
num2 = 10 num3 = 30
6.666667
9
0.6
num2 = 10 num3 = 30
true
true
08f52479252d36050b42c1856134f8145588d850
7,261
py
Python
publications_bootstrap/admin_views/import_bibtex.py
jchoude/django-publications-bootstrap
327bda308259c4ce98094690e875b919b3945681
[ "MIT" ]
13
2017-09-19T11:33:39.000Z
2022-03-13T21:26:11.000Z
publications_bootstrap/admin_views/import_bibtex.py
jchoude/django-publications-bootstrap
327bda308259c4ce98094690e875b919b3945681
[ "MIT" ]
44
2017-03-01T17:52:27.000Z
2020-05-23T15:43:34.000Z
publications_bootstrap/admin_views/import_bibtex.py
jchoude/django-publications-bootstrap
327bda308259c4ce98094690e875b919b3945681
[ "MIT" ]
4
2018-01-17T20:29:56.000Z
2022-02-21T13:32:35.000Z
# -*- coding: utf-8 -*- import re from django.contrib import messages from django.contrib.admin.views.decorators import staff_member_required from django.http import HttpResponseRedirect from django.shortcuts import render from django_countries import countries from ..bibtex import parse from ..models import Publica...
37.045918
112
0.433687
import re from django.contrib import messages from django.contrib.admin.views.decorators import staff_member_required from django.http import HttpResponseRedirect from django.shortcuts import render from django_countries import countries from ..bibtex import parse from ..models import Publication, Type MONTHS = { ...
true
true
08f5251143217adfc80d3d16641a2b4e6c402c5f
2,647
py
Python
synaction/detect_pose_folder.py
dbash/umi2i_correctness
34d794c95a1226db80aa07634b1cfae442b7abc8
[ "MIT" ]
2
2022-01-05T13:07:38.000Z
2022-03-05T17:23:24.000Z
synaction/detect_pose_folder.py
dbash/umi2i_correctness
34d794c95a1226db80aa07634b1cfae442b7abc8
[ "MIT" ]
null
null
null
synaction/detect_pose_folder.py
dbash/umi2i_correctness
34d794c95a1226db80aa07634b1cfae442b7abc8
[ "MIT" ]
null
null
null
import sys import glob import tqdm import imageio import matplotlib.pyplot as plt import numpy as np import tensorflow as tf tfl_url = 'https://storage.googleapis.com/download.tensorflow.org/models/tflite/posenet_mobilenet_v1_100_257x257_multi_kpt_stripped.tflite' def run_posenet(*inputs): tfl_path = tf.keras.uti...
34.376623
139
0.705705
import sys import glob import tqdm import imageio import matplotlib.pyplot as plt import numpy as np import tensorflow as tf tfl_url = 'https://storage.googleapis.com/download.tensorflow.org/models/tflite/posenet_mobilenet_v1_100_257x257_multi_kpt_stripped.tflite' def run_posenet(*inputs): tfl_path = tf.keras.uti...
true
true
08f52545267754ecc900fb977e35b1a170c7f555
475
py
Python
packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickwidth.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickwidth.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickwidth.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="densitymapbox.colorbar", **kwargs ): super(TickwidthValidator, self).__init__( plotly_name=plotly_name, ...
31.666667
85
0.648421
import _plotly_utils.basevalidators class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="densitymapbox.colorbar", **kwargs ): super(TickwidthValidator, self).__init__( plotly_name=plotly_name, ...
true
true
08f526d951772af4d4a00162f59afb57f9283928
9,301
py
Python
luci-app-ssrserver-python/root/usr/share/ssr/server_pool.py
bearking1069/openwrt-packages
eb78e080d5e3a022aa5a3acaff492283306cfc6b
[ "Apache-2.0" ]
42
2021-04-11T13:37:44.000Z
2022-03-14T16:00:13.000Z
luci-app-ssrserver-python/root/usr/share/ssr/server_pool.py
bearking1069/openwrt-packages
eb78e080d5e3a022aa5a3acaff492283306cfc6b
[ "Apache-2.0" ]
52
2021-04-13T04:17:02.000Z
2022-03-12T15:05:14.000Z
luci-app-ssrserver-python/root/usr/share/ssr/server_pool.py
bearking1069/openwrt-packages
eb78e080d5e3a022aa5a3acaff492283306cfc6b
[ "Apache-2.0" ]
109
2021-04-01T09:13:05.000Z
2022-03-31T17:33:13.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2014 clowwindy # # 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 ...
31.636054
122
0.708741
 import os import logging import struct import time from shadowsocks import shell, eventloop, tcprelay, udprelay, asyncdns, common import threading import sys import traceback from socket import * from configloader import load_config, get_config class MainThread(threading.Thread): def __init__(self, params): supe...
false
true
08f527086945542326a9d8e7fa9eaf283b1db98a
506
py
Python
app/api_1_0/game_server.py
thenigan/online-ratings
bf0caf087bce80560aa9fb3e44ec620f652eb96a
[ "MIT" ]
null
null
null
app/api_1_0/game_server.py
thenigan/online-ratings
bf0caf087bce80560aa9fb3e44ec620f652eb96a
[ "MIT" ]
null
null
null
app/api_1_0/game_server.py
thenigan/online-ratings
bf0caf087bce80560aa9fb3e44ec620f652eb96a
[ "MIT" ]
null
null
null
from flask import jsonify from flask.ext.security import roles_required from app.models import GoServer from . import api @api.route('/GameServer', methods=['GET']) @roles_required('ratings_admin') def allgameservers(): game_servers = GoServer.query.all() data = { "num_servers": len(game_servers), ...
26.631579
68
0.660079
from flask import jsonify from flask.ext.security import roles_required from app.models import GoServer from . import api @api.route('/GameServer', methods=['GET']) @roles_required('ratings_admin') def allgameservers(): game_servers = GoServer.query.all() data = { "num_servers": len(game_servers), ...
true
true
08f5276452279020e444bb5c00780e5b43c96a71
7,075
py
Python
pysnmp-with-texts/SNMP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/SNMP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/SNMP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module SNMP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SNMP-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:08:13 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:1...
133.490566
585
0.779647
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.impo...
true
true
08f527ba2575454f3dfd4a06c1187cb62ad543d2
715
py
Python
lc/0042_TrappingRainWater.py
xiangshiyin/coding-challenge
a75a644b96dec1b6c7146b952ca4333263f0a461
[ "Apache-2.0" ]
null
null
null
lc/0042_TrappingRainWater.py
xiangshiyin/coding-challenge
a75a644b96dec1b6c7146b952ca4333263f0a461
[ "Apache-2.0" ]
null
null
null
lc/0042_TrappingRainWater.py
xiangshiyin/coding-challenge
a75a644b96dec1b6c7146b952ca4333263f0a461
[ "Apache-2.0" ]
null
null
null
class Solution: def trap(self, height: List[int]) -> int: # exceptions if height==None: return 0 N = len(height) if N<=2: return 0 # traverse the list left = 0 right = N-1 lmax = 0 rmax = 0 volume = 0 ...
24.655172
45
0.402797
class Solution: def trap(self, height: List[int]) -> int: if height==None: return 0 N = len(height) if N<=2: return 0 left = 0 right = N-1 lmax = 0 rmax = 0 volume = 0 while left <= right: ...
true
true
08f527cb59b86c22f492cdb6063ae37229058fdd
18,105
py
Python
database/study_models.py
xuancong84/beiwe-backend
229f083cdfb29b203c1e55c3291a3dce920dfb11
[ "BSD-3-Clause" ]
1
2020-08-01T13:40:36.000Z
2020-08-01T13:40:36.000Z
database/study_models.py
xuancong84/beiwe-backend
229f083cdfb29b203c1e55c3291a3dce920dfb11
[ "BSD-3-Clause" ]
null
null
null
database/study_models.py
xuancong84/beiwe-backend
229f083cdfb29b203c1e55c3291a3dce920dfb11
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import * import json, pickle from django.db import models from django.db.models import F, Func from django.utils import timezone from config.constants import ALL_DEVICE_PARAMETERS from django.contrib.postgres import fields from config.s...
40.961538
141
0.686164
from __future__ import unicode_literals from collections import * import json, pickle from django.db import models from django.db.models import F, Func from django.utils import timezone from config.constants import ALL_DEVICE_PARAMETERS from django.contrib.postgres import fields from config.study_constants import * ...
true
true
08f5280f8fb64b85e6b2fb56fb8ad9f3070a2c3a
4,549
py
Python
testscripts/RDKB/component/TDKB_TR181/TDKB_TR181_MTA_SetAllParameterValues_WithReboot.py
rdkcmf/rdkb-tools-tdkb
9f9c3600cd701d5fc90ac86a6394ebd28d49267e
[ "Apache-2.0" ]
null
null
null
testscripts/RDKB/component/TDKB_TR181/TDKB_TR181_MTA_SetAllParameterValues_WithReboot.py
rdkcmf/rdkb-tools-tdkb
9f9c3600cd701d5fc90ac86a6394ebd28d49267e
[ "Apache-2.0" ]
null
null
null
testscripts/RDKB/component/TDKB_TR181/TDKB_TR181_MTA_SetAllParameterValues_WithReboot.py
rdkcmf/rdkb-tools-tdkb
9f9c3600cd701d5fc90ac86a6394ebd28d49267e
[ "Apache-2.0" ]
null
null
null
########################################################################## # If not stated otherwise in this file or this component's Licenses.txt # file the following copyright and licenses apply: # # Copyright 2020 RDK Management # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use th...
39.903509
138
0.736645
# file the following copyright and licenses apply: # # Copyright 2020 RDK Management # # 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 ...
false
true
08f528357dc3fc8af155c40f5668e4e96bc86de4
7,455
py
Python
detection/core/anchor/anchor_target.py
cl886699/frcnn_multigpu
eed28bd3eafdf43957ea66b4ab6198d7dca57385
[ "MIT" ]
null
null
null
detection/core/anchor/anchor_target.py
cl886699/frcnn_multigpu
eed28bd3eafdf43957ea66b4ab6198d7dca57385
[ "MIT" ]
null
null
null
detection/core/anchor/anchor_target.py
cl886699/frcnn_multigpu
eed28bd3eafdf43957ea66b4ab6198d7dca57385
[ "MIT" ]
null
null
null
import tensorflow as tf from detection.core.bbox import geometry, transforms from detection.utils.misc import trim_zeros class AnchorTarget(object): def __init__(self, target_means=(0., 0., 0., 0.), target_stds=(0.1, 0.1, 0.2, 0.2), num_rpn_deltas=256, ...
44.640719
110
0.577062
import tensorflow as tf from detection.core.bbox import geometry, transforms from detection.utils.misc import trim_zeros class AnchorTarget(object): def __init__(self, target_means=(0., 0., 0., 0.), target_stds=(0.1, 0.1, 0.2, 0.2), num_rpn_deltas=256, ...
true
true
08f528fb7552883aa4dbf6b2f966611968f88cf6
1,541
py
Python
cycles/demo_singleColor.py
em-yu/BlenderToolbox
ac9da757c8c372237458467aa6663bcdbb86b803
[ "Apache-2.0" ]
null
null
null
cycles/demo_singleColor.py
em-yu/BlenderToolbox
ac9da757c8c372237458467aa6663bcdbb86b803
[ "Apache-2.0" ]
null
null
null
cycles/demo_singleColor.py
em-yu/BlenderToolbox
ac9da757c8c372237458467aa6663bcdbb86b803
[ "Apache-2.0" ]
null
null
null
import sys sys.path.append('/Users/hsuehtil/Dropbox/BlenderToolbox/cycles') from include import * import bpy outputPath = './results/demo_singleColor.png' # # init blender imgRes_x = 720 # increase this for paper figures imgRes_y = 720 # increase this for paper figures numSamples = 50 # usually increase it to >200 ...
24.854839
64
0.730694
import sys sys.path.append('/Users/hsuehtil/Dropbox/BlenderToolbox/cycles') from include import * import bpy outputPath = './results/demo_singleColor.png' imgRes_x = 720 imgRes_y = 720 numSamples = 50 exposure = 1.0 blenderInit(imgRes_x, imgRes_y, numSamples, exposure) meshPath = '../meshes/spot.ply' location = (-...
true
true
08f52a4354322bf32aa24be37129c507d16fb258
2,123
py
Python
app/auth/routes.py
tc-mwangi/s-blog
138451e044f1000591bf5dbd16907c4aa1a76981
[ "MIT" ]
null
null
null
app/auth/routes.py
tc-mwangi/s-blog
138451e044f1000591bf5dbd16907c4aa1a76981
[ "MIT" ]
null
null
null
app/auth/routes.py
tc-mwangi/s-blog
138451e044f1000591bf5dbd16907c4aa1a76981
[ "MIT" ]
null
null
null
from flask import render_template, flash, redirect, url_for, request from flask_login import current_user, login_user, logout_user, login_required from datetime import datetime from app import db from app.auth import bp from app.forms import LoginForm, RegistrationForm, EditProfileForm, PostForm from werkzeug.urls impo...
28.306667
81
0.6439
from flask import render_template, flash, redirect, url_for, request from flask_login import current_user, login_user, logout_user, login_required from datetime import datetime from app import db from app.auth import bp from app.forms import LoginForm, RegistrationForm, EditProfileForm, PostForm from werkzeug.urls impo...
true
true
08f52a603d48186ab21dd108c7203d58c64dc9a7
19,280
py
Python
autodisc/autodisc/representations/static/pytorchnnrepresentation/pytorchnnarchitectures.py
flowersteam/automated_discovery_of_lenia_patterns
97cc7cde2120fa95225d1e470e00b8aa8c034e97
[ "MIT" ]
10
2019-10-05T16:22:11.000Z
2021-12-30T14:09:42.000Z
autodisc/autodisc/representations/static/pytorchnnrepresentation/pytorchnnarchitectures.py
flowersteam/automated_discovery_of_lenia_patterns
97cc7cde2120fa95225d1e470e00b8aa8c034e97
[ "MIT" ]
null
null
null
autodisc/autodisc/representations/static/pytorchnnrepresentation/pytorchnnarchitectures.py
flowersteam/automated_discovery_of_lenia_patterns
97cc7cde2120fa95225d1e470e00b8aa8c034e97
[ "MIT" ]
2
2019-10-14T12:12:38.000Z
2020-09-16T11:18:26.000Z
from autodisc.representations.static.pytorchnnrepresentation import helper import torch from torch import nn class BetaVAEClassifier(nn.Module): ''' BetaVAE with Classifier network architecture ''' def __init__(self, n_channels = 1, n_latents = 2, input_size = (100,100), beta = 1.0, gamma = 1.0, num_c...
38.637275
197
0.515249
from autodisc.representations.static.pytorchnnrepresentation import helper import torch from torch import nn class BetaVAEClassifier(nn.Module): def __init__(self, n_channels = 1, n_latents = 2, input_size = (100,100), beta = 1.0, gamma = 1.0, num_classes = 2, use_gpu = True, add_var_to_KLD_loss = True, **kwargs)...
true
true
08f52a7900e22affd6a6d073e7a12986e08962bf
647
py
Python
tradinglib.py
aslwinlam/Git_1
57b37a68c43411c7fd806b98f69c790fc2e53928
[ "DOC" ]
null
null
null
tradinglib.py
aslwinlam/Git_1
57b37a68c43411c7fd806b98f69c790fc2e53928
[ "DOC" ]
null
null
null
tradinglib.py
aslwinlam/Git_1
57b37a68c43411c7fd806b98f69c790fc2e53928
[ "DOC" ]
null
null
null
class RowOfStockinf(object): """A class to store row of trading inf: """ numOfStock = [0.0,0.0,0.0,0.0] cash = [2000.0,2000.0,2000.0,2000.0] buyMargin = [.97, .95, .93, .91] numOfSales=[0,0,0,0] def __init__(self, trade_date, trade_open, trade_high, trade_low, trade_clos...
30.809524
112
0.618238
class RowOfStockinf(object): """A class to store row of trading inf: """ numOfStock = [0.0,0.0,0.0,0.0] cash = [2000.0,2000.0,2000.0,2000.0] buyMargin = [.97, .95, .93, .91] numOfSales=[0,0,0,0] def __init__(self, trade_date, trade_open, trade_high, trade_low, trade_clos...
false
true
08f52b7be7a986a89cb5728c8734b204c4f1209f
6,037
py
Python
codes/generate_feature_1.py
allendred/JData-1
d4444065a8809f881e4ad105fc79b7f86669bfe2
[ "Apache-2.0" ]
null
null
null
codes/generate_feature_1.py
allendred/JData-1
d4444065a8809f881e4ad105fc79b7f86669bfe2
[ "Apache-2.0" ]
null
null
null
codes/generate_feature_1.py
allendred/JData-1
d4444065a8809f881e4ad105fc79b7f86669bfe2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8-*- ''' 抽取如下特征, 浏览数、收藏数、购物车、购买数、平均活跃天数、最后活跃天数距离最终时间的天数 列表: 用户名, 商品名,平均活跃天数、最后活跃天数距离最终时间的天数、 年龄段、性别、用户等级、用户注册时间长度、 商品属性1、商品属性2、商品属性3、品类、 品牌 -->协同过滤算法得到相关系数亦可 累计评分数、是否有差评、差评比率、平均累计评分数、平均是否有差评、平均差评比率 加入预测前一天时各个商品的: comment_num 评价...
36.149701
109
0.633924
''' 抽取如下特征, 浏览数、收藏数、购物车、购买数、平均活跃天数、最后活跃天数距离最终时间的天数 列表: 用户名, 商品名,平均活跃天数、最后活跃天数距离最终时间的天数、 年龄段、性别、用户等级、用户注册时间长度、 商品属性1、商品属性2、商品属性3、品类、 品牌 -->协同过滤算法得到相关系数亦可 累计评分数、是否有差评、差评比率、平均累计评分数、平均是否有差评、平均差评比率 加入预测前一天时各个商品的: comment_num 评价数目 has_bad_comment 差评数目 ...
false
true
08f52ba0ef7489725c17cc1a932611577081ec93
14,227
py
Python
lib-linux/datasets/pascal_voc.py
stanley-king/cuda10-py3-faster-rcnn
013f99c428874bfd3ddaeed264031143d10a8123
[ "BSD-2-Clause" ]
null
null
null
lib-linux/datasets/pascal_voc.py
stanley-king/cuda10-py3-faster-rcnn
013f99c428874bfd3ddaeed264031143d10a8123
[ "BSD-2-Clause" ]
1
2020-12-28T03:20:43.000Z
2020-12-28T03:20:43.000Z
lib-linux/datasets/pascal_voc.py
stanley-king/cuda10-py3-faster-rcnn
013f99c428874bfd3ddaeed264031143d10a8123
[ "BSD-2-Clause" ]
null
null
null
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- import os from datasets.imdb import imdb import datasets.ds_utils as ds...
41.237681
80
0.54263
import os from datasets.imdb import imdb import datasets.ds_utils as ds_utils import xml.etree.ElementTree as ET import numpy as np import scipy.sparse import scipy.io as sio import utils.cython_bbox import pickle as cPickle import subprocess import uuid from voc_eval import voc_eval from fast_rcnn.config import cfg ...
false
true
08f52c50897de9a5915d5ca9ddabcb2ece3b11e9
495
py
Python
djangit/posts/migrations/0002_auto_20180812_2205.py
ryanthtra/djangit
0de03165cc23374951d225c54ddc0025f427df40
[ "MIT" ]
null
null
null
djangit/posts/migrations/0002_auto_20180812_2205.py
ryanthtra/djangit
0de03165cc23374951d225c54ddc0025f427df40
[ "MIT" ]
null
null
null
djangit/posts/migrations/0002_auto_20180812_2205.py
ryanthtra/djangit
0de03165cc23374951d225c54ddc0025f427df40
[ "MIT" ]
null
null
null
# Generated by Django 2.1 on 2018-08-12 22:05 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('posts', '0001_initial'), ] operations = [ migrations.AlterField( ...
23.571429
110
0.652525
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('posts', '0001_initial'), ] operations = [ migrations.AlterField( model_name='post', name='author',...
true
true
08f52ce24fd53d132785fbb6c2e445fcef5b2b53
723
py
Python
byceps/services/authentication/session/dbmodels/recent_login.py
homeworkprod/byceps
cd0f9f37f7b5eb517106ec761acc7e0bdf75e22e
[ "BSD-3-Clause" ]
23
2015-08-03T23:28:54.000Z
2018-12-12T20:11:45.000Z
byceps/services/authentication/session/dbmodels/recent_login.py
homeworkprod/byceps
cd0f9f37f7b5eb517106ec761acc7e0bdf75e22e
[ "BSD-3-Clause" ]
1
2018-09-30T18:18:24.000Z
2018-09-30T18:18:24.000Z
byceps/services/authentication/session/dbmodels/recent_login.py
homeworkprod/byceps
cd0f9f37f7b5eb517106ec761acc7e0bdf75e22e
[ "BSD-3-Clause" ]
9
2015-08-06T16:41:36.000Z
2018-09-25T11:17:31.000Z
""" byceps.services.authentication.session.dbmodels.recent_login ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2014-2022 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from datetime import datetime from .....database import db from .....typing import UserID...
27.807692
77
0.661134
from datetime import datetime from .....database import db from .....typing import UserID class RecentLogin(db.Model): __tablename__ = 'authn_recent_logins' user_id = db.Column(db.Uuid, db.ForeignKey('users.id'), primary_key=True) occurred_at = db.Column(db.DateTime, nullable=False) def __init__(...
true
true
08f52d318f15498c7defd666d502e00e3d47eae6
753
py
Python
vnpy/trader/utils/templates/notify.py
WongLynn/vnpy_Amerlin-1.1.20
d701d8f12c29cc33f58ea025920b0c7240f74f82
[ "MIT" ]
11
2019-10-28T13:01:48.000Z
2021-06-20T03:38:09.000Z
vnpy/trader/utils/templates/notify.py
Rayshawn8/vnpy_Amerlin-1.1.20
d701d8f12c29cc33f58ea025920b0c7240f74f82
[ "MIT" ]
null
null
null
vnpy/trader/utils/templates/notify.py
Rayshawn8/vnpy_Amerlin-1.1.20
d701d8f12c29cc33f58ea025920b0c7240f74f82
[ "MIT" ]
6
2019-10-28T13:16:13.000Z
2020-09-08T08:03:41.000Z
from xml.etree import ElementTree from collections import defaultdict import json import requests import re ROOT_TAG = "ding" def dingFormatter(): e = ElementTree.Element(ROOT_TAG) e.text = ".*?" return ElementTree.tostring(e, "unicode") DingCompiler = re.compile(dingFormatter()) def makeNotify(messa...
21.514286
58
0.697211
from xml.etree import ElementTree from collections import defaultdict import json import requests import re ROOT_TAG = "ding" def dingFormatter(): e = ElementTree.Element(ROOT_TAG) e.text = ".*?" return ElementTree.tostring(e, "unicode") DingCompiler = re.compile(dingFormatter()) def makeNotify(messa...
true
true
08f52d518e83cdf355ffea25c84107e8b294b04d
4,177
py
Python
geinos/app/core/api/users_plug.py
falhenaki/GEINOS
c0bf883c582972b08ab5ee45d2bd0463d6c48087
[ "MIT" ]
3
2018-03-19T16:51:21.000Z
2019-01-18T22:52:19.000Z
geinos/app/core/api/users_plug.py
falhenaki/GEINOS
c0bf883c582972b08ab5ee45d2bd0463d6c48087
[ "MIT" ]
261
2018-02-08T16:24:26.000Z
2018-08-07T03:38:16.000Z
geinos/app/core/api/users_plug.py
falhenaki/GEINOS
c0bf883c582972b08ab5ee45d2bd0463d6c48087
[ "MIT" ]
null
null
null
from flask_restful import Resource from flask import request, jsonify from app.core.user import auth from app.core.user import user_connector from app.core.api import request_parser from app.core.exceptions.custom_exceptions import Conflict class Users(Resource): """ HTTP Method: GET Authorization: Requir...
36.008621
148
0.594446
from flask_restful import Resource from flask import request, jsonify from app.core.user import auth from app.core.user import user_connector from app.core.api import request_parser from app.core.exceptions.custom_exceptions import Conflict class Users(Resource): def get(self): logged_user = request_parse...
true
true
08f52ef4fd1c204b0f346b1db6adc14284381902
205
py
Python
redisdb/datadog_checks/redisdb/__init__.py
glasser/integrations-core
1dd515d49b1690a1369ee5195713605b1b072b1f
[ "BSD-3-Clause" ]
2
2019-05-28T03:48:29.000Z
2019-07-05T07:05:58.000Z
redisdb/datadog_checks/redisdb/__init__.py
glasser/integrations-core
1dd515d49b1690a1369ee5195713605b1b072b1f
[ "BSD-3-Clause" ]
4
2019-07-03T02:53:19.000Z
2019-07-10T14:52:14.000Z
redisdb/datadog_checks/redisdb/__init__.py
glasser/integrations-core
1dd515d49b1690a1369ee5195713605b1b072b1f
[ "BSD-3-Clause" ]
1
2019-12-23T13:35:17.000Z
2019-12-23T13:35:17.000Z
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from .__about__ import __version__ from .redisdb import Redis __all__ = ['__version__', 'Redis']
25.625
59
0.746341
from .__about__ import __version__ from .redisdb import Redis __all__ = ['__version__', 'Redis']
true
true
08f52f3ff0362828d349b2be6358566b0cfce6b2
1,516
py
Python
pycroft/lib/host.py
marcelb98/pycroft
34cc59d9ab7fdc0c20b09b4851111048a9f64d90
[ "Apache-2.0" ]
null
null
null
pycroft/lib/host.py
marcelb98/pycroft
34cc59d9ab7fdc0c20b09b4851111048a9f64d90
[ "Apache-2.0" ]
null
null
null
pycroft/lib/host.py
marcelb98/pycroft
34cc59d9ab7fdc0c20b09b4851111048a9f64d90
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from pycroft.helpers.i18n import deferred_gettext from pycroft.lib.logging import log_us...
36.97561
79
0.635224
from pycroft.helpers.i18n import deferred_gettext from pycroft.lib.logging import log_user_event from pycroft.model.session import with_transaction @with_transaction def change_mac(interface, mac, processor): old_mac = interface.mac interface.mac = mac message = deferred_gettext(u"Changed MAC address from...
true
true
08f52f9bdd28b02288c01994888c0dda2563ab16
3,057
py
Python
tests/test_helpers_command.py
fossabot/PyFunceble
4335cb31e6cf20cf8e10dd2cc6ac3afa50199ea4
[ "Apache-2.0" ]
null
null
null
tests/test_helpers_command.py
fossabot/PyFunceble
4335cb31e6cf20cf8e10dd2cc6ac3afa50199ea4
[ "Apache-2.0" ]
null
null
null
tests/test_helpers_command.py
fossabot/PyFunceble
4335cb31e6cf20cf8e10dd2cc6ac3afa50199ea4
[ "Apache-2.0" ]
null
null
null
# pylint:disable=line-too-long,invalid-name,import-error """ The tool to check the availability or syntax of domain, IP or URL. :: ██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗ ██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝ ████...
27.053097
88
0.540072
import sys from unittest import main as launch_tests from stdout_base import StdoutBase from PyFunceble.abstracts import Platform from PyFunceble.helpers import Command class TestCommand(StdoutBase): def test_execute(self): if Platform.is_unix(): expected = "Hello, World!\n" a...
true
true
08f531146b74fa5cf1eb841a8c873a6c396afff8
3,163
py
Python
config/settings/config_common.py
makethedayunique/pandama-online-store
38c02809a89087f5a6c83fd6ee2c39dab8d66f6c
[ "MIT" ]
null
null
null
config/settings/config_common.py
makethedayunique/pandama-online-store
38c02809a89087f5a6c83fd6ee2c39dab8d66f6c
[ "MIT" ]
null
null
null
config/settings/config_common.py
makethedayunique/pandama-online-store
38c02809a89087f5a6c83fd6ee2c39dab8d66f6c
[ "MIT" ]
null
null
null
import environ root = environ.Path(__file__) - 3 env = environ.Env() environ.Env.read_env() DEBUG = env.bool('DEBUG', default=False) SECRET_KEY = env.str('SECRET_KEY') ALLOWED_HOSTS = env.list('ALLOWED_HOSTS', default=['*']) LOGTAIL_SOURCE_TOKEN=env.str('LOGTAIL_SOURCE_TOKEN') PANDAMA_DOMAIN=env.str('PANDAMA_DOMAI...
64.55102
168
0.852988
import environ root = environ.Path(__file__) - 3 env = environ.Env() environ.Env.read_env() DEBUG = env.bool('DEBUG', default=False) SECRET_KEY = env.str('SECRET_KEY') ALLOWED_HOSTS = env.list('ALLOWED_HOSTS', default=['*']) LOGTAIL_SOURCE_TOKEN=env.str('LOGTAIL_SOURCE_TOKEN') PANDAMA_DOMAIN=env.str('PANDAMA_DOMAI...
true
true
08f531aa8bd97d12b7e29f1deccce8a20b90ba18
332
py
Python
show_database.py
naufalfachrian/py-database-manager
80818192e3dccadd5257df1db0cbe09bcaded1ed
[ "MIT" ]
null
null
null
show_database.py
naufalfachrian/py-database-manager
80818192e3dccadd5257df1db0cbe09bcaded1ed
[ "MIT" ]
null
null
null
show_database.py
naufalfachrian/py-database-manager
80818192e3dccadd5257df1db0cbe09bcaded1ed
[ "MIT" ]
1
2020-09-14T17:30:32.000Z
2020-09-14T17:30:32.000Z
import db print('Here are the list of the databases\' name available on your system :') if db.connection.is_connected(): cursor = db.connection.cursor() cursor.execute("SHOW DATABASES") results = cursor.fetchall() for result in results: database_name = result[0] print(" > {}".format(dat...
33.2
77
0.677711
import db print('Here are the list of the databases\' name available on your system :') if db.connection.is_connected(): cursor = db.connection.cursor() cursor.execute("SHOW DATABASES") results = cursor.fetchall() for result in results: database_name = result[0] print(" > {}".format(dat...
true
true
08f53226d0761533fbd5372f68e9dee99a9291b3
748
py
Python
tests/tests/attributes/variable/resave.py
mattbornski/cdf
d48aa7d2bcfe03f42580b03a141c6a63fd0b542d
[ "Apache-2.0" ]
3
2016-05-28T10:55:36.000Z
2018-02-26T11:37:45.000Z
tests/tests/attributes/variable/resave.py
mattbornski/cdf
d48aa7d2bcfe03f42580b03a141c6a63fd0b542d
[ "Apache-2.0" ]
null
null
null
tests/tests/attributes/variable/resave.py
mattbornski/cdf
d48aa7d2bcfe03f42580b03a141c6a63fd0b542d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python def test(): import cdf import os test = cdf.archive() test['foo'] = [1, 2] test['bar'] = [151.15, 151.30] test['foo'].attributes['int'] = 'true' test['foo'].attributes['min'] = 1 test['bar'].attributes['int'] = 'false' test['bar'].attributes['max'] = 151.30 ...
22
60
0.588235
def test(): import cdf import os test = cdf.archive() test['foo'] = [1, 2] test['bar'] = [151.15, 151.30] test['foo'].attributes['int'] = 'true' test['foo'].attributes['min'] = 1 test['bar'].attributes['int'] = 'false' test['bar'].attributes['max'] = 151.30 test.save('test') ...
false
true
08f532399a4855a9886b12c2694a107003354653
436
py
Python
blockbuster_clone/movies/migrations/0012_auto_20210418_1133.py
alexche77/blockbuster-api-clone
3597b6c6eb1e14b45bca233efabe2bc200a280f1
[ "MIT" ]
null
null
null
blockbuster_clone/movies/migrations/0012_auto_20210418_1133.py
alexche77/blockbuster-api-clone
3597b6c6eb1e14b45bca233efabe2bc200a280f1
[ "MIT" ]
null
null
null
blockbuster_clone/movies/migrations/0012_auto_20210418_1133.py
alexche77/blockbuster-api-clone
3597b6c6eb1e14b45bca233efabe2bc200a280f1
[ "MIT" ]
null
null
null
# Generated by Django 3.1.8 on 2021-04-18 11:33 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("movies", "0011_movie_is_available"), ] operations = [ migrations.RemoveField( model_name="movie", name="deleted_at", ...
19.818182
47
0.56422
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("movies", "0011_movie_is_available"), ] operations = [ migrations.RemoveField( model_name="movie", name="deleted_at", ), migrations.RemoveField( ...
true
true
08f53245e1a2c52d959369cc6fcd331b91fc58de
2,778
py
Python
src/braket/circuits/gate.py
shiyunon/amazon-braket-sdk-python
df8b38ddd9f8b976987bd816f7b1b561190ad45b
[ "Apache-2.0" ]
3
2021-11-08T11:46:42.000Z
2021-12-27T10:13:38.000Z
src/braket/circuits/gate.py
shiyunon/amazon-braket-sdk-python
df8b38ddd9f8b976987bd816f7b1b561190ad45b
[ "Apache-2.0" ]
2
2021-11-09T14:57:09.000Z
2022-01-12T12:35:58.000Z
artifacts/old_dataset_versions/original_commits_v02/amazon-braket-sdk-python/amazon-braket-sdk-python#250/before/gate.py
MattePalte/Bugs-Quantum-Computing-Platforms
0c1c805fd5dfce465a8955ee3faf81037023a23e
[ "MIT" ]
null
null
null
# Copyright 2019-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
39.685714
97
0.669546
from typing import Any, Sequence from braket.circuits.quantum_operator import QuantumOperator from braket.circuits.qubit_set import QubitSet class Gate(QuantumOperator): def __init__(self, qubit_count: int, ascii_symbols: Sequence[str]): super().__init__(qubit_count=qubit_count, ascii_symbols=ascii_sym...
true
true
08f532883fa6fd33bc06506f048b9250233a3934
4,168
py
Python
intel/reconcile.py
malsbat/CPU-Manager-for-Kubernetes
e714696e30c039491fe10979de0045ff6620ef80
[ "Apache-2.0" ]
null
null
null
intel/reconcile.py
malsbat/CPU-Manager-for-Kubernetes
e714696e30c039491fe10979de0045ff6620ef80
[ "Apache-2.0" ]
null
null
null
intel/reconcile.py
malsbat/CPU-Manager-for-Kubernetes
e714696e30c039491fe10979de0045ff6620ef80
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
30.874074
79
0.587092
import json import logging import os import time from kubernetes import config as k8sconfig, client as k8sclient from . import config, proc, third_party, custom_resource, k8s, util def reconcile(conf_dir, seconds, publish): conf = config.Config(conf_dir) report = None if seconds is None: second...
true
true
08f53322e20c7acae60ed60212b08d7d64102e2a
618
py
Python
pyoperant/interfaces/spike2_.py
kaichensh/pyoperant
95e427604cdce07505bd6e3c1592883f45f4fac4
[ "BSD-3-Clause" ]
10
2015-02-21T22:58:43.000Z
2021-05-20T22:47:57.000Z
pyoperant/interfaces/spike2_.py
kaichensh/pyoperant
95e427604cdce07505bd6e3c1592883f45f4fac4
[ "BSD-3-Clause" ]
31
2015-02-17T16:43:15.000Z
2020-03-06T23:09:48.000Z
pyoperant/interfaces/spike2_.py
kaichensh/pyoperant
95e427604cdce07505bd6e3c1592883f45f4fac4
[ "BSD-3-Clause" ]
10
2015-07-02T18:55:02.000Z
2021-09-20T22:45:43.000Z
from pyoperant.interfaces import base_ class Spike2Interface(base_.BaseInterface): """docstring for Spike2Interface""" def __init__(self): super(Spike2Interface, self).__init__() def open(self): raise NotImplementedError def close(self): raise NotImplementedError ...
22.888889
47
0.68123
from pyoperant.interfaces import base_ class Spike2Interface(base_.BaseInterface): def __init__(self): super(Spike2Interface, self).__init__() def open(self): raise NotImplementedError def close(self): raise NotImplementedError def _read_bool(self): raise NotI...
true
true
08f533cd88cb263ebc72f323053c41a199f1f8d9
918
py
Python
predict.py
pkbatth92/Data-Science
769ad73ecb51d79a1cc070b9eeb23ac7cd796728
[ "MIT" ]
null
null
null
predict.py
pkbatth92/Data-Science
769ad73ecb51d79a1cc070b9eeb23ac7cd796728
[ "MIT" ]
null
null
null
predict.py
pkbatth92/Data-Science
769ad73ecb51d79a1cc070b9eeb23ac7cd796728
[ "MIT" ]
null
null
null
import time import json import torchvision from torchvision import datasets, transforms, models import argparse from utility import * from load_checkpoint import * parser = argparse.ArgumentParser() parser.add_argument('input') parser.add_argument('checkpoint') parser.add_argument('--top_k') parser.add_argument('--cat...
21.857143
58
0.752723
import time import json import torchvision from torchvision import datasets, transforms, models import argparse from utility import * from load_checkpoint import * parser = argparse.ArgumentParser() parser.add_argument('input') parser.add_argument('checkpoint') parser.add_argument('--top_k') parser.add_argument('--cat...
true
true
08f534271916b888718de9408b11599859d9a50b
3,799
py
Python
venv/Lib/site-packages/elasticsearch/client/eql.py
ojaap/Sophosbeat
c6e99c9923b21deeeae539aa9152c7eed77622a3
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/elasticsearch/client/eql.py
ojaap/Sophosbeat
c6e99c9923b21deeeae539aa9152c7eed77622a3
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/elasticsearch/client/eql.py
ojaap/Sophosbeat
c6e99c9923b21deeeae539aa9152c7eed77622a3
[ "Apache-2.0" ]
null
null
null
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use ...
44.174419
92
0.672282
from .utils import NamespacedClient, SKIP_IN_PATH, query_params, _make_path class EqlClient(NamespacedClient): @query_params("keep_alive", "keep_on_completion", "wait_for_completion_timeout") def search(self, index, body, params=None, headers=None): for param in (index, body): if param in...
true
true
08f53465fcc171358b8a2d6d74556fab6c82b1a2
10,671
py
Python
scripts/train.py
sebastianmdick/torchmd-net
e193da7e3e17566c0d3f0333b4648d66d6c3a340
[ "MIT" ]
null
null
null
scripts/train.py
sebastianmdick/torchmd-net
e193da7e3e17566c0d3f0333b4648d66d6c3a340
[ "MIT" ]
null
null
null
scripts/train.py
sebastianmdick/torchmd-net
e193da7e3e17566c0d3f0333b4648d66d6c3a340
[ "MIT" ]
null
null
null
import sys import os import argparse import logging import pytorch_lightning as pl from pytorch_lightning.callbacks import EarlyStopping from pytorch_lightning.callbacks.model_checkpoint import ModelCheckpoint from pytorch_lightning.loggers import CSVLogger from pytorch_lightning.plugins import DDPPlugin from torchmdne...
61.327586
185
0.719895
import sys import os import argparse import logging import pytorch_lightning as pl from pytorch_lightning.callbacks import EarlyStopping from pytorch_lightning.callbacks.model_checkpoint import ModelCheckpoint from pytorch_lightning.loggers import CSVLogger from pytorch_lightning.plugins import DDPPlugin from torchmdne...
true
true
08f5348bf8a3e03ee89d554e2089278a98e44f57
828
py
Python
Authentication/migrations/0001_initial.py
CHESyrian/Estebyan
015c0a8e95d033af04ba949942da79a4f5a90488
[ "MIT" ]
null
null
null
Authentication/migrations/0001_initial.py
CHESyrian/Estebyan
015c0a8e95d033af04ba949942da79a4f5a90488
[ "MIT" ]
null
null
null
Authentication/migrations/0001_initial.py
CHESyrian/Estebyan
015c0a8e95d033af04ba949942da79a4f5a90488
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-11-05 13:40 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
30.666667
122
0.638889
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
08f5368b0a9d315fc346c465f4e5487d3d6c71ea
13,424
py
Python
django_ocr_server/tests/utils/test_utils.py
shmakovpn/django_ocr_server
4d694629c39c18a6c13bcdfafdb8258b78e5a859
[ "Apache-2.0" ]
17
2019-12-04T03:14:56.000Z
2022-03-27T07:05:19.000Z
django_ocr_server/tests/utils/test_utils.py
shmakovpn/django_ocr_server
4d694629c39c18a6c13bcdfafdb8258b78e5a859
[ "Apache-2.0" ]
1
2020-04-17T07:32:30.000Z
2020-04-17T07:32:30.000Z
django_ocr_server/tests/utils/test_utils.py
shmakovpn/django_ocr_server
4d694629c39c18a6c13bcdfafdb8258b78e5a859
[ "Apache-2.0" ]
5
2020-03-16T10:43:03.000Z
2021-07-14T14:43:49.000Z
""" django_ocr_server/tests/utils/test_utils.py +++++++++++++++++++++++++++++++++++++++++++ | Author: shmakovpn <shmakovpn@yandex.ru> | Date: 2021-01-07 """ from typing import List, Match, Optional, NewType, Type from django.test import SimpleTestCase from unittest.mock import patch from io import StringIO import djan...
47.772242
88
0.632747
from typing import List, Match, Optional, NewType, Type from django.test import SimpleTestCase from unittest.mock import patch from io import StringIO import django_ocr_server.utils as _u import os import pdftotext import re Path: Type = NewType('Path', str) class TestUtils(SimpleTestCase): def test_read_binary_...
true
true
08f537704aa65781370a99e580b0379ea8a0dc6b
2,209
py
Python
Botnets/App/App Web/backend/Modules/DB/Database.py
i2tResearch/Ciberseguridad_web
ac3dd934a60628532e3538369cb145d9a8f33e4f
[ "MIT" ]
9
2021-10-01T22:02:58.000Z
2021-11-09T17:48:45.000Z
Botnets/App/App Web/backend/Modules/DB/Database.py
i2tResearch/Ciberseguridad_web
ac3dd934a60628532e3538369cb145d9a8f33e4f
[ "MIT" ]
null
null
null
Botnets/App/App Web/backend/Modules/DB/Database.py
i2tResearch/Ciberseguridad_web
ac3dd934a60628532e3538369cb145d9a8f33e4f
[ "MIT" ]
null
null
null
from firebase import firebase import backend.Modules.Routes.Routes as Routes import datetime class Database(): __instance = None @staticmethod def getInstance(): """ Static access method. """ if Database.__instance == None: Database() return Database.__instance d...
31.112676
116
0.506111
from firebase import firebase import backend.Modules.Routes.Routes as Routes import datetime class Database(): __instance = None @staticmethod def getInstance(): if Database.__instance == None: Database() return Database.__instance def __init__(self): if Databas...
true
true
08f537a0ae1438f01280b2761dfa9bf8cb1f9c7f
504
py
Python
Leetcode/1000-2000/1849. Splitting a String Into Descending Consecutive Values/1849.py
Next-Gen-UI/Code-Dynamics
a9b9d5e3f27e870b3e030c75a1060d88292de01c
[ "MIT" ]
null
null
null
Leetcode/1000-2000/1849. Splitting a String Into Descending Consecutive Values/1849.py
Next-Gen-UI/Code-Dynamics
a9b9d5e3f27e870b3e030c75a1060d88292de01c
[ "MIT" ]
null
null
null
Leetcode/1000-2000/1849. Splitting a String Into Descending Consecutive Values/1849.py
Next-Gen-UI/Code-Dynamics
a9b9d5e3f27e870b3e030c75a1060d88292de01c
[ "MIT" ]
null
null
null
class Solution: def splitString(self, s: str) -> bool: def isValid(s: str, start: int, prev: int, segment: int) -> bool: if start == len(s) and segment > 1: return True curr = 0 for i in range(start, len(s)): curr = curr * 10 + ord(s[i]) - ord('0') if curr > 9999999999: ...
28
85
0.527778
class Solution: def splitString(self, s: str) -> bool: def isValid(s: str, start: int, prev: int, segment: int) -> bool: if start == len(s) and segment > 1: return True curr = 0 for i in range(start, len(s)): curr = curr * 10 + ord(s[i]) - ord('0') if curr > 9999999999: ...
true
true
08f538890f661ed9d8aae14548aa7d6208e4640e
2,772
py
Python
scripts/shukaro/pydwarf.higherlearning.py
Charcoal-Apple/PyDwarf
6f2dd294509c83802e06b9ca5e084f89c9fe4bda
[ "Zlib" ]
49
2015-05-21T19:40:41.000Z
2021-09-30T03:04:32.000Z
scripts/shukaro/pydwarf.higherlearning.py
Charcoal-Apple/PyDwarf
6f2dd294509c83802e06b9ca5e084f89c9fe4bda
[ "Zlib" ]
6
2015-05-30T01:50:01.000Z
2021-09-22T14:22:41.000Z
scripts/shukaro/pydwarf.higherlearning.py
Charcoal-Apple/PyDwarf
6f2dd294509c83802e06b9ca5e084f89c9fe4bda
[ "Zlib" ]
13
2015-05-23T16:26:31.000Z
2021-09-05T18:46:36.000Z
import pydwarf library_dir = pydwarf.rel(__file__, 'raw/higherlearning') default_entities = 'MOUNTAIN' librarian_position = ''' [POSITION:LIBRARIAN] [NAME:librarian:librarians] [SITE] [NUMBER:1] [RESPONSIBILITY:MEET_WORKERS] [APPOINTED_BY:EXPEDITION_LEADER] [APPOINTED_BY:MAYOR] [PRE...
40.173913
132
0.689033
import pydwarf library_dir = pydwarf.rel(__file__, 'raw/higherlearning') default_entities = 'MOUNTAIN' librarian_position = ''' [POSITION:LIBRARIAN] [NAME:librarian:librarians] [SITE] [NUMBER:1] [RESPONSIBILITY:MEET_WORKERS] [APPOINTED_BY:EXPEDITION_LEADER] [APPOINTED_BY:MAYOR] [PRE...
true
true
08f538f034b7c9c551ef6caba0899fc55d0f8492
2,002
py
Python
models/testCT_model.py
qingshan412/pytorch-CycleGAN-and-pix2pix
cec26e9926ccdfadaf29282ec7193ed32bc48773
[ "BSD-3-Clause" ]
3
2018-11-05T23:12:43.000Z
2020-03-31T07:51:10.000Z
models/testCT_model.py
qingshan412/pytorch-CycleGAN-and-pix2pix
cec26e9926ccdfadaf29282ec7193ed32bc48773
[ "BSD-3-Clause" ]
null
null
null
models/testCT_model.py
qingshan412/pytorch-CycleGAN-and-pix2pix
cec26e9926ccdfadaf29282ec7193ed32bc48773
[ "BSD-3-Clause" ]
1
2018-11-05T23:12:08.000Z
2018-11-05T23:12:08.000Z
from .base_model import BaseModel from . import networks from .cycle_gan_model import CycleGANModel class TestCTModel(BaseModel): def name(self): return 'TestModel' @staticmethod def modify_commandline_options(parser, is_train=True): assert not is_train, 'TestModel cannot be used in train...
41.708333
134
0.662837
from .base_model import BaseModel from . import networks from .cycle_gan_model import CycleGANModel class TestCTModel(BaseModel): def name(self): return 'TestModel' @staticmethod def modify_commandline_options(parser, is_train=True): assert not is_train, 'TestModel cannot be used in train...
true
true
08f538f11601fba955cfc1e8c9b08d6c46c3c05f
1,760
py
Python
mediagenerator/templatetags/media.py
flc/django-mediagenerator
18818c0627d4a54822ba9d36e1b2aebf98a5c4f7
[ "BSD-3-Clause" ]
null
null
null
mediagenerator/templatetags/media.py
flc/django-mediagenerator
18818c0627d4a54822ba9d36e1b2aebf98a5c4f7
[ "BSD-3-Clause" ]
null
null
null
mediagenerator/templatetags/media.py
flc/django-mediagenerator
18818c0627d4a54822ba9d36e1b2aebf98a5c4f7
[ "BSD-3-Clause" ]
null
null
null
from django import template from mediagenerator.generators.bundles.utils import _render_include_media from mediagenerator import utils register = template.Library() class MediaNode(template.Node): def __init__(self, bundle, variation): self.bundle = bundle self.variation = variation def rende...
34.509804
133
0.665341
from django import template from mediagenerator.generators.bundles.utils import _render_include_media from mediagenerator import utils register = template.Library() class MediaNode(template.Node): def __init__(self, bundle, variation): self.bundle = bundle self.variation = variation def rende...
true
true
08f5395707fc4da39acb2477501b7002814fb75c
40,078
py
Python
tests/cassandra_utils_test.py
alvaropalmeirao/cassandra-medusa
f3f0dbba54419e4988d1c1394a0eeec3df577860
[ "Apache-2.0" ]
1
2020-02-14T14:53:20.000Z
2020-02-14T14:53:20.000Z
tests/cassandra_utils_test.py
alvaropalmeirao/cassandra-medusa
f3f0dbba54419e4988d1c1394a0eeec3df577860
[ "Apache-2.0" ]
null
null
null
tests/cassandra_utils_test.py
alvaropalmeirao/cassandra-medusa
f3f0dbba54419e4988d1c1394a0eeec3df577860
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2019 Spotify AB. 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.50053
117
0.624283
import _socket import configparser import os import shutil import subprocess import tempfile import unittest from pathlib import Path from unittest import mock from unittest.mock import Mock import yaml from cassandra.metadata import Murmur3Token import medusa.cassandra_utils from medusa.cassandra_utils import CqlSes...
true
true
08f53b6acdf713261192aa328ae4b9b71206c819
991
py
Python
python/base_agent/dialogue_objects/__init__.py
boldsort/craftassist
8058d115a250e30deb60d969b7b1a5fefd6e974c
[ "MIT" ]
626
2019-07-18T18:40:44.000Z
2022-03-29T17:34:43.000Z
python/base_agent/dialogue_objects/__init__.py
boldsort/craftassist
8058d115a250e30deb60d969b7b1a5fefd6e974c
[ "MIT" ]
42
2019-07-27T11:04:15.000Z
2021-02-23T03:15:14.000Z
python/base_agent/dialogue_objects/__init__.py
boldsort/craftassist
8058d115a250e30deb60d969b7b1a5fefd6e974c
[ "MIT" ]
89
2019-07-19T15:07:39.000Z
2022-02-15T18:44:24.000Z
import os import sys sys.path.append(os.path.dirname(__file__)) from dialogue_object import ( AwaitResponse, BotCapabilities, BotGreet, BotLocationStatus, BotStackStatus, DialogueObject, GetReward, ConfirmTask, ConfirmReferenceObject, Say, ) from dialogue_object_utils import (...
18.018182
63
0.722503
import os import sys sys.path.append(os.path.dirname(__file__)) from dialogue_object import ( AwaitResponse, BotCapabilities, BotGreet, BotLocationStatus, BotStackStatus, DialogueObject, GetReward, ConfirmTask, ConfirmReferenceObject, Say, ) from dialogue_object_utils import (...
true
true
08f53baa0fd8e964f11f682d21d8ed7e5fc6bba1
3,392
py
Python
lib/jnpr/healthbot/swagger/models/network_groups_schema.py
Juniper/healthbot-py-client
49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6
[ "Apache-2.0" ]
10
2019-10-23T12:54:37.000Z
2022-02-07T19:24:30.000Z
docs/jnpr_healthbot_swagger/swagger_client/models/network_groups_schema.py
Juniper/healthbot-py-client
49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6
[ "Apache-2.0" ]
5
2019-09-30T04:29:25.000Z
2022-02-16T12:21:06.000Z
docs/jnpr_healthbot_swagger/swagger_client/models/network_groups_schema.py
Juniper/healthbot-py-client
49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6
[ "Apache-2.0" ]
4
2019-09-30T01:17:48.000Z
2020-08-25T07:27:54.000Z
# coding: utf-8 """ Paragon Insights APIs API interface for PI application # noqa: E501 OpenAPI spec version: 4.0.0 Contact: healthbot-feedback@juniper.net Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class NetworkGrou...
28.991453
99
0.585495
import pprint import re import six class NetworkGroupsSchema(object): swagger_types = { 'network_group': 'list[NetworkGroupSchema]' } attribute_map = { 'network_group': 'network-group' } def __init__(self, network_group=None): self._network_group = None se...
true
true
08f53c8d2e704692f81cbf44903c9d885009450d
612
py
Python
client/who_directed_that.py
dopraxcom/docker-build-fastapi-app-april-2021
68bb98f516725c825794a2981d81b647e5f19db8
[ "MIT" ]
23
2021-04-29T17:26:27.000Z
2022-03-08T11:28:44.000Z
client/who_directed_that.py
mikeckennedy/docker-build-fastapi-app-april-2021
9b30a2cf9eed066d8293387a031a779e5f67197c
[ "MIT" ]
null
null
null
client/who_directed_that.py
mikeckennedy/docker-build-fastapi-app-april-2021
9b30a2cf9eed066d8293387a031a779e5f67197c
[ "MIT" ]
4
2021-06-24T10:33:42.000Z
2022-03-08T09:03:21.000Z
import requests from movie_model import MovieModel def main(): title = get_title_from_user() movie: MovieModel = get_movie_from_svc(title) if not movie: print("Sorry, no movie found!") return print(f'{movie.title} was released in {movie.year} and directed by {movie.director}!') def...
20.4
90
0.669935
import requests from movie_model import MovieModel def main(): title = get_title_from_user() movie: MovieModel = get_movie_from_svc(title) if not movie: print("Sorry, no movie found!") return print(f'{movie.title} was released in {movie.year} and directed by {movie.director}!') def...
true
true
08f53d216e8d3c10eafd7097bd7a0aea4aa2cc68
2,416
py
Python
setup.py
nightwatchcyber/airflow-security-checklist
9711e0479c7f79b1c697a1d37fb03e56275e4fa2
[ "Apache-2.0" ]
31
2019-07-15T01:57:42.000Z
2022-02-19T20:33:25.000Z
setup.py
nightwatchcyber/airflow-security-checklist
9711e0479c7f79b1c697a1d37fb03e56275e4fa2
[ "Apache-2.0" ]
2
2019-07-16T23:59:43.000Z
2020-01-05T01:56:22.000Z
setup.py
nightwatchcyber/airflow-security-checklist
9711e0479c7f79b1c697a1d37fb03e56275e4fa2
[ "Apache-2.0" ]
5
2019-07-15T02:27:16.000Z
2020-10-12T01:50:54.000Z
# -*- coding: utf-8 -*- # # Copyright (c) 2019 Nightwatch Cybersecurity. # # This file is part of airflowscan # (see https://github.com/nightwatchcybersecurity/airflowscan). # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with t...
38.349206
98
0.705298
from setuptools import find_packages, setup from airflowscan import __version__ as version with open("README.md", "r") as fh: long_description = fh.read() setup( name='airflowscan', version=version, description='Static analysis tool to check Airflow configuration files for insecure settings', long...
true
true
08f53d2b1bb12957dc8d9edd9a23554c0368b93f
545
py
Python
day4/codebreaker.py
liamwarfield/advent-of-code2019
936abf002901b5f0f4d4eb1d5bcb465aeaffe2ef
[ "Apache-2.0" ]
null
null
null
day4/codebreaker.py
liamwarfield/advent-of-code2019
936abf002901b5f0f4d4eb1d5bcb465aeaffe2ef
[ "Apache-2.0" ]
null
null
null
day4/codebreaker.py
liamwarfield/advent-of-code2019
936abf002901b5f0f4d4eb1d5bcb465aeaffe2ef
[ "Apache-2.0" ]
null
null
null
from tqdm import tqdm # For pretty loading bar min = int(input('Enter the lower bound: ')) max = int(input('Enter the upper bound: ')) num_passwd = 0 for i in tqdm(range(min, max)): last_digit = 10 double = False digit_check = True while i > 0: digit = i % 10 if digit > last_digit: ...
24.772727
46
0.572477
from tqdm import tqdm min = int(input('Enter the lower bound: ')) max = int(input('Enter the upper bound: ')) num_passwd = 0 for i in tqdm(range(min, max)): last_digit = 10 double = False digit_check = True while i > 0: digit = i % 10 if digit > last_digit: digit_check = Fal...
true
true
08f53d9c6acd8a56fa70208a4000f555631df036
2,552
py
Python
swift-srgan/metric.py
Koushik0901/Swift-SRGAN
cd2414f097853bd500e4aec050379b5d37b29ac6
[ "CC0-1.0" ]
3
2021-12-08T15:01:17.000Z
2021-12-21T03:22:25.000Z
swift-srgan/metric.py
Koushik0901/Swift-SRGAN
cd2414f097853bd500e4aec050379b5d37b29ac6
[ "CC0-1.0" ]
3
2021-12-08T15:11:23.000Z
2022-01-04T11:21:27.000Z
swift-srgan/metric.py
Koushik0901/Swift-SRGAN
cd2414f097853bd500e4aec050379b5d37b29ac6
[ "CC0-1.0" ]
null
null
null
import math import torch import torch.nn.functional as F def gaussian(window_size, sigma): gauss = torch.Tensor([math.exp(-(x - window_size // 2) ** 2 / float(2 * sigma ** 2)) for x in range(window_size)]) return gauss / gauss.sum() def create_window(window_size, channel): _1D_window = gaussian(window_...
33.578947
118
0.645376
import math import torch import torch.nn.functional as F def gaussian(window_size, sigma): gauss = torch.Tensor([math.exp(-(x - window_size // 2) ** 2 / float(2 * sigma ** 2)) for x in range(window_size)]) return gauss / gauss.sum() def create_window(window_size, channel): _1D_window = gaussian(window_...
true
true
08f53e1c1ad6d7a32c140b052b667131a47af40b
12,430
py
Python
docs/source/conf.py
diego-mazon/statsmodels
af8b5b5dc78acb600ffd08cda6bd9b1ca5200e10
[ "BSD-3-Clause" ]
null
null
null
docs/source/conf.py
diego-mazon/statsmodels
af8b5b5dc78acb600ffd08cda6bd9b1ca5200e10
[ "BSD-3-Clause" ]
1
2019-07-29T08:35:08.000Z
2019-07-29T08:35:08.000Z
docs/source/conf.py
ozeno/statsmodels
9271ced806b807a4dd325238df38b60f1aa363e2
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # statsmodels documentation build configuration file, created by # sphinx-quickstart on Sat Jan 22 11:17:58 2011. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. #...
33.058511
80
0.714562
import contextlib import json import os import sys from os.path import dirname, join from statsmodels import __version__ contextlib.contextmanager.__doc__ = '' sys.path.insert(0, os.path.abspath('../sphinxext')) extensions = ['sphinx.ext.autodoc', 'numpydoc', 'sphinx.ext.doctest', ...
true
true
08f53ee898bfa97ca942bb4cf5a85aec5645e839
1,865
py
Python
leetcode_python/String/minimum-time-difference.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
18
2019-08-01T07:45:02.000Z
2022-03-31T18:05:44.000Z
leetcode_python/String/minimum-time-difference.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
null
null
null
leetcode_python/String/minimum-time-difference.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
15
2019-12-29T08:46:20.000Z
2022-03-08T14:14:05.000Z
# V0 # V1 # https://blog.csdn.net/fuxuemingzhu/article/details/80525152 # IDEA : ZIP + MAP # ZIP: # >>> a = [1,2,3] # >>> b = [4,5,6] # >>> c = [4,5,6,7,8] # >>> zipped = zip(a,b) # [(1, 4), (2, 5), (3, 6)] # >>> zip(a,c) # [(1, 4), (2, 5), (3, 6)] # >>> zip(*zipped) # [(1, 2, 3), (4, 5,...
27.028986
101
0.474531
class Solution(object): def findMinDifference(self, timePoints): def convert(time): return int(time[:2]) * 60 + int(time[3:]) timePoints = map(convert, timePoints) timePoints.sort() return min((y - x) % (24 * 60) for x, y in zip(timePoints, timePoints[1:] + timePoints[...
true
true
08f53f2a90f438bd49b942edba2bad2a1524d15d
10,466
py
Python
app/src/pipelines/stages/gcezoneoperationsinput.py
FKrauss/Data-Pipeline
8617f25494c5dacc9cf441682c439ba1e6e96a05
[ "Apache-2.0" ]
63
2015-01-13T15:27:52.000Z
2021-04-22T09:00:52.000Z
app/src/pipelines/stages/gcezoneoperationsinput.py
jnelly79/Data-Pipeline
0bdd1664bc9ff5e36928c4609ef6127ef1e1fb3f
[ "Apache-2.0" ]
1
2021-03-21T10:12:28.000Z
2021-03-21T10:12:28.000Z
app/src/pipelines/stages/gcezoneoperationsinput.py
jnelly79/Data-Pipeline
0bdd1664bc9ff5e36928c4609ef6127ef1e1fb3f
[ "Apache-2.0" ]
28
2015-01-30T11:48:47.000Z
2021-10-09T18:36:02.000Z
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
37.92029
80
0.688133
import contextlib import cStringIO as StringIO import datetime import json import logging import re import sets import time from src.clients import bigquery from src.clients import computeengine from src.clients import gcs from src.pipelines import pipeline class GceZoneOperationsInputException(Exception): class...
true
true
08f53f948fe09b198b58f3233e9c77a08da8c757
2,359
py
Python
homeassistant/components/config/device_registry.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
23
2017-11-15T21:03:53.000Z
2021-03-29T21:33:48.000Z
homeassistant/components/config/device_registry.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
39
2016-12-16T12:40:34.000Z
2017-02-13T17:53:42.000Z
homeassistant/components/config/device_registry.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
10
2018-01-01T00:12:51.000Z
2021-12-21T23:08:05.000Z
"""HTTP views to interact with the device registry.""" import voluptuous as vol from homeassistant.components import websocket_api from homeassistant.components.websocket_api.decorators import ( async_response, require_admin, ) from homeassistant.core import callback from homeassistant.helpers.device_registry ...
29.860759
85
0.71259
import voluptuous as vol from homeassistant.components import websocket_api from homeassistant.components.websocket_api.decorators import ( async_response, require_admin, ) from homeassistant.core import callback from homeassistant.helpers.device_registry import async_get_registry WS_TYPE_LIST = "config/devic...
true
true
08f53fe75cf8de7e489c9cb8d1b86d0322bde92d
937
py
Python
Django/django_app_additions/django_app/urls.py
justnclrk/Python
0922961cbd94694a69ae8132a5c33baf552d8d89
[ "MIT" ]
null
null
null
Django/django_app_additions/django_app/urls.py
justnclrk/Python
0922961cbd94694a69ae8132a5c33baf552d8d89
[ "MIT" ]
8
2020-06-06T01:02:06.000Z
2022-03-12T00:24:13.000Z
Django/django_app_additions/django_app/urls.py
justnclrk/Python
0922961cbd94694a69ae8132a5c33baf552d8d89
[ "MIT" ]
null
null
null
"""django_app URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
37.48
79
0.685165
from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url(r'^', include('apps.blog_app.urls')), url(r'^', include('apps.time_display.urls')), url(r'^', include('apps.surveys_app.urls')), url(r'^', include('apps.users_app.urls')) ]
true
true
08f5416a679cc2eb13ea924f914797bf954725fa
1,055
py
Python
model/dataset/utils/set_dataset_path.py
zekunhao1995/ControllableVideoGen
cae9bdf46a4eee1145b268ec74189f9f6ccbbb42
[ "Apache-2.0" ]
41
2018-06-05T09:34:11.000Z
2021-09-01T10:58:25.000Z
model/dataset/utils/set_dataset_path.py
khz1995/ControllableVideoGen
cae9bdf46a4eee1145b268ec74189f9f6ccbbb42
[ "Apache-2.0" ]
null
null
null
model/dataset/utils/set_dataset_path.py
khz1995/ControllableVideoGen
cae9bdf46a4eee1145b268ec74189f9f6ccbbb42
[ "Apache-2.0" ]
7
2018-06-12T00:57:42.000Z
2021-04-17T07:58:34.000Z
import json dataset_path = {} dataset_path['robot_push_jpgs_h5_train'] = '/datasets/robot_push_h5/robot_push_jpgs.h5' dataset_path['robot_push_jpgs_h5_test'] = '/datasets/robot_push_h5/robot_push_testnovel_jpgs.h5' dataset_path['robot_push_traj_h5_train'] = '/trajectories/rp/traj_stor_train.h5' dataset_path['robot_pus...
45.869565
96
0.778199
import json dataset_path = {} dataset_path['robot_push_jpgs_h5_train'] = '/datasets/robot_push_h5/robot_push_jpgs.h5' dataset_path['robot_push_jpgs_h5_test'] = '/datasets/robot_push_h5/robot_push_testnovel_jpgs.h5' dataset_path['robot_push_traj_h5_train'] = '/trajectories/rp/traj_stor_train.h5' dataset_path['robot_pus...
true
true
08f54184b3615579e77ec76473293e3caa0455d2
13,276
py
Python
capstone/scripts/link_scdb.py
holtchesley/capstone
ee8870bdfe28a776b941ac1a567a89a6c22da438
[ "MIT" ]
null
null
null
capstone/scripts/link_scdb.py
holtchesley/capstone
ee8870bdfe28a776b941ac1a567a89a6c22da438
[ "MIT" ]
null
null
null
capstone/scripts/link_scdb.py
holtchesley/capstone
ee8870bdfe28a776b941ac1a567a89a6c22da438
[ "MIT" ]
null
null
null
import csv import re from collections import defaultdict, Counter from difflib import get_close_matches from math import log from pathlib import Path from django.conf import settings from django.db import connections from tqdm import tqdm from capdb.models import Citation, EditLog, Reporter, CaseMetadata, normalize_c...
46.582456
166
0.642588
import csv import re from collections import defaultdict, Counter from difflib import get_close_matches from math import log from pathlib import Path from django.conf import settings from django.db import connections from tqdm import tqdm from capdb.models import Citation, EditLog, Reporter, CaseMetadata, normalize_c...
true
true