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
1c40c568ed84a7c5ad953c1385b4f4dfbcd73e5b
460
py
Python
councilmatic_core/migrations/0035_bill_html_text.py
datamade/django-councilmatic
5b074f376667766e4b6dbf093871d294bb35fc51
[ "MIT" ]
26
2015-12-05T03:36:49.000Z
2022-03-05T12:17:59.000Z
councilmatic_core/migrations/0035_bill_html_text.py
datamade/django-councilmatic
5b074f376667766e4b6dbf093871d294bb35fc51
[ "MIT" ]
181
2015-10-14T18:01:19.000Z
2021-06-30T13:52:47.000Z
councilmatic_core/migrations/0035_bill_html_text.py
datamade/django-councilmatic
5b074f376667766e4b6dbf093871d294bb35fc51
[ "MIT" ]
18
2015-10-22T09:01:24.000Z
2020-10-22T19:33:09.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-01-08 16:47 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('councilmatic_core', '0034_event_guid'), ] operations = [ migrations.AddFiel...
21.904762
58
0.617391
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('councilmatic_core', '0034_event_guid'), ] operations = [ migrations.AddField( model_name='bill', name='html_text', ...
true
true
1c40c5b9cdf2e9fe2acd1666f7d912767d97bb15
1,939
py
Python
ch07/train_convnet.py
tom01h/deep-learning-from-scratch
acb3c31976cd736b4abd21c3e8ab81c3bf0eb9bb
[ "MIT" ]
3
2018-10-11T16:19:18.000Z
2022-01-16T07:48:06.000Z
ch07/train_convnet.py
tom01h/deep-learning-from-scratch
acb3c31976cd736b4abd21c3e8ab81c3bf0eb9bb
[ "MIT" ]
null
null
null
ch07/train_convnet.py
tom01h/deep-learning-from-scratch
acb3c31976cd736b4abd21c3e8ab81c3bf0eb9bb
[ "MIT" ]
null
null
null
# coding: utf-8 import sys, os sys.path.append(os.pardir) # 親ディレクトリのファイルをインポートするための設定 import pickle import time import cupy as cp #import numpy as cp import numpy as np import matplotlib.pyplot as plt from dataset.cifar10 import load_cifar10 from simple_convnet import SimpleConvNet from common.trainer import Trainer ...
31.274194
107
0.687983
import sys, os sys.path.append(os.pardir) import pickle import time import cupy as cp import numpy as np import matplotlib.pyplot as plt from dataset.cifar10 import load_cifar10 from simple_convnet import SimpleConvNet from common.trainer import Trainer (x_train, t_train), (x_test, t_test) = load_cifar10(normaliz...
true
true
1c40c5c5d4d043977700b930e468569cf7818d39
1,888
py
Python
att/drive.py
thexdesk/foiamail
d135bbb5f52d5a31ca8ce3450bd0035f94a182f5
[ "MIT" ]
null
null
null
att/drive.py
thexdesk/foiamail
d135bbb5f52d5a31ca8ce3450bd0035f94a182f5
[ "MIT" ]
null
null
null
att/drive.py
thexdesk/foiamail
d135bbb5f52d5a31ca8ce3450bd0035f94a182f5
[ "MIT" ]
null
null
null
""" handles uploading files to Drive """ from apiclient.http import MediaFileUpload from auth.auth import get_service ### START CONFIG ### atts_drive_folder_name = 'agency_attachments' buffer_path = '/tmp/' #TODO put in a project config file, import in gm ### END CONFIG ### drive_service = get_service(type='drive') ...
32
87
0.65678
""" handles uploading files to Drive """ from apiclient.http import MediaFileUpload from auth.auth import get_service ts' buffer_path = '/tmp/' ve') def get_or_create_atts_folder(): """ gets or creates the base attachment directory (where the agency folders will go) """ atts_drive_folder_q = driv...
false
true
1c40c711bf1978cda26d699fc19b5776034543fd
509
py
Python
prac3/exercise4.py
stuliveshere/Seismic-Processing-Prac3
069f32f2c4a46db6bbea3334f18ad1bd34bf4290
[ "MIT" ]
null
null
null
prac3/exercise4.py
stuliveshere/Seismic-Processing-Prac3
069f32f2c4a46db6bbea3334f18ad1bd34bf4290
[ "MIT" ]
null
null
null
prac3/exercise4.py
stuliveshere/Seismic-Processing-Prac3
069f32f2c4a46db6bbea3334f18ad1bd34bf4290
[ "MIT" ]
null
null
null
#spherical divergence correction import toolbox import numpy as np import pylab pylab.rcParams['image.interpolation'] = 'sinc' #-------------------------------------------------- # useful functions #------------------------------------------------- None if __name__ == "__main__": #initialise dataset ...
17.551724
51
0.463654
import toolbox import numpy as np import pylab pylab.rcParams['image.interpolation'] = 'sinc' None if __name__ == "__main__": print "initialising dataset"
false
true
1c40c84b83ca4804f90c9aa8651fb60f343622fe
7,484
py
Python
grind/python/disttest/test/test.py
szyszy/dist_test
a992ed1c007e9ec4850643e707bc803fbf5a084b
[ "Apache-2.0" ]
28
2016-05-03T21:16:48.000Z
2021-06-11T17:09:58.000Z
grind/python/disttest/test/test.py
szyszy/dist_test
a992ed1c007e9ec4850643e707bc803fbf5a084b
[ "Apache-2.0" ]
45
2016-05-03T22:16:09.000Z
2019-04-23T20:53:07.000Z
grind/python/disttest/test/test.py
szyszy/dist_test
a992ed1c007e9ec4850643e707bc803fbf5a084b
[ "Apache-2.0" ]
25
2016-04-20T00:02:08.000Z
2020-11-24T18:05:45.000Z
import fnmatch import os import shutil import shlex, subprocess import tempfile import unittest import json from .. import mavenproject, packager, isolate, classfile TEST_RESOURCES = os.path.join(os.path.abspath(os.path.dirname(__file__)), "test-resources") TEST_PROJECT_PATH = os.path.join(TEST_RESOURCES, "MultiModu...
36.866995
118
0.591529
import fnmatch import os import shutil import shlex, subprocess import tempfile import unittest import json from .. import mavenproject, packager, isolate, classfile TEST_RESOURCES = os.path.join(os.path.abspath(os.path.dirname(__file__)), "test-resources") TEST_PROJECT_PATH = os.path.join(TEST_RESOURCES, "MultiModu...
false
true
1c40cb511c8e3b54341078d83202f347436c299f
7,306
py
Python
benchmarks/f3_wrong_hints_permutations/scaling_software_termination/14-2Nested_false-termination_16.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints_permutations/scaling_software_termination/14-2Nested_false-termination_16.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints_permutations/scaling_software_termination/14-2Nested_false-termination_16.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import Tuple, FrozenSet from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode import pysmt.typing as types from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
31.356223
77
0.586915
from typing import Tuple, FrozenSet from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode import pysmt.typing as types from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
true
true
1c40cd0ec916c7cb8d387f5d9e7a69fcb7c06b9b
7,379
py
Python
armi/utils/tests/test_gridGui.py
keckler/armi
b5f95b4795aa21e00fd6786f6994862a4bdccb16
[ "Apache-2.0" ]
162
2019-11-01T17:35:58.000Z
2022-03-18T04:22:39.000Z
armi/utils/tests/test_gridGui.py
keckler/armi
b5f95b4795aa21e00fd6786f6994862a4bdccb16
[ "Apache-2.0" ]
315
2019-11-01T17:32:05.000Z
2022-03-30T03:51:42.000Z
armi/utils/tests/test_gridGui.py
keckler/armi
b5f95b4795aa21e00fd6786f6994862a4bdccb16
[ "Apache-2.0" ]
55
2019-11-01T16:59:59.000Z
2022-03-25T18:19:06.000Z
# Copyright 2021 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
38.432292
120
0.69237
import asyncio import os import pytest import time import unittest import test.support # rest of the module. Neat! wx = test.support.import_module("wx") from armi import configure, getApp if getApp() is None: configure() from armi.utils import gridEditor _SECONDS_PER_TICK = 0.05 def _wait(num_...
true
true
1c40cd99485425830543e682f8506d0020f2d87f
16,734
py
Python
detection/models/detection/yolo/backbone.py
stanford-policylab/surveilling-surveillance
bbb9a147927a6342eecfe07ffa756b3acdb63f35
[ "MIT" ]
8
2021-05-21T03:38:52.000Z
2021-11-21T08:32:41.000Z
detection/models/detection/yolo/backbone.py
stanford-policylab/surveilling-surveillance
bbb9a147927a6342eecfe07ffa756b3acdb63f35
[ "MIT" ]
null
null
null
detection/models/detection/yolo/backbone.py
stanford-policylab/surveilling-surveillance
bbb9a147927a6342eecfe07ffa756b3acdb63f35
[ "MIT" ]
1
2021-06-13T21:49:14.000Z
2021-06-13T21:49:14.000Z
''' ABOUT THIS SCRIPT: This is a yolov3 implementation that constructs the appropriate yolov3 model layers and performs forward runs as per these modules This script is a slightly modified version of the follwoing repo: https://github.com/eriklindernoren/PyTorch-YOLOv3.git ''' import numpy as np import torch import ...
40.914425
93
0.553783
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from .utils import (slice_boundary, parse_model_config, to_cpu, build_targets) from . import constants as C def create_modules(module...
true
true
1c40cef8afd98421821fb3f4e64ddeed3a028230
8,928
py
Python
pypureclient/flasharray/FA_2_2/models/volume.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/flasharray/FA_2_2/models/volume.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/flasharray/FA_2_2/models/volume.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from ....
42.312796
461
0.610887
import pprint import re import six import typing from ....properties import Property if typing.TYPE_CHECKING: from pypureclient.flasharray.FA_2_2 import models class Volume(object): swagger_types = { 'id': 'str', 'name': 'str', 'connection_count': 'int', 'created': 'int', ...
true
true
1c40cf17ebef6c5aaba6a98ca4e67106f981e182
1,170
py
Python
pyvisdk/do/exit_standby_mode_failed_event.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/exit_standby_mode_failed_event.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/exit_standby_mode_failed_event.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def ExitStandbyModeFailedEvent(vim, *args, **kwargs): '''This event records that the host...
34.411765
124
0.610256
import logging from pyvisdk.exceptions import InvalidArgumentError
true
true
1c40d1db1ec34f7d9f6f1e18ea250056b1f2eb83
1,822
py
Python
sinecosine.py
hackmeehan/Sine-Cosine
d789b48d3b8f0c6f6a5f17ae57a451100e2ef877
[ "MIT" ]
null
null
null
sinecosine.py
hackmeehan/Sine-Cosine
d789b48d3b8f0c6f6a5f17ae57a451100e2ef877
[ "MIT" ]
null
null
null
sinecosine.py
hackmeehan/Sine-Cosine
d789b48d3b8f0c6f6a5f17ae57a451100e2ef877
[ "MIT" ]
null
null
null
""" sinecosine.py Author: Jack Meehan Credit: https://www.webucator.com/blog/2015/03/python-color-constants-module/ (used for colors) Assignment: The sine and cosine functions are provided in the Python math library. These functions are used to relate *angles* to *rectangular* (x,y) coordinate systems and can be very...
35.72549
102
0.767838
from ggame import App, Sprite, Color, CircleAsset, RectangleAsset, LineStyle from math import sin, cos, radians red = Color(0xff0000, 1.0) purple = Color(0x9A32CD, 1.0) blue = Color(0x0000EE, 1.0) black = Color(0x000000, 1.0) line = LineStyle(2, black) xcoordinates = range( 0, 360, 10) bluecircle = CircleAsset(6, li...
true
true
1c40d214a58bdf8e757e7e56b77ea9ba880b9678
679
py
Python
tests/type_maps/test_method_argument_map.py
vemel/boto3_type_annotations
88aa07a36f5626428c8d3878a4846d8cb667ea28
[ "MIT" ]
44
2019-11-09T04:29:31.000Z
2022-02-11T10:51:41.000Z
tests/type_maps/test_method_argument_map.py
vemel/boto3_type_annotations
88aa07a36f5626428c8d3878a4846d8cb667ea28
[ "MIT" ]
28
2019-11-26T23:50:19.000Z
2021-05-31T18:52:46.000Z
tests/type_maps/test_method_argument_map.py
vemel/boto3_type_annotations
88aa07a36f5626428c8d3878a4846d8cb667ea28
[ "MIT" ]
3
2019-11-09T16:43:04.000Z
2019-12-20T15:05:33.000Z
import unittest from mypy_boto3_builder.service_name import ServiceNameCatalog from mypy_boto3_builder.type_maps.method_argument_map import get_method_arguments_stub class MethodArgumentMapTestCase(unittest.TestCase): def test_get_method_arguments_stub(self) -> None: self.assertTrue( get_meth...
33.95
87
0.702504
import unittest from mypy_boto3_builder.service_name import ServiceNameCatalog from mypy_boto3_builder.type_maps.method_argument_map import get_method_arguments_stub class MethodArgumentMapTestCase(unittest.TestCase): def test_get_method_arguments_stub(self) -> None: self.assertTrue( get_meth...
true
true
1c40d37e1ca0a0a32af9ab4412f2d1ddda580cdf
5,818
py
Python
my_dataset_test.py
TopoXLab/TopoCount
eb93de2bc40d4421ea39c1b80d5c4c4829f3e369
[ "MIT" ]
18
2020-12-18T02:54:55.000Z
2022-02-26T01:52:22.000Z
my_dataset_test.py
TopoXLab/TopoCount
eb93de2bc40d4421ea39c1b80d5c4c4829f3e369
[ "MIT" ]
2
2021-01-13T09:15:38.000Z
2021-03-26T08:43:43.000Z
my_dataset_test.py
TopoXLab/TopoCount
eb93de2bc40d4421ea39c1b80d5c4c4829f3e369
[ "MIT" ]
8
2020-12-25T01:50:55.000Z
2021-06-08T05:21:48.000Z
from torch.utils.data import Dataset import os import matplotlib.pyplot as plt import numpy as np import torch import cv2 from torchvision import transforms import random from PIL import Image import glob class CrowdDataset(Dataset): ''' crowdDataset ''' def __init__(self, img_root, gt_dot_root, split...
40.124138
160
0.554486
from torch.utils.data import Dataset import os import matplotlib.pyplot as plt import numpy as np import torch import cv2 from torchvision import transforms import random from PIL import Image import glob class CrowdDataset(Dataset): def __init__(self, img_root, gt_dot_root, split_txt_filepath=None, phase='train'...
true
true
1c40d3c29f198e1d6558e79093b5ee23ceef0f5f
841
py
Python
google/ads/google_ads/v6/services/conversion_adjustment_upload_service_client_config.py
jphanwebstaurant/google-ads-python
600812b2afcc4d57f00b47dfe436620ce50bfe9b
[ "Apache-2.0" ]
1
2021-04-09T04:28:47.000Z
2021-04-09T04:28:47.000Z
google/ads/google_ads/v6/services/conversion_adjustment_upload_service_client_config.py
jphanwebstaurant/google-ads-python
600812b2afcc4d57f00b47dfe436620ce50bfe9b
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/services/conversion_adjustment_upload_service_client_config.py
jphanwebstaurant/google-ads-python
600812b2afcc4d57f00b47dfe436620ce50bfe9b
[ "Apache-2.0" ]
null
null
null
config = { "interfaces": { "google.ads.googleads.v6.services.ConversionAdjustmentUploadService": { "retry_codes": { "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], "non_idempotent": [] }, "retry_params": { "default": { "initial_...
26.28125
75
0.546968
config = { "interfaces": { "google.ads.googleads.v6.services.ConversionAdjustmentUploadService": { "retry_codes": { "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], "non_idempotent": [] }, "retry_params": { "default": { "initial_...
true
true
1c40d4439683f1c1b8e7339dffa661baea4ea06b
1,182
py
Python
predict.py
guoshuhong/yolo4_SVHN
fb91d5c21a3ff2b6f8e977e7de5b91b1ecf3394e
[ "MIT" ]
null
null
null
predict.py
guoshuhong/yolo4_SVHN
fb91d5c21a3ff2b6f8e977e7de5b91b1ecf3394e
[ "MIT" ]
null
null
null
predict.py
guoshuhong/yolo4_SVHN
fb91d5c21a3ff2b6f8e977e7de5b91b1ecf3394e
[ "MIT" ]
null
null
null
#-------------------------------------# # 对单张图片进行预测 #-------------------------------------# from yolo import YOLO from PIL import Image import os import time import pandas as pd import numpy as np yolo = YOLO() while True: filelist = os.listdir() img = input('Input image filename:') try: ima...
25.148936
74
0.559222
from yolo import YOLO from PIL import Image import os import time import pandas as pd import numpy as np yolo = YOLO() while True: filelist = os.listdir() img = input('Input image filename:') try: image = Image.open(img) except: print('Open Error! Try again!') continue els...
true
true
1c40d491ec9cacd474a81b295016a4c0fc79a49e
6,447
py
Python
data/babel.py
neural-polysynthetic-language-modelling/deepspeech.pytorch
7883e5be5abeacdd52aa170f85d3060ed3b11d00
[ "MIT" ]
null
null
null
data/babel.py
neural-polysynthetic-language-modelling/deepspeech.pytorch
7883e5be5abeacdd52aa170f85d3060ed3b11d00
[ "MIT" ]
null
null
null
data/babel.py
neural-polysynthetic-language-modelling/deepspeech.pytorch
7883e5be5abeacdd52aa170f85d3060ed3b11d00
[ "MIT" ]
null
null
null
import os import wget import tarfile import argparse import csv from multiprocessing.pool import ThreadPool import subprocess from utils import create_manifest import re from sphfile import SPHFile parser = argparse.ArgumentParser(description='Processes downloaded IARPA babel corpus') parser.add_argument("--target-dir...
40.54717
120
0.614549
import os import wget import tarfile import argparse import csv from multiprocessing.pool import ThreadPool import subprocess from utils import create_manifest import re from sphfile import SPHFile parser = argparse.ArgumentParser(description='Processes downloaded IARPA babel corpus') parser.add_argument("--target-dir...
true
true
1c40d71a856cf0d96408fe13f437a7c391a85183
10,511
py
Python
fireant/queries/builder/query_builder.py
mikeengland/fireant
63c12728c11f1fb252265459f8b8f384d20414b9
[ "Apache-2.0" ]
122
2016-08-05T13:34:52.000Z
2022-03-15T13:21:13.000Z
fireant/queries/builder/query_builder.py
mikeengland/fireant
63c12728c11f1fb252265459f8b8f384d20414b9
[ "Apache-2.0" ]
321
2016-08-10T08:48:15.000Z
2021-07-28T13:08:18.000Z
fireant/queries/builder/query_builder.py
mikeengland/fireant
63c12728c11f1fb252265459f8b8f384d20414b9
[ "Apache-2.0" ]
27
2016-08-10T08:11:08.000Z
2021-08-23T08:14:37.000Z
from typing import TYPE_CHECKING, Union from pypika import Order from fireant.dataset.fields import Field from fireant.exceptions import DataSetException from fireant.utils import ( deepcopy, immutable, ) from ..execution import fetch_data from ..finders import find_field_in_modified_field from ..sets import ...
32.045732
120
0.643802
from typing import TYPE_CHECKING, Union from pypika import Order from fireant.dataset.fields import Field from fireant.exceptions import DataSetException from fireant.utils import ( deepcopy, immutable, ) from ..execution import fetch_data from ..finders import find_field_in_modified_field from ..sets import ...
true
true
1c40d7494928228b274188b3277cc77f6aa633df
5,270
py
Python
src/compas_rv2/singular/algorithms/propagation.py
selinabitting/compas-RV2
0884cc00d09c8f4a75eb2b97614105e4c8bfd818
[ "MIT" ]
4
2022-01-17T19:17:22.000Z
2022-01-21T18:06:02.000Z
src/compas_rv2/singular/algorithms/propagation.py
selinabitting/compas-RV2
0884cc00d09c8f4a75eb2b97614105e4c8bfd818
[ "MIT" ]
null
null
null
src/compas_rv2/singular/algorithms/propagation.py
selinabitting/compas-RV2
0884cc00d09c8f4a75eb2b97614105e4c8bfd818
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function from __future__ import division from compas.geometry import discrete_coons_patch from ..utilities import list_split def quadrangulate_mesh(mesh, sources): """Quadrangulate the faces of a mesh by adding edges from vertex sources. R...
35.369128
142
0.579317
from __future__ import absolute_import from __future__ import print_function from __future__ import division from compas.geometry import discrete_coons_patch from ..utilities import list_split def quadrangulate_mesh(mesh, sources): sources_to_visit = sources[:] count = 1000 while sources_to_visit and c...
true
true
1c40d7922ee0e9af71035e7e7719d5b089de3727
5,468
py
Python
benford.py
EivindFa/benfords_law
6f2a0ab3f63d21b2caeef8f54922972b10d2b1b7
[ "MIT" ]
null
null
null
benford.py
EivindFa/benfords_law
6f2a0ab3f63d21b2caeef8f54922972b10d2b1b7
[ "MIT" ]
null
null
null
benford.py
EivindFa/benfords_law
6f2a0ab3f63d21b2caeef8f54922972b10d2b1b7
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import pandas as pd import math from scipy import stats # data source: https://ourworldindata.org/coronavirus-source-data def setup(csv_filename, country): df = pd.read_csv(csv_filename) df = df.loc[: , ["location", "date", "new_cases" ]] df = df[df["loc...
35.738562
124
0.647952
import numpy as np import matplotlib.pyplot as plt import pandas as pd import math from scipy import stats def setup(csv_filename, country): df = pd.read_csv(csv_filename) df = df.loc[: , ["location", "date", "new_cases" ]] df = df[df["location"] == country] df = df[df["new_cases"].notna()] ...
true
true
1c40d79baf9dc72b1930e86aa0624e64fd126af1
3,557
py
Python
createaquiz/quiz/models.py
ranajaydas/CreateAQuiz
d83ec4aa08b61ffb2f044c3d0cc3accf81e826b7
[ "MIT" ]
null
null
null
createaquiz/quiz/models.py
ranajaydas/CreateAQuiz
d83ec4aa08b61ffb2f044c3d0cc3accf81e826b7
[ "MIT" ]
10
2021-03-19T08:08:58.000Z
2022-03-12T00:12:36.000Z
createaquiz/quiz/models.py
ranajaydas/CreateAQuiz
d83ec4aa08b61ffb2f044c3d0cc3accf81e826b7
[ "MIT" ]
null
null
null
from random import shuffle from django.db import models from django.shortcuts import reverse from django.conf import settings from core.utils import ImageResizeUploadS3 class CustomModel: """Common Model inherited by other models.""" def get_model(self): return self.__class__.__name__ class Tag(Cust...
34.201923
111
0.681473
from random import shuffle from django.db import models from django.shortcuts import reverse from django.conf import settings from core.utils import ImageResizeUploadS3 class CustomModel: def get_model(self): return self.__class__.__name__ class Tag(CustomModel, models.Model): name = models.CharFiel...
true
true
1c40d7fa410b57b082ecf0acec4b5f98f8e69419
17,287
py
Python
rpy3-setup/rpy/rinterface/tests/test_SexpVector.py
PiRSquared17/r-orange
6bc383f1db3c10c59e16b39daffc44df904ce031
[ "Apache-2.0" ]
1
2019-04-15T13:50:30.000Z
2019-04-15T13:50:30.000Z
rpy3-setup/rpy/rinterface/tests/test_SexpVector.py
PiRSquared17/r-orange
6bc383f1db3c10c59e16b39daffc44df904ce031
[ "Apache-2.0" ]
null
null
null
rpy3-setup/rpy/rinterface/tests/test_SexpVector.py
PiRSquared17/r-orange
6bc383f1db3c10c59e16b39daffc44df904ce031
[ "Apache-2.0" ]
1
2016-01-21T23:00:21.000Z
2016-01-21T23:00:21.000Z
import unittest import sys import rpy3.rinterface as ri ri.initr() def evalr(string): rstring = ri.StrSexpVector((string, )) res = ri.baseenv["parse"](text = rstring) res = ri.baseenv["eval"](res) return res def floatEqual(x, y, epsilon = 0.00000001): return abs(x - y) < epsilon class WrapperSex...
34.164032
91
0.573957
import unittest import sys import rpy3.rinterface as ri ri.initr() def evalr(string): rstring = ri.StrSexpVector((string, )) res = ri.baseenv["parse"](text = rstring) res = ri.baseenv["eval"](res) return res def floatEqual(x, y, epsilon = 0.00000001): return abs(x - y) < epsilon class WrapperSex...
false
true
1c40d837af0d413b7a0f8ca344d09150e56e4904
1,007
py
Python
PerformanceMetricsScript/ApplicationLevelPerformanceMetricsParsing.py
ShivKushwah/PSec-Anonymous
6561e8e753455731fc5a3ae80bc1007982131880
[ "MIT" ]
4
2020-04-28T03:35:15.000Z
2021-12-08T08:19:52.000Z
PerformanceMetricsScript/ApplicationLevelPerformanceMetricsParsing.py
ShivKushwah/PSec
22b1c066ac0c2667713ce5f6c40f23406ce782f5
[ "MIT" ]
1
2019-09-15T19:42:14.000Z
2019-09-15T19:42:14.000Z
PerformanceMetricsScript/ApplicationLevelPerformanceMetricsParsing.py
ShivKushwah/PSec
22b1c066ac0c2667713ce5f6c40f23406ce782f5
[ "MIT" ]
null
null
null
import re import subprocess import time import json import statistics import time import os import sys search_lst1 = ['MEASURE BASELINE START'] search_lst2 = ['MEASURE BASELINE END'] id_lst = ['MEASURE BASELINE'] with open('BaselineCacheHost1.txt') as json_file: data1 = json.load(json_file) with open('BaselineC...
23.418605
78
0.704071
import re import subprocess import time import json import statistics import time import os import sys search_lst1 = ['MEASURE BASELINE START'] search_lst2 = ['MEASURE BASELINE END'] id_lst = ['MEASURE BASELINE'] with open('BaselineCacheHost1.txt') as json_file: data1 = json.load(json_file) with open('BaselineC...
true
true
1c40d8498f142620bf4e4ba3383c78937ded2868
5,514
py
Python
bpy_lambda/2.78/scripts/addons_contrib/text_editor_hastebin.py
resultant-gamedev/bpy_lambda
c8cf46c10c69e74a0892b621d76c62edaa5b04bc
[ "MIT" ]
null
null
null
bpy_lambda/2.78/scripts/addons_contrib/text_editor_hastebin.py
resultant-gamedev/bpy_lambda
c8cf46c10c69e74a0892b621d76c62edaa5b04bc
[ "MIT" ]
null
null
null
bpy_lambda/2.78/scripts/addons_contrib/text_editor_hastebin.py
resultant-gamedev/bpy_lambda
c8cf46c10c69e74a0892b621d76c62edaa5b04bc
[ "MIT" ]
1
2019-11-24T18:43:42.000Z
2019-11-24T18:43:42.000Z
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
32.627219
129
0.593399
Text_Editor/hastebin", "tracker_url": "https://developer.blender.org/maniphest/task/edit/form/2/", "category": "Text Editor"} import bpy class TEXT_PT_hastebin(bpy.types.Panel): bl_space_type = 'TEXT_EDITOR' bl_region_type = 'UI' bl_label = "hastebin.com" def draw(self, context): lay...
true
true
1c40d8c2ee70c98476b025510a63d8e9b4910304
3,606
py
Python
Setup/install.py
SyedRizvi-TomTom/aws-xray-cloudwatch-event
90e8b1e71d801f3dd59ba25ee880ae0f9f581cdf
[ "Apache-2.0" ]
null
null
null
Setup/install.py
SyedRizvi-TomTom/aws-xray-cloudwatch-event
90e8b1e71d801f3dd59ba25ee880ae0f9f581cdf
[ "Apache-2.0" ]
null
null
null
Setup/install.py
SyedRizvi-TomTom/aws-xray-cloudwatch-event
90e8b1e71d801f3dd59ba25ee880ae0f9f581cdf
[ "Apache-2.0" ]
null
null
null
''' /*Copyright 2017-2017 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" file accompanying ...
54.636364
361
0.801997
import os import json appname = raw_input("Enter a unique name for your app {pattern:^[a-z0-9]+$}:") print("Your appname:"+appname+" will be used for naming your CloudFormation stack, public s3 bucket and as a prefix as a prefix to identify all the Lambda functions and IAM Roles associated with your app") print("Th...
true
true
1c40da02d769adb5740c546f1fd8aa5897d22286
3,044
py
Python
tensorflow_datasets/public_api.py
mdautrey/datasets
5ad83a418d3505619c4282d2b3ff7a80edc45469
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/public_api.py
mdautrey/datasets
5ad83a418d3505619c4282d2b3ff7a80edc45469
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/public_api.py
mdautrey/datasets
5ad83a418d3505619c4282d2b3ff7a80edc45469
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
35.395349
92
0.796321
from tensorflow_datasets.core import tf_compat tf_compat.ensure_tf_install() from tensorflow_datasets import core from tensorflow_datasets.core import folder_dataset from tensorflow_datasets.core import download from tensorflow_datasets.core import decode from tensorflow_datasets.core import deprecate...
true
true
1c40dad565424aa804e988e7f0c48edb8069d843
455
py
Python
tests/list1.py
akshanshbhatt/lpython
70fef49dbbb6cbb0447f7013231171e5c8b8e5df
[ "BSD-3-Clause" ]
31
2022-01-07T23:56:33.000Z
2022-03-29T16:09:02.000Z
tests/list1.py
akshanshbhatt/lpython
70fef49dbbb6cbb0447f7013231171e5c8b8e5df
[ "BSD-3-Clause" ]
197
2021-12-29T19:01:41.000Z
2022-03-31T15:58:25.000Z
tests/list1.py
akshanshbhatt/lpython
70fef49dbbb6cbb0447f7013231171e5c8b8e5df
[ "BSD-3-Clause" ]
17
2022-01-06T15:34:36.000Z
2022-03-31T13:55:33.000Z
def test_List(): a: list[i32] a = [1, 2, 3] a = [-3, -2, -1] # a = [-2, -1, 0.45] -> semantic error b: list[str] b = ["a", "b", "c"] c: list[list[i32]] c = [[1, 2, 3], [4, 5, 6]] d: i32 d = a[2] # ragged list e: list[list[str]] e = [['a', 'b', 'c'], ['d', 'e']] ...
16.25
42
0.356044
def test_List(): a: list[i32] a = [1, 2, 3] a = [-3, -2, -1] b: list[str] b = ["a", "b", "c"] c: list[list[i32]] c = [[1, 2, 3], [4, 5, 6]] d: i32 d = a[2] e: list[list[str]] e = [['a', 'b', 'c'], ['d', 'e']] a.append(10) a.remove(1) a.insert(2, 13)...
true
true
1c40dae30ee101fc406cd20627c4cdfdd63c602f
7,174
py
Python
InvenTree/part/templatetags/inventree_extras.py
TheCrazyMaffin/InvenTree
2686f61a4ac279386a83049745339345f1ac4cf7
[ "MIT" ]
null
null
null
InvenTree/part/templatetags/inventree_extras.py
TheCrazyMaffin/InvenTree
2686f61a4ac279386a83049745339345f1ac4cf7
[ "MIT" ]
null
null
null
InvenTree/part/templatetags/inventree_extras.py
TheCrazyMaffin/InvenTree
2686f61a4ac279386a83049745339345f1ac4cf7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ This module provides template tags for extra functionality over and above the built-in Django tags. """ import os from django.utils.translation import ugettext_lazy as _ from django.conf import settings as djangosettings from django import template from django.urls import reverse from dj...
26.182482
108
0.695707
import os from django.utils.translation import ugettext_lazy as _ from django.conf import settings as djangosettings from django import template from django.urls import reverse from django.utils.safestring import mark_safe from django.templatetags.static import StaticNode from InvenTree import version, settings i...
true
true
1c40dc2678afa914ac2937d94976a7a9a48cada1
16,761
py
Python
test/test_YNAB_API.py
MatissJanis/bank2ynab
ade89b2aa5062821540a2efd3f91594c8f930469
[ "MIT" ]
null
null
null
test/test_YNAB_API.py
MatissJanis/bank2ynab
ade89b2aa5062821540a2efd3f91594c8f930469
[ "MIT" ]
null
null
null
test/test_YNAB_API.py
MatissJanis/bank2ynab
ade89b2aa5062821540a2efd3f91594c8f930469
[ "MIT" ]
null
null
null
from unittest import TestCase from unittest.mock import patch from os.path import join import os from shutil import copyfile import configparser from test.utils import get_test_confparser, get_project_dir from bank2ynab.b2y_utilities import ( get_configs, string_num_diff, get_config_line, option_selec...
36.837363
82
0.499672
from unittest import TestCase from unittest.mock import patch from os.path import join import os from shutil import copyfile import configparser from test.utils import get_test_confparser, get_project_dir from bank2ynab.b2y_utilities import ( get_configs, string_num_diff, get_config_line, option_selec...
true
true
1c40dc425318deef0d4cb09f150ed1883e6fefef
12,187
py
Python
uem/criptoanalisis/mono.py
junquera/my-crypto-works
8ef1b207a97fd5ee7eb53f985edc73813a0f8fc0
[ "MIT" ]
null
null
null
uem/criptoanalisis/mono.py
junquera/my-crypto-works
8ef1b207a97fd5ee7eb53f985edc73813a0f8fc0
[ "MIT" ]
null
null
null
uem/criptoanalisis/mono.py
junquera/my-crypto-works
8ef1b207a97fd5ee7eb53f985edc73813a0f8fc0
[ "MIT" ]
1
2018-07-16T22:03:44.000Z
2018-07-16T22:03:44.000Z
#!/bin/env python3 ''' [ ANÁLISIS ESTADÍSTICO DE TEXTO ] [ CIFRADO POR SUSTITUCIÓN MONOALFABÉTICA ] Javier Junquera Sánchez <javier@junquera.xyz> Fases: 1. Análisis de entropía 2. Análisis de aparición de caracteres 3. Análisis de caracteres repetidos juntos (RR, LL) 4. Análisis de dupletas repetidas 5. Gen...
28.474299
730
0.562485
import re from affine import decode_affine, affine_break estadisticas_castellano = {'A': 0.1203914356874436, 'B': 0.015130070791165134, 'C': 0.03719184102245509, 'D': 0.05437026585244542, 'E': 0.1386395633977034, 'F': 0.004934755557097172, 'G': 0.01092558720618012, 'H': 0.012658047516610746, 'I': 0.0487721334657196...
true
true
1c40dc99308567bada224c8e4e4b3fd6b5c6906b
22,556
py
Python
pandas/computation/expr.py
clarkfitzg/pandas
a71ede374a019ea40321d8c1cfd13258b45ff58d
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/computation/expr.py
clarkfitzg/pandas
a71ede374a019ea40321d8c1cfd13258b45ff58d
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/computation/expr.py
clarkfitzg/pandas
a71ede374a019ea40321d8c1cfd13258b45ff58d
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
""":func:`~pandas.eval` parsers """ import ast import operator import sys import inspect import tokenize import datetime from functools import partial import pandas as pd from pandas import compat from pandas.compat import StringIO, lmap, zip, reduce, string_types from pandas.core.base import StringMixin from pandas...
34.175758
79
0.601702
import ast import operator import sys import inspect import tokenize import datetime from functools import partial import pandas as pd from pandas import compat from pandas.compat import StringIO, lmap, zip, reduce, string_types from pandas.core.base import StringMixin from pandas.core import common as com from pand...
true
true
1c40dcf9fed1df342a46112c9315c08080e2084f
25,926
py
Python
tftpclient.py
xdutaotao/flashboot
307f65af0cf5d8e6de04cc11916017d1f5d6a8a0
[ "Apache-2.0" ]
1
2018-11-28T13:11:51.000Z
2018-11-28T13:11:51.000Z
tftpclient.py
xdutaotao/flashboot
307f65af0cf5d8e6de04cc11916017d1f5d6a8a0
[ "Apache-2.0" ]
null
null
null
tftpclient.py
xdutaotao/flashboot
307f65af0cf5d8e6de04cc11916017d1f5d6a8a0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 # Author: Maxime Petazzoni # maxime.petazzoni@bulix.org # # This file is part of pTFTPd. # # pTFTPd is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either ...
33.323907
120
0.56588
from __future__ import print_function try: input = raw_input except NameError: pass from datetime import datetime import os import shutil import socket import stat import sys import tempfile import notify import proto import state l = notify.getLogger('tftp') _UDP_TRANSFER_...
true
true
1c40dd64f42e4bab7e00b275d6fd51fa97380b91
3,597
py
Python
hubble/settings.py
lqm229026/hubble
bc9e5d8d37edf04447b1c52857dc521cd1db91ad
[ "Apache-2.0" ]
null
null
null
hubble/settings.py
lqm229026/hubble
bc9e5d8d37edf04447b1c52857dc521cd1db91ad
[ "Apache-2.0" ]
7
2020-06-06T00:37:24.000Z
2022-02-10T11:05:24.000Z
hubble/settings.py
moonlight824/hubble
bc9e5d8d37edf04447b1c52857dc521cd1db91ad
[ "Apache-2.0" ]
null
null
null
""" Django settings for hubble project. Generated by 'django-admin startproject' using Django 2.2.7. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os # ...
26.065217
110
0.695024
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '!)=lj#vc=l2k6-n1f*_c!pyz29af2i!xmzsc602^5w!#ki)@tu' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
1c40de9808148ccedb9de40c4f422ce5a7eb62e1
34,880
py
Python
spectacles/client.py
DylanBaker/looker-fonz
93dea44f14d38b8441f21264b968a4f7845cb690
[ "MIT" ]
null
null
null
spectacles/client.py
DylanBaker/looker-fonz
93dea44f14d38b8441f21264b968a4f7845cb690
[ "MIT" ]
8
2019-09-27T20:41:26.000Z
2019-10-02T21:43:31.000Z
spectacles/client.py
dbanalyticsco/spectacles
93dea44f14d38b8441f21264b968a4f7845cb690
[ "MIT" ]
null
null
null
from typing import List, Dict, Optional import time from dataclasses import dataclass import backoff # type: ignore import requests from requests.exceptions import Timeout, HTTPError, ConnectionError import spectacles.utils as utils from spectacles.types import JsonDict from spectacles.logger import GLOBAL_LOGGER as l...
37.264957
99
0.571072
from typing import List, Dict, Optional import time from dataclasses import dataclass import backoff import requests from requests.exceptions import Timeout, HTTPError, ConnectionError import spectacles.utils as utils from spectacles.types import JsonDict from spectacles.logger import GLOBAL_LOGGER as logger from spe...
true
true
1c40df65ea2fe64264af604bda94e41779bcdeb6
4,703
py
Python
de1/zip/zip_file_data_set.py
samhiscoxqb/de1-python
19b8fc6945cf0cd413ef79ff39a65451eea9e627
[ "MIT" ]
10
2021-02-01T02:24:55.000Z
2021-11-18T13:29:06.000Z
de1/zip/zip_file_data_set.py
samhiscoxqb/de1-python
19b8fc6945cf0cd413ef79ff39a65451eea9e627
[ "MIT" ]
2
2021-02-01T12:05:16.000Z
2021-02-05T10:05:59.000Z
de1/zip/zip_file_data_set.py
samhiscoxqb/de1-python
19b8fc6945cf0cd413ef79ff39a65451eea9e627
[ "MIT" ]
1
2021-02-05T09:39:08.000Z
2021-02-05T09:39:08.000Z
import os import tempfile from copy import deepcopy from typing import Any, Dict, Type, Union, Optional from warnings import warn from kedro.io import AbstractDataSet, DataSetError from kedro.io.core import parse_dataset_definition, VERSION_KEY, VERSIONED_FLAG_KEY class ZipFileDataSet(AbstractDataSet): """ Z...
38.54918
109
0.610674
import os import tempfile from copy import deepcopy from typing import Any, Dict, Type, Union, Optional from warnings import warn from kedro.io import AbstractDataSet, DataSetError from kedro.io.core import parse_dataset_definition, VERSION_KEY, VERSIONED_FLAG_KEY class ZipFileDataSet(AbstractDataSet): DEFAULT_...
true
true
1c40dfe67753933f27df222980954730939aa54c
1,380
py
Python
test_dataset.py
yanzhicong/realistic-ssl-evaluation-pytorch
d0ea3349765f8642e97dce57cf319f703b7f1e42
[ "MIT" ]
null
null
null
test_dataset.py
yanzhicong/realistic-ssl-evaluation-pytorch
d0ea3349765f8642e97dce57cf319f703b7f1e42
[ "MIT" ]
null
null
null
test_dataset.py
yanzhicong/realistic-ssl-evaluation-pytorch
d0ea3349765f8642e97dce57cf319f703b7f1e42
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import argparse, math, time, json, os from lib import wrn, transform from config import config import vis parser = argparse.ArgumentParser() parser.add_argument("--dataset", "-d", default="cifar10", type=str, help="dataset name : [svhn, cifar10]") pars...
25.555556
106
0.703623
import numpy as np import argparse, math, time, json, os from lib import wrn, transform from config import config import vis parser = argparse.ArgumentParser() parser.add_argument("--dataset", "-d", default="cifar10", type=str, help="dataset name : [svhn, cifar10]") parser.add_argument("--root", "-r", default="dat...
true
true
1c40dfec119082283f869d943aa79be46c787106
1,233
py
Python
integration_tests/test_commands/tests/test_stacker.py
troyready/runway
4fd299961a4b73df39e14f4f19a7236f7be17dd8
[ "Apache-2.0" ]
null
null
null
integration_tests/test_commands/tests/test_stacker.py
troyready/runway
4fd299961a4b73df39e14f4f19a7236f7be17dd8
[ "Apache-2.0" ]
null
null
null
integration_tests/test_commands/tests/test_stacker.py
troyready/runway
4fd299961a4b73df39e14f4f19a7236f7be17dd8
[ "Apache-2.0" ]
null
null
null
"""Test deploying stacker.""" # pylint: disable=no-self-use import os from subprocess import check_output import boto3 from integration_tests.test_commands.test_commands import Commands KEY = "/runway/integration-test/stacker" VALUE = "foo" class TestRunStacker(Commands): """Tests run-stacker subcommand.""" ...
27.4
88
0.60665
import os from subprocess import check_output import boto3 from integration_tests.test_commands.test_commands import Commands KEY = "/runway/integration-test/stacker" VALUE = "foo" class TestRunStacker(Commands): TEST_NAME = __name__ def get_stack_path(self): return os.path.join( os....
true
true
1c40e0c8d7f2d926101325d5f768f04f96b4f6f0
6,474
py
Python
test/functional/nulldummy.py
hendry19901990/babycoin
c973192d7e877249b0c58127f10ea95083309993
[ "MIT" ]
null
null
null
test/functional/nulldummy.py
hendry19901990/babycoin
c973192d7e877249b0c58127f10ea95083309993
[ "MIT" ]
null
null
null
test/functional/nulldummy.py
hendry19901990/babycoin
c973192d7e877249b0c58127f10ea95083309993
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016 The Babycoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test NULLDUMMY softfork. Connect to a single node. Generate 2 blocks (save the coinbases for later). Gener...
49.045455
145
0.701267
from test_framework.test_framework import BabycoinTestFramework from test_framework.util import * from test_framework.mininode import CTransaction, NetworkThread from test_framework.blocktools import create_coinbase, create_block, add_witness_commitment from test_framework.script import CScript from io import Byte...
true
true
1c40e0fff52728bd0af1f0cfdd008ddd639c57ea
2,255
py
Python
openGaussBase/testcase/TOOLS/SERVER_TOOLS/gs_checkos/Opengauss_Function_Tools_gs_checkos_Case0006.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/TOOLS/SERVER_TOOLS/gs_checkos/Opengauss_Function_Tools_gs_checkos_Case0006.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/TOOLS/SERVER_TOOLS/gs_checkos/Opengauss_Function_Tools_gs_checkos_Case0006.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
34.166667
109
0.572062
import unittest from yat.test import Node from yat.test import macro from testcase.utils.Constant import Constant from testcase.utils.Logger import Logger logger = Logger() class Tools(unittest.TestCase): def setUp(self): logger.info('--------------Opengauss_Function_Tools_gs_checkos_Case0006start------...
true
true
1c40e117ad75d54eeb6b012db34f68dbff01bc78
1,734
py
Python
tool_box/conf_auto_fill/pre_field_info_add.py
diudiu/featurefactory
ee02ad9e3ea66e2eeafe6e11859801f0420c7d9e
[ "MIT" ]
null
null
null
tool_box/conf_auto_fill/pre_field_info_add.py
diudiu/featurefactory
ee02ad9e3ea66e2eeafe6e11859801f0420c7d9e
[ "MIT" ]
null
null
null
tool_box/conf_auto_fill/pre_field_info_add.py
diudiu/featurefactory
ee02ad9e3ea66e2eeafe6e11859801f0420c7d9e
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- """ License SYPH-L. Copyright (c) 2013- SYPH(Shaohan Niu), All Rights Reserved. ----------------------------------------------------------- Author: S.JunPeng Date: 2016/12/26 Change Activity: """ import os import sys import xlrd home_path = os.path.dirname(os.path.dirn...
26.676923
74
0.586505
import os import sys import xlrd home_path = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) sys.path.append(home_path) os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'featurefactory.settings') import django django.setup() from apps.etl.models import PreFieldInfo def load_field_info_from_xls(file_pa...
true
true
1c40e1d1cb6ec185d05aa5e64e876a4d54ae1721
1,805
py
Python
kokemomo/plugins/engine/controller/km_access_check.py
Kokemomo/Kokemomo
614504dc49b2f509b25c9ec2229f4438db73bab7
[ "MIT" ]
4
2016-06-12T13:19:23.000Z
2020-01-29T09:46:15.000Z
kokemomo/plugins/engine/controller/km_access_check.py
Kokemomo/Kokemomo
614504dc49b2f509b25c9ec2229f4438db73bab7
[ "MIT" ]
67
2015-09-10T04:28:33.000Z
2019-09-19T09:08:11.000Z
kokemomo/plugins/engine/controller/km_access_check.py
Kokemomo/Kokemomo
614504dc49b2f509b25c9ec2229f4438db73bab7
[ "MIT" ]
2
2016-06-13T11:20:42.000Z
2016-07-22T07:44:31.000Z
#!/usr/bin/env python # -*- coding:utf-8 -*- from functools import wraps from kokemomo.settings import SETTINGS from kokemomo.plugins.engine.model.km_user_table import KMUser from kokemomo.plugins.engine.model.km_group_table import KMGroup from kokemomo.plugins.engine.model.km_role_table import KMRole from .km_sessio...
27.769231
74
0.629363
from functools import wraps from kokemomo.settings import SETTINGS from kokemomo.plugins.engine.model.km_user_table import KMUser from kokemomo.plugins.engine.model.km_group_table import KMGroup from kokemomo.plugins.engine.model.km_role_table import KMRole from .km_session_manager import get_value_to_session __...
true
true
1c40e30cd61d7c7f4fac7d007a8b7b4a5d1ec687
1,159
py
Python
todoList.py
G3Code-CS/Python2-follow-along
267ca69e9bd90e3ccffebf8417a371779e8a3575
[ "MIT" ]
null
null
null
todoList.py
G3Code-CS/Python2-follow-along
267ca69e9bd90e3ccffebf8417a371779e8a3575
[ "MIT" ]
null
null
null
todoList.py
G3Code-CS/Python2-follow-along
267ca69e9bd90e3ccffebf8417a371779e8a3575
[ "MIT" ]
null
null
null
class TodoList: def __init__(self, name): self.name=name self.items=[] def __str__(self): return f"{self.name}: {self.items}" def __repr__(self): return f"TodoList({repr(self.name)})" quit = False all_lists = [] current_list = None while not quit: #Get the inp...
25.195652
109
0.543572
class TodoList: def __init__(self, name): self.name=name self.items=[] def __str__(self): return f"{self.name}: {self.items}" def __repr__(self): return f"TodoList({repr(self.name)})" quit = False all_lists = [] current_list = None while not quit: command...
true
true
1c40e5a38c227ab144e1e0c27c22be55c55890a2
1,333
py
Python
sgi/academico/models/aluno.py
jorgevilaca82/SGI
c3f13d9e3e8f04377d9e23636dc8e35ed5ace35a
[ "MIT" ]
null
null
null
sgi/academico/models/aluno.py
jorgevilaca82/SGI
c3f13d9e3e8f04377d9e23636dc8e35ed5ace35a
[ "MIT" ]
8
2019-12-07T13:13:34.000Z
2021-09-02T03:07:25.000Z
sgi/academico/models/aluno.py
jorgevilaca82/SGI
c3f13d9e3e8f04377d9e23636dc8e35ed5ace35a
[ "MIT" ]
null
null
null
from enum import IntEnum, auto from django.db import models from django.utils.translation import gettext_lazy as _ from sgi.base import models as bm class Aluno(bm.PessoaFisica): """ A Pessoa Física só se torna um aluno quando está devidamente associada um curso. Uma Pessoa Física pode ser aluno de mais...
31
81
0.634659
from enum import IntEnum, auto from django.db import models from django.utils.translation import gettext_lazy as _ from sgi.base import models as bm class Aluno(bm.PessoaFisica): class Status(IntEnum): MATRICULADO = auto() EVADIDO = auto() TRANCADO = auto() JUBILADO = auto() ...
true
true
1c40e64a01511123306d104ac282830293f3b951
14,127
py
Python
classification_models/models/resnet.py
NazaninTafreshi/classification_models
a953e96614ef2211c654c625bbf968c2e5d04fb9
[ "MIT" ]
null
null
null
classification_models/models/resnet.py
NazaninTafreshi/classification_models
a953e96614ef2211c654c625bbf968c2e5d04fb9
[ "MIT" ]
null
null
null
classification_models/models/resnet.py
NazaninTafreshi/classification_models
a953e96614ef2211c654c625bbf968c2e5d04fb9
[ "MIT" ]
null
null
null
import os import collections from ._common_blocks import ChannelSE from .. import get_submodules_from_kwargs from ..weights import load_model_weights backend = None layers = None models = None keras_utils = None ModelParams = collections.namedtuple( 'ModelParams', ['model_name', 'repetitions', 'residual_blo...
35.494975
108
0.609825
import os import collections from ._common_blocks import ChannelSE from .. import get_submodules_from_kwargs from ..weights import load_model_weights backend = None layers = None models = None keras_utils = None ModelParams = collections.namedtuple( 'ModelParams', ['model_name', 'repetitions', 'residual_blo...
true
true
1c40e73ab629ea0dbb00732d80f05e8fcb8c73d4
2,385
py
Python
tests/test_release_checks.py
iRomi14/drmlib
0e7da6f9ec7aca3c167db667f1251b33c989bc5b
[ "Apache-2.0" ]
null
null
null
tests/test_release_checks.py
iRomi14/drmlib
0e7da6f9ec7aca3c167db667f1251b33c989bc5b
[ "Apache-2.0" ]
null
null
null
tests/test_release_checks.py
iRomi14/drmlib
0e7da6f9ec7aca3c167db667f1251b33c989bc5b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Performs some pre-release checks """ import pytest from tests.conftest import perform_once def test_changelog_and_version(accelize_drm): """ Checks if Version match with Git tag and if changelog is up to date. """ perform_once(__name__ + '.test_changelog_and_version') ...
34.071429
80
0.592872
import pytest from tests.conftest import perform_once def test_changelog_and_version(accelize_drm): perform_once(__name__ + '.test_changelog_and_version') from os.path import join from subprocess import run, PIPE from re import fullmatch if not accelize_drm.pytest_build_environment: pyt...
true
true
1c40e745045a2c4157f067beefee2f2f2323a0a4
5,428
py
Python
legacy_code/double_raster_segmentation.py
alvinshi/Mobot_2018
2be14a771bc184bf92beb87b0ae4fd4d5deb36b2
[ "MIT" ]
null
null
null
legacy_code/double_raster_segmentation.py
alvinshi/Mobot_2018
2be14a771bc184bf92beb87b0ae4fd4d5deb36b2
[ "MIT" ]
null
null
null
legacy_code/double_raster_segmentation.py
alvinshi/Mobot_2018
2be14a771bc184bf92beb87b0ae4fd4d5deb36b2
[ "MIT" ]
null
null
null
# adaptive thresholding method def adaptive_thresholding(img): img_grey = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY) adaptive_threshed = cv2.adaptiveThreshold(img_grey, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY_INV, 11, 1) cv2.imshow("adaptive", adaptive_threshed) return adaptive_threshed # Nor...
39.333333
122
0.595431
def adaptive_thresholding(img): img_grey = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY) adaptive_threshed = cv2.adaptiveThreshold(img_grey, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY_INV, 11, 1) cv2.imshow("adaptive", adaptive_threshed) return adaptive_threshed def normalize(img): normalizeI...
true
true
1c40e7a65f2d0aa486c11a4dc3d2889b1385309c
20,991
py
Python
CLIP-ViL/clip/model.py
ylsung/VL_adapter
287409f383f89a11764fc45806864693a4d3e498
[ "MIT" ]
41
2021-12-14T02:50:16.000Z
2022-03-30T07:41:19.000Z
CLIP-ViL/clip/model.py
ylsung/VL_adapter
287409f383f89a11764fc45806864693a4d3e498
[ "MIT" ]
1
2022-01-07T03:31:47.000Z
2022-03-25T00:31:53.000Z
CLIP-ViL/clip/model.py
ylsung/VL_adapter
287409f383f89a11764fc45806864693a4d3e498
[ "MIT" ]
2
2021-12-14T03:10:18.000Z
2022-03-29T04:59:23.000Z
from collections import OrderedDict from typing import Tuple, Union import torch import torch.nn.functional as F from torch import nn class VisualAdapter(nn.Module): """Conventional Adapter layer, in which the weights of up and down sampler modules are parameters and are optimized.""" def __init__(self,...
39.531073
178
0.616216
from collections import OrderedDict from typing import Tuple, Union import torch import torch.nn.functional as F from torch import nn class VisualAdapter(nn.Module): def __init__(self, input_dim, output_dim, adapter_kind, reduction_factor=16, use_bn=True, use_gate=True): super().__init__() self....
true
true
1c40e7ccbe64aab0ac0834414cef864c92ed5b6a
1,073
py
Python
release/stubs.min/System/Drawing/__init___parts/GraphicsUnit.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
182
2017-06-27T02:26:15.000Z
2022-03-30T18:53:43.000Z
release/stubs.min/System/Drawing/__init___parts/GraphicsUnit.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
28
2017-06-27T13:38:23.000Z
2022-03-15T11:19:44.000Z
release/stubs.min/System/Drawing/__init___parts/GraphicsUnit.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
67
2017-06-28T09:43:59.000Z
2022-03-20T21:17:10.000Z
class GraphicsUnit(Enum,IComparable,IFormattable,IConvertible): """ Specifies the unit of measure for the given data. enum GraphicsUnit,values: Display (1),Document (5),Inch (4),Millimeter (6),Pixel (2),Point (3),World (0) """ def __eq__(self,*args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx._...
26.170732
215
0.661696
class GraphicsUnit(Enum,IComparable,IFormattable,IConvertible): def __eq__(self,*args): pass def __format__(self,*args): pass def __ge__(self,*args): pass def __gt__(self,*args): pass def __init__(self,*args): pass def __le__(self,*args): pass def __lt__(self,*args): pass def __ne__...
true
true
1c40e7f353d277cb2619d721b37441b276b9c6af
7,330
py
Python
lib/plugins/plugin.py
cookieisland/cabernet
9f429fe7a75707da97133b7ec4b3cf6b7aaec6cd
[ "MIT" ]
16
2021-08-30T07:05:28.000Z
2022-03-04T06:46:42.000Z
lib/plugins/plugin.py
cookieisland/cabernet
9f429fe7a75707da97133b7ec4b3cf6b7aaec6cd
[ "MIT" ]
7
2021-08-30T01:33:52.000Z
2022-03-23T10:19:38.000Z
lib/plugins/plugin.py
cookieisland/cabernet
9f429fe7a75707da97133b7ec4b3cf6b7aaec6cd
[ "MIT" ]
9
2021-08-29T21:49:03.000Z
2022-03-12T19:59:29.000Z
""" MIT License Copyright (C) 2021 ROCKY4546 https://github.com/rocky4546 This file is part of Cabernet 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 lim...
43.892216
136
0.65075
import logging import json import importlib import importlib.resources import lib.common.utils as utils import lib.common.exceptions as exceptions from lib.config.config_defn import ConfigDefn from lib.db.db_plugins import DBPlugins from lib.db.db_config_defn import DBConfigDefn PLUGIN_CONFIG_DEFN_FILE = 'config_de...
true
true
1c40e8f255e777435d15fcc720e7c664f9f56b91
3,197
py
Python
models/seq2seq/Transformer.py
hyliush/deep-time-series
3fea4f62ea740c721c559a0d413e4b3a3e214b3e
[ "Apache-2.0" ]
5
2022-03-19T10:32:29.000Z
2022-03-29T00:50:30.000Z
models/seq2seq/Transformer.py
hyliush/deep-time-series
3fea4f62ea740c721c559a0d413e4b3a3e214b3e
[ "Apache-2.0" ]
1
2022-03-22T07:52:08.000Z
2022-03-22T07:55:28.000Z
models/seq2seq/Transformer.py
hyliush/deep-time-series
3fea4f62ea740c721c559a0d413e4b3a3e214b3e
[ "Apache-2.0" ]
2
2022-03-19T21:07:39.000Z
2022-03-23T09:24:30.000Z
import torch import torch.nn as nn import torch.nn.functional as F from layers.Transformer_EncDec import Decoder, DecoderLayer, Encoder, EncoderLayer, ConvLayer from layers.SelfAttention_Family import FullAttention, AttentionLayer from layers.Embed import DataEmbedding import numpy as np class Transformer(nn.Module):...
39.9625
114
0.558336
import torch import torch.nn as nn import torch.nn.functional as F from layers.Transformer_EncDec import Decoder, DecoderLayer, Encoder, EncoderLayer, ConvLayer from layers.SelfAttention_Family import FullAttention, AttentionLayer from layers.Embed import DataEmbedding import numpy as np class Transformer(nn.Module):...
true
true
1c40e8f509b72527932d80c547e0cb3e0b1c1a43
9,242
py
Python
scripts/genome_wide/add_win_channels.py
renskir/sv-channels
284335dc20b775f9e90a7f77809acbb838308cd8
[ "Apache-2.0" ]
24
2021-04-14T10:34:31.000Z
2022-03-21T07:18:05.000Z
scripts/genome_wide/add_win_channels.py
GooglingTheCancerGenome/CNN
284335dc20b775f9e90a7f77809acbb838308cd8
[ "Apache-2.0" ]
49
2018-09-10T09:55:41.000Z
2020-04-15T12:44:22.000Z
scripts/genome_wide/add_win_channels.py
renskir/sv-channels
284335dc20b775f9e90a7f77809acbb838308cd8
[ "Apache-2.0" ]
6
2020-06-17T11:57:38.000Z
2021-07-13T08:59:56.000Z
import argparse import logging from time import time import numpy as np import pysam from functions import (is_left_clipped, is_right_clipped, load_windows, save_windows) def init_log(logfile): FORMAT = '%(asctime)s %(message)s' logging.basicConfig(format=FORMAT, ...
36.385827
93
0.528565
import argparse import logging from time import time import numpy as np import pysam from functions import (is_left_clipped, is_right_clipped, load_windows, save_windows) def init_log(logfile): FORMAT = '%(asctime)s %(message)s' logging.basicConfig(format=FORMAT, ...
true
true
1c40e97cc8a3abf448891862595818c4fa990f21
4,546
py
Python
saleor/product/migrations/0030_auto_20170206_0407.py
dedhio/bellastore
03cad4d11c039c6c33291021def812570c09fe36
[ "BSD-3-Clause" ]
3
2019-06-09T18:00:54.000Z
2019-06-18T10:07:39.000Z
saleor/product/migrations/0030_auto_20170206_0407.py
dedhio/bellastore
03cad4d11c039c6c33291021def812570c09fe36
[ "BSD-3-Clause" ]
2
2019-07-02T13:39:49.000Z
2019-07-07T09:38:27.000Z
saleor/product/migrations/0030_auto_20170206_0407.py
dedhio/bellastore
03cad4d11c039c6c33291021def812570c09fe36
[ "BSD-3-Clause" ]
1
2019-05-02T17:30:49.000Z
2019-05-02T17:30:49.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-06 10:07 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import versatileimagefield.fields class Migration(migrations.Migration): dependencies = [("product", "0029_product_is_feature...
33.426471
86
0.523977
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import versatileimagefield.fields class Migration(migrations.Migration): dependencies = [("product", "0029_product_is_featured")] operations = [ migrations.AlterModelOptions( ...
true
true
1c40ea3df699becca2e1a9f4d5908ab9016d4a01
2,398
py
Python
catkin_ws/build/cv_camera/catkin_generated/pkg.develspace.context.pc.py
BiggieBoo18/mr_robotarm
c4afb4270e8ef70b9238760584575cc9e18c8d7b
[ "MIT" ]
null
null
null
catkin_ws/build/cv_camera/catkin_generated/pkg.develspace.context.pc.py
BiggieBoo18/mr_robotarm
c4afb4270e8ef70b9238760584575cc9e18c8d7b
[ "MIT" ]
null
null
null
catkin_ws/build/cv_camera/catkin_generated/pkg.develspace.context.pc.py
BiggieBoo18/mr_robotarm
c4afb4270e8ef70b9238760584575cc9e18c8d7b
[ "MIT" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "C:/Users/yahoo/hack/mr_robotarm/catkin_ws/src/cv_camera/include;C:/opt/ros/melodic/x64/include;C:/opt/ros/melodic/x64/include/opencv".split(';') if "C:/Users/yahoo/hack/mr_robotarm/catkin_ws/src/cv_cam...
266.444444
1,740
0.802335
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "C:/Users/yahoo/hack/mr_robotarm/catkin_ws/src/cv_camera/include;C:/opt/ros/melodic/x64/include;C:/opt/ros/melodic/x64/include/opencv".split(';') if "C:/Users/yahoo/hack/mr_robotarm/catkin_ws/src/cv_camera/include;C:/opt/ros/melodic/x64/include;C:/opt/ros/me...
true
true
1c40ea8a1ea02e403128b1f2ac60d944b4f261f9
472
py
Python
setup.py
GoPreki/xlrd-layer
a6f172debe304c69fad7f69c619896d4d0ef0157
[ "MIT" ]
null
null
null
setup.py
GoPreki/xlrd-layer
a6f172debe304c69fad7f69c619896d4d0ef0157
[ "MIT" ]
null
null
null
setup.py
GoPreki/xlrd-layer
a6f172debe304c69fad7f69c619896d4d0ef0157
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from distutils.core import setup setup( name="xlrd-layer", version="1.0.0", author="Preki", author_email="ramos@gopreki.com", packages=['xlrd_layer'], url='https://gopreki.com', download_url="https://github.com/GoPreki/xlrd-layer", license="MIT", description=...
26.222222
69
0.684322
from distutils.core import setup setup( name="xlrd-layer", version="1.0.0", author="Preki", author_email="ramos@gopreki.com", packages=['xlrd_layer'], url='https://gopreki.com', download_url="https://github.com/GoPreki/xlrd-layer", license="MIT", description="Python library for Pr...
true
true
1c40ec6bc7f7a08df1164f18f3642a58ac7ae014
1,042
py
Python
dist_input.py
omidsakhi/tpu_dist_gan
c676540dcd7c9fc8eb3e01bb976ed6655e1c906d
[ "Apache-2.0" ]
1
2019-12-09T04:45:33.000Z
2019-12-09T04:45:33.000Z
dist_input.py
omidsakhi/tpu_dist_gan
c676540dcd7c9fc8eb3e01bb976ed6655e1c906d
[ "Apache-2.0" ]
null
null
null
dist_input.py
omidsakhi/tpu_dist_gan
c676540dcd7c9fc8eb3e01bb976ed6655e1c906d
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf import math class InputFunction(object): def __init__(self, noise_dim): self.noise_dim = noise_dim def points_on_circle(self, num, r): pi = 3.14...
28.944444
109
0.65739
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf import math class InputFunction(object): def __init__(self, noise_dim): self.noise_dim = noise_dim def points_on_circle(self, num, r): pi = 3.14...
true
true
1c40ed0b3aa037a17466cfff094defcdad7bafa7
677
py
Python
examples/plotting/file/jitter.py
kevin1kevin1k/bokeh
9f34b5b710e2748ec803c12918ec1706098a3477
[ "BSD-3-Clause" ]
17
2020-06-14T03:47:35.000Z
2022-03-07T00:25:23.000Z
examples/plotting/file/jitter.py
kevin1kevin1k/bokeh
9f34b5b710e2748ec803c12918ec1706098a3477
[ "BSD-3-Clause" ]
12
2020-07-22T22:40:09.000Z
2021-03-17T14:10:27.000Z
examples/plotting/file/jitter.py
kevin1kevin1k/bokeh
9f34b5b710e2748ec803c12918ec1706098a3477
[ "BSD-3-Clause" ]
8
2020-06-14T03:47:23.000Z
2021-11-20T15:14:04.000Z
from bokeh.layouts import column from bokeh.plotting import figure, show, output_file from bokeh.sampledata.autompg import autompg from bokeh.transform import jitter years = sorted(autompg.yr.unique()) p1 = figure(plot_width=600, plot_height=300, title="Years vs mpg without jittering") p1.xgrid.grid_line_color = None...
32.238095
84
0.751846
from bokeh.layouts import column from bokeh.plotting import figure, show, output_file from bokeh.sampledata.autompg import autompg from bokeh.transform import jitter years = sorted(autompg.yr.unique()) p1 = figure(plot_width=600, plot_height=300, title="Years vs mpg without jittering") p1.xgrid.grid_line_color = None...
true
true
1c40edab30a942e4d0f8d373e55273ab7795c9e2
10,867
py
Python
ding/rl_utils/adder.py
jayyoung0802/DI-engine
efbb35ddaf184d1009291e6842fbbae09f193492
[ "Apache-2.0" ]
null
null
null
ding/rl_utils/adder.py
jayyoung0802/DI-engine
efbb35ddaf184d1009291e6842fbbae09f193492
[ "Apache-2.0" ]
null
null
null
ding/rl_utils/adder.py
jayyoung0802/DI-engine
efbb35ddaf184d1009291e6842fbbae09f193492
[ "Apache-2.0" ]
null
null
null
from typing import List, Dict, Any, Optional from collections import deque import copy import torch from ding.utils import list_split, lists_to_dicts from .gae import gae, gae_data class Adder(object): """ Overview: Adder is a component that handles different transformations and calculations for tran...
48.95045
119
0.570167
from typing import List, Dict, Any, Optional from collections import deque import copy import torch from ding.utils import list_split, lists_to_dicts from .gae import gae, gae_data class Adder(object): @classmethod def get_gae(cls, data: List[Dict[str, Any]], last_value: torch.Tensor, gamma: float, gae_lamb...
true
true
1c40ee00c39d0b6c3a52855b04fcd56ef6764b7a
598
py
Python
front/migrations/__init__.py
llazzaro/django-front
8a04a88d42b37f4882ab43415e5f20bedae9d257
[ "MIT" ]
135
2015-01-12T22:21:41.000Z
2021-12-12T03:52:04.000Z
front/migrations/__init__.py
P-Designs/django-front
2f7daaa70d6b2210f4a4ad0c251b0893f15bd711
[ "MIT" ]
12
2015-04-10T12:45:04.000Z
2020-03-22T17:32:32.000Z
front/migrations/__init__.py
P-Designs/django-front
2f7daaa70d6b2210f4a4ad0c251b0893f15bd711
[ "MIT" ]
24
2015-01-24T01:22:18.000Z
2022-03-15T13:06:47.000Z
""" Django migrations for django-front app This package does not contain South migrations. South migrations can be found in the ``south_migrations`` package. """ SOUTH_ERROR_MESSAGE = """\n For South support, customize the SOUTH_MIGRATION_MODULES setting like so: SOUTH_MIGRATION_MODULES = { 'front': 'fr...
27.181818
78
0.754181
SOUTH_ERROR_MESSAGE = """\n For South support, customize the SOUTH_MIGRATION_MODULES setting like so: SOUTH_MIGRATION_MODULES = { 'front': 'front.south_migrations', } """ try: from django.db import migrations except ImportError: from django.core.exceptions import ImproperlyConfigured r...
true
true
1c40eee28f9b90e96355b7775b84c6b9d38efa2a
401
py
Python
modules/execute_attack.py
mica-framework/cli
a5a851a73d7b9bd0431e9c8bb0c8fca401b32ccf
[ "MIT" ]
5
2019-06-14T12:32:56.000Z
2022-03-17T20:55:48.000Z
modules/execute_attack.py
mica-framework/cli
a5a851a73d7b9bd0431e9c8bb0c8fca401b32ccf
[ "MIT" ]
null
null
null
modules/execute_attack.py
mica-framework/cli
a5a851a73d7b9bd0431e9c8bb0c8fca401b32ccf
[ "MIT" ]
null
null
null
import server from core import SessionStorage def execute(*args): # get the session storage sessionStorage = args[0] # get the attack information attack_type = sessionStorage.get_value('list_attacks') victims = sessionStorage.get_value('list_victims') # execute the attack server.run_attac...
25.0625
58
0.730673
import server from core import SessionStorage def execute(*args): sessionStorage = args[0] attack_type = sessionStorage.get_value('list_attacks') victims = sessionStorage.get_value('list_victims') server.run_attack(attack_type, victims) return True
true
true
1c40ef47ff46714cf9f138acd5d81098e95454ef
407
py
Python
Django-habits-reminder/Django-habits-reminder/users/migrations/0002_profile_image.py
KrystianKlik/Django-habits-reminder
915e802aea87cbc48ae07c98701285379423cdf6
[ "MIT" ]
null
null
null
Django-habits-reminder/Django-habits-reminder/users/migrations/0002_profile_image.py
KrystianKlik/Django-habits-reminder
915e802aea87cbc48ae07c98701285379423cdf6
[ "MIT" ]
8
2021-03-19T08:39:55.000Z
2022-02-10T10:14:40.000Z
Django-habits-reminder/Django-habits-reminder/users/migrations/0002_profile_image.py
KrystianKlik/Django-habits-reminder
915e802aea87cbc48ae07c98701285379423cdf6
[ "MIT" ]
null
null
null
# Generated by Django 2.2.10 on 2020-02-24 08:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AddField( model_name='profile', name='image', fiel...
21.421053
85
0.599509
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AddField( model_name='profile', name='image', field=models.ImageField(default='default.jpg', uploa...
true
true
1c40efde9e191d659067b0118b4f442578f21834
8,080
py
Python
script/lib/util.py
radar155/electron
bc7ceb7c346d0b6b23663a290247b2ca0bc96fbf
[ "MIT" ]
3
2018-11-24T00:07:21.000Z
2021-06-01T17:14:27.000Z
script/lib/util.py
hamdyelbatal122/electron
a8a881c8dbbd8b8f0fec5c59d72a9f1e66bbd09d
[ "MIT" ]
2
2021-09-02T14:16:14.000Z
2022-01-22T13:18:55.000Z
script/lib/util.py
hamdyelbatal122/electron
a8a881c8dbbd8b8f0fec5c59d72a9f1e66bbd09d
[ "MIT" ]
1
2018-12-14T14:49:54.000Z
2018-12-14T14:49:54.000Z
#!/usr/bin/env python import atexit import contextlib import datetime import errno import json import os import platform import re import shutil import ssl import stat import subprocess import sys import tarfile import tempfile import urllib2 import zipfile from lib.config import is_verbose_mode, PLATFORM from lib.en...
25.01548
80
0.649505
import atexit import contextlib import datetime import errno import json import os import platform import re import shutil import ssl import stat import subprocess import sys import tarfile import tempfile import urllib2 import zipfile from lib.config import is_verbose_mode, PLATFORM from lib.env_util import get_vs_...
false
true
1c40f0d17df2d8045314b3bb535d6a2b05d9e18a
9,091
py
Python
common/utils_yml.py
linxichong/pyautotest
ca9483b00bdccaa9e7467e49cf4a1768b59cce26
[ "MIT" ]
null
null
null
common/utils_yml.py
linxichong/pyautotest
ca9483b00bdccaa9e7467e49cf4a1768b59cce26
[ "MIT" ]
4
2021-06-03T07:43:09.000Z
2022-03-12T00:48:44.000Z
common/utils_yml.py
linxichong/pyautotest
ca9483b00bdccaa9e7467e49cf4a1768b59cce26
[ "MIT" ]
null
null
null
from selenium import webdriver from selenium.webdriver.support.ui import Select from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By import os import json import time from selenium.webdriver.common.alert impo...
40.225664
228
0.605104
from selenium import webdriver from selenium.webdriver.support.ui import Select from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By import os import json import time from selenium.webdriver.common.alert impo...
true
true
1c40f315bb2de5005ee660d0aceb624424c052f9
522
py
Python
examples/1_Introduction/helloworld.py
kar-thik/TensorFlow-Examples
2097ad0a6faf55a4a9cee00cc1b0ae3454b178fc
[ "MIT" ]
23
2017-07-07T07:00:52.000Z
2022-03-09T06:49:17.000Z
examples/1_Introduction/helloworld.py
kar-thik/TensorFlow-Examples
2097ad0a6faf55a4a9cee00cc1b0ae3454b178fc
[ "MIT" ]
1
2020-01-07T06:27:59.000Z
2020-04-04T17:06:05.000Z
examples/1_Introduction/helloworld.py
kar-thik/TensorFlow-Examples
2097ad0a6faf55a4a9cee00cc1b0ae3454b178fc
[ "MIT" ]
26
2017-06-13T01:44:24.000Z
2021-06-17T18:11:26.000Z
''' HelloWorld example using TensorFlow library. Author: Aymeric Damien Project: https://github.com/aymericdamien/TensorFlow-Examples/ ''' from __future__ import print_function import tensorflow as tf # Simple hello world using TensorFlow # Create a Constant op # The op is added as a node to the default graph. # #...
20.076923
62
0.758621
from __future__ import print_function import tensorflow as tf hello = tf.constant('Hello, TensorFlow!') sess = tf.Session() print(sess.run(hello))
true
true
1c40f352ff0180872c40eee0f3b7b37879d3f85f
6,712
py
Python
tests/components/light/test_reproduce_state.py
olbjan/home-assistant-1
1adb45f74e96fc5eff137a3727647a7e428e123c
[ "Apache-2.0" ]
7
2019-02-07T14:14:12.000Z
2019-07-28T06:56:10.000Z
tests/components/light/test_reproduce_state.py
tomachristian/core
71c8fcee20c55536b33c3ee774c76c1795f37cd2
[ "Apache-2.0" ]
6
2021-02-08T20:54:31.000Z
2022-03-12T00:50:43.000Z
tests/components/light/test_reproduce_state.py
tomachristian/core
71c8fcee20c55536b33c3ee774c76c1795f37cd2
[ "Apache-2.0" ]
2
2020-04-19T13:35:24.000Z
2020-04-19T13:35:51.000Z
"""Test reproduce state for Light.""" from homeassistant.components.light.reproduce_state import DEPRECATION_WARNING from homeassistant.core import State from tests.common import async_mock_service VALID_BRIGHTNESS = {"brightness": 180} VALID_WHITE_VALUE = {"white_value": 200} VALID_FLASH = {"flash": "short"} VALID_E...
39.482353
80
0.681317
from homeassistant.components.light.reproduce_state import DEPRECATION_WARNING from homeassistant.core import State from tests.common import async_mock_service VALID_BRIGHTNESS = {"brightness": 180} VALID_WHITE_VALUE = {"white_value": 200} VALID_FLASH = {"flash": "short"} VALID_EFFECT = {"effect": "random"} VALID_TRA...
true
true
1c40f405c2c15916fe6045fd7c3a17301d922752
3,574
py
Python
SCRAM/Core/SiteConfig.py
gudrutis/pySCRAM
662aa639caa52d0ccc931f0ed41f245ad37c9765
[ "MIT" ]
5
2015-09-15T15:07:43.000Z
2021-11-15T08:07:47.000Z
SCRAM/Core/SiteConfig.py
gudrutis/pySCRAM
662aa639caa52d0ccc931f0ed41f245ad37c9765
[ "MIT" ]
24
2015-01-07T08:16:28.000Z
2022-03-26T08:20:27.000Z
SCRAM/Core/SiteConfig.py
gudrutis/pySCRAM
662aa639caa52d0ccc931f0ed41f245ad37c9765
[ "MIT" ]
2
2018-10-08T11:31:44.000Z
2021-11-15T08:01:12.000Z
from sys import stderr from os.path import join, exists from re import match from os import environ class SiteConfig(object): def __init__(self): self.siteconf = 'etc/scramrc/site.cfg' self.site = {'release-checks': {}, 'release-checks-timeout': {}} self.site['release-checks']['value'] = "...
43.585366
115
0.510912
from sys import stderr from os.path import join, exists from re import match from os import environ class SiteConfig(object): def __init__(self): self.siteconf = 'etc/scramrc/site.cfg' self.site = {'release-checks': {}, 'release-checks-timeout': {}} self.site['release-checks']['value'] = "...
true
true
1c40f4310d253031dc57ddc58e471fbf7ff1469b
857
py
Python
games/utils/switch_input.py
ja-mesmugford/talon_config
d30e02f30873986b899bd1f10efc7442c6bd6d22
[ "MIT" ]
1
2022-02-04T06:19:23.000Z
2022-02-04T06:19:23.000Z
games/utils/switch_input.py
ja-mesmugford/talon_config
d30e02f30873986b899bd1f10efc7442c6bd6d22
[ "MIT" ]
null
null
null
games/utils/switch_input.py
ja-mesmugford/talon_config
d30e02f30873986b899bd1f10efc7442c6bd6d22
[ "MIT" ]
null
null
null
"""This module is a stopgap to improve game compatibility. Replaces Talon's native input within certain contexts. """ import time def switch_to_keyboard_module(context): """Switch to using the PyPI `keyboard` module for input in this context. Some games aren't registering Talon's input as of Windows beta ...
29.551724
78
0.644107
import time def switch_to_keyboard_module(context): import keyboard @context.action_class("main") class MainActions: def key(key: str): for individual_press in key.split(" "): keys = individual_press.split("-") keyboard.press_and_release("...
true
true
1c40f4f29e2db0b4751f30f3a623537319be4258
3,312
py
Python
project/code/thermo.py
HeyItsRiddhi/cs207_riddhi_shah
18d7d6f1fcad213ce35a93ee33c03620f8b06b65
[ "MIT" ]
null
null
null
project/code/thermo.py
HeyItsRiddhi/cs207_riddhi_shah
18d7d6f1fcad213ce35a93ee33c03620f8b06b65
[ "MIT" ]
null
null
null
project/code/thermo.py
HeyItsRiddhi/cs207_riddhi_shah
18d7d6f1fcad213ce35a93ee33c03620f8b06b65
[ "MIT" ]
null
null
null
"""Thermodynamics and Thermochemistry for Chemical Kinetics This module contains a thermochem class with methods for computing the backward reaction rates for a set of reversible, elementary reactions. """ import numpy as np class thermochem: """Methods for calculating the backward reaction rate. Cp_over_R...
36.395604
78
0.602053
import numpy as np class thermochem: def __init__(self, rxnset): self.rxnset = rxnset self.p0 = 1.0e+05 self.R = 8.3144598 self.gamma = np.sum(self.rxnset.nuij, axis=0) def Cp_over_R(self, T): a = self.rxnset.nasa7_coeffs ...
true
true
1c40f60cd66cb57d752b99ae0302f7849ac74e37
579
py
Python
package/cloudshell/cp/azure/common/parsers/command_result_parser.py
tim-spiglanin/Azure-Shell
58c52994f0d6cfd798c5dca33737419ec18363d4
[ "Apache-2.0" ]
5
2016-09-08T08:33:47.000Z
2020-02-10T12:31:15.000Z
package/cloudshell/cp/aws/domain/services/parsers/command_results_parser.py
QualiSystemsLab/AWS-Shell-ext
bf7b62640d8d97a5e9199edb7a1ada0b98aac6fb
[ "0BSD" ]
505
2016-08-09T07:41:03.000Z
2021-02-08T20:26:46.000Z
package/cloudshell/cp/aws/domain/services/parsers/command_results_parser.py
QualiSystemsLab/AWS-Shell-ext
bf7b62640d8d97a5e9199edb7a1ada0b98aac6fb
[ "0BSD" ]
9
2016-06-20T11:41:54.000Z
2020-11-21T00:42:45.000Z
import jsonpickle class CommandResultsParser(object): def set_command_result(self, result, unpicklable=False): """ Serializes output as JSON and writes it to console output wrapped with special prefix and suffix :param result: Result to return :param unpicklable: If True adds JSON ...
38.6
104
0.678756
import jsonpickle class CommandResultsParser(object): def set_command_result(self, result, unpicklable=False): json = jsonpickle.encode(result, unpicklable=unpicklable) result_for_output = str(json) return result_for_output
true
true
1c40f94b893cd458a95fe6d071bb69bc7c2c5332
2,581
py
Python
dotnet/Tagger/SongAdder.py
madeso/prettygood
ba09141bc61664253230d68f03b5a2de1f27ab75
[ "MIT" ]
null
null
null
dotnet/Tagger/SongAdder.py
madeso/prettygood
ba09141bc61664253230d68f03b5a2de1f27ab75
[ "MIT" ]
null
null
null
dotnet/Tagger/SongAdder.py
madeso/prettygood
ba09141bc61664253230d68f03b5a2de1f27ab75
[ "MIT" ]
null
null
null
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace Tagger { public partial class SongAdder : Form { public SongAdder() { I...
28.362637
117
0.481209
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace Tagger { public partial class SongAdder : Form { public SongAdder() { I...
false
true
1c40f9e39c4c934d336e12ba96942af24833e077
20,369
py
Python
Node_Utility.py
SBCV/PythonBlenderUtility
4f91c5a356fede103bcb8c2a9ba1d4d0b01aadc3
[ "MIT" ]
1
2022-01-30T05:58:06.000Z
2022-01-30T05:58:06.000Z
Node_Utility.py
SBCV/PythonBlenderUtility
4f91c5a356fede103bcb8c2a9ba1d4d0b01aadc3
[ "MIT" ]
null
null
null
Node_Utility.py
SBCV/PythonBlenderUtility
4f91c5a356fede103bcb8c2a9ba1d4d0b01aadc3
[ "MIT" ]
null
null
null
import bpy import os from collections import defaultdict from Utility.Logging_Extension import logger # http://blender.stackexchange.com/questions/8936/does-switching-from-blender-render-to-cycles-mess-things-up # * All matierals in cycles use nodes (even if you set up the material in the Properties panel, it will c...
43.804301
120
0.62276
import bpy import os from collections import defaultdict from Utility.Logging_Extension import logger you want to use this in a script you can press Control-C while your mouse is over the button to copy it to the # clipboard. # ================= # alternative approach (not tested yet) # http://blender.s...
true
true
1c40faaf42dbbc4233733833e983cceebe86327e
575
py
Python
cfn_sweeper/artwork.py
rileydakota/cfn-sweeper
0f76aed79e1200e006322b2b0371475a3fd7e475
[ "MIT" ]
9
2021-08-20T17:09:40.000Z
2021-08-23T18:17:25.000Z
cfn_sweeper/artwork.py
rileydakota/cfn-sweeper
0f76aed79e1200e006322b2b0371475a3fd7e475
[ "MIT" ]
5
2021-08-20T16:58:42.000Z
2022-01-31T21:37:56.000Z
cfn_sweeper/artwork.py
rileydakota/cfn-sweeper
0f76aed79e1200e006322b2b0371475a3fd7e475
[ "MIT" ]
1
2022-02-01T14:28:33.000Z
2022-02-01T14:28:33.000Z
from re import X from pyfiglet import Figlet class Artwork(): def art(): f = Figlet(font='larry3d') print("\n https://github.com/rileydakota/cfn-sweeper" ) print (f.renderText('CFN SWEEPER \n')) print((" The umanaged resource detector tool!").center(20)) ...
47.916667
96
0.405217
from re import X from pyfiglet import Figlet class Artwork(): def art(): f = Figlet(font='larry3d') print("\n https://github.com/rileydakota/cfn-sweeper" ) print (f.renderText('CFN SWEEPER \n')) print((" The umanaged resource detector tool!").center(20)) ...
true
true
1c40fb60855ff8ad9cbd7cc279f358bfd6c110bb
304
py
Python
greentest/test_hub_join.py
davidbalbert/gevent3000
3c940dbb2804ec7fe9001758d339eeb423793a28
[ "MIT" ]
1
2017-01-04T10:58:59.000Z
2017-01-04T10:58:59.000Z
greentest/test_hub_join.py
hewigovens/gevent-for-ios
0ef7b67497297b71ed71bca068e56bc103df9069
[ "MIT" ]
1
2019-04-24T06:29:29.000Z
2019-04-24T06:29:29.000Z
greentest/test_hub_join.py
davidbalbert/gevent3000
3c940dbb2804ec7fe9001758d339eeb423793a28
[ "MIT" ]
null
null
null
import gevent # hub.join() guarantees that loop has exited cleanly res = gevent.get_hub().join() assert res is True, res res = gevent.get_hub().join() assert res is True, res # but it is still possible to use gevent afterwards gevent.sleep(0.01) res = gevent.get_hub().join() assert res is True, res
20.266667
52
0.730263
import gevent res = gevent.get_hub().join() assert res is True, res res = gevent.get_hub().join() assert res is True, res gevent.sleep(0.01) res = gevent.get_hub().join() assert res is True, res
true
true
1c40fcbd5a8dba2b2a356b28ee8871a2e93137ee
19,573
py
Python
lime/superoperator.py
binggu56/lime
07f60c5105f0bedb11ac389fd671f4f1737a71fe
[ "MIT" ]
4
2020-01-15T11:52:23.000Z
2021-01-05T19:40:36.000Z
lime/superoperator.py
binggu56/scitools
3f7ce3d8411a23186c73f1bb87a8778e039fbd0b
[ "MIT" ]
null
null
null
lime/superoperator.py
binggu56/scitools
3f7ce3d8411a23186c73f1bb87a8778e039fbd0b
[ "MIT" ]
3
2020-02-14T07:10:44.000Z
2021-04-14T17:49:45.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Jun 25 22:01:00 2020 @author: Bing Modules for computing signals with superoperator formalism in Liouville space Instead of performing open quantum dynamics, the Liouvillian is directly diagonalized Possible improvements: 1. merge the Qobj class ...
22.497701
99
0.535278
import numpy as np import matplotlib.pyplot as plt from scipy.sparse import kron, identity, issparse from scipy.sparse.linalg import eigs import scipy import math from numba import jit from numpy import exp from lime.phys import dag, pauli from lime.mol import Result def liouvillian(H, c_ops): if c_ops...
true
true
1c40fce82fec6b6c713a51aa37d5189ac454d3f6
1,379
py
Python
fragbuilder/bio_pdb/Structure.py
larsbratholm/fragbuilder
e16cbcb190403b5fef49811abd11d16d7ef7fb30
[ "BSD-2-Clause" ]
null
null
null
fragbuilder/bio_pdb/Structure.py
larsbratholm/fragbuilder
e16cbcb190403b5fef49811abd11d16d7ef7fb30
[ "BSD-2-Clause" ]
null
null
null
fragbuilder/bio_pdb/Structure.py
larsbratholm/fragbuilder
e16cbcb190403b5fef49811abd11d16d7ef7fb30
[ "BSD-2-Clause" ]
null
null
null
# Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk) # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """The structure class, representing a macromolecular structure.""" from .Entity import...
24.625
82
0.59826
from .Entity import Entity class Structure(Entity): def __init__(self, id): self.level="S" Entity.__init__(self, id) def __repr__(self): return "<Structure id=%s>" % self.get_id() def _sort(self, m1, m2): return cmp(m1.get_id(), m2.get_id()) d...
true
true
1c40fdf35faba0891f2a51223186847b12b1ad98
4,348
py
Python
alphaml/engine/components/models/regression/libsvm_svr.py
dingdian110/alpha-ml
d6a7a8a8a3452a7e3362bf0ef32b9ac5fe215fde
[ "BSD-3-Clause" ]
1
2021-09-06T20:21:15.000Z
2021-09-06T20:21:15.000Z
alphaml/engine/components/models/regression/libsvm_svr.py
dingdian110/alpha-ml
d6a7a8a8a3452a7e3362bf0ef32b9ac5fe215fde
[ "BSD-3-Clause" ]
null
null
null
alphaml/engine/components/models/regression/libsvm_svr.py
dingdian110/alpha-ml
d6a7a8a8a3452a7e3362bf0ef32b9ac5fe215fde
[ "BSD-3-Clause" ]
null
null
null
from ConfigSpace.configuration_space import ConfigurationSpace from ConfigSpace.conditions import EqualsCondition, InCondition from ConfigSpace.hyperparameters import UniformFloatHyperparameter, \ UniformIntegerHyperparameter, CategoricalHyperparameter, \ UnParametrizedHyperparameter from alphaml.utils.constant...
41.018868
79
0.583947
from ConfigSpace.configuration_space import ConfigurationSpace from ConfigSpace.conditions import EqualsCondition, InCondition from ConfigSpace.hyperparameters import UniformFloatHyperparameter, \ UniformIntegerHyperparameter, CategoricalHyperparameter, \ UnParametrizedHyperparameter from alphaml.utils.constant...
true
true
1c40febbb24609df26dd7e03553d56d35ba52d03
582
py
Python
colosseum/mdps/simple_grid/episodic/mdp.py
MichelangeloConserva/Colosseum
b0711fd9ce75520deb74cda75c148984a8e4152f
[ "MIT" ]
null
null
null
colosseum/mdps/simple_grid/episodic/mdp.py
MichelangeloConserva/Colosseum
b0711fd9ce75520deb74cda75c148984a8e4152f
[ "MIT" ]
null
null
null
colosseum/mdps/simple_grid/episodic/mdp.py
MichelangeloConserva/Colosseum
b0711fd9ce75520deb74cda75c148984a8e4152f
[ "MIT" ]
null
null
null
import gin from colosseum.loops import human_loop from colosseum.mdps import EpisodicMDP from colosseum.mdps.simple_grid.simple_grid import SimpleGridMDP, SimpleGridReward @gin.configurable class SimpleGridEpisodic(EpisodicMDP, SimpleGridMDP): pass if __name__ == "__main__": mdp = SimpleGridEpisodic( ...
22.384615
82
0.714777
import gin from colosseum.loops import human_loop from colosseum.mdps import EpisodicMDP from colosseum.mdps.simple_grid.simple_grid import SimpleGridMDP, SimpleGridReward @gin.configurable class SimpleGridEpisodic(EpisodicMDP, SimpleGridMDP): pass if __name__ == "__main__": mdp = SimpleGridEpisodic( ...
true
true
1c40ff512eea886e54065c41272ed6fd79c68e2b
734
py
Python
setup.py
Abdur-rahmaanJ/POSMS-PythonOpenSubscriberMailSystem
dbd1038e7e8fb99d3e1cd60633c3969c47d007ad
[ "MIT" ]
1
2018-02-16T13:06:10.000Z
2018-02-16T13:06:10.000Z
setup.py
Abdur-rahmaanJ/POSMS-PythonOpenSubscriberMailSystem
dbd1038e7e8fb99d3e1cd60633c3969c47d007ad
[ "MIT" ]
6
2018-02-16T11:46:28.000Z
2018-02-27T10:43:08.000Z
setup.py
Abdur-rahmaanJ/POSMS-PythonOpenSubscriberMailSystem
dbd1038e7e8fb99d3e1cd60633c3969c47d007ad
[ "MIT" ]
1
2018-02-21T22:15:31.000Z
2018-02-21T22:15:31.000Z
# -*- coding: utf-8 -*- """ POSMS is a software relieving you from subscriber system mailing costs """ from setuptools import setup, find_packages NAME = 'posms' AUTHOR = 'Abdur-Rahmaan Janhangeer' VERSION = '1.0' CONTACT = 'arj.python@gmail.com' URL = 'https://github.com/Abdur-rahmaanJ/pyOSMS-PythonOpenSubscriberMa...
26.214286
79
0.673025
from setuptools import setup, find_packages NAME = 'posms' AUTHOR = 'Abdur-Rahmaan Janhangeer' VERSION = '1.0' CONTACT = 'arj.python@gmail.com' URL = 'https://github.com/Abdur-rahmaanJ/pyOSMS-PythonOpenSubscriberMailSystem' LICENSE = 'MIT' setup( name=NAME, version=VERSION, long_description=__doc__, ...
true
true
1c41037033048f5070fd5e5798ab4220545688a9
8,324
py
Python
report_compliance.py
agroome/report_compliance
9fc0050f6ebc3498528d46b9e0973855d1b8072f
[ "MIT" ]
null
null
null
report_compliance.py
agroome/report_compliance
9fc0050f6ebc3498528d46b9e0973855d1b8072f
[ "MIT" ]
null
null
null
report_compliance.py
agroome/report_compliance
9fc0050f6ebc3498528d46b9e0973855d1b8072f
[ "MIT" ]
null
null
null
import csv from dotenv import load_dotenv import logging import os import datetime import pandas as pd import argparse import time from collections import defaultdict, Counter from functools import partial from pathlib import Path from typing import List, Iterable from tenable.io import TenableIO def...
39.450237
181
0.641038
import csv from dotenv import load_dotenv import logging import os import datetime import pandas as pd import argparse import time from collections import defaultdict, Counter from functools import partial from pathlib import Path from typing import List, Iterable from tenable.io import TenableIO def...
true
true
1c41042eeb566322046a54926e78715bc4aad0ba
2,999
py
Python
tests/unit/drivers/test_load_groundtruth_driver.py
yk/jina
ab66e233e74b956390f266881ff5dc4e0110d3ff
[ "Apache-2.0" ]
1
2020-12-23T08:58:49.000Z
2020-12-23T08:58:49.000Z
tests/unit/drivers/test_load_groundtruth_driver.py
yk/jina
ab66e233e74b956390f266881ff5dc4e0110d3ff
[ "Apache-2.0" ]
null
null
null
tests/unit/drivers/test_load_groundtruth_driver.py
yk/jina
ab66e233e74b956390f266881ff5dc4e0110d3ff
[ "Apache-2.0" ]
null
null
null
from typing import Optional import numpy as np import pytest from jina import Request from jina.drivers.evaluate import LoadGroundTruthDriver from jina.executors.indexers import BaseKVIndexer from jina.proto import jina_pb2 from jina.types.document import Document class MockGroundTruthIndexer(BaseKVIndexer): d...
27.018018
105
0.652551
from typing import Optional import numpy as np import pytest from jina import Request from jina.drivers.evaluate import LoadGroundTruthDriver from jina.executors.indexers import BaseKVIndexer from jina.proto import jina_pb2 from jina.types.document import Document class MockGroundTruthIndexer(BaseKVIndexer): d...
true
true
1c410435b3ea1509e4115c0875d5b2749aa730fd
3,268
py
Python
irc1-ex3.2.py
amimimor/irc-spark-streaming
6934ec542deaa2ed7fd32f491c2c3a77772d6046
[ "Apache-2.0" ]
1
2016-01-12T14:42:14.000Z
2016-01-12T14:42:14.000Z
irc1-ex3.2.py
amimimor/irc-spark-streaming
6934ec542deaa2ed7fd32f491c2c3a77772d6046
[ "Apache-2.0" ]
null
null
null
irc1-ex3.2.py
amimimor/irc-spark-streaming
6934ec542deaa2ed7fd32f491c2c3a77772d6046
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python """ run with: spark-submit ./irc1-ex3.1.py local[2] 10.0.0.1 9999 """ import sys # if you are running in standalone and want to run as a __main__ or unittest # you need to add SPARK_HOME to PYTHONPATH so that pyspark module # would be available # you'd also need to do 'pip install py4j' from pyspark i...
27.233333
92
0.660649
""" run with: spark-submit ./irc1-ex3.1.py local[2] 10.0.0.1 9999 """ import sys from pyspark import SparkContext from pyspark.streaming import StreamingContext import re """ Helper functions to parsing the IRC input lines Could be migrated nicely to another file and loaded as module that could be specified by sp...
false
true
1c41047d22bafc1f54d978be33949e6b0f7664c0
30,866
py
Python
sdk/python/pulumi_azure_native/security/v20190101preview/outputs.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/security/v20190101preview/outputs.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/security/v20190101preview/outputs.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
37.595615
523
0.644398
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * __all__ = [ 'AssessmentLinksResponse', 'AssessmentStatusResponse', 'AutomationActionEventHubResponse', 'Aut...
true
true
1c4104b0907e043f5b8e0a19a12d85e1623a408c
167
py
Python
project_name/urls.py
dashgin/DjangoTemplate
40d7f7789d378ee632e096a82a1ac96ebeb1a331
[ "MIT" ]
null
null
null
project_name/urls.py
dashgin/DjangoTemplate
40d7f7789d378ee632e096a82a1ac96ebeb1a331
[ "MIT" ]
null
null
null
project_name/urls.py
dashgin/DjangoTemplate
40d7f7789d378ee632e096a82a1ac96ebeb1a331
[ "MIT" ]
null
null
null
from django.conf import settings from django.contrib import admin from django.urls import path urlpatterns = [ path(f'{settings.ADMIN_URL}/', admin.site.urls), ]
20.875
52
0.754491
from django.conf import settings from django.contrib import admin from django.urls import path urlpatterns = [ path(f'{settings.ADMIN_URL}/', admin.site.urls), ]
true
true
1c4105fcafcd6b93844f8cc95b8ee788e5001a2f
974
py
Python
prickly-pufferfish/arena/arena/urls.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
40
2020-08-02T07:38:22.000Z
2021-07-26T01:46:50.000Z
prickly-pufferfish/arena/arena/urls.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
134
2020-07-31T12:15:45.000Z
2020-12-13T04:42:19.000Z
prickly-pufferfish/arena/arena/urls.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
101
2020-07-31T12:00:47.000Z
2021-11-01T09:06:58.000Z
"""arena URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based v...
36.074074
77
0.695072
from django.conf.urls import include from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('accounts.urls')), path('accounts/', include('django.contrib.auth.urls')), path('battle/', include('battle.urls')), path('', ...
true
true
1c4106918d68cf17ddcefb063a056798360de561
3,407
py
Python
src/icemac/addressbook/browser/search/result/handler/test_delete.py
icemac/icemac.addressbook
6197e6e01da922feb100dd0943576523050cd703
[ "BSD-2-Clause" ]
1
2020-03-26T20:16:44.000Z
2020-03-26T20:16:44.000Z
src/icemac/addressbook/browser/search/result/handler/test_delete.py
icemac/icemac.addressbook
6197e6e01da922feb100dd0943576523050cd703
[ "BSD-2-Clause" ]
2
2020-02-21T13:04:23.000Z
2020-02-21T13:06:10.000Z
src/icemac/addressbook/browser/search/result/handler/test_delete.py
icemac/icemac.addressbook
6197e6e01da922feb100dd0943576523050cd703
[ "BSD-2-Clause" ]
null
null
null
import pytest def test_delete__DeleteForm__1(search_data, UserFactory, browser): """`DeleteForm` allows an administrator to delete found persons.""" address_book = search_data # Create a user -- the person of a user cannot be deleted using this search # result handler. UserFactory(address_book, u'...
44.246753
79
0.694453
import pytest def test_delete__DeleteForm__1(search_data, UserFactory, browser): address_book = search_data UserFactory(address_book, u'Ben', u'Utzer', u'ben@example.com', u'12345678', [], keywords=[u'church']) browser.login('mgr') browser.keyword_search('church') br...
true
true
1c41071be3bfc9f00212c0cf8b634c2280b7da2d
12,056
py
Python
build-tools/apb_packaging/sb_cfn_package/sb_cfn_package.py
knqyf263/aws-servicebroker
b9b6a3ec4738596d07d6d8e6c79548f16acc25c8
[ "Apache-2.0" ]
null
null
null
build-tools/apb_packaging/sb_cfn_package/sb_cfn_package.py
knqyf263/aws-servicebroker
b9b6a3ec4738596d07d6d8e6c79548f16acc25c8
[ "Apache-2.0" ]
null
null
null
build-tools/apb_packaging/sb_cfn_package/sb_cfn_package.py
knqyf263/aws-servicebroker
b9b6a3ec4738596d07d6d8e6c79548f16acc25c8
[ "Apache-2.0" ]
null
null
null
import argparse import logging import yaml from taskcat.utils import CFNYAMLHandler import os from random import random from base64 import b64encode import shutil import subprocess import re import jinja2 try: from aws_servicebroker_spec import AwsServiceBrokerSpec except: from sb_cfn_package.aws_servicebroker_...
50.869198
268
0.618779
import argparse import logging import yaml from taskcat.utils import CFNYAMLHandler import os from random import random from base64 import b64encode import shutil import subprocess import re import jinja2 try: from aws_servicebroker_spec import AwsServiceBrokerSpec except: from sb_cfn_package.aws_servicebroker_...
true
true
1c4107b8fb38d070468fe983b3c3690558f12e55
188
py
Python
chap09/list0914.py
ytianjin/GitTest
a657f46098728ad90f7140fadad356e8561c9a7a
[ "MIT" ]
null
null
null
chap09/list0914.py
ytianjin/GitTest
a657f46098728ad90f7140fadad356e8561c9a7a
[ "MIT" ]
null
null
null
chap09/list0914.py
ytianjin/GitTest
a657f46098728ad90f7140fadad356e8561c9a7a
[ "MIT" ]
null
null
null
# 使用敬称打招呼的函数(带默认值的形参) def hello(name, honorific = '老师'): """使用敬称打招呼""" print('你好,{}{}。'.format(name, honorific)) hello('田中') hello('关根', '先生') hello('西田', '女士')
20.888889
47
0.521277
def hello(name, honorific = '老师'): print('你好,{}{}。'.format(name, honorific)) hello('田中') hello('关根', '先生') hello('西田', '女士')
true
true
1c4107e872f9b36434a6a6860ea3fbdbb1fe48d1
904
py
Python
example-tests/example_BorisPusher.py
AleksandrPanov/pyHiChi
f9b0c4ec17ad1c9b5897770b86be9152b0ab29ca
[ "MIT" ]
null
null
null
example-tests/example_BorisPusher.py
AleksandrPanov/pyHiChi
f9b0c4ec17ad1c9b5897770b86be9152b0ab29ca
[ "MIT" ]
null
null
null
example-tests/example_BorisPusher.py
AleksandrPanov/pyHiChi
f9b0c4ec17ad1c9b5897770b86be9152b0ab29ca
[ "MIT" ]
null
null
null
import sys sys.path.append("../bin/") import pyHiChi as hichi import numpy as np def value_E_analytical(pos, t): E = hichi.Vector3d(1, 0, 0) #sin(pos.x) return E def value_B_analytical(pos, t): B = hichi.Vector3d(0, 0, 0) return B t = 0 p_array = hichi.ParticleArray() fields_array = [] for i ...
25.828571
92
0.650442
import sys sys.path.append("../bin/") import pyHiChi as hichi import numpy as np def value_E_analytical(pos, t): E = hichi.Vector3d(1, 0, 0) return E def value_B_analytical(pos, t): B = hichi.Vector3d(0, 0, 0) return B t = 0 p_array = hichi.ParticleArray() fields_array = [] for i in range(11...
true
true
1c41087862167ca8bb00c13bd2b6543e3e39451c
575
py
Python
examples/hardware/basestation/scripts/test.py
openDSME/CometOS
1907325847f2efa746bd76854b65578201c383d8
[ "BSD-3-Clause" ]
3
2019-01-14T19:08:07.000Z
2021-01-19T11:57:16.000Z
examples/hardware/basestation/scripts/test.py
openDSME/CometOS
1907325847f2efa746bd76854b65578201c383d8
[ "BSD-3-Clause" ]
1
2016-11-11T14:35:03.000Z
2016-11-11T14:35:03.000Z
examples/hardware/basestation/scripts/test.py
openDSME/CometOS
1907325847f2efa746bd76854b65578201c383d8
[ "BSD-3-Clause" ]
2
2020-09-14T08:27:09.000Z
2020-10-19T14:41:48.000Z
from random import Random r=Random(1); count=0 while True: for i in node: count=count+1 size=r.randint(0, 19) start=r.randint(0, 255-20) print "Call node "+str(i)+" with "+str(size)+" "+str(start)+" ("+str(count)+")" val=node[i].traffic.get(size,start) # check data for x in range(size): asser...
17.96875
81
0.622609
from random import Random r=Random(1); count=0 while True: for i in node: count=count+1 size=r.randint(0, 19) start=r.randint(0, 255-20) print "Call node "+str(i)+" with "+str(size)+" "+str(start)+" ("+str(count)+")" val=node[i].traffic.get(size,start) for x in range(size): assert (start+x)=...
false
true
1c41088e2af6caa9541933c82a64667acdb51778
1,296
py
Python
tests/unit_tests/cx_core/integration/z2m_test.py
Crocmagnon/controllerx
d928d5fc8d7ab50a86417227d5b732aea43cb653
[ "MIT" ]
null
null
null
tests/unit_tests/cx_core/integration/z2m_test.py
Crocmagnon/controllerx
d928d5fc8d7ab50a86417227d5b732aea43cb653
[ "MIT" ]
null
null
null
tests/unit_tests/cx_core/integration/z2m_test.py
Crocmagnon/controllerx
d928d5fc8d7ab50a86417227d5b732aea43cb653
[ "MIT" ]
null
null
null
from typing import Any, Dict import pytest from cx_core.controller import Controller from cx_core.integration.z2m import Z2MIntegration from pytest_mock import MockerFixture @pytest.mark.parametrize( "data, action_key, handle_action_called, expected_called_with", [ ({"payload": '{"event_1": "action_1...
33.230769
79
0.682099
from typing import Any, Dict import pytest from cx_core.controller import Controller from cx_core.integration.z2m import Z2MIntegration from pytest_mock import MockerFixture @pytest.mark.parametrize( "data, action_key, handle_action_called, expected_called_with", [ ({"payload": '{"event_1": "action_1...
true
true
1c4108c472a7ea0e153ff1950c5c6e5ccb5da43a
15,206
py
Python
lambda.py
amnona/boxbox
3641351e34776d504cc660e740df8528120b004e
[ "MIT" ]
null
null
null
lambda.py
amnona/boxbox
3641351e34776d504cc660e740df8528120b004e
[ "MIT" ]
null
null
null
lambda.py
amnona/boxbox
3641351e34776d504cc660e740df8528120b004e
[ "MIT" ]
null
null
null
""" BOX BOX aws skill for alexa written by amnonim@gmail.com Requires the following triggers: Alexa skill kit trigger Requires the following triggers: AWS Systerms manager Amazon cloudwatch logs uses the boxit role For additional samples, visit the Alexa Skills Kit Getting Started guide at http://amzn.to/1LGWsLG """...
38.890026
154
0.650007
from __future__ import print_function import boto3 def build_speechlet_response(title, output, reprompt_text, should_end_session): return { 'outputSpeech': { 'type': 'PlainText', 'text': output }, 'card': { 'type': 'Simple', 'title': "Sess...
true
true
1c410901806e8c5014b3fbe2f6ab0bd1239a957a
1,631
py
Python
ImprovementFactor.py
varlamnet/group_testing
a119c4967af22ceeffb89dcf6267fd262d327552
[ "MIT" ]
null
null
null
ImprovementFactor.py
varlamnet/group_testing
a119c4967af22ceeffb89dcf6267fd262d327552
[ "MIT" ]
null
null
null
ImprovementFactor.py
varlamnet/group_testing
a119c4967af22ceeffb89dcf6267fd262d327552
[ "MIT" ]
1
2021-03-28T09:44:32.000Z
2021-03-28T09:44:32.000Z
# This script generates improvement factors for each algorithm. E.g. an # improvement factor of 5 indicates that 1 test is on average sufficient to # test 5 people. import os os.chdir(os.path.dirname(__file__)) import numpy as np from warnings import filterwarnings filterwarnings('ignore') n=100 # Number of individ...
37.068182
76
0.688535
import os os.chdir(os.path.dirname(__file__)) import numpy as np from warnings import filterwarnings filterwarnings('ignore') n=100 k=2 sensdic = {} specdic = {} spec95 = {} sens95 = {} for name in ['COMP','DD','SCOMP','CBP', 'SR']: sensdic[name] = np.genfromtxt(f'data_output/sensitivity_{name}.csv', ...
true
true
1c4109c3b29ae9649491bede2ffe53f7710b824e
4,931
py
Python
tests/test_mpi.py
jayvdb/python-mbedtls
cd042e8b9d6869e39c11e3117199f1ce8ed782d4
[ "MIT" ]
null
null
null
tests/test_mpi.py
jayvdb/python-mbedtls
cd042e8b9d6869e39c11e3117199f1ce8ed782d4
[ "MIT" ]
null
null
null
tests/test_mpi.py
jayvdb/python-mbedtls
cd042e8b9d6869e39c11e3117199f1ce8ed782d4
[ "MIT" ]
null
null
null
import numbers from binascii import hexlify, unhexlify import pytest from mbedtls.mpi import MPI @pytest.mark.parametrize("value", (12, 2 ** 32 - 1, 10 ** 100)) def test_from_int(value): mpi = MPI.from_int(value) assert mpi == value assert value == mpi assert mpi == mpi def test_is_integral(): ...
23.369668
72
0.600892
import numbers from binascii import hexlify, unhexlify import pytest from mbedtls.mpi import MPI @pytest.mark.parametrize("value", (12, 2 ** 32 - 1, 10 ** 100)) def test_from_int(value): mpi = MPI.from_int(value) assert mpi == value assert value == mpi assert mpi == mpi def test_is_integral(): ...
true
true
1c410a83e1a2b1847a2778180688b5c83598bbe2
837
py
Python
services/nris-api/backend/app/nris/models/inspection_reason.py
bcgov/mds
6c427a66a5edb4196222607291adef8fd6677038
[ "Apache-2.0" ]
25
2018-07-09T19:04:37.000Z
2022-03-15T17:27:10.000Z
services/nris-api/backend/app/nris/models/inspection_reason.py
areyeslo/mds
e8c38e593e09b78e2a57009c0d003d6c4bfa32e6
[ "Apache-2.0" ]
983
2018-04-25T20:08:07.000Z
2022-03-31T21:45:20.000Z
services/nris-api/backend/app/nris/models/inspection_reason.py
areyeslo/mds
e8c38e593e09b78e2a57009c0d003d6c4bfa32e6
[ "Apache-2.0" ]
58
2018-05-15T22:35:50.000Z
2021-11-29T19:40:52.000Z
from app.extensions import db from sqlalchemy.orm import validates from app.nris.utils.base_model import Base class InspectionReason(Base): __tablename__ = "inspection_reason" __table_args__ = { 'comment': 'Lookup table that contains a list of inspection reasons. E.g. Planned, Unplanned, Compl...
38.045455
156
0.757467
from app.extensions import db from sqlalchemy.orm import validates from app.nris.utils.base_model import Base class InspectionReason(Base): __tablename__ = "inspection_reason" __table_args__ = { 'comment': 'Lookup table that contains a list of inspection reasons. E.g. Planned, Unplanned, Compl...
true
true
1c410aa85f8e9da26dca518cc43803e0a9d37290
6,653
py
Python
detectron2/export/caffe2_inference.py
MIXIAOXIN/detectron2-0.3-mxx
3b4eb6da27b6360139228052690bce7a74b1268e
[ "Apache-2.0" ]
1,158
2020-11-24T04:44:06.000Z
2022-03-31T07:24:11.000Z
detectron2/export/caffe2_inference.py
MIXIAOXIN/detectron2-0.3-mxx
3b4eb6da27b6360139228052690bce7a74b1268e
[ "Apache-2.0" ]
94
2020-11-25T08:29:07.000Z
2022-03-30T09:18:09.000Z
detectron2/export/caffe2_inference.py
MIXIAOXIN/detectron2-0.3-mxx
3b4eb6da27b6360139228052690bce7a74b1268e
[ "Apache-2.0" ]
189
2020-11-24T07:32:03.000Z
2022-03-28T06:16:30.000Z
# Copyright (c) Facebook, Inc. and its affiliates. import logging import numpy as np from itertools import count import torch from caffe2.proto import caffe2_pb2 from caffe2.python import core from .caffe2_modeling import META_ARCH_CAFFE2_EXPORT_TYPE_MAP, convert_batched_inputs_to_c2_format from .shared import Scoped...
41.067901
98
0.638208
import logging import numpy as np from itertools import count import torch from caffe2.proto import caffe2_pb2 from caffe2.python import core from .caffe2_modeling import META_ARCH_CAFFE2_EXPORT_TYPE_MAP, convert_batched_inputs_to_c2_format from .shared import ScopedWS, get_pb_arg_vali, get_pb_arg_vals, infer_device...
true
true
1c410ab33284aa4eeceacdbce6394607fcb2d075
9,354
py
Python
brozzler/__init__.py
vbanos/brozzler
261e7977ad198cfed160b89498d289267af8dd97
[ "Apache-2.0" ]
1
2017-07-04T20:50:26.000Z
2017-07-04T20:50:26.000Z
brozzler/__init__.py
vbanos/brozzler
261e7977ad198cfed160b89498d289267af8dd97
[ "Apache-2.0" ]
null
null
null
brozzler/__init__.py
vbanos/brozzler
261e7977ad198cfed160b89498d289267af8dd97
[ "Apache-2.0" ]
null
null
null
""" brozzler/__init__.py - __init__.py for brozzler package, contains some common code Copyright (C) 2014-2017 Internet Archive 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.apach...
35.165414
81
0.665063
from pkg_resources import get_distribution as _get_distribution __version__ = _get_distribution('brozzler').version class ShutdownRequested(Exception): pass class NothingToClaim(Exception): pass class CrawlStopped(Exception): pass class ProxyError(Exception): pass class ReachedLimit(Exception): ...
true
true
1c410abd240935e34593300877903802761cbc3e
2,902
py
Python
examples/views/persistent.py
Ryomen-Sukuna/discord.py
0bcb0d0e3ce395d42a5b1dae61b0090791ee018d
[ "MIT" ]
1
2021-09-11T09:24:38.000Z
2021-09-11T09:24:38.000Z
examples/views/persistent.py
Ryomen-Sukuna/discord.py
0bcb0d0e3ce395d42a5b1dae61b0090791ee018d
[ "MIT" ]
1
2022-02-19T18:25:19.000Z
2022-02-19T18:25:19.000Z
examples/views/persistent.py
Ryomen-Sukuna/discord.py
0bcb0d0e3ce395d42a5b1dae61b0090791ee018d
[ "MIT" ]
null
null
null
# This example requires the 'message_content' privileged intent to function. from discord.ext import commands import discord # Define a simple View that persists between bot restarts # In order a view to persist between restarts it needs to meet the following conditions: # 1) The timeout of the View has to be set to...
43.313433
105
0.723639
from discord.ext import commands import discord class PersistentView(discord.ui.View): def __init__(self): super().__init__(timeout=None) @discord.ui.button(label='Green', style=discord.ButtonStyle.green, custom_id='persistent_view:green') async def green(self, interaction: discord.Inte...
true
true
1c410b65d56b03b162f07a7975e0be44700aa9d5
2,131
py
Python
blue/tests/test_daedalus.py
cglewis/Daedalus
1ccd1a35ea4f343cf45ff629785ced284ec98b81
[ "Apache-2.0" ]
8
2021-07-15T23:26:57.000Z
2022-02-28T22:26:19.000Z
blue/tests/test_daedalus.py
cglewis/Daedalus
1ccd1a35ea4f343cf45ff629785ced284ec98b81
[ "Apache-2.0" ]
102
2021-05-07T15:06:52.000Z
2022-03-31T10:49:08.000Z
blue/tests/test_daedalus.py
cglewis/Daedalus
1ccd1a35ea4f343cf45ff629785ced284ec98b81
[ "Apache-2.0" ]
7
2021-03-09T19:17:59.000Z
2022-01-27T17:37:47.000Z
# -*- coding: utf-8 -*- """ Test module for daedalus. @author: Charlie Lewis """ from daedalus.daedalus import Daedalus def test_start_remove_dovesnap(): instance = Daedalus() # hack conf_dir since it's not installed as a library instance.set_config_dir(conf_dir='/..') instance.start_dovesnap() in...
23.94382
72
0.691225
from daedalus.daedalus import Daedalus def test_start_remove_dovesnap(): instance = Daedalus() instance.set_config_dir(conf_dir='/..') instance.start_dovesnap() instance.remove_dovesnap() instance.reset_cwd() def test_build_images(): instance = Daedalus() # hack conf_dir since it's...
true
true
1c410cf9fec954b97729a2db7677deaef04366e0
746
py
Python
blender/arm/logicnode/postprocess_colorgrading_get_shadow_node.py
ValtoGameEngines/Armory
ad3d3c63e64e9225e62b414b7ec4dd9fb93fab32
[ "Zlib" ]
1
2021-03-17T05:51:45.000Z
2021-03-17T05:51:45.000Z
blender/arm/logicnode/postprocess_colorgrading_get_shadow_node.py
ValtoGameEngines/Armory
ad3d3c63e64e9225e62b414b7ec4dd9fb93fab32
[ "Zlib" ]
null
null
null
blender/arm/logicnode/postprocess_colorgrading_get_shadow_node.py
ValtoGameEngines/Armory
ad3d3c63e64e9225e62b414b7ec4dd9fb93fab32
[ "Zlib" ]
1
2020-06-29T07:54:21.000Z
2020-06-29T07:54:21.000Z
import bpy from bpy.props import * from bpy.types import Node, NodeSocket from arm.logicnode.arm_nodes import * class ColorgradingGetShadowNode(Node, ArmLogicTreeNode): '''Colorgrading Get Shadow node''' bl_idname = 'LNColorgradingGetShadowNode' bl_label = 'Colorgrading Get Shadow' bl_icon = 'QUESTION'...
37.3
59
0.718499
import bpy from bpy.props import * from bpy.types import Node, NodeSocket from arm.logicnode.arm_nodes import * class ColorgradingGetShadowNode(Node, ArmLogicTreeNode): bl_idname = 'LNColorgradingGetShadowNode' bl_label = 'Colorgrading Get Shadow' bl_icon = 'QUESTION' def init(self, context): ...
true
true
1c410e2cc351e81603190ff16d74ece20704ff16
256
py
Python
Problem1/Collections/Collections.deque().py
Joanna-O-Ben/ADM-HW1
0a914d4ab5462fa563980644d3f5d777af61aef9
[ "MIT" ]
null
null
null
Problem1/Collections/Collections.deque().py
Joanna-O-Ben/ADM-HW1
0a914d4ab5462fa563980644d3f5d777af61aef9
[ "MIT" ]
null
null
null
Problem1/Collections/Collections.deque().py
Joanna-O-Ben/ADM-HW1
0a914d4ab5462fa563980644d3f5d777af61aef9
[ "MIT" ]
null
null
null
# Enter your code here. Read input from STDIN. Print output to STDOUT from collections import deque d = deque() for _ in range(int(input())): inp = input().split() getattr(d, inp[0])(*[inp[1]] if len(inp) > 1 else []) print(*[item for item in d])
28.444444
69
0.648438
from collections import deque d = deque() for _ in range(int(input())): inp = input().split() getattr(d, inp[0])(*[inp[1]] if len(inp) > 1 else []) print(*[item for item in d])
true
true
1c410e5c21526e59865d845fbef59dfe155a5f3e
1,612
py
Python
MNIST/src/utils.py
AnesBenmerzoug/Machine-Learning-Projects
c52b3f55968c042a20299473fb124b75cc410ce0
[ "MIT" ]
1
2020-05-02T18:50:11.000Z
2020-05-02T18:50:11.000Z
MNIST/src/utils.py
AnesBenmerzoug/Machine-Learning-Projects
c52b3f55968c042a20299473fb124b75cc410ce0
[ "MIT" ]
null
null
null
MNIST/src/utils.py
AnesBenmerzoug/Machine-Learning-Projects
c52b3f55968c042a20299473fb124b75cc410ce0
[ "MIT" ]
null
null
null
from torchvision.utils import make_grid import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np def imgshow(img): plt.imshow(np.transpose(make_grid(img).numpy(), (1, 2, 0))) plt.show() def plotlosses(losses, title="", xlabel="", ylabel=""): epochs = np.arange(losses.size) +...
27.793103
77
0.635856
from torchvision.utils import make_grid import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np def imgshow(img): plt.imshow(np.transpose(make_grid(img).numpy(), (1, 2, 0))) plt.show() def plotlosses(losses, title="", xlabel="", ylabel=""): epochs = np.arange(losses.size) +...
true
true
1c410eea0f136cd9dccd0299a60356e341fd9e0b
912
py
Python
indico/modules/categories/legacy.py
CrownedSilverFox/conference-platform
1858a2908763dc7e4c29d3157369e9aab6064933
[ "MIT" ]
1
2021-02-24T10:20:14.000Z
2021-02-24T10:20:14.000Z
indico/modules/categories/legacy.py
CrownedSilverFox/conference-platform
1858a2908763dc7e4c29d3157369e9aab6064933
[ "MIT" ]
2
2015-01-20T22:25:18.000Z
2020-07-20T15:27:20.000Z
indico/modules/categories/legacy.py
CrownedSilverFox/conference-platform
1858a2908763dc7e4c29d3157369e9aab6064933
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from lxml import etree class XMLCategorySerializer: def __init__(self, category): self.categ...
31.448276
70
0.70614
from lxml import etree class XMLCategorySerializer: def __init__(self, category): self.category = category def serialize_category(self): xml = self._serialize_category() return etree.tostring(xml, pretty_print=True) def _serialize_category(self): response = etree.E...
true
true