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
1c296ef1270e30744b8f8e9ca7425ed4af29fa11
2,187
py
Python
src/model/window.py
alanludke/computer_graphics
37188307b21c7fca165b73826fa050fc885b4a39
[ "MIT" ]
null
null
null
src/model/window.py
alanludke/computer_graphics
37188307b21c7fca165b73826fa050fc885b4a39
[ "MIT" ]
null
null
null
src/model/window.py
alanludke/computer_graphics
37188307b21c7fca165b73826fa050fc885b4a39
[ "MIT" ]
null
null
null
from src.model.point import Point from src.utils.object import GraphicObject from PyQt5.QtGui import QColor, QPainter, QPen class Window: def __init__(self, w_center, width, height): self.type_object = "window" self.origin = Point("origin", 0.5, 0.5, 1) self.w_center_position = Point("w_ce...
31.695652
96
0.575674
from src.model.point import Point from src.utils.object import GraphicObject from PyQt5.QtGui import QColor, QPainter, QPen class Window: def __init__(self, w_center, width, height): self.type_object = "window" self.origin = Point("origin", 0.5, 0.5, 1) self.w_center_position = Point("w_ce...
true
true
1c296f9c8091cc7bd5598e4c1f092e521ee76ee5
1,787
py
Python
setup.py
MBPhys/Label-Creator
a50936c91ceeea2deb1b3b4b77464e009b6fbaa3
[ "BSD-3-Clause" ]
null
null
null
setup.py
MBPhys/Label-Creator
a50936c91ceeea2deb1b3b4b77464e009b6fbaa3
[ "BSD-3-Clause" ]
1
2022-01-21T09:45:21.000Z
2022-01-21T12:10:25.000Z
setup.py
MBPhys/Label-Creator
a50936c91ceeea2deb1b3b4b77464e009b6fbaa3
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import codecs from setuptools import setup, find_packages def read(fname): file_path = os.path.join(os.path.dirname(__file__), fname) return codecs.open(file_path, encoding='utf-8').read() # Add your dependencies in requirements.txt # Note: you can ad...
30.288136
105
0.642417
import os import codecs from setuptools import setup, find_packages def read(fname): file_path = os.path.join(os.path.dirname(__file__), fname) return codecs.open(file_path, encoding='utf-8').read() requirements = [] with open('requirements.txt') as f: for line in f: stripped = line.split("...
true
true
1c296fb9b021fbc61c0e665d797ae6e8713439fc
3,498
py
Python
src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/test_ai_did_you_mean_this_scenario.py
SDKAutoUP/azure-cli-extensions
5991b1656318130b78ea83a2aa87386fbe0b60eb
[ "MIT" ]
null
null
null
src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/test_ai_did_you_mean_this_scenario.py
SDKAutoUP/azure-cli-extensions
5991b1656318130b78ea83a2aa87386fbe0b60eb
[ "MIT" ]
null
null
null
src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/test_ai_did_you_mean_this_scenario.py
SDKAutoUP/azure-cli-extensions
5991b1656318130b78ea83a2aa87386fbe0b60eb
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
45.428571
104
0.702115
from http import HTTPStatus import requests from azext_ai_did_you_mean_this._cmd_table import CommandTable from azext_ai_did_you_mean_this.custom import ( call_aladdin_service, get_recommendations_from_http_response) from azext_ai_did_you_mean_this.tests.latest.aladdin_scenario_test_base import \ Aladdin...
true
true
1c2970bd3ab1d791f286d53b34e37f4a39dead1e
7,010
py
Python
sockets.py
bqi1/CMPUT404-assignment-websockets
79a7859992599e957c40c9ffeb8ed3448599ec99
[ "Apache-2.0" ]
null
null
null
sockets.py
bqi1/CMPUT404-assignment-websockets
79a7859992599e957c40c9ffeb8ed3448599ec99
[ "Apache-2.0" ]
null
null
null
sockets.py
bqi1/CMPUT404-assignment-websockets
79a7859992599e957c40c9ffeb8ed3448599ec99
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2013-2014 Abram Hindle # 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 b...
33.54067
132
0.63067
import flask from flask import Flask, request, redirect, jsonify from flask_sockets import Sockets import gevent from gevent import queue import time import json import os app = Flask(__name__) sockets = Sockets(app) app.debug = True class World: def __init__(self): self.clear() ...
true
true
1c2970ce1efb2cb1317b5c2b49381a674c72370c
3,058
py
Python
test/com/facebook/buck/android/testdata/android_project/test_runner.py
Unknoob/buck
2dfc734354b326f2f66896dde7746a11965d5a13
[ "Apache-2.0" ]
8,027
2015-01-02T05:31:44.000Z
2022-03-31T07:08:09.000Z
test/com/facebook/buck/android/testdata/android_project/test_runner.py
Unknoob/buck
2dfc734354b326f2f66896dde7746a11965d5a13
[ "Apache-2.0" ]
2,355
2015-01-01T15:30:53.000Z
2022-03-30T20:21:16.000Z
test/com/facebook/buck/android/testdata/android_project/test_runner.py
Unknoob/buck
2dfc734354b326f2f66896dde7746a11965d5a13
[ "Apache-2.0" ]
1,280
2015-01-09T03:29:04.000Z
2022-03-30T15:14:14.000Z
#!/usr/bin/env python2.7 import json import os import re import sys from pprint import pformat, pprint """ This is an external test runner for integration tests that checks the command arguments passed to external test runners. Right now it checks the following arguments: - "-Dbuck.robolectric_res_directories", whi...
31.204082
98
0.721387
import json import os import re import sys from pprint import pformat, pprint def read_command_arguments_from_spec_file(spec_file): with open(spec_file) as data_file: data = json.load(data_file) return data[0]["command"] def get_robolectric_res_directories(command_args): return find_key_in_...
true
true
1c2972135cde0ca21444ee9c1d6d7e42b5c7cafb
855
py
Python
OAuth2DjangoSampleApp/urls.py
VT-Zhang/IntuitPayment
b588603b01d7432b6dd3559a174ac9796adc2cdd
[ "Apache-2.0" ]
null
null
null
OAuth2DjangoSampleApp/urls.py
VT-Zhang/IntuitPayment
b588603b01d7432b6dd3559a174ac9796adc2cdd
[ "Apache-2.0" ]
null
null
null
OAuth2DjangoSampleApp/urls.py
VT-Zhang/IntuitPayment
b588603b01d7432b6dd3559a174ac9796adc2cdd
[ "Apache-2.0" ]
null
null
null
"""OAuth2DjangoSampleApp URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='h...
35.625
79
0.708772
from django.conf.urls import include,url from django.contrib import admin urlpatterns = [ url(r'^(?i)sampleAppOAuth2', include('sampleAppOAuth2.urls')), url(r'^(?i)admin/', admin.site.urls), ]
true
true
1c2972e07b9d557b7d1250a587f21850cc680346
6,203
py
Python
predict.py
coleygroup/Graph2SMILES
1b87f9ffdb739346b94853dfe8e5d63ac0198a38
[ "MIT" ]
13
2021-11-08T02:05:59.000Z
2022-03-29T22:38:45.000Z
predict.py
coleygroup/Graph2SMILES
1b87f9ffdb739346b94853dfe8e5d63ac0198a38
[ "MIT" ]
2
2022-01-15T01:31:58.000Z
2022-03-12T02:36:41.000Z
predict.py
coleygroup/Graph2SMILES
1b87f9ffdb739346b94853dfe8e5d63ac0198a38
[ "MIT" ]
3
2021-11-08T03:42:14.000Z
2022-01-05T08:23:55.000Z
import argparse import logging import numpy as np import os import sys import torch from models.graph2seq_series_rel import Graph2SeqSeriesRel from models.seq2seq import Seq2Seq from torch.utils.data import DataLoader from utils import parsing from utils.data_utils import canonicalize_smiles, load_vocab, S2SDataset, G2...
36.488235
95
0.589876
import argparse import logging import numpy as np import os import sys import torch from models.graph2seq_series_rel import Graph2SeqSeriesRel from models.seq2seq import Seq2Seq from torch.utils.data import DataLoader from utils import parsing from utils.data_utils import canonicalize_smiles, load_vocab, S2SDataset, G2...
true
true
1c2973145e8bcafaa4825ff11792d86abb27b794
985
py
Python
lib/surface/iam/policies/__init__.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/surface/iam/policies/__init__.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/surface/iam/policies/__init__.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2018 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
31.774194
74
0.764467
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.calliope import base @base.ReleaseTracks(base.ReleaseTrack.ALPHA) class Policies(base.Group):
true
true
1c2973d2be709e96b6f62a8d0eea5c956361bc47
2,818
py
Python
server/core/serializers.py
webclinic017/trading-bot-1
c567b1d865a88aa025e589b8c403cc7749ab52ad
[ "MIT" ]
1
2021-08-29T03:34:30.000Z
2021-08-29T03:34:30.000Z
server/core/serializers.py
webclinic017/trading-bot-1
c567b1d865a88aa025e589b8c403cc7749ab52ad
[ "MIT" ]
null
null
null
server/core/serializers.py
webclinic017/trading-bot-1
c567b1d865a88aa025e589b8c403cc7749ab52ad
[ "MIT" ]
1
2021-08-16T22:33:24.000Z
2021-08-16T22:33:24.000Z
from assets.models import Asset from rest_framework import serializers from users.models import User from users.serializers import UserSerializer from .models import Strategy class StrategySerializer(serializers.ModelSerializer): """Serializer for listing/retrieving a user strategy.""" user = UserSerializer...
29.663158
80
0.570263
from assets.models import Asset from rest_framework import serializers from users.models import User from users.serializers import UserSerializer from .models import Strategy class StrategySerializer(serializers.ModelSerializer): user = UserSerializer(fields=("id", "first_name", "last_name")) asset = serial...
true
true
1c2974095646c30b10f4961afa734c8d388cf267
7,191
py
Python
intake_hypothetic/hypothetic.py
informatics-lab/intake-hypothetic
6ebc8b800aac4caa37820e2a5d1a01346fb65ecd
[ "BSD-2-Clause" ]
null
null
null
intake_hypothetic/hypothetic.py
informatics-lab/intake-hypothetic
6ebc8b800aac4caa37820e2a5d1a01346fb65ecd
[ "BSD-2-Clause" ]
null
null
null
intake_hypothetic/hypothetic.py
informatics-lab/intake-hypothetic
6ebc8b800aac4caa37820e2a5d1a01346fb65ecd
[ "BSD-2-Clause" ]
1
2021-04-10T23:57:51.000Z
2021-04-10T23:57:51.000Z
from datetime import datetime, timedelta import importlib import itertools import warnings import urllib import iris import iris_hypothetic import pandas as pd import numpy as np import tempfile import boto3 from botocore.handlers import disable_signing from intake.source.base import DataSource, Schema from . import...
34.907767
176
0.633431
from datetime import datetime, timedelta import importlib import itertools import warnings import urllib import iris import iris_hypothetic import pandas as pd import numpy as np import tempfile import boto3 from botocore.handlers import disable_signing from intake.source.base import DataSource, Schema from . import...
true
true
1c29754cd09e6e38b14eb2c80136edcbb80dca20
5,576
py
Python
main.py
wgoulet/ChiArtInstituteBrowser
bed86ccc3daa6effd3981e87a62b60b00e1dcb41
[ "MIT" ]
null
null
null
main.py
wgoulet/ChiArtInstituteBrowser
bed86ccc3daa6effd3981e87a62b60b00e1dcb41
[ "MIT" ]
null
null
null
main.py
wgoulet/ChiArtInstituteBrowser
bed86ccc3daa6effd3981e87a62b60b00e1dcb41
[ "MIT" ]
null
null
null
import os import subprocess import requests import pprint import time import json import urllib.parse import csv from PIL import Image import re import math import moviepy.editor import moviepy.Clip import mutagen import ffmpeg import sys def main(argv): print ("hello world") pprint.pprint(argv) artist = "...
33.590361
113
0.47023
import os import subprocess import requests import pprint import time import json import urllib.parse import csv from PIL import Image import re import math import moviepy.editor import moviepy.Clip import mutagen import ffmpeg import sys def main(argv): print ("hello world") pprint.pprint(argv) artist = "...
true
true
1c2975e41d6f59fa071124a5934b78c9367cdf9b
3,511
py
Python
to_do_list/tasks/tests/test_forms.py
arnaudblois/to_do_list
07a9e443110d14271a59bd8ff1a2f55ac753ea9d
[ "MIT" ]
1
2021-11-13T01:30:34.000Z
2021-11-13T01:30:34.000Z
to_do_list/tasks/tests/test_forms.py
arnaudblois/to_do_list
07a9e443110d14271a59bd8ff1a2f55ac753ea9d
[ "MIT" ]
null
null
null
to_do_list/tasks/tests/test_forms.py
arnaudblois/to_do_list
07a9e443110d14271a59bd8ff1a2f55ac753ea9d
[ "MIT" ]
null
null
null
from test_plus.test import TestCase from ..forms import ProfileForm, UserUpdateForm, UserProfileForm from to_do_list.tasks.tests.factories import TaskFactory, ProfileFactory, TeamFactory from to_do_list.users.tests.factories import UserFactory class TestProfileForm(TestCase): def setUp(self): UserFactory...
33.122642
95
0.616918
from test_plus.test import TestCase from ..forms import ProfileForm, UserUpdateForm, UserProfileForm from to_do_list.tasks.tests.factories import TaskFactory, ProfileFactory, TeamFactory from to_do_list.users.tests.factories import UserFactory class TestProfileForm(TestCase): def setUp(self): UserFactory...
true
true
1c297620523b1959ea805f260d406d29fe5a7e29
25,433
py
Python
src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations_async/_host_pool_operations_async.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations_async/_host_pool_operations_async.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations_async/_host_pool_operations_async.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.173038
480
0.678607
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import Pipeli...
true
true
1c2976302fea31d3f377e5dd0e1cee1e38d44c7d
27,420
py
Python
tests/python/pants_test/engine/test_rules.py
SergeKireev/pants
cd92c65aeb3dfdcee3e0946f2b68a301ef2f4541
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/engine/test_rules.py
SergeKireev/pants
cd92c65aeb3dfdcee3e0946f2b68a301ef2f4541
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/engine/test_rules.py
SergeKireev/pants
cd92c65aeb3dfdcee3e0946f2b68a301ef2f4541
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import re import sys import unittest from dataclasses import dataclass from textwrap import dedent from pants.engine.build_files import create_graph_rules from pants.engine.console import...
30.165017
155
0.527243
import re import sys import unittest from dataclasses import dataclass from textwrap import dedent from pants.engine.build_files import create_graph_rules from pants.engine.console import Console from pants.engine.fs import create_fs_rules from pants.engine.goal import Goal from pants.engine.mapper import AddressMa...
true
true
1c29775e42a65603f1c9778f9c7b42fbc4da91f8
985
py
Python
setup.py
kapoorlab/FAQT
2f3bc0574a350341988987ca3beb7bcf68203b6c
[ "MIT" ]
null
null
null
setup.py
kapoorlab/FAQT
2f3bc0574a350341988987ca3beb7bcf68203b6c
[ "MIT" ]
null
null
null
setup.py
kapoorlab/FAQT
2f3bc0574a350341988987ca3beb7bcf68203b6c
[ "MIT" ]
null
null
null
import setuptools from setuptools import find_packages, setup with open('README.md') as f: long_description = f.read() setup( name="faqt", version='0.0.1', author='Varun Kapoor,Blanco Obregon Dalmiro,Laura Boulan', author_email='randomaccessiblekapoor@gmail.com', url='https://github.com/kapo...
26.621622
62
0.627411
import setuptools from setuptools import find_packages, setup with open('README.md') as f: long_description = f.read() setup( name="faqt", version='0.0.1', author='Varun Kapoor,Blanco Obregon Dalmiro,Laura Boulan', author_email='randomaccessiblekapoor@gmail.com', url='https://github.com/kapo...
true
true
1c29779caac0c3295123139d66fd444935447eab
10,930
py
Python
openpeerpower/components/broadlink/config_flow.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
1
2021-07-08T20:09:55.000Z
2021-07-08T20:09:55.000Z
openpeerpower/components/broadlink/config_flow.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
47
2021-02-21T23:43:07.000Z
2022-03-31T06:07:10.000Z
openpeerpower/components/broadlink/config_flow.py
OpenPeerPower/core
f673dfac9f2d0c48fa30af37b0a99df9dd6640ee
[ "Apache-2.0" ]
null
null
null
"""Config flow for Broadlink devices.""" import errno from functools import partial import logging import socket import broadlink as blk from broadlink.exceptions import ( AuthenticationError, BroadlinkException, NetworkTimeoutError, ) import voluptuous as vol from openpeerpower import config_entries, dat...
34.698413
87
0.574565
import errno from functools import partial import logging import socket import broadlink as blk from broadlink.exceptions import ( AuthenticationError, BroadlinkException, NetworkTimeoutError, ) import voluptuous as vol from openpeerpower import config_entries, data_entry_flow from openpeerpower.component...
true
true
1c2977d70ab998d69add73019a920a769418c5a0
8,781
py
Python
keystone/contrib/user_registration/core.py
TampereTC/tre-smartcity-keystone
e2d0adc25165eef102c87d7991fb1a595680fda6
[ "Apache-2.0" ]
null
null
null
keystone/contrib/user_registration/core.py
TampereTC/tre-smartcity-keystone
e2d0adc25165eef102c87d7991fb1a595680fda6
[ "Apache-2.0" ]
null
null
null
keystone/contrib/user_registration/core.py
TampereTC/tre-smartcity-keystone
e2d0adc25165eef102c87d7991fb1a595680fda6
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2014 Universidad Politecnica de Madrid # # 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 la...
35.550607
88
0.65972
from __future__ import absolute_import import abc import datetime import six import uuid from keystone import exception from keystone import notifications from keystone.common import dependency from keystone.common import extension from keystone.common import manager from keystone.openstack.common impor...
true
true
1c29783378ba1d13e6ed6f0e82d3088348c98350
1,314
py
Python
gcn_test/cora.py
lmb633/gnn
98289d32f4be88a10714f1ac3bd0539e8cbc221f
[ "MIT" ]
null
null
null
gcn_test/cora.py
lmb633/gnn
98289d32f4be88a10714f1ac3bd0539e8cbc221f
[ "MIT" ]
null
null
null
gcn_test/cora.py
lmb633/gnn
98289d32f4be88a10714f1ac3bd0539e8cbc221f
[ "MIT" ]
null
null
null
import os.path as osp from torch_geometric.datasets import Planetoid from torch_geometric.data import NeighborSampler import torch_geometric.transforms as T from gcn_test.models import GCNNet import torch from torch import nn import numpy as np embedding = 16 lr = 0.001 epoch = 300 dataset = 'Cora' path...
26.816327
113
0.683409
import os.path as osp from torch_geometric.datasets import Planetoid from torch_geometric.data import NeighborSampler import torch_geometric.transforms as T from gcn_test.models import GCNNet import torch from torch import nn import numpy as np embedding = 16 lr = 0.001 epoch = 300 dataset = 'Cora' path...
true
true
1c29795ca24db6e46e8e39c06d0a5b049e208751
937
py
Python
web/app/sapl/app/config.py
fumiya-kubota/sapl
1b1f58e9d1dcb5ba913cfc11820d3465cfb45525
[ "Apache-2.0" ]
null
null
null
web/app/sapl/app/config.py
fumiya-kubota/sapl
1b1f58e9d1dcb5ba913cfc11820d3465cfb45525
[ "Apache-2.0" ]
null
null
null
web/app/sapl/app/config.py
fumiya-kubota/sapl
1b1f58e9d1dcb5ba913cfc11820d3465cfb45525
[ "Apache-2.0" ]
null
null
null
import os class BaseConfig: DATABASE_URI = '' REDIS_HOST = '' REDIS_PORT = 0 class DevelopmentConfig(BaseConfig): DATABASE_SERVER = 'postgresql+asyncpg://sapl@127.0.0.1:5432' DATABASE_NAME = 'sapl' REDIS_HOST = '127.0.0.1' REDIS_PORT = 16379 class ProductionConfig(BaseConfig): DATA...
24.025641
69
0.689434
import os class BaseConfig: DATABASE_URI = '' REDIS_HOST = '' REDIS_PORT = 0 class DevelopmentConfig(BaseConfig): DATABASE_SERVER = 'postgresql+asyncpg://sapl@127.0.0.1:5432' DATABASE_NAME = 'sapl' REDIS_HOST = '127.0.0.1' REDIS_PORT = 16379 class ProductionConfig(BaseConfig): DATA...
true
true
1c29798635d284b0b0474b62aff15c3cdf76896f
5,294
py
Python
doc/source/ray-core/examples/lbfgs/driver.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
22
2018-05-08T05:52:34.000Z
2020-04-01T10:09:55.000Z
doc/source/ray-core/examples/lbfgs/driver.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
73
2021-09-25T07:11:39.000Z
2022-03-26T07:10:59.000Z
doc/source/ray-core/examples/lbfgs/driver.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
10
2018-04-27T10:50:59.000Z
2020-02-24T02:41:43.000Z
import numpy as np import os import scipy.optimize import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import ray import ray.experimental.tf_utils class LinearModel(object): """Simple class for a one layer neural network. Note that this code does not initialize the network we...
36.510345
82
0.657348
import numpy as np import os import scipy.optimize import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import ray import ray.experimental.tf_utils class LinearModel(object): def __init__(self, shape): x = tf.placeholder(tf.float32, [None, shape[0]]) w = tf.Variabl...
true
true
1c297b323b22d04ab0738a77cb457c4600fe7e89
5,189
py
Python
h/tweens.py
kevinjalbert/h
0f260bf59847f27eff720eeb3c3b2468571412b2
[ "BSD-2-Clause" ]
1
2020-06-19T01:49:39.000Z
2020-06-19T01:49:39.000Z
h/tweens.py
kevinjalbert/h
0f260bf59847f27eff720eeb3c3b2468571412b2
[ "BSD-2-Clause" ]
5
2020-03-24T18:14:50.000Z
2022-03-02T06:56:50.000Z
h/tweens.py
kevinjalbert/h
0f260bf59847f27eff720eeb3c3b2468571412b2
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import collections import logging from codecs import open from pkg_resources import resource_filename from pyramid import httpexceptions from pyramid.util import DottedNameResolver from h.util.redirects import lookup as lookup_redirects from h.util.redirects import parse as parse_redirects lo...
35.29932
119
0.683754
import collections import logging from codecs import open from pkg_resources import resource_filename from pyramid import httpexceptions from pyramid.util import DottedNameResolver from h.util.redirects import lookup as lookup_redirects from h.util.redirects import parse as parse_redirects log = logging.getLogger(_...
true
true
1c297bd2b09c2317db748b29f27f84515e88e03e
42
py
Python
mati/version.py
cuenca-mx/mati-python
0f87f583ad923dd06011532af75c94045fe20f75
[ "MIT" ]
2
2020-04-08T23:54:04.000Z
2020-08-01T01:37:00.000Z
mati/version.py
cuenca-mx/mati-python
0f87f583ad923dd06011532af75c94045fe20f75
[ "MIT" ]
76
2019-10-16T01:10:39.000Z
2022-03-29T14:12:29.000Z
mati/version.py
cuenca-mx/mati-python
0f87f583ad923dd06011532af75c94045fe20f75
[ "MIT" ]
1
2020-01-29T21:01:46.000Z
2020-01-29T21:01:46.000Z
__version__ = '0.3.1' # pragma: no cover
21
41
0.642857
__version__ = '0.3.1'
true
true
1c297c702caf8ac4580956cb5bfe297237bf5bce
9,620
py
Python
bot/cogs/setup_bot.py
lsglucas/DiscordMackBot
70bbced34c5e561a595b901c719f309f7cfc1c0a
[ "MIT" ]
5
2020-09-06T00:45:04.000Z
2020-10-14T18:43:56.000Z
bot/cogs/setup_bot.py
lsglucas/MoodleV
70bbced34c5e561a595b901c719f309f7cfc1c0a
[ "MIT" ]
8
2021-09-02T00:41:51.000Z
2022-02-14T14:08:33.000Z
bot/cogs/setup_bot.py
lsglucas/DiscordMackBot
70bbced34c5e561a595b901c719f309f7cfc1c0a
[ "MIT" ]
2
2020-09-06T00:45:09.000Z
2020-09-06T00:45:37.000Z
import discord import asyncio from discord.ext.commands import Cog, command from discord.ext.commands.core import has_permissions from discord import Embed from utilities import ( main_messages_style, timeout_message, positive_emojis_list, negative_emojis_list, footer, defaultcolor, ) from sec...
31.437908
160
0.568295
import discord import asyncio from discord.ext.commands import Cog, command from discord.ext.commands.core import has_permissions from discord import Embed from utilities import ( main_messages_style, timeout_message, positive_emojis_list, negative_emojis_list, footer, defaultcolor, ) from sec...
true
true
1c297c8064f33f328c3b86a48818a0e5c4ce8af9
13,712
py
Python
4. Evaluate/pascalvoc.py
Zyjacya-In-love/Pedestrian-Detection-on-YOLOv3
6503d029b3e3a7da5c373ca500777cc38d49d54b
[ "MIT" ]
26
2020-05-29T16:11:56.000Z
2022-03-24T19:56:45.000Z
4. Evaluate/pascalvoc.py
Zyjacya-In-love/Pedestrian-Detection-on-YOLOv3
6503d029b3e3a7da5c373ca500777cc38d49d54b
[ "MIT" ]
10
2020-07-18T04:12:04.000Z
2022-02-10T01:53:42.000Z
4. Evaluate/pascalvoc.py
Zyjacya-In-love/Pedestrian-Detection-on-YOLOv3
6503d029b3e3a7da5c373ca500777cc38d49d54b
[ "MIT" ]
7
2020-06-08T12:20:28.000Z
2021-01-17T12:57:26.000Z
########################################################################################### # # # This sample shows how to evaluate object detections applying the following metrics: # # * Precision x Recall curve ----> ...
36.860215
99
0.599475
er) is False: errors.append('folder %s not found' % detFolder) if args.savePath is not None: savePath = os.path.join(currentPath, args.savePath) else: savePath = os.path.join(currentPath, 'results') if not os.path.exists(savePath): os.makedirs(savePath) if len(errors) != 0: print("""usa...
true
true
1c297e2b1c3d84e46d805713ff276ba6620d2b82
12,292
py
Python
modules/templates/historic/RW/controllers.py
whanderley/eden
08ced3be3d52352c54cbd412ed86128fbb68b1d2
[ "MIT" ]
205
2015-01-20T08:26:09.000Z
2022-03-27T19:59:33.000Z
modules/templates/historic/RW/controllers.py
whanderley/eden
08ced3be3d52352c54cbd412ed86128fbb68b1d2
[ "MIT" ]
249
2015-02-10T09:56:35.000Z
2022-03-23T19:54:36.000Z
modules/templates/historic/RW/controllers.py
whanderley/eden
08ced3be3d52352c54cbd412ed86128fbb68b1d2
[ "MIT" ]
231
2015-02-10T09:33:17.000Z
2022-02-18T19:56:05.000Z
# -*- coding: utf-8 -*- import json from os import path from gluon import current from gluon.html import * from gluon.storage import Storage from gluon.http import redirect from s3 import FS, ICON, S3CustomController from s3theme import formstyle_foundation_inline THEME = "historic.RW" # =========================...
36.366864
118
0.489261
import json from os import path from gluon import current from gluon.html import * from gluon.storage import Storage from gluon.http import redirect from s3 import FS, ICON, S3CustomController from s3theme import formstyle_foundation_inline THEME = "historic.RW" class index(S3CustomController): def __call_...
true
true
1c297f3e2ada36b66c372efd4cf53df350c19e7a
19,662
py
Python
pandas/tests/groupby/aggregate/test_other.py
krey/pandas
4a51a4e0cff0111856ef3888ec41c2cfd65210c5
[ "BSD-3-Clause" ]
2
2019-12-31T14:22:54.000Z
2019-12-31T14:23:42.000Z
pandas/tests/groupby/aggregate/test_other.py
krey/pandas
4a51a4e0cff0111856ef3888ec41c2cfd65210c5
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/groupby/aggregate/test_other.py
krey/pandas
4a51a4e0cff0111856ef3888ec41c2cfd65210c5
[ "BSD-3-Clause" ]
null
null
null
""" test all other .agg behavior """ from collections import OrderedDict import datetime as dt from functools import partial import numpy as np import pytest import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, PeriodIndex, Series, date_range, period_range, ) from pandas...
30.578538
96
0.543078
from collections import OrderedDict import datetime as dt from functools import partial import numpy as np import pytest import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, PeriodIndex, Series, date_range, period_range, ) from pandas.core.base import SpecificationError ...
true
true
1c297f3ff993416454b3b84066d11bccaf513d4f
218
py
Python
facein_api/settings/databases.py
gda2048/facein-backend
01a8500ffcdaef91540b0cdf94d50dd64cb46276
[ "MIT" ]
1
2021-12-27T12:35:06.000Z
2021-12-27T12:35:06.000Z
facein_api/settings/databases.py
Sirkirill/facetracker-backend
462dff11e7dccc379a6e04250b121120ec954c8d
[ "MIT" ]
10
2021-06-07T16:41:35.000Z
2022-03-12T01:04:23.000Z
facein_api/settings/databases.py
gda2048/facein-backend
01a8500ffcdaef91540b0cdf94d50dd64cb46276
[ "MIT" ]
null
null
null
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases import dj_database_url from decouple import config DATABASES = { 'default': dj_database_url.config( default=config('DATABASE_URL') ), }
19.818182
63
0.715596
_database_url from decouple import config DATABASES = { 'default': dj_database_url.config( default=config('DATABASE_URL') ), }
true
true
1c297f7612200b7ec237b8bc59870554869c5eb2
892
py
Python
PyDPriv/DPMechanism/BaseMechanism.py
xymeng16/PyDPriv
1516e82fac4c3a9a697e623a6502fa761333355e
[ "Apache-2.0" ]
null
null
null
PyDPriv/DPMechanism/BaseMechanism.py
xymeng16/PyDPriv
1516e82fac4c3a9a697e623a6502fa761333355e
[ "Apache-2.0" ]
null
null
null
PyDPriv/DPMechanism/BaseMechanism.py
xymeng16/PyDPriv
1516e82fac4c3a9a697e623a6502fa761333355e
[ "Apache-2.0" ]
null
null
null
from abc import ABC, abstractmethod class BaseMechanism(ABC): """ Base class for all DP mechanisms, abstracted. """ def __init__(self): self._eps = None self._delta = None self._type = None @abstractmethod def noisy(self, val): return NotImplemented @abstr...
23.473684
84
0.588565
from abc import ABC, abstractmethod class BaseMechanism(ABC): def __init__(self): self._eps = None self._delta = None self._type = None @abstractmethod def noisy(self, val): return NotImplemented @abstractmethod def var(self, val): return NotImplemented ...
true
true
1c297f9558012f9ab06dba2c75f4bc82b04d91b2
7,321
py
Python
hydrus/data/db_models.py
Dhairya3124/hydrus
4c737d9f7df08c705cef5a30536b871fd0a83728
[ "MIT" ]
214
2017-02-06T17:52:18.000Z
2022-02-14T08:42:34.000Z
hydrus/data/db_models.py
Dhairya3124/hydrus
4c737d9f7df08c705cef5a30536b871fd0a83728
[ "MIT" ]
447
2016-12-16T11:33:43.000Z
2022-02-25T10:44:14.000Z
hydrus/data/db_models.py
Dhairya3124/hydrus
4c737d9f7df08c705cef5a30536b871fd0a83728
[ "MIT" ]
233
2017-05-30T08:33:05.000Z
2022-03-04T12:05:17.000Z
"""Models for Hydra Classes.""" import datetime import uuid from sqlite3 import Connection as SQLite3Connection from typing import Any from sqlalchemy import ( Column, DateTime, ForeignKey, Integer, Float, String, create_engine, event, ) from sqlalchemy.engine import Engine from sqlalc...
32.251101
89
0.60866
import datetime import uuid from sqlite3 import Connection as SQLite3Connection from typing import Any from sqlalchemy import ( Column, DateTime, ForeignKey, Integer, Float, String, create_engine, event, ) from sqlalchemy.engine import Engine from sqlalchemy.ext.declarative import decl...
true
true
1c297febe0a3ab0a7dd8bb4713c6a5143759aee1
1,195
py
Python
src/utils/allutills.py
sandeepjena7/Ricefield
06227b41708d990e62c9bd1aebb820e6d246e01d
[ "MIT" ]
null
null
null
src/utils/allutills.py
sandeepjena7/Ricefield
06227b41708d990e62c9bd1aebb820e6d246e01d
[ "MIT" ]
null
null
null
src/utils/allutills.py
sandeepjena7/Ricefield
06227b41708d990e62c9bd1aebb820e6d246e01d
[ "MIT" ]
null
null
null
import yaml from pathlib import Path from typing import Optional,Dict,List,TypeVar import os import time import io import logging __all__ = ['Read_Yaml','Create_Dir',"Unique_Filename"] keras_model = TypeVar('keras_model') keras_summary = TypeVar('keras_summary') def Read_Yaml(config:Optional[Path]) -> Dict[str,any] :...
24.387755
75
0.699582
import yaml from pathlib import Path from typing import Optional,Dict,List,TypeVar import os import time import io import logging __all__ = ['Read_Yaml','Create_Dir',"Unique_Filename"] keras_model = TypeVar('keras_model') keras_summary = TypeVar('keras_summary') def Read_Yaml(config:Optional[Path]) -> Dict[str,any] :...
true
true
1c29800226945ba6350ff87d0c3b8f49544b15af
12,476
py
Python
saleor/order/notifications.py
Kibria7533/saleor
d72f5bff9afeab13d2e2e09c9a32a964bfd9476d
[ "CC-BY-4.0" ]
2
2021-05-16T13:46:07.000Z
2021-05-16T13:49:21.000Z
saleor/order/notifications.py
kobbycyber/saleor
a7aa9e786d5c55243433800e414703fdcebbea23
[ "CC-BY-4.0" ]
1
2021-06-24T03:23:56.000Z
2021-06-24T03:23:56.000Z
saleor/order/notifications.py
kobbycyber/saleor
a7aa9e786d5c55243433800e414703fdcebbea23
[ "CC-BY-4.0" ]
1
2021-06-18T10:18:48.000Z
2021-06-18T10:18:48.000Z
from typing import TYPE_CHECKING, Iterable, List, Optional from urllib.parse import urlencode from django.forms import model_to_dict from ..account.models import StaffNotificationRecipient from ..core.notifications import get_site_context from ..core.notify_events import NotifyEventType from ..core.utils.url import p...
34.946779
88
0.670968
from typing import TYPE_CHECKING, Iterable, List, Optional from urllib.parse import urlencode from django.forms import model_to_dict from ..account.models import StaffNotificationRecipient from ..core.notifications import get_site_context from ..core.notify_events import NotifyEventType from ..core.utils.url import p...
true
true
1c2980eafb137d6d8cd51ee90fe0c4819e354db1
2,578
py
Python
lib/bin/jwdecrypt.py
uetopia/metagame
4f48418e5a8e691698ff347370ef1447021b9a4f
[ "Apache-2.0" ]
2
2018-10-02T15:47:45.000Z
2018-10-02T15:50:55.000Z
lib/bin/jwdecrypt.py
uetopia/metagame
4f48418e5a8e691698ff347370ef1447021b9a4f
[ "Apache-2.0" ]
null
null
null
lib/bin/jwdecrypt.py
uetopia/metagame
4f48418e5a8e691698ff347370ef1447021b9a4f
[ "Apache-2.0" ]
null
null
null
#!/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python import sys __author__ = 'rohe0002' import argparse import requests from jwkest.jwk import load_jwks_from_url, RSAKey from jwkest.jwk import rsa_load from jwkest.jwk import load_x509_cert from jwkest.jwk import load_jwks fro...
32.632911
94
0.616757
import sys __author__ = 'rohe0002' import argparse import requests from jwkest.jwk import load_jwks_from_url, RSAKey from jwkest.jwk import rsa_load from jwkest.jwk import load_x509_cert from jwkest.jwk import load_jwks from jwkest.jwk import import_rsa_key_from_file from jwkest.jwe import JWE def assign(lst): ...
true
true
1c29841f86b5329f965fa144d327f5a90226d320
2,243
py
Python
Tests/scripts/hook_validations/tests/conf_test.py
vibhuabharadwaj/content
30d639dbea0015536a3040ec18f93e50322bded0
[ "MIT" ]
7
2020-09-24T22:38:01.000Z
2021-07-14T15:58:35.000Z
Tests/scripts/hook_validations/tests/conf_test.py
vibhuabharadwaj/content
30d639dbea0015536a3040ec18f93e50322bded0
[ "MIT" ]
9
2021-02-08T20:51:18.000Z
2021-09-23T23:27:38.000Z
Tests/scripts/hook_validations/tests/conf_test.py
vibhuabharadwaj/content
30d639dbea0015536a3040ec18f93e50322bded0
[ "MIT" ]
2
2020-12-08T17:03:33.000Z
2021-07-13T18:32:06.000Z
from Tests.scripts.hook_validations.conf_json import ConfJsonValidator WITH_DESCRIPTION = { "test": "description" } MISSING_DESCRIPTION = { "test": "", "test2": "description" } TESTS_SECTION = [ { "playbookID": "siri" }, { "playbookID": "alexa" } ] def test_conf_json_desc...
27.691358
100
0.720909
from Tests.scripts.hook_validations.conf_json import ConfJsonValidator WITH_DESCRIPTION = { "test": "description" } MISSING_DESCRIPTION = { "test": "", "test2": "description" } TESTS_SECTION = [ { "playbookID": "siri" }, { "playbookID": "alexa" } ] def test_conf_json_desc...
true
true
1c2984e3fec5140bc3ea95e242b52cac8273d79c
3,511
py
Python
venv/lib/python3.8/site-packages/ansible_collections/cisco/ise/plugins/modules/network_access_dictionary.py
saeedya/docker-ansible
6fb0cfc6bc4a5925b21380952a5a4502ec02119a
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/ansible_collections/cisco/ise/plugins/modules/network_access_dictionary.py
saeedya/docker-ansible
6fb0cfc6bc4a5925b21380952a5a4502ec02119a
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/ansible_collections/cisco/ise/plugins/modules/network_access_dictionary.py
saeedya/docker-ansible
6fb0cfc6bc4a5925b21380952a5a4502ec02119a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2021, Cisco Systems # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r""" --- module: network_access_dictionary short_description: Resource module for Network Access Dictionary description: - Manage o...
24.552448
92
0.642267
DOCUMENTATION = r""" --- module: network_access_dictionary short_description: Resource module for Network Access Dictionary description: - Manage operations create, update and delete of the resource Network Access Dictionary. version_added: '1.0.0' extends_documentation_fragment: - cisco.ise.module author: Rafa...
true
true
1c298595a2511a3f9a684895c84f1e82099272b7
3,251
py
Python
magnum/tests/fakes.py
ISCAS-VDI/magnum-base
5bb88e12b3e5d665ae1b345b62023d1016217e08
[ "Apache-2.0" ]
null
null
null
magnum/tests/fakes.py
ISCAS-VDI/magnum-base
5bb88e12b3e5d665ae1b345b62023d1016217e08
[ "Apache-2.0" ]
null
null
null
magnum/tests/fakes.py
ISCAS-VDI/magnum-base
5bb88e12b3e5d665ae1b345b62023d1016217e08
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
34.585106
76
0.567518
import mock fakeAuthTokenHeaders = {'X-User-Id': u'773a902f022949619b5c2f32cd89d419', 'X-Project-Id': u'5588aebbcdc24e17a061595f80574376', 'X-Project-Name': 'test', 'X-User-Name': 'test', 'X-Auth-Token': u'5588a...
true
true
1c2986d8ee32a242a398455732d5440bf6485765
1,769
py
Python
setup.py
cr0hn/sanic-jwt
a91a2c5751b8a77e7ab33d2d1bcbf5d1826a4a26
[ "MIT" ]
null
null
null
setup.py
cr0hn/sanic-jwt
a91a2c5751b8a77e7ab33d2d1bcbf5d1826a4a26
[ "MIT" ]
null
null
null
setup.py
cr0hn/sanic-jwt
a91a2c5751b8a77e7ab33d2d1bcbf5d1826a4a26
[ "MIT" ]
null
null
null
import codecs import re from os import path from setuptools import find_packages, setup here = path.abspath(path.dirname(__file__)) def open_local(paths, mode="r", encoding="utf8"): p = path.join(here, *paths) return codecs.open(p, mode, encoding) with open_local(["sanic_jwt", "__init__.py"], encoding="la...
29.483333
76
0.655738
import codecs import re from os import path from setuptools import find_packages, setup here = path.abspath(path.dirname(__file__)) def open_local(paths, mode="r", encoding="utf8"): p = path.join(here, *paths) return codecs.open(p, mode, encoding) with open_local(["sanic_jwt", "__init__.py"], encoding="la...
true
true
1c298804799c2bc4a3271b42836529b2ad0227f6
386
py
Python
Ago-Dic-2020/sena-martinez-angel-david/Practica2/view.py
bryanbalderas/DAS_Sistemas
1e31f088c0de7134471025a5730b0abfc19d936e
[ "MIT" ]
41
2017-09-26T09:36:32.000Z
2022-03-19T18:05:25.000Z
Ago-Dic-2020/sena-martinez-angel-david/Practica2/view.py
bryanbalderas/DAS_Sistemas
1e31f088c0de7134471025a5730b0abfc19d936e
[ "MIT" ]
67
2017-09-11T05:06:12.000Z
2022-02-14T04:44:04.000Z
Ago-Dic-2020/sena-martinez-angel-david/Practica2/view.py
bryanbalderas/DAS_Sistemas
1e31f088c0de7134471025a5730b0abfc19d936e
[ "MIT" ]
210
2017-09-01T00:10:08.000Z
2022-03-19T18:05:12.000Z
from flask import Flask, render_template import pymongo import random app = Flask(__name__) @app.route('/') def mostrar_usuario(): client = pymongo.MongoClient("mongodb://db:27017/") db = client["mi-bd"] personas = [] for x in db.coll.find(): personas.append(x) persona = personas[random.randint(0, len(persona...
22.705882
57
0.717617
from flask import Flask, render_template import pymongo import random app = Flask(__name__) @app.route('/') def mostrar_usuario(): client = pymongo.MongoClient("mongodb://db:27017/") db = client["mi-bd"] personas = [] for x in db.coll.find(): personas.append(x) persona = personas[random.randint(0, len(persona...
true
true
1c2988931d4c9d67b87f1d0d34a1e6c3d822226b
348
py
Python
test.py
Kumaken/fyp-vehicle-counting-system
51adb3bfc762d5489bc643da5f79bec3fa9eeb84
[ "MIT" ]
null
null
null
test.py
Kumaken/fyp-vehicle-counting-system
51adb3bfc762d5489bc643da5f79bec3fa9eeb84
[ "MIT" ]
null
null
null
test.py
Kumaken/fyp-vehicle-counting-system
51adb3bfc762d5489bc643da5f79bec3fa9eeb84
[ "MIT" ]
1
2021-08-08T07:06:57.000Z
2021-08-08T07:06:57.000Z
import torch # Model model = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True) # Images dir = 'https://github.com/ultralytics/yolov5/raw/master/data/images/' imgs = [dir + f for f in ('zidane.jpg', 'bus.jpg')] # batched list of images # Inference results = model(imgs) print(results.xyxy[0]) results.s...
26.769231
77
0.692529
import torch model = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True) dir = 'https://github.com/ultralytics/yolov5/raw/master/data/images/' imgs = [dir + f for f in ('zidane.jpg', 'bus.jpg')] results = model(imgs) print(results.xyxy[0]) results.show()
true
true
1c298940e5d79a599afb471e9ca2d5c970aef700
737
py
Python
app/core/migrations/0014_alter_event_event_date_alter_event_event_time.py
Misiaty-Mat/Event-schedule
15ab5ec3d49b1f16e43a8d90709df5d143401c7a
[ "MIT" ]
null
null
null
app/core/migrations/0014_alter_event_event_date_alter_event_event_time.py
Misiaty-Mat/Event-schedule
15ab5ec3d49b1f16e43a8d90709df5d143401c7a
[ "MIT" ]
null
null
null
app/core/migrations/0014_alter_event_event_date_alter_event_event_time.py
Misiaty-Mat/Event-schedule
15ab5ec3d49b1f16e43a8d90709df5d143401c7a
[ "MIT" ]
null
null
null
# Generated by Django 4.0.1 on 2022-01-30 15:35 import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('core', '0013_alter_event_event_date_alter_event_event_time'), ] operations = [ migrati...
28.346154
107
0.628223
import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('core', '0013_alter_event_event_date_alter_event_event_time'), ] operations = [ migrations.AlterField( model_name='event',...
true
true
1c298947356cf70f04fd0dd8986f85a2d43f5366
8,338
py
Python
homeassistant/components/upnp/sensor.py
provinzio/core
2440f25aaf7863a83b266a5b728a062498a354b4
[ "Apache-2.0" ]
null
null
null
homeassistant/components/upnp/sensor.py
provinzio/core
2440f25aaf7863a83b266a5b728a062498a354b4
[ "Apache-2.0" ]
null
null
null
homeassistant/components/upnp/sensor.py
provinzio/core
2440f25aaf7863a83b266a5b728a062498a354b4
[ "Apache-2.0" ]
null
null
null
"""Support for UPnP/IGD Sensors.""" from __future__ import annotations from datetime import timedelta from typing import Any, Mapping from homeassistant.components.sensor import SensorEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import DATA_BYTES, DATA_RATE_KIBIBYTES_PER_SECOND...
33.620968
81
0.667426
from __future__ import annotations from datetime import timedelta from typing import Any, Mapping from homeassistant.components.sensor import SensorEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import DATA_BYTES, DATA_RATE_KIBIBYTES_PER_SECOND from homeassistant.core import Home...
true
true
1c298a80442215679e57d86d8cac1e588596569e
16,497
py
Python
tensorflow_datasets/core/splits.py
brettkoonce/datasets
55bb2a80ab674c2f6254ac74d90bd6e5f478e895
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/core/splits.py
brettkoonce/datasets
55bb2a80ab674c2f6254ac74d90bd6e5f478e895
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/core/splits.py
brettkoonce/datasets
55bb2a80ab674c2f6254ac74d90bd6e5f478e895
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 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...
34.297297
109
0.693217
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import collections import operator import six from six.moves import range from six.moves import zip from tensorflow_datasets.core import proto from tensorflow_datasets.core impo...
true
true
1c298adfb0597c0a5a4c3a3a6d12e5a36fd99729
961
py
Python
runJobs.py
mohseniaref/pygmtsar
674a2a747e05ff4db4810c2a213338bad1f64d6a
[ "MIT" ]
7
2018-12-13T02:56:11.000Z
2022-02-16T02:50:18.000Z
runJobs.py
mohseniaref/pygmtsar
674a2a747e05ff4db4810c2a213338bad1f64d6a
[ "MIT" ]
null
null
null
runJobs.py
mohseniaref/pygmtsar
674a2a747e05ff4db4810c2a213338bad1f64d6a
[ "MIT" ]
null
null
null
#! /usr/bin/env python ''' Created on May 19, 2010 @author: sbaker ''' import threading import Queue import sys, os try: jobFileString = sys.argv[1] ; numberProcs = int(sys.argv[2]) except: print "Usage:",sys.argv[0], "run_raw2slc numberOfProcessors" ; sys.exit(1) jobFile = open(jobFileString) runJobs = jo...
22.880952
78
0.638918
''' Created on May 19, 2010 @author: sbaker ''' import threading import Queue import sys, os try: jobFileString = sys.argv[1] ; numberProcs = int(sys.argv[2]) except: print "Usage:",sys.argv[0], "run_raw2slc numberOfProcessors" ; sys.exit(1) jobFile = open(jobFileString) runJobs = jobFile.readlines() jobF...
false
true
1c298be3e533bcc0cc5e6ad3a7d213db3cbd5c45
769
py
Python
python/tests/test_version.py
Sandbergo/ecole
2bab4d6a66e5d1932870f4cecbdc989b8fd17546
[ "BSD-3-Clause" ]
4
2021-10-17T00:26:12.000Z
2021-12-06T08:41:02.000Z
python/tests/test_version.py
Sandbergo/ecole
2bab4d6a66e5d1932870f4cecbdc989b8fd17546
[ "BSD-3-Clause" ]
null
null
null
python/tests/test_version.py
Sandbergo/ecole
2bab4d6a66e5d1932870f4cecbdc989b8fd17546
[ "BSD-3-Clause" ]
null
null
null
import ecole.core def test_version(): """Extract version of library and git revision.""" version = ecole.core.get_build_version() assert isinstance(version.major, int) assert isinstance(version.minor, int) assert isinstance(version.patch, int) assert isinstance(version.revision, str) asser...
33.434783
64
0.739922
import ecole.core def test_version(): version = ecole.core.get_build_version() assert isinstance(version.major, int) assert isinstance(version.minor, int) assert isinstance(version.patch, int) assert isinstance(version.revision, str) assert isinstance(version.build_type, str) assert isinst...
true
true
1c298c12910e2a405707f7ba2bfcd33cd79fc220
28,878
py
Python
weasyprint/layout/preferred.py
timgates42/WeasyPrint
e83d5b772be480f4694fca2cbd96b4170f16a5e2
[ "BSD-3-Clause" ]
null
null
null
weasyprint/layout/preferred.py
timgates42/WeasyPrint
e83d5b772be480f4694fca2cbd96b4170f16a5e2
[ "BSD-3-Clause" ]
null
null
null
weasyprint/layout/preferred.py
timgates42/WeasyPrint
e83d5b772be480f4694fca2cbd96b4170f16a5e2
[ "BSD-3-Clause" ]
null
null
null
""" weasyprint.layout.preferred --------------------------- Preferred and minimum preferred width, aka. max-content and min-content width, aka. the shrink-to-fit algorithm. Terms used (max-content width, min-content width) are defined in David Baron's unofficial draft (http://dbaron.org/css/in...
38.606952
79
0.609945
import sys from .. import text from ..formatting_structure import boxes from .replaced import default_image_sizing def shrink_to_fit(context, box, available_content_width): return min( max( min_content_width(context, box, outer=False), available_content_width), max_conten...
true
true
1c298d360707dacb92264afddbb9b8672df345c0
1,843
py
Python
progressive_photon_mapping.py
JuanAsensioAyesa/ProyectoCGEIM_2021
9025c23fa7e2429a9846dae1146fbbf6314685cb
[ "MIT" ]
null
null
null
progressive_photon_mapping.py
JuanAsensioAyesa/ProyectoCGEIM_2021
9025c23fa7e2429a9846dae1146fbbf6314685cb
[ "MIT" ]
null
null
null
progressive_photon_mapping.py
JuanAsensioAyesa/ProyectoCGEIM_2021
9025c23fa7e2429a9846dae1146fbbf6314685cb
[ "MIT" ]
null
null
null
import os import numpy import random import PIL from PIL import Image if __name__ == "__main__": lista = [10,15,20,25,30,35,40,50,100,200] lista = numpy.arange(100) for i in numpy.arange(len(lista)): command = "./bin/yscene render" out_file = "imagen_"+str(lista[i]) photons = str(lis...
36.137255
97
0.639718
import os import numpy import random import PIL from PIL import Image if __name__ == "__main__": lista = [10,15,20,25,30,35,40,50,100,200] lista = numpy.arange(100) for i in numpy.arange(len(lista)): command = "./bin/yscene render" out_file = "imagen_"+str(lista[i]) photons = str(lis...
true
true
1c298d3611feb3825af82f900779495baf80bb1c
448
py
Python
tests/pylon_tests/usb/pylonusbtestcase.py
matt-phair/pypylon
f81385a838ac0786f1a3f9b61db8eb4cdd2a905e
[ "BSD-3-Clause" ]
358
2018-05-03T15:09:08.000Z
2022-03-30T02:18:02.000Z
tests/pylon_tests/usb/pylonusbtestcase.py
matt-phair/pypylon
f81385a838ac0786f1a3f9b61db8eb4cdd2a905e
[ "BSD-3-Clause" ]
473
2018-05-01T14:55:20.000Z
2022-03-31T18:09:31.000Z
tests/pylon_tests/usb/pylonusbtestcase.py
matt-phair/pypylon
f81385a838ac0786f1a3f9b61db8eb4cdd2a905e
[ "BSD-3-Clause" ]
176
2018-07-05T20:16:05.000Z
2022-03-16T10:59:52.000Z
import unittest from pypylon import pylon def get_class_and_filter(): device_class = "BaslerUsb" di = pylon.DeviceInfo() di.SetDeviceClass(device_class) return device_class, [di] class PylonTestCase(unittest.TestCase): device_class, device_filter = get_class_and_filter() def create_first(self...
28
80
0.743304
import unittest from pypylon import pylon def get_class_and_filter(): device_class = "BaslerUsb" di = pylon.DeviceInfo() di.SetDeviceClass(device_class) return device_class, [di] class PylonTestCase(unittest.TestCase): device_class, device_filter = get_class_and_filter() def create_first(self...
true
true
1c298e1ed7034da734235be9d0228d22f012eff4
1,453
py
Python
harnessed_jobs/brighter_fatter_raft/v0/producer_brighter_fatter_raft.py
duncanwood/EO-analysis-jobs
26d22e49c0d2e32fbf2759f504048754f66ecc45
[ "BSD-3-Clause-LBNL" ]
2
2018-07-26T09:32:46.000Z
2019-05-28T20:57:43.000Z
harnessed_jobs/brighter_fatter_raft/v0/producer_brighter_fatter_raft.py
duncanwood/EO-analysis-jobs
26d22e49c0d2e32fbf2759f504048754f66ecc45
[ "BSD-3-Clause-LBNL" ]
3
2018-03-18T21:55:07.000Z
2019-04-18T18:26:06.000Z
harnessed_jobs/brighter_fatter_raft/v0/producer_brighter_fatter_raft.py
duncanwood/EO-analysis-jobs
26d22e49c0d2e32fbf2759f504048754f66ecc45
[ "BSD-3-Clause-LBNL" ]
2
2020-11-12T19:47:42.000Z
2022-02-25T21:43:03.000Z
#!/usr/bin/env ipython """ Producer script for raft-level brighter-fatter analysis. """ def run_bf_task(sensor_id): import lsst.eotest.sensor as sensorTest import siteUtils import eotestUtils file_prefix = '%s_%s' % (sensor_id, siteUtils.getRunNumber()) flat_files = siteUtils.dependency_glob('S*/%...
40.361111
98
0.615967
def run_bf_task(sensor_id): import lsst.eotest.sensor as sensorTest import siteUtils import eotestUtils file_prefix = '%s_%s' % (sensor_id, siteUtils.getRunNumber()) flat_files = siteUtils.dependency_glob('S*/%s_flat*flat1*.fits' % sensor_id, jobname=sit...
true
true
1c298e38e3af5c0c645daf10f8d86843107ee0a3
27,023
py
Python
dm/storage.py
DentonGentry/gfiber-catawampus
b01e4444f3c7f12b1af7837203b37060fd443bb7
[ "Apache-2.0" ]
2
2017-10-03T16:06:29.000Z
2020-09-08T13:03:13.000Z
dm/storage.py
DentonGentry/gfiber-catawampus
b01e4444f3c7f12b1af7837203b37060fd443bb7
[ "Apache-2.0" ]
null
null
null
dm/storage.py
DentonGentry/gfiber-catawampus
b01e4444f3c7f12b1af7837203b37060fd443bb7
[ "Apache-2.0" ]
1
2017-05-07T17:39:02.000Z
2017-05-07T17:39:02.000Z
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
35.186198
80
0.686896
# pylint:disable=invalid-name """Implementation of tr-140 Storage Services objects.""" __author__ = 'dgentry@google.com (Denton Gentry)' import ctypes import fcntl import os import os.path import re import subprocess import tr.core import tr.session import tr.cwmptypes import tr.basemodel CATASTORA...
false
true
1c298ea5cbbaeaf9667784c255bcf78b3f0210c1
1,275
py
Python
visualization.py
ronen85/causal_inference_project
aa2688ba0629f9984aa714fe07e9c319228bb461
[ "MIT" ]
null
null
null
visualization.py
ronen85/causal_inference_project
aa2688ba0629f9984aa714fe07e9c319228bb461
[ "MIT" ]
null
null
null
visualization.py
ronen85/causal_inference_project
aa2688ba0629f9984aa714fe07e9c319228bb461
[ "MIT" ]
null
null
null
from collections import defaultdict from matplotlib.pylab import plt from matplotlib import pyplot as mp from utilities import * def bar_graph(category, age_grp, sex, x, y, year=None, country=None): plt.figure() plt.ylabel('ATE = Y1 - Y0') plt.xlabel('Years') plt.bar(range(len(x)), x, align='center')...
37.5
103
0.569412
from collections import defaultdict from matplotlib.pylab import plt from matplotlib import pyplot as mp from utilities import * def bar_graph(category, age_grp, sex, x, y, year=None, country=None): plt.figure() plt.ylabel('ATE = Y1 - Y0') plt.xlabel('Years') plt.bar(range(len(x)), x, align='center')...
true
true
1c298ff0d0f9642f654e81d4f06c943f20972b04
1,033
py
Python
setup.py
jelmer04/Keypad
dfaeeb093e3c185a9874eb7c67b9b52d1c8bece7
[ "BSD-3-Clause" ]
null
null
null
setup.py
jelmer04/Keypad
dfaeeb093e3c185a9874eb7c67b9b52d1c8bece7
[ "BSD-3-Clause" ]
null
null
null
setup.py
jelmer04/Keypad
dfaeeb093e3c185a9874eb7c67b9b52d1c8bece7
[ "BSD-3-Clause" ]
null
null
null
# -- coding: utf-8 -- """ This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup, find_packages import os APP = ['keypad.py'] APP_NAME = "Keypad" VERSION = "0.0.1" DATA_FILES = [(d, [os.path.join(d,f) for f in files]) for d, folders, files in os.walk...
22.456522
87
0.637948
from setuptools import setup, find_packages import os APP = ['keypad.py'] APP_NAME = "Keypad" VERSION = "0.0.1" DATA_FILES = [(d, [os.path.join(d,f) for f in files]) for d, folders, files in os.walk('./share')] OPTIONS = { 'iconfile': './share/Keypad.icns', 'plist': { 'LSUIElement': True, ...
true
true
1c29906b5e34d62b7c9535e0adb73fe2ed01f429
152,554
py
Python
modules/s3db/setup.py
AlexanderLaughlin/eden
8f7bc2dfd2fe221fc98b0b80d67f796d66a3673c
[ "MIT" ]
null
null
null
modules/s3db/setup.py
AlexanderLaughlin/eden
8f7bc2dfd2fe221fc98b0b80d67f796d66a3673c
[ "MIT" ]
null
null
null
modules/s3db/setup.py
AlexanderLaughlin/eden
8f7bc2dfd2fe221fc98b0b80d67f796d66a3673c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Sahana Eden Setup Model: * Installation of a Deployment * Configuration of a Deployment * Managing a Deployment (Start/Stop/Clean instances) * Monitoring of a Deployment * Upgrading a Deployment (tbc) @copyright: 2015-2020 (c) Sahana Software Fou...
42.107094
293
0.412687
__all__ = ("S3DNSModel", "S3GandiDNSModel", "S3CloudModel", "S3AWSCloudModel", "S3SetupModel", "S3SetupMonitorModel", "setup_monitor_run_task", "setup_monitor_check_email_reply", "setup_instanc...
true
true
1c2991d3f0a79cfaadaa0c1916b558f0f3f38958
7,943
py
Python
docs/conf.py
alexanderkell/clicSAND-converter
e3317521679a23835ffd5bbf4690fe6d750ddf5f
[ "FTL" ]
null
null
null
docs/conf.py
alexanderkell/clicSAND-converter
e3317521679a23835ffd5bbf4690fe6d750ddf5f
[ "FTL" ]
null
null
null
docs/conf.py
alexanderkell/clicSAND-converter
e3317521679a23835ffd5bbf4690fe6d750ddf5f
[ "FTL" ]
null
null
null
# -*- coding: utf-8 -*- # # clicSAND-converter documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration va...
32.420408
115
0.709304
import os import sys extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'clicSAND-converter' # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '0.1...
true
true
1c299277b6e4bc2e8f32eaa6cd05e0ffb0851156
8,050
py
Python
nova/tests/cells/test_cells_state_manager.py
bopopescu/nova-master
58809056f3a219c6ea3667003f906eeaf581fa95
[ "Apache-2.0" ]
3
2015-06-01T18:32:50.000Z
2015-11-05T01:07:01.000Z
nova/tests/cells/test_cells_state_manager.py
bopopescu/nova-master
58809056f3a219c6ea3667003f906eeaf581fa95
[ "Apache-2.0" ]
null
null
null
nova/tests/cells/test_cells_state_manager.py
bopopescu/nova-master
58809056f3a219c6ea3667003f906eeaf581fa95
[ "Apache-2.0" ]
1
2020-07-24T06:01:37.000Z
2020-07-24T06:01:37.000Z
# Copyright (c) 2013 Rackspace Hosting # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
36.261261
78
0.640373
from oslo.config import cfg from nova.cells import state from nova import db from nova.db.sqlalchemy import models from nova import exception from nova import test FAKE_COMPUTES = [ ('host1', 1024, 100, 0, 0), ('host2', 1024, 100, -1, -1), ('host3', 1024, 100, 1024, 100), ('host4', 102...
true
true
1c29927f2a163f6afabb855ee2870ef00283ca48
22,491
py
Python
functions/POM_build.py
NavarreCML/National-EAT-Lancet-Diets
d61ffb59829a64d1bfca3f43e593e656d4543f33
[ "MIT" ]
null
null
null
functions/POM_build.py
NavarreCML/National-EAT-Lancet-Diets
d61ffb59829a64d1bfca3f43e593e656d4543f33
[ "MIT" ]
null
null
null
functions/POM_build.py
NavarreCML/National-EAT-Lancet-Diets
d61ffb59829a64d1bfca3f43e593e656d4543f33
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from functions import fao_regions as regions data = 'data/' def data_build(crop_proxie, diet_div_crop, diet_source_crop, diet_ls_only, diet_ls_only_source, min_waste): """*** Import of country data to build national diets ***""" WPR_height = pd.read_csv(r"data/worldpopu...
62.301939
347
0.640834
import pandas as pd import numpy as np from functions import fao_regions as regions data = 'data/' def data_build(crop_proxie, diet_div_crop, diet_source_crop, diet_ls_only, diet_ls_only_source, min_waste): WPR_height = pd.read_csv(r"data/worldpopulationreview_height_data.csv") WPR_height.loc[WPR_height.Area...
true
true
1c29928991cde82eed3e30826fceb5681c4d7617
11,627
py
Python
pandas/tests/io/pytables/test_timezones.py
treuherz/pandas
a313f7ff5c003bc14fa36714d41c9842209b4e6a
[ "BSD-3-Clause" ]
1
2020-08-18T16:49:16.000Z
2020-08-18T16:49:16.000Z
pandas/tests/io/pytables/test_timezones.py
treuherz/pandas
a313f7ff5c003bc14fa36714d41c9842209b4e6a
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/io/pytables/test_timezones.py
treuherz/pandas
a313f7ff5c003bc14fa36714d41c9842209b4e6a
[ "BSD-3-Clause" ]
2
2021-07-17T19:28:31.000Z
2021-11-28T17:14:58.000Z
import datetime import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import DataFrame, DatetimeIndex, Series, Timestamp, date_range import pandas._testing as tm from pandas.tests.io.pytables.common import ( _maybe_remove, ensure_clean_path, ensure_cle...
30.840849
88
0.572117
import datetime import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import DataFrame, DatetimeIndex, Series, Timestamp, date_range import pandas._testing as tm from pandas.tests.io.pytables.common import ( _maybe_remove, ensure_clean_path, ensure_cle...
true
true
1c2994ee14db8c7dd8b9c0113116f15720b1ab35
20
py
Python
checkov/version.py
nimrodkor/checkov
d0bda627bb43f5e79042c716fdd0f3bd3380424e
[ "Apache-2.0" ]
3
2021-04-19T17:17:21.000Z
2021-09-06T06:31:09.000Z
checkov/version.py
nimrodkor/checkov
d0bda627bb43f5e79042c716fdd0f3bd3380424e
[ "Apache-2.0" ]
16
2021-03-09T07:38:38.000Z
2021-06-09T03:53:55.000Z
checkov/version.py
nimrodkor/checkov
d0bda627bb43f5e79042c716fdd0f3bd3380424e
[ "Apache-2.0" ]
1
2022-01-06T08:04:56.000Z
2022-01-06T08:04:56.000Z
version = '1.0.970'
10
19
0.6
version = '1.0.970'
true
true
1c29963351aaea34198a32be654d524111ad3472
600
py
Python
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLSC2/OES/rgb8_rgba8.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLSC2/OES/rgb8_rgba8.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLSC2/OES/rgb8_rgba8.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLSC2 import _types as _cs # End users want this... from OpenGL.raw.GLSC2._types import * from OpenGL.raw.GLSC2 import _errors from OpenGL.constant import Constant as _C ...
35.294118
118
0.778333
from OpenGL import platform as _p, arrays from OpenGL.raw.GLSC2 import _types as _cs from OpenGL.raw.GLSC2._types import * from OpenGL.raw.GLSC2 import _errors from OpenGL.constant import Constant as _C import ctypes _EXTENSION_NAME = 'GLSC2_OES_rgb8_rgba8' def _f( function ): return _p.createFunction( ...
true
true
1c29967c7d005bd697fee672e61c97d395ef220b
1,137
py
Python
blog/migrations/0003_blogpagegalleryimage.py
jtmolon/homepage
878b9f4a564953c344a348fb63dc1ee679e3a835
[ "MIT" ]
null
null
null
blog/migrations/0003_blogpagegalleryimage.py
jtmolon/homepage
878b9f4a564953c344a348fb63dc1ee679e3a835
[ "MIT" ]
null
null
null
blog/migrations/0003_blogpagegalleryimage.py
jtmolon/homepage
878b9f4a564953c344a348fb63dc1ee679e3a835
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-10-14 20:46 from django.db import migrations, models import django.db.models.deletion import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0022_uploadedimage'), ('blog', '0002_blogpage'), ] operations =...
36.677419
154
0.608619
from django.db import migrations, models import django.db.models.deletion import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0022_uploadedimage'), ('blog', '0002_blogpage'), ] operations = [ migrations.CreateModel( ...
true
true
1c299824e6ae403d08e851a546ace18cdbb6ae12
5,101
py
Python
tests/integration/conftest.py
jain-prerna/salt-ext-modules-vmware-old
89ea6dd77c6d5a35dc55c23adbdc361949a63057
[ "Apache-2.0" ]
null
null
null
tests/integration/conftest.py
jain-prerna/salt-ext-modules-vmware-old
89ea6dd77c6d5a35dc55c23adbdc361949a63057
[ "Apache-2.0" ]
null
null
null
tests/integration/conftest.py
jain-prerna/salt-ext-modules-vmware-old
89ea6dd77c6d5a35dc55c23adbdc361949a63057
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 import json import os import ssl import uuid from collections import namedtuple from configparser import ConfigParser from pathlib import Path import pytest import saltext.vmware.modules.cluster as cluster_mod import saltext.vmware.modules.cluster_drs...
27.572973
92
0.693786
import json import os import ssl import uuid from collections import namedtuple from configparser import ConfigParser from pathlib import Path import pytest import saltext.vmware.modules.cluster as cluster_mod import saltext.vmware.modules.cluster_drs as cluster_drs_mod import saltext.vmware.modules.cluster_ha as cl...
true
true
1c299861369b549140418ab13bfd2f28ff620532
5,869
py
Python
g2base/remoteObjects/ro_test.py
naojsoft/g2cam
4f01cdccae7978d5c16af59a90ff7459ed6c2997
[ "BSD-3-Clause" ]
null
null
null
g2base/remoteObjects/ro_test.py
naojsoft/g2cam
4f01cdccae7978d5c16af59a90ff7459ed6c2997
[ "BSD-3-Clause" ]
null
null
null
g2base/remoteObjects/ro_test.py
naojsoft/g2cam
4f01cdccae7978d5c16af59a90ff7459ed6c2997
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # # Remote objects tests # from __future__ import print_function import sys, time import logging from g2base import Task, ssdlog from g2base.remoteObjects import remoteObjects as ro class TestRO(ro.remoteObjectServer): def __init__(self, options, logger, threadPool, threaded=True, ...
32.787709
75
0.54643
from __future__ import print_function import sys, time import logging from g2base import Task, ssdlog from g2base.remoteObjects import remoteObjects as ro class TestRO(ro.remoteObjectServer): def __init__(self, options, logger, threadPool, threaded=True, usethread=False): authDict =...
true
true
1c2999438d249cae19d9039c2c4d679652a5ede4
175
py
Python
Classes/Logic/LogicStringUtil.py
AkulaBs/BSDS-Server-V42
2cf195f87838d8ad96b1852b367d39fd7e06b276
[ "Apache-2.0" ]
19
2021-12-23T19:15:09.000Z
2022-03-03T12:40:33.000Z
Classes/Logic/LogicStringUtil.py
KulerDev/BSDS-V42
80d78c9a6e7ac57121fca6a3a404e630f2792603
[ "Apache-2.0" ]
12
2021-12-23T19:16:31.000Z
2022-03-04T08:58:18.000Z
Classes/Logic/LogicStringUtil.py
KulerDev/BSDS-V42
80d78c9a6e7ac57121fca6a3a404e630f2792603
[ "Apache-2.0" ]
13
2021-12-24T10:00:11.000Z
2022-03-14T02:03:54.000Z
class LogicStringUtil: @staticmethod def getBytes(string): return string.encode() @staticmethod def getByteLength(string): return len(string)
19.444444
30
0.662857
class LogicStringUtil: @staticmethod def getBytes(string): return string.encode() @staticmethod def getByteLength(string): return len(string)
true
true
1c299a1b5dd99565592f0ab5133c590293a75a7f
1,112
py
Python
tests/serial_mock.py
Jakeler/ut61e-pygatt
7554951e02687fee0b9ea2b5c9a1f9b6901a1042
[ "Apache-2.0" ]
null
null
null
tests/serial_mock.py
Jakeler/ut61e-pygatt
7554951e02687fee0b9ea2b5c9a1f9b6901a1042
[ "Apache-2.0" ]
null
null
null
tests/serial_mock.py
Jakeler/ut61e-pygatt
7554951e02687fee0b9ea2b5c9a1f9b6901a1042
[ "Apache-2.0" ]
null
null
null
import Queue class SerialMock(object): """ Spoof a serial.Serial object. """ def __init__(self, port, timeout): self._isOpen = True self._port = port self._timeout = timeout self._output_queue = Queue.Queue() self._active_packet = None self._expected_inp...
27.121951
80
0.591727
import Queue class SerialMock(object): def __init__(self, port, timeout): self._isOpen = True self._port = port self._timeout = timeout self._output_queue = Queue.Queue() self._active_packet = None self._expected_input_queue = Queue.Queue() def open(self): ...
true
true
1c299afa3a95b6c7978a060616773c0cf101e5c7
3,158
py
Python
redisbench_admin/run_remote/standalone.py
RedisLabsModules/redisbench-admin
d8573d3414e5e846411d2875555deca5c8a7d0f1
[ "Apache-2.0" ]
5
2021-08-03T12:38:30.000Z
2022-03-23T07:35:38.000Z
redisbench_admin/run_remote/standalone.py
RedisLabsModules/redisbench-admin
d8573d3414e5e846411d2875555deca5c8a7d0f1
[ "Apache-2.0" ]
91
2021-03-17T12:05:35.000Z
2022-03-29T22:20:00.000Z
redisbench_admin/run_remote/standalone.py
filipecosta90/redisbench-admin
d00ac6834c22f17f82bd8fba55d14a989e41ad2b
[ "Apache-2.0" ]
2
2021-06-07T14:06:58.000Z
2021-07-27T10:37:15.000Z
# BSD 3-Clause License # # Copyright (c) 2021., Redis Labs Modules # All rights reserved. # # import logging import os from redisbench_admin.utils.remote import ( copy_file_to_remote_setup, execute_remote_commands, ) from redisbench_admin.utils.ssh import SSHSession def spin_up_standalone_remote_redis( ...
30.07619
114
0.652312
import logging import os from redisbench_admin.utils.remote import ( copy_file_to_remote_setup, execute_remote_commands, ) from redisbench_admin.utils.ssh import SSHSession def spin_up_standalone_remote_redis( temporary_dir, server_public_ip, username, private_key, remote_module_fil...
true
true
1c299b2b0e8e9844eaea8749d2b95f3dbaaf7cf5
11,827
py
Python
conans/test/integration/system_reqs_test.py
Ignition/conan
84a38590987ecb9f3011f73babc95598ea62535f
[ "MIT" ]
null
null
null
conans/test/integration/system_reqs_test.py
Ignition/conan
84a38590987ecb9f3011f73babc95598ea62535f
[ "MIT" ]
null
null
null
conans/test/integration/system_reqs_test.py
Ignition/conan
84a38590987ecb9f3011f73babc95598ea62535f
[ "MIT" ]
null
null
null
import os import stat import unittest import six from conans.model.ref import ConanFileReference, PackageReference from conans.test.utils.tools import NO_SETTINGS_PACKAGE_ID, TestClient from conans.util.files import load base_conanfile = ''' from conans import ConanFile class TestSystemReqs(ConanFile): name = "...
46.93254
106
0.668555
import os import stat import unittest import six from conans.model.ref import ConanFileReference, PackageReference from conans.test.utils.tools import NO_SETTINGS_PACKAGE_ID, TestClient from conans.util.files import load base_conanfile = ''' from conans import ConanFile class TestSystemReqs(ConanFile): name = "...
true
true
1c299ba00aa6a8de3074014fd36a1c53722f5725
77,744
py
Python
dreamcoder/grammar.py
Dragon-hxl/LARC
c9f13f110a56aa2ecf837e464745375d9521409e
[ "MIT" ]
null
null
null
dreamcoder/grammar.py
Dragon-hxl/LARC
c9f13f110a56aa2ecf837e464745375d9521409e
[ "MIT" ]
2
2022-03-30T15:20:31.000Z
2022-03-30T17:38:33.000Z
dreamcoder/grammar.py
mlb2251/stitch_dreamcoder
e13295d7217b621e6e2691b57cd58c88cded5830
[ "MIT" ]
null
null
null
from frozendict import frozendict from collections import defaultdict from dreamcoder.frontier import * from dreamcoder.program import * from dreamcoder.type import * from dreamcoder.utilities import * import time import itertools class GrammarFailure(Exception): pass class SketchEnumerationFailure(Exception):...
44.047592
158
0.503885
from frozendict import frozendict from collections import defaultdict from dreamcoder.frontier import * from dreamcoder.program import * from dreamcoder.type import * from dreamcoder.utilities import * import time import itertools class GrammarFailure(Exception): pass class SketchEnumerationFailure(Exception):...
true
true
1c299dc88a574f6ab92752535ea4a9c73398245b
6,289
py
Python
src/Application/PythonScriptModule/pymodules_old/lib/qp_xml.py
antont/tundra
5c9b0a3957071f08ab425dff701cdbb34f9e1868
[ "Apache-2.0" ]
1
2018-04-02T15:38:10.000Z
2018-04-02T15:38:10.000Z
src/Application/PythonScriptModule/pymodules_old/lib/qp_xml.py
antont/tundra
5c9b0a3957071f08ab425dff701cdbb34f9e1868
[ "Apache-2.0" ]
null
null
null
src/Application/PythonScriptModule/pymodules_old/lib/qp_xml.py
antont/tundra
5c9b0a3957071f08ab425dff701cdbb34f9e1868
[ "Apache-2.0" ]
1
2021-09-04T12:37:34.000Z
2021-09-04T12:37:34.000Z
# pylint: disable-msg=W0311,E1101,E1103,W0201,C0103,W0622,W0402,W0706,R0911,W0613,W0612,R0912,W0141,C0111,C0121 # qp_xml: Quick Parsing for XML # # Written by Greg Stein. Public Domain. # No Copyright, no Rights Reserved, and no Warranties. # # This module is maintained by Greg and is available as part of the XML-SIG ...
25.77459
111
0.62506
# http://www.lyra.org/greg/python/ # # This module was added to the XML-SIG distribution on February 14, 2000. # As part of that distribution, it falls under the XML distribution license. # import string try: import pyexpat except ImportError: from xml.parsers import pyexpat error = __name__ + '.e...
false
true
1c299e68803173d5b84ddcf180e0f41fd5946d7a
9,726
py
Python
homeassistant/components/elkm1/alarm_control_panel.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
6
2020-07-18T16:33:25.000Z
2021-09-26T09:52:04.000Z
homeassistant/components/elkm1/alarm_control_panel.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
47
2020-07-23T07:13:11.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/elkm1/alarm_control_panel.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
5
2020-03-29T00:29:13.000Z
2021-09-06T20:58:40.000Z
"""Each ElkM1 area will be created as a separate alarm_control_panel.""" import logging from elkm1_lib.const import AlarmState, ArmedStatus, ArmLevel, ArmUpState from elkm1_lib.util import username import voluptuous as vol from homeassistant.components.alarm_control_panel import ( ATTR_CHANGED_BY, FORMAT_NUMB...
36.022222
88
0.683117
import logging from elkm1_lib.const import AlarmState, ArmedStatus, ArmLevel, ArmUpState from elkm1_lib.util import username import voluptuous as vol from homeassistant.components.alarm_control_panel import ( ATTR_CHANGED_BY, FORMAT_NUMBER, AlarmControlPanelEntity, ) from homeassistant.components.alarm_co...
true
true
1c299f9f94e7677c50320107cbf4ba63465973ae
2,955
py
Python
django_stubs_ext/django_stubs_ext/patch.py
TypedDjango/django-stubs
644052148aec0114daf3d75a18f9bab48057ff17
[ "MIT" ]
35
2018-07-30T13:59:12.000Z
2019-04-10T11:13:30.000Z
django_stubs_ext/django_stubs_ext/patch.py
TypedDjango/django-stubs
644052148aec0114daf3d75a18f9bab48057ff17
[ "MIT" ]
12
2018-07-30T13:42:26.000Z
2019-01-24T18:08:13.000Z
django_stubs_ext/django_stubs_ext/patch.py
TypedDjango/django-stubs
644052148aec0114daf3d75a18f9bab48057ff17
[ "MIT" ]
1
2018-11-01T22:59:56.000Z
2018-11-01T22:59:56.000Z
from typing import Any, Generic, Iterable, List, Optional, Tuple, Type, TypeVar from django import VERSION as VERSION from django.contrib.admin import ModelAdmin from django.contrib.admin.options import BaseModelAdmin from django.contrib.syndication.views import Feed from django.core.paginator import Paginator from dj...
37.405063
111
0.734349
from typing import Any, Generic, Iterable, List, Optional, Tuple, Type, TypeVar from django import VERSION as VERSION from django.contrib.admin import ModelAdmin from django.contrib.admin.options import BaseModelAdmin from django.contrib.syndication.views import Feed from django.core.paginator import Paginator from dj...
true
true
1c29a024663a7767d1adc11c7eda326e8025770d
19,513
py
Python
tests/api/test_checkout.py
rohan3107/saleor
357489a74dec1a6e0f4ee2fd55290c67285e4f85
[ "BSD-3-Clause" ]
null
null
null
tests/api/test_checkout.py
rohan3107/saleor
357489a74dec1a6e0f4ee2fd55290c67285e4f85
[ "BSD-3-Clause" ]
3
2020-02-11T23:51:31.000Z
2022-02-10T22:42:12.000Z
tests/api/test_checkout.py
anonyo/henna-products-ecomerce
4b25bac38fd483e75e632ecf5c1cbdc1be2216fa
[ "BSD-3-Clause" ]
null
null
null
import uuid from unittest.mock import patch, ANY import graphene import pytest from tests.api.utils import get_graphql_content from saleor.checkout.models import Cart from saleor.order.models import Order def test_checkout_create(user_api_client, variant, graphql_address_data): """Create checkout object using G...
32.905565
99
0.61067
import uuid from unittest.mock import patch, ANY import graphene import pytest from tests.api.utils import get_graphql_content from saleor.checkout.models import Cart from saleor.order.models import Order def test_checkout_create(user_api_client, variant, graphql_address_data): query = """ mutation createCh...
true
true
1c29a15af1fb4394a7ead680d69cc2406f921ba4
5,634
py
Python
rpython/translator/translator.py
SeraphRoy/PyPy-Functional
e825dce7f7c484fa666566974a93ed5d59fb73be
[ "Apache-2.0", "OpenSSL" ]
4
2019-02-11T06:58:43.000Z
2020-03-15T14:12:32.000Z
rpython/translator/translator.py
murtyjones/kiwi-pypy
1419c7de61a11b2d29602b25506cb3b4f225996e
[ "Apache-2.0", "OpenSSL" ]
null
null
null
rpython/translator/translator.py
murtyjones/kiwi-pypy
1419c7de61a11b2d29602b25506cb3b4f225996e
[ "Apache-2.0", "OpenSSL" ]
null
null
null
"""PyPy Translator Frontend The Translator is a glue class putting together the various pieces of the translation-related code. It can be used for interactive testing of the translator; see pypy/bin/translatorshell.py. """ import sys import types from rpython.translator import simplify from rpython.flowspace.model i...
37.311258
88
0.642705
import sys import types from rpython.translator import simplify from rpython.flowspace.model import FunctionGraph, checkgraph, Block from rpython.flowspace.objspace import build_flow from rpython.tool.ansi_print import AnsiLogger from rpython.tool.sourcetools import nice_repr_for_func from rpython.config.translationop...
true
true
1c29a1a658dfd9ccc64ac33c1dc70d16ea8d30a3
888
py
Python
tools/leetcode.116.Populating Next Right Pointers in Each Node/leetcode.116.Populating Next Right Pointers in Each Node.submission5.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
4
2015-10-10T00:30:55.000Z
2020-07-27T19:45:54.000Z
tools/leetcode.116.Populating Next Right Pointers in Each Node/leetcode.116.Populating Next Right Pointers in Each Node.submission5.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
null
null
null
tools/leetcode.116.Populating Next Right Pointers in Each Node/leetcode.116.Populating Next Right Pointers in Each Node.submission5.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
null
null
null
# Definition for a binary tree node # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None # self.next = None class Solution: # @param root, a tree node # @return nothing def connect(self, root): if root == None: return ...
888
888
0.509009
true
true
1c29a1c796b3dfb415363109c8df2ef9a828f833
1,337
py
Python
lenstronomy/LightModel/Profiles/nie.py
franyancr/lenstronomy
3a7b33512a474bf1796d23276d9028b580580cf1
[ "MIT" ]
1
2018-11-08T12:33:26.000Z
2018-11-08T12:33:26.000Z
lenstronomy/LightModel/Profiles/nie.py
franyancr/lenstronomy
3a7b33512a474bf1796d23276d9028b580580cf1
[ "MIT" ]
null
null
null
lenstronomy/LightModel/Profiles/nie.py
franyancr/lenstronomy
3a7b33512a474bf1796d23276d9028b580580cf1
[ "MIT" ]
1
2019-06-25T18:55:26.000Z
2019-06-25T18:55:26.000Z
import numpy as np import lenstronomy.Util.util as util import lenstronomy.Util.param_util as param_util class NIE(object): """ non-divergent isothermal ellipse (projected) """ param_names = ['amp', 'e1', 'e2', 's_scale', 'center_x', 'center_y'] lower_limit_default = {'amp': 0, 'e1': -0.5, 'e2': -...
27.854167
110
0.525804
import numpy as np import lenstronomy.Util.util as util import lenstronomy.Util.param_util as param_util class NIE(object): param_names = ['amp', 'e1', 'e2', 's_scale', 'center_x', 'center_y'] lower_limit_default = {'amp': 0, 'e1': -0.5, 'e2': -0.5, 's_scale': 0, 'center_x': -100, 'center_y': -100} upper_...
true
true
1c29a21da72c705cd441ea30b81dee9268add44c
1,585
py
Python
tests/unit/test_workspace.py
xolynrac/examen_final_4c
dfa19b44fee6a17b7efc5630f1c8580aabc549e9
[ "Apache-2.0" ]
47
2020-04-26T20:00:03.000Z
2022-02-19T14:32:04.000Z
tests/unit/test_workspace.py
xolynrac/examen_final_4c
dfa19b44fee6a17b7efc5630f1c8580aabc549e9
[ "Apache-2.0" ]
84
2020-05-25T14:49:21.000Z
2022-01-26T01:55:04.000Z
tests/unit/test_workspace.py
xolynrac/examen_final_4c
dfa19b44fee6a17b7efc5630f1c8580aabc549e9
[ "Apache-2.0" ]
14
2020-07-01T11:03:25.000Z
2022-01-11T06:37:31.000Z
# Copyright (c) 2020, Moritz E. Beber. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
29.90566
74
0.683281
import pytest from structurizr.workspace import Workspace, WorkspaceIO @pytest.mark.parametrize( "attributes", [ {}, {"id": 42, "name": "Marvin", "description": "depressed robot"}, ], ) def test_workspace_io_init(attributes: dict): workspace = WorkspaceIO(**attributes...
true
true
1c29a3f5ce6bfda98e3d9b96c329a0d569e85ab9
13,264
py
Python
spacy_ann/ann_kb.py
r-b-g-b/spacy-ann-linker
3a625052686fc745fa1508c238fc68a5c7f50053
[ "MIT" ]
65
2020-02-09T07:08:25.000Z
2022-03-28T03:27:30.000Z
spacy_ann/ann_kb.py
r-b-g-b/spacy-ann-linker
3a625052686fc745fa1508c238fc68a5c7f50053
[ "MIT" ]
12
2020-05-22T15:45:20.000Z
2022-01-27T16:44:57.000Z
spacy_ann/ann_kb.py
r-b-g-b/spacy-ann-linker
3a625052686fc745fa1508c238fc68a5c7f50053
[ "MIT" ]
22
2020-05-06T11:30:32.000Z
2021-11-10T08:17:32.000Z
from pathlib import Path from timeit import default_timer as timer from typing import List, Set, Tuple import joblib import nmslib import numpy as np import scipy import srsly from nmslib.dist import FloatIndex from sklearn.feature_extraction.text import TfidfVectorizer from spacy.kb import KnowledgeBase from spacy.ut...
40.562691
114
0.652518
from pathlib import Path from timeit import default_timer as timer from typing import List, Set, Tuple import joblib import nmslib import numpy as np import scipy import srsly from nmslib.dist import FloatIndex from sklearn.feature_extraction.text import TfidfVectorizer from spacy.kb import KnowledgeBase from spacy.ut...
true
true
1c29a40cfe35e44d0a8c53edae63ec34dbd49a77
2,300
py
Python
chrono/parsers/en/month_name_middle_endian.py
OmniInc/chrono-python
9f3f36cb8c98e15014252bc5dd16e5e6f20cbed6
[ "MIT" ]
1
2022-01-30T16:20:33.000Z
2022-01-30T16:20:33.000Z
chrono/parsers/en/month_name_middle_endian.py
OmniInc/chrono-python
9f3f36cb8c98e15014252bc5dd16e5e6f20cbed6
[ "MIT" ]
null
null
null
chrono/parsers/en/month_name_middle_endian.py
OmniInc/chrono-python
9f3f36cb8c98e15014252bc5dd16e5e6f20cbed6
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf8 -*- import re from ..parser import Parser from ..parser import ParsedResult from ..parser import ParsedComponent from datetime import datetime from .util import month_index from .util import date_exist from .util import find_closest_year FULL_PATTERN = "(\W|^)((Sunday|Monday...
37.096774
353
0.621304
import re from ..parser import Parser from ..parser import ParsedResult from ..parser import ParsedComponent from datetime import datetime from .util import month_index from .util import date_exist from .util import find_closest_year FULL_PATTERN = "(\W|^)((Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday...
true
true
1c29a46678a9a2220dc9a4075839dde2d16879ff
2,065
py
Python
src/MediaPlayer/Util/Network.py
JKorf/MediaPi
4b21bb9cfa692534d0098ad947dd99beb7b0c1ed
[ "MIT" ]
2
2018-02-26T15:57:04.000Z
2019-03-11T15:21:38.000Z
src/MediaPlayer/Util/Network.py
JKorf/MediaPi
4b21bb9cfa692534d0098ad947dd99beb7b0c1ed
[ "MIT" ]
1
2018-07-25T16:36:11.000Z
2018-07-25T16:36:11.000Z
src/MediaPlayer/Util/Network.py
JKorf/MediaPi
4b21bb9cfa692534d0098ad947dd99beb7b0c1ed
[ "MIT" ]
null
null
null
import struct def write_short(buffer, short, offset): struct.pack_into('!h', buffer, offset, short) offset += 2 return offset def write_int(buffer, integer, offset): struct.pack_into('!i', buffer, offset, integer) offset += 4 return offset def write_long(buffer, long, offset): struct.p...
21.071429
55
0.661985
import struct def write_short(buffer, short, offset): struct.pack_into('!h', buffer, offset, short) offset += 2 return offset def write_int(buffer, integer, offset): struct.pack_into('!i', buffer, offset, integer) offset += 4 return offset def write_long(buffer, long, offset): struct.p...
true
true
1c29a515ce6367d4b3ebbfec790eaa302081fe15
365
py
Python
blinkatest.py
Lusorede/lr-hr-cr
fa4244517db2c778d3f09762599007be26b88f3c
[ "MIT" ]
null
null
null
blinkatest.py
Lusorede/lr-hr-cr
fa4244517db2c778d3f09762599007be26b88f3c
[ "MIT" ]
null
null
null
blinkatest.py
Lusorede/lr-hr-cr
fa4244517db2c778d3f09762599007be26b88f3c
[ "MIT" ]
null
null
null
import board import digitalio import busio print("Hello blinka!") # Try to great a Digital input pin = digitalio.DigitalInOut(board.D18) print("Digital IO ok!") # Try to create an I2C device i2c = busio.I2C(board.SCL, board.SDA) print("I2C ok!") # Try to create an SPI device spi = busio.SPI(board.SCLK, board.MOSI, ...
18.25
51
0.717808
import board import digitalio import busio print("Hello blinka!") pin = digitalio.DigitalInOut(board.D18) print("Digital IO ok!") i2c = busio.I2C(board.SCL, board.SDA) print("I2C ok!") spi = busio.SPI(board.SCLK, board.MOSI, board.MISO) print("SPI ok!") print("done!")
true
true
1c29a7ea883312dbb58d06302a94b543acdbdfea
2,557
py
Python
predict_with_lstm.py
reo11/aes-for-japanese-learner
a2a400cf651b6ce967db8c1e1b72d08bfc44d280
[ "MIT" ]
1
2020-05-01T03:36:49.000Z
2020-05-01T03:36:49.000Z
predict_with_lstm.py
reo11/aes-for-japanese-learner
a2a400cf651b6ce967db8c1e1b72d08bfc44d280
[ "MIT" ]
9
2020-01-28T22:21:05.000Z
2022-02-10T00:23:18.000Z
predict_with_lstm.py
reo11/aes-for-japanese-learner
a2a400cf651b6ce967db8c1e1b72d08bfc44d280
[ "MIT" ]
null
null
null
from src.lstm import LSTM from src.attention import Attention from src.regressor import AttnRegressor from src.make_data import DataGenerator from src.optimize import OptimizedRounder import pandas as pd import numpy as np import warnings import os import argparse import joblib import pickle import torch from torch.uti...
34.093333
112
0.658193
from src.lstm import LSTM from src.attention import Attention from src.regressor import AttnRegressor from src.make_data import DataGenerator from src.optimize import OptimizedRounder import pandas as pd import numpy as np import warnings import os import argparse import joblib import pickle import torch from torch.uti...
true
true
1c29ab0376d0a55dfe28d5bc4156b498f7fa9615
3,143
py
Python
phonenumber_field/modelfields.py
hwkns/django-phonenumber-field
197d9f3a6d118321f3513f7095747d086fa9bce6
[ "MIT" ]
null
null
null
phonenumber_field/modelfields.py
hwkns/django-phonenumber-field
197d9f3a6d118321f3513f7095747d086fa9bce6
[ "MIT" ]
null
null
null
phonenumber_field/modelfields.py
hwkns/django-phonenumber-field
197d9f3a6d118321f3513f7095747d086fa9bce6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.conf import settings from django.core import validators from django.db import models from django.utils.translation import ugettext_lazy as _ from .validators import validate_international_phonenumber from .phonenumber import ...
31.118812
78
0.652561
from __future__ import unicode_literals, absolute_import from django.conf import settings from django.core import validators from django.db import models from django.utils.translation import ugettext_lazy as _ from .validators import validate_international_phonenumber from .phonenumber import PhoneNumber, to_python,...
true
true
1c29ab428d573c8fe2979d6c5359ee7ff1d4f27e
6,179
py
Python
curvefit/test/text_test.py
eerkela/CurveFit
4c25a196860cc62900618ea01dd59b903edbfc8d
[ "MIT" ]
null
null
null
curvefit/test/text_test.py
eerkela/CurveFit
4c25a196860cc62900618ea01dd59b903edbfc8d
[ "MIT" ]
null
null
null
curvefit/test/text_test.py
eerkela/CurveFit
4c25a196860cc62900618ea01dd59b903edbfc8d
[ "MIT" ]
null
null
null
from functools import partial import unittest import numpy as np from matplotlib.figure import Figure from matplotlib.text import Text from curvefit.callback import add_callback from curvefit.color import DynamicColor, to_rgba from curvefit.text import DynamicText assert_equal_float = partial(np.testing.assert_almo...
40.385621
79
0.608351
from functools import partial import unittest import numpy as np from matplotlib.figure import Figure from matplotlib.text import Text from curvefit.callback import add_callback from curvefit.color import DynamicColor, to_rgba from curvefit.text import DynamicText assert_equal_float = partial(np.testing.assert_almo...
true
true
1c29ab958ae870b27f1e34bddcf8cb30bc163edf
2,664
py
Python
docs/source/examples/breakdowns.py
appliedopt/gpkit
647ef0a2a0ff625026943bfd7fb5ca560100898b
[ "MIT" ]
1
2015-01-20T16:02:38.000Z
2015-01-20T16:02:38.000Z
docs/source/examples/breakdowns.py
appliedopt/gpkit
647ef0a2a0ff625026943bfd7fb5ca560100898b
[ "MIT" ]
2
2015-01-19T21:29:44.000Z
2015-01-20T15:26:26.000Z
docs/source/examples/breakdowns.py
appliedopt/gpkit
647ef0a2a0ff625026943bfd7fb5ca560100898b
[ "MIT" ]
null
null
null
"An example to show off Breakdowns" import os import sys import pickle import pint from packaging import version from gpkit.breakdowns import Breakdowns dirpath = os.path.dirname(os.path.realpath(__file__)) + os.sep if version.parse(pint.__version__) >= version.parse("0.13"): sol = pickle.load(open(dirpath+"solar_...
40.984615
79
0.644895
import os import sys import pickle import pint from packaging import version from gpkit.breakdowns import Breakdowns dirpath = os.path.dirname(os.path.realpath(__file__)) + os.sep if version.parse(pint.__version__) >= version.parse("0.13"): sol = pickle.load(open(dirpath+"solar_13.p", "rb")) elif version.parse(pin...
true
true
1c29ac1f48f6c0b3d53336d578c7d82c8126cb1a
1,247
py
Python
play/pyFire.py
WorldViews/FlowerGarden
af274812bd4de1b0bb1e1f17898cc2f7853c65a1
[ "CC0-1.0" ]
2
2020-06-05T07:50:29.000Z
2020-06-05T20:53:55.000Z
play/pyFire.py
WorldViews/FlowerGarden
af274812bd4de1b0bb1e1f17898cc2f7853c65a1
[ "CC0-1.0" ]
4
2020-07-07T16:51:39.000Z
2021-03-08T03:11:50.000Z
play/pyFire.py
WorldViews/FlowerGarden
af274812bd4de1b0bb1e1f17898cc2f7853c65a1
[ "CC0-1.0" ]
1
2020-07-27T08:29:19.000Z
2020-07-27T08:29:19.000Z
import pyrebase firebaseConfig = { "apiKey": "AIzaSyBqAsqHaBZGT-UsC82ShV3koGWWgu-l8to", "authDomain": "fir-helloworld-39759.firebaseapp.com", "databaseURL": "https://fir-helloworld-39759.firebaseio.com", 'projectId': "fir-helloworld-39759", 'storageBucket': "fir-helloworld-39759.appspot.com", ...
25.979167
84
0.696071
import pyrebase firebaseConfig = { "apiKey": "AIzaSyBqAsqHaBZGT-UsC82ShV3koGWWgu-l8to", "authDomain": "fir-helloworld-39759.firebaseapp.com", "databaseURL": "https://fir-helloworld-39759.firebaseio.com", 'projectId': "fir-helloworld-39759", 'storageBucket': "fir-helloworld-39759.appspot.com", ...
true
true
1c29ac2481c795531fa78f129018764b0534515c
446
py
Python
setup.py
qgallouedec/deep_rl
33d1138939173bc5dddd1a4b03824f7c18dabbfe
[ "MIT" ]
null
null
null
setup.py
qgallouedec/deep_rl
33d1138939173bc5dddd1a4b03824f7c18dabbfe
[ "MIT" ]
null
null
null
setup.py
qgallouedec/deep_rl
33d1138939173bc5dddd1a4b03824f7c18dabbfe
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open("README.md", "r") as f: long_description = f.read() setup( name="deep_rl", description="My RL package.", author="Quentin GALLOUÉDEC", author_email="gallouedec.quentin@gmail.com", long_description=long_description, long_description_conte...
26.235294
50
0.695067
from setuptools import setup, find_packages with open("README.md", "r") as f: long_description = f.read() setup( name="deep_rl", description="My RL package.", author="Quentin GALLOUÉDEC", author_email="gallouedec.quentin@gmail.com", long_description=long_description, long_description_conte...
true
true
1c29ad2b2badf60735122b292dcb3c1e3f2b1d71
3,793
py
Python
tests/test_authenticate.py
Dayflare/galaxy-integration-rpcs3
99e5f6bf9ff375400b1334e8c39ede9f04a1cf5d
[ "MIT" ]
18
2019-09-19T03:24:47.000Z
2021-12-05T14:39:58.000Z
tests/test_authenticate.py
Dayflare/galaxy-integration-rpcs3
99e5f6bf9ff375400b1334e8c39ede9f04a1cf5d
[ "MIT" ]
26
2019-09-04T19:18:10.000Z
2022-03-08T08:40:28.000Z
tests/test_authenticate.py
Dayflare/galaxy-integration-rpcs3
99e5f6bf9ff375400b1334e8c39ede9f04a1cf5d
[ "MIT" ]
5
2020-07-21T07:24:05.000Z
2022-01-08T01:48:28.000Z
import pytest from galaxy.api.types import Authentication from galaxy.api.errors import ( UnknownError, InvalidCredentials, NetworkError, LoggedInElsewhere, ProtocolError, BackendNotAvailable, BackendTimeout, BackendError, TemporaryBlocked, Banned, AccessDenied ) from galaxy.unittest.mock import async_return_v...
31.347107
97
0.628263
import pytest from galaxy.api.types import Authentication from galaxy.api.errors import ( UnknownError, InvalidCredentials, NetworkError, LoggedInElsewhere, ProtocolError, BackendNotAvailable, BackendTimeout, BackendError, TemporaryBlocked, Banned, AccessDenied ) from galaxy.unittest.mock import async_return_v...
true
true
1c29adb73b6a0e40e78d0fe10a6f5254bb36c338
886
py
Python
zilencer/tests.py
tobby2002/zulip
66e7c455759f9368bae16b9a604cf63f8e3524cd
[ "Apache-2.0" ]
1
2021-02-13T20:43:29.000Z
2021-02-13T20:43:29.000Z
zilencer/tests.py
eric-erki/zulip
a063dd3b26f7ada794e14ace0d24ea1834611446
[ "Apache-2.0" ]
8
2021-02-08T20:23:34.000Z
2022-02-11T03:40:24.000Z
zilencer/tests.py
tobby2002/zulip
66e7c455759f9368bae16b9a604cf63f8e3524cd
[ "Apache-2.0" ]
1
2021-04-09T05:50:23.000Z
2021-04-09T05:50:23.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import import ujson from django.test import TestCase class EndpointDiscoveryTest(TestCase): def test_staging_user(self): # type: () -> None response = self.client.get("/api/v1/deployments/endpoints", {"email": "lfaraone@zulip.com"}) ...
38.521739
100
0.651242
from __future__ import absolute_import import ujson from django.test import TestCase class EndpointDiscoveryTest(TestCase): def test_staging_user(self): response = self.client.get("/api/v1/deployments/endpoints", {"email": "lfaraone@zulip.com"}) data = ujson.loads(response.content) ...
true
true
1c29ae0376038f121d79510208eecea8a9719e24
7,149
py
Python
cea/tests/test_schedules.py
architecture-building-systems/cea-toolbox
bfec7ecb4b242449ab8796a1e8ce68c05c35f1d6
[ "MIT" ]
121
2017-08-15T20:10:22.000Z
2022-03-24T01:25:42.000Z
cea/tests/test_schedules.py
architecture-building-systems/cea-toolbox
bfec7ecb4b242449ab8796a1e8ce68c05c35f1d6
[ "MIT" ]
2,121
2017-07-27T12:02:01.000Z
2022-03-31T16:39:28.000Z
cea/tests/test_schedules.py
architecture-building-systems/cea-toolbox
bfec7ecb4b242449ab8796a1e8ce68c05c35f1d6
[ "MIT" ]
42
2017-09-19T09:59:56.000Z
2022-02-19T20:19:56.000Z
""" This module contains unit tests for the schedules used by the CEA. The schedule code is tested against data in the file `test_schedules.config` that can be created by running this file. Note, however, that this will overwrite the test data - you should only do this if you are sure that the new data is correct. """ ...
51.064286
186
0.662191
import configparser import json import os import unittest import pandas as pd import cea.config from cea.datamanagement.archetypes_mapper import calculate_average_multiuse from cea.demand.building_properties import BuildingProperties from cea.demand.schedule_maker.schedule_maker import schedule_maker_main from cea.i...
true
true
1c29b06918e85a8ee383e68f0b08efe5251bc8b7
3,667
py
Python
src/kolibree-changelog/generate_changelog.py
kolibree-git/gitchangelog
267c29104b68db2b6665a8e6414876f7fe73d5dc
[ "BSD-3-Clause" ]
2
2021-01-12T15:10:37.000Z
2021-09-15T03:41:45.000Z
src/kolibree-changelog/generate_changelog.py
kolibree-git/gitchangelog
267c29104b68db2b6665a8e6414876f7fe73d5dc
[ "BSD-3-Clause" ]
5
2021-01-13T11:14:43.000Z
2021-04-22T08:06:47.000Z
src/kolibree-changelog/generate_changelog.py
kolibree-git/gitchangelog
267c29104b68db2b6665a8e6414876f7fe73d5dc
[ "BSD-3-Clause" ]
null
null
null
import argparse import getpass from dataclasses import dataclass from changelog_writer import Changelog, ChangelogWriter, VersionChanges from commit_parser import CommitParser from jira_parser import JiraParser @dataclass class Arguments: start_tag: str end_tag: str title: str filename: str githu...
28.648438
115
0.681484
import argparse import getpass from dataclasses import dataclass from changelog_writer import Changelog, ChangelogWriter, VersionChanges from commit_parser import CommitParser from jira_parser import JiraParser @dataclass class Arguments: start_tag: str end_tag: str title: str filename: str githu...
true
true
1c29b148c1268e67f4ed811e0aff364532614eb5
1,132
py
Python
python_Project/Day_09/test_3.py
Zzz-ww/Python-prac
c97f2c16b74a2c1df117f377a072811cc596f98b
[ "MIT" ]
null
null
null
python_Project/Day_09/test_3.py
Zzz-ww/Python-prac
c97f2c16b74a2c1df117f377a072811cc596f98b
[ "MIT" ]
null
null
null
python_Project/Day_09/test_3.py
Zzz-ww/Python-prac
c97f2c16b74a2c1df117f377a072811cc596f98b
[ "MIT" ]
null
null
null
""" 静态方法和类方法 之前,我们在类中定义的方法都是对象方法,也就是说这些方法都是发送给对象的消息。 实际上,我们写在类中的方法并不需要都是对象方法, 例如我们定义一个“三角形”类,通过传入三条边长来构造三角形,并提供计算周长和面积的方法, 但是传入的三条边长未必能构造出三角形对象, 因此我们可以先写一个方法来验证三条边长是否可以构成三角形,这个方法很显然就不是对象方法, 因为在调用这个方法时三角形对象尚未创建出来(因为都不知道三条边能不能构成三角形), 所以这个方法是属于三角形类而并不属于三角形对象的。 我们可以使用静态方法来解决这类问题,代码如下所示 """ from math import sqrt class T...
21.358491
56
0.610424
from math import sqrt class Triangle(object): def __init__(self, a, b, c): self._a = a self._b = b self._c = c @staticmethod def is_valid(a, b, c): return a + b > c and a + c > b and b + c > a def perimeter(self): return self._a + self._b + self._c def ...
true
true
1c29b2513630b9477ca30e9d1a9c0d4e4250981e
7,502
py
Python
Spatial-Transformer-PCD/point_based/part_seg/part_seg_model_deform.py
tamaslevente/trai
4bf68463b941f305d9b25a9374b6c2a2d51a8046
[ "MIT" ]
null
null
null
Spatial-Transformer-PCD/point_based/part_seg/part_seg_model_deform.py
tamaslevente/trai
4bf68463b941f305d9b25a9374b6c2a2d51a8046
[ "MIT" ]
null
null
null
Spatial-Transformer-PCD/point_based/part_seg/part_seg_model_deform.py
tamaslevente/trai
4bf68463b941f305d9b25a9374b6c2a2d51a8046
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np import math import os import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.dirname(BASE_DIR)) sys.path.append(os.path.join(BASE_DIR, '../utils')) sys.path.append(os.path.join(BASE_DIR, '../models')) sys.path.append(os.path.join(BASE_DIR, '.....
60.5
232
0.565716
import tensorflow as tf import numpy as np import math import os import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.dirname(BASE_DIR)) sys.path.append(os.path.join(BASE_DIR, '../utils')) sys.path.append(os.path.join(BASE_DIR, '../models')) sys.path.append(os.path.join(BASE_DIR, '.....
true
true
1c29b2ba997e4fec7096766107aac36997b5aece
2,046
py
Python
test_env.py
rmqlife/SPIRAL-tensorflow
54fce656656a0a7468e57077a26676f8add2f44a
[ "MIT" ]
null
null
null
test_env.py
rmqlife/SPIRAL-tensorflow
54fce656656a0a7468e57077a26676f8add2f44a
[ "MIT" ]
null
null
null
test_env.py
rmqlife/SPIRAL-tensorflow
54fce656656a0a7468e57077a26676f8add2f44a
[ "MIT" ]
null
null
null
# from __future__ import print_functions from colorenv import ColorEnv, PaintMode import os from os.path import join, basename import numpy as np import sys sys.path.append('/home/dprasad/notebooks/SPIRAL-tensorflow') sys.path.append('/home/dprasad/notebooks/SPIRAL-tensorflow/libs/mypaint') from lib import surface, t...
28.816901
86
0.652493
from colorenv import ColorEnv, PaintMode import os from os.path import join, basename import numpy as np import sys sys.path.append('/home/dprasad/notebooks/SPIRAL-tensorflow') sys.path.append('/home/dprasad/notebooks/SPIRAL-tensorflow/libs/mypaint') from lib import surface, tiledsurface, brush import cv2 def test_...
true
true
1c29b2c0d7fa07e7e8f8753626f394e6a275e1cb
18,362
py
Python
test/augmenters/test_blur.py
Rahul-Venugopal/Image-augmentation
0b0125d29003981709bdb8230170c851367a3995
[ "MIT" ]
4
2018-11-24T15:31:36.000Z
2020-06-23T02:52:45.000Z
test/augmenters/test_blur.py
Rahul-Venugopal/Image-augmentation_1
0b0125d29003981709bdb8230170c851367a3995
[ "MIT" ]
null
null
null
test/augmenters/test_blur.py
Rahul-Venugopal/Image-augmentation_1
0b0125d29003981709bdb8230170c851367a3995
[ "MIT" ]
null
null
null
from __future__ import print_function, division, absolute_import import time import matplotlib matplotlib.use('Agg') # fix execution of tests involving matplotlib on travis import numpy as np import six.moves as sm import cv2 import imgaug as ia from imgaug import augmenters as iaa from imgaug import parameters as ...
33.144404
115
0.562466
from __future__ import print_function, division, absolute_import import time import matplotlib matplotlib.use('Agg') import numpy as np import six.moves as sm import cv2 import imgaug as ia from imgaug import augmenters as iaa from imgaug import parameters as iap from imgaug.testutils import keypoints_equal, resee...
true
true
1c29b2c3d66e3fd1c9540f1f27e2b7bbcd133e89
5,178
py
Python
tests/unit/channel/test_base_channel.py
dmulyalin/scrapli_netconf
7c9e5e74a1afac7955177db759e54d2211637d42
[ "MIT" ]
61
2020-05-17T19:57:25.000Z
2022-03-30T01:10:32.000Z
tests/unit/channel/test_base_channel.py
dmulyalin/scrapli_netconf
7c9e5e74a1afac7955177db759e54d2211637d42
[ "MIT" ]
79
2020-05-17T20:22:05.000Z
2022-03-02T14:37:28.000Z
tests/unit/channel/test_base_channel.py
dmulyalin/scrapli_netconf
7c9e5e74a1afac7955177db759e54d2211637d42
[ "MIT" ]
6
2021-01-07T16:45:28.000Z
2022-02-11T19:31:49.000Z
import pytest from scrapli_netconf.constants import NetconfClientCapabilities, NetconfVersion from scrapli_netconf.exceptions import CapabilityNotSupported, CouldNotExchangeCapabilities SERVER_CAPABILITIES_1_0 = b"""<?xml version="1.0" encoding="UTF-8"?> <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <ca...
36.20979
99
0.742758
import pytest from scrapli_netconf.constants import NetconfClientCapabilities, NetconfVersion from scrapli_netconf.exceptions import CapabilityNotSupported, CouldNotExchangeCapabilities SERVER_CAPABILITIES_1_0 = b"""<?xml version="1.0" encoding="UTF-8"?> <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <ca...
true
true
1c29b4c396d464de5a9cb1a404ebe04eb6885479
2,105
py
Python
setup.py
elcinchu27/cnvkit
59ed0950024172c1b6b7543ac0c236d6a0f4b971
[ "Apache-2.0" ]
null
null
null
setup.py
elcinchu27/cnvkit
59ed0950024172c1b6b7543ac0c236d6a0f4b971
[ "Apache-2.0" ]
null
null
null
setup.py
elcinchu27/cnvkit
59ed0950024172c1b6b7543ac0c236d6a0f4b971
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Copy number variation toolkit for high-throughput sequencing.""" import sys from os.path import dirname, join from glob import glob from setuptools import setup setup_args = {} # Dependencies for easy_install and pip: install_requires=[ 'biopython >= 1.62', "cython == 0.29.20...
31.41791
76
0.593349
import sys from os.path import dirname, join from glob import glob from setuptools import setup setup_args = {} install_requires=[ 'biopython >= 1.62', "cython == 0.29.20", 'pomegranate @ git+https://github.com/jmschrei/pomegranate@v0.13.4', 'matplotlib >= 1.3.1', 'numpy >= ...
true
true
1c29b71583407d533138cb4f8f09dd1dba61c1bd
2,439
py
Python
config.py
HsqHHH/RTNet4DRlesion
41607860579b349ef40cdff9afc2d36d7d9f5348
[ "MIT" ]
null
null
null
config.py
HsqHHH/RTNet4DRlesion
41607860579b349ef40cdff9afc2d36d7d9f5348
[ "MIT" ]
null
null
null
config.py
HsqHHH/RTNet4DRlesion
41607860579b349ef40cdff9afc2d36d7d9f5348
[ "MIT" ]
null
null
null
import argparse def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--seed', type=int, default=1234) parser.add_argument('--outf', default=' ', help='trained model will be saved at here') parser.add_argument('--save', default='UNet_test', help='save name of experiment in args.outf...
55.431818
109
0.705617
import argparse def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--seed', type=int, default=1234) parser.add_argument('--outf', default=' ', help='trained model will be saved at here') parser.add_argument('--save', default='UNet_test', help='save name of experiment in args.outf...
true
true
1c29b89b84c306ee57132ff884aa5925b7d291a7
1,667
py
Python
compiler/definitions/ir/nodes/r_split.py
reikdas/pash
5eac7b98f16786dfee5be83acd079c46c9e5b68d
[ "MIT" ]
89
2021-07-12T16:15:39.000Z
2022-02-20T10:01:41.000Z
compiler/definitions/ir/nodes/r_split.py
reikdas/pash
5eac7b98f16786dfee5be83acd079c46c9e5b68d
[ "MIT" ]
226
2021-07-12T16:41:00.000Z
2022-03-31T22:52:52.000Z
compiler/definitions/ir/nodes/r_split.py
reikdas/pash
5eac7b98f16786dfee5be83acd079c46c9e5b68d
[ "MIT" ]
23
2021-07-12T14:23:23.000Z
2022-03-29T07:21:31.000Z
import os import config from definitions.ir.dfg_node import * from definitions.ir.file_id import * from ir_utils import string_to_argument class RSplit(DFGNode): def __init__(self, inputs, outputs, com_name, com_category, com_options = [], com_redirs = [], com_assignments=[]): super().__...
39.690476
104
0.639472
import os import config from definitions.ir.dfg_node import * from definitions.ir.file_id import * from ir_utils import string_to_argument class RSplit(DFGNode): def __init__(self, inputs, outputs, com_name, com_category, com_options = [], com_redirs = [], com_assignments=[]): super().__...
true
true
1c29b9ba3df8e3010480cd88d176d92b9a408deb
3,803
py
Python
test/functional/wallet_encryption.py
ucacoin/Ucacoin2
bc39105adbf648114f55f9f90976af2d2b7cd087
[ "MIT" ]
4
2020-07-31T12:27:23.000Z
2021-06-05T23:07:37.000Z
test/functional/wallet_encryption.py
ucacoin/Ucacoin2
bc39105adbf648114f55f9f90976af2d2b7cd087
[ "MIT" ]
3
2020-08-02T10:47:08.000Z
2021-07-07T06:41:54.000Z
test/functional/wallet_encryption.py
ucacoin/Ucacoin2
bc39105adbf648114f55f9f90976af2d2b7cd087
[ "MIT" ]
3
2020-08-24T15:36:47.000Z
2020-10-13T15:51:47.000Z
#!/usr/bin/env python3 # Copyright (c) 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test Wallet encryption""" import time from test_framework.test_framework import UCACoinTestFramework ...
43.712644
138
0.70497
import time from test_framework.test_framework import UCACoinTestFramework from test_framework.util import ( assert_equal, assert_raises_rpc_error, assert_greater_than, assert_greater_than_or_equal, ) class WalletEncryptionTest(UCACoinTestFramework): def set_test_params(self): self.se...
true
true
1c29ba07c5793a27879a3a1f0e32deb8cfd10faf
3,032
py
Python
catalog/packages/serializers/vnf_pkg_subscription.py
onap/modeling-etsicatalog
b16b4579ea80bf82fa497e4934b2bb8728845b58
[ "Apache-2.0" ]
null
null
null
catalog/packages/serializers/vnf_pkg_subscription.py
onap/modeling-etsicatalog
b16b4579ea80bf82fa497e4934b2bb8728845b58
[ "Apache-2.0" ]
3
2021-02-03T08:59:39.000Z
2022-03-18T02:18:12.000Z
catalog/packages/serializers/vnf_pkg_subscription.py
onap/modeling-etsicatalog
b16b4579ea80bf82fa497e4934b2bb8728845b58
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2019 Verizon. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
32.255319
81
0.692612
from rest_framework import serializers from catalog.packages.serializers import subscription_auth_data from catalog.packages.serializers import vnf_pkg_notifications class LinkSerializer(serializers.Serializer): href = serializers.CharField( help_text="URI of the referenced resource.", ...
true
true
1c29baf27604baf6e3381541d541d7b6e2460f87
312
py
Python
utils/scripts/db_check.py
gogasca/news_ml
29f461551c964882ee3a607ec9123a76082c11bd
[ "Apache-2.0" ]
4
2018-11-15T08:57:13.000Z
2020-11-15T14:32:10.000Z
utils/scripts/db_check.py
gogasca/news_ml
29f461551c964882ee3a607ec9123a76082c11bd
[ "Apache-2.0" ]
14
2019-11-21T08:38:14.000Z
2021-04-15T05:49:58.000Z
utils/scripts/db_check.py
newsml/newsml
5f4dae8890b2497530b0f3c246d7a407fc18ffe0
[ "Apache-2.0" ]
1
2019-12-23T19:22:42.000Z
2019-12-23T19:22:42.000Z
"""Verify DB connection.""" import os import sys FILEPATH = os.environ.get('NEWSML_ENV') if not FILEPATH: raise Exception('Define NEWSML_ENV first') sys.path.append(FILEPATH) from api.version1_0.database import DbHelper def main(): DbHelper.test_connection() if __name__ == "__main__": main()
15.6
46
0.721154
import os import sys FILEPATH = os.environ.get('NEWSML_ENV') if not FILEPATH: raise Exception('Define NEWSML_ENV first') sys.path.append(FILEPATH) from api.version1_0.database import DbHelper def main(): DbHelper.test_connection() if __name__ == "__main__": main()
true
true
1c29bba8c30c6ff7fcaa11da5247897308ab3ee2
1,795
py
Python
habits/cron/__main__.py
jsvana/habits
b277ce93971d05de4029f3e71464bab61515c011
[ "MIT" ]
null
null
null
habits/cron/__main__.py
jsvana/habits
b277ce93971d05de4029f3e71464bab61515c011
[ "MIT" ]
1
2017-01-03T03:01:49.000Z
2017-01-03T14:44:22.000Z
habits/cron/__main__.py
jsvana/habits
b277ce93971d05de4029f3e71464bab61515c011
[ "MIT" ]
null
null
null
""" Quick tool to pull from a Trello board and text the user a reminder every day. Meant to be run in cron. """ import argparse import datetime import random import sys import time import schedule from twilio.rest import TwilioRestClient from .. import ( config, db, trello, ) def send_message(client, ...
19.51087
72
0.63844
import argparse import datetime import random import sys import time import schedule from twilio.rest import TwilioRestClient from .. import ( config, db, trello, ) def send_message(client, text): message = client.messages.create( body=text, to=config.phone_numbers['user'], ...
true
true
1c29bbef88e6c70528b0ac3965ae3604fdd4a16d
2,140
py
Python
docs/conf.py
burrelle/streetmix
853da98d0d3f2693bb1cc15cf3c439a10b17c4a9
[ "BSD-3-Clause" ]
4
2021-03-30T08:35:08.000Z
2021-06-29T14:14:39.000Z
docs/conf.py
burrelle/streetmix
853da98d0d3f2693bb1cc15cf3c439a10b17c4a9
[ "BSD-3-Clause" ]
49
2021-09-22T04:32:02.000Z
2022-03-28T12:55:22.000Z
docs/conf.py
burrelle/streetmix
853da98d0d3f2693bb1cc15cf3c439a10b17c4a9
[ "BSD-3-Clause" ]
1
2021-04-03T17:42:02.000Z
2021-04-03T17:42:02.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
33.968254
79
0.668692
def setup(app): app.add_stylesheet('css/sphinx_prompt_css.css') app.add_stylesheet('css/custom.css') project = 'Streetmix' copyright = '2019, Streetmix LLC' extensions = [ 'sphinx-prompt' ] templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store...
true
true