hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c1b09d82c835804dd1ce473a3bb0e9b183d4adc
4,375
py
Python
pypresence/presence.py
Hunter2807/pypresence
c4616cf6660369bcd5b1e6eeb3f7814ed4d80b61
[ "BSD-3-Clause" ]
null
null
null
pypresence/presence.py
Hunter2807/pypresence
c4616cf6660369bcd5b1e6eeb3f7814ed4d80b61
[ "BSD-3-Clause" ]
null
null
null
pypresence/presence.py
Hunter2807/pypresence
c4616cf6660369bcd5b1e6eeb3f7814ed4d80b61
[ "BSD-3-Clause" ]
null
null
null
from codecs import StreamWriter import os from typing import Dict, Union from .baseclient import BaseClient from .payloads import Payload from .utils import get_event_loop class Presence(BaseClient): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.sock_writer: StreamWr...
29.560811
64
0.541714
from codecs import StreamWriter import os from typing import Dict, Union from .baseclient import BaseClient from .payloads import Payload from .utils import get_event_loop class Presence(BaseClient): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.sock_writer: StreamWr...
true
true
1c1b0a58842eeef2790848bee68b95b32aca0420
1,291
py
Python
linear_regression/bio_select_variables.py
derdav3/tf-sparql
6d3fe6e3b6824a4cd5468a243829b71f5b0952f2
[ "MIT" ]
5
2017-03-13T18:35:32.000Z
2019-09-28T19:30:31.000Z
linear_regression/bio_select_variables.py
derdav3/tf-sparql
6d3fe6e3b6824a4cd5468a243829b71f5b0952f2
[ "MIT" ]
null
null
null
linear_regression/bio_select_variables.py
derdav3/tf-sparql
6d3fe6e3b6824a4cd5468a243829b71f5b0952f2
[ "MIT" ]
null
null
null
import sys import re import glob def readout_feature(): result = []; with open("union-queries.txt", 'a') as f: queries = [] #filter queries out of one log example # wildcards to match every extracted file for file in glob.glob('../data/BioPortal/query-bioportal.log-*-sparql'): queries += re.findall("###...
28.065217
74
0.653757
import sys import re import glob def readout_feature(): result = []; with open("union-queries.txt", 'a') as f: queries = [] for file in glob.glob('../data/BioPortal/query-bioportal.log-*-sparql'): queries += re.findall("##### (.*?)#####", open(file).read(), re.DOTALL) for index, query in enum...
true
true
1c1b0b09e39ffaf720483b125b97c30050f21b65
6,401
py
Python
src/models/pspnet.py
tatigabru/kaggle-lyft
217be181b1bd2db1f5fd2707ea2cf4c2bf809736
[ "MIT" ]
3
2020-09-17T14:01:23.000Z
2021-03-14T19:41:24.000Z
src/models/pspnet.py
tatigabru/kaggle-lyft
217be181b1bd2db1f5fd2707ea2cf4c2bf809736
[ "MIT" ]
null
null
null
src/models/pspnet.py
tatigabru/kaggle-lyft
217be181b1bd2db1f5fd2707ea2cf4c2bf809736
[ "MIT" ]
1
2021-03-25T14:10:45.000Z
2021-03-25T14:10:45.000Z
"""Pyramid Scene Parsing Network https://github.com/Tramac/awesome-semantic-segmentation-pytorch/blob/master/core/models/pspnet.py """ import torch import torch.nn as nn import torch.nn.functional as F from .segbase import SegBaseModel from .fcn import _FCNHead __all__ = ['PSPNet', 'get_psp', 'get_psp_resne...
38.329341
113
0.640681
import torch import torch.nn as nn import torch.nn.functional as F from .segbase import SegBaseModel from .fcn import _FCNHead __all__ = ['PSPNet', 'get_psp', 'get_psp_resnet50_voc', 'get_psp_resnet50_ade', 'get_psp_resnet101_voc', 'get_psp_resnet101_ade', 'get_psp_resnet101_citys', 'get_psp_resnet...
true
true
1c1b0c103101401ef7b638b0a4df9231f995aed2
3,551
py
Python
rpython/jit/backend/ppc/locations.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
381
2018-08-18T03:37:22.000Z
2022-02-06T23:57:36.000Z
rpython/jit/backend/ppc/locations.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
16
2018-09-22T18:12:47.000Z
2022-02-22T20:03:59.000Z
rpython/jit/backend/ppc/locations.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
55
2015-08-16T02:41:30.000Z
2022-03-20T20:33:35.000Z
from rpython.jit.metainterp.history import INT, FLOAT, VECTOR import sys # cannot import from arch.py, currently we have a circular import if sys.maxint == (2**31 - 1): WORD = 4 FWORD = 8 else: WORD = 8 FWORD = 8 DWORD = 2 * WORD class AssemblerLocation(object): _immutable_ = True type = INT ...
20.176136
76
0.618699
from rpython.jit.metainterp.history import INT, FLOAT, VECTOR import sys if sys.maxint == (2**31 - 1): WORD = 4 FWORD = 8 else: WORD = 8 FWORD = 8 DWORD = 2 * WORD class AssemblerLocation(object): _immutable_ = True type = INT def is_imm(self): return False def is_stack(sel...
true
true
1c1b0c8d4d43c7023bf2352b086c6a5868825aaa
2,540
py
Python
WHOISpy/WHOIS_server.py
h-j-13/WHOISpy
49c37570efa3d0a73cc12c90be4469fbe99bff23
[ "WTFPL" ]
12
2018-03-06T12:06:01.000Z
2021-05-14T08:23:19.000Z
WHOISpy/WHOIS_server.py
JX-Wang/WHOISpy
f48da1adeba0b1e029ad8a62ac1c984f83f621e7
[ "WTFPL" ]
1
2019-02-15T02:25:15.000Z
2019-02-16T06:54:27.000Z
WHOISpy/WHOIS_server.py
JX-Wang/WHOISpy
f48da1adeba0b1e029ad8a62ac1c984f83f621e7
[ "WTFPL" ]
4
2019-01-24T09:55:11.000Z
2020-12-22T06:36:45.000Z
#!/usr/bin/env python # encoding:utf-8 """ 选择域名的WHOIS服务器 数据及获取、维护方法详见 https://github.com/h-j-13/WHOIS-server-list 核心数据 : WHOIS_server_list.dat 辅助数据 : relay_WHOIS_server_list.dat """ import os from random import choice class WHOIS_server(object): """WHOIS服务器""" _instance = None def __new__(cls, *args...
32.564103
116
0.581102
""" 选择域名的WHOIS服务器 数据及获取、维护方法详见 https://github.com/h-j-13/WHOIS-server-list 核心数据 : WHOIS_server_list.dat 辅助数据 : relay_WHOIS_server_list.dat """ import os from random import choice class WHOIS_server(object): """WHOIS服务器""" _instance = None def __new__(cls, *args, **kw): """单例模式""" ...
false
true
1c1b0ca57812126361db5974f6ebc5de4309cfe9
15,457
py
Python
Notebooks/Tutorials/GAN_Digit_tutorial.py
sa-artea/VVG-MLModel-Trainer
42bcaec9910ab58886dd9ebe739dbdb49426c40f
[ "MIT" ]
null
null
null
Notebooks/Tutorials/GAN_Digit_tutorial.py
sa-artea/VVG-MLModel-Trainer
42bcaec9910ab58886dd9ebe739dbdb49426c40f
[ "MIT" ]
null
null
null
Notebooks/Tutorials/GAN_Digit_tutorial.py
sa-artea/VVG-MLModel-Trainer
42bcaec9910ab58886dd9ebe739dbdb49426c40f
[ "MIT" ]
null
null
null
""" https://machinelearningmastery.com/how-to-develop-a-generative-adversarial-network-for-an-mnist-handwritten-digits-from-scratch-in-keras/ """ # example of training a gan on mnist from numpy import expand_dims from numpy import zeros from numpy import ones from numpy import vstack from numpy.random import randn fr...
35.780093
137
0.698971
""" https://machinelearningmastery.com/how-to-develop-a-generative-adversarial-network-for-an-mnist-handwritten-digits-from-scratch-in-keras/ """ from numpy import expand_dims from numpy import zeros from numpy import ones from numpy import vstack from numpy.random import randn from numpy.random import randint from ...
false
true
1c1b0cb8ceca1490b6eef9e4a0f23581f37f2f8a
351
py
Python
task_manager/tasks/migrations/0002_rename_user_report_taskuser.py
rabilrbl/task_manager
10c96df8f41caf2db6a0ec2aa7cb961135412843
[ "BSD-3-Clause" ]
null
null
null
task_manager/tasks/migrations/0002_rename_user_report_taskuser.py
rabilrbl/task_manager
10c96df8f41caf2db6a0ec2aa7cb961135412843
[ "BSD-3-Clause" ]
null
null
null
task_manager/tasks/migrations/0002_rename_user_report_taskuser.py
rabilrbl/task_manager
10c96df8f41caf2db6a0ec2aa7cb961135412843
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 3.2.12 on 2022-02-17 11:35 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('tasks', '0001_initial'), ] operations = [ migrations.RenameField( model_name='report', old_name='user', new_nam...
18.473684
48
0.569801
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('tasks', '0001_initial'), ] operations = [ migrations.RenameField( model_name='report', old_name='user', new_name='taskuser', ), ]
true
true
1c1b0d2517af734f47cbcad970cb477528ab3531
6,422
py
Python
mesh_spawner.py
hooloovooblu/satisfactory-mesh-spawner
d824d13d591af1e7263d8c34389235c70fc0feeb
[ "CC0-1.0" ]
7
2021-01-24T23:53:22.000Z
2021-05-22T03:48:22.000Z
mesh_spawner.py
hooloovooblu/satisfactory-mesh-spawner
d824d13d591af1e7263d8c34389235c70fc0feeb
[ "CC0-1.0" ]
null
null
null
mesh_spawner.py
hooloovooblu/satisfactory-mesh-spawner
d824d13d591af1e7263d8c34389235c70fc0feeb
[ "CC0-1.0" ]
null
null
null
import numpy as np import json from scipy.spatial.transform import Rotation as R from numpy.linalg import norm import trimesh import time import subprocess # attach to logger so trimesh messages will be printed to console #trimesh.util.attach_to_log() item_counts = {} def find_item_id_offset(save_json...
38.921212
157
0.651666
import numpy as np import json from scipy.spatial.transform import Rotation as R from numpy.linalg import norm import trimesh import time import subprocess item_counts = {} def find_item_id_offset(save_json): max_id = None for actor in save_json["actors"]: if actor["className"] == "...
true
true
1c1b0d7d074a4ebac7b10ec19b3abc81662f94af
1,090
py
Python
tasks/decorators.py
r-aliev/advanced-to-do-app
a082ff22ebf52dcd8bb41999a71b6669e9d59238
[ "MIT" ]
1
2021-02-16T07:29:24.000Z
2021-02-16T07:29:24.000Z
tasks/decorators.py
r-aliev/advanced-to-do-app
a082ff22ebf52dcd8bb41999a71b6669e9d59238
[ "MIT" ]
null
null
null
tasks/decorators.py
r-aliev/advanced-to-do-app
a082ff22ebf52dcd8bb41999a71b6669e9d59238
[ "MIT" ]
null
null
null
from django.shortcuts import redirect, get_object_or_404 from .models import Task from django.core.exceptions import PermissionDenied from tasks.permissions import has_view_task_permission def unauthenticated_user(view_func): def wrapper_func(request, *args, **kwargs): if request.user.is_authenticated: return...
26.585366
71
0.688991
from django.shortcuts import redirect, get_object_or_404 from .models import Task from django.core.exceptions import PermissionDenied from tasks.permissions import has_view_task_permission def unauthenticated_user(view_func): def wrapper_func(request, *args, **kwargs): if request.user.is_authenticated: return...
true
true
1c1b0dea961ba7b06112688948ef2d1499014a75
1,618
py
Python
workspace_utils.py
tyranitar/bananas
fb0b32d70ca811626a37365e4d379024bea202de
[ "MIT" ]
null
null
null
workspace_utils.py
tyranitar/bananas
fb0b32d70ca811626a37365e4d379024bea202de
[ "MIT" ]
null
null
null
workspace_utils.py
tyranitar/bananas
fb0b32d70ca811626a37365e4d379024bea202de
[ "MIT" ]
null
null
null
# From: https://gist.github.com/willkessler/557a4d891e0d0393cc5348100fbd21a9 import signal from contextlib import contextmanager import requests DELAY = INTERVAL = 4 * 60 # interval time in seconds MIN_DELAY = MIN_INTERVAL = 2 * 60 KEEPALIVE_URL = "https://nebula.udacity.com/api/v1/remote/keep-alive" TOKEN_URL = ...
28.385965
101
0.717553
import signal from contextlib import contextmanager import requests DELAY = INTERVAL = 4 * 60 MIN_DELAY = MIN_INTERVAL = 2 * 60 KEEPALIVE_URL = "https://nebula.udacity.com/api/v1/remote/keep-alive" TOKEN_URL = "http://metadata.google.internal/computeMetadata/v1/instance/attributes/keep_alive_token" TOKEN_HEADER...
true
true
1c1b0f3ba4dc90e1a785d3d21588a4c8a4d84291
736
py
Python
task/w2/practic/15-suma poslidovnosti.py
beregok/pythontask
50394ff2b52ab4f3273ec9ddc4b504d1f7b3159e
[ "MIT" ]
1
2019-09-29T14:19:54.000Z
2019-09-29T14:19:54.000Z
task/w2/practic/15-suma poslidovnosti.py
beregok/pythontask
50394ff2b52ab4f3273ec9ddc4b504d1f7b3159e
[ "MIT" ]
null
null
null
task/w2/practic/15-suma poslidovnosti.py
beregok/pythontask
50394ff2b52ab4f3273ec9ddc4b504d1f7b3159e
[ "MIT" ]
null
null
null
# Обчисліть суму всіх елементів послідовності, яка завершується числом 0. # # ## Формат введення # # Вводиться послідовність цілих чисел, що закінчується числом 0 (саме число 0 в послідовність не входить, а служить як ознака її закінчення. # # ## Формат виведення # # Виведіть відповідь до задачі. # # ## Приклади # # ``...
10.366197
140
0.605978
n != 0: suma += n n = int(input()) print(suma)
true
true
1c1b110bf74149fede5aefa733404b1e93b47b9e
4,661
py
Python
yolov2.py
minji-o-j/YOLO
5f2d12a80879c80d4b04b4b9acd937c290d0fbd8
[ "MIT" ]
1
2021-02-26T12:25:17.000Z
2021-02-26T12:25:17.000Z
yolov2.py
minji-o-j/YOLOv2
5f2d12a80879c80d4b04b4b9acd937c290d0fbd8
[ "MIT" ]
19
2020-10-22T11:56:10.000Z
2021-04-23T15:25:39.000Z
yolov2.py
minji-o-j/YOLO
5f2d12a80879c80d4b04b4b9acd937c290d0fbd8
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Pytorch Yolov2 # Licensed under The MIT License [see LICENSE for details] # Written by Jingru Tan # -------------------------------------------------------- from __future__ import absolute_import from __future__ import division from __future__ import print_fu...
35.310606
110
0.600086
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import config as cfg from darknet import Darknet19 from darknet import conv_bn_l...
true
true
1c1b11496899992309cfe9c70dc18e79aa86ebe5
12,741
py
Python
perfkitbenchmarker/linux_packages/hpcc.py
inflatador/PerfKitBenchmarker
9a12f44aa0c3fe6873e57a7920b1d13c006073e3
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/linux_packages/hpcc.py
inflatador/PerfKitBenchmarker
9a12f44aa0c3fe6873e57a7920b1d13c006073e3
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/linux_packages/hpcc.py
inflatador/PerfKitBenchmarker
9a12f44aa0c3fe6873e57a7920b1d13c006073e3
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
34.811475
120
0.659524
import os import posixpath import re from perfkitbenchmarker import errors from perfkitbenchmarker import flags from perfkitbenchmarker import vm_util from perfkitbenchmarker.linux_packages import amdblis from perfkitbenchmarker.linux_packages import INSTALL_DIR from perfkitbenchmarker.linux_packages imp...
true
true
1c1b119c120020b59ede384b20eaecfb82449eb8
369
py
Python
design patterns/1introducao.py
andrezzadede/Curso-de-Python-POO
7b3f892b78271e53543451e2896da5e47e79f87f
[ "MIT" ]
null
null
null
design patterns/1introducao.py
andrezzadede/Curso-de-Python-POO
7b3f892b78271e53543451e2896da5e47e79f87f
[ "MIT" ]
null
null
null
design patterns/1introducao.py
andrezzadede/Curso-de-Python-POO
7b3f892b78271e53543451e2896da5e47e79f87f
[ "MIT" ]
null
null
null
#Introdução a Padrão de Projetos ''' Objetos atributos(membros de dados) procedimentos objeto carro - > (atributos): combustivel, rodas (metodos): acelerar, frear POO é interação de objetos Objetos - representando entidades Classes -definem objetos Pessoa -> nome, idade, peso, ir_a_escola Metodo...
15.375
75
0.726287
true
true
1c1b11a84aa5a6755454246e9a5199b897789095
437
py
Python
twit/migrations/0011_alter_twit_img.py
codingwithahmad/tw-clone
9cf4197f40855216a59fbe9d974d5ee9a4863f7f
[ "MIT" ]
null
null
null
twit/migrations/0011_alter_twit_img.py
codingwithahmad/tw-clone
9cf4197f40855216a59fbe9d974d5ee9a4863f7f
[ "MIT" ]
null
null
null
twit/migrations/0011_alter_twit_img.py
codingwithahmad/tw-clone
9cf4197f40855216a59fbe9d974d5ee9a4863f7f
[ "MIT" ]
null
null
null
# Generated by Django 3.2.7 on 2021-10-09 10:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('twit', '0010_alter_twit_created'), ] operations = [ migrations.AlterField( model_name='twit', name='img', ...
23
109
0.610984
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('twit', '0010_alter_twit_created'), ] operations = [ migrations.AlterField( model_name='twit', name='img', field=models.ImageField(blank=True, default='...
true
true
1c1b11b74f1f9cda2248df9b8bffed52c1c57338
4,435
py
Python
ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py
runningt/ambari
7b91469e68a80bfcabe4b79d855caa684bf51378
[ "Apache-2.0" ]
16
2018-05-24T10:28:24.000Z
2021-08-05T03:13:26.000Z
ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py
runningt/ambari
7b91469e68a80bfcabe4b79d855caa684bf51378
[ "Apache-2.0" ]
null
null
null
ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py
runningt/ambari
7b91469e68a80bfcabe4b79d855caa684bf51378
[ "Apache-2.0" ]
17
2018-07-06T08:57:00.000Z
2021-11-04T11:00:36.000Z
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
38.565217
153
0.718377
from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl from ambari_commons import OSConst from resource_management.core.shell import as_user, as_sudo from resource_management.libraries.functions.show_logs import show_logs from resource_management.libraries.functions.format import format from resource...
true
true
1c1b11e9f65ad88df1660590a4508eab7fec3b15
6,499
py
Python
vit_tensorflow/vit.py
innat/vit-tensorflow
2f0f009651295c054aa84ed45f4dace35e7ea442
[ "MIT" ]
73
2022-03-25T08:57:14.000Z
2022-03-31T22:30:41.000Z
vit_tensorflow/vit.py
innat/vit-tensorflow
2f0f009651295c054aa84ed45f4dace35e7ea442
[ "MIT" ]
1
2022-03-28T07:28:16.000Z
2022-03-28T08:51:26.000Z
vit_tensorflow/vit.py
innat/vit-tensorflow
2f0f009651295c054aa84ed45f4dace35e7ea442
[ "MIT" ]
3
2022-03-28T05:24:22.000Z
2022-03-29T03:18:42.000Z
import tensorflow as tf from tensorflow.keras import Model from tensorflow.keras.layers import Layer from tensorflow.keras import Sequential import tensorflow.keras.layers as nn from tensorflow import einsum from einops import rearrange, repeat from einops.layers.tensorflow import Rearrange def pair(t): return t ...
33.158163
139
0.571165
import tensorflow as tf from tensorflow.keras import Model from tensorflow.keras.layers import Layer from tensorflow.keras import Sequential import tensorflow.keras.layers as nn from tensorflow import einsum from einops import rearrange, repeat from einops.layers.tensorflow import Rearrange def pair(t): return t ...
true
true
1c1b12112c7d7693d5e0c50dbb16e05f12bfaba9
1,909
py
Python
reconcile/utils/mr/user_maintenance.py
BumbleFeng/qontract-reconcile
a9f5bb221df5f92727d0582c5aa1a99822883782
[ "Apache-2.0" ]
21
2019-10-22T16:50:26.000Z
2022-03-25T16:07:44.000Z
reconcile/utils/mr/user_maintenance.py
BumbleFeng/qontract-reconcile
a9f5bb221df5f92727d0582c5aa1a99822883782
[ "Apache-2.0" ]
629
2018-12-13T12:46:53.000Z
2022-03-31T20:46:02.000Z
reconcile/utils/mr/user_maintenance.py
BumbleFeng/qontract-reconcile
a9f5bb221df5f92727d0582c5aa1a99822883782
[ "Apache-2.0" ]
50
2019-01-04T10:22:45.000Z
2022-03-28T13:24:27.000Z
from ruamel import yaml from reconcile.utils.mr.base import MergeRequestBase from reconcile.utils.mr.labels import AUTO_MERGE class PathTypes: USER = 0 REQUEST = 1 QUERY = 2 GABI = 3 class CreateDeleteUser(MergeRequestBase): name = 'create_delete_user_mr' def __init__(self, username, path...
33.491228
69
0.502357
from ruamel import yaml from reconcile.utils.mr.base import MergeRequestBase from reconcile.utils.mr.labels import AUTO_MERGE class PathTypes: USER = 0 REQUEST = 1 QUERY = 2 GABI = 3 class CreateDeleteUser(MergeRequestBase): name = 'create_delete_user_mr' def __init__(self, username, path...
true
true
1c1b121848d464d2178c074c4e97ccf74018f6c1
2,315
py
Python
test/general_functions.py
prmiles/mcmcplotly
270112813d6e59ac5d6329d050ed2eb95144e30c
[ "MIT" ]
5
2019-07-14T07:31:59.000Z
2022-03-26T15:48:52.000Z
test/general_functions.py
prmiles/mcmcplotly
270112813d6e59ac5d6329d050ed2eb95144e30c
[ "MIT" ]
18
2018-08-03T17:12:05.000Z
2021-02-20T22:57:12.000Z
test/general_functions.py
prmiles/mcmcplotly
270112813d6e59ac5d6329d050ed2eb95144e30c
[ "MIT" ]
1
2018-08-07T11:31:11.000Z
2018-08-07T11:31:11.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jun 29 15:35:08 2018 @author: prmiles """ import numpy as np import os def removekey(d, key): r = dict(d) del r[key] return r # define test model function def modelfun(xdata, theta): m = theta[0] b = theta[1] nrow = xdata.sha...
23.865979
69
0.543413
import numpy as np import os def removekey(d, key): r = dict(d) del r[key] return r def modelfun(xdata, theta): m = theta[0] b = theta[1] nrow = xdata.shape[0] y = np.zeros([nrow, 1]) y[:, 0] = m*xdata.reshape(nrow,) + b return y def ssfun(theta, data, local=None): xdata...
true
true
1c1b131fd3d5d30e2375cdda6c94656f0769c505
1,022
py
Python
output/models/ms_data/particles/particles_ij001_xsd/particles_ij001.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/particles/particles_ij001_xsd/particles_ij001.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/particles/particles_ij001_xsd/particles_ij001.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from typing import List, Optional __NAMESPACE__ = "http://xsdtesting" @dataclass class B: c1_or_c2: List[object] = field( default_factory=list, metadata={ "type": "Elements", "choices": ( { "name"...
18.925926
53
0.439335
from dataclasses import dataclass, field from typing import List, Optional __NAMESPACE__ = "http://xsdtesting" @dataclass class B: c1_or_c2: List[object] = field( default_factory=list, metadata={ "type": "Elements", "choices": ( { "name"...
true
true
1c1b133b5ebe6d5e32e17d6537d02dfc87301d52
111,932
py
Python
src/sentry/south_migrations/0308_auto__add_versiondsymfile__add_unique_versiondsymfile_dsym_file_versio.py
uandco/sentry
5b8d45cb71c6617dac8e64265848623fbfce9c99
[ "BSD-3-Clause" ]
2
2019-03-04T12:45:54.000Z
2019-03-04T12:45:55.000Z
src/sentry/south_migrations/0308_auto__add_versiondsymfile__add_unique_versiondsymfile_dsym_file_versio.py
uandco/sentry
5b8d45cb71c6617dac8e64265848623fbfce9c99
[ "BSD-3-Clause" ]
196
2019-06-10T08:34:10.000Z
2022-02-22T01:26:13.000Z
src/sentry/south_migrations/0308_auto__add_versiondsymfile__add_unique_versiondsymfile_dsym_file_versio.py
uandco/sentry
5b8d45cb71c6617dac8e64265848623fbfce9c99
[ "BSD-3-Clause" ]
1
2017-02-09T06:36:57.000Z
2017-02-09T06:36:57.000Z
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'VersionDSymFile' db.create_table( 'sentry_vers...
37.01455
100
0.405496
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.create_table( 'sentry_versiondsymfile', ( ( '...
true
true
1c1b13ca2e91e2b00e2e8d2c9632003b68dfb0c7
268,517
py
Python
distributed/scheduler.py
bryanwweber/distributed
c9dcbe7ee87be83fde1156f18e88ebe2da992c0c
[ "BSD-3-Clause" ]
null
null
null
distributed/scheduler.py
bryanwweber/distributed
c9dcbe7ee87be83fde1156f18e88ebe2da992c0c
[ "BSD-3-Clause" ]
null
null
null
distributed/scheduler.py
bryanwweber/distributed
c9dcbe7ee87be83fde1156f18e88ebe2da992c0c
[ "BSD-3-Clause" ]
null
null
null
from __future__ import annotations import asyncio import contextlib import heapq import inspect import itertools import json import logging import math import operator import os import pickle import random import sys import uuid import warnings import weakref from collections import defaultdict, deque from collections...
35.201494
118
0.556657
from __future__ import annotations import asyncio import contextlib import heapq import inspect import itertools import json import logging import math import operator import os import pickle import random import sys import uuid import warnings import weakref from collections import defaultdict, deque from collections...
true
true
1c1b163e37cf136b97e9ee3cbc828a5e605a0990
13,818
py
Python
src/deps/v8/tools/testrunner/testproc/progress.py
odant/conan-jscript
0e7433ebe9e5ebf331a47c8b2d01a510c7f53952
[ "MIT" ]
null
null
null
src/deps/v8/tools/testrunner/testproc/progress.py
odant/conan-jscript
0e7433ebe9e5ebf331a47c8b2d01a510c7f53952
[ "MIT" ]
5
2021-02-13T18:06:42.000Z
2021-02-13T18:06:44.000Z
src/deps/v8/tools/testrunner/testproc/progress.py
odant/conan-jscript
0e7433ebe9e5ebf331a47c8b2d01a510c7f53952
[ "MIT" ]
3
2019-03-25T23:01:31.000Z
2020-05-19T01:17:27.000Z
# Copyright 2018 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # for py2/py3 compatibility from __future__ import print_function import datetime import json import os import platform import subprocess import sys impor...
30.570796
80
0.648791
from __future__ import print_function import datetime import json import os import platform import subprocess import sys import time import util from . import base from ..local import junit_output OUT_DIR = os.path.abspath( os.path.join(os.path.dirname(__file__), '..', '..', '..', 'out')) def print_fail...
true
true
1c1b1703d88a4d565472d95df94fb3eb3e4d22b3
6,739
py
Python
typings/bpy/ops/surface.py
Argmaster/PyR3
6786bcb6a101fe4bd4cc50fe43767b8178504b15
[ "MIT" ]
2
2021-12-12T18:51:52.000Z
2022-02-23T09:49:16.000Z
typings/bpy/ops/surface.py
Argmaster/PyR3
6786bcb6a101fe4bd4cc50fe43767b8178504b15
[ "MIT" ]
2
2021-11-08T12:09:02.000Z
2021-12-12T23:01:12.000Z
typings/bpy/ops/surface.py
Argmaster/PyR3
6786bcb6a101fe4bd4cc50fe43767b8178504b15
[ "MIT" ]
null
null
null
import sys import typing def primitive_nurbs_surface_circle_add( radius: float = 1.0, enter_editmode: bool = False, align: typing.Union[str, int] = 'WORLD', location: typing.List[float] = (0.0, 0.0, 0.0), rotation: typing.List[float] = (0.0, 0.0, 0.0), scale: typing.Lis...
42.383648
223
0.669981
import sys import typing def primitive_nurbs_surface_circle_add( radius: float = 1.0, enter_editmode: bool = False, align: typing.Union[str, int] = 'WORLD', location: typing.List[float] = (0.0, 0.0, 0.0), rotation: typing.List[float] = (0.0, 0.0, 0.0), scale: typing.Lis...
true
true
1c1b17142ad0e4359709b1b5b9baae5f3607dfe4
5,848
py
Python
sdk/python/pulumi_gcp/accesscontextmanager/service_perimeters.py
dimpu47/pulumi-gcp
38355de300a5768e11c49d344a8165ba0735deed
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_gcp/accesscontextmanager/service_perimeters.py
dimpu47/pulumi-gcp
38355de300a5768e11c49d344a8165ba0735deed
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_gcp/accesscontextmanager/service_perimeters.py
dimpu47/pulumi-gcp
38355de300a5768e11c49d344a8165ba0735deed
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from .. import ...
47.934426
231
0.682114
import warnings import pulumi import pulumi.runtime from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from .. import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['ServicePerimeters'] class ServicePerimeters(pulumi.CustomResource): def __init__(__self__, ...
true
true
1c1b183c27648b7fe28313a3e7ff9e8bff8d228c
102
py
Python
tests/exog/random/random_exog_600_20.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/exog/random/random_exog_600_20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/exog/random/random_exog_600_20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import tests.exog.test_random_exogenous as testrandexog testrandexog.test_random_exogenous( 600,20);
25.5
55
0.862745
import tests.exog.test_random_exogenous as testrandexog testrandexog.test_random_exogenous( 600,20);
true
true
1c1b1aaf5da2b6af3fb87b51402cc44dcb876b10
856
py
Python
constants.py
calcdude84se/lasersandbox
c52f6eab8d4f02f2206c93a73ed68e6e54106f4c
[ "MIT" ]
null
null
null
constants.py
calcdude84se/lasersandbox
c52f6eab8d4f02f2206c93a73ed68e6e54106f4c
[ "MIT" ]
null
null
null
constants.py
calcdude84se/lasersandbox
c52f6eab8d4f02f2206c93a73ed68e6e54106f4c
[ "MIT" ]
null
null
null
import threedize as ddd import camera_to_threedize as c23d import numpy as np camerapos = ddd.coord(20, 42, 46) camera_phi = -np.pi*78/180 # TODO this is wrong cameraposor = ddd.Posor(camerapos, -np.pi/2, camera_phi, 0) laserpos = ddd.coord(0, 0, 61) # x-coord should not matter lasertheta = np.pi/2 ref_half_plane = ...
37.217391
99
0.683411
import threedize as ddd import camera_to_threedize as c23d import numpy as np camerapos = ddd.coord(20, 42, 46) camera_phi = -np.pi*78/180 cameraposor = ddd.Posor(camerapos, -np.pi/2, camera_phi, 0) laserpos = ddd.coord(0, 0, 61) lasertheta = np.pi/2 ref_half_plane = c23d.HalfPlane(ddd.coord(33, 0, 18), ...
true
true
1c1b1d8ecf44a5e3e7f60662ce9fbf132c901d48
634
py
Python
Python3/0745-Prefix-and-Suffix-Search/soln-3.py
wyaadarsh/LeetCode-Solutions
3719f5cb059eefd66b83eb8ae990652f4b7fd124
[ "MIT" ]
5
2020-07-24T17:48:59.000Z
2020-12-21T05:56:00.000Z
Python3/0745-Prefix-and-Suffix-Search/soln-3.py
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
null
null
null
Python3/0745-Prefix-and-Suffix-Search/soln-3.py
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
2
2020-07-24T17:49:01.000Z
2020-08-31T19:57:35.000Z
# TLE class WordFilter: def __init__(self, words: List[str]): self.pres = collections.defaultdict(set) self.sufs = collections.defaultdict(set) for w, word in enumerate(words): n = len(word) for i in range(n + 1): self.pres[word[:i]].add(w) ...
28.818182
65
0.574132
class WordFilter: def __init__(self, words: List[str]): self.pres = collections.defaultdict(set) self.sufs = collections.defaultdict(set) for w, word in enumerate(words): n = len(word) for i in range(n + 1): self.pres[word[:i]].add(w) ...
true
true
1c1b1f620a59d434351fdf5c762fe8617304074b
2,882
py
Python
config/settings/local.py
kamil1marczak/hear_me_django_app
2a567c15acddbf6bf183c6c637a3785c2a9c9c5c
[ "MIT" ]
null
null
null
config/settings/local.py
kamil1marczak/hear_me_django_app
2a567c15acddbf6bf183c6c637a3785c2a9c9c5c
[ "MIT" ]
null
null
null
config/settings/local.py
kamil1marczak/hear_me_django_app
2a567c15acddbf6bf183c6c637a3785c2a9c9c5c
[ "MIT" ]
null
null
null
from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = True # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY...
41.768116
97
0.57703
from .base import * from .base import env = True = env( "DJANGO_SECRET_KEY", default="LEzdVlAi8Umm2fUkTAvA6KSYywux7mbYnEarIniS5d1r5HfBkH4mIyfhmpon2XcR", ) = ["localhost", "0.0.0.0", "127.0.0.1"] = { "default": { "BACKEND": "django.core.cache.backends.locmem.LocMemCache", "LOCATIO...
true
true
1c1b1f6548c4ff47ae29ad9f03c82fdaf2523dfa
10,027
py
Python
src/transformers/models/fsmt/configuration_fsmt.py
ArneBinder/transformers
ddaafd78fb9c98d4f7b5009fb1998deff4c3d6f1
[ "Apache-2.0" ]
67
2021-06-09T01:34:23.000Z
2022-03-29T08:40:39.000Z
src/transformers/models/fsmt/configuration_fsmt.py
ArneBinder/transformers
ddaafd78fb9c98d4f7b5009fb1998deff4c3d6f1
[ "Apache-2.0" ]
13
2021-08-22T04:05:55.000Z
2022-03-29T08:19:23.000Z
src/transformers/models/fsmt/configuration_fsmt.py
ArneBinder/transformers
ddaafd78fb9c98d4f7b5009fb1998deff4c3d6f1
[ "Apache-2.0" ]
8
2021-06-09T06:13:15.000Z
2022-03-27T09:28:52.000Z
# coding=utf-8 # Copyright 2019-present, Facebook, Inc and the HuggingFace Inc. team. # # 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 # # Un...
44.964126
118
0.666301
import copy from ...configuration_utils import PretrainedConfig from ...utils import logging logger = logging.get_logger(__name__) FSMT_PRETRAINED_CONFIG_ARCHIVE_MAP = {} class DecoderConfig(PretrainedConfig): model_type = "fsmt_decoder" def __init__(self, vocab_size=0, bos_token_id=0): ...
true
true
1c1b1f6f1912e6041733461363efc816885ebef7
944
py
Python
tdworkflow/project.py
CyrillSolomon/tdworkflow
44bdadf832951521396de19a244ca446509316ad
[ "Apache-2.0" ]
2
2021-02-03T09:35:13.000Z
2021-03-26T09:35:00.000Z
tdworkflow/project.py
CyrillSolomon/tdworkflow
44bdadf832951521396de19a244ca446509316ad
[ "Apache-2.0" ]
4
2020-07-15T02:49:46.000Z
2021-02-02T00:52:41.000Z
tdworkflow/project.py
CyrillSolomon/tdworkflow
44bdadf832951521396de19a244ca446509316ad
[ "Apache-2.0" ]
3
2020-07-15T02:51:21.000Z
2021-08-24T05:41:48.000Z
import dataclasses from datetime import datetime from .resource import Resource from .util import parse_iso8601 @dataclasses.dataclass class Project(Resource): id: int name: str revision: str = "" archiveType: str = "" archiveMd5: str = "" createdAt: datetime = None deletedAt: datetime = ...
21.454545
54
0.665254
import dataclasses from datetime import datetime from .resource import Resource from .util import parse_iso8601 @dataclasses.dataclass class Project(Resource): id: int name: str revision: str = "" archiveType: str = "" archiveMd5: str = "" createdAt: datetime = None deletedAt: datetime = ...
true
true
1c1b1f7f5202d267cd34b69ea522970c87cb07e8
356
py
Python
FlatCAM.py
dileepplayer/flatcam
2bf78920ae6d6eaa877f21a2d2bfdcc9ca1885a6
[ "MIT" ]
null
null
null
FlatCAM.py
dileepplayer/flatcam
2bf78920ae6d6eaa877f21a2d2bfdcc9ca1885a6
[ "MIT" ]
null
null
null
FlatCAM.py
dileepplayer/flatcam
2bf78920ae6d6eaa877f21a2d2bfdcc9ca1885a6
[ "MIT" ]
null
null
null
import sys from PyQt4 import QtGui from FlatCAMApp import App def debug_trace(): '''Set a tracepoint in the Python debugger that works with Qt''' from PyQt4.QtCore import pyqtRemoveInputHook #from pdb import set_trace pyqtRemoveInputHook() #set_trace() debug_trace() app = QtGui.QApplication(sys.ar...
23.733333
68
0.735955
import sys from PyQt4 import QtGui from FlatCAMApp import App def debug_trace(): from PyQt4.QtCore import pyqtRemoveInputHook pyqtRemoveInputHook() debug_trace() app = QtGui.QApplication(sys.argv) fc = App() sys.exit(app.exec_())
true
true
1c1b1fba2d7d0a285299cc7df9d4193ded67b43f
1,214
py
Python
test/make_global_settings/basics/gyptest-make_global_settings.py
cxm95/GYP-r1831
027f09366443871acb43d0dbbbb33ad5dec5b4e2
[ "BSD-3-Clause" ]
33
2015-01-21T09:50:21.000Z
2022-02-12T15:18:25.000Z
test/make_global_settings/basics/gyptest-make_global_settings.py
cxm95/GYP-r1831
027f09366443871acb43d0dbbbb33ad5dec5b4e2
[ "BSD-3-Clause" ]
11
2015-01-02T19:56:56.000Z
2018-07-27T12:34:02.000Z
test/make_global_settings/basics/gyptest-make_global_settings.py
cxm95/GYP-r1831
027f09366443871acb43d0dbbbb33ad5dec5b4e2
[ "BSD-3-Clause" ]
11
2020-07-04T03:03:18.000Z
2022-03-17T10:19:19.000Z
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies make_global_settings. """ import os import sys import TestGyp test_format = ['ninja'] if sys.platform in ('linux2', 'darwin')...
25.829787
72
0.682043
import os import sys import TestGyp test_format = ['ninja'] if sys.platform in ('linux2', 'darwin'): test_format += ['make'] test = TestGyp.TestGyp(formats=test_format) test.run_gyp('make_global_settings.gyp') if test.format == 'make': cc_expected = """ifneq (,$(filter $(origin CC), undefined default)) ...
true
true
1c1b20290d1a0cceab1b7f99ea2311a680900b80
55,323
py
Python
sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2021-06-02T08:01:35.000Z
2021-06-02T08:01:35.000Z
sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
null
null
null
sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "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 ...
51.995301
268
0.68664
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling from .. import models class CassandraResourcesOperations(object): models = models d...
true
true
1c1b2099185fe9dc7e8c290437417fb4d639af53
1,273
py
Python
tt/test/test_orm.py
anthonyoteri/timetrack2
3d246f640647ff9e231b37eefb5d75ca4186efcd
[ "BSD-3-Clause" ]
null
null
null
tt/test/test_orm.py
anthonyoteri/timetrack2
3d246f640647ff9e231b37eefb5d75ca4186efcd
[ "BSD-3-Clause" ]
68
2018-01-30T13:57:25.000Z
2018-05-02T16:08:08.000Z
tt/test/test_orm.py
anthonyoteri/timetrack2
3d246f640647ff9e231b37eefb5d75ca4186efcd
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2018, Anthony Oteri # All rights reserved from datetime import datetime from tt.orm import Task, Timer def test_task_not_equals(): task1 = Task(name="foo") task2 = Task(name="bar") assert task1 != task2 def test_task_equals(): task = Task(name="foo") assert task == task a...
21.216667
52
0.656716
from datetime import datetime from tt.orm import Task, Timer def test_task_not_equals(): task1 = Task(name="foo") task2 = Task(name="bar") assert task1 != task2 def test_task_equals(): task = Task(name="foo") assert task == task assert task is task def test_task_str(): task = Tas...
true
true
1c1b217757c88a5f23914164b20fe6ab4d279eb2
700
py
Python
common/management/commands/fill_user_info.py
jakubhyza/kelvin
b06c0ed0594a3fb48df1e50ff30cee010ddeea5a
[ "MIT" ]
8
2020-01-11T15:25:25.000Z
2022-02-20T17:32:58.000Z
common/management/commands/fill_user_info.py
jakubhyza/kelvin
b06c0ed0594a3fb48df1e50ff30cee010ddeea5a
[ "MIT" ]
72
2020-01-13T21:07:26.000Z
2022-03-28T10:17:50.000Z
common/management/commands/fill_user_info.py
jakubhyza/kelvin
b06c0ed0594a3fb48df1e50ff30cee010ddeea5a
[ "MIT" ]
6
2020-01-11T16:50:04.000Z
2022-02-19T10:12:19.000Z
from django.core.management.base import BaseCommand from django.conf import settings from django.contrib.auth.models import User from django.db.models import Q from common.utils import ldap_search_user class Command(BaseCommand): def handle(self, *args, **opts): users = User.objects.filter(Q(email="") | Q(...
33.333333
85
0.625714
from django.core.management.base import BaseCommand from django.conf import settings from django.contrib.auth.models import User from django.db.models import Q from common.utils import ldap_search_user class Command(BaseCommand): def handle(self, *args, **opts): users = User.objects.filter(Q(email="") | Q(...
true
true
1c1b21cfd26bf1871b391a60475c6cee380fa6e8
499
py
Python
digitalocean/djangoreactproject/customers/models.py
carvalho-fdec/django
76255aedbe03378167428a743f2d85782c841aca
[ "MIT" ]
null
null
null
digitalocean/djangoreactproject/customers/models.py
carvalho-fdec/django
76255aedbe03378167428a743f2d85782c841aca
[ "MIT" ]
null
null
null
digitalocean/djangoreactproject/customers/models.py
carvalho-fdec/django
76255aedbe03378167428a743f2d85782c841aca
[ "MIT" ]
null
null
null
from django.db import models class Customer(models.Model): first_name = models.CharField("First name", max_length=255) last_name = models.CharField("Last name", max_length=255) email = models.EmailField() phone = models.CharField(max_length=20) address = models.TextField(blank=True, null=True) ...
38.384615
69
0.725451
from django.db import models class Customer(models.Model): first_name = models.CharField("First name", max_length=255) last_name = models.CharField("Last name", max_length=255) email = models.EmailField() phone = models.CharField(max_length=20) address = models.TextField(blank=True, null=True) ...
true
true
1c1b23497cee1cb7991aa83bc8449ef5c9d3b337
6,671
py
Python
3rdparty/pytorch/caffe2/python/regularizer_test.py
WoodoLee/TorchCraft
999f68aab9e7d50ed3ae138297226dc95fefc458
[ "MIT" ]
15
2019-08-10T02:36:38.000Z
2021-07-14T13:45:32.000Z
3rdparty/pytorch/caffe2/python/regularizer_test.py
WoodoLee/TorchCraft
999f68aab9e7d50ed3ae138297226dc95fefc458
[ "MIT" ]
7
2019-10-21T03:08:51.000Z
2022-03-11T23:54:28.000Z
pytorch/caffe2/python/regularizer_test.py
raghavnauhria/whatmt
c20483a437c82936cb0fb8080925e37b9c4bba87
[ "MIT" ]
6
2020-10-16T13:28:31.000Z
2021-08-25T12:08:34.000Z
from __future__ import absolute_import, division, print_function import caffe2.python.hypothesis_test_util as hu import hypothesis.strategies as st import numpy as np import numpy.testing as npt from caffe2.python import core, layer_model_instantiator, regularizer, schema, workspace from caffe2.python.layer_test_util ...
39.473373
88
0.624944
from __future__ import absolute_import, division, print_function import caffe2.python.hypothesis_test_util as hu import hypothesis.strategies as st import numpy as np import numpy.testing as npt from caffe2.python import core, layer_model_instantiator, regularizer, schema, workspace from caffe2.python.layer_test_util ...
true
true
1c1b237669b18116aba29cfca363c3d9049222e1
1,092
py
Python
ps/test7.py
wxmgcs/learn_computer_vision
311df17a127a2388c9384202e420ea822b07bf63
[ "MIT" ]
null
null
null
ps/test7.py
wxmgcs/learn_computer_vision
311df17a127a2388c9384202e420ea822b07bf63
[ "MIT" ]
null
null
null
ps/test7.py
wxmgcs/learn_computer_vision
311df17a127a2388c9384202e420ea822b07bf63
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt from skimage import io import numpy as np import numpy.matlib file_name='tripod.png' img=io.imread(file_name) def Sur_blur ( I_in, thre, half_size): I_out = I_in * 1.0 row, col = I_in.shape w_size = half_size * 2 + 1 for ii in range (half_size, row-1-half_size): ...
24.266667
82
0.605311
import matplotlib.pyplot as plt from skimage import io import numpy as np import numpy.matlib file_name='tripod.png' img=io.imread(file_name) def Sur_blur ( I_in, thre, half_size): I_out = I_in * 1.0 row, col = I_in.shape w_size = half_size * 2 + 1 for ii in range (half_size, row-1-half_size): ...
true
true
1c1b256a2d0a606d7122b16b3a0f6852b51e5730
2,566
py
Python
listen.py
dstushar7/easy-tts
da28192b7f117d9c466b594b22468cb4de994a05
[ "MIT" ]
1
2021-09-05T13:47:51.000Z
2021-09-05T13:47:51.000Z
listen.py
dstushar7/easy-tts
da28192b7f117d9c466b594b22468cb4de994a05
[ "MIT" ]
null
null
null
listen.py
dstushar7/easy-tts
da28192b7f117d9c466b594b22468cb4de994a05
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os from os.path import isdir, join from pathlib import Path import pandas as pd # Math import numpy as np from scipy.fftpack import fft from scipy import signal from scipy.io import wavfile import librosa from sklearn.decomposition import PCA # Visualization import matplotlib.pyplot as...
25.156863
80
0.673422
import os from os.path import isdir, join from pathlib import Path import pandas as pd import numpy as np from scipy.fftpack import fft from scipy import signal from scipy.io import wavfile import librosa from sklearn.decomposition import PCA import matplotlib.pyplot as plt import seaborn as sns import IPython.di...
true
true
1c1b271456e70eb28763b1f9423e684bd3c76f21
4,306
py
Python
venv/lib/python3.6/site-packages/ansible_collections/check_point/mgmt/tests/units/modules/test_cp_mgmt_administrator.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/check_point/mgmt/tests/units/modules/test_cp_mgmt_administrator.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/check_point/mgmt/tests/units/modules/test_cp_mgmt_administrator.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
# Ansible module to manage CheckPoint Firewall (c) 2019 # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dist...
34.725806
109
0.720158
from __future__ import absolute_import, division, print_function __metaclass__ = type import pytest from units.modules.utils import set_module_args, exit_json, fail_json, AnsibleExitJson from ansible.module_utils import basic from ansible_collections.check_point.mgmt.plugins.modules import cp_mgmt_adm...
true
true
1c1b27182d93bd9f9d2d6371ca57752d4556d882
480
py
Python
tests/user_interface_mock.py
1jsebastian/gimme-aws-creds
9600146c5e6cd07fa024335b975e29a41117e8c6
[ "Apache-2.0" ]
686
2017-03-29T17:31:12.000Z
2022-03-28T01:05:59.000Z
tests/user_interface_mock.py
1jsebastian/gimme-aws-creds
9600146c5e6cd07fa024335b975e29a41117e8c6
[ "Apache-2.0" ]
284
2017-04-23T14:58:39.000Z
2022-03-30T21:38:08.000Z
tests/user_interface_mock.py
1jsebastian/gimme-aws-creds
9600146c5e6cd07fa024335b975e29a41117e8c6
[ "Apache-2.0" ]
250
2017-06-01T17:10:48.000Z
2022-03-24T07:34:07.000Z
import tempfile from gimme_aws_creds import ui class MockUserInterface(ui.UserInterface): def result(self, result): pass def prompt(self, message): pass def message(self, message): pass def read_input(self, hidden=False): pass def notify(self, message): ...
19.2
64
0.629167
import tempfile from gimme_aws_creds import ui class MockUserInterface(ui.UserInterface): def result(self, result): pass def prompt(self, message): pass def message(self, message): pass def read_input(self, hidden=False): pass def notify(self, message): ...
true
true
1c1b27c6b8cc92010cf01599ba848ccdab9b66a7
10,399
py
Python
swan/virtual_unit_map.py
INM-6/swan
ecd426657d6e0ee67e8ea31f0298daf2ea065158
[ "BSD-3-Clause" ]
3
2020-06-08T12:12:40.000Z
2021-06-11T05:40:37.000Z
swan/virtual_unit_map.py
INM-6/swan
ecd426657d6e0ee67e8ea31f0298daf2ea065158
[ "BSD-3-Clause" ]
29
2018-10-25T16:10:05.000Z
2021-12-18T21:41:50.000Z
swan/virtual_unit_map.py
INM-6/swan
ecd426657d6e0ee67e8ea31f0298daf2ea065158
[ "BSD-3-Clause" ]
2
2015-10-07T08:00:16.000Z
2021-06-14T08:28:13.000Z
""" Created on Dec 12, 2013 @author: Christoph Gollan In this module you can find the :class:`VirtualUnitMap` which is used to map real units to virtual units. The virtual units can be swapped to have the same units in the same row. """ import numpy as np from swan.automatic_mapping import SwanImplementation, calcul...
35.250847
120
0.57217
import numpy as np from swan.automatic_mapping import SwanImplementation, calculate_mapping_bu from swan.gui.palettes import UNIT_COLORS class VirtualUnitMap(object): def __init__(self): self.mapping = [] self.visible = [] self.active = [] self.total_units = 0 self.colors ...
true
true
1c1b27d9d3b4f73e13d167528fd5174100a0249e
543
py
Python
tests/unit/test_models/test_submodels/test_interface/test_sei/test_base_sei.py
tobykirk/PyBaMM
c16b7df76c597468ecac1c40e768d94005f79145
[ "BSD-3-Clause" ]
null
null
null
tests/unit/test_models/test_submodels/test_interface/test_sei/test_base_sei.py
tobykirk/PyBaMM
c16b7df76c597468ecac1c40e768d94005f79145
[ "BSD-3-Clause" ]
null
null
null
tests/unit/test_models/test_submodels/test_interface/test_sei/test_base_sei.py
tobykirk/PyBaMM
c16b7df76c597468ecac1c40e768d94005f79145
[ "BSD-3-Clause" ]
null
null
null
# # Test base SEI submodel # import pybamm import unittest class TestBaseSEI(unittest.TestCase): def test_not_implemented(self): with self.assertRaisesRegex( NotImplementedError, "SEI models are not implemented for the positive electrode", ): pybamm.sei.Reaction...
21.72
72
0.64825
import pybamm import unittest class TestBaseSEI(unittest.TestCase): def test_not_implemented(self): with self.assertRaisesRegex( NotImplementedError, "SEI models are not implemented for the positive electrode", ): pybamm.sei.ReactionLimited(None, "Positive", ...
true
true
1c1b2814cbb883482276e0d64b0d3df4d81e1efc
192
py
Python
scripts_torch/loss/loss_example.py
yunshangyue71/mycodes
54b876004c32d38d9c0363fd292d745fee8dff3c
[ "Apache-2.0" ]
null
null
null
scripts_torch/loss/loss_example.py
yunshangyue71/mycodes
54b876004c32d38d9c0363fd292d745fee8dff3c
[ "Apache-2.0" ]
null
null
null
scripts_torch/loss/loss_example.py
yunshangyue71/mycodes
54b876004c32d38d9c0363fd292d745fee8dff3c
[ "Apache-2.0" ]
null
null
null
import torch #自己实现MSE loss class My_loss(nn.Module): def __init__(self): super().__init__() def forward(self, x, y): return torch.mean(torch.pow((x - y), 2))
19.2
48
0.583333
import torch class My_loss(nn.Module): def __init__(self): super().__init__() def forward(self, x, y): return torch.mean(torch.pow((x - y), 2))
true
true
1c1b289ceeedc5266ed7e671edb99c30c627a701
6,917
py
Python
discordbot2.py
arutodane/discordpy-startup
9d839f1a234fcac5a2717639e2ee1871547fa375
[ "MIT" ]
null
null
null
discordbot2.py
arutodane/discordpy-startup
9d839f1a234fcac5a2717639e2ee1871547fa375
[ "MIT" ]
null
null
null
discordbot2.py
arutodane/discordpy-startup
9d839f1a234fcac5a2717639e2ee1871547fa375
[ "MIT" ]
null
null
null
#discord.pyを読み込む from os import name, remove import discord from discord import message from discord import channel from discord.colour import Color #オブジェクト生成(インデントを有効にしてる) intents = discord.Intents.default() intents.members = True intents.presences = True intents.typing = False client = discord.Client(int...
31.157658
159
0.564985
from os import name, remove import discord from discord import message from discord import channel from discord.colour import Color intents = discord.Intents.default() intents.members = True intents.presences = True intents.typing = False client = discord.Client(intents=intents) kidoukakunin_channel = 8...
true
true
1c1b28fb8019dfa07a5672064fa8b4c8310d48f1
21,206
py
Python
illustrip.py
fr-og/aphantasia
35062cff300a82393c32a719cd55583c5a151887
[ "MIT" ]
1
2021-12-21T16:33:20.000Z
2021-12-21T16:33:20.000Z
illustrip.py
fr-og/aphantasia
35062cff300a82393c32a719cd55583c5a151887
[ "MIT" ]
null
null
null
illustrip.py
fr-og/aphantasia
35062cff300a82393c32a719cd55583c5a151887
[ "MIT" ]
null
null
null
# coding: UTF-8 import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import warnings warnings.filterwarnings("ignore") import argparse import numpy as np import shutil import PIL import time from imageio import imread, imsave try: from googletrans import Translator googletrans_ok = True except ImportError as e: ...
50.490476
181
0.609403
import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import warnings warnings.filterwarnings("ignore") import argparse import numpy as np import shutil import PIL import time from imageio import imread, imsave try: from googletrans import Translator googletrans_ok = True except ImportError as e: googletrans_o...
true
true
1c1b2a07ceb88814cd68b540b66324b1db218711
1,168
py
Python
slave.py
cesarau04/basesdedatos-practica4
b71233bf71b3b1f44e2ee6a0f8a32348e174b830
[ "MIT" ]
null
null
null
slave.py
cesarau04/basesdedatos-practica4
b71233bf71b3b1f44e2ee6a0f8a32348e174b830
[ "MIT" ]
null
null
null
slave.py
cesarau04/basesdedatos-practica4
b71233bf71b3b1f44e2ee6a0f8a32348e174b830
[ "MIT" ]
null
null
null
import socket import sys #host = '192.168.0.107' host = '10.43.62.206' port = 4444 myself = 0 #my_data = ["","",""] s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.connect((host,port)) print("Connected!") try: file = open("db.txt", "r") my_data = file.readline() #d→b→c if my_data == '': my_data = ["",...
20.137931
71
0.583048
import socket import sys host = '10.43.62.206' port = 4444 myself = 0 s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.connect((host,port)) print("Connected!") try: file = open("db.txt", "r") my_data = file.readline() if my_data == '': my_data = ["","",""] else: my_data = my_data.split('→') excep...
true
true
1c1b2b8c000ecdde0319fbccf6c495a9d6fb8fce
6,207
py
Python
kibble/api/pages/issue/pony-timeseries.py
midhun1998/kibble
d7f9031dfd93a2efd676fcbd59443feec01df6ed
[ "Apache-2.0" ]
null
null
null
kibble/api/pages/issue/pony-timeseries.py
midhun1998/kibble
d7f9031dfd93a2efd676fcbd59443feec01df6ed
[ "Apache-2.0" ]
null
null
null
kibble/api/pages/issue/pony-timeseries.py
midhun1998/kibble
d7f9031dfd93a2efd676fcbd59443feec01df6ed
[ "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 u...
32.160622
285
0.520702
true
true
1c1b2c17f7f5ef4dc26c1f4187b6b5ee5951a914
1,971
py
Python
renamer/tools/text.py
Lonelyking/renane
bac440c065a5cae8d5921fd5e08a20bd06511a9e
[ "Apache-2.0" ]
null
null
null
renamer/tools/text.py
Lonelyking/renane
bac440c065a5cae8d5921fd5e08a20bd06511a9e
[ "Apache-2.0" ]
null
null
null
renamer/tools/text.py
Lonelyking/renane
bac440c065a5cae8d5921fd5e08a20bd06511a9e
[ "Apache-2.0" ]
null
null
null
from pyrogram.emoji import * class TEXT: DOWNLOAD_START = f"Downloading Starts soon {SLEEPING_FACE}" UPLOAD_START = f"Upload Starting Soon {SLEEPING_FACE}" UPLOAD_SUCESS = f"Thanks[me](t.me/sarbudeen786)" BANNED_USER_TEXT = f"Hey bro, you are **banned** from using me {FACE_WITH_TEARS_OF_JOY}." NOT_...
31.285714
178
0.714358
from pyrogram.emoji import * class TEXT: DOWNLOAD_START = f"Downloading Starts soon {SLEEPING_FACE}" UPLOAD_START = f"Upload Starting Soon {SLEEPING_FACE}" UPLOAD_SUCESS = f"Thanks[me](t.me/sarbudeen786)" BANNED_USER_TEXT = f"Hey bro, you are **banned** from using me {FACE_WITH_TEARS_OF_JOY}." NOT_...
true
true
1c1b2c34cfdcf018b52522677ec581493c54e513
452
py
Python
insomnia_keeper_main/migrations/0003_remove_profile_name_remove_profile_surname.py
gh0st-work/insomnia_keeper
95c490a3345ab0e639e4f379ae82250be6777de4
[ "MIT" ]
2
2022-03-23T23:39:54.000Z
2022-03-31T18:21:23.000Z
insomnia_keeper_main/migrations/0003_remove_profile_name_remove_profile_surname.py
gh0st-work/insomnia_keeper
95c490a3345ab0e639e4f379ae82250be6777de4
[ "MIT" ]
2
2022-03-21T09:23:24.000Z
2022-03-21T09:25:42.000Z
insomnia_keeper_main/migrations/0003_remove_profile_name_remove_profile_surname.py
gh0st-work/insomnia_keeper
95c490a3345ab0e639e4f379ae82250be6777de4
[ "MIT" ]
1
2022-03-19T18:43:07.000Z
2022-03-19T18:43:07.000Z
# Generated by Django 4.0.2 on 2022-03-11 22:20 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('insomnia_keeper_main', '0002_adminsettings_fee_percent'), ] operations = [ migrations.RemoveField( model_name='profile', nam...
20.545455
67
0.579646
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('insomnia_keeper_main', '0002_adminsettings_fee_percent'), ] operations = [ migrations.RemoveField( model_name='profile', name='name', ), migrations.RemoveF...
true
true
1c1b2d94bcbe32aaf7c930de0d2c53c69ba6e2ec
10,193
py
Python
ldrop/Ldrop.py
infant-cognition-turku/ldrop
d97ec3270408e1967d0c620ac9df04d058601d28
[ "MIT" ]
null
null
null
ldrop/Ldrop.py
infant-cognition-turku/ldrop
d97ec3270408e1967d0c620ac9df04d058601d28
[ "MIT" ]
2
2018-08-13T10:02:08.000Z
2018-10-31T10:10:18.000Z
ldrop/Ldrop.py
infant-cognition-turku/ldrop
d97ec3270408e1967d0c620ac9df04d058601d28
[ "MIT" ]
null
null
null
"""LDrop Controller-class.""" import sys import os import time import glib import utils from pyee import EventEmitter from LdropPygtkView import LDPV from yapsy.PluginManager import PluginManager from plugins import LdropPluginLocator class Controller(EventEmitter): """Main controller of the class. Views+ui sepa...
35.269896
85
0.628372
import sys import os import time import glib import utils from pyee import EventEmitter from LdropPygtkView import LDPV from yapsy.PluginManager import PluginManager from plugins import LdropPluginLocator class Controller(EventEmitter): def __init__(self): EventEmitter.__init__(self) ...
true
true
1c1b2f3ca3370f5194423724a7fccba62a528e6b
2,402
py
Python
python/paddle/fluid/tests/unittests/test_huber_loss_op.py
Sand3r-/Paddle
1217a521554d63caa1381b8716910d0268dfc22d
[ "Apache-2.0" ]
2
2017-05-15T06:52:18.000Z
2017-06-13T11:55:11.000Z
python/paddle/fluid/tests/unittests/test_huber_loss_op.py
Sand3r-/Paddle
1217a521554d63caa1381b8716910d0268dfc22d
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/test_huber_loss_op.py
Sand3r-/Paddle
1217a521554d63caa1381b8716910d0268dfc22d
[ "Apache-2.0" ]
2
2019-08-16T12:03:28.000Z
2019-09-03T13:02:57.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
28.595238
80
0.639883
from __future__ import print_function import unittest import numpy as np from op_test import OpTest def huber_loss_forward(val, delta): abs_val = abs(val) if abs_val <= delta: return 0.5 * val * val else: return delta * (abs_val - 0.5 * delta) class TestHuberLossOp(OpTest)...
true
true
1c1b2f4646c7ebef63da6b835f246a463e856ac9
21,078
py
Python
win64-postgresql/pgAdmin 4/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py
vnetcon/curvy
ed3749bd5d298c7ab6c0625de91c211d6da4c762
[ "Apache-2.0" ]
null
null
null
win64-postgresql/pgAdmin 4/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py
vnetcon/curvy
ed3749bd5d298c7ab6c0625de91c211d6da4c762
[ "Apache-2.0" ]
3
2021-09-02T15:51:44.000Z
2022-03-02T09:53:17.000Z
win64-postgresql/pgAdmin 4/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py
vnetcon/curvy
ed3749bd5d298c7ab6c0625de91c211d6da4c762
[ "Apache-2.0" ]
null
null
null
########################################################################## # # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2020, The pgAdmin Development Team # This software is released under the PostgreSQL Licence # ########################################################################## """Implements Edb...
30.328058
79
0.556552
+ self.node_type, funcowner=row['funcowner'] )) return make_json_response( data=res, status=200 ) @check_precondition def properties(self, gid, sid, did, scid, pkgid, edbfnid=None): SQL = render_template("/".join([self.sql_tem...
true
true
1c1b31866644ad447a6368a6cf7ea0899e953195
10,147
py
Python
scripts/face_recognition_node.py
bryandario8/ros_face_recognition
6c7e0bb51d0fa303d88c4512a36264b639396a23
[ "MIT" ]
1
2020-01-27T18:33:07.000Z
2020-01-27T18:33:07.000Z
scripts/face_recognition_node.py
bryandario8/ros_face_recognition
6c7e0bb51d0fa303d88c4512a36264b639396a23
[ "MIT" ]
null
null
null
scripts/face_recognition_node.py
bryandario8/ros_face_recognition
6c7e0bb51d0fa303d88c4512a36264b639396a23
[ "MIT" ]
null
null
null
#!/usr/bin/env python import cv2 import glob import os import pickle import time import json import face_api import config import knn import rospy from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError from ros_face_recognition.msg import Box from ros_face_recognition.srv import Face, Name, N...
38.435606
114
0.578792
import cv2 import glob import os import pickle import time import json import face_api import config import knn import rospy from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError from ros_face_recognition.msg import Box from ros_face_recognition.srv import Face, Name, NameResponse, FaceResp...
false
true
1c1b31b5a8c1be16b1c284a7098d2d87923a22c1
553
py
Python
Final Project/reducer_length.py
amnghd/Map_Reduce_Design_Patterns
13a44850f95d8b4bab12f17094149182eaa09801
[ "MIT" ]
null
null
null
Final Project/reducer_length.py
amnghd/Map_Reduce_Design_Patterns
13a44850f95d8b4bab12f17094149182eaa09801
[ "MIT" ]
null
null
null
Final Project/reducer_length.py
amnghd/Map_Reduce_Design_Patterns
13a44850f95d8b4bab12f17094149182eaa09801
[ "MIT" ]
1
2020-09-07T14:10:51.000Z
2020-09-07T14:10:51.000Z
#!/usr/bin/python import sys old_id = None post_data = None answers_num = 0 answers_len = 0 answer_flag = 0 question_flag =0 for line in sys.stdin: data_mapped = line.strip().split("\t") post_id, post_type, length = data_mapped length = float(length) if post_type == "A": answers_num += 1 ...
22.12
78
0.618445
import sys old_id = None post_data = None answers_num = 0 answers_len = 0 answer_flag = 0 question_flag =0 for line in sys.stdin: data_mapped = line.strip().split("\t") post_id, post_type, length = data_mapped length = float(length) if post_type == "A": answers_num += 1 answers_len...
false
true
1c1b32a3e00057ad841a0dbe73cc96af47b5ca73
46,295
py
Python
tensorflow/python/training/tracking/base.py
ashutom/tensorflow-upstream
c16069c19de9e286dd664abb78d0ea421e9f32d4
[ "Apache-2.0" ]
8
2021-08-03T03:57:10.000Z
2021-12-13T01:19:02.000Z
tensorflow/python/training/tracking/base.py
CaptainGizzy21/tensorflow
3457a2b122e50b4d44ceaaed5a663d635e5c22df
[ "Apache-2.0" ]
3
2021-08-25T15:10:14.000Z
2022-02-10T04:33:14.000Z
tensorflow/python/training/tracking/base.py
CaptainGizzy21/tensorflow
3457a2b122e50b4d44ceaaed5a663d635e5c22df
[ "Apache-2.0" ]
3
2021-09-26T22:20:25.000Z
2021-09-26T23:07:13.000Z
"""An object-local variable management scheme.""" # Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/l...
41.371761
107
0.71593
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import collections import six from tensorflow.python.eager import context from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tenso...
true
true
1c1b32ed523af549b15b907329e7c1e706b069f7
564
py
Python
odtconvert.py
greenifydevelopers/wikiwikiwaaa
22ab46ebd1a33f6f7c7ee03d90c4a71b5329d872
[ "BSD-3-Clause" ]
null
null
null
odtconvert.py
greenifydevelopers/wikiwikiwaaa
22ab46ebd1a33f6f7c7ee03d90c4a71b5329d872
[ "BSD-3-Clause" ]
null
null
null
odtconvert.py
greenifydevelopers/wikiwikiwaaa
22ab46ebd1a33f6f7c7ee03d90c4a71b5329d872
[ "BSD-3-Clause" ]
null
null
null
import argparse from wiki.web.routes import convertODT from flask import Flask app = Flask(__name__) parser = argparse.ArgumentParser(description='Convert md to odt.') parser.add_argument('md', metavar='md', type=str, nargs=1, help='The markdown file to convert') parser.add_argument('--convert', d...
33.176471
72
0.680851
import argparse from wiki.web.routes import convertODT from flask import Flask app = Flask(__name__) parser = argparse.ArgumentParser(description='Convert md to odt.') parser.add_argument('md', metavar='md', type=str, nargs=1, help='The markdown file to convert') parser.add_argument('--convert', d...
true
true
1c1b331aa0ff260a3ab3edc3977f83b7365a1f2e
5,906
py
Python
torch/utils/data/distributed.py
steffenerickson/pytorch
0b656c4c69ce77ecd9aace486e471917e4660746
[ "Intel" ]
2
2022-02-14T13:56:03.000Z
2022-02-14T13:56:05.000Z
torch/utils/data/distributed.py
steffenerickson/pytorch
0b656c4c69ce77ecd9aace486e471917e4660746
[ "Intel" ]
1
2019-07-23T15:23:32.000Z
2019-07-23T15:32:23.000Z
torch/utils/data/distributed.py
steffenerickson/pytorch
0b656c4c69ce77ecd9aace486e471917e4660746
[ "Intel" ]
2
2019-07-23T14:37:31.000Z
2019-07-23T14:47:13.000Z
import math from typing import TypeVar, Optional, Iterator import torch from . import Sampler, Dataset import torch.distributed as dist T_co = TypeVar('T_co', covariant=True) class DistributedSampler(Sampler[T_co]): r"""Sampler that restricts data loading to a subset of the dataset. It is especially usefu...
43.748148
105
0.624619
import math from typing import TypeVar, Optional, Iterator import torch from . import Sampler, Dataset import torch.distributed as dist T_co = TypeVar('T_co', covariant=True) class DistributedSampler(Sampler[T_co]): def __init__(self, dataset: Dataset, num_replicas: Optional[int] = None, rank...
true
true
1c1b339931dde349d0396e259c88579fa72a4b40
6,119
py
Python
switch_model/upgrade/upgrade_2_0_1.py
DesmondZhong/switch
88abc164128b6a7345c7aa8806e2b37f74de54fa
[ "ECL-2.0", "Apache-2.0" ]
100
2015-06-30T02:33:39.000Z
2022-02-07T17:28:10.000Z
switch_model/upgrade/upgrade_2_0_1.py
DesmondZhong/switch
88abc164128b6a7345c7aa8806e2b37f74de54fa
[ "ECL-2.0", "Apache-2.0" ]
117
2015-07-07T00:45:01.000Z
2021-05-29T18:55:06.000Z
switch_model/upgrade/upgrade_2_0_1.py
DesmondZhong/switch
88abc164128b6a7345c7aa8806e2b37f74de54fa
[ "ECL-2.0", "Apache-2.0" ]
70
2015-06-30T02:36:05.000Z
2022-03-08T00:15:32.000Z
# Copyright (c) 2015-2019 The Switch Authors. All rights reserved. # Licensed under the Apache License, Version 2.0, which is in the LICENSE file. """ Upgrade input directories from 2.0.0b4 (final beta) to 2.0.1. (There were no changes for 2.0.0.) This just moves some modules, as listed in the rename_modules variable....
41.344595
106
0.677398
from __future__ import print_function import os, shutil, argparse import pandas import switch_model.upgrade upgrades_from = '2.0.0b4' upgrades_to = '2.0.1' replace_modules = { 'switch_model.hawaii.demand_response': ['switch_model.balancing.demand_response.iterative'], 'switch_model.hawaii.r_dem...
true
true
1c1b33fdf9e76530964c6bca2fc1b6361437f0d3
3,116
py
Python
arithmetic_analysis/in_static_equilibrium.py
tg12/Python
398d1dbf4b780d1725aeae9a91b4c79f4410e2f0
[ "MIT" ]
null
null
null
arithmetic_analysis/in_static_equilibrium.py
tg12/Python
398d1dbf4b780d1725aeae9a91b4c79f4410e2f0
[ "MIT" ]
null
null
null
arithmetic_analysis/in_static_equilibrium.py
tg12/Python
398d1dbf4b780d1725aeae9a91b4c79f4410e2f0
[ "MIT" ]
1
2020-06-26T09:46:17.000Z
2020-06-26T09:46:17.000Z
'''THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OT...
29.961538
77
0.621309
from numpy import array, cos, sin, radians, cross from typing import List def polar_force( magnitude: float, angle: float, radian_mode: bool = False ) -> List[float]: if radian_mode: return [magnitude * cos(angle), magnitude * sin(angle)] return [magnitude * cos(radians(angle)), magni...
true
true
1c1b347aa14026a6eab13fc052b8046e5c1dd65c
2,228
py
Python
bot/config.py
restricted1/earningswhisper
33a7209cf41c75272ecbdb0fa495bfad8c50b30f
[ "MIT" ]
null
null
null
bot/config.py
restricted1/earningswhisper
33a7209cf41c75272ecbdb0fa495bfad8c50b30f
[ "MIT" ]
1
2021-06-01T23:43:28.000Z
2021-06-01T23:43:28.000Z
bot/config.py
restricted1/earningswhisper
33a7209cf41c75272ecbdb0fa495bfad8c50b30f
[ "MIT" ]
null
null
null
#!/usr/local/bin/python # -*- coding: utf-8 -*- import os from tweepy import OAuthHandler try: from utils.dataIO import fileIO except ModuleNotFoundError: from bot.utils.dataIO import fileIO false_strings = ["false", "False", "f", "F", "0", "", "n", "N", "no", "No", "NO", "FALSE"] CONFIG_JSON = os.path.abspa...
39.785714
98
0.554758
import os from tweepy import OAuthHandler try: from utils.dataIO import fileIO except ModuleNotFoundError: from bot.utils.dataIO import fileIO false_strings = ["false", "False", "f", "F", "0", "", "n", "N", "no", "No", "NO", "FALSE"] CONFIG_JSON = os.path.abspath(os.path.join(os.path.dirname(__file__), "co...
true
true
1c1b34c3a55772e13ad2a6bc0dac8f750167e28b
11,135
py
Python
tests/unit/modules/test_localemod.py
l2ol33rt/salt
ff68bbd9f4bda992a3e039822fb32f141e94347c
[ "Apache-2.0" ]
null
null
null
tests/unit/modules/test_localemod.py
l2ol33rt/salt
ff68bbd9f4bda992a3e039822fb32f141e94347c
[ "Apache-2.0" ]
null
null
null
tests/unit/modules/test_localemod.py
l2ol33rt/salt
ff68bbd9f4bda992a3e039822fb32f141e94347c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Rupesh Tare <rupesht@saltstack.com>` ''' # Import Python libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase, skipIf from tests.support.mock import ( ...
46.785714
98
0.556803
from __future__ import absolute_import from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase, skipIf from tests.support.mock import ( MagicMock, Mock, patch, NO_MOCK, NO_MOCK_REASON ) import salt.modules.localemod as localemod from salt.exceptions impo...
true
true
1c1b34cc8cc578543eb5bcd18d92b7c339970f26
2,390
py
Python
extra/game-mechanics/invaders/invaders.py
PythonBiellaGroup/LearningPythonWithGames
4dbcff5b55f7f19d09127c7ef7dd04791d9cad96
[ "MIT" ]
2
2021-03-20T14:54:00.000Z
2021-06-16T19:10:52.000Z
extra/game-mechanics/invaders/invaders.py
PythonBiellaGroup/LearningPythonWithGames
4dbcff5b55f7f19d09127c7ef7dd04791d9cad96
[ "MIT" ]
null
null
null
extra/game-mechanics/invaders/invaders.py
PythonBiellaGroup/LearningPythonWithGames
4dbcff5b55f7f19d09127c7ef7dd04791d9cad96
[ "MIT" ]
null
null
null
# https://github.com/Wireframe-Magazine/Wireframe-9 # Wireframe #9: Space Invaders' disintegrating shields, pages 32-33 import pgzrun from random import randint WIDTH,HEIGHT = 1200, 700 # Dimensions of the screen (pixels) shots, to_delete, first_frame = [], [], True def create_random_shot(): shots.append({'pos':...
39.833333
83
0.578661
T = 1200, 700 # Dimensions of the screen (pixels) shots, to_delete, first_frame = [], [], True def create_random_shot(): shots.append({'pos': [randint(0, (WIDTH-images.shot.get_width())/10)*10, 0], 'sprite': images.shot, 'exploding': False}) # A shot will be created in a rando...
true
true
1c1b3516e78491994a069df6eba519aec9cc020d
481
py
Python
src/schemathesis/__init__.py
gukoff/schemathesis
bc7395e874d7e04c47514bdb733a6b0190ccd000
[ "MIT" ]
null
null
null
src/schemathesis/__init__.py
gukoff/schemathesis
bc7395e874d7e04c47514bdb733a6b0190ccd000
[ "MIT" ]
null
null
null
src/schemathesis/__init__.py
gukoff/schemathesis
bc7395e874d7e04c47514bdb733a6b0190ccd000
[ "MIT" ]
null
null
null
from . import fixups, hooks, targets from .cli import register_check, register_target from .constants import DataGenerationMethod, __version__ from .loaders import from_asgi, from_dict, from_file, from_path, from_pytest_fixture, from_uri, from_wsgi from .models import Case from .specs import graphql from .specs.openapi...
40.083333
105
0.848233
from . import fixups, hooks, targets from .cli import register_check, register_target from .constants import DataGenerationMethod, __version__ from .loaders import from_asgi, from_dict, from_file, from_path, from_pytest_fixture, from_uri, from_wsgi from .models import Case from .specs import graphql from .specs.openapi...
true
true
1c1b353170345df7413838b703d0af66835865dc
120
py
Python
backend/test/functional/test_health.py
Healthcare-NOW/poppwatch
b8545f40699ef521f4df2a2f2f4edcf3c5b1cc04
[ "MIT" ]
1
2020-09-09T23:06:36.000Z
2020-09-09T23:06:36.000Z
backend/test/functional/test_health.py
Healthcare-NOW/fec-watch
b8545f40699ef521f4df2a2f2f4edcf3c5b1cc04
[ "MIT" ]
9
2020-07-18T15:09:59.000Z
2022-02-27T00:53:47.000Z
backend/test/functional/test_health.py
Healthcare-NOW/pop-donation-tracker
b8545f40699ef521f4df2a2f2f4edcf3c5b1cc04
[ "MIT" ]
null
null
null
def test_health(test_client): resp = test_client.get("/api/health") assert resp.get_json() == {"message": "OK"}
30
47
0.658333
def test_health(test_client): resp = test_client.get("/api/health") assert resp.get_json() == {"message": "OK"}
true
true
1c1b3678389b0dee07e9a8bdb0fb82dfd6a76848
64
py
Python
test.py
dwrodri/LQTLD3
c703733da76c3e1c56e8152e2544aca5eb9e8586
[ "BSD-3-Clause" ]
7
2018-07-09T18:02:59.000Z
2022-03-19T14:02:34.000Z
test.py
dwrodri/LQTLD3
c703733da76c3e1c56e8152e2544aca5eb9e8586
[ "BSD-3-Clause" ]
null
null
null
test.py
dwrodri/LQTLD3
c703733da76c3e1c56e8152e2544aca5eb9e8586
[ "BSD-3-Clause" ]
null
null
null
im from quadtrees import LQTLD if __name__ == "__main__":
10.666667
27
0.6875
im from quadtrees import LQTLD if __name__ == "__main__":
false
true
1c1b36d3ffed4c6928e215617cce54c7659c236e
368
py
Python
Dangerous/Golismero/tools/sqlmap/plugins/dbms/db2/takeover.py
JeyZeta/Dangerous-
824ea6b571eda98bb855f176361e9b35dfda578e
[ "MIT" ]
null
null
null
Dangerous/Golismero/tools/sqlmap/plugins/dbms/db2/takeover.py
JeyZeta/Dangerous-
824ea6b571eda98bb855f176361e9b35dfda578e
[ "MIT" ]
null
null
null
Dangerous/Golismero/tools/sqlmap/plugins/dbms/db2/takeover.py
JeyZeta/Dangerous-
824ea6b571eda98bb855f176361e9b35dfda578e
[ "MIT" ]
1
2018-07-04T18:35:16.000Z
2018-07-04T18:35:16.000Z
#!/usr/bin/env python """ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from plugins.generic.takeover import Takeover as GenericTakeover class Takeover(GenericTakeover): def __init__(self): self.__basedir = None self.__datadir...
23
64
0.714674
from plugins.generic.takeover import Takeover as GenericTakeover class Takeover(GenericTakeover): def __init__(self): self.__basedir = None self.__datadir = None GenericTakeover.__init__(self)
true
true
1c1b37125d965591e8fe0cbe8c3c805a2b6149c6
8,109
py
Python
data_poor_fl/pseudo_client_tasks/pseudo_client_data_test.py
amitport/google_research_federated
b0dea245eb484f731f28d80e460795816d938b16
[ "BSD-3-Clause" ]
null
null
null
data_poor_fl/pseudo_client_tasks/pseudo_client_data_test.py
amitport/google_research_federated
b0dea245eb484f731f28d80e460795816d938b16
[ "BSD-3-Clause" ]
null
null
null
data_poor_fl/pseudo_client_tasks/pseudo_client_data_test.py
amitport/google_research_federated
b0dea245eb484f731f28d80e460795816d938b16
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2022, Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
40.343284
81
0.740782
from absl.testing import parameterized import tensorflow as tf import tensorflow_federated as tff from data_poor_fl.pseudo_client_tasks import pseudo_client_data def _build_balanced_client_data() -> tff.simulation.datasets.ClientData: client_ids = ['0', '1', '2'] def create_dataset_fn(client_id): ...
true
true
1c1b3762c5dc330c646e5072175de7e57743460b
206
py
Python
urls.py
dotX12/TelegramTokensPrice
a3d0510b5982b03ec8d94fed47aeaa70a9263afe
[ "MIT" ]
1
2021-06-07T21:35:01.000Z
2021-06-07T21:35:01.000Z
urls.py
dotX12/TelegramTokensPrice
a3d0510b5982b03ec8d94fed47aeaa70a9263afe
[ "MIT" ]
null
null
null
urls.py
dotX12/TelegramTokensPrice
a3d0510b5982b03ec8d94fed47aeaa70a9263afe
[ "MIT" ]
null
null
null
MARKET_URL = ('https://api.coingecko.com/api/v3/coins/' 'markets?vs_currency={}&ids={}&order={}&' 'per_page=100&page=1&sparkline={}&' 'price_change_percentage={}')
41.2
55
0.553398
MARKET_URL = ('https://api.coingecko.com/api/v3/coins/' 'markets?vs_currency={}&ids={}&order={}&' 'per_page=100&page=1&sparkline={}&' 'price_change_percentage={}')
true
true
1c1b389b8764ad2aa309c244ca1c48210ba16587
6,042
py
Python
actstream/tests.py
yeago/django-activity-stream
40799e907edec52a8bf203f852b85e5161542160
[ "BSD-3-Clause" ]
1
2016-06-20T19:40:12.000Z
2016-06-20T19:40:12.000Z
actstream/tests.py
yeago/django-activity-stream
40799e907edec52a8bf203f852b85e5161542160
[ "BSD-3-Clause" ]
null
null
null
actstream/tests.py
yeago/django-activity-stream
40799e907edec52a8bf203f852b85e5161542160
[ "BSD-3-Clause" ]
null
null
null
import unittest from django.db import models from django.test.client import Client from django.test import TransactionTestCase from django.contrib.auth.models import User, Group from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from actstream.signals import action...
44.10219
147
0.644158
import unittest from django.db import models from django.test.client import Client from django.test import TransactionTestCase from django.contrib.auth.models import User, Group from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from actstream.signals import action...
true
true
1c1b39edcc41a001daf93a7ea60883999a34f279
3,583
py
Python
src/pyqumo/tests/test_sim_gg1.py
larioandr/thesis-models
ecbc8c01aaeaa69034d6fe1d8577ab655968ea5f
[ "MIT" ]
1
2021-01-17T15:49:03.000Z
2021-01-17T15:49:03.000Z
src/pyqumo/tests/test_sim_gg1.py
larioandr/thesis-models
ecbc8c01aaeaa69034d6fe1d8577ab655968ea5f
[ "MIT" ]
null
null
null
src/pyqumo/tests/test_sim_gg1.py
larioandr/thesis-models
ecbc8c01aaeaa69034d6fe1d8577ab655968ea5f
[ "MIT" ]
1
2021-03-07T15:31:06.000Z
2021-03-07T15:31:06.000Z
from dataclasses import dataclass import pytest import numpy as np from numpy.testing import assert_allclose from pyqumo.arrivals import Poisson from pyqumo.random import Exponential, Distribution from pyqumo.sim.gg1 import simulate @dataclass class GG1Props: arrival: Distribution service: Distribution ...
36.561224
78
0.676528
from dataclasses import dataclass import pytest import numpy as np from numpy.testing import assert_allclose from pyqumo.arrivals import Poisson from pyqumo.random import Exponential, Distribution from pyqumo.sim.gg1 import simulate @dataclass class GG1Props: arrival: Distribution service: Distribution ...
true
true
1c1b3aaf17a7ed72bb57d7b09b1fed00f8671c31
1,513
py
Python
vsts/vsts/notification/v4_1/models/notification_query_condition.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "MIT" ]
null
null
null
vsts/vsts/notification/v4_1/models/notification_query_condition.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "MIT" ]
null
null
null
vsts/vsts/notification/v4_1/models/notification_query_condition.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
39.815789
101
0.559815
from msrest.serialization import Model class NotificationQueryCondition(Model): _attribute_map = { 'event_initiator': {'key': 'eventInitiator', 'type': 'str'}, 'event_type': {'key': 'eventType', 'type': 'str'}, 'subscriber': {'key': 'subscriber', 'type': 'str'}, 'subscript...
true
true
1c1b3b12041595cfcff6f36a70e30643d655af7a
9,584
py
Python
mdde/samples/heuristic/sample_heuristic_random_legal.py
akharitonov/mdde
b0443f3c9c3ca948e9dda213572926087c214d8d
[ "MIT" ]
1
2021-05-17T11:17:51.000Z
2021-05-17T11:17:51.000Z
mdde/samples/heuristic/sample_heuristic_random_legal.py
akharitonov/mdde
b0443f3c9c3ca948e9dda213572926087c214d8d
[ "MIT" ]
4
2020-05-30T12:23:04.000Z
2021-12-25T12:59:14.000Z
mdde/samples/heuristic/sample_heuristic_random_legal.py
akharitonov/mdde
b0443f3c9c3ca948e9dda213572926087c214d8d
[ "MIT" ]
null
null
null
import argparse import logging import sys from typing import List from pathlib import Path import numpy as np from mdde.core import Environment from mdde.agent.default import SingleNodeDefaultAgent from mdde.registry.workload import EDefaultYCSBWorkload from mdde.scenario.default import DefaultScenarioSimulation fro...
41.669565
114
0.564795
import argparse import logging import sys from typing import List from pathlib import Path import numpy as np from mdde.core import Environment from mdde.agent.default import SingleNodeDefaultAgent from mdde.registry.workload import EDefaultYCSBWorkload from mdde.scenario.default import DefaultScenarioSimulation fro...
true
true
1c1b3b92a1131eff2d81cedad90da35e5b66a103
9,301
py
Python
scheduler_sdk/model/monitor/alert_downtime_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
scheduler_sdk/model/monitor/alert_downtime_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
scheduler_sdk/model/monitor/alert_downtime_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: alert_downtime.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.proto...
45.150485
865
0.744544
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db ...
true
true
1c1b3c1db73af1ae3b22e4854a8cd06c77fa8fe7
5,397
py
Python
quantum_annealing/Dwave_Factoring/helpers/embedding.py
tommasoboccali/amazon-braket-examples
69acb3226bb09fff6384d04affab6c12aae3b1e3
[ "Apache-2.0" ]
3
2021-09-25T11:15:10.000Z
2022-02-27T15:38:10.000Z
quantum_annealing/Dwave_Factoring/helpers/embedding.py
tommasoboccali/amazon-braket-examples
69acb3226bb09fff6384d04affab6c12aae3b1e3
[ "Apache-2.0" ]
1
2021-09-25T09:09:37.000Z
2021-09-25T11:17:31.000Z
quantum_annealing/Dwave_Factoring/helpers/embedding.py
tommasoboccali/amazon-braket-examples
69acb3226bb09fff6384d04affab6c12aae3b1e3
[ "Apache-2.0" ]
3
2021-03-02T17:41:27.000Z
2021-03-02T17:41:44.000Z
# Copyright 2020 D-Wave Systems 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...
49.063636
93
0.419678
embeddings = {'SIMULATED_2000Q_CLOUD_TEST': {'a0': [431, 424, 175, 302, 168, 296], 'a1': [148, 172, 156, 164], 'a2': [417, 292, 289], 'and0,1': [173, 165], 'and0,2': [155, 167, 159], 'and1,0': [171, 174], ...
true
true
1c1b3c821ebcad33146e72003bb381f26395f449
387
py
Python
src/cms/constants/feedback_emotions.py
S10MC2015/cms-django
b08f2be60a9db6c8079ee923de2cd8912f550b12
[ "Apache-2.0" ]
null
null
null
src/cms/constants/feedback_emotions.py
S10MC2015/cms-django
b08f2be60a9db6c8079ee923de2cd8912f550b12
[ "Apache-2.0" ]
null
null
null
src/cms/constants/feedback_emotions.py
S10MC2015/cms-django
b08f2be60a9db6c8079ee923de2cd8912f550b12
[ "Apache-2.0" ]
null
null
null
""" This module contains all constants representing the emotion of the :class:`~cms.models.feedback.feedback.Feedback` model: * ``POS``: Positive * ``NEG``: Negative * ``NA``: Not Available """ from django.utils.translation import ugettext_lazy as _ POS = "POS" NEG = "NEG" NA = "NA" CHOICES = ( (POS, _("Posi...
16.826087
121
0.635659
from django.utils.translation import ugettext_lazy as _ POS = "POS" NEG = "NEG" NA = "NA" CHOICES = ( (POS, _("Positive")), (NEG, _("Negative")), (NA, _("Not Available")), )
true
true
1c1b3de73bcee9f83a6545c9edba83c9cd277fca
9,445
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/globals/topology/openflowchannel/matchcriteria_9aa9789751ef3a19fec75c76015a02c0.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/globals/topology/openflowchannel/matchcriteria_9aa9789751ef3a19fec75c76015a02c0.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/globals/topology/openflowchannel/matchcriteria_9aa9789751ef3a19fec75c76015a02c0.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, ...
40.191489
198
0.653573
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class MatchCriteria(Base): __slots__ = () _SDM_NAME = 'matchCriteria' _SDM_ATT_MAP = { 'Count': 'count', 'Description': 'description', 'IsEditable': 'isEditable', ...
true
true
1c1b3e977168d70b350263c335bc77dcca4e4d02
12,604
py
Python
test/core/test_geocoding.py
SabineEmbacher/xcube
25863c713a27f1ecf6efb25ee0de8d322ab295bc
[ "MIT" ]
null
null
null
test/core/test_geocoding.py
SabineEmbacher/xcube
25863c713a27f1ecf6efb25ee0de8d322ab295bc
[ "MIT" ]
null
null
null
test/core/test_geocoding.py
SabineEmbacher/xcube
25863c713a27f1ecf6efb25ee0de8d322ab295bc
[ "MIT" ]
null
null
null
import unittest import numpy as np import xarray as xr from xcube.core.geocoding import GeoCoding from xcube.core.geocoding import compute_ij_bboxes from xcube.core.geocoding import gu_compute_ij_bboxes def _new_source_dataset(): lon = np.array([[1.0, 6.0], [0.0, 2.0]]) lat = np.array([[...
46.338235
99
0.523485
import unittest import numpy as np import xarray as xr from xcube.core.geocoding import GeoCoding from xcube.core.geocoding import compute_ij_bboxes from xcube.core.geocoding import gu_compute_ij_bboxes def _new_source_dataset(): lon = np.array([[1.0, 6.0], [0.0, 2.0]]) lat = np.array([[...
true
true
1c1b3eb09640177bff9b95a30879f81fe464d2c6
1,659
py
Python
bot/migrations/0001_initial.py
CLIxIndia-Dev/MiTiRobot
964a72f4d0b26d830f7fdaf731f692a1e03a7980
[ "MIT" ]
null
null
null
bot/migrations/0001_initial.py
CLIxIndia-Dev/MiTiRobot
964a72f4d0b26d830f7fdaf731f692a1e03a7980
[ "MIT" ]
8
2017-09-15T19:10:35.000Z
2017-09-19T15:43:59.000Z
bot/migrations/0001_initial.py
CLIxIndia-Dev/CLIxChat
964a72f4d0b26d830f7fdaf731f692a1e03a7980
[ "MIT" ]
1
2018-12-04T18:56:44.000Z
2018-12-04T18:56:44.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-12 18:50 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import mptt.fields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ ...
38.581395
166
0.600964
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import mptt.fields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Element', fie...
true
true
1c1b3ec5650a3c506659a53e189ca788f310f7e3
817
py
Python
clk/__init__.py
Konubinix/click_project
be0d52e8babb2df4bcf58208d067609ed3bf20d6
[ "MIT" ]
null
null
null
clk/__init__.py
Konubinix/click_project
be0d52e8babb2df4bcf58208d067609ed3bf20d6
[ "MIT" ]
null
null
null
clk/__init__.py
Konubinix/click_project
be0d52e8babb2df4bcf58208d067609ed3bf20d6
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # keep it at the begin in order to get an accurate startup time from datetime import datetime startup_time = datetime.now() from clk import log # NOQA: E402 from clk import monkeypatch # NOQA: E402 from clk.config import config # NOQA: E402, F401 from clk.core import ...
34.041667
113
0.747858
from datetime import datetime startup_time = datetime.now() from clk import log from clk import monkeypatch from clk.config import config from clk.core import run from clk.decorators import table_format from clk.decorators import argument, command, flag, group, option, table_fields, use_settings from ...
true
true
1c1b401df2ee61e2511a65b277cb736ec41fa22a
1,875
py
Python
fetch_sj_vacancies.py
rtmlsh/Future-salary
2d8de49be939c1752e2fb3e6a5a46a9bf42f7ad9
[ "MIT" ]
null
null
null
fetch_sj_vacancies.py
rtmlsh/Future-salary
2d8de49be939c1752e2fb3e6a5a46a9bf42f7ad9
[ "MIT" ]
null
null
null
fetch_sj_vacancies.py
rtmlsh/Future-salary
2d8de49be939c1752e2fb3e6a5a46a9bf42f7ad9
[ "MIT" ]
null
null
null
from itertools import count import numpy import requests from count_average_salaries import predict_salary def search_sj_vacancies(language, sj_token, page=None, job_area=33, publish_period=30, city_num=4): url = 'https://api.superjob.ru/2.0/vacancies/' header = {'X-Api-App-Id': sj_t...
31.25
75
0.656
from itertools import count import numpy import requests from count_average_salaries import predict_salary def search_sj_vacancies(language, sj_token, page=None, job_area=33, publish_period=30, city_num=4): url = 'https://api.superjob.ru/2.0/vacancies/' header = {'X-Api-App-Id': sj_t...
true
true
1c1b408640d7839ab5c6b61e0a4ad76c7a8b3fc0
1,540
py
Python
bot/data/channel_repository.py
new-zelind/ClemBot
2f8b45f06abb510029f3461ab5e39535a5eb3385
[ "MIT" ]
1
2020-12-08T02:29:04.000Z
2020-12-08T02:29:04.000Z
bot/data/channel_repository.py
new-zelind/ClemBot
2f8b45f06abb510029f3461ab5e39535a5eb3385
[ "MIT" ]
null
null
null
bot/data/channel_repository.py
new-zelind/ClemBot
2f8b45f06abb510029f3461ab5e39535a5eb3385
[ "MIT" ]
1
2021-10-16T15:25:29.000Z
2021-10-16T15:25:29.000Z
import aiosqlite import logging import discord from bot.data.base_repository import BaseRepository log = logging.getLogger(__name__) class ChannelRepository(BaseRepository): async def add_channel(self, channel: discord.TextChannel) -> None: if await self.check_channel(channel.id): return ...
37.560976
100
0.615584
import aiosqlite import logging import discord from bot.data.base_repository import BaseRepository log = logging.getLogger(__name__) class ChannelRepository(BaseRepository): async def add_channel(self, channel: discord.TextChannel) -> None: if await self.check_channel(channel.id): return ...
true
true
1c1b409e744fd7542ec34a80ad1069eba6b2e8a0
3,585
py
Python
cloudkitty/tests/test_orchestrator.py
chnyda/cloudkitty
9c65b1d2304b8b963e12ef1918b9b23e180131b7
[ "Apache-2.0" ]
null
null
null
cloudkitty/tests/test_orchestrator.py
chnyda/cloudkitty
9c65b1d2304b8b963e12ef1918b9b23e180131b7
[ "Apache-2.0" ]
null
null
null
cloudkitty/tests/test_orchestrator.py
chnyda/cloudkitty
9c65b1d2304b8b963e12ef1918b9b23e180131b7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2014 Objectif Libre # # 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 ...
37.736842
78
0.650209
import testtools import mock from oslo_messaging import conffixture from stevedore import extension from cloudkitty import orchestrator from cloudkitty import tests from cloudkitty.tests.utils import is_functional_test class FakeKeystoneClient(object): class FakeTenants(object): def li...
true
true
1c1b41228f07a628c8e08dba2d75149cd0fbdcbb
31,637
py
Python
tests/functional/dashboard/test_catalogue.py
izi-core/izi-core
21176be2d41f0cf54ca954f294209c585f643dba
[ "BSD-3-Clause" ]
null
null
null
tests/functional/dashboard/test_catalogue.py
izi-core/izi-core
21176be2d41f0cf54ca954f294209c585f643dba
[ "BSD-3-Clause" ]
null
null
null
tests/functional/dashboard/test_catalogue.py
izi-core/izi-core
21176be2d41f0cf54ca954f294209c585f643dba
[ "BSD-3-Clause" ]
null
null
null
from http import client as http_client import json from django.conf import settings from django.contrib.messages import ERROR, INFO from django.urls import reverse from django.utils.http import urlencode from django.utils.translation import gettext from izi.core.loading import get_class, get_model from izi.test.facto...
40.612323
110
0.686348
from http import client as http_client import json from django.conf import settings from django.contrib.messages import ERROR, INFO from django.urls import reverse from django.utils.http import urlencode from django.utils.translation import gettext from izi.core.loading import get_class, get_model from izi.test.facto...
true
true
1c1b41b7e865b196a6d7c291d45166aa8c3642fe
43
py
Python
tests/models/__init__.py
joanvaquer/SDV
83e4fdf0ff72e6c5b72cfc8c6ec9584dbd34de28
[ "MIT" ]
null
null
null
tests/models/__init__.py
joanvaquer/SDV
83e4fdf0ff72e6c5b72cfc8c6ec9584dbd34de28
[ "MIT" ]
null
null
null
tests/models/__init__.py
joanvaquer/SDV
83e4fdf0ff72e6c5b72cfc8c6ec9584dbd34de28
[ "MIT" ]
null
null
null
"""Tests for the sdv.models subpackage."""
21.5
42
0.697674
true
true
1c1b42df6e0de2bfe154872980859cbb9b2a6228
4,357
py
Python
python/batch_errors.py
oracle-samples/oracle-db-examples
4a677b8cf012263c050868049b5c9603787aa1b9
[ "Apache-2.0" ]
1
2022-03-31T11:26:48.000Z
2022-03-31T11:26:48.000Z
python/batch_errors.py
oracle-samples/oracle-db-examples
4a677b8cf012263c050868049b5c9603787aa1b9
[ "Apache-2.0" ]
null
null
null
python/batch_errors.py
oracle-samples/oracle-db-examples
4a677b8cf012263c050868049b5c9603787aa1b9
[ "Apache-2.0" ]
3
2022-03-29T07:50:59.000Z
2022-03-31T12:29:02.000Z
#------------------------------------------------------------------------------ # Copyright (c) 2016, 2022, Oracle and/or its affiliates. # # This software is dual-licensed to you under the Universal Permissive License # (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License # 2.0 as shown at http...
39.972477
79
0.669497
import oracledb import sample_env if not sample_env.get_is_thin(): oracledb.init_oracle_client(lib_dir=sample_env.get_oracle_client()) connection = oracledb.connect(sample_env.get_main_connect_string()) cursor = connection.cursor() data_to_insert = [ (1016, 10, 'Child B o...
true
true
1c1b43842d5511a47d3cd5ca33d10d65d6441f7f
7,967
py
Python
src/cordial_manager/src/aws_polly_client/aws_polly_client.py
anandgokul18/cordial
8126caf74338b108af613205144e7811e58e5905
[ "MIT" ]
null
null
null
src/cordial_manager/src/aws_polly_client/aws_polly_client.py
anandgokul18/cordial
8126caf74338b108af613205144e7811e58e5905
[ "MIT" ]
47
2020-07-15T00:10:18.000Z
2021-06-09T02:49:51.000Z
src/cordial_manager/src/aws_polly_client/aws_polly_client.py
anandgokul18/cordial
8126caf74338b108af613205144e7811e58e5905
[ "MIT" ]
5
2020-07-05T19:19:12.000Z
2020-12-20T22:46:41.000Z
#!/usr/bin/env python import sys import re import os import json import soundfile from boto3 import client from botocore.exceptions import BotoCoreError, ClientError from contextlib import closing from behavior_schedule import BehaviorSchedule VISEMES_TRANSLATION = { "p": "BILABIAL", "f": "LABIODENTAL", ...
31
120
0.538973
import sys import re import os import json import soundfile from boto3 import client from botocore.exceptions import BotoCoreError, ClientError from contextlib import closing from behavior_schedule import BehaviorSchedule VISEMES_TRANSLATION = { "p": "BILABIAL", "f": "LABIODENTAL", "T": "INTERDENTAL"...
true
true
1c1b43d1dcbc4198297e1a0ac6d7f416ce817055
6,061
py
Python
napari/resources/__init__.py
yinawang28/napari
6ea95a9fa2f9150a4dbb5ec1286b8ff2020c3957
[ "BSD-3-Clause" ]
1
2020-02-14T15:40:42.000Z
2020-02-14T15:40:42.000Z
napari/resources/__init__.py
willingc/napari
3b92d9cba5a178d04c5b5231192448cc316a9bfd
[ "BSD-3-Clause" ]
null
null
null
napari/resources/__init__.py
willingc/napari
3b92d9cba5a178d04c5b5231192448cc316a9bfd
[ "BSD-3-Clause" ]
1
2020-07-19T18:03:35.000Z
2020-07-19T18:03:35.000Z
import sys from functools import lru_cache from glob import glob from importlib.util import module_from_spec, spec_from_file_location from os import environ, fspath from os.path import abspath, dirname, expanduser, join from pathlib import Path from tempfile import TemporaryDirectory from typing import List, Optional ...
37.41358
101
0.675136
import sys from functools import lru_cache from glob import glob from importlib.util import module_from_spec, spec_from_file_location from os import environ, fspath from os.path import abspath, dirname, expanduser, join from pathlib import Path from tempfile import TemporaryDirectory from typing import List, Optional ...
true
true
1c1b43fe50008d2169016792577e2e5d06ef8089
3,497
py
Python
wagtail/tests/modeladmintest/models.py
rSedoy/wagtail
90b7a3b0d38993f46ee585d4a4dfdfc6585cbde2
[ "BSD-3-Clause" ]
2
2019-05-23T01:31:18.000Z
2020-06-27T21:19:10.000Z
wagtail/tests/modeladmintest/models.py
rSedoy/wagtail
90b7a3b0d38993f46ee585d4a4dfdfc6585cbde2
[ "BSD-3-Clause" ]
6
2020-08-26T03:00:03.000Z
2020-09-24T02:59:14.000Z
wagtail/tests/modeladmintest/models.py
rSedoy/wagtail
90b7a3b0d38993f46ee585d4a4dfdfc6585cbde2
[ "BSD-3-Clause" ]
1
2021-05-11T00:05:26.000Z
2021-05-11T00:05:26.000Z
from django.db import models from wagtail.admin.edit_handlers import FieldPanel, ObjectList, TabbedInterface from wagtail.core.models import Page from wagtail.search import index class Author(models.Model): name = models.CharField(max_length=255) date_of_birth = models.DateField() def author_birth_strin...
27.535433
108
0.699743
from django.db import models from wagtail.admin.edit_handlers import FieldPanel, ObjectList, TabbedInterface from wagtail.core.models import Page from wagtail.search import index class Author(models.Model): name = models.CharField(max_length=255) date_of_birth = models.DateField() def author_birth_strin...
true
true
1c1b440eb745e1dd6c0d8b4aa5c8492209774c47
4,040
py
Python
colossalai/utils/timer.py
dumpmemory/ColossalAI
569357fea0ae91e0c886f177d1b91dd16277e1c9
[ "Apache-2.0" ]
null
null
null
colossalai/utils/timer.py
dumpmemory/ColossalAI
569357fea0ae91e0c886f177d1b91dd16277e1c9
[ "Apache-2.0" ]
null
null
null
colossalai/utils/timer.py
dumpmemory/ColossalAI
569357fea0ae91e0c886f177d1b91dd16277e1c9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- import time from typing import Tuple from .cuda import synchronize class Timer: """A timer object which helps to log the execution times, and provides different tools to assess the times. """ def __init__(self): self._started = False self._s...
27.297297
111
0.581931
import time from typing import Tuple from .cuda import synchronize class Timer: def __init__(self): self._started = False self._start_time = time.time() self._elapsed = 0 self._history = [] @property def has_history(self): return len(self._history) != 0 def...
true
true
1c1b44663fb58ecf68bbc92bd84b017905c2c7a4
8,693
py
Python
pdsando/ta/datafeeds/tsdata.py
sando-io/pdsando
9f9cbf74b4ec189acb17958771149d32b737866a
[ "Apache-2.0" ]
null
null
null
pdsando/ta/datafeeds/tsdata.py
sando-io/pdsando
9f9cbf74b4ec189acb17958771149d32b737866a
[ "Apache-2.0" ]
null
null
null
pdsando/ta/datafeeds/tsdata.py
sando-io/pdsando
9f9cbf74b4ec189acb17958771149d32b737866a
[ "Apache-2.0" ]
null
null
null
import pandas as pd def to_time_series_data(df, timespan, multiplier, index_col=None, source=None, category=None): temp = df.copy() ts_vals = temp[index_col] if index_col else temp.index.to_series() idx_name = index_col or temp.index.name temp[idx_name] = match_to_resolution( ts_vals, Resolut...
37.960699
160
0.619119
import pandas as pd def to_time_series_data(df, timespan, multiplier, index_col=None, source=None, category=None): temp = df.copy() ts_vals = temp[index_col] if index_col else temp.index.to_series() idx_name = index_col or temp.index.name temp[idx_name] = match_to_resolution( ts_vals, Resolut...
true
true
1c1b4547db8888a04573e6cf0b591c8f96967e44
6,521
py
Python
tests/https_tests.py
timansky/proxmoxer
f7874b53ebd7e06de1396b200d6a6020d696c984
[ "MIT" ]
157
2015-01-14T14:05:15.000Z
2022-02-22T14:30:37.000Z
tests/https_tests.py
timansky/proxmoxer
f7874b53ebd7e06de1396b200d6a6020d696c984
[ "MIT" ]
80
2015-02-24T03:15:29.000Z
2021-02-15T15:52:53.000Z
tests/https_tests.py
timansky/proxmoxer
f7874b53ebd7e06de1396b200d6a6020d696c984
[ "MIT" ]
66
2015-02-24T03:30:43.000Z
2020-12-14T19:59:23.000Z
__author__ = 'Oleg Butovich' __copyright__ = '(c) Oleg Butovich 2013-2017' __licence__ = 'MIT' from mock import patch, MagicMock from nose.tools import eq_, ok_ from proxmoxer import ProxmoxAPI @patch('requests.sessions.Session') def test_https_connection(req_session): response = {'ticket': 'ticket', ...
44.060811
120
0.601441
__author__ = 'Oleg Butovich' __copyright__ = '(c) Oleg Butovich 2013-2017' __licence__ = 'MIT' from mock import patch, MagicMock from nose.tools import eq_, ok_ from proxmoxer import ProxmoxAPI @patch('requests.sessions.Session') def test_https_connection(req_session): response = {'ticket': 'ticket', ...
true
true
1c1b46b65cc16ffa80632e74af096462cea95661
7,085
py
Python
venv/Lib/site-packages/eventlet/support/monotonic.py
Verckolf/MyInterfaceTest
e05674bd673a6a43cfb33f7cb4318886ba92a05c
[ "MIT" ]
39
2016-12-05T14:36:37.000Z
2021-07-29T18:22:34.000Z
venv/Lib/site-packages/eventlet/support/monotonic.py
Verckolf/MyInterfaceTest
e05674bd673a6a43cfb33f7cb4318886ba92a05c
[ "MIT" ]
68
2016-12-12T20:38:47.000Z
2020-07-26T18:28:49.000Z
venv/Lib/site-packages/eventlet/support/monotonic.py
Verckolf/MyInterfaceTest
e05674bd673a6a43cfb33f7cb4318886ba92a05c
[ "MIT" ]
120
2016-08-18T14:53:03.000Z
2020-06-16T13:27:20.000Z
# -*- coding: utf-8 -*- """ monotonic ~~~~~~~~~ This module provides a ``monotonic()`` function which returns the value (in fractional seconds) of a clock which never goes backwards. On Python 3.3 or newer, ``monotonic`` will be an alias of ``time.monotonic`` from the standard library. On older versions, ...
41.676471
86
0.567678
import ctypes import ctypes.util import os import sys import threading import time __all__ = ('monotonic',) try: monotonic = time.monotonic except AttributeError: try: if sys.platform == 'darwin': libc = ctypes.CDLL('/usr/lib/libc.dylib', use_errno=True) ...
true
true
1c1b46d300e0754bf41878219a59ebc9ea578ab9
4,550
py
Python
src/main.py
FabioCLima/Predict-Clients-Default
6d5c9879dabffbca60f574ecedaabf5468eda060
[ "MIT" ]
null
null
null
src/main.py
FabioCLima/Predict-Clients-Default
6d5c9879dabffbca60f574ecedaabf5468eda060
[ "MIT" ]
null
null
null
src/main.py
FabioCLima/Predict-Clients-Default
6d5c9879dabffbca60f574ecedaabf5468eda060
[ "MIT" ]
null
null
null
# %% import os import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib as mpl import seaborn as sns mpl.rcParams['figure.dpi']=400 SRC = os.path.abspath('.') BASE = os.path.dirname(SRC) DATA = os.path.join(BASE, 'data') MODELS = os.path.join(BASE, 'models') FIGS = os.path.join(BASE, 'f...
22.979798
95
0.69011
import os import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib as mpl import seaborn as sns mpl.rcParams['figure.dpi']=400 SRC = os.path.abspath('.') BASE = os.path.dirname(SRC) DATA = os.path.join(BASE, 'data') MODELS = os.path.join(BASE, 'models') FIGS = os.path.join(BASE, 'figs'...
true
true
1c1b470d4f74e6fde42d2887098ae2d8a974d054
775
py
Python
tests/musicxml/elements/note/test_accidental.py
alexgorji/music_score
b4176da52295361f3436826903485c5cb8054c5e
[ "MIT" ]
2
2020-06-22T13:33:28.000Z
2020-12-30T15:09:00.000Z
tests/musicxml/elements/note/test_accidental.py
alexgorji/music_score
b4176da52295361f3436826903485c5cb8054c5e
[ "MIT" ]
37
2020-02-18T12:15:00.000Z
2021-12-13T20:01:14.000Z
tests/musicxml/elements/note/test_accidental.py
alexgorji/music_score
b4176da52295361f3436826903485c5cb8054c5e
[ "MIT" ]
null
null
null
from musicscore.musicxml.elements.note import Note, Grace, Duration, Beam, Tie, Type, Lyric, Accidental from musicscore.musicxml.elements.fullnote import Chord, Pitch, DisplayStep, DisplayOctave, Rest, Step, Octave, Alter from unittest import TestCase class TestAccidentalDTD(TestCase): def setUp(self): s...
28.703704
117
0.674839
from musicscore.musicxml.elements.note import Note, Grace, Duration, Beam, Tie, Type, Lyric, Accidental from musicscore.musicxml.elements.fullnote import Chord, Pitch, DisplayStep, DisplayOctave, Rest, Step, Octave, Alter from unittest import TestCase class TestAccidentalDTD(TestCase): def setUp(self): s...
true
true
1c1b4735528cbebc809a92cdc539ab216e65a4c1
3,699
py
Python
newsonair-crawler/newsonair_scraper.py
PromodhPinto/anuvaad-corpus-tools
8b7f7ab02c3dea2096e1de17c6853b3456b2bae3
[ "MIT" ]
6
2021-03-17T10:25:44.000Z
2022-03-10T11:28:51.000Z
newsonair-crawler/newsonair_scraper.py
PromodhPinto/anuvaad-corpus-tools
8b7f7ab02c3dea2096e1de17c6853b3456b2bae3
[ "MIT" ]
null
null
null
newsonair-crawler/newsonair_scraper.py
PromodhPinto/anuvaad-corpus-tools
8b7f7ab02c3dea2096e1de17c6853b3456b2bae3
[ "MIT" ]
7
2020-12-17T07:23:29.000Z
2021-12-01T14:35:28.000Z
#File contains code to scrape & create En-Hi CSV from newsonair import re import time import pandas as pd from ast import literal_eval from selenium import webdriver from selenium.webdriver.chrome.options import Options from webdriver_manager.chrome import ChromeDriverManager from indicnlp.tokenize import sentence_tok...
32.734513
128
0.579616
import re import time import pandas as pd from ast import literal_eval from selenium import webdriver from selenium.webdriver.chrome.options import Options from webdriver_manager.chrome import ChromeDriverManager from indicnlp.tokenize import sentence_tokenize from nltk.tokenize import sent_tokenize ENG_URL = "htt...
true
true
1c1b47f507e574d154d102adc4f5f69a5511a3e3
212
py
Python
survol/sources_types/CIM_NetworkAdapter/__init__.py
rchateauneu/survol
ba66d3ec453b2d9dd3a8dabc6d53f71aa9ba8c78
[ "BSD-3-Clause" ]
9
2017-10-05T23:36:23.000Z
2021-08-09T15:40:03.000Z
survol/sources_types/CIM_NetworkAdapter/__init__.py
rchateauneu/survol
ba66d3ec453b2d9dd3a8dabc6d53f71aa9ba8c78
[ "BSD-3-Clause" ]
21
2018-01-02T09:33:03.000Z
2018-08-27T11:09:52.000Z
survol/sources_types/CIM_NetworkAdapter/__init__.py
rchateauneu/survol
ba66d3ec453b2d9dd3a8dabc6d53f71aa9ba8c78
[ "BSD-3-Clause" ]
4
2018-06-23T09:05:45.000Z
2021-01-22T15:36:50.000Z
""" Network adapter """ import lib_uris import lib_common def EntityOntology(): return (["Name"],) def MakeUri(na_nam): return lib_uris.gUriGen.node_from_dict("CIM_NetworkAdapter", {"Name": na_nam})
14.133333
82
0.707547
import lib_uris import lib_common def EntityOntology(): return (["Name"],) def MakeUri(na_nam): return lib_uris.gUriGen.node_from_dict("CIM_NetworkAdapter", {"Name": na_nam})
true
true
1c1b48464add79aeaaf8dc33fba3919e70b83bc8
18,786
py
Python
test/services/policy_engine/engine/policy/gates/deprecated/test_dockerfile.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
test/services/policy_engine/engine/policy/gates/deprecated/test_dockerfile.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
test/services/policy_engine/engine/policy/gates/deprecated/test_dockerfile.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
""" Gate Unit tests """ from test.services.policy_engine.engine.policy.gates import GateUnitTest from anchore_engine.services.policy_engine.engine.policy.gate import ExecutionContext from anchore_engine.db import Image from anchore_engine.services.policy_engine.engine.policy.gates.deprecated.dockerfile import Dockerf...
57.981481
164
0.719365
from test.services.policy_engine.engine.policy.gates import GateUnitTest from anchore_engine.services.policy_engine.engine.policy.gate import ExecutionContext from anchore_engine.db import Image from anchore_engine.services.policy_engine.engine.policy.gates.deprecated.dockerfile import DockerfileGate, \ NoHealthC...
true
true
1c1b48ee4a72262ab9a77f99b242a7579c0e46f1
401
py
Python
topCoder/srms/300s/srm383/div2/floor_layout.py
gauravsingh58/algo
397859a53429e7a585e5f6964ad24146c6261326
[ "WTFPL" ]
1
2020-09-30T19:53:08.000Z
2020-09-30T19:53:08.000Z
topCoder/srms/300s/srm383/div2/floor_layout.py
gauravsingh58/algo
397859a53429e7a585e5f6964ad24146c6261326
[ "WTFPL" ]
null
null
null
topCoder/srms/300s/srm383/div2/floor_layout.py
gauravsingh58/algo
397859a53429e7a585e5f6964ad24146c6261326
[ "WTFPL" ]
1
2020-10-15T09:10:57.000Z
2020-10-15T09:10:57.000Z
class FloorLayout: def countBoards(self, layout): c = 0 for i in xrange(len(layout)): for j in xrange(len(layout[i])): if j > 0 and layout[i][j] == '-' and layout[i][j-1] == '-': continue if i > 0 and layout[i][j] == '|' and layout[i-1]...
33.416667
75
0.408978
class FloorLayout: def countBoards(self, layout): c = 0 for i in xrange(len(layout)): for j in xrange(len(layout[i])): if j > 0 and layout[i][j] == '-' and layout[i][j-1] == '-': continue if i > 0 and layout[i][j] == '|' and layout[i-1]...
true
true