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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f72ef9eff5cffb76416d59a9c3337dac4842e086
2,066
py
Python
flaskblog/posts/routes.py
amiinegal/Blog
b88b29603832048a1322cfd79b2cef0684282f4b
[ "Unlicense", "MIT" ]
null
null
null
flaskblog/posts/routes.py
amiinegal/Blog
b88b29603832048a1322cfd79b2cef0684282f4b
[ "Unlicense", "MIT" ]
null
null
null
flaskblog/posts/routes.py
amiinegal/Blog
b88b29603832048a1322cfd79b2cef0684282f4b
[ "Unlicense", "MIT" ]
null
null
null
from flask import (render_template, url_for, flash, redirect, request, abort, Blueprint) from flask_login import current_user, login_required from flaskblog import db from flaskblog.models import Post from flaskblog.posts.forms import PostForm posts = Blueprint('posts', __name__) @posts.route("/po...
33.868852
90
0.664085
from flask import (render_template, url_for, flash, redirect, request, abort, Blueprint) from flask_login import current_user, login_required from flaskblog import db from flaskblog.models import Post from flaskblog.posts.forms import PostForm posts = Blueprint('posts', __name__) @posts.route("/po...
true
true
f72ef9fd42c6c5d66574a205a52aee8fc64d8a20
690
py
Python
backend/migrations/versions/ae566f24d973_.py
sartography/star-drive
c0f33378d42913c3e677e07f74eb46d7b2b82a0a
[ "MIT" ]
null
null
null
backend/migrations/versions/ae566f24d973_.py
sartography/star-drive
c0f33378d42913c3e677e07f74eb46d7b2b82a0a
[ "MIT" ]
368
2018-12-18T14:43:20.000Z
2022-03-02T02:54:18.000Z
backend/migrations/versions/ae566f24d973_.py
sartography/star-drive
c0f33378d42913c3e677e07f74eb46d7b2b82a0a
[ "MIT" ]
2
2019-10-02T03:06:06.000Z
2020-10-05T16:53:48.000Z
"""empty message Revision ID: ae566f24d973 Revises: 838f47fa598e Create Date: 2020-02-18 17:02:08.574872 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'ae566f24d973' down_revision = '838f47fa598e' branch_labels = None depends_on = None def upgrade(): # ...
23.793103
103
0.705797
from alembic import op import sqlalchemy as sa revision = 'ae566f24d973' down_revision = '838f47fa598e' branch_labels = None depends_on = None def upgrade(): op.add_column('stardrive_user', sa.Column('last_login', sa.DateTime(timezone=True), nullable=True)) def downgrade(): op.drop_column('sta...
true
true
f72efb136a1aa339fcf07bfbcbdf071f1369ec8a
883
py
Python
dynadb/migrations/0075_auto_20170124_1439.py
GPCRmd/GPCRmd
7dc75359ace4a00c1597bdb7a86ebee17d51f09c
[ "Apache-2.0" ]
3
2019-03-06T13:35:38.000Z
2020-08-05T15:31:29.000Z
dynadb/migrations/0075_auto_20170124_1439.py
GPCRmd/GPCRmd
7dc75359ace4a00c1597bdb7a86ebee17d51f09c
[ "Apache-2.0" ]
null
null
null
dynadb/migrations/0075_auto_20170124_1439.py
GPCRmd/GPCRmd
7dc75359ace4a00c1597bdb7a86ebee17d51f09c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-01-24 13:39 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('dynadb', '0074_auto_20170123_1212'), ] operations = [...
32.703704
166
0.642129
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('dynadb', '0074_auto_20170123_1212'), ] operations = [ migrations.AlterField( model_name='dyndbefficacy'...
true
true
f72efbf64861c201c9fde808e528c73dae484dc4
1,157
py
Python
genomepy/plugins/minimap2.py
tilschaef/genomepy
4c10e69b6886cf52381caf6498395391834a675b
[ "MIT" ]
146
2019-11-19T16:07:46.000Z
2022-03-15T16:10:31.000Z
genomepy/plugins/minimap2.py
tilschaef/genomepy
4c10e69b6886cf52381caf6498395391834a675b
[ "MIT" ]
125
2019-11-19T18:08:23.000Z
2022-03-30T09:16:46.000Z
genomepy/plugins/minimap2.py
tilschaef/genomepy
4c10e69b6886cf52381caf6498395391834a675b
[ "MIT" ]
18
2019-12-02T15:54:34.000Z
2022-03-04T19:16:31.000Z
import os from genomepy.plugins import Plugin from genomepy.utils import cmd_ok, mkdir_p, rm_rf, run_index_cmd class Minimap2Plugin(Plugin): def after_genome_download(self, genome, threads=1, force=False): if not cmd_ok("minimap2"): return # Create index dir index_dir = genom...
30.447368
78
0.560069
import os from genomepy.plugins import Plugin from genomepy.utils import cmd_ok, mkdir_p, rm_rf, run_index_cmd class Minimap2Plugin(Plugin): def after_genome_download(self, genome, threads=1, force=False): if not cmd_ok("minimap2"): return index_dir = genome.plugin["minimap2"...
true
true
f72efca428a828d722447e9aced971774beef150
4,183
py
Python
python/nano/src/bigdl/nano/automl/tf/objective.py
Forest216/BigDL
840da9a2eaf395978dd83730b02aa5e5dfbd7989
[ "Apache-2.0" ]
null
null
null
python/nano/src/bigdl/nano/automl/tf/objective.py
Forest216/BigDL
840da9a2eaf395978dd83730b02aa5e5dfbd7989
[ "Apache-2.0" ]
null
null
null
python/nano/src/bigdl/nano/automl/tf/objective.py
Forest216/BigDL
840da9a2eaf395978dd83730b02aa5e5dfbd7989
[ "Apache-2.0" ]
null
null
null
# # Copyright 2016 The BigDL 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 applicable law or agreed to in ...
33.464
87
0.638059
from selectors import EpollSelector from tensorflow.keras.backend import clear_session from tensorflow.keras.models import clone_model import tensorflow as tf import inspect import copy from bigdl.nano.automl.hpo.backend import create_tfkeras_pruning_callback from bigdl.nano.utils.log4Error import invalidInputError ...
true
true
f72efd44eb8409c927c2b099abb4c95c6681f60d
2,428
py
Python
examples/python/onnx/mnist_mlp.py
jiazhihao/FlexFlow-1
b9bf0b615d8cf6d22bc38de4755b76ee3f8c4c22
[ "Apache-2.0" ]
1
2021-03-09T05:43:58.000Z
2021-03-09T05:43:58.000Z
examples/python/onnx/mnist_mlp.py
jiazhihao/FlexFlow-1
b9bf0b615d8cf6d22bc38de4755b76ee3f8c4c22
[ "Apache-2.0" ]
null
null
null
examples/python/onnx/mnist_mlp.py
jiazhihao/FlexFlow-1
b9bf0b615d8cf6d22bc38de4755b76ee3f8c4c22
[ "Apache-2.0" ]
null
null
null
from flexflow.core import * import numpy as np from flexflow.keras.datasets import mnist from flexflow.onnx.model import ONNXModel from accuracy import ModelAccuracy def top_level_task(): ffconfig = FFConfig() ffconfig.parse_args() print("Python API batchSize(%d) workersPerNodes(%d) numNodes(%d)" %(ffconfig.get...
34.685714
167
0.76112
from flexflow.core import * import numpy as np from flexflow.keras.datasets import mnist from flexflow.onnx.model import ONNXModel from accuracy import ModelAccuracy def top_level_task(): ffconfig = FFConfig() ffconfig.parse_args() print("Python API batchSize(%d) workersPerNodes(%d) numNodes(%d)" %(ffconfig.get...
true
true
f72efd6fc94e91466ebd1578b756f630faaefffc
1,461
py
Python
spiral.py
vimithamanohar/practice
3e5372aeb29b9db3467c97ef8c4f879fff1ac7b7
[ "MIT" ]
null
null
null
spiral.py
vimithamanohar/practice
3e5372aeb29b9db3467c97ef8c4f879fff1ac7b7
[ "MIT" ]
null
null
null
spiral.py
vimithamanohar/practice
3e5372aeb29b9db3467c97ef8c4f879fff1ac7b7
[ "MIT" ]
null
null
null
import math import unittest def get_line(arr, x, y, ln, dx, dy): ret = [] for i in range(ln): ret.append(arr[x][y]) x = x + dx y = y + dy return ret def get_square(arr, x, y, ln): if ln == 0: return [] if ln == 1: return [arr[x][y]] ret = [] ret....
22.476923
96
0.473648
import math import unittest def get_line(arr, x, y, ln, dx, dy): ret = [] for i in range(ln): ret.append(arr[x][y]) x = x + dx y = y + dy return ret def get_square(arr, x, y, ln): if ln == 0: return [] if ln == 1: return [arr[x][y]] ret = [] ret....
true
true
f72efd91fc83e7a45d20c311f82e965626069a2c
13,324
py
Python
i3pystatus/network.py
MaicoTimmerman/i3pystatus
dbfc94575b287420159434df2bb00fedeebeb2ed
[ "MIT" ]
null
null
null
i3pystatus/network.py
MaicoTimmerman/i3pystatus
dbfc94575b287420159434df2bb00fedeebeb2ed
[ "MIT" ]
null
null
null
i3pystatus/network.py
MaicoTimmerman/i3pystatus
dbfc94575b287420159434df2bb00fedeebeb2ed
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import netifaces from i3pystatus import IntervalModule from i3pystatus.core.color import ColorRangeModule from i3pystatus.core.util import make_graph, round_dict, make_bar def count_bits(integer): bits = 0 while (integer): integer &= integer - 1 bits += 1 return bit...
35.248677
118
0.611828
import netifaces from i3pystatus import IntervalModule from i3pystatus.core.color import ColorRangeModule from i3pystatus.core.util import make_graph, round_dict, make_bar def count_bits(integer): bits = 0 while (integer): integer &= integer - 1 bits += 1 return bits def v6_to_int(v6): ...
true
true
f72efe28d7c827765fc230987e47746d83b1714e
1,500
py
Python
00Python/day11/basic02.py
HaoZhang95/PythonAndMachineLearning
b897224b8a0e6a5734f408df8c24846a98c553bf
[ "MIT" ]
937
2019-05-08T08:46:25.000Z
2022-03-31T12:56:07.000Z
00Python/day11/basic02.py
Sakura-gh/Python24
b97e18867264a0647d5645c7d757a0040e755577
[ "MIT" ]
47
2019-09-17T10:06:02.000Z
2022-03-11T23:46:52.000Z
00Python/day11/basic02.py
Sakura-gh/Python24
b97e18867264a0647d5645c7d757a0040e755577
[ "MIT" ]
354
2019-05-10T02:15:26.000Z
2022-03-30T05:52:57.000Z
""" __new__()方法, 对象创建的过程, 1- new方法返回一个对象 2- init利用new返回的对象进行属性的添加 """ class Person(object): # 监听创建一个实例对象的过程,需要返回一个对象赋值给xiaoming # new中不return的话,那么久不会执行init方法 def __new__(cls, *args, **kwargs): print("new") print((object.__new__(cls))) return object.__new__(cls) # 构造方法...
20.547945
56
0.626
class Person(object): def __new__(cls, *args, **kwargs): print("new") print((object.__new__(cls))) return object.__new__(cls) def __init__(self, name): print("init") self.name = name def __del__(self): print("再见") xiaoming =...
true
true
f72efe3d12d989d9d5fbd596ed2881377aad1ab5
3,542
py
Python
test/functional/wallet_encryption.py
Hary2511/xaya
312ffe32f0bc58d0936f96770c59b57d9862ac35
[ "MIT" ]
2
2018-08-07T17:27:05.000Z
2018-08-07T17:28:18.000Z
test/functional/wallet_encryption.py
Hary2511/xaya
312ffe32f0bc58d0936f96770c59b57d9862ac35
[ "MIT" ]
null
null
null
test/functional/wallet_encryption.py
Hary2511/xaya
312ffe32f0bc58d0936f96770c59b57d9862ac35
[ "MIT" ]
null
null
null
#!/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 BitcoinTestFramework ...
43.195122
138
0.705816
import time from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, assert_raises_rpc_error, assert_greater_than, assert_greater_than_or_equal, ) class WalletEncryptionTest(BitcoinTestFramework): def set_test_params(self): self.setup_...
true
true
f72efe4f9f448f396364ed1b99e237c63630816c
2,612
py
Python
tests/providers/amazon/aws/hooks/test_aws_dynamodb_hook.py
wileeam/airflow
f46be8152a4d89c57db4ca46f5b3339e4876b723
[ "Apache-2.0" ]
1
2020-02-17T17:40:14.000Z
2020-02-17T17:40:14.000Z
tests/providers/amazon/aws/hooks/test_aws_dynamodb_hook.py
devlocalca/airflow
58c3542ed25061320ce61dbe0adf451a44c738dd
[ "Apache-2.0" ]
2
2021-05-12T12:41:51.000Z
2021-09-29T17:47:43.000Z
tests/providers/amazon/aws/hooks/test_aws_dynamodb_hook.py
devlocalca/airflow
58c3542ed25061320ce61dbe0adf451a44c738dd
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
32.246914
101
0.64242
import unittest import uuid from airflow.providers.amazon.aws.hooks.aws_dynamodb_hook import AwsDynamoDBHook try: from moto import mock_dynamodb2 except ImportError: mock_dynamodb2 = None class TestDynamoDBHook(unittest.TestCase): @unittest.skipIf(mock_dynamodb2 is None, 'mock_dynamodb2 package not pr...
true
true
f72efe56b3a6ea76c20c2859404736eb8275a81d
12,811
py
Python
install.py
ArgusHomeSecurity/argus_management
d2a6fb0004f23963f1cbc9cd07f40596abaf8b7b
[ "MIT" ]
null
null
null
install.py
ArgusHomeSecurity/argus_management
d2a6fb0004f23963f1cbc9cd07f40596abaf8b7b
[ "MIT" ]
1
2021-02-24T12:04:11.000Z
2021-02-24T12:04:11.000Z
install.py
ArPIHomeSecurity/arpi_management
d2a6fb0004f23963f1cbc9cd07f40596abaf8b7b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ Script for installing the components of the ArPI home security system to a running Raspberry PI Zero Wifi host. It uses the configuration file install.yaml! --- @author: Gábor Kovács @copyright: 2017 arpi-security.info. All rights reserved. @contact: gkovacs81@gm...
31.246341
123
0.609788
import json import logging import subprocess import sys from argparse import ArgumentParser, RawDescriptionHelpFormatter from os import system from os.path import join, exists from socket import gaierror from time import sleep import paramiko import yaml from paramiko.ssh_exception import AuthenticationException, NoVa...
true
true
f72efec7f239fcde6bd467031c71d0a0a0d48054
3,661
py
Python
DNCNN/common.py
Khanhnn00/blind_sr_denoise
3153f90d20fd884ab69b47c30c685e0175276055
[ "Apache-2.0" ]
null
null
null
DNCNN/common.py
Khanhnn00/blind_sr_denoise
3153f90d20fd884ab69b47c30c685e0175276055
[ "Apache-2.0" ]
null
null
null
DNCNN/common.py
Khanhnn00/blind_sr_denoise
3153f90d20fd884ab69b47c30c685e0175276055
[ "Apache-2.0" ]
null
null
null
import os import random import numpy as np import scipy.misc as misc import imageio from tqdm import tqdm import cv2 from PIL import Image import torch import torch.nn.functional as F IMG_EXTENSIONS = ['.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP'] BINARY_EXTENSIONS = ['.npy'] BENCH...
29.055556
130
0.600656
import os import random import numpy as np import scipy.misc as misc import imageio from tqdm import tqdm import cv2 from PIL import Image import torch import torch.nn.functional as F IMG_EXTENSIONS = ['.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP'] BINARY_EXTENSIONS = ['.npy'] BENCH...
true
true
f72efed312141d7d38b208a997d8ee5a183db48d
1,290
py
Python
app/core/tests/test_models.py
slauzinho/recipe-app-api
c05f2d007dc19bab5792742a1e7959b5cf8e95a4
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
slauzinho/recipe-app-api
c05f2d007dc19bab5792742a1e7959b5cf8e95a4
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
slauzinho/recipe-app-api
c05f2d007dc19bab5792742a1e7959b5cf8e95a4
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model class ModelTests(TestCase): def test_create_user_with_email_successful(self): """ Test creating a new user with an email is successful""" email = 'test@example.com' password = 'testpass123' user = get_...
32.25
69
0.651163
from django.test import TestCase from django.contrib.auth import get_user_model class ModelTests(TestCase): def test_create_user_with_email_successful(self): email = 'test@example.com' password = 'testpass123' user = get_user_model().objects.create_user( email=email, ...
true
true
f72efee2c58c739a39aee6ac1603f9a379173f68
960
py
Python
pics/views.py
NinahMo/Pictogram
d7b1ad7af253e6b3a34c2495b370328bbc051059
[ "Unlicense" ]
null
null
null
pics/views.py
NinahMo/Pictogram
d7b1ad7af253e6b3a34c2495b370328bbc051059
[ "Unlicense" ]
null
null
null
pics/views.py
NinahMo/Pictogram
d7b1ad7af253e6b3a34c2495b370328bbc051059
[ "Unlicense" ]
null
null
null
from django.shortcuts import render,redirect from django.http import HttpResponse,Http404 from .models import Pics,categories # Create your views here. def welcome(request): return render(request, 'welcome.html') def pictogram(request): images = Pics.objects.all() return render(request, 'pictogram.html', ...
34.285714
98
0.710417
from django.shortcuts import render,redirect from django.http import HttpResponse,Http404 from .models import Pics,categories def welcome(request): return render(request, 'welcome.html') def pictogram(request): images = Pics.objects.all() return render(request, 'pictogram.html', {'images':images}) def sh...
true
true
f72effa674b9c81ff3e1f7f6616cfc19ae50580c
3,781
py
Python
fast_pixel_cnn_pp/test_end_to_end.py
tinyrobots/Generalized-PixelVAE
8d8c6033e14bf2ce37749bd2604e4a90459ff3d4
[ "MIT" ]
510
2017-02-21T17:18:51.000Z
2022-02-02T17:12:46.000Z
fast_pixel_cnn_pp/test_end_to_end.py
jinxu06/fast-pixel-cnn
ee99634be08c726c3da7e8ba2675c8d1448e15af
[ "MIT" ]
4
2017-08-24T18:20:11.000Z
2021-07-05T06:00:56.000Z
fast_pixel_cnn_pp/test_end_to_end.py
jinxu06/fast-pixel-cnn
ee99634be08c726c3da7e8ba2675c8d1448e15af
[ "MIT" ]
82
2017-02-21T23:16:28.000Z
2021-09-18T13:04:59.000Z
from . import model from . import fast_nn import tensorflow as tf import numpy as np import os import unittest class FastPixelCNNPPEndToEndTest(tf.test.TestCase): def test_end_to_end(self): with self.test_session() as sess: print('Creating model') image_size = (10, 32, 32, 4) ...
39.8
89
0.519968
from . import model from . import fast_nn import tensorflow as tf import numpy as np import os import unittest class FastPixelCNNPPEndToEndTest(tf.test.TestCase): def test_end_to_end(self): with self.test_session() as sess: print('Creating model') image_size = (10, 32, 32, 4) ...
true
true
f72f0248d59c0576c9f63814fa86650afed6d006
9,579
py
Python
dowhy/do_why.py
mrklees/dowhy
a9e950fd0cf180dc4cbbca13332638aab9d00c65
[ "MIT" ]
3
2019-12-21T05:46:21.000Z
2020-05-19T15:35:02.000Z
dowhy/do_why.py
mrklees/dowhy
a9e950fd0cf180dc4cbbca13332638aab9d00c65
[ "MIT" ]
null
null
null
dowhy/do_why.py
mrklees/dowhy
a9e950fd0cf180dc4cbbca13332638aab9d00c65
[ "MIT" ]
3
2019-09-05T10:59:58.000Z
2021-02-04T02:53:59.000Z
""" Module containing the main model class for the dowhy package. """ import logging from sympy import init_printing import dowhy.causal_estimators as causal_estimators import dowhy.causal_refuters as causal_refuters import dowhy.utils.cli_helpers as cli from dowhy.causal_estimator import CausalEstimate from dowhy....
38.939024
130
0.624178
import logging from sympy import init_printing import dowhy.causal_estimators as causal_estimators import dowhy.causal_refuters as causal_refuters import dowhy.utils.cli_helpers as cli from dowhy.causal_estimator import CausalEstimate from dowhy.causal_graph import CausalGraph from dowhy.causal_identifier import Cau...
true
true
f72f03ee4306e4479f46e2f00d5347764d7ca9b6
6,514
py
Python
lib/flows/cron/compactors_test.py
nahidupa/grr
100a9d85ef2abb234e12e3ac2623caffb4116be7
[ "Apache-2.0" ]
3
2016-02-20T13:06:31.000Z
2017-12-15T12:09:01.000Z
lib/flows/cron/compactors_test.py
nahidupa/grr
100a9d85ef2abb234e12e3ac2623caffb4116be7
[ "Apache-2.0" ]
3
2020-09-11T12:54:50.000Z
2020-09-11T12:55:01.000Z
lib/flows/cron/compactors_test.py
nahidupa/grr
100a9d85ef2abb234e12e3ac2623caffb4116be7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Tests for grr.lib.flows.cron.compactors.""" # pylint: disable=unused-import, g-bad-import-order from grr.lib import server_plugins # pylint: enable=unused-import, g-bad-import-order from grr.lib import aff4 from grr.lib import flags from grr.lib import flow from grr.lib import rdfvalue from...
40.7125
78
0.675161
from grr.lib import server_plugins from grr.lib import aff4 from grr.lib import flags from grr.lib import flow from grr.lib import rdfvalue from grr.lib import test_lib from grr.lib import utils class PackedVersionedCollectionCompactorTest(test_lib.FlowTestsBaseclass): def testCompactsSingleCollection(self): ...
true
true
f72f0480cd1832c1a453482d9f0e8bb0cd69f5f7
6,838
py
Python
carla-data-export/dataexport.py
zhangyanyu0722/EC523_Project
72673713bb798023e82ccc257e8c05459c34a4b9
[ "MIT" ]
3
2020-10-06T19:32:02.000Z
2020-10-21T04:16:04.000Z
carla-data-export/dataexport.py
zhangyanyu0722/EC523_Project
72673713bb798023e82ccc257e8c05459c34a4b9
[ "MIT" ]
null
null
null
carla-data-export/dataexport.py
zhangyanyu0722/EC523_Project
72673713bb798023e82ccc257e8c05459c34a4b9
[ "MIT" ]
null
null
null
""" This file contains all the methods responsible for saving the generated data in the correct output format. """ import cv2 import numpy as np import os import logging from utils import degrees_to_radians import json def save_groundplanes(planes_fname, player_measurements, lidar_height): from math import cos, ...
43.278481
135
0.603832
import cv2 import numpy as np import os import logging from utils import degrees_to_radians import json def save_groundplanes(planes_fname, player_measurements, lidar_height): from math import cos, sin rotation = player_measurements.transform.rotation pitch, roll = rotation.pitch, rotation.roll pi...
true
true
f72f0708d59dc5469fe994c4b30668cfc4355f4a
22
py
Python
__init__.py
cosanlab/facesync
bd5922de5729e4e76a6eaae84b45d965660f1545
[ "MIT" ]
9
2018-07-13T14:06:07.000Z
2021-12-24T01:53:20.000Z
__init__.py
cosanlab/facesync
bd5922de5729e4e76a6eaae84b45d965660f1545
[ "MIT" ]
null
null
null
__init__.py
cosanlab/facesync
bd5922de5729e4e76a6eaae84b45d965660f1545
[ "MIT" ]
2
2019-11-24T00:43:39.000Z
2020-10-08T05:06:52.000Z
__all__ = ["facesync"]
22
22
0.681818
__all__ = ["facesync"]
true
true
f72f071336b0f843d1521175037b68c86bc72fb7
467
py
Python
complex/complex/logger.py
jasonamyers/pynash-click
512e9712dc1de80e76a6815e0df04dd46af45641
[ "MIT" ]
null
null
null
complex/complex/logger.py
jasonamyers/pynash-click
512e9712dc1de80e76a6815e0df04dd46af45641
[ "MIT" ]
null
null
null
complex/complex/logger.py
jasonamyers/pynash-click
512e9712dc1de80e76a6815e0df04dd46af45641
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger(__name__) logger.setLevel(logging.ERROR) file_log_handler = logging.FileHandler('combinator-cli.log') logger.addHandler(file_log_handler) stderr_log_handler = logging.StreamHandler() logger.addHandler(stderr_log_handler) format_string = '%(asctime)s - %(name)s - %(levelname...
29.1875
70
0.815846
import logging logger = logging.getLogger(__name__) logger.setLevel(logging.ERROR) file_log_handler = logging.FileHandler('combinator-cli.log') logger.addHandler(file_log_handler) stderr_log_handler = logging.StreamHandler() logger.addHandler(stderr_log_handler) format_string = '%(asctime)s - %(name)s - %(levelname...
true
true
f72f07649189725423a37d1b780363c21568ce47
1,124
py
Python
model-optimizer/extensions/front/mxnet/rnn_param_concat.py
calvinfeng/openvino
11f591c16852637506b1b40d083b450e56d0c8ac
[ "Apache-2.0" ]
null
null
null
model-optimizer/extensions/front/mxnet/rnn_param_concat.py
calvinfeng/openvino
11f591c16852637506b1b40d083b450e56d0c8ac
[ "Apache-2.0" ]
19
2021-03-26T08:11:00.000Z
2022-02-21T13:06:26.000Z
model-optimizer/extensions/front/mxnet/rnn_param_concat.py
calvinfeng/openvino
11f591c16852637506b1b40d083b450e56d0c8ac
[ "Apache-2.0" ]
1
2021-07-28T17:30:46.000Z
2021-07-28T17:30:46.000Z
""" Copyright (C) 2018-2021 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
31.222222
73
0.728648
from mo.front.extractor import FrontExtractorOp from mo.front.mxnet.extractors.utils import get_mxnet_layer_attrs from mo.ops.concat import Concat class RNNParamConcatFrontExtractor(FrontExtractorOp): op = '_rnn_param_concat' enabled = True @classmethod def extract(cls, node): attrs = get_mx...
true
true
f72f0880bd5a9c11966123d872540d2c0220fd79
2,536
py
Python
scanapi/evaluators/string_evaluator.py
dubirajara/scanapi
b0c7b40a48a4d60871c0b3cf9c959d0155985180
[ "MIT" ]
1
2020-06-02T18:08:08.000Z
2020-06-02T18:08:08.000Z
scanapi/evaluators/string_evaluator.py
dubirajara/scanapi
b0c7b40a48a4d60871c0b3cf9c959d0155985180
[ "MIT" ]
null
null
null
scanapi/evaluators/string_evaluator.py
dubirajara/scanapi
b0c7b40a48a4d60871c0b3cf9c959d0155985180
[ "MIT" ]
null
null
null
import logging import os import re import sys from scanapi.errors import BadConfigurationError, InvalidPythonCodeError from scanapi.evaluators.code_evaluator import CodeEvaluator logger = logging.getLogger(__name__) variable_pattern = re.compile( r"(?P<something_before>\w*)(?P<start>\${)(?P<variable>\w*)(?P<end>}...
28.494382
97
0.621451
import logging import os import re import sys from scanapi.errors import BadConfigurationError, InvalidPythonCodeError from scanapi.evaluators.code_evaluator import CodeEvaluator logger = logging.getLogger(__name__) variable_pattern = re.compile( r"(?P<something_before>\w*)(?P<start>\${)(?P<variable>\w*)(?P<end>}...
true
true
f72f0a5368a77bd168688ea65e43ba66486e53c4
902
py
Python
church/migrations/0017_linkedchurch.py
khanhpn/florida
5e83d0561b9f41ff79383a6a2f0a84d6c8459ef0
[ "Apache-2.0" ]
1
2021-01-22T02:52:33.000Z
2021-01-22T02:52:33.000Z
church/migrations/0017_linkedchurch.py
khanhpn/florida
5e83d0561b9f41ff79383a6a2f0a84d6c8459ef0
[ "Apache-2.0" ]
null
null
null
church/migrations/0017_linkedchurch.py
khanhpn/florida
5e83d0561b9f41ff79383a6a2f0a84d6c8459ef0
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.5 on 2021-08-01 06:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('church', '0016_masstime'), ] operations = [ migrations.CreateModel( name='LinkedChurch', fields=[ ('...
32.214286
114
0.559867
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('church', '0016_masstime'), ] operations = [ migrations.CreateModel( name='LinkedChurch', fields=[ ('id', models.AutoField(auto_created=True, primary...
true
true
f72f0bebfae6ba10ce11191ee930be3d4ec64296
4,692
py
Python
app/model/SimpleSimulator.py
OuissalTAIM/jenkins
7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1
[ "BSD-1-Clause" ]
null
null
null
app/model/SimpleSimulator.py
OuissalTAIM/jenkins
7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1
[ "BSD-1-Clause" ]
6
2021-02-02T22:52:41.000Z
2022-03-12T00:37:30.000Z
app/model/SimpleSimulator.py
OuissalTAIM/jenkins
7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1
[ "BSD-1-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from app.graph.Graph import * from app.data.Client import Driver from app.config.env import MONIKER_SEPARATOR from app.entity.Transport import Transport from app.samples.graph_sample import SimpleEntity class SimpleSimulator: def __init__(self, graph): """ Constructor ...
34
113
0.547528
from app.graph.Graph import * from app.data.Client import Driver from app.config.env import MONIKER_SEPARATOR from app.entity.Transport import Transport from app.samples.graph_sample import SimpleEntity class SimpleSimulator: def __init__(self, graph): self.graph = graph def build_graph(self): ...
true
true
f72f0bee0a0d6143e7a6c4be603b00b01323a74d
1,459
py
Python
models/vgg16.py
lizhipengTouch/CSA-inpainting
50602607ddc9153af5bfe627e355b0466fc4944f
[ "CC-BY-4.0" ]
null
null
null
models/vgg16.py
lizhipengTouch/CSA-inpainting
50602607ddc9153af5bfe627e355b0466fc4944f
[ "CC-BY-4.0" ]
null
null
null
models/vgg16.py
lizhipengTouch/CSA-inpainting
50602607ddc9153af5bfe627e355b0466fc4944f
[ "CC-BY-4.0" ]
null
null
null
import torch import torchvision from torchvision import models from collections import namedtuple class Vgg16(torch.nn.Module): def __init__(self, requires_grad=False): super(Vgg16, self).__init__() vgg_pretrained_features = models.vgg16(pretrained=True).features # 获取预训练vgg网络层 self.slice1 ...
38.394737
92
0.6244
import torch import torchvision from torchvision import models from collections import namedtuple class Vgg16(torch.nn.Module): def __init__(self, requires_grad=False): super(Vgg16, self).__init__() vgg_pretrained_features = models.vgg16(pretrained=True).features self.slice1 = torch.nn.Seq...
true
true
f72f0df111c27c3d72be292658ad3543f741792e
6,525
py
Python
sdk/python/kulado_azure/network/express_route_circuit_peering.py
kulado/kulado-azure
f3a408fa0405fe6ae93e0049b2ae0f0e266f1cf6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/kulado_azure/network/express_route_circuit_peering.py
kulado/kulado-azure
f3a408fa0405fe6ae93e0049b2ae0f0e266f1cf6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/kulado_azure/network/express_route_circuit_peering.py
kulado/kulado-azure
f3a408fa0405fe6ae93e0049b2ae0f0e266f1cf6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Kulado Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import kulado import kulado.runtime from .. import utilities, tables class ExpressRouteCircuitPeering(kula...
45.950704
308
0.70636
import json import warnings import kulado import kulado.runtime from .. import utilities, tables class ExpressRouteCircuitPeering(kulado.CustomResource): azure_asn: kulado.Output[float] express_route_circuit_name: kulado.Output[str] microsoft_peering_config: kulado.Output[dict] peer_asn: kulado.Output...
true
true
f72f0e3e3ffbf41a6e99a86e70f0c5f90ed14feb
2,479
py
Python
attachment_large_object/ir_attachment.py
ShaheenHossain/itpp-labs-misc-addons13
bf62dc5bc1abdc18d78e9560a286babbe1d0e082
[ "MIT" ]
null
null
null
attachment_large_object/ir_attachment.py
ShaheenHossain/itpp-labs-misc-addons13
bf62dc5bc1abdc18d78e9560a286babbe1d0e082
[ "MIT" ]
null
null
null
attachment_large_object/ir_attachment.py
ShaheenHossain/itpp-labs-misc-addons13
bf62dc5bc1abdc18d78e9560a286babbe1d0e082
[ "MIT" ]
3
2020-08-25T01:57:59.000Z
2021-09-11T15:38:02.000Z
# -*- coding: utf-8 -*- import logging import psycopg2 from odoo import api, models logger = logging.getLogger(__name__) LARGE_OBJECT_LOCATION = "postgresql:lobject" class IrAttachment(models.Model): """Provide storage as PostgreSQL large objects of attachements with filestore location ``postgresql:lobject``....
31.379747
114
0.624445
import logging import psycopg2 from odoo import api, models logger = logging.getLogger(__name__) LARGE_OBJECT_LOCATION = "postgresql:lobject" class IrAttachment(models.Model): _name = "ir.attachment" _inherit = "ir.attachment" @api.model def lobject(self, cr, *args): return cr._cnx.lobje...
true
true
f72f1077a32379129769997eb35ec1972c898c1c
102
py
Python
dircolors/pyls/__init__.py
mic-e/pydircolors
62096e73ed065d015adde3f9e55c38e10a49dc3c
[ "Apache-2.0" ]
3
2020-02-17T20:02:03.000Z
2020-09-05T02:17:47.000Z
dircolors/pyls/__init__.py
mic-e/pydircolors
62096e73ed065d015adde3f9e55c38e10a49dc3c
[ "Apache-2.0" ]
null
null
null
dircolors/pyls/__init__.py
mic-e/pydircolors
62096e73ed065d015adde3f9e55c38e10a49dc3c
[ "Apache-2.0" ]
2
2020-02-18T01:11:20.000Z
2020-09-05T02:17:51.000Z
# dircolors.pyls package """ pyls - a simple implementation of `ls` used to test python-dircolors """
34
76
0.72549
true
true
f72f11d65f3800ed3177636dba116a8e2edb427c
2,402
py
Python
test/test_tcti.py
fer9898/tpm2-pytss
a2bd7292411511a9c6da3c2553c7af01470e63ef
[ "BSD-2-Clause" ]
null
null
null
test/test_tcti.py
fer9898/tpm2-pytss
a2bd7292411511a9c6da3c2553c7af01470e63ef
[ "BSD-2-Clause" ]
null
null
null
test/test_tcti.py
fer9898/tpm2-pytss
a2bd7292411511a9c6da3c2553c7af01470e63ef
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python3 -u # SPDX-License-Identifier: BSD-2 import unittest from tpm2_pytss import * from .TSS2_BaseTest import TSS2_EsapiTest class TestTCTI(TSS2_EsapiTest): def test_init(self): self.assertEqual(self.tcti.version, 2) self.assertGreater(self.tcti.magic, 0) v1ctx = ffi.cast("...
30.405063
79
0.628226
import unittest from tpm2_pytss import * from .TSS2_BaseTest import TSS2_EsapiTest class TestTCTI(TSS2_EsapiTest): def test_init(self): self.assertEqual(self.tcti.version, 2) self.assertGreater(self.tcti.magic, 0) v1ctx = ffi.cast("TSS2_TCTI_CONTEXT_COMMON_V1 *", self.tcti._ctx) ...
true
true
f72f13692aafad6149b0efd13c89c38ea0616f87
6,325
py
Python
backend/users/api/views.py
tyrozz/django-next-backend
1e06d8daa079548d0d4c79474f035041d44d5ead
[ "MIT" ]
1
2022-02-24T17:55:35.000Z
2022-02-24T17:55:35.000Z
backend/users/api/views.py
tyrozz/django-next-backend
1e06d8daa079548d0d4c79474f035041d44d5ead
[ "MIT" ]
null
null
null
backend/users/api/views.py
tyrozz/django-next-backend
1e06d8daa079548d0d4c79474f035041d44d5ead
[ "MIT" ]
null
null
null
from allauth.account import app_settings as allauth_settings from allauth.account.models import EmailAddress from allauth.account.utils import complete_signup from allauth.account.views import ConfirmEmailView from django.contrib.auth import get_user_model from django.utils.decorators import method_decorator from djang...
33.115183
88
0.707826
from allauth.account import app_settings as allauth_settings from allauth.account.models import EmailAddress from allauth.account.utils import complete_signup from allauth.account.views import ConfirmEmailView from django.contrib.auth import get_user_model from django.utils.decorators import method_decorator from djang...
true
true
f72f13d49d6c7a860c5b0fe7664a87a652eb88a8
641
py
Python
tests/test_data/test_datasets/test_xml_dataset.py
Brym-Gyimah/mmdetection
d5d749afe57c77e2ec4500395faed3566fdfedae
[ "Apache-2.0" ]
20,190
2018-09-10T01:11:53.000Z
2022-03-31T22:31:33.000Z
tests/test_data/test_datasets/test_xml_dataset.py
Joker-co/mmdet_pro
96abfd90cf0e38c5ce398795f949e9328eb85c1b
[ "Apache-2.0" ]
6,736
2018-09-17T09:45:51.000Z
2022-03-31T22:54:10.000Z
tests/test_data/test_datasets/test_xml_dataset.py
Joker-co/mmdet_pro
96abfd90cf0e38c5ce398795f949e9328eb85c1b
[ "Apache-2.0" ]
7,837
2018-09-11T02:58:23.000Z
2022-03-31T22:31:38.000Z
# Copyright (c) OpenMMLab. All rights reserved. import pytest from mmdet.datasets import DATASETS def test_xml_dataset(): dataconfig = { 'ann_file': 'data/VOCdevkit/VOC2007/ImageSets/Main/test.txt', 'img_prefix': 'data/VOCdevkit/VOC2007/', 'pipeline': [{ 'type': 'LoadImageFrom...
26.708333
69
0.666147
import pytest from mmdet.datasets import DATASETS def test_xml_dataset(): dataconfig = { 'ann_file': 'data/VOCdevkit/VOC2007/ImageSets/Main/test.txt', 'img_prefix': 'data/VOCdevkit/VOC2007/', 'pipeline': [{ 'type': 'LoadImageFromFile' }] } XMLDataset = DATASETS...
true
true
f72f1410ab89a22b8401c8e0baede753bd6f5c48
10,693
py
Python
src/python/pants/base/specs.py
rcuza/pants
0429258b181986eed856ae45af93b776727774a0
[ "Apache-2.0" ]
1
2021-02-22T18:11:26.000Z
2021-02-22T18:11:26.000Z
src/python/pants/base/specs.py
rcuza/pants
0429258b181986eed856ae45af93b776727774a0
[ "Apache-2.0" ]
null
null
null
src/python/pants/base/specs.py
rcuza/pants
0429258b181986eed856ae45af93b776727774a0
[ "Apache-2.0" ]
2
2021-05-11T07:51:26.000Z
2021-05-19T10:14:46.000Z
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import itertools import os from abc import ABC, ABCMeta, abstractmethod from dataclasses import dataclass from typing import TYPE_CHECKING, Iterable, Ma...
32.901538
100
0.666511
from __future__ import annotations import itertools import os from abc import ABC, ABCMeta, abstractmethod from dataclasses import dataclass from typing import TYPE_CHECKING, Iterable, Mapping, Sequence, Tuple from pants.base.exceptions import ResolveError from pants.build_graph.address import Address from pants.eng...
true
true
f72f15c5de015caaeac2371e1ce51f83332786d4
1,144
py
Python
lib/datasets/synthetic_example.py
liulu112601/AutoDL-Projects
59d07b63420837f56ea45b678784e299612477c3
[ "MIT" ]
null
null
null
lib/datasets/synthetic_example.py
liulu112601/AutoDL-Projects
59d07b63420837f56ea45b678784e299612477c3
[ "MIT" ]
null
null
null
lib/datasets/synthetic_example.py
liulu112601/AutoDL-Projects
59d07b63420837f56ea45b678784e299612477c3
[ "MIT" ]
null
null
null
##################################################### # Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2021.04 # ##################################################### import copy from .math_dynamic_funcs import DynamicQuadraticFunc from .math_adv_funcs import ConstantFunc, ComposedSinFunc from .synthetic_env import Synthet...
30.105263
73
0.657343
import copy from .math_dynamic_funcs import DynamicQuadraticFunc from .math_adv_funcs import ConstantFunc, ComposedSinFunc from .synthetic_env import SyntheticDEnv def create_example_v1( timestamp_config=None, num_per_task=5000, ): mean_generator = ComposedSinFunc() std_generator = ComposedSinFunc(mi...
true
true
f72f163111d0ad06a68b563a14a17a629ddccdab
756
py
Python
milarun/lib/monitor.py
laceyg/milabench
a314094a406c2e98a932f6d4f3a9588a991148d3
[ "MIT" ]
7
2020-07-09T18:55:00.000Z
2022-03-31T19:51:29.000Z
milarun/lib/monitor.py
laceyg/milabench
a314094a406c2e98a932f6d4f3a9588a991148d3
[ "MIT" ]
6
2020-07-02T08:58:39.000Z
2021-02-01T20:31:28.000Z
milarun/lib/monitor.py
laceyg/milabench
a314094a406c2e98a932f6d4f3a9588a991148d3
[ "MIT" ]
8
2020-06-19T17:16:19.000Z
2022-03-31T19:34:49.000Z
import GPUtil from threading import Thread import time class GPUMonitor(Thread): def __init__(self, delay): super().__init__() self.stopped = False self.delay = delay self.data = { g.id: dict( load=[], memory=[], temperatu...
24.387097
57
0.492063
import GPUtil from threading import Thread import time class GPUMonitor(Thread): def __init__(self, delay): super().__init__() self.stopped = False self.delay = delay self.data = { g.id: dict( load=[], memory=[], temperatu...
true
true
f72f168e38670fee460a5423e951a0f83d8cd4f5
702
py
Python
matplotlib/matplotlib_test/plot_lib_test.py
alphaciel/Balancing-Robot-Raspberry-Pi-DIY
8a61acf688ea0915017c40eaff3841a9b219f9b7
[ "MIT" ]
null
null
null
matplotlib/matplotlib_test/plot_lib_test.py
alphaciel/Balancing-Robot-Raspberry-Pi-DIY
8a61acf688ea0915017c40eaff3841a9b219f9b7
[ "MIT" ]
null
null
null
matplotlib/matplotlib_test/plot_lib_test.py
alphaciel/Balancing-Robot-Raspberry-Pi-DIY
8a61acf688ea0915017c40eaff3841a9b219f9b7
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np from matplotlib.widgets import Slider, Button, RadioButtons fig = plt.figure() ax = fig.add_subplot(111) fig.subplots_adjust(left=0.25, bottom=0.25) min0 = 0 max0 = 25000 im = max0 * np.random.random((10,10)) im1 = ax.imshow(im) fig.colorbar(im1) axcolor = 'lightgol...
25.071429
63
0.709402
import matplotlib.pyplot as plt import numpy as np from matplotlib.widgets import Slider, Button, RadioButtons fig = plt.figure() ax = fig.add_subplot(111) fig.subplots_adjust(left=0.25, bottom=0.25) min0 = 0 max0 = 25000 im = max0 * np.random.random((10,10)) im1 = ax.imshow(im) fig.colorbar(im1) axcolor = 'lightgol...
true
true
f72f16a11c68a6687ece2fc6cae8e47c19ce6f15
613
py
Python
src/rakali/transforms.py
sthysel/rakali
d641b8f75e7bbbd4ab973060658f5b30d24e99ff
[ "MIT" ]
6
2019-02-17T01:23:39.000Z
2021-01-13T23:01:16.000Z
src/rakali/transforms.py
sthysel/rakali
d641b8f75e7bbbd4ab973060658f5b30d24e99ff
[ "MIT" ]
1
2020-09-09T19:52:17.000Z
2021-09-13T08:25:44.000Z
src/rakali/transforms.py
sthysel/rakali
d641b8f75e7bbbd4ab973060658f5b30d24e99ff
[ "MIT" ]
3
2021-07-21T14:09:43.000Z
2021-08-22T15:03:48.000Z
import cv2 as cv def scale(img, scale): """scale preserving aspect ratio""" return resize(img, x_scale=scale, y_scale=scale) def resize(img, x_scale, y_scale, optimize=True): """resize image by scaling using provided factors""" interpolation = cv.INTER_LINEAR # pick an optimized scaler if asked...
22.703704
56
0.619902
import cv2 as cv def scale(img, scale): return resize(img, x_scale=scale, y_scale=scale) def resize(img, x_scale, y_scale, optimize=True): interpolation = cv.INTER_LINEAR if optimize: if x_scale > 1 and y_scale > 1: interpolation = cv.INTER_CUBIC else: interp...
true
true
f72f17683039c31b552fe4aaaab293ebc4b067b4
1,380
py
Python
load_isbi.py
lone17/deform-conv
3502cedbeae61c961d7e988382c55b9d45fd1873
[ "MIT" ]
null
null
null
load_isbi.py
lone17/deform-conv
3502cedbeae61c961d7e988382c55b9d45fd1873
[ "MIT" ]
null
null
null
load_isbi.py
lone17/deform-conv
3502cedbeae61c961d7e988382c55b9d45fd1873
[ "MIT" ]
null
null
null
from keras.preprocessing.image import ImageDataGenerator data_gen_args = dict(rescale=1./255, rotation_range=0.2, shear_range=0.2, zoom_range=0.2, width_shift_range=0.1, height_shift_range=0.1, ...
41.818182
81
0.588406
from keras.preprocessing.image import ImageDataGenerator data_gen_args = dict(rescale=1./255, rotation_range=0.2, shear_range=0.2, zoom_range=0.2, width_shift_range=0.1, height_shift_range=0.1, ...
true
true
f72f183dad87e98bbd6b38f75d1d545a70ce6384
2,519
py
Python
parser/fase2/team10/sql/Instrucciones/Sql_alter/AlterTableAlterColumn.py
Gabriel-15/tytus
fb00718bf3fcc5211a3604fba1a551f44bdc6deb
[ "MIT" ]
35
2020-12-07T03:11:43.000Z
2021-04-15T17:38:16.000Z
parser/fase2/team10/sql/Instrucciones/Sql_alter/AlterTableAlterColumn.py
Gabriel-15/tytus
fb00718bf3fcc5211a3604fba1a551f44bdc6deb
[ "MIT" ]
47
2020-12-09T01:29:09.000Z
2021-01-13T05:37:50.000Z
parser/fase2/team10/sql/Instrucciones/Sql_alter/AlterTableAlterColumn.py
Gabriel-15/tytus
fb00718bf3fcc5211a3604fba1a551f44bdc6deb
[ "MIT" ]
556
2020-12-07T03:13:31.000Z
2021-06-17T17:41:10.000Z
from sql.Instrucciones.TablaSimbolos.Instruccion import Instruccion from sql.Instrucciones.Sql_create.Tipo_Constraint import Tipo_Constraint, Tipo_Dato_Constraint from sql.Instrucciones.Excepcion import Excepcion class AlterTableAlterColumn(Instruccion): def __init__(self, tabla, col, strGram, linea, columna): ...
51.408163
132
0.579595
from sql.Instrucciones.TablaSimbolos.Instruccion import Instruccion from sql.Instrucciones.Sql_create.Tipo_Constraint import Tipo_Constraint, Tipo_Dato_Constraint from sql.Instrucciones.Excepcion import Excepcion class AlterTableAlterColumn(Instruccion): def __init__(self, tabla, col, strGram, linea, columna): ...
true
true
f72f18abb7dcfee0f3b682427c6f42194a6ada0f
6,676
py
Python
KaboomImages.py
Toinas/IntelligentSuit
f3d33b327406d899d18ecf5fd6a100b0c786fdce
[ "MIT" ]
null
null
null
KaboomImages.py
Toinas/IntelligentSuit
f3d33b327406d899d18ecf5fd6a100b0c786fdce
[ "MIT" ]
null
null
null
KaboomImages.py
Toinas/IntelligentSuit
f3d33b327406d899d18ecf5fd6a100b0c786fdce
[ "MIT" ]
null
null
null
Kaboom_0=[ 0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0, 0,0,0,2,2,2,2,2,2,0,0,0,0,0,0,0, 0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0, 0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0, 0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0, 0,0,2,1,1,1,1,1,1,2,0,0,0,0,2,2, 0,0,2,1,1,1,1,1,1,2,0,0,0,0,2,2, 0,0,2,1,2,1,1,2,1,2,0,0,0,0,0,0, 0,0,2,1,1,1,1,1,1,2,0,0,0,0,0,3, 0,...
32.407767
44
0.474835
Kaboom_0=[ 0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0, 0,0,0,2,2,2,2,2,2,0,0,0,0,0,0,0, 0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0, 0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0, 0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0, 0,0,2,1,1,1,1,1,1,2,0,0,0,0,2,2, 0,0,2,1,1,1,1,1,1,2,0,0,0,0,2,2, 0,0,2,1,2,1,1,2,1,2,0,0,0,0,0,0, 0,0,2,1,1,1,1,1,1,2,0,0,0,0,0,3, 0,...
true
true
f72f190a17b6b82a72841a82dddb9b59a381bfe5
197
py
Python
worldclock/views.py
arminfriedl/netclock
f83f0faa1f2c8f06dc04d2d6de315a7b35f1c361
[ "MIT" ]
null
null
null
worldclock/views.py
arminfriedl/netclock
f83f0faa1f2c8f06dc04d2d6de315a7b35f1c361
[ "MIT" ]
null
null
null
worldclock/views.py
arminfriedl/netclock
f83f0faa1f2c8f06dc04d2d6de315a7b35f1c361
[ "MIT" ]
null
null
null
from flask import render_template, request, flash, redirect, url_for, session from . import app @app.route('', methods=['GET']) def create(): return render_template("worldclock/create.html")
24.625
77
0.736041
from flask import render_template, request, flash, redirect, url_for, session from . import app @app.route('', methods=['GET']) def create(): return render_template("worldclock/create.html")
true
true
f72f1912a1ea4ca3114f0a355e5ee07788eceb1f
1,182
py
Python
pyairwatch/system/users.py
jprichards/PyVMwareAirWatch
ac25185d1f6a001c9670d57d11a3047553f743a1
[ "MIT" ]
17
2018-03-19T05:52:37.000Z
2022-03-09T16:41:03.000Z
pyairwatch/system/users.py
marshall-brown/PyVMwareAirWatch
ac25185d1f6a001c9670d57d11a3047553f743a1
[ "MIT" ]
2
2018-12-06T17:12:54.000Z
2019-08-27T09:57:13.000Z
pyairwatch/system/users.py
marshall-brown/PyVMwareAirWatch
ac25185d1f6a001c9670d57d11a3047553f743a1
[ "MIT" ]
9
2018-04-02T18:42:51.000Z
2020-06-10T02:11:05.000Z
class Users(object): def __init__(self, client): self.client = client #UNTESTED def search(self, **kwargs): """ Returns the Enrollment User's details matching the search parameters /api/system/users/search?{params} PARAMS: username={username} ...
35.818182
130
0.628596
class Users(object): def __init__(self, client): self.client = client def search(self, **kwargs): response = self._get(path='/users/search', params=kwargs) return response def _get(self, module='system', path=None, version=None, params=None, header=None): response = se...
true
true
f72f1930dfc31b7280f1354dfad37771fff132eb
14,948
py
Python
veroviz/getTimeDist3D.py
optimatorlab/veroviz
4b4b7da07abbc764169223cc4cac41e19ff7031d
[ "MIT" ]
16
2019-11-05T06:33:21.000Z
2022-02-09T04:37:03.000Z
veroviz/getTimeDist3D.py
optimatorlab/veroviz
4b4b7da07abbc764169223cc4cac41e19ff7031d
[ "MIT" ]
6
2019-11-22T09:38:01.000Z
2021-06-18T02:08:43.000Z
veroviz/getTimeDist3D.py
optimatorlab/veroviz
4b4b7da07abbc764169223cc4cac41e19ff7031d
[ "MIT" ]
4
2020-09-25T07:48:56.000Z
2022-02-09T04:39:54.000Z
from veroviz._common import * from veroviz._validation import * from veroviz._buildFlightProfile import buildNoLoiteringFlight from veroviz._buildFlightProfile import getTimeDistFromFlight from veroviz._utilities import privConvertDistance from veroviz._utilities import privConvertTime def getTimeDist3D(nodes=None, ...
71.865385
1,154
0.711466
from veroviz._common import * from veroviz._validation import * from veroviz._buildFlightProfile import buildNoLoiteringFlight from veroviz._buildFlightProfile import getTimeDistFromFlight from veroviz._utilities import privConvertDistance from veroviz._utilities import privConvertTime def getTimeDist3D(nodes=None, ...
true
true
f72f19389baf6383e97fcdeeb7e0ff036c8208a5
1,325
py
Python
youtuatools/extractor/unity.py
Pagasis/YouTua
edb44b2065a7224f8b26aaf76166bf7287901567
[ "MIT" ]
47
2021-01-02T07:44:50.000Z
2022-02-28T22:02:13.000Z
nextdl/extractor/unity.py
devenu85/nextdl
0b458f556e2e0be80cb94bd9a9b1405ad2e9182d
[ "MIT" ]
4
2021-02-07T03:35:13.000Z
2021-10-31T19:23:53.000Z
nextdl/extractor/unity.py
devenu85/nextdl
0b458f556e2e0be80cb94bd9a9b1405ad2e9182d
[ "MIT" ]
8
2021-01-03T05:44:39.000Z
2021-11-01T05:46:32.000Z
from __future__ import unicode_literals from .common import InfoExtractor from .youtube import YoutubeIE class UnityIE(InfoExtractor): _VALID_URL = ( r"https?://(?:www\.)?unity3d\.com/learn/tutorials/(?:[^/]+/)*(?P<id>[^/?#&]+)" ) _TESTS = [ { "url": "https://unity3d.com/learn...
34.868421
121
0.556226
from __future__ import unicode_literals from .common import InfoExtractor from .youtube import YoutubeIE class UnityIE(InfoExtractor): _VALID_URL = ( r"https?://(?:www\.)?unity3d\.com/learn/tutorials/(?:[^/]+/)*(?P<id>[^/?#&]+)" ) _TESTS = [ { "url": "https://unity3d.com/learn...
true
true
f72f19778b0b87aa95ac05b779fa868ad2422b2a
256
py
Python
pybat/__init__.py
mbercx/pybat
e0cf610fd06a97979f5ec70757406de1f9a788ef
[ "MIT" ]
3
2019-04-08T13:10:15.000Z
2021-07-04T07:23:49.000Z
pybat/__init__.py
mbercx/pybat
e0cf610fd06a97979f5ec70757406de1f9a788ef
[ "MIT" ]
1
2019-02-28T12:51:57.000Z
2019-02-28T12:51:57.000Z
pybat/__init__.py
mbercx/pybat
e0cf610fd06a97979f5ec70757406de1f9a788ef
[ "MIT" ]
4
2018-07-30T12:58:35.000Z
2020-03-05T20:09:46.000Z
# These import commands make importing core classes easier, e.g. you can just import # Cathode using: # # from pybat import Cathode # # Instead of: # # from pybat.core import Cathode # from pybat.core import Cathode, LiRichCathode, Dimer, DimerNEBAnalysis
23.272727
84
0.765625
from pybat.core import Cathode, LiRichCathode, Dimer, DimerNEBAnalysis
true
true
f72f19dca994b161669b0dcdd2b3c6e2c7ce4f8d
308
py
Python
src/scripts/chmTools/module.py
Matej-Chmel/approximate-knn
4d29dc285f50fcdce1c3052472959f789c46cc70
[ "MIT" ]
null
null
null
src/scripts/chmTools/module.py
Matej-Chmel/approximate-knn
4d29dc285f50fcdce1c3052472959f789c46cc70
[ "MIT" ]
null
null
null
src/scripts/chmTools/module.py
Matej-Chmel/approximate-knn
4d29dc285f50fcdce1c3052472959f789c46cc70
[ "MIT" ]
null
null
null
from .runner import AppError, checkInsideVenv, insideVenv, wrapMain checkInsideVenv() from .configParam import getConfigPath from .Dataset import Dataset from .export import getExportedData from .jsonTypeCheck import configStr, getDictValue, getRoot from .RecallTable import RecallTable, RecallTableConfig
30.8
67
0.847403
from .runner import AppError, checkInsideVenv, insideVenv, wrapMain checkInsideVenv() from .configParam import getConfigPath from .Dataset import Dataset from .export import getExportedData from .jsonTypeCheck import configStr, getDictValue, getRoot from .RecallTable import RecallTable, RecallTableConfig
true
true
f72f1ae9e9ef3f419c5a8e7fe69af1c394dd4b59
285
py
Python
exercicios/ex020.py
MaikolSantos/curso-em-video-python3
3a1ab2761b8a0f98e128083a7b0e50b19a75b7bf
[ "MIT" ]
null
null
null
exercicios/ex020.py
MaikolSantos/curso-em-video-python3
3a1ab2761b8a0f98e128083a7b0e50b19a75b7bf
[ "MIT" ]
null
null
null
exercicios/ex020.py
MaikolSantos/curso-em-video-python3
3a1ab2761b8a0f98e128083a7b0e50b19a75b7bf
[ "MIT" ]
null
null
null
from random import shuffle a1 = input('Digite o nome do Aluno 1: ') a2 = input('Digite o nome do Aluno 2: ') a3 = input('Digite o nome do Aluno 3: ') a4 = input('Digite o nome do Aluno 4: ') deck = [a1, a2, a3, a4] shuffle(deck) print('A ordem de apresentação será: {}'.format(deck))
28.5
54
0.663158
from random import shuffle a1 = input('Digite o nome do Aluno 1: ') a2 = input('Digite o nome do Aluno 2: ') a3 = input('Digite o nome do Aluno 3: ') a4 = input('Digite o nome do Aluno 4: ') deck = [a1, a2, a3, a4] shuffle(deck) print('A ordem de apresentação será: {}'.format(deck))
true
true
f72f1bae0e6194d644c89e50750e438c176f29ce
1,867
py
Python
service/es_utils.py
LandRegistry/digital-register-elasticsearch-updater
2e7b95d8d5eac70e9bba6612bed09bf58376e781
[ "MIT" ]
null
null
null
service/es_utils.py
LandRegistry/digital-register-elasticsearch-updater
2e7b95d8d5eac70e9bba6612bed09bf58376e781
[ "MIT" ]
12
2015-06-05T15:10:25.000Z
2016-04-21T15:17:19.000Z
service/es_utils.py
LandRegistry/digital-register-elasticsearch-updater
2e7b95d8d5eac70e9bba6612bed09bf58376e781
[ "MIT" ]
1
2021-04-11T06:03:41.000Z
2021-04-11T06:03:41.000Z
from elasticsearch import Elasticsearch # type: ignore from elasticsearch.client import IndicesClient # type: ignore from elasticsearch.helpers import bulk # type: ignore import logging from config import CONFIG_DICT LOGGER = logging.getLogger(__name__) ELASTICSEARCH_NODES = [CONFIG_DICT['ELASTICS...
26.671429
96
0.681843
from elasticsearch import Elasticsearch from elasticsearch.client import IndicesClient from elasticsearch.helpers import bulk import logging from config import CONFIG_DICT LOGGER = logging.getLogger(__name__) ELASTICSEARCH_NODES = [CONFIG_DICT['ELASTICSEARCH_URI']] elasticsearch_client = Elastics...
true
true
f72f1bee9e17f5e0644db620d7e3407dcb35a5dc
716
py
Python
src/pre_R1956001.py
atrettel/sheardata
db09d70ba464e24bdb2fb7729b6f3e905af68d72
[ "MIT" ]
2
2020-04-27T19:56:07.000Z
2022-02-27T22:16:19.000Z
src/pre_R1956001.py
atrettel/sheardata
db09d70ba464e24bdb2fb7729b6f3e905af68d72
[ "MIT" ]
null
null
null
src/pre_R1956001.py
atrettel/sheardata
db09d70ba464e24bdb2fb7729b6f3e905af68d72
[ "MIT" ]
1
2021-11-05T18:39:35.000Z
2021-11-05T18:39:35.000Z
#!/usr/bin/env python3 # Copyright (C) 2020-2021 Andrew Trettel # # SPDX-License-Identifier: MIT import csv import math import sqlite3 import sheardata as sd import sys conn = sqlite3.connect( sys.argv[1] ) cursor = conn.cursor() cursor.execute( "PRAGMA foreign_keys = ON;" ) flow_class = sd.FC_BOUNDARY_DRIVEN_F...
21.058824
86
0.736034
import csv import math import sqlite3 import sheardata as sd import sys conn = sqlite3.connect( sys.argv[1] ) cursor = conn.cursor() cursor.execute( "PRAGMA foreign_keys = ON;" ) flow_class = sd.FC_BOUNDARY_DRIVEN_FLOW year = 1956 study_number = 1 study_id = sd.add_study( cursor, flow_class_id=...
true
true
f72f1c4792e80f4b2c6d910802fa3060425bf488
8,356
py
Python
pythonExamples/fileIngestModule.py
trac3me/autopsy
ff70cdd19bfad1b4966c5e25933035daba132535
[ "Apache-2.0" ]
1
2015-01-31T19:20:43.000Z
2015-01-31T19:20:43.000Z
pythonExamples/fileIngestModule.py
trac3me/autopsy
ff70cdd19bfad1b4966c5e25933035daba132535
[ "Apache-2.0" ]
null
null
null
pythonExamples/fileIngestModule.py
trac3me/autopsy
ff70cdd19bfad1b4966c5e25933035daba132535
[ "Apache-2.0" ]
null
null
null
# Sample module in the public domain. Feel free to use this as a template # for your modules (and you can remove this header and take complete credit # and liability) # # Contact: Brian Carrier [carrier <at> sleuthkit [dot] org] # # This is free and unencumbered software released into the public domain. # # Anyone is f...
49.443787
131
0.732049
import jarray import inspect from java.lang import System from java.util.logging import Level from org.sleuthkit.datamodel import Score from org.sleuthkit.datamodel import SleuthkitCase from org.sleuthkit.datamodel import AbstractFile from org.sleuthkit.datamodel import ReadContentInputStream from org.sleuthkit.datam...
true
true
f72f1c9c7960ef51f7a686696065cb2abe68dd75
144
py
Python
django_async_redis/__init__.py
adamchainz/django-async-redis
e9a54ba885fa76e504ff18726f333264585da34a
[ "Apache-2.0" ]
14
2020-10-06T18:29:07.000Z
2021-10-02T05:11:14.000Z
django_async_redis/__init__.py
adamchainz/django-async-redis
e9a54ba885fa76e504ff18726f333264585da34a
[ "Apache-2.0" ]
4
2020-10-06T18:38:09.000Z
2021-08-24T20:38:54.000Z
django_async_redis/__init__.py
adamchainz/django-async-redis
e9a54ba885fa76e504ff18726f333264585da34a
[ "Apache-2.0" ]
4
2020-10-07T07:13:21.000Z
2022-01-27T21:28:30.000Z
"""Top-level package for Django Async Redis.""" __author__ = """Andrew Chen Wang""" __email__ = "acwangpython@gmail.com" __version__ = "0.1.0"
24
47
0.701389
__author__ = """Andrew Chen Wang""" __email__ = "acwangpython@gmail.com" __version__ = "0.1.0"
true
true
f72f1e8b1425ad70062469566557c13ef9b23423
16,879
py
Python
models/transformer.py
Honghe/AnchorDETR
fc3d45441241cd689b28878d3aa4b0bffb33a8b8
[ "Apache-2.0" ]
null
null
null
models/transformer.py
Honghe/AnchorDETR
fc3d45441241cd689b28878d3aa4b0bffb33a8b8
[ "Apache-2.0" ]
null
null
null
models/transformer.py
Honghe/AnchorDETR
fc3d45441241cd689b28878d3aa4b0bffb33a8b8
[ "Apache-2.0" ]
null
null
null
# ------------------------------------------------------------------------ # Copyright (c) 2021 megvii-model. All Rights Reserved. # ------------------------------------------------------------------------ # Modified from Deformable DETR (https://github.com/fundamentalvision/Deformable-DETR) # Copyright (c) 2020 SenseT...
39.071759
161
0.598377
import copy from typing import Optional, List import math import torch import torch.nn.functional as F from torch import nn, Tensor from util.misc import inverse_sigmoid from models.row_column_decoupled_attention import MultiheadRCDA class Transformer(nn.Module): def __init__(self, d_model=256, nhead=8, ...
true
true
f72f1e928139d4f1f8e92e1e0291db259b10cc61
8,261
py
Python
src/problem3.py
mcgeeml/06-Exam1Practice
721f95eda65e0f5bd2ae541bc028e1d5dc9e6b47
[ "MIT" ]
null
null
null
src/problem3.py
mcgeeml/06-Exam1Practice
721f95eda65e0f5bd2ae541bc028e1d5dc9e6b47
[ "MIT" ]
null
null
null
src/problem3.py
mcgeeml/06-Exam1Practice
721f95eda65e0f5bd2ae541bc028e1d5dc9e6b47
[ "MIT" ]
null
null
null
""" PRACTICE Exam 1, problem 3. Authors: David Mutchler, Vibha Alangar, Valerie Galluzzi, Mark Hays, Amanda Stouder, their colleagues and Myon McGee. """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE. import rosegraphics as rg ######################################################################## # Students...
37.211712
72
0.507808
import rosegraphics as rg def main(): run_test_problem3a() run_test_problem3b() def run_test_problem3a(): title = 'Problem 3a. Test 1: Start at (30, 30), 6 lines' window1 = rg.RoseWindow(350, 200, title) point = rg.Point(30, 30) expected = 3...
true
true
f72f1fb175ba5701b831b4c399b500717379e533
1,591
py
Python
examples/01_plotting/plot_colormaps.py
SIMEXP/nilearn
4f51aea58f38689ca32c2edd748528d521e6cfb0
[ "BSD-2-Clause" ]
827
2015-01-30T23:11:42.000Z
2022-03-29T21:21:05.000Z
examples/01_plotting/plot_colormaps.py
SIMEXP/nilearn
4f51aea58f38689ca32c2edd748528d521e6cfb0
[ "BSD-2-Clause" ]
2,845
2015-01-04T22:14:41.000Z
2022-03-31T20:28:09.000Z
examples/01_plotting/plot_colormaps.py
SIMEXP/nilearn
4f51aea58f38689ca32c2edd748528d521e6cfb0
[ "BSD-2-Clause" ]
484
2015-02-03T10:58:19.000Z
2022-03-29T21:57:16.000Z
""" Matplotlib colormaps in Nilearn ================================ Visualize HCP connectome workbench color maps shipped with Nilearn which can be used for plotting brain images on surface. See :ref:`surface-plotting` for surface plotting details. """ import numpy as np import matplotlib.pyplot as plt from nilearn...
30.596154
75
0.606537
import numpy as np import matplotlib.pyplot as plt from nilearn.plotting.cm import _cmap_d as nilearn_cmaps from nilearn.plotting import show nmaps = len(nilearn_cmaps) a = np.outer(np.arange(0, 1, 0.01), np.ones(10)) plt.figure(figsize=(10, 4.2)) plt.subplots_adjust(top=0.4, bottom=0.05, left=0.01, right=0.99) fo...
true
true
f72f2071f1e1301bd9f2a6ccbf675cb274979e21
684
py
Python
setup.py
pmartin23/metapub
7dc3f2321720191d461056deeaedf69cd1479157
[ "Apache-2.0" ]
null
null
null
setup.py
pmartin23/metapub
7dc3f2321720191d461056deeaedf69cd1479157
[ "Apache-2.0" ]
3
2019-11-14T23:36:14.000Z
2020-11-05T20:42:50.000Z
setup.py
pmartin23/metapub
7dc3f2321720191d461056deeaedf69cd1479157
[ "Apache-2.0" ]
1
2018-02-08T12:25:12.000Z
2018-02-08T12:25:12.000Z
import glob, os from setuptools import setup, find_packages setup( name = 'metapub', version = '0.4.3.5', description = 'Pubmed / NCBI / eutils interaction library, handling the metadata of pubmed papers.', url = 'https://bitbucket.org/metapub/metapub', author = 'Naomi Most', maintainer = 'Nao...
24.428571
104
0.574561
import glob, os from setuptools import setup, find_packages setup( name = 'metapub', version = '0.4.3.5', description = 'Pubmed / NCBI / eutils interaction library, handling the metadata of pubmed papers.', url = 'https://bitbucket.org/metapub/metapub', author = 'Naomi Most', maintainer = 'Nao...
true
true
f72f20b73a9f992e3e7d7b8d15bee88e20b845b2
13,740
py
Python
rltoolkit/rl.py
raznem/sac_ppo
c18e9bd32a70fcc4bc413565c6b885d7560b8b5a
[ "MIT" ]
null
null
null
rltoolkit/rl.py
raznem/sac_ppo
c18e9bd32a70fcc4bc413565c6b885d7560b8b5a
[ "MIT" ]
null
null
null
rltoolkit/rl.py
raznem/sac_ppo
c18e9bd32a70fcc4bc413565c6b885d7560b8b5a
[ "MIT" ]
null
null
null
import logging from pathlib import Path from typing import Any, Optional, Tuple, Union import gym import torch import pickle as pkl from rltoolkit import config, utils from rltoolkit.buffer import Memory from rltoolkit.stats_logger import StatsLogger from rltoolkit.tensorboard_logger import TensorboardWriter logger ...
35.412371
88
0.605968
import logging from pathlib import Path from typing import Any, Optional, Tuple, Union import gym import torch import pickle as pkl from rltoolkit import config, utils from rltoolkit.buffer import Memory from rltoolkit.stats_logger import StatsLogger from rltoolkit.tensorboard_logger import TensorboardWriter logger ...
true
true
f72f22453b31c307baa4b3ff658060219127ff43
2,989
py
Python
main_window.py
isu-enterprise/dacha
5f8444e156fbed102fd7e25f9f3766538434659e
[ "Apache-2.0" ]
null
null
null
main_window.py
isu-enterprise/dacha
5f8444e156fbed102fd7e25f9f3766538434659e
[ "Apache-2.0" ]
null
null
null
main_window.py
isu-enterprise/dacha
5f8444e156fbed102fd7e25f9f3766538434659e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui/main-window.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): M...
42.7
75
0.71094
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(673, 558) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") M...
true
true
f72f226a2107b3a3b8e9d4e622c36bce5ef81935
13,892
py
Python
rfcs/0010-eaglesong/eaglesong.py
malinoisls01/npx-create-react-app-react-i18n-app-cd-react-i18n-app
ab7d16b9afae8cd9523f0f3afb46dbca83cd42e5
[ "MIT" ]
256
2018-11-28T04:00:20.000Z
2022-03-14T13:46:51.000Z
rfcs/0010-eaglesong/eaglesong.py
malinoisls01/npx-create-react-app-react-i18n-app-cd-react-i18n-app
ab7d16b9afae8cd9523f0f3afb46dbca83cd42e5
[ "MIT" ]
122
2018-11-28T05:20:37.000Z
2022-03-18T02:31:50.000Z
rfcs/0010-eaglesong/eaglesong.py
malinoisls01/npx-create-react-app-react-i18n-app-cd-react-i18n-app
ab7d16b9afae8cd9523f0f3afb46dbca83cd42e5
[ "MIT" ]
155
2018-11-28T04:52:13.000Z
2022-03-28T23:21:12.000Z
def PrintState( state ): s = "" for i in range(0, 16): s += "0x%08x" % state[i] s += " " print(s) def EaglesongPermutation( state ): N = 43 #PrintState(state) for i in range(0, N): state = EaglesongRound(state, i) return state def EaglesongRound( state, index ): ...
75.5
213
0.628707
def PrintState( state ): s = "" for i in range(0, 16): s += "0x%08x" % state[i] s += " " print(s) def EaglesongPermutation( state ): N = 43 for i in range(0, N): state = EaglesongRound(state, i) return state def EaglesongRound( state, index ): bitmatrix = [[...
true
true
f72f22a0fe94fdce3a0eac34cb4c8736d4df683c
19,363
py
Python
pynndescent/utils.py
samggreenberg/pynndescent
f97bc2fe01e4e59c5dad20ed23b9cb47e8182b6c
[ "BSD-2-Clause" ]
null
null
null
pynndescent/utils.py
samggreenberg/pynndescent
f97bc2fe01e4e59c5dad20ed23b9cb47e8182b6c
[ "BSD-2-Clause" ]
null
null
null
pynndescent/utils.py
samggreenberg/pynndescent
f97bc2fe01e4e59c5dad20ed23b9cb47e8182b6c
[ "BSD-2-Clause" ]
null
null
null
# Author: Leland McInnes <leland.mcinnes@gmail.com> # # License: BSD 2 clause import time import numba from numba.core import types import numba.experimental.structref as structref import numpy as np @numba.njit("void(i8[:], i8)", cache=True) def seed(rng_state, seed): """Seed the random number generator with a...
27.157083
97
0.549553
import time import numba from numba.core import types import numba.experimental.structref as structref import numpy as np @numba.njit("void(i8[:], i8)", cache=True) def seed(rng_state, seed): rng_state.fill(seed + 0xFFFF) @numba.njit("i4(i8[:])", cache=True) def tau_rand_int(state): state[0] = (((state[0]...
true
true
f72f232db2207147d84c9324167fdd40d2261e65
548
py
Python
backend/manage.py
Web-Multi-Media/HttpStreamingServer
c062840b1323f6a5b35a1d7d26542a0fd6e77b0e
[ "MIT" ]
5
2019-12-25T16:28:26.000Z
2022-03-22T11:05:16.000Z
backend/manage.py
Web-Multi-Media/HttpStreamingServer
c062840b1323f6a5b35a1d7d26542a0fd6e77b0e
[ "MIT" ]
26
2019-11-14T16:03:26.000Z
2022-02-10T11:56:04.000Z
backend/manage.py
Web-Multi-Media/HttpStreamingServer
c062840b1323f6a5b35a1d7d26542a0fd6e77b0e
[ "MIT" ]
2
2020-09-01T09:25:14.000Z
2020-10-09T12:06:35.000Z
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'StreamingServer.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Dja...
32.235294
79
0.689781
import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'StreamingServer.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's...
true
true
f72f24046e5fa65b5ee35e45bd348bb5ccc79c50
861
py
Python
ooobuild/dyn/chart/chart_axis_y_supplier.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/chart/chart_axis_y_supplier.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/chart/chart_axis_y_supplier.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
33.115385
86
0.763066
from ...lo.chart.chart_axis_y_supplier import ChartAxisYSupplier as ChartAxisYSupplier __all__ = ['ChartAxisYSupplier']
true
true
f72f2566c3018af4ef5d78db70a1751fce0ba12b
4,040
py
Python
fugue_notebook/__init__.py
gityow/fugue
e975625b33766d8b9dc64c6954871569b59367ec
[ "Apache-2.0" ]
null
null
null
fugue_notebook/__init__.py
gityow/fugue
e975625b33766d8b9dc64c6954871569b59367ec
[ "Apache-2.0" ]
null
null
null
fugue_notebook/__init__.py
gityow/fugue
e975625b33766d8b9dc64c6954871569b59367ec
[ "Apache-2.0" ]
null
null
null
# flake8: noqa from typing import Any from fugue_version import __version__ from IPython import get_ipython from IPython.display import Javascript from fugue_notebook.env import NotebookSetup, _setup_fugue_notebook _HIGHLIGHT_JS = r""" require(["codemirror/lib/codemirror"]); function set(str) { var obj = {}, wor...
56.111111
1,543
0.746287
from typing import Any from fugue_version import __version__ from IPython import get_ipython from IPython.display import Javascript from fugue_notebook.env import NotebookSetup, _setup_fugue_notebook _HIGHLIGHT_JS = r""" require(["codemirror/lib/codemirror"]); function set(str) { var obj = {}, words = str.split(...
true
true
f72f25b50dcbfd6ed34ab185f0b12887078ac367
1,814
py
Python
prnet/utils/render_app.py
RonnyLV/PRNet
0c2ded7042ceee2b2f9bba02bc19d91d4c3993c5
[ "MIT" ]
null
null
null
prnet/utils/render_app.py
RonnyLV/PRNet
0c2ded7042ceee2b2f9bba02bc19d91d4c3993c5
[ "MIT" ]
null
null
null
prnet/utils/render_app.py
RonnyLV/PRNet
0c2ded7042ceee2b2f9bba02bc19d91d4c3993c5
[ "MIT" ]
null
null
null
import numpy as np from prnet.utils.render import vis_of_vertices, render_texture from scipy import ndimage def get_visibility(vertices, triangles, h, w): triangles = triangles.T vertices_vis = vis_of_vertices(vertices.T, triangles, h, w) vertices_vis = vertices_vis.astype(bool) for k in range(2): ...
45.35
110
0.691841
import numpy as np from prnet.utils.render import vis_of_vertices, render_texture from scipy import ndimage def get_visibility(vertices, triangles, h, w): triangles = triangles.T vertices_vis = vis_of_vertices(vertices.T, triangles, h, w) vertices_vis = vertices_vis.astype(bool) for k in range(2): ...
true
true
f72f26220b3eace9e7640d67550958c5c1e52ae2
969
py
Python
mysite/urls.py
taylorculver/Django_Project_Improvement
a03eb076eb170c0ec74d9edac515f826cf2ee30e
[ "Unlicense" ]
null
null
null
mysite/urls.py
taylorculver/Django_Project_Improvement
a03eb076eb170c0ec74d9edac515f826cf2ee30e
[ "Unlicense" ]
null
null
null
mysite/urls.py
taylorculver/Django_Project_Improvement
a03eb076eb170c0ec74d9edac515f826cf2ee30e
[ "Unlicense" ]
null
null
null
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
31.258065
77
0.69453
from django.conf.urls import include, url from django.contrib import admin from django.conf import settings urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'', include('menu.urls')), ] if settings.DEBUG: import debug_toolbar urlpatterns = [ url(r'^__debug__/', include(debug_to...
true
true
f72f28a8cc0117ce6a4927c59ca5ac49a7281a79
7,388
py
Python
cyder/base/mixins.py
zeeman/cyder
10d347e77554628e4c7af478d0f57b6c14a608ef
[ "BSD-3-Clause" ]
null
null
null
cyder/base/mixins.py
zeeman/cyder
10d347e77554628e4c7af478d0f57b6c14a608ef
[ "BSD-3-Clause" ]
null
null
null
cyder/base/mixins.py
zeeman/cyder
10d347e77554628e4c7af478d0f57b6c14a608ef
[ "BSD-3-Clause" ]
null
null
null
import os import fcntl from string import Template from django.core.urlresolvers import NoReverseMatch, reverse from django.db.models.loading import get_model from django.forms import ModelChoiceField, HiddenInput from django import forms from cyder.base.utils import filter_by_ctnr class DisplayMixin(object): #...
32.982143
79
0.569031
import os import fcntl from string import Template from django.core.urlresolvers import NoReverseMatch, reverse from django.db.models.loading import get_model from django.forms import ModelChoiceField, HiddenInput from django import forms from cyder.base.utils import filter_by_ctnr class DisplayMixin(object): ...
true
true
f72f2ae2da1a8824ea37a9d9fc536ef3fce7fc12
1,481
py
Python
tests/test.py
icetana-james/python-onvif-zeep
9947a3c203037857fbc04c9fafabc722e3436a13
[ "MIT" ]
null
null
null
tests/test.py
icetana-james/python-onvif-zeep
9947a3c203037857fbc04c9fafabc722e3436a13
[ "MIT" ]
null
null
null
tests/test.py
icetana-james/python-onvif-zeep
9947a3c203037857fbc04c9fafabc722e3436a13
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*-coding=utf-8 from __future__ import print_function, division import unittest from onvif import ONVIFCamera, ONVIFError CAM_HOST = '10.1.3.10' CAM_PORT = 80 CAM_USER = 'root' CAM_PASS = 'password' DEBUG = False def log(ret): if DEBUG: print(ret) class TestDevice(unittest.TestCas...
26.927273
69
0.627279
from __future__ import print_function, division import unittest from onvif import ONVIFCamera, ONVIFError CAM_HOST = '10.1.3.10' CAM_PORT = 80 CAM_USER = 'root' CAM_PASS = 'password' DEBUG = False def log(ret): if DEBUG: print(ret) class TestDevice(unittest.TestCase): cam = ONVIFCamera(CAM_HO...
true
true
f72f2bb0605f13d7ce68cd600bd8a6628eb6c15d
249
py
Python
scripts/fundamentals/codewars_sum_range_of_numbers.py
duttashi/learnpy
c08b76b173b06d66187e51a6939d55d5dd12cb5a
[ "MIT" ]
null
null
null
scripts/fundamentals/codewars_sum_range_of_numbers.py
duttashi/learnpy
c08b76b173b06d66187e51a6939d55d5dd12cb5a
[ "MIT" ]
77
2019-04-20T06:54:19.000Z
2022-01-16T08:15:20.000Z
scripts/fundamentals/codewars_sum_range_of_numbers.py
duttashi/learnpy
c08b76b173b06d66187e51a6939d55d5dd12cb5a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Sep 8 16:31:07 2020 @author: Ashish """ def get_sum(a,b): numsum=0 for i in range(a,b+1): numsum+=i return numsum print(get_sum(0,1))
12.45
36
0.457831
def get_sum(a,b): numsum=0 for i in range(a,b+1): numsum+=i return numsum print(get_sum(0,1))
true
true
f72f2c05186f829fbd3b433c815fb25ffb7d09a0
231
py
Python
core/templatetags/check_if_favorited_filter.py
jcquinlan/colophon
96f3eec0a524cb1fe3d655f3cc850b125f4aaff4
[ "MIT" ]
null
null
null
core/templatetags/check_if_favorited_filter.py
jcquinlan/colophon
96f3eec0a524cb1fe3d655f3cc850b125f4aaff4
[ "MIT" ]
null
null
null
core/templatetags/check_if_favorited_filter.py
jcquinlan/colophon
96f3eec0a524cb1fe3d655f3cc850b125f4aaff4
[ "MIT" ]
null
null
null
from django import template register = template.Library() @register.filter def check_if_favorited(document, user): """Returns boolean of whether or not a user favorited this document""" return document.is_favorited(user)
25.666667
74
0.770563
from django import template register = template.Library() @register.filter def check_if_favorited(document, user): return document.is_favorited(user)
true
true
f72f2dd7cff77a014d7828254d487da410fcc65b
2,757
py
Python
implementations/guidi2020/benchmark/PyAligner/test/test_matrix_init.py
r-barnes/sw_comparison
1ac2c9cc10a32badd6b8fb1e96516c97f7800176
[ "BSD-Source-Code" ]
null
null
null
implementations/guidi2020/benchmark/PyAligner/test/test_matrix_init.py
r-barnes/sw_comparison
1ac2c9cc10a32badd6b8fb1e96516c97f7800176
[ "BSD-Source-Code" ]
null
null
null
implementations/guidi2020/benchmark/PyAligner/test/test_matrix_init.py
r-barnes/sw_comparison
1ac2c9cc10a32badd6b8fb1e96516c97f7800176
[ "BSD-Source-Code" ]
null
null
null
import unittest from pyaligner import * class TestMatrixInit ( unittest.TestCase ): def test_matrix_init_global ( self ): scorer = Scorer( 5, -1, -3, 7 ) seqh = Sequence( "ACTG" ) seqv = Sequence( "ACAAA" ) matrix = DPMatrix( seqh, seqv, scorer ) self.assertEqual( matrix...
45.196721
73
0.488575
import unittest from pyaligner import * class TestMatrixInit ( unittest.TestCase ): def test_matrix_init_global ( self ): scorer = Scorer( 5, -1, -3, 7 ) seqh = Sequence( "ACTG" ) seqv = Sequence( "ACAAA" ) matrix = DPMatrix( seqh, seqv, scorer ) self.assertEqual( matrix...
true
true
f72f2e9ad66d303ddba9f56bb29c8a001bcf4f92
623
py
Python
visualization/__init__.py
svarthafnyra/CNN_Visualizations
a17615932519e67c7b7ec4ebaf030047dfd6d1e2
[ "MIT" ]
17
2019-08-13T06:07:13.000Z
2021-03-02T22:14:21.000Z
visualization/__init__.py
svarthafnyra/CAMP-Project
a17615932519e67c7b7ec4ebaf030047dfd6d1e2
[ "MIT" ]
null
null
null
visualization/__init__.py
svarthafnyra/CAMP-Project
a17615932519e67c7b7ec4ebaf030047dfd6d1e2
[ "MIT" ]
3
2019-12-16T09:08:10.000Z
2020-02-19T10:43:25.000Z
#from visualization.deep_dream import runDeepDream from visualization.gradcam import runGradCam from visualization.guided_backprop import runGBackProp from visualization.guided_gradcam import runGGradCam from visualization.smooth_grad import runsmoothGrad #from visualization.inverted_representation import runInvRep fr...
51.916667
60
0.900482
from visualization.gradcam import runGradCam from visualization.guided_backprop import runGBackProp from visualization.guided_gradcam import runGGradCam from visualization.smooth_grad import runsmoothGrad from visualization.vanilla_backprop import runVanillaBP from visualization.explain import runExplain from visualiza...
true
true
f72f30a07b60677628393833bb542a0b8f11afc0
22,124
py
Python
src/buildstream/_artifact.py
samkenxstream/buildstream
2164ac3ad2854eea30f85af6af2bc8a0b8754f3f
[ "Apache-2.0" ]
null
null
null
src/buildstream/_artifact.py
samkenxstream/buildstream
2164ac3ad2854eea30f85af6af2bc8a0b8754f3f
[ "Apache-2.0" ]
null
null
null
src/buildstream/_artifact.py
samkenxstream/buildstream
2164ac3ad2854eea30f85af6af2bc8a0b8754f3f
[ "Apache-2.0" ]
null
null
null
# # Copyright (C) 2020 Codethink Limited # Copyright (C) 2019 Bloomberg Finance LP # # 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 # #...
32.631268
117
0.650741
import os from typing import Dict, Tuple from ._protos.buildstream.v2.artifact_pb2 import Artifact as ArtifactProto from . import _yaml from . import utils from .node import Node from .types import _Scope from .storage._casbaseddirectory import CasBasedDirectory from .sandbox._config import SandboxConfig from ._vari...
true
true
f72f3137c35f25ad4295e8ff69e5522c6bc0fa3c
466
py
Python
database.py
Karasiq/flask-apachan
11e1e6009910dfa762c8009e6ce96dc1407160b1
[ "MIT" ]
null
null
null
database.py
Karasiq/flask-apachan
11e1e6009910dfa762c8009e6ce96dc1407160b1
[ "MIT" ]
null
null
null
database.py
Karasiq/flask-apachan
11e1e6009910dfa762c8009e6ce96dc1407160b1
[ "MIT" ]
null
null
null
from flask.ext.sqlalchemy import SQLAlchemy import os, sys sys.path.append(os.getcwd()) sys.path.append(os.path.join(os.getcwd(), '..')) from app import app db = SQLAlchemy(app) db_session = db.session def init_db(): # import all modules here that might define models so that # they will be registered properly ...
33.285714
66
0.736052
from flask.ext.sqlalchemy import SQLAlchemy import os, sys sys.path.append(os.getcwd()) sys.path.append(os.path.join(os.getcwd(), '..')) from app import app db = SQLAlchemy(app) db_session = db.session def init_db(): import models db.Model.metadata.create_all()
true
true
f72f337038924789342a29bdf12f894156a4a5c5
17,605
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_images_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2020-05-12T23:29:15.000Z
2020-05-12T23:29:15.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_images_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_images_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
null
null
null
# 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 ...
46.207349
205
0.663334
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from .. import models class VirtualMachineImagesOperations(object): models = models def __init__(self, client, config, serializer, deserializer): self._client = client self._seria...
true
true
f72f33b9736a53f5a2d0f2502ca8c3c7b2c0d2fa
1,601
py
Python
neural_compressor/ux/utils/yaml_utils.py
intel/neural-compressor
16a4a12045fcb468da4d33769aff2c1a5e2ba6ba
[ "Apache-2.0" ]
172
2021-09-14T18:34:17.000Z
2022-03-30T06:49:53.000Z
neural_compressor/ux/utils/yaml_utils.py
intel/lp-opt-tool
130eefa3586b38df6c0ff78cc8807ae273f6a63f
[ "Apache-2.0" ]
40
2021-09-14T02:26:12.000Z
2022-03-29T08:34:04.000Z
neural_compressor/ux/utils/yaml_utils.py
intel/neural-compressor
16a4a12045fcb468da4d33769aff2c1a5e2ba6ba
[ "Apache-2.0" ]
33
2021-09-15T07:27:25.000Z
2022-03-25T08:30:57.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2021-2022 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
33.354167
74
0.690194
from typing import Any from neural_compressor.conf.config import Pruner def float_representer(dumper: Any, value: float) -> Any: if value.is_integer(): float_out = f"{int(value)}.0" else: float_out = f"{value}" return dumper.represent_scalar("tag:yaml.org,2002:float", float_out) def pr...
true
true
f72f3403b78785de5709a2d85b9f6807eb47d1ee
5,584
py
Python
im2scene/camera.py
miramirakim227/SwapNeRF_single_GT
55a842ec4155fa782ca1c48b5c6863aeca8ca295
[ "MIT" ]
null
null
null
im2scene/camera.py
miramirakim227/SwapNeRF_single_GT
55a842ec4155fa782ca1c48b5c6863aeca8ca295
[ "MIT" ]
null
null
null
im2scene/camera.py
miramirakim227/SwapNeRF_single_GT
55a842ec4155fa782ca1c48b5c6863aeca8ca295
[ "MIT" ]
2
2021-12-07T04:02:02.000Z
2021-12-30T04:44:50.000Z
import numpy as np import torch from scipy.spatial.transform import Rotation as Rot import pdb import math def get_camera_mat(fov=49.13, invert=True): # fov = 2 * arctan( sensor / (2 * focal)) # focal = (sensor / 2) * 1 / (tan(0.5 * fov)) # in our case, sensor = 2 as pixels are in [-1, 1] focal = 1....
33.238095
89
0.530802
import numpy as np import torch from scipy.spatial.transform import Rotation as Rot import pdb import math def get_camera_mat(fov=49.13, invert=True): focal = 1. / np.tan(0.5 * fov * np.pi/180.) focal = focal.astype(np.float32) mat = torch.tensor([ [focal, 0., 0., 0.], [0., fo...
true
true
f72f348a5b9935ce6a4cb36600f5af78d9693402
4,948
py
Python
01_process_reads/at_combo_lib_ex58/01_usearch_merge.py
ddingding/coevolution_mechanism
4a03f7a105a2606e812dd8a4fa88272519ddab86
[ "MIT" ]
1
2022-01-16T09:32:33.000Z
2022-01-16T09:32:33.000Z
01_process_reads/at_combo_lib_ex58/01_usearch_merge.py
ddingding/coevolution_mechanism
4a03f7a105a2606e812dd8a4fa88272519ddab86
[ "MIT" ]
null
null
null
01_process_reads/at_combo_lib_ex58/01_usearch_merge.py
ddingding/coevolution_mechanism
4a03f7a105a2606e812dd8a4fa88272519ddab86
[ "MIT" ]
null
null
null
''' ## using flash 1.2.11 to merge paired end reads # at combo mutant files # the sample identified is in the middle of the filename: 'D21-169', refer to ex58_config.csv for description of that # sample # each paired end read are split in the files ending in '1_sequence.fastq' and '2_sequence.fastq' "210105Lau_D21-169...
55.595506
119
0.818108
import os from os import listdir from os.path import isfile, join from constants import AT_COMBO_RAW_DIR, AT_COMBO_MERGED_DIR, FLASH_PATH fastqPath = AT_COMBO_RAW_DIR outputDir = AT_COMBO_MERGED_DIR n_to_do = 1000 c = 0 with open(outputDir + 'cmdsUsed.txt', 'w') as fout: done_nums = [f.rstrip('-_merged.fastq...
true
true
f72f34ca09732af9330ae8c7aad9a5737ef4a76b
3,985
py
Python
server/rake.py
arpit73/ad-recommendation
6409e437215f192bbce3235d070b642705ef75cd
[ "Apache-2.0" ]
1
2021-12-27T08:45:35.000Z
2021-12-27T08:45:35.000Z
server/rake.py
arpit73/ad-recommendation
6409e437215f192bbce3235d070b642705ef75cd
[ "Apache-2.0" ]
2
2021-03-10T14:26:51.000Z
2021-05-11T10:20:20.000Z
server/rake.py
onygami/ad-recommendation
6409e437215f192bbce3235d070b642705ef75cd
[ "Apache-2.0" ]
null
null
null
import re def is_number(s): try: float(s) if "." in s else int(s) return True except ValueError: return False def load_stop_words(stop_word_file, regex): with open(stop_word_file, "r") as stop_word_file: stop_words = re.split(regex, stop_word_file.read()) return [ ...
31.88
114
0.636637
import re def is_number(s): try: float(s) if "." in s else int(s) return True except ValueError: return False def load_stop_words(stop_word_file, regex): with open(stop_word_file, "r") as stop_word_file: stop_words = re.split(regex, stop_word_file.read()) return [ ...
true
true
f72f354e1adca42e4471f5b1917ec8f37ef9888a
13,156
py
Python
src/game.py
mapto/4oBe4e
e3b11ad4ac5c5f4f7462b2066ca3a3851b07230f
[ "MIT" ]
2
2020-04-02T19:44:12.000Z
2020-04-08T19:18:17.000Z
src/game.py
mapto/4oBe4e
e3b11ad4ac5c5f4f7462b2066ca3a3851b07230f
[ "MIT" ]
5
2020-04-26T15:36:52.000Z
2020-05-14T19:21:29.000Z
src/game.py
mapto/4oBe4e
e3b11ad4ac5c5f4f7462b2066ca3a3851b07230f
[ "MIT" ]
2
2020-04-07T18:03:25.000Z
2020-04-21T09:05:34.000Z
#!/usr/bin/env python3 # coding: utf-8 """The game logic. This should be independent of media used to interact with player.""" from typing import Tuple, List, Set, Dict from const import PLAYER_SHIFT, LAST_ON_PATH, END_PROGRESS from piece import Piece from player import Player from util import progress_to_positio...
27.408333
100
0.54363
from typing import Tuple, List, Set, Dict from const import PLAYER_SHIFT, LAST_ON_PATH, END_PROGRESS from piece import Piece from player import Player from util import progress_to_position from action import roll_dice def set_board(num_players: int, num_pieces: int): pieces: List[Piece] = [] for player_...
true
true
f72f3647e3f3d20d8cbdf1ce0a5a0bce8e752cca
3,615
py
Python
VisCostCallback.py
halalyon/mxnet_workshop
0cf83051e639893c8b4a04b90d91d93bf55f0f5b
[ "Apache-2.0" ]
null
null
null
VisCostCallback.py
halalyon/mxnet_workshop
0cf83051e639893c8b4a04b90d91d93bf55f0f5b
[ "Apache-2.0" ]
null
null
null
VisCostCallback.py
halalyon/mxnet_workshop
0cf83051e639893c8b4a04b90d91d93bf55f0f5b
[ "Apache-2.0" ]
null
null
null
from bokeh.plotting import output_notebook, figure, ColumnDataSource, show from bokeh.io import push_notebook from timeit import default_timer import math from collections import deque class CostVisCallback(object): """ Callback providing a live updating console based progress bar. """ def __init__(se...
33.785047
107
0.562656
from bokeh.plotting import output_notebook, figure, ColumnDataSource, show from bokeh.io import push_notebook from timeit import default_timer import math from collections import deque class CostVisCallback(object): def __init__(self, epoch_freq=1, y_range=(0, 4.5), fig=None, handle=None, update_...
true
true
f72f36daaa65d5a7d57ac806a3e885a93cc7e16f
2,218
py
Python
nipype/interfaces/mrtrix3/tests/test_auto_DWIBiasCorrect.py
vferat/nipype
536c57da150d157dcb5c121af43aaeab71cdbd5f
[ "Apache-2.0" ]
null
null
null
nipype/interfaces/mrtrix3/tests/test_auto_DWIBiasCorrect.py
vferat/nipype
536c57da150d157dcb5c121af43aaeab71cdbd5f
[ "Apache-2.0" ]
2
2018-04-17T19:18:16.000Z
2020-03-04T22:05:02.000Z
nipype/interfaces/mrtrix3/tests/test_auto_DWIBiasCorrect.py
oesteban/nipype
c14f24eba1da08711bbb894e049ee858ed740096
[ "Apache-2.0" ]
null
null
null
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..preprocess import DWIBiasCorrect def test_DWIBiasCorrect_inputs(): input_map = dict( args=dict(argstr='%s', ), bias=dict( argstr='-bias %s', extensions=None, ), ...
27.382716
67
0.506763
from __future__ import unicode_literals from ..preprocess import DWIBiasCorrect def test_DWIBiasCorrect_inputs(): input_map = dict( args=dict(argstr='%s', ), bias=dict( argstr='-bias %s', extensions=None, ), bval_scale=dict(argstr='-bvalue_scaling %s', ), ...
true
true
f72f3823ff02324815fc7e4ba4d736a76c0e7db7
1,123
py
Python
src/tests/part1/q380_test_ins_del_rand_const.py
hychrisli/PyAlgorithms
71e537180f3b371d0d2cc47b11cb68ec13a8ac68
[ "Apache-2.0" ]
null
null
null
src/tests/part1/q380_test_ins_del_rand_const.py
hychrisli/PyAlgorithms
71e537180f3b371d0d2cc47b11cb68ec13a8ac68
[ "Apache-2.0" ]
null
null
null
src/tests/part1/q380_test_ins_del_rand_const.py
hychrisli/PyAlgorithms
71e537180f3b371d0d2cc47b11cb68ec13a8ac68
[ "Apache-2.0" ]
null
null
null
from src.base.test_cases import TestCases from src.utility.constants import INSERT, REMOVE, GET_RANDOM class InsDelRandConstTestCases(TestCases): def __init__(self): super(InsDelRandConstTestCases, self).__init__() self.__add_test_case__('Test Insert 1', (INSERT, 1), True) self.__add_test_...
46.791667
72
0.672306
from src.base.test_cases import TestCases from src.utility.constants import INSERT, REMOVE, GET_RANDOM class InsDelRandConstTestCases(TestCases): def __init__(self): super(InsDelRandConstTestCases, self).__init__() self.__add_test_case__('Test Insert 1', (INSERT, 1), True) self.__add_test_...
true
true
f72f3832ba1149229f6c76d9070a1eb9a4a8c2c8
2,496
py
Python
tests/token/TestUtil.py
gbm001/ebay_rest
077d3478423ccd80ff35e0361821d6a11180bc54
[ "MIT" ]
3
2021-12-12T04:28:03.000Z
2022-03-10T03:29:18.000Z
tests/token/TestUtil.py
jdavv/ebay_rest
20fc88c6aefdae9ab90f9c1330e79abddcd750cd
[ "MIT" ]
33
2021-06-16T20:44:36.000Z
2022-03-30T14:55:06.000Z
tests/token/TestUtil.py
jdavv/ebay_rest
20fc88c6aefdae9ab90f9c1330e79abddcd750cd
[ "MIT" ]
7
2021-06-03T09:30:23.000Z
2022-03-08T19:51:33.000Z
# -*- coding: utf-8 -*- """ Copyright 2019 eBay Inc. Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
30.439024
98
0.679087
import os, logging, json, time, urllib, re, yaml from selenium import webdriver sandbox_key = "sandbox-user" production_key = "production-user" _user_credential_list = {} def read_user_info(conf=None): logging.info("Loading user credential configuration file at: %s", conf) with open(conf, 'r') as f: ...
true
true
f72f39431d58d174acc8a451fc3f5024a7a67581
3,474
py
Python
scrapy/contrib/downloadermiddleware/retry.py
h4ck3rm1k3/scrapy
59dcdbe84769c9d204f552a2b545b1e096a2d42c
[ "BSD-3-Clause" ]
26
2015-02-07T17:35:26.000Z
2020-04-27T21:11:00.000Z
scrapy/contrib/downloadermiddleware/retry.py
h4ck3rm1k3/scrapy
59dcdbe84769c9d204f552a2b545b1e096a2d42c
[ "BSD-3-Clause" ]
2
2021-09-20T19:54:29.000Z
2022-03-22T21:47:39.000Z
scrapy/contrib/downloadermiddleware/retry.py
h4ck3rm1k3/scrapy
59dcdbe84769c9d204f552a2b545b1e096a2d42c
[ "BSD-3-Clause" ]
9
2015-09-21T08:17:20.000Z
2021-02-07T02:31:36.000Z
""" An extension to retry failed requests that are potentially caused by temporary problems such as a connection timeout or HTTP 500 error. You can change the behaviour of this middleware by modifing the scraping settings: RETRY_TIMES - how many times to retry a failed page RETRY_HTTP_CODES - which HTTP response codes...
43.974684
100
0.704088
from twisted.internet import defer from twisted.internet.error import TimeoutError, DNSLookupError, \ ConnectionRefusedError, ConnectionDone, ConnectError, \ ConnectionLost, TCPTimedOutError from scrapy import log from scrapy.exceptions import NotConfigured from scrapy.utils.response import response_s...
true
true
f72f39ea13255cbce714cd52ecd6820c01e3e27b
10,487
py
Python
tests/test_phase_change.py
volpatto/chemicals
721904ee17604f5e8685b0e5fff12e0bac567f73
[ "MIT" ]
null
null
null
tests/test_phase_change.py
volpatto/chemicals
721904ee17604f5e8685b0e5fff12e0bac567f73
[ "MIT" ]
null
null
null
tests/test_phase_change.py
volpatto/chemicals
721904ee17604f5e8685b0e5fff12e0bac567f73
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, Caleb Bell <Caleb.Andrew.Bell@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal...
34.840532
143
0.685229
import pytest from fluids.numerics import assert_close, assert_close1d from chemicals.phase_change import * from chemicals.phase_change import (Hvap_data_CRC, Hfus_data_CRC, Hvap_data_Gharagheizi, Hsub_data_Gharagheizi, Tb_data_Yaws, Tm_ON_data, ...
true
true
f72f3a0ab9d913c2109ddb7b9fece41c54d596c4
11,902
py
Python
typhon/retrieval/common.py
gerritholl/typhon
dbde147be12922ec730bd072dc4797c9da9a6d6b
[ "MIT" ]
null
null
null
typhon/retrieval/common.py
gerritholl/typhon
dbde147be12922ec730bd072dc4797c9da9a6d6b
[ "MIT" ]
null
null
null
typhon/retrieval/common.py
gerritholl/typhon
dbde147be12922ec730bd072dc4797c9da9a6d6b
[ "MIT" ]
null
null
null
from ast import literal_eval import copy from importlib import import_module import json import numpy as np import pandas as pd from sklearn.pipeline import Pipeline from typhon.utils import to_array __all__ = [ 'RetrievalProduct', ] class NotTrainedError(Exception): """Should be raised if someone runs a no...
31.075718
77
0.582423
from ast import literal_eval import copy from importlib import import_module import json import numpy as np import pandas as pd from sklearn.pipeline import Pipeline from typhon.utils import to_array __all__ = [ 'RetrievalProduct', ] class NotTrainedError(Exception): def __init__(self, *args): messa...
true
true
f72f3abecda24bf11d5273a5655eafa5f2c18ecb
10,729
py
Python
src/minescrubber/mainwindow.py
alok1974/minescrubber
0c18d960b385a4a59ac0cf38bc69271a23c667e7
[ "MIT" ]
1
2020-08-11T23:08:34.000Z
2020-08-11T23:08:34.000Z
src/minescrubber/mainwindow.py
alok1974/minescrubber
0c18d960b385a4a59ac0cf38bc69271a23c667e7
[ "MIT" ]
null
null
null
src/minescrubber/mainwindow.py
alok1974/minescrubber
0c18d960b385a4a59ac0cf38bc69271a23c667e7
[ "MIT" ]
null
null
null
import os import random from . import imager, conf, animator from .qt import BaseDialog, QtWidgets, QtCore, QtGui class MainWidget(BaseDialog): CELL_SELECTED_SIGNAL = QtCore.Signal(tuple) CELL_FLAGGED_SIGNAL = QtCore.Signal(tuple) NEW_GAME_SIGNAL = QtCore.Signal(tuple) def __init__(self, parent=Non...
36.246622
79
0.654208
import os import random from . import imager, conf, animator from .qt import BaseDialog, QtWidgets, QtCore, QtGui class MainWidget(BaseDialog): CELL_SELECTED_SIGNAL = QtCore.Signal(tuple) CELL_FLAGGED_SIGNAL = QtCore.Signal(tuple) NEW_GAME_SIGNAL = QtCore.Signal(tuple) def __init__(self, parent=Non...
true
true
f72f3b30d80ddaeb33b04d28e7f95a0cabbea8cd
2,075
py
Python
integrations/tensorflow/e2e/broadcasting_test.py
BernhardRiemann/iree
471349762b316f7d6b83eb5f9089255d78052758
[ "Apache-2.0" ]
1
2021-03-15T13:53:30.000Z
2021-03-15T13:53:30.000Z
integrations/tensorflow/e2e/broadcasting_test.py
BernhardRiemann/iree
471349762b316f7d6b83eb5f9089255d78052758
[ "Apache-2.0" ]
null
null
null
integrations/tensorflow/e2e/broadcasting_test.py
BernhardRiemann/iree
471349762b316f7d6b83eb5f9089255d78052758
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
26.948052
74
0.723855
from absl import app import numpy as np from pyiree.tf.support import tf_test_utils from pyiree.tf.support import tf_utils import tensorflow.compat.v2 as tf class BroadcastingModule(tf.Module): @tf.function(input_signature=[ tf.TensorSpec([None], tf.float32), tf.TensorSpec([None], tf.float32), ]) ...
true
true
f72f3cd14665268a7017d487decd2770a51a8acf
42,710
py
Python
tests/tx_test.py
iterumllc/afdko
42ad89290a42015dcdf2dfd778d826e928bf9b9b
[ "Apache-2.0" ]
null
null
null
tests/tx_test.py
iterumllc/afdko
42ad89290a42015dcdf2dfd778d826e928bf9b9b
[ "Apache-2.0" ]
null
null
null
tests/tx_test.py
iterumllc/afdko
42ad89290a42015dcdf2dfd778d826e928bf9b9b
[ "Apache-2.0" ]
null
null
null
import os import pytest import re import subprocess import time from afdko.fdkutils import ( get_temp_file_path, get_temp_dir_path, ) from test_utils import ( get_input_path, get_bad_input_path, get_expected_path, generate_ps_dump, ) from runner import main as runner from differ import main as ...
36.787252
79
0.624959
import os import pytest import re import subprocess import time from afdko.fdkutils import ( get_temp_file_path, get_temp_dir_path, ) from test_utils import ( get_input_path, get_bad_input_path, get_expected_path, generate_ps_dump, ) from runner import main as runner from differ import main as ...
true
true
f72f3d1c6a35bd919b59685338374f45d915640f
2,886
py
Python
python/init_db.py
arenadata/adcm
a499caa30adc2a53e7b3f46c96a865f9e4079e4e
[ "Apache-2.0" ]
16
2019-11-28T18:05:21.000Z
2021-12-08T18:09:18.000Z
python/init_db.py
arenadata/adcm
a499caa30adc2a53e7b3f46c96a865f9e4079e4e
[ "Apache-2.0" ]
1,127
2019-11-29T08:57:25.000Z
2022-03-31T20:21:32.000Z
python/init_db.py
arenadata/adcm
a499caa30adc2a53e7b3f46c96a865f9e4079e4e
[ "Apache-2.0" ]
10
2019-11-28T18:05:06.000Z
2022-01-13T06:16:40.000Z
#!/usr/bin/env python3 # 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, softwar...
26.722222
88
0.700277
import json import random import string from itertools import chain import adcm.init_django from django.contrib.auth.models import User from cm import issue from cm.logger import log from cm.models import ( UserProfile, DummyData, CheckLog, GroupCheckLog, Cluster, HostProvider, ConcernTy...
true
true
f72f3d6d80d945c5a335c62637d517ade6bb22c6
234
py
Python
t/unit/test_exceptions.py
nlundquist/kombu
483cadced77d82a6ecd0be553b91ce92f04f9617
[ "BSD-3-Clause" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
desktop/core/ext-py/kombu-4.3.0/t/unit/test_exceptions.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
desktop/core/ext-py/kombu-4.3.0/t/unit/test_exceptions.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
from __future__ import absolute_import, unicode_literals from case import Mock from kombu.exceptions import HttpError class test_HttpError: def test_str(self): assert str(HttpError(200, 'msg', Mock(name='response')))
19.5
64
0.75641
from __future__ import absolute_import, unicode_literals from case import Mock from kombu.exceptions import HttpError class test_HttpError: def test_str(self): assert str(HttpError(200, 'msg', Mock(name='response')))
true
true
f72f3d7c4544ede280f22ec01cd308bf34c32e57
1,686
py
Python
certbot-runner/setup.py
gerrito333/letsencrypt-cert-manager
957ea555cc0f18fc3af9c275dc2fc5a8ab0a1668
[ "MIT" ]
2
2020-07-08T17:36:11.000Z
2020-07-08T18:20:59.000Z
certbot-runner/setup.py
gerrito333/letsencrypt-cert-manager
957ea555cc0f18fc3af9c275dc2fc5a8ab0a1668
[ "MIT" ]
2
2020-07-08T17:57:19.000Z
2020-07-08T18:00:38.000Z
certbot-runner/setup.py
gerrito333/letsencrypt-cert-manager
957ea555cc0f18fc3af9c275dc2fc5a8ab0a1668
[ "MIT" ]
1
2020-12-18T21:49:10.000Z
2020-12-18T21:49:10.000Z
"""Configure package.""" import os from setuptools import setup, find_packages # ----------------------------------------------------------------------------- # For information on this file, see: # https://packaging.python.org/distributing/#setup-args # # For examples, look here: # https://gitlab.pixsystem.net/groups/...
29.578947
119
0.651839
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) version = {} with open(os.path.join(here, "lambda_function", "_version.py")) as ver_file: exec(ver_file.read(), version) packages = [ package for package in find_packages() if package.startswith(...
true
true
f72f3e3c530fb085acf757d2eb07052013668b0a
105,967
py
Python
tests/system_tests_link_routes.py
santosh653/qpid-dispatch
cd35c975340f248ea46d35e8a709c0fb585be15c
[ "Apache-2.0" ]
null
null
null
tests/system_tests_link_routes.py
santosh653/qpid-dispatch
cd35c975340f248ea46d35e8a709c0fb585be15c
[ "Apache-2.0" ]
121
2020-09-16T06:03:53.000Z
2022-03-30T13:03:23.000Z
tests/system_tests_link_routes.py
astitcher/qpid-dispatch
b01c5a7286849c053db9548dbb7586713211eed3
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
42.437725
166
0.577038
from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function import os from time import sleep, time from threading import Event from subprocess import PIPE, STDOUT from system_test import TestCase, Qdrouterd, main_module, TIMEOUT...
true
true
f72f3f14c41617165cb68986338ef49ad0c75ee8
3,116
py
Python
python_implementation/example/example7.py
mannyray/sort
f0ee0488aa4e7213d30ff50bcb848a843fedde42
[ "MIT" ]
2
2021-11-08T09:25:23.000Z
2022-03-14T08:44:09.000Z
python_implementation/example/example7.py
mannyray/sort
f0ee0488aa4e7213d30ff50bcb848a843fedde42
[ "MIT" ]
null
null
null
python_implementation/example/example7.py
mannyray/sort
f0ee0488aa4e7213d30ff50bcb848a843fedde42
[ "MIT" ]
null
null
null
import commonExample import math import sys sys.path.insert(0,'..') import generate import constants from numpy import random import intersection from PIL import Image, ImageDraw, ImageFont gif_file="example7" xcoords = [constants.width,constants.width,constants.width,100,400,700,1000,1300] ycoords = [50,350,700,con...
34.622222
160
0.652118
import commonExample import math import sys sys.path.insert(0,'..') import generate import constants from numpy import random import intersection from PIL import Image, ImageDraw, ImageFont gif_file="example7" xcoords = [constants.width,constants.width,constants.width,100,400,700,1000,1300] ycoords = [50,350,700,con...
true
true
f72f3f9773cb57978179d7d03d2f532c34dbe335
869
py
Python
setup.py
ngoet/markdowndocs
8154276bd943c8a641d1c5ef6e3aa07395beee1c
[ "MIT" ]
null
null
null
setup.py
ngoet/markdowndocs
8154276bd943c8a641d1c5ef6e3aa07395beee1c
[ "MIT" ]
null
null
null
setup.py
ngoet/markdowndocs
8154276bd943c8a641d1c5ef6e3aa07395beee1c
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup with open("README.md", "r") as fh: long_description = fh.read() setup( name="markdowndocs", version="0.1.0", author="ngoet", author_email="ndgoet@gmail.com", description="A light-weight markdown code documentation generator", install_requires=[ ...
29.965517
79
0.650173
from setuptools import find_packages, setup with open("README.md", "r") as fh: long_description = fh.read() setup( name="markdowndocs", version="0.1.0", author="ngoet", author_email="ndgoet@gmail.com", description="A light-weight markdown code documentation generator", install_requires=[ ...
true
true
f72f3f991d29cfcde8c404665347a2b2067bd01a
3,145
py
Python
tests/test_game_map.py
brittleshinpass/mossbread
6a225e5d11fdf1957d1bfe74c5a76d105561e12e
[ "MIT" ]
1
2020-05-30T19:45:58.000Z
2020-05-30T19:45:58.000Z
tests/test_game_map.py
brittleshinpass/mossbread
6a225e5d11fdf1957d1bfe74c5a76d105561e12e
[ "MIT" ]
null
null
null
tests/test_game_map.py
brittleshinpass/mossbread
6a225e5d11fdf1957d1bfe74c5a76d105561e12e
[ "MIT" ]
null
null
null
import pytest from array import array from game_map import GameMap from tests.conftest import get_relative_path sample_map_data = tuple( reversed( ( array("I", (0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0)), array("I", (0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0...
46.25
88
0.475994
import pytest from array import array from game_map import GameMap from tests.conftest import get_relative_path sample_map_data = tuple( reversed( ( array("I", (0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0)), array("I", (0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0...
true
true
f72f3fcfa3fab2976c56d4dd80f662765c94c4d1
700
py
Python
src/owmpy/utils/_classes.py
ernieIzde8ski/open_weather_mappy
c50629065de85f6d2f4fcf46b741ff3320182a55
[ "MIT" ]
null
null
null
src/owmpy/utils/_classes.py
ernieIzde8ski/open_weather_mappy
c50629065de85f6d2f4fcf46b741ff3320182a55
[ "MIT" ]
null
null
null
src/owmpy/utils/_classes.py
ernieIzde8ski/open_weather_mappy
c50629065de85f6d2f4fcf46b741ff3320182a55
[ "MIT" ]
null
null
null
from typing import NamedTuple import aiohttp as _aiohttp Number = int | float class ShortLong(NamedTuple): """Represents shorthand and longhand of a unit.""" short: str """Shorthand form, eg '°C'""" long: str """Longhandform, eg 'Celsius'""" class _AutomaticClient: client: _aiohttp.Client...
22.580645
103
0.651429
from typing import NamedTuple import aiohttp as _aiohttp Number = int | float class ShortLong(NamedTuple): short: str long: str class _AutomaticClient: client: _aiohttp.ClientSession appid: str | None def __init__(self, client: _aiohttp.ClientSession | None = None, appid: str | None = None) ...
true
true
f72f409ee17d5e96bd756971f13976c6028fd85e
6,212
py
Python
models/00_db.py
samsruti/eden
8f6bdd070fa8435dafea6e8fb65db246280bb3ea
[ "MIT" ]
null
null
null
models/00_db.py
samsruti/eden
8f6bdd070fa8435dafea6e8fb65db246280bb3ea
[ "MIT" ]
null
null
null
models/00_db.py
samsruti/eden
8f6bdd070fa8435dafea6e8fb65db246280bb3ea
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Import Modules Configure the Database Instantiate Classes """ if settings.get_L10n_languages_readonly(): # Make the Language files read-only for improved performance T.is_writable = False get_vars = request.get_vars # Are we running in debug mode? settings.check_debug...
29.028037
86
0.609627
if settings.get_L10n_languages_readonly(): T.is_writable = False get_vars = request.get_vars settings.check_debug() import datetime try: import json except ImportError: try: import simplejson as json except: import gluon.contrib.simplejson as json migrate = settings.get_base_...
true
true
f72f40b797e835bc5608be07f220c5da9a9c3a64
37,904
py
Python
LAD-AMA-Common/telegraf_utils/telegraf_config_handler.py
shridpant/azure-linux-extensions
4b5e66f33d5b93b15b427a9438931f0414f12a6e
[ "Apache-2.0" ]
null
null
null
LAD-AMA-Common/telegraf_utils/telegraf_config_handler.py
shridpant/azure-linux-extensions
4b5e66f33d5b93b15b427a9438931f0414f12a6e
[ "Apache-2.0" ]
null
null
null
LAD-AMA-Common/telegraf_utils/telegraf_config_handler.py
shridpant/azure-linux-extensions
4b5e66f33d5b93b15b427a9438931f0414f12a6e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Azure Linux extension # # Copyright (c) Microsoft Corporation # All rights reserved. # MIT License # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the ""Software""), to deal in the Software without restrictio...
48.594872
293
0.627454
import sys if sys.version_info[0] < 3: from future import standard_library standard_library.install_aliases() from builtins import str import json import os from telegraf_utils.telegraf_name_map import name_map import subprocess import signal import urllib.request, urllib.error, urllib.parse from shutil i...
true
true
f72f41e99b9e572abeb953f1f643d46f46a98281
8,713
py
Python
ros2_ws/src/utils/logger/logger/logger.py
FastSense/rosbot-ros2
c2d274ce179534fec5b2786a6f96b6d638019ac4
[ "MIT" ]
null
null
null
ros2_ws/src/utils/logger/logger/logger.py
FastSense/rosbot-ros2
c2d274ce179534fec5b2786a6f96b6d638019ac4
[ "MIT" ]
2
2021-07-05T14:50:09.000Z
2021-09-14T15:21:11.000Z
ros2_ws/src/utils/logger/logger/logger.py
FastSense/metalbot
063c897a16129d9aa88c2c7c52bdf6547af894e4
[ "MIT" ]
null
null
null
import os import pandas as pd from matplotlib import pyplot as plt import rclpy import numpy as np from rclpy.node import Node from geometry_msgs.msg import Twist from nav_msgs.msg import Odometry from std_srvs.srv import Empty from logger.utils import convert_ros2_time_to_float from logger.create_graphs import build...
32.033088
111
0.596236
import os import pandas as pd from matplotlib import pyplot as plt import rclpy import numpy as np from rclpy.node import Node from geometry_msgs.msg import Twist from nav_msgs.msg import Odometry from std_srvs.srv import Empty from logger.utils import convert_ros2_time_to_float from logger.create_graphs import build...
true
true
f72f437483431e8f3efc25864bfdb0b9a97d1f2b
195,406
py
Python
yggdrasil/drivers/ModelDriver.py
cropsinsilico/yggdrasil
466a4f77605a6f461d57ef7b165a6db7eec4d1fd
[ "BSD-3-Clause" ]
22
2019-02-05T15:20:07.000Z
2022-02-25T09:00:40.000Z
yggdrasil/drivers/ModelDriver.py
cropsinsilico/yggdrasil
466a4f77605a6f461d57ef7b165a6db7eec4d1fd
[ "BSD-3-Clause" ]
48
2019-02-15T20:41:24.000Z
2022-03-16T20:52:02.000Z
yggdrasil/drivers/ModelDriver.py
cropsinsilico/yggdrasil
466a4f77605a6f461d57ef7b165a6db7eec4d1fd
[ "BSD-3-Clause" ]
16
2019-04-27T03:36:40.000Z
2021-12-02T09:47:06.000Z
import os import re import sys import copy import logging import warnings import subprocess import shutil import uuid import tempfile import asyncio from collections import OrderedDict from pprint import pformat from yggdrasil import platform, tools, languages, multitasking, constants from yggdrasil.components import i...
44.62343
88
0.555684
import os import re import sys import copy import logging import warnings import subprocess import shutil import uuid import tempfile import asyncio from collections import OrderedDict from pprint import pformat from yggdrasil import platform, tools, languages, multitasking, constants from yggdrasil.components import i...
true
true