hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f73371878d00808fee668072135c8280384ffd51
1,268
py
Python
Python3/21_Merge_Two_Sorted_List.py
yangjiahao106/LeetCode
c30ba0ef06f444951f7ab8eee495ac43613d7f4f
[ "RSA-MD" ]
1
2018-04-28T09:07:11.000Z
2018-04-28T09:07:11.000Z
Python3/21_Merge_Two_Sorted_List.py
yangjiahao106/LeetCode
c30ba0ef06f444951f7ab8eee495ac43613d7f4f
[ "RSA-MD" ]
1
2018-02-24T16:26:30.000Z
2018-02-24T16:26:44.000Z
Python3/21_Merge_Two_Sorted_List.py
yangjiahao106/LeetCode
c30ba0ef06f444951f7ab8eee495ac43613d7f4f
[ "RSA-MD" ]
null
null
null
#! python3 # __author__ = "YangJiaHao" # date: 2018/2/1 # Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: def mergeTwoLists(self, l1, l2): """ :type l1: ListNode :type l2: ListNode :rtype: Li...
22.642857
55
0.467666
class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: def mergeTwoLists(self, l1, l2): if l1 == None: return l2 if l2 == None: return l1 head = ListNode(0) node = head while l1 and l2: ...
true
true
f7337218de8aef79c314ae5060aa193c2e74b80b
16,098
py
Python
coremltools/converters/mil/mil/ops/defs/scatter_gather.py
odedzewi/coremltools
055d4bf9c00dee8a38258128d6599609df9ae32c
[ "BSD-3-Clause" ]
1
2022-02-10T10:54:28.000Z
2022-02-10T10:54:28.000Z
coremltools/converters/mil/mil/ops/defs/scatter_gather.py
0xgpapad/coremltools
fdd5630c423c0fc4f1a04c3f5a3c17b808a15505
[ "BSD-3-Clause" ]
null
null
null
coremltools/converters/mil/mil/ops/defs/scatter_gather.py
0xgpapad/coremltools
fdd5630c423c0fc4f1a04c3f5a3c17b808a15505
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np import numbers from coremltools.converters.mil.mil import Operation, types from co...
29.483516
140
0.531867
import numpy as np import numbers from coremltools.converters.mil.mil import Operation, types from coremltools.converters.mil.mil.input_type import ( DefaultInputs, InputSpec, IntInputType, IntTensorInputType, TensorInputType, StringInputType, ) from coremltools.converters.mil.mil.operation...
true
true
f733728277c58a28a7d19dce8537b1e9b63ec0df
2,051
py
Python
Golden-Miner/Python/functions.py
Henvy-Mango/Golden-Miner
4e6ec94bafd491e3e867548736711d8ff4c0d9bf
[ "MIT" ]
30
2018-04-09T03:06:26.000Z
2022-02-24T08:33:11.000Z
Golden-Miner/Python/functions.py
Henvy-Mango/Golden-Miner
4e6ec94bafd491e3e867548736711d8ff4c0d9bf
[ "MIT" ]
4
2018-07-10T08:31:21.000Z
2022-01-07T07:21:07.000Z
Golden-Miner/Python/functions.py
Henvy-Mango/Golden-Miner
4e6ec94bafd491e3e867548736711d8ff4c0d9bf
[ "MIT" ]
8
2018-07-25T08:38:40.000Z
2020-01-06T06:09:34.000Z
import logging import os import time def tap_screen(x, y,device_x,device_y): #模拟点击 base_x, base_y = 1920, 1080 real_x = int(x / base_x * device_x) real_y = int(y / base_y * device_y) os.system('adb shell input tap {} {}'.format(real_x, real_y)) def VT_init(): #虚拟机adb初始化 os.system('adb connect 12...
25.962025
65
0.588981
import logging import os import time def tap_screen(x, y,device_x,device_y): base_x, base_y = 1920, 1080 real_x = int(x / base_x * device_x) real_y = int(y / base_y * device_y) os.system('adb shell input tap {} {}'.format(real_x, real_y)) def VT_init(): os.system('adb connect 127.0.0.1:7555') ...
true
true
f733730f2dcf4904be19aad45f5b8b92056240ee
253
py
Python
youtubeviewer/colors.py
Kraphyl/YouTube-Viewer
5fd46052984df5777fa57e140a8b37c1e226eb03
[ "MIT" ]
null
null
null
youtubeviewer/colors.py
Kraphyl/YouTube-Viewer
5fd46052984df5777fa57e140a8b37c1e226eb03
[ "MIT" ]
null
null
null
youtubeviewer/colors.py
Kraphyl/YouTube-Viewer
5fd46052984df5777fa57e140a8b37c1e226eb03
[ "MIT" ]
null
null
null
import os os.system("") class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKCYAN = '\033[96m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m'
16.866667
25
0.521739
import os os.system("") class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKCYAN = '\033[96m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m'
true
true
f73374d5193383680e6567226fe55556e50468a7
7,809
py
Python
parsl/utils.py
aquanauts/parsl
978bb483a4a41b3cef083aa242b2a78614a02dd0
[ "Apache-2.0" ]
null
null
null
parsl/utils.py
aquanauts/parsl
978bb483a4a41b3cef083aa242b2a78614a02dd0
[ "Apache-2.0" ]
null
null
null
parsl/utils.py
aquanauts/parsl
978bb483a4a41b3cef083aa242b2a78614a02dd0
[ "Apache-2.0" ]
null
null
null
import inspect import logging import os import shlex import subprocess import time import typeguard from contextlib import contextmanager from typing import List import parsl from parsl.version import VERSION logger = logging.getLogger(__name__) @typeguard.typechecked def get_version() -> str: version = parsl._...
32.810924
145
0.631579
import inspect import logging import os import shlex import subprocess import time import typeguard from contextlib import contextmanager from typing import List import parsl from parsl.version import VERSION logger = logging.getLogger(__name__) @typeguard.typechecked def get_version() -> str: version = parsl._...
true
true
f7337506208d7ee643aa3b5d1018c89ab589e49e
12,741
py
Python
ParamGenerator/Spearmint/spearmint/utils/compression.py
Tabor-Research-Group/ChemOS
50117f572e95e68dc4dccb624cedb28dbfc6e419
[ "Apache-2.0" ]
37
2018-03-20T21:23:11.000Z
2022-03-26T08:19:20.000Z
ParamGenerator/Spearmint/spearmint/utils/compression.py
Tabor-Research-Group/ChemOS
50117f572e95e68dc4dccb624cedb28dbfc6e419
[ "Apache-2.0" ]
1
2021-06-29T10:03:22.000Z
2021-06-29T10:03:22.000Z
ParamGenerator/Spearmint/spearmint/utils/compression.py
Tabor-Research-Group/ChemOS
50117f572e95e68dc4dccb624cedb28dbfc6e419
[ "Apache-2.0" ]
10
2018-05-16T21:04:05.000Z
2021-10-15T18:14:06.000Z
# -*- coding: utf-8 -*- # Spearmint # # Academic and Non-Commercial Research Use Software License and Terms # of Use # # Spearmint is a software package to perform Bayesian optimization # according to specific algorithms (the “Software”). The Software is # designed to automatically run experiments (thus the code name ...
46.163043
90
0.728828
# expenses of litigation) incurred by or imposed upon the Indemnitees # or any one of them in connection with any claims, suits, actions, # demands or judgments aris...
true
true
f73375827f0ed1a1d4b504b151f3741086c92efb
18,951
py
Python
tools/interfacedocgen.py
abelalez/nipype
878271bd906768f11c4cabd04e5d1895551ce8a7
[ "Apache-2.0" ]
7
2017-02-17T08:54:26.000Z
2022-03-10T20:57:23.000Z
tools/interfacedocgen.py
abelalez/nipype
878271bd906768f11c4cabd04e5d1895551ce8a7
[ "Apache-2.0" ]
2
2018-04-17T19:18:16.000Z
2020-03-04T22:05:02.000Z
tools/interfacedocgen.py
abelalez/nipype
878271bd906768f11c4cabd04e5d1895551ce8a7
[ "Apache-2.0" ]
2
2017-09-23T16:22:00.000Z
2019-08-01T14:18:52.000Z
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Attempt to generate templates for module reference with Sphinx XXX - we exclude extension modules To include extension modules, first identify them as valid in the ``_uri2path``...
35.892045
79
0.554905
from __future__ import print_function, unicode_literals from builtins import object, open import inspect import os import re import sys import tempfile import warnings from nipype.interfaces.base import BaseInterface from nipype.pipeline.engine import Workflow from nipype.utils.misc import trim from github impo...
true
true
f733758c28429f084545854d7df87417d20a7c1b
12,589
py
Python
unlp/unsupervised/Word2Vec/get_file.py
Hanscal/unlp
93a630cac7957f1ddd38f34403ec6577a277e10a
[ "MIT" ]
8
2022-02-23T08:41:26.000Z
2022-03-14T11:42:51.000Z
unlp/unsupervised/Word2Vec/get_file.py
Hanscal/unlp
93a630cac7957f1ddd38f34403ec6577a277e10a
[ "MIT" ]
null
null
null
unlp/unsupervised/Word2Vec/get_file.py
Hanscal/unlp
93a630cac7957f1ddd38f34403ec6577a277e10a
[ "MIT" ]
2
2022-03-09T01:50:40.000Z
2022-03-21T09:23:09.000Z
# -*- coding: utf-8 -*- """ @description: Download file. """ import hashlib import os import shutil import sys import tarfile import time import typing import zipfile from pathlib import Path import numpy as np import six from six.moves.urllib.error import HTTPError from six.moves.urllib.error import URLError from si...
35.866097
79
0.57447
import hashlib import os import shutil import sys import tarfile import time import typing import zipfile from pathlib import Path import numpy as np import six from six.moves.urllib.error import HTTPError from six.moves.urllib.error import URLError from six.moves.urllib.request import urlretrieve class Progbar(ob...
true
true
f7337830bfdf6964254436e9e7154667341067f2
206
py
Python
programs/models/__init__.py
bycristhian/psp
019825e010386b6acc8c5466e7a6765218cb10d9
[ "MIT" ]
2
2020-09-04T17:06:41.000Z
2020-10-05T01:46:20.000Z
programs/models/__init__.py
bycristhian/psp
019825e010386b6acc8c5466e7a6765218cb10d9
[ "MIT" ]
null
null
null
programs/models/__init__.py
bycristhian/psp
019825e010386b6acc8c5466e7a6765218cb10d9
[ "MIT" ]
null
null
null
from .languages import ProgrammingLanguage from .estimations import Estimation, SizeEstimation, TypePart from .programs import Program, Report, Pip from .parts_of_code import ReusedPart, BasePart, NewPart
34.333333
61
0.839806
from .languages import ProgrammingLanguage from .estimations import Estimation, SizeEstimation, TypePart from .programs import Program, Report, Pip from .parts_of_code import ReusedPart, BasePart, NewPart
true
true
f73378aca4b59d93f62b1204f4f20afa24aae66e
8,678
py
Python
scripts/input_converter.py
hahahawu/Tagger
180a0412abf571797638d024b8dacf9d776ee6f9
[ "BSD-3-Clause" ]
2
2019-04-21T12:04:38.000Z
2019-07-11T06:40:59.000Z
scripts/input_converter.py
hahahawu/Tagger
180a0412abf571797638d024b8dacf9d776ee6f9
[ "BSD-3-Clause" ]
null
null
null
scripts/input_converter.py
hahahawu/Tagger
180a0412abf571797638d024b8dacf9d776ee6f9
[ "BSD-3-Clause" ]
null
null
null
# input_converter.py # author: Playinf # email: playinf@stu.xmu.edu.cn import os import six import json import random import argparse import tensorflow as tf def load_vocab(filename): fd = open(filename, "r") count = 0 vocab = {} for line in fd: word = line.strip() vocab[word] = cou...
30.131944
78
0.595414
import os import six import json import random import argparse import tensorflow as tf def load_vocab(filename): fd = open(filename, "r") count = 0 vocab = {} for line in fd: word = line.strip() vocab[word] = count count += 1 fd.close() return vocab def to_json...
true
true
f733795fb48cb31e6b901353458853317334e76e
7,191
py
Python
run.py
dmachlanski/ce807
17c9b7ddd71906c018cd213a674f37cbed36856d
[ "MIT" ]
null
null
null
run.py
dmachlanski/ce807
17c9b7ddd71906c018cd213a674f37cbed36856d
[ "MIT" ]
null
null
null
run.py
dmachlanski/ce807
17c9b7ddd71906c018cd213a674f37cbed36856d
[ "MIT" ]
1
2020-04-20T19:46:17.000Z
2020-04-20T19:46:17.000Z
import numpy as np import pandas as pd import re, argparse, datetime from timeit import default_timer from sklearn.preprocessing import MultiLabelBinarizer from sklearn.feature_extraction.text import TfidfTransformer, CountVectorizer from sklearn.model_selection import train_test_split, cross_validate from sklearn.metr...
52.489051
174
0.65721
import numpy as np import pandas as pd import re, argparse, datetime from timeit import default_timer from sklearn.preprocessing import MultiLabelBinarizer from sklearn.feature_extraction.text import TfidfTransformer, CountVectorizer from sklearn.model_selection import train_test_split, cross_validate from sklearn.metr...
true
true
f7337a3169791bc62866a541b40acf4d1fcd1fe5
9,279
py
Python
tests/utils/test_shell_util.py
ddiss/WALinuxAgent
9c9893ebdec8a43bb15d84f309ff5b564436c408
[ "Apache-2.0" ]
null
null
null
tests/utils/test_shell_util.py
ddiss/WALinuxAgent
9c9893ebdec8a43bb15d84f309ff5b564436c408
[ "Apache-2.0" ]
null
null
null
tests/utils/test_shell_util.py
ddiss/WALinuxAgent
9c9893ebdec8a43bb15d84f309ff5b564436c408
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2018 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
42.177273
128
0.684664
import unittest import azurelinuxagent.common.utils.shellutil as shellutil from tests.tools import AgentTestCase, patch class ShellQuoteTestCase(AgentTestCase): def test_shellquote(self): self.assertEqual("\'foo\'", shellutil.quote("foo")) self.assertEqual("\'foo bar\'", shelluti...
true
true
f7337ac96da895a25491e4e7acdfb8a6693363e9
34,887
py
Python
python/taichi/lang/kernel_impl.py
josephgalestian/taichiV2-master
12a63a05fdccc824205b1ee6545e4706bf473405
[ "MIT" ]
null
null
null
python/taichi/lang/kernel_impl.py
josephgalestian/taichiV2-master
12a63a05fdccc824205b1ee6545e4706bf473405
[ "MIT" ]
null
null
null
python/taichi/lang/kernel_impl.py
josephgalestian/taichiV2-master
12a63a05fdccc824205b1ee6545e4706bf473405
[ "MIT" ]
null
null
null
import ast import functools import inspect import re import sys import textwrap import numpy as np import taichi.lang from taichi._lib import core as _ti_core from taichi.lang import impl, runtime_ops from taichi.lang.ast import (ASTTransformerContext, KernelSimplicityASTChecker, transform...
40.238754
120
0.578468
import ast import functools import inspect import re import sys import textwrap import numpy as np import taichi.lang from taichi._lib import core as _ti_core from taichi.lang import impl, runtime_ops from taichi.lang.ast import (ASTTransformerContext, KernelSimplicityASTChecker, transform...
true
true
f7337ae7b4f7eaf22bdeba7f4aa4ba0486f8e06e
8,378
py
Python
configs/pipelines/templates/detector_mmdet.py
Kitware/VAIME
47b24b9d8a208cf8c621e5bb1088c61fcf507af6
[ "BSD-3-Clause" ]
127
2019-05-23T10:05:25.000Z
2022-03-28T05:14:11.000Z
configs/pipelines/templates/detector_mmdet.py
Kitware/VAIME
47b24b9d8a208cf8c621e5bb1088c61fcf507af6
[ "BSD-3-Clause" ]
39
2019-06-18T21:44:58.000Z
2022-01-12T14:47:01.000Z
configs/pipelines/templates/detector_mmdet.py
Kitware/VAIME
47b24b9d8a208cf8c621e5bb1088c61fcf507af6
[ "BSD-3-Clause" ]
40
2016-08-23T21:44:17.000Z
2019-04-20T23:39:53.000Z
# model settings model = dict( type='CascadeRCNN', pretrained='pytorch_resnext101.pth', backbone=dict( type='ResNeXt', depth=101, groups=32, base_width=4, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', require...
32.726563
79
0.520411
model = dict( type='CascadeRCNN', pretrained='pytorch_resnext101.pth', backbone=dict( type='ResNeXt', depth=101, groups=32, base_width=4, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=True), ...
false
true
f7337c2653fedb575c0e39cee804d8a17992b3b1
86
py
Python
marquee/signals.py
garyjohnson/marquee
ed0379d50b10827179ec22937bdf1ec659651c89
[ "MIT" ]
null
null
null
marquee/signals.py
garyjohnson/marquee
ed0379d50b10827179ec22937bdf1ec659651c89
[ "MIT" ]
null
null
null
marquee/signals.py
garyjohnson/marquee
ed0379d50b10827179ec22937bdf1ec659651c89
[ "MIT" ]
null
null
null
SHOW_MARQUEE = "SHOW_MARQUEE" SHOW_WINDOW = "SHOW_WINDOW" HIDE_WINDOW = "HIDE_WINDOW"
21.5
29
0.790698
SHOW_MARQUEE = "SHOW_MARQUEE" SHOW_WINDOW = "SHOW_WINDOW" HIDE_WINDOW = "HIDE_WINDOW"
true
true
f7337c398a7271a3f1ad168aba4bf8992569a715
990
py
Python
Estrutura While - Eric e Rafaela/Q04 - Eric e Rafaela.py
RafaelaBF/Exercicios_Python_Grupo
03b983ab8b481fb7cdaf1bc9b84bb1c399abf538
[ "MIT" ]
2
2021-11-09T12:57:23.000Z
2021-11-09T12:57:31.000Z
Estrutura While - Eric e Rafaela/Q04 - Eric e Rafaela.py
Ericcastell/Exercicios_Python_Grupo
1581610bfa8905bc7e157fc8beb6c0efe103889e
[ "MIT" ]
null
null
null
Estrutura While - Eric e Rafaela/Q04 - Eric e Rafaela.py
Ericcastell/Exercicios_Python_Grupo
1581610bfa8905bc7e157fc8beb6c0efe103889e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @author: Rafaela e Eric """ ''' Questão 4: Faça um programa que leia um número inteiro positivo e em seguida monte a figura abaixo. (Não utilize vetor) Exemplo: Se o número digitado for n=0. Deverá aparecer na tela: * Se o número digitado for n=1. Deverá aparecer na tela: * * Se o n...
18.679245
120
0.505051
n = int(input("Entre com um número: ")) n1 = 1 n2 = 1 i = 0 while (i < n+1): n3 = n1+n2 n1 = n2 n2 = n3 i += 1 maior = n2-n1 auxmaior = n1-maior i=0 while (i < n+1): x = maior fat = 1 while (x > 1): fat*=x x-=1 print("*" * fat) y = maior maior = auxmaior auxm...
true
true
f7337d4ccc29cc699a347717a8b85238dc37a3e8
47
py
Python
zlzzlzz2l/0208/2741.py
Kwak-JunYoung/154Algoritm-5weeks
fa18ae5f68a1ee722a30a05309214247f7fbfda4
[ "MIT" ]
3
2022-01-24T03:06:32.000Z
2022-01-30T08:43:58.000Z
zlzzlzz2l/0208/2741.py
Kwak-JunYoung/154Algoritm-5weeks
fa18ae5f68a1ee722a30a05309214247f7fbfda4
[ "MIT" ]
null
null
null
zlzzlzz2l/0208/2741.py
Kwak-JunYoung/154Algoritm-5weeks
fa18ae5f68a1ee722a30a05309214247f7fbfda4
[ "MIT" ]
2
2022-01-24T02:27:40.000Z
2022-01-30T08:57:03.000Z
for i in range(1, int(input())+1): print(i)
23.5
34
0.574468
for i in range(1, int(input())+1): print(i)
true
true
f7337f3e34d5b0e084b19c191435b6059b7623b7
275
py
Python
class.py
maverick1599/CodeShot
a0c895d85b9b91931e5a252362e6f5c458328ae5
[ "MIT" ]
1
2020-11-15T14:58:53.000Z
2020-11-15T14:58:53.000Z
class.py
hDmtP/CodeShot
55ed95598fd1983436ce2032476010427928c5fc
[ "MIT" ]
1
2019-10-14T02:47:49.000Z
2019-10-14T02:47:49.000Z
class.py
hDmtP/CodeShot
55ed95598fd1983436ce2032476010427928c5fc
[ "MIT" ]
4
2019-10-06T05:51:18.000Z
2021-10-17T08:44:41.000Z
class Point: def __init__(self, x=0, y=0): self.x = x self.y = y def __str__(self): return "({0},{1})".format(self.x, self.y) def __add__(self, other): x = self.x + other.x y = self.y + other.y return Point(x, y)
21.153846
49
0.490909
class Point: def __init__(self, x=0, y=0): self.x = x self.y = y def __str__(self): return "({0},{1})".format(self.x, self.y) def __add__(self, other): x = self.x + other.x y = self.y + other.y return Point(x, y)
true
true
f7337f6ada4e726fd16d405b68ab684379f9d5ab
1,878
py
Python
src/main/python/systemds/operator/algorithm/builtin/lasso.py
dkerschbaumer/systemds
dc3a9f489951d7e13ec47c5181d2c5d7022665ce
[ "Apache-2.0" ]
null
null
null
src/main/python/systemds/operator/algorithm/builtin/lasso.py
dkerschbaumer/systemds
dc3a9f489951d7e13ec47c5181d2c5d7022665ce
[ "Apache-2.0" ]
null
null
null
src/main/python/systemds/operator/algorithm/builtin/lasso.py
dkerschbaumer/systemds
dc3a9f489951d7e13ec47c5181d2c5d7022665ce
[ "Apache-2.0" ]
null
null
null
# ------------------------------------------------------------- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you unde...
38.326531
110
0.702343
from typing import Dict, Iterable from systemds.operator import OperationNode from systemds.script_building.dag import OutputType from systemds.utils.consts import VALID_INPUT_TYPES def lasso(X: OperationNode, y: OperationNode, **kwargs: Dict[str, VALID_INPUT_TYPES]) -> OperationNode: ...
true
true
f7338010ef40975077e4884f3ec3a8f8e841322c
10,916
py
Python
hypothesis/openannotation/elem_match.py
FrankensteinVariorum/fv-data
2162770b06692da3b715c89f52eed5123c958979
[ "Unlicense" ]
2
2018-10-19T21:28:42.000Z
2018-10-22T06:07:17.000Z
hypothesis/openannotation/elem_match.py
PghFrankenstein/fv-data
2162770b06692da3b715c89f52eed5123c958979
[ "Unlicense" ]
19
2018-10-17T22:07:28.000Z
2019-07-06T20:29:53.000Z
hypothesis/openannotation/elem_match.py
FrankensteinVariorum/fv-data
2162770b06692da3b715c89f52eed5123c958979
[ "Unlicense" ]
null
null
null
""" Map p elements from hypothesis annotation pointers to XML ids in the collation chunk XML """ import json import re import warnings from glob import glob from os import path from lxml import etree, html from itertools import groupby class Annotation: def __init__(self, js): self.data = json.loads(js) ...
32.585075
114
0.5393
import json import re import warnings from glob import glob from os import path from lxml import etree, html from itertools import groupby class Annotation: def __init__(self, js): self.data = json.loads(js) self.witness = re.match( r".+Frankenstein_(.+)\.html", self.data["target"][0]...
true
true
f73380a44ac62c7125491bfa10cbafd2c518d561
1,702
py
Python
zerver/management/commands/delete_old_unclaimed_attachments.py
cozyrohan/zulip
909b484d648cdabc8854dbf8f33e92dda4876968
[ "Apache-2.0" ]
2
2021-02-02T01:29:32.000Z
2021-02-02T01:30:51.000Z
zerver/management/commands/delete_old_unclaimed_attachments.py
cozyrohan/zulip
909b484d648cdabc8854dbf8f33e92dda4876968
[ "Apache-2.0" ]
1
2021-01-07T15:28:54.000Z
2021-01-08T15:38:45.000Z
zerver/management/commands/delete_old_unclaimed_attachments.py
cozyrohan/zulip
909b484d648cdabc8854dbf8f33e92dda4876968
[ "Apache-2.0" ]
1
2020-12-03T17:08:44.000Z
2020-12-03T17:08:44.000Z
from argparse import ArgumentParser from typing import Any from django.core.management.base import BaseCommand, CommandError from zerver.lib.actions import do_delete_old_unclaimed_attachments from zerver.models import get_old_unclaimed_attachments class Command(BaseCommand): help = """Remove unclaimed attachmen...
40.52381
90
0.634548
from argparse import ArgumentParser from typing import Any from django.core.management.base import BaseCommand, CommandError from zerver.lib.actions import do_delete_old_unclaimed_attachments from zerver.models import get_old_unclaimed_attachments class Command(BaseCommand): help = """Remove unclaimed attachmen...
true
true
f73380b341c5fa85ff56206ba6036092064aa04f
981
py
Python
orchestra/contrib/bills/serializers.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
68
2015-02-09T10:28:44.000Z
2022-03-12T11:08:36.000Z
orchestra/contrib/bills/serializers.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
17
2015-05-01T18:10:03.000Z
2021-03-19T21:52:55.000Z
orchestra/contrib/bills/serializers.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
29
2015-03-31T04:51:03.000Z
2022-02-17T02:58:50.000Z
from rest_framework import serializers from orchestra.api import router from orchestra.contrib.accounts.models import Account from orchestra.contrib.accounts.serializers import AccountSerializerMixin from .models import Bill, BillLine, BillContact class BillLineSerializer(serializers.HyperlinkedModelSerializer): ...
28.028571
86
0.704383
from rest_framework import serializers from orchestra.api import router from orchestra.contrib.accounts.models import Account from orchestra.contrib.accounts.serializers import AccountSerializerMixin from .models import Bill, BillLine, BillContact class BillLineSerializer(serializers.HyperlinkedModelSerializer): ...
true
true
f73380dc833787ad16db5e30fbd5be44452f83be
1,894
py
Python
Home/views.py
poppingpixel/DjangoWebsite.io
5c8a1637333a9856bdb7785016a5d8c650eab76e
[ "Apache-2.0" ]
null
null
null
Home/views.py
poppingpixel/DjangoWebsite.io
5c8a1637333a9856bdb7785016a5d8c650eab76e
[ "Apache-2.0" ]
null
null
null
Home/views.py
poppingpixel/DjangoWebsite.io
5c8a1637333a9856bdb7785016a5d8c650eab76e
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render,redirect from django.http import HttpResponse , HttpResponseRedirect from django.contrib.auth.models import User , auth from django.contrib.auth import authenticate , login , logout from django.contrib import messages def home(request): return render(request,'home.html') def h...
30.548387
71
0.628828
from django.shortcuts import render,redirect from django.http import HttpResponse , HttpResponseRedirect from django.contrib.auth.models import User , auth from django.contrib.auth import authenticate , login , logout from django.contrib import messages def home(request): return render(request,'home.html') def h...
true
true
f73381290c29669886f42993b098e5b1d70cdb2c
1,834
py
Python
xor_gate_nn/datasets/keras_fn/datasets.py
AI-Huang/XOR_Gate_NN
d97c7fd7e5b046e84bd862081ab800b9ccbb1672
[ "MIT" ]
null
null
null
xor_gate_nn/datasets/keras_fn/datasets.py
AI-Huang/XOR_Gate_NN
d97c7fd7e5b046e84bd862081ab800b9ccbb1672
[ "MIT" ]
null
null
null
xor_gate_nn/datasets/keras_fn/datasets.py
AI-Huang/XOR_Gate_NN
d97c7fd7e5b046e84bd862081ab800b9ccbb1672
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Date : Feb-09-21 22:23 # @Author : Kelly Hwong (dianhuangkan@gmail.com) import numpy as np import tensorflow as tf class XOR_Dataset(tf.keras.utils.Sequence): """XOR_Dataset.""" def __init__( self, batch_size=1, shuffle=False, ...
24.131579
77
0.558888
import numpy as np import tensorflow as tf class XOR_Dataset(tf.keras.utils.Sequence): def __init__( self, batch_size=1, shuffle=False, seed=42, ): self.X = np.array([[0, 0], [0, 1], [1, 0], [1, 1]]) self.y = np.array([[0], [1], [1], [0]]) assert...
true
true
f73382abafc05d4a3cfa356e78df80f0a7b037f9
23,188
py
Python
jax/experimental/loops.py
austinpeel/jax
1e625dd3483fea07b65a7a6f701194e20f66cf45
[ "ECL-2.0", "Apache-2.0" ]
1
2020-11-17T13:36:58.000Z
2020-11-17T13:36:58.000Z
jax/experimental/loops.py
hanxiao/jax
ca766caa02296023bd6714bb7fdba064a45e2258
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax/experimental/loops.py
hanxiao/jax
ca766caa02296023bd6714bb7fdba064a45e2258
[ "ECL-2.0", "Apache-2.0" ]
1
2020-07-17T18:17:31.000Z
2020-07-17T18:17:31.000Z
# Copyright 2019 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 to in writing, ...
40.256944
92
0.681732
import copy from functools import partial import itertools import numpy as np import traceback from typing import Any, List, cast from jax import abstract_arrays from jax import lax, core from jax._src.lax import control_flow as lax_control_flow from jax import tree_util from jax import numpy as jnp fr...
true
true
f733841869f54feb20f297d8835240a7d14283ae
6,767
py
Python
python/ccxt/paymium.py
born2net/ccxt
9995e50ca28513b9a68f774a3517f2c396cc0001
[ "MIT" ]
null
null
null
python/ccxt/paymium.py
born2net/ccxt
9995e50ca28513b9a68f774a3517f2c396cc0001
[ "MIT" ]
null
null
null
python/ccxt/paymium.py
born2net/ccxt
9995e50ca28513b9a68f774a3517f2c396cc0001
[ "MIT" ]
1
2018-08-09T18:11:13.000Z
2018-08-09T18:11:13.000Z
# -*- coding: utf-8 -*- from ccxt.base.exchange import Exchange from ccxt.base.errors import ExchangeError class paymium (Exchange): def describe(self): return self.deep_extend(super(paymium, self).describe(), { 'id': 'paymium', 'name': 'Paymium', 'countries': ['FR', ...
37.181319
126
0.468745
from ccxt.base.exchange import Exchange from ccxt.base.errors import ExchangeError class paymium (Exchange): def describe(self): return self.deep_extend(super(paymium, self).describe(), { 'id': 'paymium', 'name': 'Paymium', 'countries': ['FR', 'EU'], 'rat...
true
true
f73384e456231ad7a7678d4ca1fe73ee0e67c76d
15,512
py
Python
04dnn_hmm/02_train_dnn.py
ko-ya346/python_asr
251d8a4ff810fbeb5f7b63229139944195ab7cb5
[ "MIT" ]
null
null
null
04dnn_hmm/02_train_dnn.py
ko-ya346/python_asr
251d8a4ff810fbeb5f7b63229139944195ab7cb5
[ "MIT" ]
null
null
null
04dnn_hmm/02_train_dnn.py
ko-ya346/python_asr
251d8a4ff810fbeb5f7b63229139944195ab7cb5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # DNNを学習します. # # Pytorchを用いた処理に必要なモジュールをインポート import torch import torch.nn as nn from torch.utils.data import DataLoader from torch import optim # 作成したDatasetクラスをインポート from my_dataset import SequenceDataset # 数値演算用モジュール(numpy)をインポート import numpy as np # プロット用モジュール(matplotlib)をインポート import...
30.356164
63
0.485237
import torch import torch.nn as nn from torch.utils.data import DataLoader from torch import optim from my_dataset import SequenceDataset import numpy as np import matplotlib.pyplot as plt from hmmfunc import MonoPhoneHMM from my_model import MyDNN import json import os import sys import shutil ...
true
true
f73386d2c279e30707cf30922d7659e632ef1eb0
637
py
Python
tests/v3_certificate_validation/test_unit_issuance_date.py
KhoiUna/cert-issuer
a51608a98033be4fca88df6d3708c98baba2907c
[ "MIT" ]
356
2016-09-15T18:41:24.000Z
2022-03-17T19:55:10.000Z
tests/v3_certificate_validation/test_unit_issuance_date.py
KhoiUna/cert-issuer
a51608a98033be4fca88df6d3708c98baba2907c
[ "MIT" ]
118
2016-10-10T20:41:56.000Z
2022-03-31T15:23:30.000Z
tests/v3_certificate_validation/test_unit_issuance_date.py
KhoiUna/cert-issuer
a51608a98033be4fca88df6d3708c98baba2907c
[ "MIT" ]
205
2016-09-16T17:53:30.000Z
2022-03-27T18:26:20.000Z
import unittest from cert_issuer.models import validate_issuance_date class UnitValidationV3 (unittest.TestCase): def test_validate_issuance_date_invalid_RFC3339 (self): candidate = '20200202' try: validate_issuance_date(candidate) except: assert True re...
22.75
59
0.634223
import unittest from cert_issuer.models import validate_issuance_date class UnitValidationV3 (unittest.TestCase): def test_validate_issuance_date_invalid_RFC3339 (self): candidate = '20200202' try: validate_issuance_date(candidate) except: assert True re...
true
true
f733874f4cb4ca7c6f79942d29040359a26a6ba2
849
py
Python
ObjectOrientedPython/StaticAndLocalVariables.py
dsabhrawal/python-examples
55b3dd6c9fd0b992bcfe3422765dc80fb143a54b
[ "MIT" ]
1
2020-03-01T17:24:20.000Z
2020-03-01T17:24:20.000Z
ObjectOrientedPython/StaticAndLocalVariables.py
dsabhrawal/python-examples
55b3dd6c9fd0b992bcfe3422765dc80fb143a54b
[ "MIT" ]
null
null
null
ObjectOrientedPython/StaticAndLocalVariables.py
dsabhrawal/python-examples
55b3dd6c9fd0b992bcfe3422765dc80fb143a54b
[ "MIT" ]
null
null
null
# Static variables are class level variables # Static variables are always referenced by class name # Local variables are local to methods class Student: school = 'PQR' #Static variable def __init__(self,name,roll,section): super().__init__() self.name = name #Instance variable self.r...
32.653846
71
0.654888
class Student: school = 'PQR' def __init__(self,name,roll,section): super().__init__() self.name = name self.roll = roll self.section = section def display(self): school = 'Local School' print('Name of student: ',self.name) print('Roll No ...
true
true
f733887788b82f8be36163aa08a254e9e20ada0c
3,592
py
Python
certbot_plugin_gandi/gandi_api.py
treydock/certbot-plugin-gandi
773e0da99b361305a32822dac124452d2f78b24d
[ "MIT" ]
null
null
null
certbot_plugin_gandi/gandi_api.py
treydock/certbot-plugin-gandi
773e0da99b361305a32822dac124452d2f78b24d
[ "MIT" ]
null
null
null
certbot_plugin_gandi/gandi_api.py
treydock/certbot-plugin-gandi
773e0da99b361305a32822dac124452d2f78b24d
[ "MIT" ]
null
null
null
import requests import urllib from collections import namedtuple from certbot.plugins import dns_common try: from urllib import quote # Python 2.X except ImportError: from urllib.parse import quote # Python 3+ _GandiConfig = namedtuple('_GandiConfig', ('api_key',)) _BaseDomain = namedtuple('_BaseDomain', ('...
28.0625
78
0.663419
import requests import urllib from collections import namedtuple from certbot.plugins import dns_common try: from urllib import quote except ImportError: from urllib.parse import quote _GandiConfig = namedtuple('_GandiConfig', ('api_key',)) _BaseDomain = namedtuple('_BaseDomain', ('zone_uuid', 'fqdn')) ...
true
true
f73388a718dc5103b5644663388ec3af653ac9b9
1,701
py
Python
app/core/migrations/0001_initial.py
LiMichael1/RecipeAPI
ef3bd0a1223277712cf5f6996f9f627c6e4c9339
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
LiMichael1/RecipeAPI
ef3bd0a1223277712cf5f6996f9f627c6e4c9339
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
LiMichael1/RecipeAPI
ef3bd0a1223277712cf5f6996f9f627c6e4c9339
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-05-24 19:49 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='User', f...
50.029412
266
0.637272
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.AutoField...
true
true
f7338924a05e595dd854c107878cfbdff8e4e5fe
12,939
py
Python
build/go/build.py
EnderNightLord-ChromeBook/zircon-rpi
b09b1eb3aa7a127c65568229fe10edd251869283
[ "BSD-2-Clause" ]
1
2020-12-29T17:07:06.000Z
2020-12-29T17:07:06.000Z
build/go/build.py
DamieFC/fuchsia
f78a4a1326f4a4bb5834500918756173c01bab4f
[ "BSD-2-Clause" ]
null
null
null
build/go/build.py
DamieFC/fuchsia
f78a4a1326f4a4bb5834500918756173c01bab4f
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3.8 # Copyright 2017 The Fuchsia Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Build script for a Go app. import argparse import os import subprocess import sys import string import shutil import errno from g...
36.863248
90
0.568359
import argparse import os import subprocess import sys import string import shutil import errno from gen_library_metadata import get_sources def main(): parser = argparse.ArgumentParser() parser.add_argument( '--godepfile', help='Path to godepfile tool', required=True) parser.add_argument(...
true
true
f73389366327068d6dbba416f0132cddf5ec3000
1,207
py
Python
dev_tools/test_pattern.py
SocialSisterYi/Alconna
3e1d986ca5486dfd3c7bd80118a75364ab6831b8
[ "MIT" ]
null
null
null
dev_tools/test_pattern.py
SocialSisterYi/Alconna
3e1d986ca5486dfd3c7bd80118a75364ab6831b8
[ "MIT" ]
null
null
null
dev_tools/test_pattern.py
SocialSisterYi/Alconna
3e1d986ca5486dfd3c7bd80118a75364ab6831b8
[ "MIT" ]
null
null
null
from arclet.alconna.types import ObjectPattern, add_check, ArgPattern, PatternToken from arclet.alconna import AlconnaFire from graia.ariadne.message.chain import MessageChain from graia.ariadne.message.element import Plain, Image, At, MusicShare from graia.ariadne.app import Ariadne, MiraiSession bot = Ariadne(connec...
48.28
287
0.74565
from arclet.alconna.types import ObjectPattern, add_check, ArgPattern, PatternToken from arclet.alconna import AlconnaFire from graia.ariadne.message.chain import MessageChain from graia.ariadne.message.element import Plain, Image, At, MusicShare from graia.ariadne.app import Ariadne, MiraiSession bot = Ariadne(connec...
true
true
f73389df235a94a0c337a0c36489840ae2883f92
252
py
Python
tests/unit/test_algorithms_dsatuto.py
gauthier-emse/pyDcop
a51cc3f7d8ef9ee1f863beeca4ad60490862d2ed
[ "BSD-3-Clause" ]
28
2018-05-18T10:25:58.000Z
2022-03-05T16:24:15.000Z
tests/unit/test_algorithms_dsatuto.py
gauthier-emse/pyDcop
a51cc3f7d8ef9ee1f863beeca4ad60490862d2ed
[ "BSD-3-Clause" ]
19
2018-09-21T21:50:15.000Z
2022-02-22T20:23:32.000Z
tests/unit/test_algorithms_dsatuto.py
gauthier-emse/pyDcop
a51cc3f7d8ef9ee1f863beeca4ad60490862d2ed
[ "BSD-3-Clause" ]
17
2018-05-29T19:54:07.000Z
2022-02-22T20:14:46.000Z
from importlib import import_module from pydcop.algorithms import AlgorithmDef, ComputationDef, load_algorithm_module from pydcop.computations_graph.constraints_hypergraph import \ VariableComputationNode from pydcop.dcop.objects import Variable
31.5
81
0.869048
from importlib import import_module from pydcop.algorithms import AlgorithmDef, ComputationDef, load_algorithm_module from pydcop.computations_graph.constraints_hypergraph import \ VariableComputationNode from pydcop.dcop.objects import Variable
true
true
f7338a76697ba4e87c7780dbe95880201fde6819
75
py
Python
vertigo/datasets/__init__.py
rmarkello/vertigo
35c79faf3a62b9b3941f0c989640c2f5de8f819e
[ "Apache-2.0" ]
null
null
null
vertigo/datasets/__init__.py
rmarkello/vertigo
35c79faf3a62b9b3941f0c989640c2f5de8f819e
[ "Apache-2.0" ]
null
null
null
vertigo/datasets/__init__.py
rmarkello/vertigo
35c79faf3a62b9b3941f0c989640c2f5de8f819e
[ "Apache-2.0" ]
null
null
null
__all__ = [ 'fetch_fsaverage' ] from .fetchers import fetch_fsaverage
12.5
37
0.733333
__all__ = [ 'fetch_fsaverage' ] from .fetchers import fetch_fsaverage
true
true
f7338ac94d4fb8af8870a4afc13f0019a80d21c6
2,417
py
Python
setup.py
Alymostafa/torch-cam
3f30f0db90fba1b921dbe71e979001c954d245da
[ "MIT" ]
1
2020-11-17T18:20:56.000Z
2020-11-17T18:20:56.000Z
setup.py
Alymostafa/torch-cam
3f30f0db90fba1b921dbe71e979001c954d245da
[ "MIT" ]
null
null
null
setup.py
Alymostafa/torch-cam
3f30f0db90fba1b921dbe71e979001c954d245da
[ "MIT" ]
1
2021-01-04T20:28:20.000Z
2021-01-04T20:28:20.000Z
#!usr/bin/python # -*- coding: utf-8 -*- """ Package installation setup """ import os import subprocess from setuptools import find_packages, setup version = '0.1.2a0' sha = 'Unknown' package_name = 'torchcam' cwd = os.path.dirname(os.path.abspath(__file__)) try: sha = subprocess.check_output(['git', 'rev-par...
27.781609
96
0.639222
import os import subprocess from setuptools import find_packages, setup version = '0.1.2a0' sha = 'Unknown' package_name = 'torchcam' cwd = os.path.dirname(os.path.abspath(__file__)) try: sha = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=cwd).decode('ascii').strip() except Exception: pass ...
true
true
f7338b27cafceb5086af9c433c59de1f6156099b
81,197
py
Python
sphinx/writers/latex.py
hkuno/sphinx
d62220676d38f8d588fb59f92c3169385e94ad00
[ "BSD-2-Clause" ]
2
2015-02-05T13:09:34.000Z
2015-06-24T19:39:03.000Z
sphinx/writers/latex.py
jfbu/sphinx
d62220676d38f8d588fb59f92c3169385e94ad00
[ "BSD-2-Clause" ]
1
2016-06-14T07:25:48.000Z
2016-06-14T07:25:48.000Z
sphinx/writers/latex.py
jfbu/sphinx
d62220676d38f8d588fb59f92c3169385e94ad00
[ "BSD-2-Clause" ]
1
2020-07-14T15:46:16.000Z
2020-07-14T15:46:16.000Z
""" sphinx.writers.latex ~~~~~~~~~~~~~~~~~~~~ Custom docutils writer for LaTeX. Much of this code is adapted from Dave Kuhlman's "docpy" writer from his docutils sandbox. :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import r...
39.550414
95
0.567841
import re import warnings from collections import defaultdict from os import path from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Set, Tuple, cast from docutils import nodes, writers from docutils.nodes import Element, Node, Text from sphinx import addnodes, highlighting from sphinx.deprecation import R...
true
true
f7338bd5fc8ce08c189fae86311d7c3e1e17a4f7
215
py
Python
muse_score_pdf_exporter.py
kwitee/MuseScoreAutoExporter
d1d3050b73787a8ae2a26b4969480cbcf60abfa1
[ "MIT" ]
null
null
null
muse_score_pdf_exporter.py
kwitee/MuseScoreAutoExporter
d1d3050b73787a8ae2a26b4969480cbcf60abfa1
[ "MIT" ]
null
null
null
muse_score_pdf_exporter.py
kwitee/MuseScoreAutoExporter
d1d3050b73787a8ae2a26b4969480cbcf60abfa1
[ "MIT" ]
null
null
null
import sys from common import * def main(muse_score_path, directory_path): muse_score_export(muse_score_path, directory_path, OutputFormat.pdf) if __name__ == "__main__": main(sys.argv[1], sys.argv[2])
17.916667
72
0.744186
import sys from common import * def main(muse_score_path, directory_path): muse_score_export(muse_score_path, directory_path, OutputFormat.pdf) if __name__ == "__main__": main(sys.argv[1], sys.argv[2])
true
true
f7338c79c2a36b79835f2421455db0c575892ca0
395
py
Python
docs/components_page/components/spinner/simple.py
glsdown/dash-bootstrap-components
0ebea4f7de43975f6e3a2958359c4480ae1d4927
[ "Apache-2.0" ]
776
2019-02-07T19:36:59.000Z
2022-03-31T05:53:04.000Z
docs/components_page/components/spinner/simple.py
glsdown/dash-bootstrap-components
0ebea4f7de43975f6e3a2958359c4480ae1d4927
[ "Apache-2.0" ]
350
2019-02-05T10:42:19.000Z
2022-03-31T19:23:35.000Z
docs/components_page/components/spinner/simple.py
glsdown/dash-bootstrap-components
0ebea4f7de43975f6e3a2958359c4480ae1d4927
[ "Apache-2.0" ]
219
2019-02-10T13:46:25.000Z
2022-03-23T17:03:39.000Z
import dash_bootstrap_components as dbc from dash import html spinners = html.Div( [ dbc.Spinner(color="primary"), dbc.Spinner(color="secondary"), dbc.Spinner(color="success"), dbc.Spinner(color="warning"), dbc.Spinner(color="danger"), dbc.Spinner(color="info"), ...
24.6875
39
0.602532
import dash_bootstrap_components as dbc from dash import html spinners = html.Div( [ dbc.Spinner(color="primary"), dbc.Spinner(color="secondary"), dbc.Spinner(color="success"), dbc.Spinner(color="warning"), dbc.Spinner(color="danger"), dbc.Spinner(color="info"), ...
true
true
f7338cfd399d2b0c39454b622b16d13949a6c4b0
4,484
py
Python
src/s2_put_skeleton_txts_to_a_single_txt.py
SilviaVec/Realtime-Action-Recognition
330a64fc1b2158b1884a1ee86b9cc875925fc121
[ "MIT" ]
null
null
null
src/s2_put_skeleton_txts_to_a_single_txt.py
SilviaVec/Realtime-Action-Recognition
330a64fc1b2158b1884a1ee86b9cc875925fc121
[ "MIT" ]
3
2020-06-08T14:22:36.000Z
2020-06-08T14:27:52.000Z
src/s2_put_skeleton_txts_to_a_single_txt.py
mmlab-cv/Realtime-Action-Recognition
330a64fc1b2158b1884a1ee86b9cc875925fc121
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 ''' Read multiple skeletons txts and saved them into a single txt. If an image doesn't have skeleton, discard it. If an image label is not `CLASSES`, discard it. Input: `skeletons/00001.txt` ~ `skeletons/xxxxx.txt` from `SRC_DETECTED_SKELETONS_FOLDER`. Output: `skeletons_i...
34.229008
97
0.662801
import numpy as np import simplejson import collections if True: import sys import os ROOT = os.path.dirname(os.path.abspath(__file__))+"/../" CURR_PATH = os.path.dirname(os.path.abspath(__file__))+"/" sys.path.append(ROOT) tils.lib_commons as lib_commons def par(path): return RO...
true
true
f7338d56e91bbfd73a238452f2b8f6fba056c9ac
190
py
Python
_celery/Celery/demo/celery_app/task2.py
yc19890920/ap
5df907afdeeea06befbb29c11f2bab8ff06efb16
[ "Apache-2.0" ]
1
2021-01-11T06:30:44.000Z
2021-01-11T06:30:44.000Z
_celery/Celery/demo/celery_app/task2.py
yc19890920/ap
5df907afdeeea06befbb29c11f2bab8ff06efb16
[ "Apache-2.0" ]
23
2020-02-12T02:35:49.000Z
2022-02-11T03:45:40.000Z
_celery/Celery/demo/celery_app/task2.py
yc19890920/ap
5df907afdeeea06befbb29c11f2bab8ff06efb16
[ "Apache-2.0" ]
2
2020-04-08T15:39:46.000Z
2020-10-10T10:13:09.000Z
# -*- coding: utf-8 -*- import time from celery_app import app @app.task @app.task(queue='test_celey_queue_multiply') def multiply(x, y): # time.sleep(0.02) return x * y
17.272727
45
0.631579
import time from celery_app import app @app.task @app.task(queue='test_celey_queue_multiply') def multiply(x, y): return x * y
true
true
f7338eebb28d83e5ed91ee4013c8eac11bcbfae5
352
py
Python
utils.py
schorrm/arm2riscv
5fa28e28d920705b660874a03b9906fae710b442
[ "MIT" ]
8
2020-07-07T13:08:26.000Z
2022-03-29T23:12:37.000Z
utils.py
schorrm/arm2riscv
5fa28e28d920705b660874a03b9906fae710b442
[ "MIT" ]
2
2020-04-05T07:17:22.000Z
2021-06-27T22:33:25.000Z
utils.py
schorrm/arm2riscv
5fa28e28d920705b660874a03b9906fae710b442
[ "MIT" ]
1
2021-06-19T12:38:45.000Z
2021-06-19T12:38:45.000Z
#!/usr/bin/python3 class InstructionNotRecognized(Exception): ''' Exception to throw when an instruction does not have defined conversion code ''' pass reg_labels = """ .section .tdata REG_BANK: .dword 0 .dword 0 .dword 0 .dword 0 .dword 0 .dword 0 ...
19.555556
88
0.5625
class InstructionNotRecognized(Exception): pass reg_labels = """ .section .tdata REG_BANK: .dword 0 .dword 0 .dword 0 .dword 0 .dword 0 .dword 0 .dword 0 .dword 0 """
true
true
f7338f6dd3f181e895e19eec66ca21d59cbbdafa
14,786
py
Python
Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
6
2021-07-05T16:09:39.000Z
2022-03-06T22:44:42.000Z
Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
7
2022-03-15T13:25:39.000Z
2022-03-15T13:25:44.000Z
Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 2014-2018 Apple Inc. All rights reserved. # Copyright (c) 2014 University of Washington. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistribution...
44.269461
148
0.653524
import logging import os.path import re try: from .generator import ucfirst, Generator from .models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks except ValueError: from generator import ucfirst, Generator from models import PrimitiveType, Obje...
true
true
f73390ff913ad0d3db1ad7b68b7cc2ba3cb10194
3,815
py
Python
keepercommander/custom/send_breachwatch_reminder.py
Keeper-Security/commander
93fee5d2ba56f2288e00ab33003597d00a302b5c
[ "MIT" ]
null
null
null
keepercommander/custom/send_breachwatch_reminder.py
Keeper-Security/commander
93fee5d2ba56f2288e00ab33003597d00a302b5c
[ "MIT" ]
null
null
null
keepercommander/custom/send_breachwatch_reminder.py
Keeper-Security/commander
93fee5d2ba56f2288e00ab33003597d00a302b5c
[ "MIT" ]
null
null
null
# _ __ # | |/ /___ ___ _ __ ___ _ _ ® # | ' </ -_) -_) '_ \/ -_) '_| # |_|\_\___\___| .__/\___|_| # |_| # # Keeper Commander # Copyright 2022 Keeper Security Inc. # Contact: commander@keepersecurity.com # # Example script to run a BreachWatch status report, parse the results, # and send users an email r...
34.0625
122
0.647182
# |_|\_\___\___| .__/\___|_| # |_| # # Keeper Commander # Copyright 2022 Keeper Security Inc. # Contact: commander@keepersecurity.com # # Example script to run a BreachWatch status report, parse the results, # and send users an email reminder to address their found issues. # # Note: SMTP credentials mus...
true
true
f73391199401e76d26dbccadc07847533bdcd32e
2,448
py
Python
wandb/vendor/graphql-core-1.1/graphql/pyutils/version.py
theodumont/client
7402ac67ada5bc8078078a49fd3e0cb4b6172307
[ "MIT" ]
3,968
2017-08-23T21:27:19.000Z
2022-03-31T22:00:19.000Z
wandb/vendor/graphql-core-1.1/graphql/pyutils/version.py
theodumont/client
7402ac67ada5bc8078078a49fd3e0cb4b6172307
[ "MIT" ]
2,725
2017-04-17T00:29:15.000Z
2022-03-31T21:01:53.000Z
wandb/vendor/graphql-core-1.1/graphql/pyutils/version.py
theodumont/client
7402ac67ada5bc8078078a49fd3e0cb4b6172307
[ "MIT" ]
351
2018-04-08T19:39:34.000Z
2022-03-30T19:38:08.000Z
from __future__ import unicode_literals import datetime import os import subprocess def get_version(version=None): "Returns a PEP 440-compliant version number from VERSION." version = get_complete_version(version) # Now build the two parts of the version number: # main = X.Y[.Z] # sub = .devN - ...
30.987342
80
0.640523
from __future__ import unicode_literals import datetime import os import subprocess def get_version(version=None): version = get_complete_version(version) main = get_main_version(version) sub = '' if version[3] == 'alpha' and version[4] == 0: git_changeset = get_git_cha...
true
true
f7339188525147d06d219cb552b6c1f3da5b7a37
503
py
Python
creten/indicators/StdDev.py
nardew/Creten
15ddb0b52e6f2afec2c79b3c731fccb34a2c63d6
[ "MIT" ]
9
2019-12-17T10:42:40.000Z
2021-12-02T23:07:05.000Z
creten/indicators/StdDev.py
nardew/Creten
15ddb0b52e6f2afec2c79b3c731fccb34a2c63d6
[ "MIT" ]
null
null
null
creten/indicators/StdDev.py
nardew/Creten
15ddb0b52e6f2afec2c79b3c731fccb34a2c63d6
[ "MIT" ]
6
2019-03-04T15:01:10.000Z
2022-01-12T23:22:55.000Z
from indicators.SingleValueIndicator import SingleValueIndicator from math import sqrt class StdDev(SingleValueIndicator): def __init__(self, period, timeSeries = None): super(StdDev, self).__init__() self.period = period self.initialize(timeSeries) def _calculate(self): if len(self.timeSeries) < self.per...
29.588235
108
0.745527
from indicators.SingleValueIndicator import SingleValueIndicator from math import sqrt class StdDev(SingleValueIndicator): def __init__(self, period, timeSeries = None): super(StdDev, self).__init__() self.period = period self.initialize(timeSeries) def _calculate(self): if len(self.timeSeries) < self.per...
true
true
f7339194cf76cb7005d56a755ff75b834296c7fd
21,029
py
Python
twisted/python/compat.py
hawkowl/twisted
c413aac3888dea2202c0dc26f978d7f88b4b837a
[ "Unlicense", "MIT" ]
null
null
null
twisted/python/compat.py
hawkowl/twisted
c413aac3888dea2202c0dc26f978d7f88b4b837a
[ "Unlicense", "MIT" ]
null
null
null
twisted/python/compat.py
hawkowl/twisted
c413aac3888dea2202c0dc26f978d7f88b4b837a
[ "Unlicense", "MIT" ]
null
null
null
# -*- test-case-name: twisted.test.test_compat -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Compatibility module to provide backwards compatibility for useful Python features. This is mainly for use of internal Twisted code. We encourage you to use the latest version of Python di...
26.090571
79
0.629369
from __future__ import absolute_import, division import inspect import os import platform import socket import string import struct import sys from types import MethodType as _MethodType from io import TextIOBase, IOBase if sys.version_info < (3, 0): _PY3 = False else: _PY3 = True if platform.python...
true
true
f73391bf5a7e433e31d3b050efc800afce4dbb19
1,202
py
Python
python/saddle-points/saddle_points.py
tamireinhorn/exercism
3ca78b262ad590b67c75c5d1cd83db02bc2d1e6e
[ "MIT" ]
null
null
null
python/saddle-points/saddle_points.py
tamireinhorn/exercism
3ca78b262ad590b67c75c5d1cd83db02bc2d1e6e
[ "MIT" ]
2
2021-12-18T16:31:51.000Z
2021-12-18T16:33:33.000Z
python/saddle-points/saddle_points.py
tamireinhorn/Exercism
3a3d5744e88ab4457df4e6ac20d772d8c50c43da
[ "MIT" ]
null
null
null
from copy import copy def saddle_points(matrix): if not matrix: return [] if len(set(map(len, matrix))) != 1: raise ValueError('irregular matrix') # Saddle point is a point where the element is the biggest in its row but the smallest in its column. # First off, I guess I'd create colum...
44.518519
137
0.634775
from copy import copy def saddle_points(matrix): if not matrix: return [] if len(set(map(len, matrix))) != 1: raise ValueError('irregular matrix') # We revert the matrix copy_matrix = [copy(row) for row in matrix[::-1]] columns = [[] for i in range(len(copy_matrix[0]))] ...
true
true
f7339222d0e6934c4e43bd1c184c8763ac7acd7c
2,410
py
Python
HackTheBox/Easy/Shocker/enum/ssh/45939.py
whatsyourask/vuln-boxes
25b53ccdf318634c0d9d57335c0973ffc2277500
[ "MIT" ]
null
null
null
HackTheBox/Easy/Shocker/enum/ssh/45939.py
whatsyourask/vuln-boxes
25b53ccdf318634c0d9d57335c0973ffc2277500
[ "MIT" ]
72
2021-06-17T21:20:46.000Z
2022-02-10T19:55:44.000Z
HackTheBox/Easy/Shocker/enum/ssh/45939.py
whatsyourask/vuln-boxes
25b53ccdf318634c0d9d57335c0973ffc2277500
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # CVE-2018-15473 SSH User Enumeration by Leap Security (@LeapSecurity) https://leapsecurity.io # Credits: Matthew Daley, Justin Gardner, Lee David Painter import argparse, logging, paramiko, socket, sys, os class InvalidUsername(Exception): pass # malicious function to malform p...
35.970149
113
0.734855
import argparse, logging, paramiko, socket, sys, os class InvalidUsername(Exception): pass def add_boolean(*args, **kwargs): pass old_service_accept = paramiko.auth_handler.AuthHandler._client_handler_table[ paramiko.common.MSG_SERVICE_ACCEPT] # malicious function to overwrite MS...
false
true
f7339293297efa587024ab7b9ae02ecf9e0013db
14,011
py
Python
platypush/plugins/media/mpv.py
RichardChiang/platypush
1777ebb0516118cdef20046a92caab496fa7c6cb
[ "MIT" ]
null
null
null
platypush/plugins/media/mpv.py
RichardChiang/platypush
1777ebb0516118cdef20046a92caab496fa7c6cb
[ "MIT" ]
null
null
null
platypush/plugins/media/mpv.py
RichardChiang/platypush
1777ebb0516118cdef20046a92caab496fa7c6cb
[ "MIT" ]
null
null
null
import os import threading from platypush.context import get_bus from platypush.plugins.media import PlayerState, MediaPlugin from platypush.message.event.media import MediaPlayEvent, MediaPlayRequestEvent, \ MediaPauseEvent, MediaStopEvent, NewPlayingMediaEvent, MediaSeekEvent from platypush.plugins import actio...
32.735981
117
0.593177
import os import threading from platypush.context import get_bus from platypush.plugins.media import PlayerState, MediaPlugin from platypush.message.event.media import MediaPlayEvent, MediaPlayRequestEvent, \ MediaPauseEvent, MediaStopEvent, NewPlayingMediaEvent, MediaSeekEvent from platypush.plugins import actio...
true
true
f7339296a259556a6062ae990caf0bcc72efd96e
1,061
py
Python
cride/users/models/profiles.py
ChekeGT/Comparte-Ride
cb30f1cb6cdafe81fd61ff7539ecaa39f3751353
[ "MIT" ]
1
2019-09-26T22:49:51.000Z
2019-09-26T22:49:51.000Z
cride/users/models/profiles.py
ChekeGT/Comparte-Ride
cb30f1cb6cdafe81fd61ff7539ecaa39f3751353
[ "MIT" ]
3
2021-06-08T22:54:10.000Z
2022-01-13T03:33:36.000Z
cride/users/models/profiles.py
ChekeGT/Comparte-Ride
cb30f1cb6cdafe81fd61ff7539ecaa39f3751353
[ "MIT" ]
null
null
null
"""Profile model and related models declaration.""" # Django from django.db import models # Models from cride.utils.models import CRideModel from cride.users.models import User class Profile(CRideModel): """Profile Model Declaration It's a proxy model to the user but its difference is that this one is...
23.065217
84
0.67295
from django.db import models from cride.utils.models import CRideModel from cride.users.models import User class Profile(CRideModel): user = models.OneToOneField(User, on_delete=models.CASCADE) picture = models.ImageField( upload_to='users/pictures/', blank=True, null=True )...
true
true
f7339354144b687c585f31b180384991e55d7608
1,270
py
Python
configs/classification/matching_net/mini_imagenet/matching-net_resnet12_1xb105_mini-imagenet_5way-5shot.py
BIGWangYuDong/mmfewshot
dac097afc92df176bc2de76b7c90968584865197
[ "Apache-2.0" ]
376
2021-11-23T13:29:57.000Z
2022-03-30T07:22:14.000Z
configs/classification/matching_net/mini_imagenet/matching-net_resnet12_1xb105_mini-imagenet_5way-5shot.py
BIGWangYuDong/mmfewshot
dac097afc92df176bc2de76b7c90968584865197
[ "Apache-2.0" ]
51
2021-11-23T14:45:08.000Z
2022-03-30T03:37:15.000Z
configs/classification/matching_net/mini_imagenet/matching-net_resnet12_1xb105_mini-imagenet_5way-5shot.py
BIGWangYuDong/mmfewshot
dac097afc92df176bc2de76b7c90968584865197
[ "Apache-2.0" ]
56
2021-11-23T14:02:27.000Z
2022-03-31T09:01:50.000Z
_base_ = [ '../../_base_/meta_test/mini-imagenet_meta-test_5way-5shot.py', '../../_base_/runtime/iter_based_runtime.py', '../../_base_/schedules/adam_100k_iter.py' ] img_size = 84 img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(...
30.97561
77
0.634646
_base_ = [ '../../_base_/meta_test/mini-imagenet_meta-test_5way-5shot.py', '../../_base_/runtime/iter_based_runtime.py', '../../_base_/schedules/adam_100k_iter.py' ] img_size = 84 img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(...
true
true
f733935b6223c301bbf13251c4a9f50ffb38b622
9,362
py
Python
numba/cuda/kernels/reduction.py
auderson/numba
3d67c9850ab56457f418cf40af6245fd9c337705
[ "BSD-2-Clause" ]
6,620
2015-01-04T08:51:04.000Z
2022-03-31T12:52:18.000Z
numba/cuda/kernels/reduction.py
auderson/numba
3d67c9850ab56457f418cf40af6245fd9c337705
[ "BSD-2-Clause" ]
6,457
2015-01-04T03:18:41.000Z
2022-03-31T17:38:42.000Z
numba/cuda/kernels/reduction.py
auderson/numba
3d67c9850ab56457f418cf40af6245fd9c337705
[ "BSD-2-Clause" ]
930
2015-01-25T02:33:03.000Z
2022-03-30T14:10:32.000Z
""" A library written in CUDA Python for generating reduction kernels """ from numba.np.numpy_support import from_dtype _WARPSIZE = 32 _NUMWARPS = 4 def _gpu_reduce_factory(fn, nbtype): from numba import cuda reduce_op = cuda.jit(device=True)(fn) inner_sm_size = _WARPSIZE + 1 # plus one to avoid SM ...
35.596958
80
0.561739
from numba.np.numpy_support import from_dtype _WARPSIZE = 32 _NUMWARPS = 4 def _gpu_reduce_factory(fn, nbtype): from numba import cuda reduce_op = cuda.jit(device=True)(fn) inner_sm_size = _WARPSIZE + 1 max_blocksize = _NUMWARPS * _WARPSIZE @cuda.jit(device=True) def inner_warp_reducti...
true
true
f7339427a053d8f4b9965edf88dc8405e5ffbbd3
9,358
py
Python
pkg/pkg/stats/fisher_exact_nonunity.py
dlee0156/bilateral-connectome
26fe165341bb79379fecdd8bc5d7b5bfe3983fdc
[ "MIT" ]
null
null
null
pkg/pkg/stats/fisher_exact_nonunity.py
dlee0156/bilateral-connectome
26fe165341bb79379fecdd8bc5d7b5bfe3983fdc
[ "MIT" ]
null
null
null
pkg/pkg/stats/fisher_exact_nonunity.py
dlee0156/bilateral-connectome
26fe165341bb79379fecdd8bc5d7b5bfe3983fdc
[ "MIT" ]
null
null
null
from scipy.stats import nchypergeom_fisher import numpy as np def fisher_exact_nonunity(table, alternative="two-sided", null_odds=1): """Perform a Fisher exact test on a 2x2 contingency table. Parameters ---------- table : array_like of ints A 2x2 contingency table. Elements must be non-negat...
41.22467
80
0.565292
from scipy.stats import nchypergeom_fisher import numpy as np def fisher_exact_nonunity(table, alternative="two-sided", null_odds=1): dist = nchypergeom_fisher c = np.asarray(table, dtype=np.int64) if not c.shape == (2, 2): raise ValueError("The input `table` must be of shape (2, 2).") ...
true
true
f733950fa6f5f5f02c90aca71819e98db7ea1158
27,241
py
Python
sanic/request.py
aericson/sanic
4a416e177aa5037ba9436e53f531631707e87ea7
[ "MIT" ]
null
null
null
sanic/request.py
aericson/sanic
4a416e177aa5037ba9436e53f531631707e87ea7
[ "MIT" ]
null
null
null
sanic/request.py
aericson/sanic
4a416e177aa5037ba9436e53f531631707e87ea7
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import ( TYPE_CHECKING, Any, DefaultDict, Dict, List, NamedTuple, Optional, Tuple, Union, ) from sanic_routing.route import Route # type: ignore from sanic.models.http_types import Credentials if TYPE_CHECKING: # no cov from s...
31.712456
79
0.574538
from __future__ import annotations from typing import ( TYPE_CHECKING, Any, DefaultDict, Dict, List, NamedTuple, Optional, Tuple, Union, ) from sanic_routing.route import Route from sanic.models.http_types import Credentials if TYPE_CHECKING: from sanic.server import Con...
true
true
f733955e890eb485d0b5a2d7a9e0ecde1d990814
4,990
py
Python
sg_sr/sr_data/sr_cplx/svd/cpxrbm.py
JunaidAkhter/vmc_jax
4f0dcc9f32cb6885cad3c5d797d9f9e01247f737
[ "MIT" ]
null
null
null
sg_sr/sr_data/sr_cplx/svd/cpxrbm.py
JunaidAkhter/vmc_jax
4f0dcc9f32cb6885cad3c5d797d9f9e01247f737
[ "MIT" ]
null
null
null
sg_sr/sr_data/sr_cplx/svd/cpxrbm.py
JunaidAkhter/vmc_jax
4f0dcc9f32cb6885cad3c5d797d9f9e01247f737
[ "MIT" ]
null
null
null
import sys # Find jVMC package #sys.path.append("/Users/akhter/githesis-/jvmc/vmc_jax") sys.path.append("/Users/akhter/thesis/vmc_jax") import jax from jax.config import config config.update("jax_enable_x64", True) import jax.random as random import jax.numpy as jnp import numpy as np from jax.tree_util import tree_...
34.178082
119
0.672545
import sys sys.path.append("/Users/akhter/thesis/vmc_jax") import jax from jax.config import config config.update("jax_enable_x64", True) import jax.random as random import jax.numpy as jnp import numpy as np from jax.tree_util import tree_flatten, tree_unflatten import jVMC import tensornetwork as tn tn.set_defa...
true
true
f733965676db0cd299d017c3fa2104464e3702c7
65
py
Python
src/DREAMPlace/dreamplace/ops/lp_dp/lpdp_flow/__init__.py
lbz007/rectanglequery
59d6eb007bf65480fa3e9245542d0b6071f81831
[ "BSD-3-Clause" ]
1
2021-01-01T23:39:02.000Z
2021-01-01T23:39:02.000Z
src/DREAMPlace/dreamplace/ops/lp_dp/lpdp_flow/__init__.py
zoumingzhe/OpenEDA
e87867044b495e40d4276756a6cb13bb38fe49a9
[ "BSD-3-Clause" ]
null
null
null
src/DREAMPlace/dreamplace/ops/lp_dp/lpdp_flow/__init__.py
zoumingzhe/OpenEDA
e87867044b495e40d4276756a6cb13bb38fe49a9
[ "BSD-3-Clause" ]
null
null
null
## # @file __init__.py # @author Zhou Fei # @date Oct 2020 #
10.833333
21
0.584615
true
true
f7339702cad3ed2804fe276b9d1fc6857c368206
2,473
py
Python
PythonAndroid/youtube-dl/lib/python3.5/youtube_dl/extractor/einthusan.py
jianglei12138/python-3.5.1
2d248ceba8aa4c14ee43e57ece99cc1a43fd22b7
[ "PSF-2.0" ]
10
2020-05-29T03:20:03.000Z
2022-03-29T01:05:20.000Z
youtube_dl/extractor/einthusan.py
huyangfeng/youtobedl
7b0d1c28597bd38567e5b4e853f669a5a601c6e8
[ "Unlicense" ]
5
2016-04-22T01:33:31.000Z
2016-08-04T15:33:19.000Z
PythonSamples/library/files/lib/python2.7/site-packages/youtube_dl/extractor/einthusan.py
jianglei12138/python2.7
280aa96d8cac98c03ca8c8ed71541f7ff7817055
[ "PSF-2.0" ]
9
2020-05-29T03:21:02.000Z
2021-04-14T03:26:05.000Z
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urlparse from ..utils import ( remove_start, sanitized_Request, ) class EinthusanIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?einthusan\.com/movies/watch.php\?([^#]*?)id=(?P<id>[0...
34.830986
116
0.535786
from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urlparse from ..utils import ( remove_start, sanitized_Request, ) class EinthusanIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?einthusan\.com/movies/watch.php\?([^#]*?)id=(?P<id>[0-9]+)' _TES...
true
true
f733979048193e4066264f6686623c3d00567158
8,434
py
Python
sknano/structures/_nanotube_bundle.py
haidi-ustc/scikit-nano
ef9b24165ba37918b3f520657f7311ba139b3e7d
[ "BSD-2-Clause" ]
21
2016-06-08T18:27:20.000Z
2022-03-22T08:27:46.000Z
sknano/structures/_nanotube_bundle.py
haidi-ustc/scikit-nano
ef9b24165ba37918b3f520657f7311ba139b3e7d
[ "BSD-2-Clause" ]
8
2016-06-24T19:45:58.000Z
2021-03-25T21:42:29.000Z
sknano/structures/_nanotube_bundle.py
scikit-nano/scikit-nano
ef9b24165ba37918b3f520657f7311ba139b3e7d
[ "BSD-2-Clause" ]
9
2016-12-08T16:35:52.000Z
2021-06-23T17:13:44.000Z
# -*- coding: utf-8 -*- """ ============================================================================== Nanotube bundle base class (:mod:`sknano.structures._nanotube_bundle`) ============================================================================== .. currentmodule:: sknano.structures._nanotube_bundle """ fro...
30.447653
78
0.541499
from __future__ import absolute_import, division, print_function from __future__ import unicode_literals __docformat__ = 'restructuredtext en' import numbers import numpy as np from sknano.core.atoms import Atom, vdw_radius_from_basis from sknano.core.refdata import aCC, grams_per_Da from sknano.core.math import Ve...
true
true
f73398ac99bb6ad76208a2cc03425876fd1c766b
521
py
Python
app/tests.py
Sergey-59/magnit_test
f769642deed3d6c92b641a348311104c6bb23b93
[ "Apache-2.0" ]
null
null
null
app/tests.py
Sergey-59/magnit_test
f769642deed3d6c92b641a348311104c6bb23b93
[ "Apache-2.0" ]
null
null
null
app/tests.py
Sergey-59/magnit_test
f769642deed3d6c92b641a348311104c6bb23b93
[ "Apache-2.0" ]
null
null
null
''' Base test ''' def test_index(client): assert client.get('/').status_code == 302 def test_registration(client): assert client.post('/registration', json={"email": "test4@gmail.com", "password": "12345", "name": "PyTest"}).status_code == 200 assert client.post('/registratio...
28.944444
115
0.591171
def test_index(client): assert client.get('/').status_code == 302 def test_registration(client): assert client.post('/registration', json={"email": "test4@gmail.com", "password": "12345", "name": "PyTest"}).status_code == 200 assert client.post('/registration', ...
true
true
f73398fb3cd36cbd081f97b2634fad9d29ff25bc
2,207
py
Python
soccer/gameplay/plays/skel/binary_clock.py
kasohrab/robocup-software
73c92878baf960844b5a4b34c72804093f1ea459
[ "Apache-2.0" ]
null
null
null
soccer/gameplay/plays/skel/binary_clock.py
kasohrab/robocup-software
73c92878baf960844b5a4b34c72804093f1ea459
[ "Apache-2.0" ]
null
null
null
soccer/gameplay/plays/skel/binary_clock.py
kasohrab/robocup-software
73c92878baf960844b5a4b34c72804093f1ea459
[ "Apache-2.0" ]
null
null
null
import robocup import constants import play import enum import behavior import main import skills.move import plays.testing.line_up import time # Maintains the state of the ball's position by keeping track of which # half the ball is on and prints on both entering a given state and # continuously during the execution...
37.40678
74
0.535569
import robocup import constants import play import enum import behavior import main import skills.move import plays.testing.line_up import time # half the ball is on and prints on both entering a given state and # continuously during the execution of a given state. class BinaryClock(play.Play): class State(enum....
true
true
f73399555c889d7db5b4869eb6411073d53546bb
2,959
py
Python
wtfml/data_loaders/image/classification.py
nagapavan525/wtfml
f2211addbe423a51b4dbbdec5a40d09649412452
[ "MIT" ]
1
2020-12-14T05:12:06.000Z
2020-12-14T05:12:06.000Z
wtfml/data_loaders/image/classification.py
nagapavan525/wtfml
f2211addbe423a51b4dbbdec5a40d09649412452
[ "MIT" ]
null
null
null
wtfml/data_loaders/image/classification.py
nagapavan525/wtfml
f2211addbe423a51b4dbbdec5a40d09649412452
[ "MIT" ]
null
null
null
""" __author__: Abhishek Thakur """ import torch import numpy as np from PIL import Image from PIL import ImageFile try: import torch_xla.core.xla_model as xm _xla_available = True except ImportError: _xla_available = False ImageFile.LOAD_TRUNCATED_IMAGES = True class ClassificationDataset: def ...
29.59
87
0.607638
import torch import numpy as np from PIL import Image from PIL import ImageFile try: import torch_xla.core.xla_model as xm _xla_available = True except ImportError: _xla_available = False ImageFile.LOAD_TRUNCATED_IMAGES = True class ClassificationDataset: def __init__(self, image_paths, targets,...
true
true
f73399d6c68d8f96a2e10891a342e6fd6459b010
7,616
py
Python
scripts/reinforcement_learning/maml-rl-easy/maze.py
alallala/MAML2
6f79426b5449f1fc7a66e0182913329c486e4b86
[ "MIT" ]
17
2020-02-18T06:49:38.000Z
2022-02-20T12:06:27.000Z
scripts/reinforcement_learning/maml-rl-easy/maze.py
alallala/MAML2
6f79426b5449f1fc7a66e0182913329c486e4b86
[ "MIT" ]
2
2020-04-15T09:36:15.000Z
2020-04-30T09:40:09.000Z
scripts/reinforcement_learning/maml-rl-easy/maze.py
alallala/MAML2
6f79426b5449f1fc7a66e0182913329c486e4b86
[ "MIT" ]
1
2021-04-15T08:04:31.000Z
2021-04-15T08:04:31.000Z
import math import gym from gym import spaces, logger from gym.utils import seeding import numpy as np from gym.envs.classic_control import rendering class MazeEnv(gym.Env): def __init__(self, task={}): super(MazeEnv, self).__init__() # 0-up 1-down 2-left 3-right self.action_space = [0, 1...
39.666667
110
0.553834
import math import gym from gym import spaces, logger from gym.utils import seeding import numpy as np from gym.envs.classic_control import rendering class MazeEnv(gym.Env): def __init__(self, task={}): super(MazeEnv, self).__init__() self.action_space = [0, 1, 2, 3] self.action_...
false
true
f73399f9760977ca6b0406f171a5dc7217817bae
394
py
Python
lagtraj/forcings/conversion/targets/__init__.py
BuildJet/lagtraj
a49bff9c165b225b37e212dec4c1d319452cc3f3
[ "MIT" ]
4
2020-04-16T22:57:00.000Z
2021-10-05T02:37:58.000Z
lagtraj/forcings/conversion/targets/__init__.py
BuildJet/lagtraj
a49bff9c165b225b37e212dec4c1d319452cc3f3
[ "MIT" ]
112
2020-05-21T09:47:14.000Z
2022-03-20T16:00:27.000Z
lagtraj/forcings/conversion/targets/__init__.py
BuildJet/lagtraj
a49bff9c165b225b37e212dec4c1d319452cc3f3
[ "MIT" ]
5
2020-05-14T11:04:07.000Z
2022-03-11T16:38:35.000Z
import os import glob import importlib def _package_contents(): for path in glob.glob(os.path.join(os.path.dirname(__file__), "*.py")): path = os.path.basename(path) if not path.startswith("_"): module_name = path.replace(".py", "") yield module_name, importlib.import_modul...
26.266667
86
0.659898
import os import glob import importlib def _package_contents(): for path in glob.glob(os.path.join(os.path.dirname(__file__), "*.py")): path = os.path.basename(path) if not path.startswith("_"): module_name = path.replace(".py", "") yield module_name, importlib.import_modul...
true
true
f7339a9f25e4749bcece34bebe912861f3ed0139
89
py
Python
lhrhost/robot/__init__.py
ethanjli/liquid-handling-robotics
999ab03c225b4c5382ab9fcac6a4988d0c232c67
[ "BSD-3-Clause" ]
null
null
null
lhrhost/robot/__init__.py
ethanjli/liquid-handling-robotics
999ab03c225b4c5382ab9fcac6a4988d0c232c67
[ "BSD-3-Clause" ]
null
null
null
lhrhost/robot/__init__.py
ethanjli/liquid-handling-robotics
999ab03c225b4c5382ab9fcac6a4988d0c232c67
[ "BSD-3-Clause" ]
1
2018-08-03T17:17:31.000Z
2018-08-03T17:17:31.000Z
"""Higher-level abstractions for robot control.""" from lhrhost.robot.robot import Robot
29.666667
50
0.786517
from lhrhost.robot.robot import Robot
true
true
f7339b5e447635f91727aa3325317aed927ac459
1,255
py
Python
ow_lander/scripts/constants.py
nasa/ow_simulator
662fea6bf83d82e1b0aac69d05c16dee77cd71a5
[ "NASA-1.3" ]
97
2020-08-10T08:43:14.000Z
2022-03-21T21:14:15.000Z
ow_lander/scripts/constants.py
AliMuhammadOfficial/ow_simulator
e0c96d74c1f3dea1451c90782172a10cfe183d94
[ "NASA-1.3" ]
153
2020-08-11T22:37:25.000Z
2022-03-31T23:29:41.000Z
ow_lander/scripts/constants.py
AliMuhammadOfficial/ow_simulator
e0c96d74c1f3dea1451c90782172a10cfe183d94
[ "NASA-1.3" ]
26
2020-08-06T17:07:03.000Z
2022-03-16T01:04:01.000Z
#!/usr/bin/env python2 # The Notices and Disclaimers for Ocean Worlds Autonomy Testbed for Exploration # Research and Simulation can be found in README.md in the root directory of # this repository. ## GLOBAL VARS ## J_SCOOP_YAW = 5 J_HAND_YAW = 4 J_DIST_PITCH = 3 J_PROX_PITCH = 2 J_SHOU_PITCH = 1 J_SHOU_YAW = 0 J_GR...
22.818182
96
0.776892
HAND_YAW = 4 J_DIST_PITCH = 3 J_PROX_PITCH = 2 J_SHOU_PITCH = 1 J_SHOU_YAW = 0 J_GRINDER = 5 X_SHOU = 0.79 Y_SHOU = 0.175 HAND_Y_OFFSET = 0.0249979319838 SCOOP_OFFSET = 0.215 GRINDER_OFFSET = 0.16 SCOOP_HEIGHT = 0.076 DEFAULT_GROUND_HEIGHT = -0.155 X_DELIV = 0.2 Y_DELIV = 0.2 Z_DELIV = 1.2 SHOU_YAW_DELIV = ...
true
true
f7339ba9a7dc732eebf511630a68c4deab31743e
914
py
Python
pyblis/tests/utils.py
jcrist/pyblis
d9c67d40a15c656a4681ba1b9ca0c52eff40163c
[ "BSD-3-Clause" ]
2
2020-03-07T14:02:51.000Z
2021-02-03T05:18:11.000Z
pyblis/tests/utils.py
jcrist/pyblis
d9c67d40a15c656a4681ba1b9ca0c52eff40163c
[ "BSD-3-Clause" ]
null
null
null
pyblis/tests/utils.py
jcrist/pyblis
d9c67d40a15c656a4681ba1b9ca0c52eff40163c
[ "BSD-3-Clause" ]
null
null
null
import pytest import numpy as np all_dtypes = pytest.mark.parametrize('dtype', ['f4', 'f8', 'c8', 'c16']) class Base(object): def rand(self, dtype, shape=()): a = np.random.normal(size=shape).astype(dtype) if np.issubdtype(dtype, np.complexfloating): a += np.random.normal(size=a.sha...
24.702703
72
0.608315
import pytest import numpy as np all_dtypes = pytest.mark.parametrize('dtype', ['f4', 'f8', 'c8', 'c16']) class Base(object): def rand(self, dtype, shape=()): a = np.random.normal(size=shape).astype(dtype) if np.issubdtype(dtype, np.complexfloating): a += np.random.normal(size=a.sha...
true
true
f7339bfcce133685fc20bcc3937e577b436a7a84
822
py
Python
application/DemandSideNew/Building/DemandProfile.py
FrancisDinh/Smart-Energy-Project
16b021e127d9ac5c01653abc31d8cc5d0a7a05c6
[ "MIT" ]
null
null
null
application/DemandSideNew/Building/DemandProfile.py
FrancisDinh/Smart-Energy-Project
16b021e127d9ac5c01653abc31d8cc5d0a7a05c6
[ "MIT" ]
4
2021-06-02T00:34:13.000Z
2021-06-02T00:35:28.000Z
application/DemandSideNew/Building/DemandProfile.py
FrancisDinh/Smart-Energy-Project
16b021e127d9ac5c01653abc31d8cc5d0a7a05c6
[ "MIT" ]
null
null
null
import os, sys import json import os.path import numpy class DemandProfile: def __init__(self): cwd = os.getcwd() self.fname = cwd + '/demand-profile.json' def get_data(self): demand={} with open(self.fname) as demand_info: demand = json.load(demand_info) ...
27.4
140
0.600973
import os, sys import json import os.path import numpy class DemandProfile: def __init__(self): cwd = os.getcwd() self.fname = cwd + '/demand-profile.json' def get_data(self): demand={} with open(self.fname) as demand_info: demand = json.load(demand_info) ...
true
true
f7339c3e2aaf49ae2d4dd0b7a9e21662f14c3370
1,355
py
Python
src/senjyu/ml/clustering/kmeans.py
Koukyosyumei/Senjyu
70faa45e13cb3b1ccdee8a40146a03d60abe11e5
[ "Apache-2.0" ]
null
null
null
src/senjyu/ml/clustering/kmeans.py
Koukyosyumei/Senjyu
70faa45e13cb3b1ccdee8a40146a03d60abe11e5
[ "Apache-2.0" ]
null
null
null
src/senjyu/ml/clustering/kmeans.py
Koukyosyumei/Senjyu
70faa45e13cb3b1ccdee8a40146a03d60abe11e5
[ "Apache-2.0" ]
null
null
null
import numpy as np from mpi4py import MPI class Kmeans: def __init__(self, k=3, num_iterations=100, seed=42): self.k = k self.num_iterations = num_iterations self.centorids = None self.dim = None self.n = None np.random.seed(seed) def train(self, X, parallel=F...
26.568627
85
0.563838
import numpy as np from mpi4py import MPI class Kmeans: def __init__(self, k=3, num_iterations=100, seed=42): self.k = k self.num_iterations = num_iterations self.centorids = None self.dim = None self.n = None np.random.seed(seed) def train(self, X, parallel=F...
true
true
f7339c847db5d1e76e116f1c088045635c3233e4
6,571
py
Python
xalpha/realtime.py
Aaron-YunZhao/xalpha
76dc6390cb5714b1c004f7e79e4af832ad1e6fa5
[ "MIT" ]
1
2020-03-15T01:48:52.000Z
2020-03-15T01:48:52.000Z
xalpha/realtime.py
tersapp/xalpha
76dc6390cb5714b1c004f7e79e4af832ad1e6fa5
[ "MIT" ]
null
null
null
xalpha/realtime.py
tersapp/xalpha
76dc6390cb5714b1c004f7e79e4af832ad1e6fa5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ module for realtime watch and notfication """ import datetime as dt import smtplib from email.header import Header from email.mime.text import MIMEText from email.utils import formataddr, parseaddr from re import match import pandas as pd from xalpha.cons import today from xalpha.info imp...
33.35533
118
0.564906
import datetime as dt import smtplib from email.header import Header from email.mime.text import MIMEText from email.utils import formataddr, parseaddr from re import match import pandas as pd from xalpha.cons import today from xalpha.info import _download, fundinfo from xalpha.trade import trade def _format_addr...
true
true
f7339cfa5ea0739989c4ed11621487244b20116b
3,415
py
Python
hls-segmenter.py
rsereda/HLS-Segmenter-AWS-S3
e98e6f43e8923c46fafcc60fd3585c935e9bb369
[ "Apache-2.0" ]
12
2015-03-25T10:04:32.000Z
2021-03-01T14:39:50.000Z
hls-segmenter.py
rsereda/HLS-Segmenter-AWS-S3
e98e6f43e8923c46fafcc60fd3585c935e9bb369
[ "Apache-2.0" ]
null
null
null
hls-segmenter.py
rsereda/HLS-Segmenter-AWS-S3
e98e6f43e8923c46fafcc60fd3585c935e9bb369
[ "Apache-2.0" ]
3
2015-10-03T09:45:20.000Z
2019-03-22T14:45:35.000Z
#!/usr/bin/env python # upload to AWS S3 and clean up # author Roman Sereda # sereda.roman@gmail.com # # install dependenses #sudo pip install boto import json import os.path import logging import subprocess from boto.s3.connection import S3Connection from boto.s3.key import Key config_file = 'config.json' json...
31.62037
269
0.667057
import json import os.path import logging import subprocess from boto.s3.connection import S3Connection from boto.s3.key import Key config_file = 'config.json' json_data=open(config_file) config = json.load(json_data) json_data.close() logging.basicConfig(filename=config['log'],level=logging.DEBUG)
false
true
f7339d1d513d9c652ded4f4a4dc0b3fea224e681
781
py
Python
project_euler/ex25_1000digit_fib_number.py
ralphribeiro/uri-projecteuler
7151d86e014aea9c56026cc88f50b4e940117dd8
[ "MIT" ]
null
null
null
project_euler/ex25_1000digit_fib_number.py
ralphribeiro/uri-projecteuler
7151d86e014aea9c56026cc88f50b4e940117dd8
[ "MIT" ]
null
null
null
project_euler/ex25_1000digit_fib_number.py
ralphribeiro/uri-projecteuler
7151d86e014aea9c56026cc88f50b4e940117dd8
[ "MIT" ]
null
null
null
""" The Fibonacci sequence is defined by the recurrence relation: Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1. Hence the first 12 terms will be: F1 = 1 F2 = 1 F3 = 2 F4 = 3 F5 = 5 F6 = 8 F7 = 13 F8 = 21 F9 = 34 F10 = 55 F11 = 89 F12 = 144 The 12th term, F12, is the first term to contain three digits. ...
16.617021
76
0.583867
def fib(): last = 1 penultimate = 1 yield last yield penultimate while True: ret = last + penultimate penultimate = last yield ret last = ret f = fib() index = 1 while True: ret = next(f) ret_list = [n for n in str(ret)] if len(ret_list) > 999: ...
true
true
f7339d56480d376c52eba03d3815e0df05ad5d71
619
py
Python
GMXToPython.py
Karuji/GMProjectImporter
2e810dcaf740304550a82315e720ad39cdbc4fe7
[ "MIT" ]
null
null
null
GMXToPython.py
Karuji/GMProjectImporter
2e810dcaf740304550a82315e720ad39cdbc4fe7
[ "MIT" ]
null
null
null
GMXToPython.py
Karuji/GMProjectImporter
2e810dcaf740304550a82315e720ad39cdbc4fe7
[ "MIT" ]
null
null
null
import xml.etree.ElementTree as ET import os from Element import Element class GMXToPython(object): def __init__(self, xmlFile): self.gmxroot = ET.parse(xmlFile).getroot() self.root = Element(self.gmxroot) for child in self.gmxroot: self.process(child, self.root) def process(self, element, parent): ele...
22.925926
44
0.728595
import xml.etree.ElementTree as ET import os from Element import Element class GMXToPython(object): def __init__(self, xmlFile): self.gmxroot = ET.parse(xmlFile).getroot() self.root = Element(self.gmxroot) for child in self.gmxroot: self.process(child, self.root) def process(self, element, parent): ele...
true
true
f7339e8916132c9d410b936f39152a5243dc3a95
13,341
py
Python
convlab/modules/e2e/multiwoz/Mem2Seq/utils/utils_babi_mem2seq.py
ngduyanhece/ConvLab
a04582a77537c1a706fbf64715baa9ad0be1301a
[ "MIT" ]
405
2019-06-17T05:38:47.000Z
2022-03-29T15:16:51.000Z
convlab/modules/e2e/multiwoz/Mem2Seq/utils/utils_babi_mem2seq.py
ngduyanhece/ConvLab
a04582a77537c1a706fbf64715baa9ad0be1301a
[ "MIT" ]
69
2019-06-20T22:57:41.000Z
2022-03-04T12:12:07.000Z
convlab/modules/e2e/multiwoz/Mem2Seq/utils/utils_babi_mem2seq.py
ngduyanhece/ConvLab
a04582a77537c1a706fbf64715baa9ad0be1301a
[ "MIT" ]
124
2019-06-17T05:11:23.000Z
2021-12-31T05:58:18.000Z
# Modified by Microsoft Corporation. # Licensed under the MIT license. import logging import torch import torch.utils.data as data from torch.autograd import Variable from utils.config import * from utils.until_temp import entityList def hasNumbers(inputString): return any(char.isdigit() for char in inputString...
39.008772
141
0.55603
import logging import torch import torch.utils.data as data from torch.autograd import Variable from utils.config import * from utils.until_temp import entityList def hasNumbers(inputString): return any(char.isdigit() for char in inputString) MEM_TOKEN_SIZE = 3 class Lang: def __init__(self): se...
true
true
f7339ef7fada422038c26aff3a05596353cb5673
643
py
Python
main.py
fossabot/ar4maps
053a0bc623c40a8b3aa1e3e7ce57b10f00ae2849
[ "MIT" ]
6
2020-05-26T10:13:45.000Z
2021-12-04T08:46:59.000Z
main.py
fossabot/ar4maps
053a0bc623c40a8b3aa1e3e7ce57b10f00ae2849
[ "MIT" ]
1
2020-05-25T15:03:10.000Z
2020-05-25T15:03:10.000Z
main.py
fossabot/ar4maps
053a0bc623c40a8b3aa1e3e7ce57b10f00ae2849
[ "MIT" ]
2
2020-05-25T14:55:40.000Z
2020-12-06T03:52:27.000Z
# ***************************************************************************** # * Author: Miguel Magalhaes # * Email: miguel@magalhaes.pro # ***************************************************************************** # * Main # ***************************************************************************** import sy...
30.619048
79
0.415241
import sys import yaml from PyQt5.QtWidgets import QApplication from interface import Interface if __name__ == "__main__": app = QApplication(sys.argv) with open(sys.argv[1] + 'config.yml') as f: config = yaml.safe_load(f) win = Interface(sys.argv[1], config) win.show() sys...
true
true
f7339f758dce9f4a54ec4e742425982bcaa3bec7
1,770
py
Python
chords/admin.py
Ilias95/guitarchords
4477ad1110718ad64d2180b6dc9a5f03eb49ebde
[ "MIT" ]
4
2015-08-28T23:35:54.000Z
2016-12-30T15:26:50.000Z
chords/admin.py
Ilias95/guitarchords
4477ad1110718ad64d2180b6dc9a5f03eb49ebde
[ "MIT" ]
null
null
null
chords/admin.py
Ilias95/guitarchords
4477ad1110718ad64d2180b6dc9a5f03eb49ebde
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Artist, Song admin.AdminSite.site_title = 'Chords administration' admin.AdminSite.site_header = 'Chords Administration' class ArtistAdmin(admin.ModelAdmin): exclude = ['slug'] actions = ['delete_selected'] search_fields = ['name'] def delete_sele...
31.607143
78
0.642938
from django.contrib import admin from .models import Artist, Song admin.AdminSite.site_title = 'Chords administration' admin.AdminSite.site_header = 'Chords Administration' class ArtistAdmin(admin.ModelAdmin): exclude = ['slug'] actions = ['delete_selected'] search_fields = ['name'] def delete_sele...
true
true
f7339ffceb1271b59fe05fe8af5b4d70a0b4e922
340
py
Python
Jumping around and changing speed.py
Toulik1729231/Python3.7
56acd1af1b7c7e664c7bd8bd6eec0740871b6815
[ "MIT" ]
null
null
null
Jumping around and changing speed.py
Toulik1729231/Python3.7
56acd1af1b7c7e664c7bd8bd6eec0740871b6815
[ "MIT" ]
null
null
null
Jumping around and changing speed.py
Toulik1729231/Python3.7
56acd1af1b7c7e664c7bd8bd6eec0740871b6815
[ "MIT" ]
null
null
null
import turtle ninja = turtle.Turtle() ninja.speed(10) for i in range(180): ninja.forward(100) ninja.right(30) ninja.forward(20) ninja.left(60) ninja.forward(50) ninja.right(30) ninja.penup() ninja.setposition(0, 0) ninja.pendown() ninja.right(2) ...
15.454545
28
0.570588
import turtle ninja = turtle.Turtle() ninja.speed(10) for i in range(180): ninja.forward(100) ninja.right(30) ninja.forward(20) ninja.left(60) ninja.forward(50) ninja.right(30) ninja.penup() ninja.setposition(0, 0) ninja.pendown() ninja.right(2) ...
true
true
f733a1fa06978ea0db0e27d7877804c982cfb8be
211
py
Python
tests/conftest.py
dustye/policyguru
16da990ff600468077660acf10a9db6682454df1
[ "MIT" ]
8
2021-01-25T03:27:44.000Z
2022-01-18T08:07:43.000Z
tests/conftest.py
dustye/policyguru
16da990ff600468077660acf10a9db6682454df1
[ "MIT" ]
2
2021-04-24T22:49:20.000Z
2021-06-10T16:25:37.000Z
tests/conftest.py
dustye/policyguru
16da990ff600468077660acf10a9db6682454df1
[ "MIT" ]
4
2021-04-24T23:06:56.000Z
2021-11-18T22:50:26.000Z
import pytest from starlette.testclient import TestClient from policyguru.main import app @pytest.fixture(scope="module") def test_app(): client = TestClient(app) yield client # testing happens here
19.181818
43
0.763033
import pytest from starlette.testclient import TestClient from policyguru.main import app @pytest.fixture(scope="module") def test_app(): client = TestClient(app) yield client
true
true
f733a244a6d71168c73c92692652d8e6b6eb0e22
6,761
py
Python
Mini-DeepText-2.0/train.py
Ethan-Yang0101/Mini-DeepText-Project
6ed70fae7d00610b942fb9b2526d11ebfd1b48f7
[ "MIT" ]
null
null
null
Mini-DeepText-2.0/train.py
Ethan-Yang0101/Mini-DeepText-Project
6ed70fae7d00610b942fb9b2526d11ebfd1b48f7
[ "MIT" ]
null
null
null
Mini-DeepText-2.0/train.py
Ethan-Yang0101/Mini-DeepText-Project
6ed70fae7d00610b942fb9b2526d11ebfd1b48f7
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from torch.utils.data import DataLoader import torch.nn.functional as F import torch.optim as optim from TextDataset import TextDataset from Model.BasicModel.TextCLRModel import TextCLRModel from Model.BasicModel.TextSLBModel import TextSLBModel from Model.BasicModel.TextNMTModel imp...
39.538012
79
0.659222
import torch import torch.nn as nn from torch.utils.data import DataLoader import torch.nn.functional as F import torch.optim as optim from TextDataset import TextDataset from Model.BasicModel.TextCLRModel import TextCLRModel from Model.BasicModel.TextSLBModel import TextSLBModel from Model.BasicModel.TextNMTModel imp...
true
true
f733a2810ed0c62aaf5db77c8205e09e414d3286
61,223
py
Python
scripts/automation/trex_control_plane/interactive/trex/astf/trex_astf_client.py
kphaye/trex-core
4b4d738182f7b3c44671c10ad6404ddd14e06498
[ "Apache-2.0" ]
null
null
null
scripts/automation/trex_control_plane/interactive/trex/astf/trex_astf_client.py
kphaye/trex-core
4b4d738182f7b3c44671c10ad6404ddd14e06498
[ "Apache-2.0" ]
null
null
null
scripts/automation/trex_control_plane/interactive/trex/astf/trex_astf_client.py
kphaye/trex-core
4b4d738182f7b3c44671c10ad6404ddd14e06498
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import hashlib import sys import time import os import shlex from ..utils.common import get_current_user, user_input, PassiveTimer from ..utils import parsing_opts, text_tables from ..common.trex_api_annotators import client_api, console_api from ..common.trex_client import TRexC...
35.0246
169
0.560459
from __future__ import print_function import hashlib import sys import time import os import shlex from ..utils.common import get_current_user, user_input, PassiveTimer from ..utils import parsing_opts, text_tables from ..common.trex_api_annotators import client_api, console_api from ..common.trex_client import TRexC...
true
true
f733a38586237d09cb05dc4b8ec5ac633e12d4d7
6,724
py
Python
examples/pwr_run/checkpointing/nonpc_short/final1/job20.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/checkpointing/nonpc_short/final1/job20.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/checkpointing/nonpc_short/final1/job20.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
""" #Trains a ResNet on the CIFAR10 dataset. """ from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRa...
30.563636
118
0.703004
from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRateScheduler from keras.callbacks import ReduceLROn...
true
true
f733a3ecee48a2958a6f46d7e9a4ea6651a8b85a
7,142
py
Python
DeepFilterNet/df/utils.py
Rikorose/DeepFilterNet
afe6bfb53efae70207e18df7ed372c2cfe337fee
[ "ECL-2.0", "Apache-2.0", "MIT" ]
54
2021-10-13T01:17:11.000Z
2022-03-24T00:54:01.000Z
DeepFilterNet/df/utils.py
Rikorose/DeepFilterNet
afe6bfb53efae70207e18df7ed372c2cfe337fee
[ "ECL-2.0", "Apache-2.0", "MIT" ]
33
2021-11-04T23:16:12.000Z
2022-03-24T10:15:34.000Z
DeepFilterNet/df/utils.py
Rikorose/DeepFilterNet
afe6bfb53efae70207e18df7ed372c2cfe337fee
[ "ECL-2.0", "Apache-2.0", "MIT" ]
16
2021-10-15T02:06:52.000Z
2022-03-24T00:54:04.000Z
import collections import math import os import random import subprocess from socket import gethostname from typing import Any, Dict, Set, Tuple, Union import numpy as np import torch from loguru import logger from torch import Tensor from torch._six import string_classes from torch.autograd import Function from torch...
30.917749
98
0.646458
import collections import math import os import random import subprocess from socket import gethostname from typing import Any, Dict, Set, Tuple, Union import numpy as np import torch from loguru import logger from torch import Tensor from torch._six import string_classes from torch.autograd import Function from torch...
true
true
f733a40bf98049f8734ae87f832ac02da58c2d79
1,471
py
Python
backfill_alerting/delphi_backfill_alerting/config.py
jingjtang/covidcast-indicators
34cb8786f78fbea2710b810a9500ee02c2379241
[ "MIT" ]
null
null
null
backfill_alerting/delphi_backfill_alerting/config.py
jingjtang/covidcast-indicators
34cb8786f78fbea2710b810a9500ee02c2379241
[ "MIT" ]
null
null
null
backfill_alerting/delphi_backfill_alerting/config.py
jingjtang/covidcast-indicators
34cb8786f78fbea2710b810a9500ee02c2379241
[ "MIT" ]
null
null
null
""" This file contains configuration variables used for the backfill alerting. """ from datetime import datetime, timedelta class Config: """Static configuration variables.""" ## dates FIRST_DATA_DATE = datetime(2020, 1, 1) # shift dates forward for labeling purposes DAY_SHIFT = timedelta(days=1...
27.754717
74
0.627464
from datetime import datetime, timedelta class Config: RST_DATA_DATE = datetime(2020, 1, 1) DAY_SHIFT = timedelta(days=1) NT = "Covid" TOTAL_COUNT = "Denom" COUNT_COL = "count" DATE_COL = "time_value" GEO_COL = "geo_value" ID_COLS = [DATE_COL] + [GEO_COL] DATA_COLS = [DATE...
true
true
f733a4997545f5675b7d476938d494363e9bac81
2,379
py
Python
gilda/resources/__init__.py
steppi/gilda
4927469e5f9a4ca20a056f617c126fe6a4bf3b34
[ "BSD-2-Clause" ]
null
null
null
gilda/resources/__init__.py
steppi/gilda
4927469e5f9a4ca20a056f617c126fe6a4bf3b34
[ "BSD-2-Clause" ]
null
null
null
gilda/resources/__init__.py
steppi/gilda
4927469e5f9a4ca20a056f617c126fe6a4bf3b34
[ "BSD-2-Clause" ]
null
null
null
import os import boto3 import pystow import logging import botocore from gilda import __version__ logger = logging.getLogger(__name__) HERE = os.path.abspath(os.path.dirname(__file__)) MESH_MAPPINGS_PATH = os.path.join(HERE, 'mesh_mappings.tsv') resource_dir = pystow.join('gilda', __version__) GROUNDING_TERMS_BASE_...
32.148649
76
0.691887
import os import boto3 import pystow import logging import botocore from gilda import __version__ logger = logging.getLogger(__name__) HERE = os.path.abspath(os.path.dirname(__file__)) MESH_MAPPINGS_PATH = os.path.join(HERE, 'mesh_mappings.tsv') resource_dir = pystow.join('gilda', __version__) GROUNDING_TERMS_BASE_...
true
true
f733a4ab524b61a9d3221a0d312b6a6eb8c4d96e
2,394
py
Python
zoomus/components/report.py
ROMBOTics/zoomus
ee3f8956dcdb0b58367e413bccb6cab0b5b99b83
[ "Apache-2.0" ]
null
null
null
zoomus/components/report.py
ROMBOTics/zoomus
ee3f8956dcdb0b58367e413bccb6cab0b5b99b83
[ "Apache-2.0" ]
null
null
null
zoomus/components/report.py
ROMBOTics/zoomus
ee3f8956dcdb0b58367e413bccb6cab0b5b99b83
[ "Apache-2.0" ]
null
null
null
"""Zoom.us REST API Python Client -- Report component""" from __future__ import absolute_import from zoomus import util from zoomus.components import base class ReportComponent(base.BaseComponent): """Component dealing with all report related matters""" def get_account_report(self, **kwargs): util....
40.576271
107
0.664996
from __future__ import absolute_import from zoomus import util from zoomus.components import base class ReportComponent(base.BaseComponent): def get_account_report(self, **kwargs): util.require_keys(kwargs, ["start_time", "end_time"], kwargs) kwargs["from"] = util.date_to_str(kwargs["start_time...
true
true
f733a55a8170ce1efb00e13a130b28157800c40a
374
py
Python
test_project/apps/cds/admin.py
int-y1/dmoj-wpadmin
81a9ccd476830e9467d209ba98d348daca040d2a
[ "MIT" ]
4
2017-11-17T21:42:39.000Z
2022-02-17T23:35:05.000Z
test_project/apps/cds/admin.py
int-y1/dmoj-wpadmin
81a9ccd476830e9467d209ba98d348daca040d2a
[ "MIT" ]
3
2017-11-20T18:08:30.000Z
2019-09-04T19:40:55.000Z
test_project/apps/cds/admin.py
int-y1/dmoj-wpadmin
81a9ccd476830e9467d209ba98d348daca040d2a
[ "MIT" ]
9
2016-11-15T13:46:00.000Z
2021-11-09T04:27:01.000Z
from django.contrib import admin class CdCategoryAdmin(admin.ModelAdmin): pass class CdAdmin(admin.ModelAdmin): pass class UserCdAdmin(admin.ModelAdmin): def get_queryset(self, request): """ Show only current user's objects. """ qs = super(UserCdAdmin, self).queryset(r...
17.809524
55
0.665775
from django.contrib import admin class CdCategoryAdmin(admin.ModelAdmin): pass class CdAdmin(admin.ModelAdmin): pass class UserCdAdmin(admin.ModelAdmin): def get_queryset(self, request): qs = super(UserCdAdmin, self).queryset(request) return qs.filter(owner=request.user)
true
true
f733a583fa3db787f40f40a07138e1bc8afad912
3,616
py
Python
python3/barchart3.py
iceihehe/pipeg
c5ed0a3bde23862bc4fffb0751df0bd2c0334a90
[ "MIT" ]
null
null
null
python3/barchart3.py
iceihehe/pipeg
c5ed0a3bde23862bc4fffb0751df0bd2c0334a90
[ "MIT" ]
null
null
null
python3/barchart3.py
iceihehe/pipeg
c5ed0a3bde23862bc4fffb0751df0bd2c0334a90
[ "MIT" ]
2
2020-01-31T15:17:27.000Z
2020-05-28T13:49:53.000Z
#!/usr/bin/env python3 # Copyright © 2012-13 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any ...
29.398374
74
0.634956
import abc import os import re import tempfile import Qtrac try: import cyImage as Image except ImportError: import Image def main(): pairs = (("Mon", 16), ("Tue", 17), ("Wed", 19), ("Thu", 22), ("Fri", 24), ("Sat", 21), ("Sun", 19)) textBarCharter = BarCharter(TextBarRenderer()...
true
true
f733a58f07b491a8ffaa457c1e4b312d3027bea5
473
py
Python
examples/sklearn_logistic_regression/train.py
iPieter/kiwi
76b66872fce68873809a0dea112e2ed552ae5b63
[ "Apache-2.0" ]
null
null
null
examples/sklearn_logistic_regression/train.py
iPieter/kiwi
76b66872fce68873809a0dea112e2ed552ae5b63
[ "Apache-2.0" ]
1
2021-01-24T13:34:51.000Z
2021-01-24T13:34:51.000Z
examples/sklearn_logistic_regression/train.py
iPieter/kiwi
76b66872fce68873809a0dea112e2ed552ae5b63
[ "Apache-2.0" ]
null
null
null
import numpy as np from sklearn.linear_model import LogisticRegression import kiwi import kiwi.sklearn if __name__ == "__main__": X = np.array([-2, -1, 0, 1, 2, 1]).reshape(-1, 1) y = np.array([0, 0, 1, 1, 1, 0]) lr = LogisticRegression() lr.fit(X, y) score = lr.score(X, y) print("Score: %s" %...
27.823529
68
0.632135
import numpy as np from sklearn.linear_model import LogisticRegression import kiwi import kiwi.sklearn if __name__ == "__main__": X = np.array([-2, -1, 0, 1, 2, 1]).reshape(-1, 1) y = np.array([0, 0, 1, 1, 1, 0]) lr = LogisticRegression() lr.fit(X, y) score = lr.score(X, y) print("Score: %s" %...
true
true
f733a5c43dfb3635c0debe9c082e090f349107b6
19,762
py
Python
pandas/core/computation/pytables.py
cf-vrgl/pandas
6f18ef68903591a18507f42763c862333d5470d9
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
2
2021-08-06T14:27:43.000Z
2021-08-06T14:27:56.000Z
pandas/core/computation/pytables.py
ra1nty/pandas
0b68d87a4438a13f14a2ed5af2e432df02eb0b2c
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/core/computation/pytables.py
ra1nty/pandas
0b68d87a4438a13f14a2ed5af2e432df02eb0b2c
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2021-06-22T14:36:40.000Z
2021-06-22T14:36:40.000Z
""" manage PyTables query interface via Expressions """ from __future__ import annotations import ast from functools import partial from typing import Any import numpy as np from pandas._libs.tslibs import ( Timedelta, Timestamp, ) from pandas.compat.chainmap import DeepChainMap from pandas.core.dtypes.comm...
30.125
88
0.565985
from __future__ import annotations import ast from functools import partial from typing import Any import numpy as np from pandas._libs.tslibs import ( Timedelta, Timestamp, ) from pandas.compat.chainmap import DeepChainMap from pandas.core.dtypes.common import is_list_like import pandas.core.common as com...
true
true
f733a73235b8fa505092ef970dc371a7512d47b3
67
py
Python
classes/a/b.py
yubang/urlHander
214ff33a9b6e96adf41a0176a86a62e0be335ef0
[ "Apache-2.0" ]
null
null
null
classes/a/b.py
yubang/urlHander
214ff33a9b6e96adf41a0176a86a62e0be335ef0
[ "Apache-2.0" ]
null
null
null
classes/a/b.py
yubang/urlHander
214ff33a9b6e96adf41a0176a86a62e0be335ef0
[ "Apache-2.0" ]
null
null
null
#coding:UTF-8 class B(): def __init__(self,Data): pass
13.4
28
0.58209
class B(): def __init__(self,Data): pass
true
true
f733a7e1c1424f0decd52a9fc3f662cc5c5d53e3
896
py
Python
python/hash_table/1200_minimum_absolute_difference.py
linshaoyong/leetcode
ea052fad68a2fe0cbfa5469398508ec2b776654f
[ "MIT" ]
6
2019-07-15T13:23:57.000Z
2020-01-22T03:12:01.000Z
python/hash_table/1200_minimum_absolute_difference.py
linshaoyong/leetcode
ea052fad68a2fe0cbfa5469398508ec2b776654f
[ "MIT" ]
null
null
null
python/hash_table/1200_minimum_absolute_difference.py
linshaoyong/leetcode
ea052fad68a2fe0cbfa5469398508ec2b776654f
[ "MIT" ]
1
2019-07-24T02:15:31.000Z
2019-07-24T02:15:31.000Z
class Solution(object): def minimumAbsDifference(self, arr): """ :type arr: List[int] :rtype: List[List[int]] """ if len(arr) < 2: return [] sa = sorted(arr) min_diff = sa[1] - sa[0] res = [[sa[0], sa[1]]] for i in range(1, len(sa) ...
30.896552
75
0.4375
class Solution(object): def minimumAbsDifference(self, arr): if len(arr) < 2: return [] sa = sorted(arr) min_diff = sa[1] - sa[0] res = [[sa[0], sa[1]]] for i in range(1, len(sa) - 1): v = sa[i + 1] - sa[i] if v < min_diff: ...
true
true
f733a82ce344d6f5f6181ef651b99b56a1adb95d
889
py
Python
moonstone/parsers/counts/taxonomy/kraken2.py
motleystate/moonstone
37c38fabf361722f7002626ef13c68c443ace4ac
[ "MIT" ]
null
null
null
moonstone/parsers/counts/taxonomy/kraken2.py
motleystate/moonstone
37c38fabf361722f7002626ef13c68c443ace4ac
[ "MIT" ]
84
2020-07-27T13:01:12.000Z
2022-03-16T17:10:23.000Z
moonstone/parsers/counts/taxonomy/kraken2.py
motleystate/moonstone
37c38fabf361722f7002626ef13c68c443ace4ac
[ "MIT" ]
null
null
null
from pandas import DataFrame from moonstone.parsers.counts.taxonomy.base import BaseTaxonomyCountsParser class SunbeamKraken2Parser(BaseTaxonomyCountsParser): """ Parse output from `Kraken2 <https://ccb.jhu.edu/software/kraken2/>`_ merge table from `Sunbeam <https://github.com/sunbeam-labs/sunbeam/>`_ pi...
35.56
84
0.692913
from pandas import DataFrame from moonstone.parsers.counts.taxonomy.base import BaseTaxonomyCountsParser class SunbeamKraken2Parser(BaseTaxonomyCountsParser): taxa_column = 'Consensus Lineage' new_otu_id_name = 'NCBI_taxonomy_ID' def __init__(self, *args, **kwargs): super().__init__(*args, pars...
true
true
f733a90584d0b7cdc7abb81d032882724c186521
10,849
py
Python
server/app/services/tasks_scheduler/async_tasks/app/excels/devices_import.py
goodfree/ActorCloud
e8db470830ea6f6f208ad43c2e56a2e8976bc468
[ "Apache-2.0" ]
173
2019-06-10T07:14:49.000Z
2022-03-31T08:42:36.000Z
server/app/services/tasks_scheduler/async_tasks/app/excels/devices_import.py
zlyz12345/ActorCloud
9c34b371c23464981323ef9865d9913bde1fe09c
[ "Apache-2.0" ]
27
2019-06-12T08:25:29.000Z
2022-02-26T11:37:15.000Z
server/app/services/tasks_scheduler/async_tasks/app/excels/devices_import.py
zlyz12345/ActorCloud
9c34b371c23464981323ef9865d9913bde1fe09c
[ "Apache-2.0" ]
67
2019-06-10T08:40:05.000Z
2022-03-09T03:43:56.000Z
import json import logging from collections import defaultdict from datetime import datetime from typing import Dict, AnyStr import pandas as pd from actor_libs.database.async_db import db from actor_libs.tasks.backend import update_task from actor_libs.tasks.exceptions import TaskException from actor_libs.utils impo...
36.284281
86
0.657019
import json import logging from collections import defaultdict from datetime import datetime from typing import Dict, AnyStr import pandas as pd from actor_libs.database.async_db import db from actor_libs.tasks.backend import update_task from actor_libs.tasks.exceptions import TaskException from actor_libs.utils impo...
true
true
f733a91e095b06f619e764c15a427c4e402a3796
860
py
Python
suzieq/engines/pandas/__init__.py
LucaNicosia/suzieq
c281807ea2c4f44a9d6cd6c80fd5b71277b3cdcd
[ "Apache-2.0" ]
null
null
null
suzieq/engines/pandas/__init__.py
LucaNicosia/suzieq
c281807ea2c4f44a9d6cd6c80fd5b71277b3cdcd
[ "Apache-2.0" ]
null
null
null
suzieq/engines/pandas/__init__.py
LucaNicosia/suzieq
c281807ea2c4f44a9d6cd6c80fd5b71277b3cdcd
[ "Apache-2.0" ]
null
null
null
import os from importlib.util import find_spec from importlib import import_module import inspect def get_engine_object(table, baseobj): '''Return the appropriate class object to operate on the specified table''' spec = find_spec('suzieq.engines.pandas') for file in spec.loader.contents(): if (os....
34.4
79
0.603488
import os from importlib.util import find_spec from importlib import import_module import inspect def get_engine_object(table, baseobj): spec = find_spec('suzieq.engines.pandas') for file in spec.loader.contents(): if (os.path.isfile(f'{os.path.dirname(spec.loader.path)}/{file}') and n...
true
true
f733aa021ea1d0b422473d9514c4cc7fd6b246d6
1,306
py
Python
stats/defense.py
micka59200/Python-Baseball
dda463b1ba49e70dab676d1d3e57edc8238d0df6
[ "MIT" ]
null
null
null
stats/defense.py
micka59200/Python-Baseball
dda463b1ba49e70dab676d1d3e57edc8238d0df6
[ "MIT" ]
null
null
null
stats/defense.py
micka59200/Python-Baseball
dda463b1ba49e70dab676d1d3e57edc8238d0df6
[ "MIT" ]
null
null
null
import pandas as pd import matplotlib.pyplot as plt from frames import games, info, events plays = games.query("type == 'play' & event != 'NP'") plays.columns = ['type', 'inning', 'team', 'player', 'count', 'pitches', 'event', 'game_id', 'year'] pa = plays.loc[plays['player'].shift() != plays['player'], ['year', 'gam...
52.24
143
0.641654
import pandas as pd import matplotlib.pyplot as plt from frames import games, info, events plays = games.query("type == 'play' & event != 'NP'") plays.columns = ['type', 'inning', 'team', 'player', 'count', 'pitches', 'event', 'game_id', 'year'] pa = plays.loc[plays['player'].shift() != plays['player'], ['year', 'gam...
true
true
f733aa2c6257379ee86445b98495e3b69e2b1b43
964
py
Python
ciscodnacnautobot/navigation.py
joakimnyden/ciscodnacnautobot
1c95f8b9205c389505afc85579e1c61d78b333a5
[ "BSD-Source-Code" ]
2
2021-04-15T07:26:12.000Z
2022-01-24T09:38:29.000Z
ciscodnacnautobot/navigation.py
joakimnyden/ciscodnacnautobot
1c95f8b9205c389505afc85579e1c61d78b333a5
[ "BSD-Source-Code" ]
null
null
null
ciscodnacnautobot/navigation.py
joakimnyden/ciscodnacnautobot
1c95f8b9205c389505afc85579e1c61d78b333a5
[ "BSD-Source-Code" ]
null
null
null
#from extras.plugins import PluginMenuButton, PluginMenuItem from nautobot.extras.plugins import PluginMenuButton, PluginMenuItem #from utilities.choices import ButtonColorChoices from nautobot.utilities.choices import ButtonColorChoices menu_items = ( PluginMenuItem( link="plugins:ciscodnacnautobot:statu...
32.133333
68
0.591286
from nautobot.extras.plugins import PluginMenuButton, PluginMenuItem from nautobot.utilities.choices import ButtonColorChoices menu_items = ( PluginMenuItem( link="plugins:ciscodnacnautobot:status", link_text="Status", permissions=["admin"], buttons=( PluginMenuButton...
true
true
f733aad2a6bc5212c2f7db3edbf36799214f09e5
1,004
py
Python
Reversing/HotelDoorPuzzle/solve.py
HackUCF/SunshineCTF-2020-Public
2a57c425784a9940a4a817489b41d630d24e3cf7
[ "MIT" ]
7
2020-11-12T13:26:44.000Z
2020-11-14T05:56:32.000Z
Reversing/HotelDoorPuzzle/solve.py
HackUCF/SunshineCTF-2020-Public
2a57c425784a9940a4a817489b41d630d24e3cf7
[ "MIT" ]
null
null
null
Reversing/HotelDoorPuzzle/solve.py
HackUCF/SunshineCTF-2020-Public
2a57c425784a9940a4a817489b41d630d24e3cf7
[ "MIT" ]
1
2020-12-08T17:04:46.000Z
2020-12-08T17:04:46.000Z
# Angr script written by other people import angr import claripy FLAG_LEN = 29 STDIN_FD = 0 # base_addr = 0x100000 # To match addresses to Ghidra base_addr = 0 proj = angr.Project("./attachments/hotel_key_puzzle", main_opts={'base_addr': base_addr}) flag_chars = [claripy.BVS('sun{%d}' % i, 8) for i in range(FLAG_L...
28.685714
99
0.699203
import angr import claripy FLAG_LEN = 29 STDIN_FD = 0 oject("./attachments/hotel_key_puzzle", main_opts={'base_addr': base_addr}) flag_chars = [claripy.BVS('sun{%d}' % i, 8) for i in range(FLAG_LEN)] flag = claripy.Concat( *flag_chars + [claripy.BVV(b'\n')]) state = proj.factory.full_init_state( args=['....
true
true
f733abcf753b5409efd7aae6465fe22be626b10b
3,276
py
Python
app/airtable/base_school_db/typeform_start_a_school.py
WildflowerSchools/wf-airtable-api
963021e5108462d33efa222fedb00890e1788ad6
[ "MIT" ]
null
null
null
app/airtable/base_school_db/typeform_start_a_school.py
WildflowerSchools/wf-airtable-api
963021e5108462d33efa222fedb00890e1788ad6
[ "MIT" ]
null
null
null
app/airtable/base_school_db/typeform_start_a_school.py
WildflowerSchools/wf-airtable-api
963021e5108462d33efa222fedb00890e1788ad6
[ "MIT" ]
null
null
null
from datetime import datetime from typing import Optional from pydantic import BaseModel, Field from app.airtable.response import AirtableResponse class CreateAirtableSSJTypeformStartASchool(BaseModel): first_name: str = Field(alias="First Name") last_name: str = Field(alias="Last Name") email: str = Fi...
58.5
119
0.778999
from datetime import datetime from typing import Optional from pydantic import BaseModel, Field from app.airtable.response import AirtableResponse class CreateAirtableSSJTypeformStartASchool(BaseModel): first_name: str = Field(alias="First Name") last_name: str = Field(alias="Last Name") email: str = Fi...
true
true
f733ac757dfd39afd2ebc244aed5f4a231c49aab
11,619
py
Python
corehq/motech/repeaters/repeater_generators.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
null
null
null
corehq/motech/repeaters/repeater_generators.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
null
null
null
corehq/motech/repeaters/repeater_generators.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
null
null
null
import json import warnings from collections import namedtuple from datetime import datetime from uuid import uuid4 from django.core.serializers.json import DjangoJSONEncoder from django.utils.translation import ugettext_lazy as _ from casexml.apps.case.xform import get_case_ids_from_form from casexml.apps.case.xml i...
34.580357
97
0.691626
import json import warnings from collections import namedtuple from datetime import datetime from uuid import uuid4 from django.core.serializers.json import DjangoJSONEncoder from django.utils.translation import ugettext_lazy as _ from casexml.apps.case.xform import get_case_ids_from_form from casexml.apps.case.xml i...
true
true
f733addf00b5daaa12cd2878c7c980cfb081f7b0
450
py
Python
sdk/python/pulumi_ucloud/unet/__init__.py
AaronFriel/pulumi-ucloud
199278786dddf46bdd370f3f805e30b279c63ff2
[ "ECL-2.0", "Apache-2.0" ]
4
2021-08-18T04:55:38.000Z
2021-09-08T07:59:24.000Z
sdk/python/pulumi_ucloud/unet/__init__.py
AaronFriel/pulumi-ucloud
199278786dddf46bdd370f3f805e30b279c63ff2
[ "ECL-2.0", "Apache-2.0" ]
1
2022-01-28T17:59:37.000Z
2022-01-29T03:44:09.000Z
sdk/python/pulumi_ucloud/unet/__init__.py
AaronFriel/pulumi-ucloud
199278786dddf46bdd370f3f805e30b279c63ff2
[ "ECL-2.0", "Apache-2.0" ]
2
2021-06-23T07:10:40.000Z
2021-06-23T09:25:12.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from .. import _utilities import typing # Export this package's modules as members: from .eip import * from .eipassociation import * fr...
30
87
0.74
from .. import _utilities import typing # Export this package's modules as members: from .eip import * from .eipassociation import * from .get_eip import * from .get_security_group import * from .security_group import * from ._inputs import * from . import outputs
true
true