hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f70543a92105e9ffaab879256ddfee6d1ffc3133
789
py
Python
app/plugins/task/command.py
criticallycode/zima
cd38cac1c0c33b362d110ae28deba3828daa3f4a
[ "Apache-2.0" ]
null
null
null
app/plugins/task/command.py
criticallycode/zima
cd38cac1c0c33b362d110ae28deba3828daa3f4a
[ "Apache-2.0" ]
null
null
null
app/plugins/task/command.py
criticallycode/zima
cd38cac1c0c33b362d110ae28deba3828daa3f4a
[ "Apache-2.0" ]
null
null
null
from systems.plugins.index import BaseProvider import re import shlex class Provider(BaseProvider('task', 'command')): def execute(self, results, params): env = self._env_vars(params) stdin = params.pop('input', self.field_input) cwd = params.pop('cwd', self.field_cwd) display = ...
28.178571
82
0.603295
from systems.plugins.index import BaseProvider import re import shlex class Provider(BaseProvider('task', 'command')): def execute(self, results, params): env = self._env_vars(params) stdin = params.pop('input', self.field_input) cwd = params.pop('cwd', self.field_cwd) display = ...
true
true
f70543b92bf5c3f32227c1e22d912116c437eda4
10,459
py
Python
kolibri/utils/tests/test_cli.py
FollonSaxBass/kolibri
4cf820b14386aecc228fecff64c847bad407cbb1
[ "MIT" ]
2
2021-05-13T10:20:46.000Z
2021-11-15T12:31:03.000Z
kolibri/utils/tests/test_cli.py
camellia26/kolibri
7f1cb794c93f37e039be22f56a5ac1989ed22bde
[ "MIT" ]
2
2021-09-24T11:36:21.000Z
2021-09-29T16:09:25.000Z
kolibri/utils/tests/test_cli.py
camellia26/kolibri
7f1cb794c93f37e039be22f56a5ac1989ed22bde
[ "MIT" ]
null
null
null
""" Tests for `kolibri.utils.cli` module. """ from __future__ import absolute_import from __future__ import print_function import logging import os import tempfile import pytest from django.db.utils import OperationalError from mock import patch import kolibri from kolibri.plugins.utils import autoremove_unavailable...
32.582555
96
0.707716
from __future__ import absolute_import from __future__ import print_function import logging import os import tempfile import pytest from django.db.utils import OperationalError from mock import patch import kolibri from kolibri.plugins.utils import autoremove_unavailable_plugins from kolibri.utils import cli from ko...
true
true
f70544b0ddc04df283be747eb408cbc27a54108d
284
py
Python
Basic-Python/code/test_magic/3.py
johnnynode/AI-LEARNING-MATERIAL
1719f5b6ecb9b9caf485b9d806c1211b142b8ed5
[ "MIT" ]
2
2018-06-08T00:40:17.000Z
2018-06-08T05:27:30.000Z
Basic-Python/code/test_magic/3.py
johnnynode/AI-LEARNING-MATERIAL
1719f5b6ecb9b9caf485b9d806c1211b142b8ed5
[ "MIT" ]
null
null
null
Basic-Python/code/test_magic/3.py
johnnynode/AI-LEARNING-MATERIAL
1719f5b6ecb9b9caf485b9d806c1211b142b8ed5
[ "MIT" ]
null
null
null
class Person: name='zhangsan' age=20 p = Person() print(p) # <__main__.Person object at 0x10073e668> print('⭐️ ' * 20) class Stu: name='zhangsan' age=20 def __str__(self): return "name: %s; age: %d"%(self.name, self.age) s = Stu() print(s) # name: zhangsan; age: 20
15.777778
52
0.623239
class Person: name='zhangsan' age=20 p = Person() print(p) print('⭐️ ' * 20) class Stu: name='zhangsan' age=20 def __str__(self): return "name: %s; age: %d"%(self.name, self.age) s = Stu() print(s)
true
true
f70544f6140f506ebae794b51d635f46a4f446d2
3,088
py
Python
src/layers/transformers/sublayers.py
DwaraknathT/sparsity
705f2cba074e6ab4f7655c6af98882773cd826bf
[ "MIT" ]
null
null
null
src/layers/transformers/sublayers.py
DwaraknathT/sparsity
705f2cba074e6ab4f7655c6af98882773cd826bf
[ "MIT" ]
null
null
null
src/layers/transformers/sublayers.py
DwaraknathT/sparsity
705f2cba074e6ab4f7655c6af98882773cd826bf
[ "MIT" ]
null
null
null
""" Define the sublayers in encoder/decoder layer """ import numpy as np import torch import torch.nn as nn import torch.nn.functional as F class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() se...
31.191919
96
0.599093
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F class ScaledDotProductAttention(nn.Module): def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature def forward(self, q, k, v, mask=None): attn ...
true
true
f705463c73b3b08df3a5efe1d09bfeb5a1f30dce
33,830
py
Python
StdChal.py
pzread/judge
9721caff6bda5c9d35edb581c060606824fad6d8
[ "MIT" ]
25
2015-03-14T08:13:22.000Z
2020-07-30T15:34:34.000Z
StdChal.py
pzread/judge
9721caff6bda5c9d35edb581c060606824fad6d8
[ "MIT" ]
32
2016-02-16T08:38:52.000Z
2016-08-18T08:12:15.000Z
StdChal.py
pzread/judge
9721caff6bda5c9d35edb581c060606824fad6d8
[ "MIT" ]
8
2015-10-14T10:27:21.000Z
2020-08-01T17:11:20.000Z
'''Standard challenge module.''' import os import shutil import fcntl from cffi import FFI from tornado import gen, concurrent, process from tornado.stack_context import StackContext from tornado.ioloop import IOLoop import PyExt import Privilege import Config from Utils import FileUtils STATUS_NONE = 0 STATUS_AC = ...
31.179724
80
0.532131
import os import shutil import fcntl from cffi import FFI from tornado import gen, concurrent, process from tornado.stack_context import StackContext from tornado.ioloop import IOLoop import PyExt import Privilege import Config from Utils import FileUtils STATUS_NONE = 0 STATUS_AC = 1 STATUS_WA = 2 STATUS_RE = 3 STA...
true
true
f70546cdac654426bc6a1c1eda3b202298692492
170
py
Python
Python/CodeForces Solutions/1-500/337A.py
7namansharma/Comp-Prog
b760ef9b4173e6d5851dc63cc92a8e935baf60ed
[ "MIT" ]
null
null
null
Python/CodeForces Solutions/1-500/337A.py
7namansharma/Comp-Prog
b760ef9b4173e6d5851dc63cc92a8e935baf60ed
[ "MIT" ]
null
null
null
Python/CodeForces Solutions/1-500/337A.py
7namansharma/Comp-Prog
b760ef9b4173e6d5851dc63cc92a8e935baf60ed
[ "MIT" ]
null
null
null
n, m = map(int, input().split()) l = list(map(int, input().split())) l.sort() mini = l[m-1] - l[0] for i in range(m-n+1): mini = min(mini, l[i+n-1]-l[i]) print(mini)
21.25
35
0.547059
n, m = map(int, input().split()) l = list(map(int, input().split())) l.sort() mini = l[m-1] - l[0] for i in range(m-n+1): mini = min(mini, l[i+n-1]-l[i]) print(mini)
true
true
f705476175ce0e41b026038bb632673a3821a6ce
13,531
py
Python
ivy/functional/ivy/linear_algebra.py
Neel-Renavikar/ivy
644ab189a3a3fc52b1f3f86563226106e549eea3
[ "Apache-2.0" ]
null
null
null
ivy/functional/ivy/linear_algebra.py
Neel-Renavikar/ivy
644ab189a3a3fc52b1f3f86563226106e549eea3
[ "Apache-2.0" ]
null
null
null
ivy/functional/ivy/linear_algebra.py
Neel-Renavikar/ivy
644ab189a3a3fc52b1f3f86563226106e549eea3
[ "Apache-2.0" ]
null
null
null
# global from typing import Union, Optional, Tuple, Literal from collections import namedtuple # local import ivy from ivy.framework_handler import current_framework as _cur_framework inf = float('inf') # Array API Standard # # -------------------# def matrix_transpose(x: Union[ivy.Array, ivy.NativeArray])\ ...
44.953488
483
0.578302
from typing import Union, Optional, Tuple, Literal from collections import namedtuple import ivy from ivy.framework_handler import current_framework as _cur_framework inf = float('inf') def matrix_transpose(x: Union[ivy.Array, ivy.NativeArray])\ -> ivy.Array: return _cur_framework(x).matrix_transpose(...
true
true
f70547e8199382ef401382f89593188a5674649a
1,195
py
Python
backend/surfsara/models/task.py
sara-nl/data-exchange
52b9c2554a52b56686f3a06f583a7a6454bf6df6
[ "Apache-2.0" ]
4
2020-12-03T14:13:29.000Z
2021-04-19T03:03:19.000Z
backend/surfsara/models/task.py
sara-nl/data-exchange
52b9c2554a52b56686f3a06f583a7a6454bf6df6
[ "Apache-2.0" ]
null
null
null
backend/surfsara/models/task.py
sara-nl/data-exchange
52b9c2554a52b56686f3a06f583a7a6454bf6df6
[ "Apache-2.0" ]
null
null
null
from django.contrib.postgres.fields import JSONField from django.db import models from surfsara.models.permission import Permission class Task(models.Model): RUNNING = "running" SUCCESS = "success" ERROR = "error" OUTPUT_RELEASED = "output_released" RELEASE_REJECTED = "release_rejected" TASK_...
34.142857
84
0.711297
from django.contrib.postgres.fields import JSONField from django.db import models from surfsara.models.permission import Permission class Task(models.Model): RUNNING = "running" SUCCESS = "success" ERROR = "error" OUTPUT_RELEASED = "output_released" RELEASE_REJECTED = "release_rejected" TASK_...
true
true
f705482cb111e6ec8cc98d518959f511b2ffb01f
4,422
py
Python
AtomicASTChangeMining/src/test/resources/ASTConversion/sklearn/utils/tests/test_seq_dataset.py
maldil/CPATMiner2.0
743aa8a5b638a1963e621f59f63d794728ab0c79
[ "Apache-2.0" ]
4
2021-11-04T02:47:31.000Z
2022-01-25T02:04:05.000Z
AtomicASTChangeMining/src/test/resources/ASTConversion/sklearn/utils/tests/test_seq_dataset.py
maldil/R-CPATMiner
88b96a5af438a9c2ea2dab351cb8b210119132a2
[ "Apache-2.0" ]
null
null
null
AtomicASTChangeMining/src/test/resources/ASTConversion/sklearn/utils/tests/test_seq_dataset.py
maldil/R-CPATMiner
88b96a5af438a9c2ea2dab351cb8b210119132a2
[ "Apache-2.0" ]
1
2021-09-11T06:52:39.000Z
2021-09-11T06:52:39.000Z
# Author: Tom Dupre la Tour # Joan Massich <mailsik@gmail.com> # # License: BSD 3 clause import numpy as np import pytest import scipy.sparse as sp from numpy.testing import assert_array_equal from sklearn.utils._seq_dataset import ( ArrayDataset32, ArrayDataset64, CSRDataset32, CSRDataset64) from sklearn...
31.361702
79
0.688602
import numpy as np import pytest import scipy.sparse as sp from numpy.testing import assert_array_equal from sklearn.utils._seq_dataset import ( ArrayDataset32, ArrayDataset64, CSRDataset32, CSRDataset64) from sklearn.datasets import load_iris from sklearn.utils._testing import assert_allclose iris = load_ir...
true
true
f705483d25bdc6d0944fd7a8786d200878fbb456
6,799
py
Python
registry.py
redheads/registry-image-check
989b676b0159607dc51fc7fbc010d56fdd4a197c
[ "Apache-2.0" ]
null
null
null
registry.py
redheads/registry-image-check
989b676b0159607dc51fc7fbc010d56fdd4a197c
[ "Apache-2.0" ]
null
null
null
registry.py
redheads/registry-image-check
989b676b0159607dc51fc7fbc010d56fdd4a197c
[ "Apache-2.0" ]
1
2021-04-23T13:01:11.000Z
2021-04-23T13:01:11.000Z
#!/usr/bin/env python # -*- coding:utf-8 -*- # bug-report: feilengcui008@gmail.com """ api for docker registry """ import urllib2 import urllib import json import base64 class RegistryException(Exception): """ registry api related exception """ pass class RegistryApi(object): """ interact with docker ...
40.712575
94
0.610531
import urllib2 import urllib import json import base64 class RegistryException(Exception): pass class RegistryApi(object): def __init__(self, username, password, registry_endpoint): self.username = username self.password = password self.basic_token = base64.encodestring("%s:%s" ...
true
true
f70548590f17b2348d1c6961c358ea744b865263
2,283
py
Python
src/examples/vision/image_classification_camera.py
SanchitMisal/aiyprojects-raspbian
d148b2b4f427cd6ed240f338f260f277ead50264
[ "Apache-2.0" ]
1,610
2017-05-04T13:41:19.000Z
2022-03-31T14:55:55.000Z
src/examples/vision/image_classification_camera.py
SanchitMisal/aiyprojects-raspbian
d148b2b4f427cd6ed240f338f260f277ead50264
[ "Apache-2.0" ]
716
2017-05-04T13:37:27.000Z
2022-03-04T09:42:48.000Z
src/examples/vision/image_classification_camera.py
SanchitMisal/aiyprojects-raspbian
d148b2b4f427cd6ed240f338f260f277ead50264
[ "Apache-2.0" ]
761
2017-05-04T16:00:31.000Z
2022-03-27T23:18:46.000Z
#!/usr/bin/env python3 # # Copyright 2017 Google 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 ...
35.123077
90
0.710907
import argparse import contextlib from aiy.vision.inference import CameraInference from aiy.vision.models import image_classification from picamera import PiCamera def classes_info(classes): return ', '.join('%s (%.2f)' % pair for pair in classes) @contextlib.contextmanager def CameraPreview(camer...
true
true
f70549113c4375b6a845661be245774cf999e7fa
1,084
py
Python
py/server/deephaven/config/__init__.py
mattrunyon/deephaven-core
80e3567e4647ab76a81e483d0a8ab542f9aadace
[ "MIT" ]
null
null
null
py/server/deephaven/config/__init__.py
mattrunyon/deephaven-core
80e3567e4647ab76a81e483d0a8ab542f9aadace
[ "MIT" ]
null
null
null
py/server/deephaven/config/__init__.py
mattrunyon/deephaven-core
80e3567e4647ab76a81e483d0a8ab542f9aadace
[ "MIT" ]
null
null
null
# # Copyright (c) 2016-2021 Deephaven Data Labs and Patent Pending # """ This module provides access to the Deephaven server configuration. """ import jpy from deephaven import DHError from deephaven.time import TimeZone _JDHConfig = jpy.get_type("io.deephaven.configuration.Configuration") _JDateTimeZone = jpy.get_...
33.875
93
0.694649
import jpy from deephaven import DHError from deephaven.time import TimeZone _JDHConfig = jpy.get_type("io.deephaven.configuration.Configuration") _JDateTimeZone = jpy.get_type("org.joda.time.DateTimeZone") def get_log_dir() -> str: try: return _JDHConfig.getInstance().getLogDir() except Exceptio...
true
true
f70549e63137bea31c0367034d4cf81c7cef6244
19,148
py
Python
train/new_model_trainers/img_only.py
veritas9872/fastMRI-kspace
4c484b3183e9f06838b5ee108af283611c2e1e77
[ "MIT" ]
18
2019-10-21T23:54:28.000Z
2021-12-23T08:16:04.000Z
train/new_model_trainers/img_only.py
veritas9872/fastMRI-kspace
4c484b3183e9f06838b5ee108af283611c2e1e77
[ "MIT" ]
1
2020-07-11T08:05:33.000Z
2020-07-11T08:05:33.000Z
train/new_model_trainers/img_only.py
veritas9872/fastMRI-kspace
4c484b3183e9f06838b5ee108af283611c2e1e77
[ "MIT" ]
5
2019-11-23T14:11:54.000Z
2022-02-19T13:39:15.000Z
import torch from torch import nn, optim, multiprocessing from torch.utils.data import DataLoader from torch.utils.tensorboard.writer import SummaryWriter from tqdm import tqdm from time import time from collections import defaultdict from utils.run_utils import get_logger from utils.train_utils import CheckpointMan...
49.606218
120
0.652966
import torch from torch import nn, optim, multiprocessing from torch.utils.data import DataLoader from torch.utils.tensorboard.writer import SummaryWriter from tqdm import tqdm from time import time from collections import defaultdict from utils.run_utils import get_logger from utils.train_utils import CheckpointMan...
true
true
f7054b7e595f0681a798e1fedadc7b43405ebf05
2,576
py
Python
interpreter.py
bdngo/math-interpreter-py
fadcefce82176adf38722f7005270d6f2ea6957d
[ "MIT" ]
null
null
null
interpreter.py
bdngo/math-interpreter-py
fadcefce82176adf38722f7005270d6f2ea6957d
[ "MIT" ]
null
null
null
interpreter.py
bdngo/math-interpreter-py
fadcefce82176adf38722f7005270d6f2ea6957d
[ "MIT" ]
null
null
null
from nodes import * from tokens import Token, TokenType class Interpreter: def __init__(self, ast): self.ast = ast def eval(self): return self.evalHelper(self.ast) def evalHelper(self, ast): if isinstance(ast, NumberNode): return ast.node elif isinstance(ast, ...
37.333333
77
0.574534
from nodes import * from tokens import Token, TokenType class Interpreter: def __init__(self, ast): self.ast = ast def eval(self): return self.evalHelper(self.ast) def evalHelper(self, ast): if isinstance(ast, NumberNode): return ast.node elif isinstance(ast, ...
true
true
f7054bb2d5a141238c03843e494f10f7a429bc1b
3,634
py
Python
upload/common/batch.py
sampierson/upload-service
b7c470706f729bdee34a4254555f798558877095
[ "MIT" ]
6
2018-01-31T19:44:17.000Z
2020-02-20T13:03:09.000Z
upload/common/batch.py
sampierson/upload-service
b7c470706f729bdee34a4254555f798558877095
[ "MIT" ]
379
2018-03-21T21:29:15.000Z
2020-01-28T14:20:48.000Z
upload/common/batch.py
HumanCellAtlas/staging-service
b7c470706f729bdee34a4254555f798558877095
[ "MIT" ]
5
2018-03-09T14:13:15.000Z
2020-01-30T15:49:46.000Z
import hashlib import json import os import boto3 from .retry import retry_on_aws_too_many_requests batch = boto3.client('batch') class JobDefinition: @classmethod def clear_all(cls): deleted_count = 0 for jobdef in batch.describe_job_definitions(status='ACTIVE')['jobDefinitions']: ...
35.627451
112
0.581728
import hashlib import json import os import boto3 from .retry import retry_on_aws_too_many_requests batch = boto3.client('batch') class JobDefinition: @classmethod def clear_all(cls): deleted_count = 0 for jobdef in batch.describe_job_definitions(status='ACTIVE')['jobDefinitions']: ...
true
true
f7054c9560ffb857b2249248031a041e8e79b6b8
143
py
Python
02-Data_Types_and_Variables/Exercises/4-Sum_of_Chars.py
eclipse-ib/Software-University-Fundamentals_Module
994ef75c70d1bae8e615dbb789aeffd6e0a42c34
[ "MIT" ]
null
null
null
02-Data_Types_and_Variables/Exercises/4-Sum_of_Chars.py
eclipse-ib/Software-University-Fundamentals_Module
994ef75c70d1bae8e615dbb789aeffd6e0a42c34
[ "MIT" ]
null
null
null
02-Data_Types_and_Variables/Exercises/4-Sum_of_Chars.py
eclipse-ib/Software-University-Fundamentals_Module
994ef75c70d1bae8e615dbb789aeffd6e0a42c34
[ "MIT" ]
null
null
null
n = int(input()) total_sum = 0 for i in range(1,n+1): letter = input() total_sum += ord(letter) print(f"The sum equals: {total_sum}")
17.875
37
0.622378
n = int(input()) total_sum = 0 for i in range(1,n+1): letter = input() total_sum += ord(letter) print(f"The sum equals: {total_sum}")
true
true
f7054ddd1c29f5074a0fb83fe4035a51a2b1d6f7
24,926
py
Python
python/ccxt/wazirx.py
jspenc72/ccxt
5eb43754ddb85aa24fb16860ce80d18790c288be
[ "MIT" ]
null
null
null
python/ccxt/wazirx.py
jspenc72/ccxt
5eb43754ddb85aa24fb16860ce80d18790c288be
[ "MIT" ]
1
2022-01-27T19:54:13.000Z
2022-01-27T19:54:13.000Z
python/ccxt/wazirx.py
jspenc72/ccxt
5eb43754ddb85aa24fb16860ce80d18790c288be
[ "MIT" ]
1
2022-03-15T22:51:08.000Z
2022-03-15T22:51:08.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import PermissionDe...
36.872781
160
0.46618
ge import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import BadRequest from ccxt.base.errors import BadSymbol from ccxt.base.errors import InsufficientFunds from ccxt.base.errors...
true
true
f7054e9b703e0a50932a707ef947c70e5aed0d9c
1,295
py
Python
bin/MemoryRuns.py
seanluciotolentino/SimpactPurple
a81a738bd63bc1d6a86f7243c0826f6e5d846447
[ "AFL-3.0" ]
null
null
null
bin/MemoryRuns.py
seanluciotolentino/SimpactPurple
a81a738bd63bc1d6a86f7243c0826f6e5d846447
[ "AFL-3.0" ]
null
null
null
bin/MemoryRuns.py
seanluciotolentino/SimpactPurple
a81a738bd63bc1d6a86f7243c0826f6e5d846447
[ "AFL-3.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Oct 23 14:16:27 2013 @author: Lucio Program for assessing the memory footprint of the simulation. Needs the memory_profiler module (installed on the milano cluster). """ import os import time import sys import simpactpurple from memory_profiler import profile @profile de...
27.553191
76
0.674131
import os import time import sys import simpactpurple from memory_profiler import profile @profile def run_single(pop): s = simpactpurple.Community() s.INITIAL_POPULATION = pop s.start() s.update_recruiting(s.RECRUIT_INITIAL) for i in range(s.RECRUIT_WARM_UP): s.tim...
true
true
f7054fb9122add1a551c527b03a0139ed75b600b
416
py
Python
aserializer/django/utils.py
orderbird/aserializer
3aeaa073f2dac7830458a1f45ffa9af6540bd315
[ "MIT" ]
null
null
null
aserializer/django/utils.py
orderbird/aserializer
3aeaa073f2dac7830458a1f45ffa9af6540bd315
[ "MIT" ]
null
null
null
aserializer/django/utils.py
orderbird/aserializer
3aeaa073f2dac7830458a1f45ffa9af6540bd315
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- try: import django except ImportError as e: django = None django_import_error = e def check_django_import(): if django is None: raise django_import_error class django_required(object): def __call__(self, func): def wrapper(self, *args, **kwargs): ...
19.809524
46
0.625
try: import django except ImportError as e: django = None django_import_error = e def check_django_import(): if django is None: raise django_import_error class django_required(object): def __call__(self, func): def wrapper(self, *args, **kwargs): check_django_import...
true
true
f705510f848be122cef73d6a694e14dd0d464839
111,947
py
Python
python/paddle/tensor/math.py
LemonNoel/Paddle
1cb511d1488bb86ebb587330902840cb01c79c0d
[ "Apache-2.0" ]
null
null
null
python/paddle/tensor/math.py
LemonNoel/Paddle
1cb511d1488bb86ebb587330902840cb01c79c0d
[ "Apache-2.0" ]
null
null
null
python/paddle/tensor/math.py
LemonNoel/Paddle
1cb511d1488bb86ebb587330902840cb01c79c0d
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 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 appli...
37.253577
291
0.570993
from __future__ import print_function import numpy as np from paddle.common_ops_import import VarDesc from paddle.common_ops_import import dygraph_only from paddle.common_ops_import import OpProtoHolder from paddle.common_ops_import import templatedoc from paddle.common_ops_import import dygraph_utils fr...
true
true
f7055160e64b5e5b19261e32e1da4a104c9c3cab
3,748
py
Python
airtest/core/android/javacap.py
koyoki/Airtest
ea8391bd4819d9231e7b35f18c14662e6109fad0
[ "Apache-2.0" ]
2
2019-12-10T02:36:49.000Z
2019-12-19T08:54:40.000Z
airtest/core/android/javacap.py
koyoki/Airtest
ea8391bd4819d9231e7b35f18c14662e6109fad0
[ "Apache-2.0" ]
1
2021-10-12T22:51:23.000Z
2021-10-12T22:51:23.000Z
airtest/core/android/javacap.py
koyoki/Airtest
ea8391bd4819d9231e7b35f18c14662e6109fad0
[ "Apache-2.0" ]
1
2020-12-07T03:40:41.000Z
2020-12-07T03:40:41.000Z
# -*- coding: utf-8 -*- from airtest.utils.logger import get_logger from airtest.utils.safesocket import SafeSocket from airtest.utils.nbsp import NonBlockingStreamReader from airtest.utils.snippet import on_method_ready, reg_cleanup from airtest.core.android.yosemite import Yosemite import struct LOGGING = get_logger(...
31.233333
119
0.583511
from airtest.utils.logger import get_logger from airtest.utils.safesocket import SafeSocket from airtest.utils.nbsp import NonBlockingStreamReader from airtest.utils.snippet import on_method_ready, reg_cleanup from airtest.core.android.yosemite import Yosemite import struct LOGGING = get_logger(__name__) class Javac...
true
true
f705525314573327c75262120641f8403420919a
8,991
py
Python
447.number-of-boomerangs.py
windard/leeeeee
0107a5f95746592ca4fe78d2b5875cf65b1910e7
[ "MIT" ]
null
null
null
447.number-of-boomerangs.py
windard/leeeeee
0107a5f95746592ca4fe78d2b5875cf65b1910e7
[ "MIT" ]
null
null
null
447.number-of-boomerangs.py
windard/leeeeee
0107a5f95746592ca4fe78d2b5875cf65b1910e7
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=447 lang=python # # [447] Number of Boomerangs # # https://leetcode.com/problems/number-of-boomerangs/description/ # # algorithms # Easy (49.20%) # Likes: 296 # Dislikes: 447 # Total Accepted: 54.7K # Total Submissions: 109.6K # Testcase Example: '[[0,0],[1,0],[2,0]]' # # Given n points i...
96.677419
6,179
0.590034
import math class Solution(object): def _numberOfBoomerangs(self, points): result = [] distance = [[0] * len(points) for _ in range(len(points))] for i in range(len(points)): for j in range(i): distance[i][j] = (po...
true
true
f705538bc3b669ad295f2e7b446dda5111b30b7a
4,216
py
Python
recipes/libtiff/all/conanfile.py
AlexandreBossard/conan-center-index
6f89ce09b20795129b5ef63568a0a458b3d388ec
[ "MIT" ]
null
null
null
recipes/libtiff/all/conanfile.py
AlexandreBossard/conan-center-index
6f89ce09b20795129b5ef63568a0a458b3d388ec
[ "MIT" ]
1
2019-11-26T10:55:31.000Z
2019-11-26T10:55:31.000Z
recipes/libtiff/all/conanfile.py
AlexandreBossard/conan-center-index
6f89ce09b20795129b5ef63568a0a458b3d388ec
[ "MIT" ]
1
2019-10-31T19:29:14.000Z
2019-10-31T19:29:14.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from conans import ConanFile, CMake, tools import os import shutil class LibtiffConan(ConanFile): name = "libtiff" description = "Library for Tag Image File Format (TIFF)" url = "https://github.com/conan-io/conan-center-index" author = "Bincrafters <bincr...
47.909091
127
0.624526
from conans import ConanFile, CMake, tools import os import shutil class LibtiffConan(ConanFile): name = "libtiff" description = "Library for Tag Image File Format (TIFF)" url = "https://github.com/conan-io/conan-center-index" author = "Bincrafters <bincrafters@gmail.com>" license = "MIT" h...
true
true
f70553d36267da3daf161458ce9a35ebf850e411
1,946
py
Python
examples/functions/python3/mmlogic-simple/mmf.py
CodeLingoBot/open-match
9c943d5a10b4d110a5dc8194ea3baffb4d4ddae0
[ "Apache-2.0" ]
null
null
null
examples/functions/python3/mmlogic-simple/mmf.py
CodeLingoBot/open-match
9c943d5a10b4d110a5dc8194ea3baffb4d4ddae0
[ "Apache-2.0" ]
null
null
null
examples/functions/python3/mmlogic-simple/mmf.py
CodeLingoBot/open-match
9c943d5a10b4d110a5dc8194ea3baffb4d4ddae0
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python3 #Copyright 2018 Google LLC #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # #Unless required by applicable law or agreed...
48.65
108
0.649024
import random def makeMatches(profile_dict, player_pools):
true
true
f7055576cac41ce51631bbc57db651e00990eb63
4,019
py
Python
zerver/lib/markdown/help_relative_links.py
moazzammoriani/zulip
ca506f71dc8b733827a6bf532b107291b4839e55
[ "Apache-2.0" ]
null
null
null
zerver/lib/markdown/help_relative_links.py
moazzammoriani/zulip
ca506f71dc8b733827a6bf532b107291b4839e55
[ "Apache-2.0" ]
null
null
null
zerver/lib/markdown/help_relative_links.py
moazzammoriani/zulip
ca506f71dc8b733827a6bf532b107291b4839e55
[ "Apache-2.0" ]
null
null
null
import re from typing import Any, List, Match, Optional from markdown import Markdown from markdown.extensions import Extension from markdown.preprocessors import Preprocessor from zerver.lib.markdown.preprocessor_priorities import PREPROCESSOR_PRIORITES # There is a lot of duplicated code between this file and # he...
33.214876
97
0.629759
import re from typing import Any, List, Match, Optional from markdown import Markdown from markdown.extensions import Extension from markdown.preprocessors import Preprocessor from zerver.lib.markdown.preprocessor_priorities import PREPROCESSOR_PRIORITES # it there as well. REGEXP = re.compile(r"\{relative\|(?P<l...
true
true
f7055739785c4cd04f80cc452e257c475ad0395d
1,476
py
Python
prova1/prova1.py
samcost/POO
5c280407abb7aa9db1c82e52c34fd372465e8fe2
[ "MIT" ]
null
null
null
prova1/prova1.py
samcost/POO
5c280407abb7aa9db1c82e52c34fd372465e8fe2
[ "MIT" ]
null
null
null
prova1/prova1.py
samcost/POO
5c280407abb7aa9db1c82e52c34fd372465e8fe2
[ "MIT" ]
null
null
null
import math class Robo: def __init__(self,nome): self.__nome = nome self.__posicao = [0.0,0.0] self.__em_op = False @property def nome(self): return self.__nome @nome.setter def nome(self, alterar_nome): self.__nome = alterar_nome @property def...
24.196721
109
0.592818
import math class Robo: def __init__(self,nome): self.__nome = nome self.__posicao = [0.0,0.0] self.__em_op = False @property def nome(self): return self.__nome @nome.setter def nome(self, alterar_nome): self.__nome = alterar_nome @property def...
true
true
f70557ba49fa8bbd10988a5a6b0b41a89531538e
13,690
py
Python
lib/JumpScale/tools/codetools/CodeTools.py
Jumpscale/jumpscale_core8
f80ac9b1ab99b833ee7adb17700dcf4ef35f3734
[ "Apache-2.0" ]
8
2016-04-14T14:04:57.000Z
2020-06-09T00:24:34.000Z
lib/JumpScale/tools/codetools/CodeTools.py
Jumpscale/jumpscale_core8
f80ac9b1ab99b833ee7adb17700dcf4ef35f3734
[ "Apache-2.0" ]
418
2016-01-25T10:30:00.000Z
2021-09-08T12:29:13.000Z
lib/JumpScale/tools/codetools/CodeTools.py
Jumpscale/jumpscale_core8
f80ac9b1ab99b833ee7adb17700dcf4ef35f3734
[ "Apache-2.0" ]
9
2016-04-21T07:21:17.000Z
2022-01-24T10:35:54.000Z
# from JumpScale.baselib.codeexecutor.CodeExecutor import CodeExecutor import inspect from JumpScale import j from ClassBase import ClassBase, JSModelBase, JSRootModelBase from TemplateEngineWrapper import TemplateEngineWrapper from JumpScale.data.regex.RegexTools import RegexTools from TextFileEditor import TextFile...
36.801075
121
0.514171
import inspect from JumpScale import j from ClassBase import ClassBase, JSModelBase, JSRootModelBase from TemplateEngineWrapper import TemplateEngineWrapper from JumpScale.data.regex.RegexTools import RegexTools from TextFileEditor import TextFileEditor from WordReplacer import WordReplacer def isPrimAttribute(o...
true
true
f70557d356725dad83576aa76ea58678d0c0e049
1,921
py
Python
tests/test_trim.py
jwilk/mwic
f3abc4bb35292e42603285f08a55336d04795ce7
[ "MIT" ]
38
2016-06-02T19:04:39.000Z
2021-07-09T18:48:40.000Z
tests/test_trim.py
jwilk/mwic
f3abc4bb35292e42603285f08a55336d04795ce7
[ "MIT" ]
9
2016-05-26T13:31:11.000Z
2022-02-07T20:40:11.000Z
tests/test_trim.py
jwilk/mwic
f3abc4bb35292e42603285f08a55336d04795ce7
[ "MIT" ]
7
2016-06-07T09:53:55.000Z
2019-09-19T10:59:05.000Z
# Copyright © 2014-2016 Jakub Wilk <jwilk@jwilk.net> # # 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, modify, mer...
30.492063
79
0.647059
from nose.tools import ( assert_equal, assert_greater_equal, ) import lib.text as M def test_ltrim(): def t(s, n, expected): result = M.ltrim(s, n) assert_greater_equal( max(1, n), len(result) ) assert_equal(result, expected) ...
true
true
f70559b1280ee06eb3bb7d227ddfef9d0d20fdfa
876
py
Python
google/colab/_import_hooks/__init__.py
Gauravds435/colabtools
6b9972ff63689b30f1cc7dda06b0159d0e979c08
[ "Apache-2.0" ]
2
2020-10-15T14:59:34.000Z
2021-02-19T15:25:01.000Z
google/colab/_import_hooks/__init__.py
Gauravds435/colabtools
6b9972ff63689b30f1cc7dda06b0159d0e979c08
[ "Apache-2.0" ]
null
null
null
google/colab/_import_hooks/__init__.py
Gauravds435/colabtools
6b9972ff63689b30f1cc7dda06b0159d0e979c08
[ "Apache-2.0" ]
2
2020-10-12T05:45:32.000Z
2020-10-12T11:09:59.000Z
# Copyright 2018 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
38.086957
74
0.775114
from google.colab._import_hooks import _altair from google.colab._import_hooks import _cv2 def _register_hooks(): _altair._register_hook() _cv2._register_hook()
true
true
f7055a69708df947b5140370454fbcb299ec5cce
6,460
py
Python
spec/parsers_spec.py
gisce/esios
f90d89059847d1a7034c3cc7a5898a8409ce627f
[ "MIT" ]
7
2016-02-25T11:20:18.000Z
2022-03-07T20:01:36.000Z
spec/parsers_spec.py
gisce/esios
f90d89059847d1a7034c3cc7a5898a8409ce627f
[ "MIT" ]
8
2017-02-28T14:50:52.000Z
2022-01-27T16:58:05.000Z
spec/parsers_spec.py
gisce/esios
f90d89059847d1a7034c3cc7a5898a8409ce627f
[ "MIT" ]
6
2016-03-18T14:43:14.000Z
2022-01-12T13:04:09.000Z
# -*- coding: utf-8 -*- from expects.testing import failure from expects import * from datetime import datetime from dateutil.relativedelta import relativedelta import json import os from esios import Esios from esios.parsers import P48CierreParser from pytz import timezone LOCAL_TZ = timezone('Europe/Madrid') UTC_...
39.631902
130
0.576161
from expects.testing import failure from expects import * from datetime import datetime from dateutil.relativedelta import relativedelta import json import os from esios import Esios from esios.parsers import P48CierreParser from pytz import timezone LOCAL_TZ = timezone('Europe/Madrid') UTC_TZ = timezone('UTC') ...
true
true
f7055c47f2348aba66bd852b9d2acd9572d37cb7
3,398
py
Python
tareas/2/CorreaAlfredo/deGatosYRatones.py
FrancisBL5/sistop-2022-2
5c9c7363bbf2143b44b5886a9e6d51614218ffd8
[ "CC-BY-4.0" ]
9
2022-02-03T00:16:01.000Z
2022-02-25T06:30:46.000Z
tareas/2/CorreaAlfredo/deGatosYRatones.py
FrancisBL5/sistop-2022-2
5c9c7363bbf2143b44b5886a9e6d51614218ffd8
[ "CC-BY-4.0" ]
27
2022-02-08T18:48:49.000Z
2022-03-16T19:44:05.000Z
tareas/2/CorreaAlfredo/deGatosYRatones.py
FrancisBL5/sistop-2022-2
5c9c7363bbf2143b44b5886a9e6d51614218ffd8
[ "CC-BY-4.0" ]
31
2022-02-03T00:17:14.000Z
2022-03-31T15:13:40.000Z
# -*- coding: utf-8 -*- """ Correa González Alfredo De gatos y ratones - Tengo k gatos (e I ratones) en casa. - Les sirvo comida a mis gatos en m platos. - Gatos y ratones han llegado a un acuerdo para repartirse el tiempo y comida pero tienen que convencerme que están haciendo su trabajo - Los gatos pueden comer ...
28.554622
93
0.604768
from threading import Semaphore, Thread, Event import threading import time import random hambreDeGato = 100 hambreDeRaton = 2 numeroDeGatos = 2 numeroDeRatones = 10 platos = [] p = 5 gatosComiendo = 0 ratonesComiendo = 0 mutex_hambreGato = threading.Semaphore(1) mutex_hambreRaton = threading.Semaphore(1) entrar_...
true
true
f7055c54768f4c8845f7bfc40c698c57b626f1b2
3,204
py
Python
Scripts/convert_png_tiles.py
TheOpponent/st3-translation-notes
c78d7c2347611c07677ec5e293bbd6351800f438
[ "Unlicense" ]
null
null
null
Scripts/convert_png_tiles.py
TheOpponent/st3-translation-notes
c78d7c2347611c07677ec5e293bbd6351800f438
[ "Unlicense" ]
3
2022-03-27T17:05:09.000Z
2022-03-31T13:45:59.000Z
Scripts/convert_png_tiles.py
TheOpponent/st3-translation-notes
c78d7c2347611c07677ec5e293bbd6351800f438
[ "Unlicense" ]
null
null
null
# This script reads a PNG file containing a single row of 26 x 26 tiles and outputs binary data. # NumPy and Pillow are required as dependencies. # # Specify an input PNG file and an optional output file as arguments. # If an output file is not given, the binary data will be written in the console. # # The original gra...
40.556962
133
0.634207
import struct import sys import numpy as np from PIL import Image def main(): if len(sys.argv) < 2: print("Specify input PNG file.") return with Image.open(sys.argv[1]) as input_file: output = b'' image = list(input_file.getdata(0)) image_...
true
true
f7055f2933d1e39838b93296dc3c5e19f07f44fb
9,876
py
Python
tools/config.py
0x53A/emscripten
dfb6fdadfd68b1478cda4654f55412552f7d8d09
[ "MIT" ]
1
2021-11-27T07:11:09.000Z
2021-11-27T07:11:09.000Z
tools/config.py
thomasballinger/emscripten
c5928fec6e09f84872e9297806b44d828f1f0a05
[ "MIT" ]
1
2021-12-19T02:20:43.000Z
2021-12-19T02:20:43.000Z
tools/config.py
thomasballinger/emscripten
c5928fec6e09f84872e9297806b44d828f1f0a05
[ "MIT" ]
null
null
null
# Copyright 2020 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. import os import sys import logging from .utils import path_from_root...
34.17301
139
0.709093
import os import sys import logging from .utils import path_from_root, exit_with_error, __rootpath__, which logger = logging.getLogger('shared') EMSCRIPTEN_ROOT = __rootpath__ NODE_JS = None BINARYEN_ROOT = None SPIDERMONKEY_ENGINE = None V8_ENGINE = None LLVM_ROOT = None LLVM_ADD_VERSION = None CLANG_ADD_VE...
true
true
f7055f5a813d438b1a9eb2a7915b1bbd2c8e55ef
678
py
Python
redirink/users/models.py
Egor4ik325/redirink
17ef85f48145ee6112f2fcbab60dcd9d65ba78bf
[ "MIT" ]
null
null
null
redirink/users/models.py
Egor4ik325/redirink
17ef85f48145ee6112f2fcbab60dcd9d65ba78bf
[ "MIT" ]
null
null
null
redirink/users/models.py
Egor4ik325/redirink
17ef85f48145ee6112f2fcbab60dcd9d65ba78bf
[ "MIT" ]
1
2021-12-31T00:46:31.000Z
2021-12-31T00:46:31.000Z
from django.contrib.auth.models import AbstractUser from django.db.models import CharField from django.urls import reverse from django.utils.translation import gettext_lazy as _ class User(AbstractUser): """Default user for Redirink.""" #: First and last name do not cover name patterns around the globe n...
29.478261
74
0.682891
from django.contrib.auth.models import AbstractUser from django.db.models import CharField from django.urls import reverse from django.utils.translation import gettext_lazy as _ class User(AbstractUser): name = CharField(_("Name of User"), blank=True, max_length=255) first_name = None last_name = ...
true
true
f7056011dbb1ac21708cb6fd697c34c2e5888adc
20,242
py
Python
generate_eval_file.py
JRC1995/SocialMediaNER
236b22ded48f64516ebf0577c3b9d9d907db84e0
[ "MIT" ]
null
null
null
generate_eval_file.py
JRC1995/SocialMediaNER
236b22ded48f64516ebf0577c3b9d9d907db84e0
[ "MIT" ]
null
null
null
generate_eval_file.py
JRC1995/SocialMediaNER
236b22ded48f64516ebf0577c3b9d9d907db84e0
[ "MIT" ]
null
null
null
import numpy as np import random from dataLoader.batch import batcher from transformers import BertTokenizerFast, ElectraTokenizerFast from configs.WNUT_configs import * from utils.ml_utils import * from utils.data_utils import * from utils.metric_utils import * import argparse from tqdm import tqdm from pathlib import...
35.953819
231
0.579636
import numpy as np import random from dataLoader.batch import batcher from transformers import BertTokenizerFast, ElectraTokenizerFast from configs.WNUT_configs import * from utils.ml_utils import * from utils.data_utils import * from utils.metric_utils import * import argparse from tqdm import tqdm from pathlib import...
true
true
f70561104782de2e235d4511bf0bf0b3283d5e1a
323
py
Python
exercises/play_ground/pg_022.py
EngineerToBe/python-labs
dbedcf1f8ebb4bdf756c732ad65c3b737df62cdf
[ "Apache-2.0" ]
null
null
null
exercises/play_ground/pg_022.py
EngineerToBe/python-labs
dbedcf1f8ebb4bdf756c732ad65c3b737df62cdf
[ "Apache-2.0" ]
null
null
null
exercises/play_ground/pg_022.py
EngineerToBe/python-labs
dbedcf1f8ebb4bdf756c732ad65c3b737df62cdf
[ "Apache-2.0" ]
null
null
null
# Create a function named more_than_n that has three parameters named lst, item, and n. # The function should return True if item appears in the list more than n times. The function should return False otherwise. def more_than_n(lst, item, n): if lst.count(item) > n: return True else: return Fa...
40.375
124
0.71517
def more_than_n(lst, item, n): if lst.count(item) > n: return True else: return False
true
true
f705622e5940a8d2588cb5974ea07bf217146809
20,749
py
Python
PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py
gputtley/cmssw
c1ef8454804e4ebea8b65f59c4a952a6c94fde3b
[ "Apache-2.0" ]
3
2018-08-24T19:10:26.000Z
2019-02-19T11:45:32.000Z
PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py
gputtley/cmssw
c1ef8454804e4ebea8b65f59c4a952a6c94fde3b
[ "Apache-2.0" ]
8
2020-03-20T23:18:36.000Z
2020-05-27T11:00:06.000Z
PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py
gputtley/cmssw
c1ef8454804e4ebea8b65f59c4a952a6c94fde3b
[ "Apache-2.0" ]
5
2018-08-21T16:37:52.000Z
2020-01-09T13:33:17.000Z
import FWCore.ParameterSet.Config as cms from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask, addToProcessAndTask def applySubstructure( process, postfix="" ) : task = getPatAlgosToolsTask(process) from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection from PhysicsTools.Pat...
66.717042
248
0.603644
import FWCore.ParameterSet.Config as cms from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask, addToProcessAndTask def applySubstructure( process, postfix="" ) : task = getPatAlgosToolsTask(process) from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection from PhysicsTools.Pat...
true
true
f7056453a1c75203ba1b816e70ba850dc52f30e4
3,232
py
Python
scripts/oldScripts2019/3_analyzeDataKnee_Participant1.py
oliviermirat/Scientizen
e06515acbdc2cc2dc22445489dec2df4af454920
[ "MIT" ]
3
2017-06-10T10:41:55.000Z
2017-06-26T10:24:41.000Z
scripts/oldScripts2019/3_analyzeDataKnee_Participant1.py
oliviermirat/Scientizen
e06515acbdc2cc2dc22445489dec2df4af454920
[ "MIT" ]
56
2020-05-19T16:06:59.000Z
2020-11-11T13:49:13.000Z
scripts/oldScripts2019/3_analyzeDataKnee_Participant1.py
oliviermirat/Scientizen
e06515acbdc2cc2dc22445489dec2df4af454920
[ "MIT" ]
12
2020-05-19T18:27:26.000Z
2021-02-26T15:39:33.000Z
# This scripts assumes that the dataframe has been created and saved in data.txt import pickle import matplotlib.pyplot as plt import numpy as np import pandas as pd from dataFrameUtilities import addInsultIntensityColumns, getInsultAboveThreshold, getPainAboveThreshold, selectColumns,selectTime from sklearn.preproce...
35.911111
144
0.775062
import pickle import matplotlib.pyplot as plt import numpy as np import pandas as pd from dataFrameUtilities import addInsultIntensityColumns, getInsultAboveThreshold, getPainAboveThreshold, selectColumns,selectTime from sklearn.preprocessing import MinMaxScaler input = open("../data/preprocessed/preprocessedData...
true
true
f7056490fe820c5bc371a05eb7d52b47ad934ff3
146
py
Python
boa/_version.py
duncanmmacleod/boa
4a42cfd62b1e907c95737bb3079bbf626db62992
[ "BSD-3-Clause" ]
4
2020-05-27T15:58:36.000Z
2020-05-28T20:50:42.000Z
boa/_version.py
wolfv/boa
a1be462ed015a47561c27c4e1ef4c0972095017d
[ "BSD-3-Clause" ]
null
null
null
boa/_version.py
wolfv/boa
a1be462ed015a47561c27c4e1ef4c0972095017d
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2021, QuantStack # SPDX-License-Identifier: BSD-3-Clause version_info = (0, 7, 0) __version__ = ".".join(map(str, version_info))
24.333333
46
0.705479
version_info = (0, 7, 0) __version__ = ".".join(map(str, version_info))
true
true
f70564d7a09d116f125a022a0767e5a6e0d36386
3,260
py
Python
api/tests/test_auth_emailactivation.py
smegurus/smegurus-django
053973b5ff0b997c52bfaca8daf8e07db64a877c
[ "BSD-4-Clause" ]
1
2020-07-16T10:58:23.000Z
2020-07-16T10:58:23.000Z
api/tests/test_auth_emailactivation.py
smegurus/smegurus-django
053973b5ff0b997c52bfaca8daf8e07db64a877c
[ "BSD-4-Clause" ]
13
2018-11-30T02:29:39.000Z
2022-03-11T23:35:49.000Z
api/tests/test_auth_emailactivation.py
smegurus/smegurus-django
053973b5ff0b997c52bfaca8daf8e07db64a877c
[ "BSD-4-Clause" ]
null
null
null
from django.core.urlresolvers import resolve, reverse from django.db import transaction from django.test import TestCase from django.test import Client from django.utils import translation from django.contrib.auth.models import User, Group from django.contrib.auth import authenticate, login, logout from rest_framework ...
35.434783
83
0.68589
from django.core.urlresolvers import resolve, reverse from django.db import transaction from django.test import TestCase from django.test import Client from django.utils import translation from django.contrib.auth.models import User, Group from django.contrib.auth import authenticate, login, logout from rest_framework ...
true
true
f70565606ba1ea85664abd157116b0df65dd6937
12,274
py
Python
wagtail/wagtailembeds/oembed_providers.py
seddonym/wagtail-tableblock
aea3ce67a0800285b20b93018b7c0a8679e479b7
[ "BSD-3-Clause" ]
null
null
null
wagtail/wagtailembeds/oembed_providers.py
seddonym/wagtail-tableblock
aea3ce67a0800285b20b93018b7c0a8679e479b7
[ "BSD-3-Clause" ]
null
null
null
wagtail/wagtailembeds/oembed_providers.py
seddonym/wagtail-tableblock
aea3ce67a0800285b20b93018b7c0a8679e479b7
[ "BSD-3-Clause" ]
null
null
null
OEMBED_ENDPOINTS = { "https://speakerdeck.com/oembed.{format}": [ "^http(?:s)?://speakerdeck\\.com/.+$" ], "https://alpha-api.app.net/oembed": [ "^http(?:s)?://alpha\\.app\\.net/[^#?/]+/post/.+$", "^http(?:s)?://photos\\.app\\.net/[^#?/]+/.+$" ], "http://www.youtube.com/oembe...
37.420732
79
0.446309
OEMBED_ENDPOINTS = { "https://speakerdeck.com/oembed.{format}": [ "^http(?:s)?://speakerdeck\\.com/.+$" ], "https://alpha-api.app.net/oembed": [ "^http(?:s)?://alpha\\.app\\.net/[^#?/]+/post/.+$", "^http(?:s)?://photos\\.app\\.net/[^#?/]+/.+$" ], "http://www.youtube.com/oembe...
true
true
f70565f8f17d23fbb5f86778bb299941633d2717
41,785
py
Python
discord/commands/commands.py
ThatGenZGamer48/Texus
96cdee4544f3bbb873620ba7a8926d6f7dc5a672
[ "MIT" ]
null
null
null
discord/commands/commands.py
ThatGenZGamer48/Texus
96cdee4544f3bbb873620ba7a8926d6f7dc5a672
[ "MIT" ]
null
null
null
discord/commands/commands.py
ThatGenZGamer48/Texus
96cdee4544f3bbb873620ba7a8926d6f7dc5a672
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2015-2021 Rapptz Copyright (c) 2021-2021 Pycord Development Copyright (c) 2021-present Texus 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 restri...
35.381033
110
0.612229
from __future__ import annotations import asyncio import types import functools import inspect from collections import OrderedDict from typing import Any, Callable, Dict, List, Optional, Union, TYPE_CHECKING from ..enums import SlashCommandOptionType, ChannelType from ..member import Member from ..user import User f...
true
true
f70566c8c49314aaaa034de3b4b4298fd10bc138
95,527
py
Python
test/orm/test_deprecations.py
edelooff/sqlalchemy
97d2a2091ed4caee1e19168d0db39e4d94a6d12f
[ "MIT" ]
1
2019-09-27T15:40:23.000Z
2019-09-27T15:40:23.000Z
test/orm/test_deprecations.py
KonstantinKlepikov/sqlalchemy-1
2c34d2503a17316cae3282192405b9b9d60df6fe
[ "MIT" ]
null
null
null
test/orm/test_deprecations.py
KonstantinKlepikov/sqlalchemy-1
2c34d2503a17316cae3282192405b9b9d60df6fe
[ "MIT" ]
1
2019-08-27T09:47:08.000Z
2019-08-27T09:47:08.000Z
import sqlalchemy as sa from sqlalchemy import and_ from sqlalchemy import event from sqlalchemy import exc from sqlalchemy import func from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import select from sqlalchemy import String from sqlalchemy import testing from sqlalchemy import text fr...
32.066801
79
0.534435
import sqlalchemy as sa from sqlalchemy import and_ from sqlalchemy import event from sqlalchemy import exc from sqlalchemy import func from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import select from sqlalchemy import String from sqlalchemy import testing from sqlalchemy import text fr...
true
true
f70567387f4fdb0f240af2488067783b35be93ce
1,196
py
Python
tests/convert_softmax.py
juanCastrillo/gluon2pytorch
dc73055f0c74dbc45a70f21057fa161123826d86
[ "MIT" ]
73
2018-11-01T03:07:11.000Z
2021-03-03T01:48:58.000Z
tests/convert_softmax.py
juanCastrillo/gluon2pytorch
dc73055f0c74dbc45a70f21057fa161123826d86
[ "MIT" ]
5
2018-11-02T06:45:33.000Z
2019-09-24T06:54:59.000Z
tests/convert_softmax.py
juanCastrillo/gluon2pytorch
dc73055f0c74dbc45a70f21057fa161123826d86
[ "MIT" ]
5
2019-01-29T00:03:24.000Z
2021-01-12T14:18:59.000Z
import torch import mxnet as mx import numpy as np from gluon2pytorch import gluon2pytorch class SoftmaxTest(mx.gluon.nn.HybridSequential): def __init__(self): super(SoftmaxTest, self).__init__() from mxnet.gluon import nn with self.name_scope(): self.conv1 = nn.Conv2D(3, 32) ...
26
107
0.68311
import torch import mxnet as mx import numpy as np from gluon2pytorch import gluon2pytorch class SoftmaxTest(mx.gluon.nn.HybridSequential): def __init__(self): super(SoftmaxTest, self).__init__() from mxnet.gluon import nn with self.name_scope(): self.conv1 = nn.Conv2D(3, 32) ...
true
true
f705675ec8d1348ee1124a33b5cc7917d1404582
2,070
py
Python
src.py/searchathing_unittest/core.py
devel0/SearchAThing.UnitTest
186c5fe7ad55966c8e3db96e31d3c7110b4670e4
[ "MIT" ]
null
null
null
src.py/searchathing_unittest/core.py
devel0/SearchAThing.UnitTest
186c5fe7ad55966c8e3db96e31d3c7110b4670e4
[ "MIT" ]
null
null
null
src.py/searchathing_unittest/core.py
devel0/SearchAThing.UnitTest
186c5fe7ad55966c8e3db96e31d3c7110b4670e4
[ "MIT" ]
null
null
null
""" * SearchAThing.UnitTest, Copyright(C) 2015-2017 Lorenzo Delana, License under MIT * * The MIT License(MIT) * Copyright(c) 2015-2017 Lorenzo Delana, https://searchathing.com * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "So...
40.588235
81
0.727536
import unittest from searchathing_core.number import * class Core(unittest.TestCase): def test_equals_auto_tol(self): self.assertTrue(equals_auto_tol(1, 1)) self.assertTrue(equals_auto_tol(1, 1 + 1e-20)) self.assertFalse(equals_auto_tol(1, 2)) self.assertTrue(equals_auto_tol(1, 2,...
true
true
f70567d0c6ea41908433590f3fbf095df00bbd11
90,963
py
Python
src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
3
2019-07-15T13:48:24.000Z
2019-11-08T12:31:43.000Z
src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
2
2018-10-30T13:40:20.000Z
2020-07-23T12:13:30.000Z
src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
1
2020-07-23T10:29:58.000Z
2020-07-23T10:29:58.000Z
r""" Quiver mutation types AUTHORS: - Gregg Musiker (2012, initial version) - Christian Stump (2012, initial version) - Hugh Thomas (2012, initial version) """ #***************************************************************************** # Copyright (C) 2011 Gregg Musiker <gmusiker@gmail.com> # ...
37.158088
161
0.486725
from __future__ import division, print_function from __future__ import absolute_import from six.moves import range from sage.structure.sage_object import SageObject from copy import copy from sage.structure.unique_representation import UniqueRepresentation from sage.misc.all import cached_method from sage.ri...
true
true
f7056ab25ad90481d8aa15bfd7dbc66c04b7c3ea
4,314
py
Python
backtrader/observers/benchmark.py
trinh-hoang-hiep/iching
e1feae5741c3cbde535d7a275b01d4f0cf9e21ed
[ "Apache-2.0" ]
1
2021-04-09T06:24:08.000Z
2021-04-09T06:24:08.000Z
backtrader/observers/benchmark.py
trinh-hoang-hiep/iching
e1feae5741c3cbde535d7a275b01d4f0cf9e21ed
[ "Apache-2.0" ]
null
null
null
backtrader/observers/benchmark.py
trinh-hoang-hiep/iching
e1feae5741c3cbde535d7a275b01d4f0cf9e21ed
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015-2020 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
35.95
79
0.62077
true
true
f7056c6430a204c2507a84847929823af3d8b505
8,334
py
Python
autotest/test_gwf_lakobs01.py
mkennard-aquaveo/modflow6
73a0553636362c90f7d134318e1f5d902dbdc4d3
[ "CC0-1.0" ]
null
null
null
autotest/test_gwf_lakobs01.py
mkennard-aquaveo/modflow6
73a0553636362c90f7d134318e1f5d902dbdc4d3
[ "CC0-1.0" ]
null
null
null
autotest/test_gwf_lakobs01.py
mkennard-aquaveo/modflow6
73a0553636362c90f7d134318e1f5d902dbdc4d3
[ "CC0-1.0" ]
null
null
null
# Test for checking lak observation input. The following observation types: # 'lak', 'wetted-area', and 'conductance,' require that ID2 be provided when # ID is an integer corresponding to a lake number and not BOUNDNAME. # See table in LAK Package section of mf6io.pdf for an explanation of ID, # ID2, and Observation ...
24.952096
79
0.586273
import os import pytest import sys import numpy as np try: import flopy except: msg = "Error. FloPy package is not available.\n" msg += "Try installing using the following command:\n" msg += " pip install flopy" raise Exception(msg) from framework import testing_framework from simulation im...
true
true
f7056da8b11d4e248ba6d5172376ce2589dd69a5
1,745
py
Python
src/explore.py
argsim/argsim
e5407acf7e47f2bf517b0c580fcdee3654d31089
[ "MIT" ]
null
null
null
src/explore.py
argsim/argsim
e5407acf7e47f2bf517b0c580fcdee3654d31089
[ "MIT" ]
2
2019-01-09T21:35:39.000Z
2019-03-11T18:12:21.000Z
src/explore.py
argsim/argsim
e5407acf7e47f2bf517b0c580fcdee3654d31089
[ "MIT" ]
null
null
null
import tensorflow as tf from model import vAe, decode import util_sp as sp from util_io import load_txt import numpy as np def analyze(z, use_dim=[], seed=25): ''' z = np.array[2, dim], mu of two sentences''' ''' use_dim = list of int describing which dimension should be used ''' # select random path fr...
29.083333
96
0.667049
import tensorflow as tf from model import vAe, decode import util_sp as sp from util_io import load_txt import numpy as np def analyze(z, use_dim=[], seed=25): np.random.seed(seed) if use_dim == []: rdm_path = np.arange(len(z[0])) else: rdm_path = use_dim np.random.shuffle(rdm_pa...
true
true
f7056ed1da5c17a757cb1e9eff0dcc005ac50fbb
40,250
py
Python
venv/Lib/site-packages/caffe2/python/onnx/backend.py
countBMB/BenjiRepo
79d882263baaf2a11654ca67d2e5593074d36dfa
[ "Apache-2.0" ]
1
2020-02-24T06:23:07.000Z
2020-02-24T06:23:07.000Z
venv/Lib/site-packages/caffe2/python/onnx/backend.py
countBMB/BenjiRepo
79d882263baaf2a11654ca67d2e5593074d36dfa
[ "Apache-2.0" ]
4
2021-06-02T00:49:27.000Z
2022-01-13T01:59:34.000Z
venv/Lib/site-packages/caffe2/python/onnx/backend.py
countBMB/BenjiRepo
79d882263baaf2a11654ca67d2e5593074d36dfa
[ "Apache-2.0" ]
null
null
null
## @package onnx # Module caffe2.python.onnx.backend """Backend for running ONNX on Caffe2 To run this, you will need to have Caffe2 installed as well. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os im...
42.279412
346
0.602062
e__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import collections from subprocess import Popen, PIPE import sys import zipfile import itertools # vendored protobuf is loaded first. We can work around this by # import...
true
true
f7056f50f1feb79d81aa60f148cfd317c84f892f
11,513
py
Python
argocd_python_client/model/v1_event_list.py
RyanSiu1995/argocd-python-client
2e8f097fe09f247a46ac70692241a93d1acd076a
[ "MIT" ]
1
2021-11-20T13:37:43.000Z
2021-11-20T13:37:43.000Z
argocd_python_client/model/v1_event_list.py
RyanSiu1995/argocd-python-client
2e8f097fe09f247a46ac70692241a93d1acd076a
[ "MIT" ]
null
null
null
argocd_python_client/model/v1_event_list.py
RyanSiu1995/argocd-python-client
2e8f097fe09f247a46ac70692241a93d1acd076a
[ "MIT" ]
null
null
null
""" Consolidate Services Description of all APIs # noqa: E501 The version of the OpenAPI document: version not set Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from argocd_python_client.model_utils import ( # noqa: F401 ApiTypeError, Mo...
42.958955
121
0.572136
import re import sys from argocd_python_client.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info,...
true
true
f705700579504459d1022712175c926bb0c492e4
226
py
Python
src/SimonGame.py
busvar/VuelingGame_Backend
2be1afd85e1247dcc91ad23acec233bbf34b9d5f
[ "MIT" ]
null
null
null
src/SimonGame.py
busvar/VuelingGame_Backend
2be1afd85e1247dcc91ad23acec233bbf34b9d5f
[ "MIT" ]
null
null
null
src/SimonGame.py
busvar/VuelingGame_Backend
2be1afd85e1247dcc91ad23acec233bbf34b9d5f
[ "MIT" ]
null
null
null
from flask import Flask, request import json app = Flask(__name__) @app.route('/') def hello(): outFile = {'Tittle' : "Simon Game", 'msg' : "Hello World!"} outFile = json.dumps(outFile) return json.loads(outFile)
22.6
63
0.659292
from flask import Flask, request import json app = Flask(__name__) @app.route('/') def hello(): outFile = {'Tittle' : "Simon Game", 'msg' : "Hello World!"} outFile = json.dumps(outFile) return json.loads(outFile)
true
true
f70570d4cfa7f238e84d553a1dc8710c1e1855b3
15,880
py
Python
pru/db/geo/geo_operations.py
euctrl-pru/rt-python
da5d0040e250bd159845a0d43bf0b73eab368863
[ "MIT" ]
null
null
null
pru/db/geo/geo_operations.py
euctrl-pru/rt-python
da5d0040e250bd159845a0d43bf0b73eab368863
[ "MIT" ]
null
null
null
pru/db/geo/geo_operations.py
euctrl-pru/rt-python
da5d0040e250bd159845a0d43bf0b73eab368863
[ "MIT" ]
null
null
null
# # Copyright (c) 2018 Via Technology Ltd. All Rights Reserved. # Consult your license regarding permissions and restrictions. # """ operations related to airspaces and intersections. """ from psycopg2 import Error, InternalError from psycopg2.extensions import AsIs from psycopg2.extras import DictCursor from itertoo...
42.573727
145
0.647922
from psycopg2 import Error, InternalError from psycopg2.extensions import AsIs from psycopg2.extras import DictCursor from itertools import filterfalse from functools import reduce from shapely.wkt import loads import pru.db.context as ctx from pru.logger import logger log = logger(__name__) def make_point(lon...
true
true
f70570d708510d481a042af8e412be25e905032d
11,930
py
Python
accel/cherry/tinygrad/ops_cherry.py
andreiaugustin/tinygrad
adaf17559564c75a35e901fc4f735c8cc46577d7
[ "MIT" ]
5,578
2020-10-18T16:26:28.000Z
2022-03-31T18:31:04.000Z
accel/cherry/tinygrad/ops_cherry.py
JunnYu/tinygrad
c0c2c0b0414dec0862aa442c60e905f39958f572
[ "MIT" ]
219
2020-10-18T19:50:39.000Z
2022-03-01T16:54:53.000Z
accel/cherry/tinygrad/ops_cherry.py
JunnYu/tinygrad
c0c2c0b0414dec0862aa442c60e905f39958f572
[ "MIT" ]
746
2020-10-18T20:09:37.000Z
2022-03-30T10:11:46.000Z
import numpy as np from tinygrad.tensor import Function from extra.cherry import * # ************* unary ops ************* class ReLU(Function): def forward(ctx, input): ctx.save_for_backward(input) return cherry_unop(input, UnaryOps.RELU) def backward(ctx, grad_output): input, = ctx.saved_tensors ...
39.766667
151
0.580553
import numpy as np from tinygrad.tensor import Function from extra.cherry import * class ReLU(Function): def forward(ctx, input): ctx.save_for_backward(input) return cherry_unop(input, UnaryOps.RELU) def backward(ctx, grad_output): input, = ctx.saved_tensors return cherry_binop(grad_output, cher...
true
true
f705734671161b9c806e3992ccd70e77e6586843
3,536
py
Python
scripts/e78.py
JackKelly/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
38
2015-08-14T14:38:52.000Z
2021-12-15T03:21:04.000Z
scripts/e78.py
VidipG/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
null
null
null
scripts/e78.py
VidipG/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
26
2015-09-24T20:55:26.000Z
2021-12-07T15:42:09.000Z
from __future__ import print_function, division from neuralnilm import Net, RealApplianceSource, BLSTMLayer, SubsampleLayer, DimshuffleLayer from lasagne.nonlinearities import sigmoid, rectify from lasagne.objectives import crossentropy from lasagne.init import Uniform, Normal from lasagne.layers import LSTMLayer, Dens...
24.555556
92
0.633201
from __future__ import print_function, division from neuralnilm import Net, RealApplianceSource, BLSTMLayer, SubsampleLayer, DimshuffleLayer from lasagne.nonlinearities import sigmoid, rectify from lasagne.objectives import crossentropy from lasagne.init import Uniform, Normal from lasagne.layers import LSTMLayer, Dens...
true
true
f70573dc0c48e48f0f19f0d85a70bb4837832aa3
278
py
Python
tests/core/slashing/msgs_test.py
yeeyangtee/terra-sdk-python
44e31290cfcb5563dd31a0d9c64c3ef2af72c0e2
[ "MIT" ]
24
2021-05-30T05:48:33.000Z
2021-10-07T04:47:15.000Z
tests/core/slashing/msgs_test.py
yeeyangtee/terra-sdk-python
44e31290cfcb5563dd31a0d9c64c3ef2af72c0e2
[ "MIT" ]
18
2021-05-30T09:05:26.000Z
2021-10-17T07:12:12.000Z
tests/core/slashing/msgs_test.py
yeeyangtee/terra-sdk-python
44e31290cfcb5563dd31a0d9c64c3ef2af72c0e2
[ "MIT" ]
10
2021-02-11T00:56:04.000Z
2021-05-27T08:37:49.000Z
from terra_sdk.core.slashing import MsgUnjail def test_deserializes_msg_unjail_examples(load_msg_examples): examples = load_msg_examples(MsgUnjail.type, "./MsgUnjail.data.json") for example in examples: assert MsgUnjail.from_data(example).to_data() == example
34.75
73
0.780576
from terra_sdk.core.slashing import MsgUnjail def test_deserializes_msg_unjail_examples(load_msg_examples): examples = load_msg_examples(MsgUnjail.type, "./MsgUnjail.data.json") for example in examples: assert MsgUnjail.from_data(example).to_data() == example
true
true
f7057425a1dbc05857f4d03d917ef320093bcace
1,514
py
Python
server/whistle_server/endpoints/login.py
Sailer43/Whistle
fff23638e60a3c9d5e3ed16016b47bf93df51088
[ "MIT" ]
null
null
null
server/whistle_server/endpoints/login.py
Sailer43/Whistle
fff23638e60a3c9d5e3ed16016b47bf93df51088
[ "MIT" ]
null
null
null
server/whistle_server/endpoints/login.py
Sailer43/Whistle
fff23638e60a3c9d5e3ed16016b47bf93df51088
[ "MIT" ]
null
null
null
from flask_restful import abort, Resource from flask import request, g, session from flask.json import jsonify from whistle_server.models.user import User def verify_password(password, hashed): from werkzeug.security import check_password_hash return check_password_hash(hashed, password) class LoginEndpoint(R...
32.913043
68
0.619551
from flask_restful import abort, Resource from flask import request, g, session from flask.json import jsonify from whistle_server.models.user import User def verify_password(password, hashed): from werkzeug.security import check_password_hash return check_password_hash(hashed, password) class LoginEndpoint(R...
true
true
f70574814793b965d57be8421a905d367cb6d3c4
1,962
py
Python
colour/models/tests/test_cam16_ucs.py
JGoldstone/colour
6829b363d5f0682bff0f4826995e7ceac189ff28
[ "BSD-3-Clause" ]
null
null
null
colour/models/tests/test_cam16_ucs.py
JGoldstone/colour
6829b363d5f0682bff0f4826995e7ceac189ff28
[ "BSD-3-Clause" ]
null
null
null
colour/models/tests/test_cam16_ucs.py
JGoldstone/colour
6829b363d5f0682bff0f4826995e7ceac189ff28
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Defines the unit tests for the :mod:`colour.models.cam16_ucs` module. """ import unittest from colour.models.tests.test_cam02_ucs import ( TestJMh_CIECAM02_to_UCS_Luo2006, TestUCS_Luo2006_to_JMh_CIECAM02, TestXYZ_to_UCS_Luo2006, TestUCS_Luo2006_to_XYZ, ) __author__ = 'Colo...
25.815789
79
0.731397
import unittest from colour.models.tests.test_cam02_ucs import ( TestJMh_CIECAM02_to_UCS_Luo2006, TestUCS_Luo2006_to_JMh_CIECAM02, TestXYZ_to_UCS_Luo2006, TestUCS_Luo2006_to_XYZ, ) __author__ = 'Colour Developers' __copyright__ = 'Copyright (C) 2013-2021 - Colour Developers' __license__ = 'New BSD L...
true
true
f7057502a2b9e13dd28680ca2e93edeee96715c1
6,723
py
Python
bindings/python/ensmallen_graph/datasets/string/dictyosteliumdiscoideum.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/dictyosteliumdiscoideum.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/dictyosteliumdiscoideum.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Dictyostelium discoideum. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 20...
35.571429
223
0.70534
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def DictyosteliumDiscoideum( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/string", **additional_graph_kwargs: Dict ) -> EnsmallenGraph: ...
true
true
f7057539fa1021d2f984df54ff3175f6e077ac81
8,191
py
Python
starlette/staticfiles.py
krish-adi/starlette
7c7ec5a7f72de360bafa938d14e2e1d6f4b6cb69
[ "BSD-3-Clause" ]
6,974
2018-06-25T13:56:49.000Z
2022-03-31T21:33:04.000Z
starlette/staticfiles.py
krish-adi/starlette
7c7ec5a7f72de360bafa938d14e2e1d6f4b6cb69
[ "BSD-3-Clause" ]
1,221
2018-06-25T15:31:07.000Z
2022-03-31T09:14:59.000Z
starlette/staticfiles.py
krish-adi/starlette
7c7ec5a7f72de360bafa938d14e2e1d6f4b6cb69
[ "BSD-3-Clause" ]
810
2018-06-25T16:07:52.000Z
2022-03-30T16:34:12.000Z
import importlib.util import os import stat import typing from email.utils import parsedate import anyio from starlette.datastructures import URL, Headers from starlette.exceptions import HTTPException from starlette.responses import FileResponse, RedirectResponse, Response from starlette.types import Receive, Scope,...
35.154506
88
0.583201
import importlib.util import os import stat import typing from email.utils import parsedate import anyio from starlette.datastructures import URL, Headers from starlette.exceptions import HTTPException from starlette.responses import FileResponse, RedirectResponse, Response from starlette.types import Receive, Scope,...
true
true
f705756c9c7aa72e798711682e387825c99eda61
25,822
py
Python
barbican/plugin/interface/secret_store.py
lingxiankong/barbican
2d2376397d01b26ac2d98c0e02b67dfa0ecc2b1c
[ "Apache-2.0" ]
null
null
null
barbican/plugin/interface/secret_store.py
lingxiankong/barbican
2d2376397d01b26ac2d98c0e02b67dfa0ecc2b1c
[ "Apache-2.0" ]
null
null
null
barbican/plugin/interface/secret_store.py
lingxiankong/barbican
2d2376397d01b26ac2d98c0e02b67dfa0ecc2b1c
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2014 Johns Hopkins University Applied Physics Laboratory # # 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 ...
38.482861
79
0.676594
import abc from oslo_config import cfg import six from stevedore import named from barbican.common import config from barbican.common import exception from barbican.common import utils from barbican import i18n as u from barbican.plugin.util import multiple_backends from barbican.plugin.util import uti...
true
true
f70576272db6e715ab91b4b6cd21f28a6e4e23c0
16,545
py
Python
spirl/rl/components/agent.py
kouroshHakha/fist
328c098789239fd892e17edefd799fc1957ab637
[ "BSD-3-Clause" ]
8
2021-10-14T03:14:23.000Z
2022-03-15T21:31:17.000Z
spirl/rl/components/agent.py
kouroshHakha/fist
328c098789239fd892e17edefd799fc1957ab637
[ "BSD-3-Clause" ]
null
null
null
spirl/rl/components/agent.py
kouroshHakha/fist
328c098789239fd892e17edefd799fc1957ab637
[ "BSD-3-Clause" ]
1
2021-09-13T20:42:28.000Z
2021-09-13T20:42:28.000Z
import os import torch import torch.nn as nn import numpy as np from contextlib import contextmanager from functools import partial from torch.optim import Adam, SGD from spirl.utils.general_utils import ParamDict, get_clipped_optimizer, AttrDict, prefix_dict, map_dict, \ nan_ho...
48.236152
122
0.65065
import os import torch import torch.nn as nn import numpy as np from contextlib import contextmanager from functools import partial from torch.optim import Adam, SGD from spirl.utils.general_utils import ParamDict, get_clipped_optimizer, AttrDict, prefix_dict, map_dict, \ nan_ho...
true
true
f70576f56e1dace795c9e93cbc74e95d6940c629
9,236
py
Python
bot/core/conversation.py
lugodev/telegram-pocket-bot
ae9cbfc1aa14c3bd8dd292c477f69891d82d9d94
[ "MIT" ]
1
2021-11-12T04:08:35.000Z
2021-11-12T04:08:35.000Z
bot/core/conversation.py
lugodev/telegram-pocket-bot
ae9cbfc1aa14c3bd8dd292c477f69891d82d9d94
[ "MIT" ]
null
null
null
bot/core/conversation.py
lugodev/telegram-pocket-bot
ae9cbfc1aa14c3bd8dd292c477f69891d82d9d94
[ "MIT" ]
null
null
null
import time import emoji from telegram import InlineKeyboardMarkup, ParseMode, InlineKeyboardButton from telegram.ext import run_async, ConversationHandler from telegram.error import TelegramError from django.db.models import Q from . import constants, authentication, renderers, models def send_broadcast(admin, broad...
24.962162
90
0.581637
import time import emoji from telegram import InlineKeyboardMarkup, ParseMode, InlineKeyboardButton from telegram.ext import run_async, ConversationHandler from telegram.error import TelegramError from django.db.models import Q from . import constants, authentication, renderers, models def send_broadcast(admin, broad...
true
true
f705779e537fd0636da37fcab248e0fca545bfc5
10,249
py
Python
elasticapm/contrib/django/client.py
haider-zada96/apm_test
fa16fc30a055625abcde287073822cdbe979846c
[ "BSD-3-Clause" ]
2
2019-02-15T20:23:39.000Z
2019-02-15T20:26:06.000Z
elasticapm/contrib/django/client.py
haider-zada96/apm_test
fa16fc30a055625abcde287073822cdbe979846c
[ "BSD-3-Clause" ]
null
null
null
elasticapm/contrib/django/client.py
haider-zada96/apm_test
fa16fc30a055625abcde287073822cdbe979846c
[ "BSD-3-Clause" ]
null
null
null
""" elasticapm.contrib.django.client ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2011-2017 Elasticsearch Large portions are :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logging import django fr...
36.088028
110
0.621524
from __future__ import absolute_import import logging import django from django.conf import settings as django_settings from django.core.exceptions import DisallowedHost from django.db import DatabaseError from django.http import HttpRequest from elasticapm.base import Client from elasticapm.conf import constants f...
true
true
f705783686a1d9d13021c5a0cc244a45478a4753
932
py
Python
setup.py
abhijitbendale/rls-lab
dedff01b9af01e06d0d6cd52df5532361cd893b1
[ "BSD-4-Clause" ]
null
null
null
setup.py
abhijitbendale/rls-lab
dedff01b9af01e06d0d6cd52df5532361cd893b1
[ "BSD-4-Clause" ]
null
null
null
setup.py
abhijitbendale/rls-lab
dedff01b9af01e06d0d6cd52df5532361cd893b1
[ "BSD-4-Clause" ]
null
null
null
#!/usr/bin/env python from distutils.core import setup, Extension import glob import os # Get matfiles and images for testing matfi...
34.518519
208
0.531116
from distutils.core import setup, Extension import glob import os matfiles=glob.glob(os.path.join('tests/data/*.mat')) data=glob.glob(os.path.join('data/*')) setup( name='RLS', version='1.0', description='Python implementation of RLS program', author='Abhijit Bendale', author_email='bendale@mi...
true
true
f705792361b745c5f11279f9c6b12a22432ba982
24,888
py
Python
alipay/aop/api/domain/ExSourceRateVO.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/ExSourceRateVO.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/ExSourceRateVO.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * class ExSourceRateVO(object): def __init__(self): self._bid = None self._currency_pair = None self._currency_unit = None self._expiry_time = None s...
34.046512
95
0.600932
import simplejson as json from alipay.aop.api.constant.ParamConstants import * class ExSourceRateVO(object): def __init__(self): self._bid = None self._currency_pair = None self._currency_unit = None self._expiry_time = None self._extended_params = None self._ge...
true
true
f70579f8510e28a077bbf6b0f660e6af3d650613
2,017
py
Python
src/scs_dev/disk_volume.py
south-coast-science/scs_dev
b746adda020498b911cb92f28d4f07b14df996a2
[ "MIT" ]
2
2017-04-24T14:58:28.000Z
2020-05-27T08:53:46.000Z
src/scs_dev/disk_volume.py
south-coast-science/scs_dev
b746adda020498b911cb92f28d4f07b14df996a2
[ "MIT" ]
1
2020-07-13T14:33:59.000Z
2021-03-27T08:52:04.000Z
src/scs_dev/disk_volume.py
south-coast-science/scs_dev
b746adda020498b911cb92f28d4f07b14df996a2
[ "MIT" ]
1
2018-08-24T09:55:01.000Z
2018-08-24T09:55:01.000Z
#!/usr/bin/env python3 """ Created on 15 Oct 2020 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) DESCRIPTION The disk_volume utility is used to determine whether a volume is mounted and, if so, the free and used space on the volume. Space is given in blocks. The volume is identified by its mount point. ...
28.814286
118
0.55181
import sys from scs_core.data.json import JSONify from scs_dev.cmd.cmd_disk_volume import CmdDiskVolume from scs_host.sys.host import Host if __name__ == '__main__': cmd = CmdDiskVolume() if not cmd.is_valid(): cmd.print_help(sys.stderr) exit(2) if cmd.verbose: ...
true
true
f7057aba528eede039765622b679f775d7e03025
1,685
py
Python
nova/tests/virt/test_images.py
vmthunder/nova
baf05caab705c5778348d9f275dc541747b7c2de
[ "Apache-2.0" ]
1
2015-11-25T10:18:22.000Z
2015-11-25T10:18:22.000Z
nova/tests/virt/test_images.py
vmthunder/nova
baf05caab705c5778348d9f275dc541747b7c2de
[ "Apache-2.0" ]
9
2015-05-20T11:20:17.000Z
2017-07-27T08:21:33.000Z
nova/tests/virt/test_images.py
vmthunder/nova
baf05caab705c5778348d9f275dc541747b7c2de
[ "Apache-2.0" ]
13
2015-05-05T09:34:04.000Z
2017-11-08T02:03:46.000Z
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
37.444444
78
0.67003
import os import mock from nova import exception from nova.openstack.common import processutils from nova import test from nova import utils from nova.virt import images class QemuTestCase(test.NoDBTestCase): def test_qemu_info_with_bad_path(self): self.assertRaises(exception.InvalidDiskIn...
true
true
f7057b8575bc4fd7fcbfbdc13379515dfc6d8dfe
635
py
Python
crawler/edge_image.py
Znmangosteen/cgan-face-generator
cb2912ad6dd3971af238a83e8d56fb3a43082893
[ "BSD-3-Clause" ]
59
2017-10-15T03:59:06.000Z
2022-02-27T00:23:12.000Z
crawler/edge_image.py
Znmangosteen/cgan-face-generator
cb2912ad6dd3971af238a83e8d56fb3a43082893
[ "BSD-3-Clause" ]
1
2019-08-27T09:05:26.000Z
2019-08-27T09:05:26.000Z
crawler/edge_image.py
Znmangosteen/cgan-face-generator
cb2912ad6dd3971af238a83e8d56fb3a43082893
[ "BSD-3-Clause" ]
11
2017-12-15T18:23:29.000Z
2021-05-23T20:01:31.000Z
import cv2 import argparse import numpy as np def process_edge_image(input, output): print('edge', input, output) img = cv2.imread(input) img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) img = cv2.GaussianBlur(img, (3, 3), 0) ret, thr = cv2.threshold(img, 0, 255, cv2.THRESH_OTSU) edges = cv2.Cann...
27.608696
58
0.67874
import cv2 import argparse import numpy as np def process_edge_image(input, output): print('edge', input, output) img = cv2.imread(input) img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) img = cv2.GaussianBlur(img, (3, 3), 0) ret, thr = cv2.threshold(img, 0, 255, cv2.THRESH_OTSU) edges = cv2.Cann...
true
true
f7057d00a3ca443859a829101edfeaf4bf72956b
2,962
py
Python
src/config.py
sopuli/reporanka
a06994e23675f8de50fa878c532660532d14648c
[ "MIT" ]
3
2021-11-24T15:39:36.000Z
2021-11-25T19:32:07.000Z
src/config.py
sopuli/reporanka
a06994e23675f8de50fa878c532660532d14648c
[ "MIT" ]
12
2021-11-27T07:55:20.000Z
2021-12-12T23:56:23.000Z
src/config.py
sopuli/reporanka
a06994e23675f8de50fa878c532660532d14648c
[ "MIT" ]
2
2021-11-26T14:16:34.000Z
2021-12-10T15:30:13.000Z
"""Module for specifying the environmental variables.""" import os DIRNAME = os.path.dirname(__file__) DB_NAME = "items.csv" DB_PATH = os.path.join(DIRNAME, "data", DB_NAME) TEST_DB = "test_items.csv" TEST_DB_PATH = os.path.join(DIRNAME, "data", TEST_DB) INSTRUCTIONS = ( "\nValitse toiminto" "\n (1) lisää" ...
35.686747
93
0.595881
import os DIRNAME = os.path.dirname(__file__) DB_NAME = "items.csv" DB_PATH = os.path.join(DIRNAME, "data", DB_NAME) TEST_DB = "test_items.csv" TEST_DB_PATH = os.path.join(DIRNAME, "data", TEST_DB) INSTRUCTIONS = ( "\nValitse toiminto" "\n (1) lisää" "\n (2) listaa" "\n (3) poista" "\n (4) hae t...
true
true
f7057e752fa60f9a70ee24a03a508261e1d4ed2f
19,887
py
Python
hummingbot/client/hummingbot_application.py
Loopring/hummingbot-deprecated
43be8574ed9efd405aeee13a34c7a87ee732c7aa
[ "Apache-2.0" ]
null
null
null
hummingbot/client/hummingbot_application.py
Loopring/hummingbot-deprecated
43be8574ed9efd405aeee13a34c7a87ee732c7aa
[ "Apache-2.0" ]
null
null
null
hummingbot/client/hummingbot_application.py
Loopring/hummingbot-deprecated
43be8574ed9efd405aeee13a34c7a87ee732c7aa
[ "Apache-2.0" ]
1
2021-11-23T19:59:17.000Z
2021-11-23T19:59:17.000Z
#!/usr/bin/env python import asyncio from collections import deque import logging import time from typing import List, Dict, Optional, Tuple, Set, Deque from hummingbot.client.command import __all__ as commands from hummingbot.core.clock import Clock from hummingbot.core.data_type.order_book_tracker import OrderBookT...
50.603053
154
0.654196
import asyncio from collections import deque import logging import time from typing import List, Dict, Optional, Tuple, Set, Deque from hummingbot.client.command import __all__ as commands from hummingbot.core.clock import Clock from hummingbot.core.data_type.order_book_tracker import OrderBookTrackerDataSourceType ...
true
true
f7057f4bf2418d7e4f54b2e0e6f937362a8f09bc
4,381
py
Python
faassupervisor/faas/binary/supervisor.py
grycap/faas-supervisor
f5dcb6a16cadec53235c13278942567947c7b443
[ "Apache-2.0" ]
7
2019-03-14T15:18:54.000Z
2022-01-13T07:37:18.000Z
faassupervisor/faas/binary/supervisor.py
grycap/faas-supervisor
f5dcb6a16cadec53235c13278942567947c7b443
[ "Apache-2.0" ]
2
2019-10-14T09:50:57.000Z
2020-01-08T11:25:54.000Z
faassupervisor/faas/binary/supervisor.py
grycap/faas-supervisor
f5dcb6a16cadec53235c13278942567947c7b443
[ "Apache-2.0" ]
8
2019-04-02T16:48:46.000Z
2022-01-28T13:45:49.000Z
# Copyright (C) GRyCAP - I3M - UPV # # 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...
45.635417
88
0.624515
import subprocess import sys import uuid from faassupervisor.faas import DefaultSupervisor from faassupervisor.logger import get_logger from faassupervisor.utils import SysUtils, FileUtils, StrUtils class BinarySupervisor(DefaultSupervisor): _SCRIPT_FILE_NAME = 'script.sh' _OSCAR_SCRIPT_PATH = ...
true
true
f7057fd5afafd3865f8482c22c4d763876ca6411
8,749
py
Python
src/main.py
Alamgir-K/Climate-Change-Simulation
2928ad1522d0371885dbd174ef14e5795e6282d2
[ "MIT" ]
null
null
null
src/main.py
Alamgir-K/Climate-Change-Simulation
2928ad1522d0371885dbd174ef14e5795e6282d2
[ "MIT" ]
null
null
null
src/main.py
Alamgir-K/Climate-Change-Simulation
2928ad1522d0371885dbd174ef14e5795e6282d2
[ "MIT" ]
null
null
null
""" Climate Change Project """ import plotly.graph_objects as go from PIL import Image, ImageDraw, ImageFont from computing_data import calc_high_actual_pd, \ calc_low_actual_pd, \ calc_median_actual_pd, \ make_high_rcp_list, make_low_rcp_list, \ make_median_rcp_list, rcp_to_slice, temp_to_rgb from read...
42.470874
98
0.572865
import plotly.graph_objects as go from PIL import Image, ImageDraw, ImageFont from computing_data import calc_high_actual_pd, \ calc_low_actual_pd, \ calc_median_actual_pd, \ make_high_rcp_list, make_low_rcp_list, \ make_median_rcp_list, rcp_to_slice, temp_to_rgb from reading_data import read_actual_dat...
true
true
f705805a5a9535dbea10b25388e800f47b46988d
1,937
py
Python
pyscf/nao/tddft_iter_x_zip.py
robert-anderson/pyscf
cdc56e168cb15f47e8cdc791a92d689fa9b655af
[ "Apache-2.0" ]
3
2021-02-28T00:52:53.000Z
2021-03-01T06:23:33.000Z
pyscf/nao/tddft_iter_x_zip.py
robert-anderson/pyscf
cdc56e168cb15f47e8cdc791a92d689fa9b655af
[ "Apache-2.0" ]
36
2018-08-22T19:44:03.000Z
2020-05-09T10:02:36.000Z
pyscf/nao/tddft_iter_x_zip.py
robert-anderson/pyscf
cdc56e168cb15f47e8cdc791a92d689fa9b655af
[ "Apache-2.0" ]
4
2018-02-14T16:28:28.000Z
2019-08-12T16:40:30.000Z
from __future__ import print_function, division from numpy import array, argmax from pyscf.nao import tddft_iter class tddft_iter_x_zip(tddft_iter): """ Iterative TDDFT with a high-energy part of the KS eigenvectors compressed """ def __init__(self, **kw): from pyscf.nao.m_fermi_dirac import fermi_dirac_occu...
42.108696
109
0.669592
from __future__ import print_function, division from numpy import array, argmax from pyscf.nao import tddft_iter class tddft_iter_x_zip(tddft_iter): def __init__(self, **kw): from pyscf.nao.m_fermi_dirac import fermi_dirac_occupations tddft_iter.__init__(self, **kw) self.x_zip = kw['x_zip'] if 'x_...
true
true
f705809ff2c93a8fa8ce2eda3a50fb2aa0ec5726
200
py
Python
http_request_randomizer/requests/errors/ProxyListException.py
nderkach/HTTP_Request_Randomizer
48f445ff2315c27e096a5ee3165329b637095e83
[ "MIT" ]
146
2016-01-20T22:36:25.000Z
2022-03-25T12:55:33.000Z
http_request_randomizer/requests/errors/ProxyListException.py
nderkach/HTTP_Request_Randomizer
48f445ff2315c27e096a5ee3165329b637095e83
[ "MIT" ]
70
2016-07-11T18:14:08.000Z
2022-02-03T05:12:37.000Z
http_request_randomizer/requests/errors/ProxyListException.py
nderkach/HTTP_Request_Randomizer
48f445ff2315c27e096a5ee3165329b637095e83
[ "MIT" ]
61
2016-06-07T01:16:21.000Z
2022-02-21T19:13:22.000Z
class ProxyListException(Exception): def __init___(self, extraArguments): Exception.__init__(self, " was raised - {0}".format(extraArguments)) self.dErrorArguments = extraArguments
50
76
0.73
class ProxyListException(Exception): def __init___(self, extraArguments): Exception.__init__(self, " was raised - {0}".format(extraArguments)) self.dErrorArguments = extraArguments
true
true
f70580d96b98a06da9dda9cd1e9dc054bb30b99f
22,694
py
Python
arcade/tilemap.py
Mr-Coxall/arcade
7767e9c7d7395c0dd35479744052f18ac8c86679
[ "MIT" ]
null
null
null
arcade/tilemap.py
Mr-Coxall/arcade
7767e9c7d7395c0dd35479744052f18ac8c86679
[ "MIT" ]
null
null
null
arcade/tilemap.py
Mr-Coxall/arcade
7767e9c7d7395c0dd35479744052f18ac8c86679
[ "MIT" ]
null
null
null
""" Functions and classes for managing a map saved in the .tmx format. Typically these .tmx maps are created using the `Tiled Map Editor`_. For more information, see the `Platformer Tutorial`_. .. _Tiled Map Editor: https://www.mapeditor.org/ .. _Platformer Tutorial: http://arcade.academy/examples/platform_tutorial/...
34.384848
165
0.59822
import copy import math import os from pathlib import Path from typing import List, Optional, Tuple, Union, cast import pytiled_parser from arcade import ( AnimatedTimeBasedSprite, AnimationKeyframe, Sprite, SpriteList, load_texture, ) from arcade.arcade_types import Point from arcade.resources i...
true
true
f705811f0f591f97ad3e4904b50ed90739fad929
98
py
Python
lab5_threshold_functions/sat/types.py
j-adamczyk/ADPTO_templates
e0a4e77ba8de21fe966388ccee66ef62224a2d99
[ "MIT" ]
null
null
null
lab5_threshold_functions/sat/types.py
j-adamczyk/ADPTO_templates
e0a4e77ba8de21fe966388ccee66ef62224a2d99
[ "MIT" ]
null
null
null
lab5_threshold_functions/sat/types.py
j-adamczyk/ADPTO_templates
e0a4e77ba8de21fe966388ccee66ef62224a2d99
[ "MIT" ]
1
2022-03-25T07:25:26.000Z
2022-03-25T07:25:26.000Z
from typing import List, Set, Tuple VertexSets = List[Set[int]] EdgeList = List[Tuple[int, int]]
19.6
35
0.72449
from typing import List, Set, Tuple VertexSets = List[Set[int]] EdgeList = List[Tuple[int, int]]
true
true
f705813cf40811a24e6a3961328998417d3b7e4d
4,566
py
Python
main_app/tests/test_models.py
wszoltysek/give_things
240266460f0d7b7777cdaa8383edce80ea9e6024
[ "MIT" ]
null
null
null
main_app/tests/test_models.py
wszoltysek/give_things
240266460f0d7b7777cdaa8383edce80ea9e6024
[ "MIT" ]
null
null
null
main_app/tests/test_models.py
wszoltysek/give_things
240266460f0d7b7777cdaa8383edce80ea9e6024
[ "MIT" ]
null
null
null
import pytest from main_app.models import * from main_app.tests.utils import * # TESTS FOR CREATE MODELS: @pytest.mark.django_db def test_create_user(): # Given: users_before = User.objects.count() # When: new_user = fake_user() # Then: assert User.objects.count() == users_before + 1 asse...
26.858824
73
0.708717
import pytest from main_app.models import * from main_app.tests.utils import * @pytest.mark.django_db def test_create_user(): users_before = User.objects.count() new_user = fake_user() assert User.objects.count() == users_before + 1 assert new_user.pk == 1 assert new_user.is_anony...
true
true
f70581a8075af7680223c94e5ae62ce648e7287c
1,866
py
Python
homeassistant/components/rpi_power/binary_sensor.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/rpi_power/binary_sensor.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/rpi_power/binary_sensor.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
""" A sensor platform which detects underruns and capped status from the official Raspberry Pi Kernel. Minimal Kernel needed is 4.14+ """ import logging from rpi_bad_power import UnderVoltage, new_under_voltage from homeassistant.components.binary_sensor import ( BinarySensorDeviceClass, BinarySensorEntity, ...
33.927273
128
0.744373
import logging from rpi_bad_power import UnderVoltage, new_under_voltage from homeassistant.components.binary_sensor import ( BinarySensorDeviceClass, BinarySensorEntity, ) from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platf...
true
true
f70582e58b5ad8dd04398cbdb1c24db03fe3139a
1,746
py
Python
audiostream.py
ITNano/soundserver
b84cbfd821987ad8af72a6c2677caa0b949abff6
[ "MIT" ]
null
null
null
audiostream.py
ITNano/soundserver
b84cbfd821987ad8af72a6c2677caa0b949abff6
[ "MIT" ]
null
null
null
audiostream.py
ITNano/soundserver
b84cbfd821987ad8af72a6c2677caa0b949abff6
[ "MIT" ]
null
null
null
import numpy import wave class Audiostream(object): def __init__(self, volume_prio=1): self.volume_prio = volume_prio def get_data(self, frame_count, channels, width, rate): return "".join(["\x00"]*frames*self.channels*self.width) def get_volume_priority(self)...
30.103448
68
0.580756
import numpy import wave class Audiostream(object): def __init__(self, volume_prio=1): self.volume_prio = volume_prio def get_data(self, frame_count, channels, width, rate): return "".join(["\x00"]*frames*self.channels*self.width) def get_volume_priority(self)...
true
true
f7058455308d91038b90e873d4f6c9da997ca842
4,206
py
Python
paypalpayoutssdk/payouts/payouts_item_get_request.py
truthiswill/Payouts-Python-SDK
ba04ffafb8165a1b7cdfd5841f08a96dccdd190b
[ "BSD-Source-Code" ]
23
2020-03-02T13:31:55.000Z
2022-03-06T11:25:21.000Z
paypalpayoutssdk/payouts/payouts_item_get_request.py
truthiswill/Payouts-Python-SDK
ba04ffafb8165a1b7cdfd5841f08a96dccdd190b
[ "BSD-Source-Code" ]
4
2020-09-26T08:40:26.000Z
2022-03-01T17:29:51.000Z
paypalpayoutssdk/payouts/payouts_item_get_request.py
truthiswill/Payouts-Python-SDK
ba04ffafb8165a1b7cdfd5841f08a96dccdd190b
[ "BSD-Source-Code" ]
21
2020-02-07T10:02:57.000Z
2021-09-09T18:05:02.000Z
# This class was generated on Mon, 23 Dec 2019 12:39:22 IST by version 0.1.0-dev+904328-dirty of Braintree SDK Generator # payouts_item_get_request.py # @version 0.1.0-dev+904328-dirty # @type request # @data H4sIAAAAAAAC/+xb63PbuBH/3r9ih9eZnGcoyXe5p795bF/j9pq4sZNOx/VYELkSUYMADwta4WTyv3fwIM2XHMdxdH3ok61dPPa3u1gsFuD76CX...
161.769231
3,256
0.906087
import paypalhttp try: from urllib import quote except ImportError: from urllib.parse import quote class PayoutsItemGetRequest: def __init__(self, payout_item_id): self.verb = "GET" self.path = "/v1/payments/payouts-item/{payout_item_id}?".replace("{payout_item_id}", quote(str(pa...
true
true
f70586c1efc45321eec56c33cb0c96e78f531a4d
7,859
py
Python
benchmarks/f3_wrong_hints_permutations/scaling_nonlinear_software/10-19_13.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints_permutations/scaling_nonlinear_software/10-19_13.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints_permutations/scaling_nonlinear_software/10-19_13.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import FrozenSet, Tuple import pysmt.typing as types from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
34.169565
81
0.529457
from typing import FrozenSet, Tuple import pysmt.typing as types from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
true
true
f705874db830f4f002d426666ec7d088d9bad4bc
2,291
py
Python
pages/models.py
allenamusin/metadata-verifier
7b2c61c231c49c722d1db9c9e83f157b6e2439f4
[ "MIT" ]
null
null
null
pages/models.py
allenamusin/metadata-verifier
7b2c61c231c49c722d1db9c9e83f157b6e2439f4
[ "MIT" ]
11
2020-02-12T03:26:35.000Z
2022-02-10T12:01:00.000Z
pages/models.py
allenamusin/metadata-verifier
7b2c61c231c49c722d1db9c9e83f157b6e2439f4
[ "MIT" ]
null
null
null
import requests from django.db import models from django.utils import timezone from users.models import CustomUser from datetime import datetime def get_coordinate(gps, ref): coordinate = gps[0] + gps[1]/60 + gps[2]/3600 if ref == 'W': coordinate = -coordinate return coordinate def get_timestamp(t...
34.712121
81
0.611523
import requests from django.db import models from django.utils import timezone from users.models import CustomUser from datetime import datetime def get_coordinate(gps, ref): coordinate = gps[0] + gps[1]/60 + gps[2]/3600 if ref == 'W': coordinate = -coordinate return coordinate def get_timestamp(t...
true
true
f705892d7832be8bc0c55823b07c8570e5d2852f
442
py
Python
src/container.py
sudeep0901/python
7a50af12e72d21ca4cad7f2afa4c6f929552043f
[ "MIT" ]
null
null
null
src/container.py
sudeep0901/python
7a50af12e72d21ca4cad7f2afa4c6f929552043f
[ "MIT" ]
3
2019-12-26T05:13:55.000Z
2020-03-07T06:59:56.000Z
src/container.py
sudeep0901/python
7a50af12e72d21ca4cad7f2afa4c6f929552043f
[ "MIT" ]
null
null
null
a = [1, "a"] print(list) print(dir(list)) list = [1, "a"] print(dir(list)) tuple = ("a", "b") print(list) print(tuple) dictn = {"key": "dictionary", "d" :a} print(dictn) def factorial(n): "Factorial calculation string document string" # print("Calculating factorial of ", n) if n <= 1: return...
14.733333
50
0.615385
a = [1, "a"] print(list) print(dir(list)) list = [1, "a"] print(dir(list)) tuple = ("a", "b") print(list) print(tuple) dictn = {"key": "dictionary", "d" :a} print(dictn) def factorial(n): if n <= 1: return 1 else: return n * factorial(n - 1) print(factorial(100)) print(factorial.__doc__)...
true
true
f7058b34f1196160d71f990667c61db4148e381e
3,132
py
Python
pype/plugins/maya/publish/extract_animation.py
kalisp/pype
28bbffaf2d12ccee48313cd9985e8dfa05e81a5c
[ "MIT" ]
null
null
null
pype/plugins/maya/publish/extract_animation.py
kalisp/pype
28bbffaf2d12ccee48313cd9985e8dfa05e81a5c
[ "MIT" ]
null
null
null
pype/plugins/maya/publish/extract_animation.py
kalisp/pype
28bbffaf2d12ccee48313cd9985e8dfa05e81a5c
[ "MIT" ]
null
null
null
import os from maya import cmds import avalon.maya import pype.api from pype.hosts.maya.lib import extract_alembic class ExtractAnimation(pype.api.Extractor): """Produce an alembic of just point positions and normals. Positions and normals, uvs, creases are preserved, but nothing more, for plain and pr...
33.677419
77
0.559387
import os from maya import cmds import avalon.maya import pype.api from pype.hosts.maya.lib import extract_alembic class ExtractAnimation(pype.api.Extractor): label = "Extract Animation" hosts = ["maya"] families = ["animation"] def process(self, instance): out_sets = [node for n...
true
true
f7058bd93bd1ec52a35d57cf42075a5bb3de9861
14,085
py
Python
passerine/db/session.py
shiroyuki/passerine
6e50ca4a8892da51af68561ac01601bfe8c9fd9c
[ "MIT" ]
null
null
null
passerine/db/session.py
shiroyuki/passerine
6e50ca4a8892da51af68561ac01601bfe8c9fd9c
[ "MIT" ]
1
2017-03-11T12:15:55.000Z
2017-03-11T12:15:55.000Z
passerine/db/session.py
shiroyuki/passerine
6e50ca4a8892da51af68561ac01601bfe8c9fd9c
[ "MIT" ]
null
null
null
import re from passerine.db.common import ProxyObject, ProxyFactory, ProxyCollection from passerine.db.repository import Repository from passerine.db.entity import get_relational_map from passerine.db.exception import IntegrityConstraintError, UnsupportedRepositoryReferenceError from passe...
34.186893
121
0.61349
import re from passerine.db.common import ProxyObject, ProxyFactory, ProxyCollection from passerine.db.repository import Repository from passerine.db.entity import get_relational_map from passerine.db.exception import IntegrityConstraintError, UnsupportedRepositoryReferenceError from passe...
true
true
f7058c504d2e6bb6e65bff54137c6efbe95c484b
13,954
py
Python
parallize.py
sksg/parallize
58d211fd92a4cac97b1d7795932157b839e42b2b
[ "MIT" ]
null
null
null
parallize.py
sksg/parallize
58d211fd92a4cac97b1d7795932157b839e42b2b
[ "MIT" ]
null
null
null
parallize.py
sksg/parallize
58d211fd92a4cac97b1d7795932157b839e42b2b
[ "MIT" ]
null
null
null
import numpy as np from numpy.core.numerictypes import typecodes import inspect import functools import re import builtins import os from concurrent.futures import ThreadPoolExecutor as thread_pool from concurrent.futures import ProcessPoolExecutor as process_pool from concurrent.futures import as_completed def _iter...
38.021798
78
0.560484
import numpy as np from numpy.core.numerictypes import typecodes import inspect import functools import re import builtins import os from concurrent.futures import ThreadPoolExecutor as thread_pool from concurrent.futures import ProcessPoolExecutor as process_pool from concurrent.futures import as_completed def _iter...
true
true
f7058c86361e6fb62602fa1810c1f92feb394991
21,195
py
Python
tests/reflection.py
onyb/peewee
323983c2ecf2ec70a14ed78ddd00cf5cd17d56e2
[ "MIT" ]
1
2019-11-17T04:55:26.000Z
2019-11-17T04:55:26.000Z
tests/reflection.py
onyb/peewee
323983c2ecf2ec70a14ed78ddd00cf5cd17d56e2
[ "MIT" ]
null
null
null
tests/reflection.py
onyb/peewee
323983c2ecf2ec70a14ed78ddd00cf5cd17d56e2
[ "MIT" ]
1
2019-07-07T20:57:22.000Z
2019-07-07T20:57:22.000Z
import datetime import os import re from peewee import * from playhouse.reflection import * from .base import IS_SQLITE_OLD from .base import ModelTestCase from .base import TestModel from .base import db from .base import requires_models from .base import requires_sqlite from .base import skip_if from .base_models i...
35.325
79
0.566407
import datetime import os import re from peewee import * from playhouse.reflection import * from .base import IS_SQLITE_OLD from .base import ModelTestCase from .base import TestModel from .base import db from .base import requires_models from .base import requires_sqlite from .base import skip_if from .base_models i...
true
true
f7058f13d20f3f1ca760719af81ddcb6f2a11b08
2,334
py
Python
robosuite/models/robots/panda_robot.py
StanfordVL/Lasersuite
8b78c3d202f2a4b8712c5f228feaf5fae61f16e9
[ "MIT" ]
5
2020-08-09T16:47:38.000Z
2021-05-06T05:43:12.000Z
robosuite/models/robots/panda_robot.py
StanfordVL/Lasersuite
8b78c3d202f2a4b8712c5f228feaf5fae61f16e9
[ "MIT" ]
1
2020-11-06T06:31:08.000Z
2020-11-06T06:31:08.000Z
robosuite/models/robots/panda_robot.py
StanfordVL/Lasersuite
8b78c3d202f2a4b8712c5f228feaf5fae61f16e9
[ "MIT" ]
null
null
null
import numpy as np from .robot_model import RobotModel from ...utils.mjcf_utils import xml_path_completion class Panda(RobotModel): """Panda is a sensitive single-arm robot designed by Franka.""" def __init__(self, idn=0, bottom_offset=(0, 0, -0.913)): """ Args: idn (int or str): ...
28.814815
109
0.582262
import numpy as np from .robot_model import RobotModel from ...utils.mjcf_utils import xml_path_completion class Panda(RobotModel): def __init__(self, idn=0, bottom_offset=(0, 0, -0.913)): super().__init__(xml_path_completion("robots/panda/robot.xml"), idn=idn, bottom_offset=bottom_offset) ...
true
true
f7058f6fa6f834bef960f8c52d0d2be8e352837f
11,340
py
Python
kubernetes_asyncio/client/models/v1beta1_cron_job_spec.py
lsst-sqre/kubernetes_asyncio
f028cc793e3a2c519be6a52a49fb77ff0b014c9b
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1beta1_cron_job_spec.py
lsst-sqre/kubernetes_asyncio
f028cc793e3a2c519be6a52a49fb77ff0b014c9b
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1beta1_cron_job_spec.py
lsst-sqre/kubernetes_asyncio
f028cc793e3a2c519be6a52a49fb77ff0b014c9b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.19.15 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six f...
38.969072
324
0.67134
import pprint import re import six from kubernetes_asyncio.client.configuration import Configuration class V1beta1CronJobSpec(object): openapi_types = { 'concurrency_policy': 'str', 'failed_jobs_history_limit': 'int', 'job_template': 'V1beta1JobTemplateSpec', 'schedule': '...
true
true
f705902ea07b23776e92a0707bf931cd4228f88f
489
py
Python
src/doing/pr/open_pr.py
tijlk/doing-cli
048e04aaa9f3f99f1a8013fe4cd8a488180f5f2b
[ "MIT" ]
12
2021-03-23T13:27:33.000Z
2022-02-20T05:44:56.000Z
src/doing/pr/open_pr.py
tijlk/doing-cli
048e04aaa9f3f99f1a8013fe4cd8a488180f5f2b
[ "MIT" ]
63
2021-03-23T12:54:00.000Z
2022-02-24T15:12:45.000Z
src/doing/pr/open_pr.py
tijlk/doing-cli
048e04aaa9f3f99f1a8013fe4cd8a488180f5f2b
[ "MIT" ]
3
2021-04-09T14:40:23.000Z
2021-07-15T13:26:40.000Z
import click from doing.utils import get_config from doing.utils import get_repo_name from typing import Union def cmd_open_pr(pullrequest_id: Union[str, int]) -> None: """ Open a specific PULLREQUEST_ID. '!' prefix is allowed. """ pullrequest_id = str(pullrequest_id).lstrip("!").strip() project ...
28.764706
97
0.721881
import click from doing.utils import get_config from doing.utils import get_repo_name from typing import Union def cmd_open_pr(pullrequest_id: Union[str, int]) -> None: pullrequest_id = str(pullrequest_id).lstrip("!").strip() project = get_config("project") organization = get_config("organization") ...
true
true
f70591035fd509c27b46a06d617bc227adafc45a
332
py
Python
time_management/facade_abc.py
artorias111/time-management
c79c31e070447e70bd3a54e2ad77d88d9821ac2e
[ "MIT" ]
null
null
null
time_management/facade_abc.py
artorias111/time-management
c79c31e070447e70bd3a54e2ad77d88d9821ac2e
[ "MIT" ]
null
null
null
time_management/facade_abc.py
artorias111/time-management
c79c31e070447e70bd3a54e2ad77d88d9821ac2e
[ "MIT" ]
null
null
null
from abc import ABC class AbcFacade(ABC): """Any interface will expect to be able to invoke the following methods.""" def count_rows(self): pass def get_rows(self): pass def get_last_workday(self): pass def delete_history(self): pass def disconnect(self): ...
15.809524
79
0.611446
from abc import ABC class AbcFacade(ABC): def count_rows(self): pass def get_rows(self): pass def get_last_workday(self): pass def delete_history(self): pass def disconnect(self): pass
true
true
f7059112109560001ae224464bc42dacbe27b49c
29,512
py
Python
Virtual-Environment/lib/python3.7/site-packages/rich/pretty.py
jguev/instant-insanity
98894a228d20e7abc5c6d123772aa8cbdaefd372
[ "MIT" ]
2
2020-12-14T21:02:54.000Z
2021-12-25T05:49:28.000Z
Virtual-Environment/lib/python3.7/site-packages/rich/pretty.py
jguev/instant-insanity
98894a228d20e7abc5c6d123772aa8cbdaefd372
[ "MIT" ]
4
2021-11-11T10:23:35.000Z
2021-12-01T10:28:30.000Z
Virtual-Environment/lib/python3.7/site-packages/rich/pretty.py
jguev/instant-insanity
98894a228d20e7abc5c6d123772aa8cbdaefd372
[ "MIT" ]
null
null
null
import builtins import os from rich.repr import RichReprResult import sys from array import array from collections import Counter, defaultdict, deque, UserDict, UserList import dataclasses from dataclasses import dataclass, fields, is_dataclass from inspect import isclass from itertools import islice import re from typ...
35.386091
134
0.557366
import builtins import os from rich.repr import RichReprResult import sys from array import array from collections import Counter, defaultdict, deque, UserDict, UserList import dataclasses from dataclasses import dataclass, fields, is_dataclass from inspect import isclass from itertools import islice import re from typ...
true
true
f7059188ba5afe67da1d44238af516ec78351d12
2,742
py
Python
tensorflow_gan/examples/stargan_estimator/train_test.py
jiasenwu/gan
f92aeca269365180125d4e4c57c53cbf5e679299
[ "Apache-2.0" ]
1
2020-07-30T12:33:56.000Z
2020-07-30T12:33:56.000Z
tensorflow_gan/examples/stargan_estimator/train_test.py
jiasenwu/gan
f92aeca269365180125d4e4c57c53cbf5e679299
[ "Apache-2.0" ]
null
null
null
tensorflow_gan/examples/stargan_estimator/train_test.py
jiasenwu/gan
f92aeca269365180125d4e4c57c53cbf5e679299
[ "Apache-2.0" ]
1
2021-05-31T23:19:44.000Z
2021-05-31T23:19:44.000Z
# coding=utf-8 # Copyright 2019 The TensorFlow GAN Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
33.439024
77
0.731947
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from tensorflow_gan.examples.stargan_estimator import train_lib mock = tf.compat.v1.test.mock def _test_generator(input_images, _): return input_...
true
true
f70592ac90e928d0c5190de78accdb47db98dc6e
1,518
py
Python
app.py
aldinaufal21/qual-id
c3205256d1483831117b001e3929e5175aff78ee
[ "MIT" ]
null
null
null
app.py
aldinaufal21/qual-id
c3205256d1483831117b001e3929e5175aff78ee
[ "MIT" ]
null
null
null
app.py
aldinaufal21/qual-id
c3205256d1483831117b001e3929e5175aff78ee
[ "MIT" ]
null
null
null
from flask import Flask, request, jsonify, render_template, make_response from qual_id.pattern import Pattern import random app = Flask(__name__) @app.route('/get/', methods=['GET']) def get_response(): pattern = Pattern(request.args.get("pattern", "")) number = int(request.args.get("number", 1)) response_obj...
25.3
81
0.700264
from flask import Flask, request, jsonify, render_template, make_response from qual_id.pattern import Pattern import random app = Flask(__name__) @app.route('/get/', methods=['GET']) def get_response(): pattern = Pattern(request.args.get("pattern", "")) number = int(request.args.get("number", 1)) response_obj...
true
true
f70593151fa24ae167040805a1b24f6d3fdec51d
633
py
Python
app/main/forms.py
markmumba/personal-blog
c2a3a290f1d6ce847e2db4cba2f799b8292889f9
[ "MIT" ]
null
null
null
app/main/forms.py
markmumba/personal-blog
c2a3a290f1d6ce847e2db4cba2f799b8292889f9
[ "MIT" ]
null
null
null
app/main/forms.py
markmumba/personal-blog
c2a3a290f1d6ce847e2db4cba2f799b8292889f9
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms.validators import Required from wtforms import TextAreaField,SubmitField,StringField from ..models import User class UpdateProfile(FlaskForm): bio = TextAreaField('Update bio.',validators = [Required()]) submit = SubmitField('Update') class PostAblog (FlaskForm): ...
35.166667
71
0.739336
from flask_wtf import FlaskForm from wtforms.validators import Required from wtforms import TextAreaField,SubmitField,StringField from ..models import User class UpdateProfile(FlaskForm): bio = TextAreaField('Update bio.',validators = [Required()]) submit = SubmitField('Update') class PostAblog (FlaskForm): ...
true
true
f705942f8f1cc804e3b4671a85ed097d24911237
27
py
Python
__init__.py
JDavidMoreno/meditative_cards
b935a422037c4f3ed076ce1bcd5bcdcbe24f1565
[ "MIT" ]
null
null
null
__init__.py
JDavidMoreno/meditative_cards
b935a422037c4f3ed076ce1bcd5bcdcbe24f1565
[ "MIT" ]
null
null
null
__init__.py
JDavidMoreno/meditative_cards
b935a422037c4f3ed076ce1bcd5bcdcbe24f1565
[ "MIT" ]
1
2021-04-03T18:00:14.000Z
2021-04-03T18:00:14.000Z
from . import controllers
9
25
0.777778
from . import controllers
true
true
f70594d9ea97d88b1de224836e5a52dd96a783ea
6,523
py
Python
experimental/inject.py
LuisCerdenoMota/SHERLOCK
5fb52795d3ab44e27bc7dbc6f2c2e6c214995ba1
[ "MIT" ]
null
null
null
experimental/inject.py
LuisCerdenoMota/SHERLOCK
5fb52795d3ab44e27bc7dbc6f2c2e6c214995ba1
[ "MIT" ]
null
null
null
experimental/inject.py
LuisCerdenoMota/SHERLOCK
5fb52795d3ab44e27bc7dbc6f2c2e6c214995ba1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import #::: modules import numpy as np import os, sys import ellc from transitleastsquares import catalog_info import astropy.constants as ac import astropy.units as u import lightkurve as lk import pandas as pd ...
38.146199
126
0.62226
from __future__ import print_function, division, absolute_import import numpy as np import os, sys import ellc from transitleastsquares import catalog_info import astropy.constants as ac import astropy.units as u import lightkurve as lk import pandas as pd np.random.seed(42) TIC_ID = 85400193 lcf= lk.searc...
true
true
f70596147d6743d8b4b0dc81565a51e99185ba66
43,146
py
Python
pymclevel/leveldb.py
bennettdc/MCEdit-Unified
90abfb170c65b877ac67193e717fa3a3ded635dd
[ "0BSD" ]
237
2018-02-04T19:13:31.000Z
2022-03-26T03:06:07.000Z
pymclevel/leveldb.py
bennettdc/MCEdit-Unified
90abfb170c65b877ac67193e717fa3a3ded635dd
[ "0BSD" ]
551
2015-01-01T02:36:53.000Z
2018-02-01T00:03:12.000Z
pymclevel/leveldb.py
bennettdc/MCEdit-Unified
90abfb170c65b877ac67193e717fa3a3ded635dd
[ "0BSD" ]
97
2015-01-02T01:31:12.000Z
2018-01-22T05:37:47.000Z
# !/usr/bin/env python # # Copyright (C) 2012 Space Monkey, Inc. # # 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,...
36.075251
137
0.644301
__author__ = "JT Olds" __email__ = "jt@spacemonkey.com" import bisect import ctypes import ctypes.util import weakref import threading from collections import namedtuple import os import sys import platform import directories import logging log = logging.getLogger(__name__) try: plat ...
true
true
f7059649cace577ed483d9e7b5ab728bae8e0607
12,268
py
Python
VMBackup/main/PluginHost.py
jamvar/azure-linux-extensions
66610daae2ef09f7920d9c4aa2e99a3035fe76a6
[ "Apache-2.0" ]
2
2021-11-02T00:16:29.000Z
2022-02-17T12:08:42.000Z
VMBackup/main/PluginHost.py
jamvar/azure-linux-extensions
66610daae2ef09f7920d9c4aa2e99a3035fe76a6
[ "Apache-2.0" ]
3
2019-07-29T20:25:09.000Z
2019-08-13T00:00:45.000Z
VMBackup/main/PluginHost.py
ChrisCoe/azure-linux-extensions
1ca6fce15eca3ddefc33651b094c9a4b4e52fa31
[ "Apache-2.0" ]
1
2017-07-17T18:52:10.000Z
2017-07-17T18:52:10.000Z
import time import sys import os import threading try: import ConfigParser as ConfigParsers except ImportError: import configparser as ConfigParsers from common import CommonVariables from pwd import getpwuid from stat import * import traceback # [pre_post] # "timeout" : (in seconds), # # .......
43.814286
175
0.623329
import time import sys import os import threading try: import ConfigParser as ConfigParsers except ImportError: import configparser as ConfigParsers from common import CommonVariables from pwd import getpwuid from stat import * import traceback ...
true
true