hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
7902d8e807adae1a3a78bab4487a5f5792dbc4b9
1,985
py
Python
step_exec_lib/utils/git.py
giantswarm/step-exec-lib
74866d7eb7b149256d27e75fab56d4be662a1c63
[ "Apache-2.0" ]
1
2021-09-20T20:16:27.000Z
2021-09-20T20:16:27.000Z
step_exec_lib/utils/git.py
giantswarm/step-exec-lib
74866d7eb7b149256d27e75fab56d4be662a1c63
[ "Apache-2.0" ]
32
2021-06-02T11:36:55.000Z
2022-03-03T10:26:35.000Z
step_exec_lib/utils/git.py
giantswarm/step-exec-lib
74866d7eb7b149256d27e75fab56d4be662a1c63
[ "Apache-2.0" ]
1
2021-10-20T18:42:29.000Z
2021-10-20T18:42:29.000Z
"""Module with git related utilities.""" import git class GitRepoVersionInfo: """ Provides application versions information based on the tags and commits in the repo """ def __init__(self, path: str): """ Create an instance of GitRepoVersionInfo :param path: The path to search...
37.45283
112
0.608564
import git class GitRepoVersionInfo: def __init__(self, path: str): self._is_repo = False try: self._repo = git.Repo(path, search_parent_directories=True) self._is_repo = True except git.exc.InvalidGitRepositoryError: self._repo = None @property ...
true
true
7902d8ebff36d5e5e69aff22bc91fb65ad7633e6
1,481
py
Python
persister/observations/serializers.py
City-of-Helsinki/hel-data-pipe
e473237cd00a54a791337ac611e99556dc37ea35
[ "MIT" ]
1
2021-02-25T14:21:41.000Z
2021-02-25T14:21:41.000Z
persister/observations/serializers.py
City-of-Helsinki/hel-data-pipe
e473237cd00a54a791337ac611e99556dc37ea35
[ "MIT" ]
9
2020-11-23T11:56:56.000Z
2021-02-25T12:20:05.000Z
persister/observations/serializers.py
City-of-Helsinki/hel-data-pipe
e473237cd00a54a791337ac611e99556dc37ea35
[ "MIT" ]
1
2021-07-25T12:16:53.000Z
2021-07-25T12:16:53.000Z
from rest_framework import serializers from rest_framework.reverse import reverse from .models import Channel, Datasource, Value class ChannelSerializer(serializers.HyperlinkedModelSerializer): values = serializers.SerializerMethodField() latest = serializers.SerializerMethodField() def get_values(self...
30.22449
82
0.643484
from rest_framework import serializers from rest_framework.reverse import reverse from .models import Channel, Datasource, Value class ChannelSerializer(serializers.HyperlinkedModelSerializer): values = serializers.SerializerMethodField() latest = serializers.SerializerMethodField() def get_values(self...
true
true
7902dc375978742d4c188ae2eca723f620e2598c
28,296
py
Python
moto/ec2/responses/instances.py
adtsys-cloud/moto-aws-mock
666cb97c508fc4e8a8bb52e70e4fb43b49af6812
[ "Apache-2.0" ]
null
null
null
moto/ec2/responses/instances.py
adtsys-cloud/moto-aws-mock
666cb97c508fc4e8a8bb52e70e4fb43b49af6812
[ "Apache-2.0" ]
null
null
null
moto/ec2/responses/instances.py
adtsys-cloud/moto-aws-mock
666cb97c508fc4e8a8bb52e70e4fb43b49af6812
[ "Apache-2.0" ]
1
2019-08-14T14:14:14.000Z
2019-08-14T14:14:14.000Z
from __future__ import unicode_literals from boto.ec2.instancetype import InstanceType from moto.core.responses import BaseResponse from moto.core.utils import camelcase_to_underscores from moto.ec2.utils import instance_ids_from_querystring, filters_from_querystring, \ dict_from_querystring, optional_from_querystr...
43.666667
130
0.555556
from __future__ import unicode_literals from boto.ec2.instancetype import InstanceType from moto.core.responses import BaseResponse from moto.core.utils import camelcase_to_underscores from moto.ec2.utils import instance_ids_from_querystring, filters_from_querystring, \ dict_from_querystring, optional_from_querystr...
true
true
7902dc777d5ed3f5fa0b3b74cc379243016a2542
1,362
py
Python
pcat2py/class/20de4144-5cc5-11e4-af55-00155d01fe08.py
phnomcobra/PCAT2PY
937c3b365cdc5ac69b78f59070be0a21bdb53db0
[ "MIT" ]
null
null
null
pcat2py/class/20de4144-5cc5-11e4-af55-00155d01fe08.py
phnomcobra/PCAT2PY
937c3b365cdc5ac69b78f59070be0a21bdb53db0
[ "MIT" ]
null
null
null
pcat2py/class/20de4144-5cc5-11e4-af55-00155d01fe08.py
phnomcobra/PCAT2PY
937c3b365cdc5ac69b78f59070be0a21bdb53db0
[ "MIT" ]
null
null
null
#!/usr/bin/python ################################################################################ # 20de4144-5cc5-11e4-af55-00155d01fe08 # # Justin Dierking # justindierking@hardbitsolutions.com # phnomcobra@gmail.com # # 10/24/2014 Original Construction ################################################################...
35.842105
136
0.586637
true
true
7902dca67a3ff3802d9c0e607da4999164f9281f
30
py
Python
__init__.py
captainalan/linglosspy
3043478d2b4ac3071f80355736a3c72c56b75a81
[ "MIT" ]
null
null
null
__init__.py
captainalan/linglosspy
3043478d2b4ac3071f80355736a3c72c56b75a81
[ "MIT" ]
null
null
null
__init__.py
captainalan/linglosspy
3043478d2b4ac3071f80355736a3c72c56b75a81
[ "MIT" ]
null
null
null
from lingloss import Lingloss
15
29
0.866667
from lingloss import Lingloss
true
true
7902dd0410910126b5adddb1a52fce449cbc5d4b
32,348
py
Python
pandas/core/arrays/period.py
aidanmontare-edu/pandas
41aac9f2bccfc9b20cb2e9d0c839d8b7393e2b08
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
1
2020-06-24T09:01:49.000Z
2020-06-24T09:01:49.000Z
pandas/core/arrays/period.py
aidanmontare-edu/pandas
41aac9f2bccfc9b20cb2e9d0c839d8b7393e2b08
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/core/arrays/period.py
aidanmontare-edu/pandas
41aac9f2bccfc9b20cb2e9d0c839d8b7393e2b08
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
from datetime import timedelta import operator from typing import Any, Callable, List, Optional, Sequence, Type, Union import numpy as np from pandas._libs.tslibs import ( NaT, NaTType, Timedelta, delta_to_nanoseconds, iNaT, period as libperiod, to_offset, ) from pandas._libs.tslibs.dtypes...
30.260056
88
0.579912
from datetime import timedelta import operator from typing import Any, Callable, List, Optional, Sequence, Type, Union import numpy as np from pandas._libs.tslibs import ( NaT, NaTType, Timedelta, delta_to_nanoseconds, iNaT, period as libperiod, to_offset, ) from pandas._libs.tslibs.dtypes...
true
true
7902de16b8a23928735bfe12b81d82e40cd8d2cd
1,048
py
Python
shadowsocksr/encrypt_test.py
hcaijin/ssrspeedtest
9d353d4e43d861c3e1359221ac3faea7b11cb8ef
[ "Apache-2.0" ]
null
null
null
shadowsocksr/encrypt_test.py
hcaijin/ssrspeedtest
9d353d4e43d861c3e1359221ac3faea7b11cb8ef
[ "Apache-2.0" ]
null
null
null
shadowsocksr/encrypt_test.py
hcaijin/ssrspeedtest
9d353d4e43d861c3e1359221ac3faea7b11cb8ef
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, division, print_function, \ with_statement import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../')) from shadowsocksr.crypto import rc4_md5 from shadowsocksr.crypto import openssl from shadowsocksr.crypto import sodium from shadowsocksr.cryp...
20.54902
67
0.714695
from __future__ import absolute_import, division, print_function, \ with_statement import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../')) from shadowsocksr.crypto import rc4_md5 from shadowsocksr.crypto import openssl from shadowsocksr.crypto import sodium from shadowsocksr.cryp...
true
true
7902de46893fda5ca73b5b77691185ab7f392a83
6,261
py
Python
Benchmarking/bsds500/bsds/thin.py
cristi161/eecvf
519c488bd47f697ef51e88823f7a751a52677b88
[ "MIT" ]
1
2021-04-02T15:33:12.000Z
2021-04-02T15:33:12.000Z
Benchmarking/bsds500/bsds/thin.py
cristi161/eecvf
519c488bd47f697ef51e88823f7a751a52677b88
[ "MIT" ]
null
null
null
Benchmarking/bsds500/bsds/thin.py
cristi161/eecvf
519c488bd47f697ef51e88823f7a751a52677b88
[ "MIT" ]
1
2021-08-14T09:07:22.000Z
2021-08-14T09:07:22.000Z
import numpy as np # Thinning morphological operation applied using lookup tables. # We convert the 3x3 neighbourhood surrounding a pixel to an index # used to lookup the output in a lookup table. # Bit masks for each neighbour # 1 2 4 # 8 16 32 # 64 128 256 NEIGH_MASK_EAST = 32 NEIGH_MASK_NORTH_EAST = 4 N...
27.70354
106
0.632487
import numpy as np NEIGH_MASK_EAST = 32 NEIGH_MASK_NORTH_EAST = 4 NEIGH_MASK_NORTH = 2 NEIGH_MASK_NORTH_WEST = 1 NEIGH_MASK_WEST = 8 NEIGH_MASK_SOUTH_WEST = 64 NEIGH_MASK_SOUTH = 128 NEIGH_MASK_SOUTH_EAST = 256 NEIGH_MASK_CENTRE = 16 MASKS = [NEIGH_MASK_CENTRE, NEIGH_MASK_EAST, NEIGH_MASK_NORTH_EA...
true
true
7902de95884c5145b41ae43eb77adbda086cf022
860
py
Python
virtual_filesystem/localization.py
joaovitor123jv/rontext
0e4d2bb9df879a0331037af9bf49e39e5a6b4e24
[ "MIT" ]
1
2022-02-21T03:54:44.000Z
2022-02-21T03:54:44.000Z
virtual_filesystem/localization.py
joaovitor123jv/rontext
0e4d2bb9df879a0331037af9bf49e39e5a6b4e24
[ "MIT" ]
null
null
null
virtual_filesystem/localization.py
joaovitor123jv/rontext
0e4d2bb9df879a0331037af9bf49e39e5a6b4e24
[ "MIT" ]
null
null
null
import time import threading import subprocess import helpers from settings import Settings def listener(): global data_source print("**** SIDE_THREAD ID == ", threading.get_ident()) while True: return_data = subprocess.run([data_source.settings.loaded['localization_bin']], stdout=subprocess.PIPE) ...
34.4
130
0.737209
import time import threading import subprocess import helpers from settings import Settings def listener(): global data_source print("**** SIDE_THREAD ID == ", threading.get_ident()) while True: return_data = subprocess.run([data_source.settings.loaded['localization_bin']], stdout=subprocess.PIPE) ...
true
true
7902deadd2fdfe52af38f809cd59af4ffb799d42
1,308
py
Python
python/examples/Custom Shaders/Health Bars/main.py
Thaigun/Griddly
de5972a608a2928172510a0ac81a977c48af6b1f
[ "MIT" ]
null
null
null
python/examples/Custom Shaders/Health Bars/main.py
Thaigun/Griddly
de5972a608a2928172510a0ac81a977c48af6b1f
[ "MIT" ]
null
null
null
python/examples/Custom Shaders/Health Bars/main.py
Thaigun/Griddly
de5972a608a2928172510a0ac81a977c48af6b1f
[ "MIT" ]
null
null
null
import os from griddly import GymWrapperFactory, gd, GymWrapper from griddly.RenderTools import VideoRecorder, RenderToFile if __name__ == "__main__": wrapper = GymWrapperFactory() name = "projectiles_env" current_path = os.path.dirname(os.path.realpath(__file__)) env = GymWrapper( "health_ba...
30.418605
78
0.700306
import os from griddly import GymWrapperFactory, gd, GymWrapper from griddly.RenderTools import VideoRecorder, RenderToFile if __name__ == "__main__": wrapper = GymWrapperFactory() name = "projectiles_env" current_path = os.path.dirname(os.path.realpath(__file__)) env = GymWrapper( "health_ba...
true
true
7902ded1dec499c7be66619652159225c6af6d1b
8,899
py
Python
third_party/android_platform/development/scripts/stack.py
lianhuaren/webrtc
096f18c11d8acb0d92820f75fdf934607f424cfc
[ "DOC", "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/android_platform/development/scripts/stack.py
lianhuaren/webrtc
096f18c11d8acb0d92820f75fdf934607f424cfc
[ "DOC", "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
third_party/android_platform/development/scripts/stack.py
lianhuaren/webrtc
096f18c11d8acb0d92820f75fdf934607f424cfc
[ "DOC", "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
#!/usr/bin/env python # # Copyright (C) 2013 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
35.454183
90
0.627374
"""stack symbolizes native crash dumps.""" import getopt import glob import logging import os import sys import stack_core import stack_libs import subprocess import symbol import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.p...
false
true
7902df876873263fef39fb1c740dddee39dc9c9d
1,732
py
Python
eveparser/parsers/assets.py
Nothing4You/eveparser
f327a9609b91f1ac7afd2a8392f2d62e3d81b422
[ "MIT" ]
null
null
null
eveparser/parsers/assets.py
Nothing4You/eveparser
f327a9609b91f1ac7afd2a8392f2d62e3d81b422
[ "MIT" ]
1
2015-10-09T18:30:26.000Z
2015-10-09T18:31:37.000Z
eveparser/parsers/assets.py
Nothing4You/eveparser
f327a9609b91f1ac7afd2a8392f2d62e3d81b422
[ "MIT" ]
1
2021-08-28T01:15:15.000Z
2021-08-28T01:15:15.000Z
""" eveparser.parsers.assets ~~~~~~~~~~~~~~~~~~~~~~~ Parse eve online asset lists. This also invludes inventory listings. """ import re from eveparser.utils import regex_match_lines, f_int ASSET_LIST_RE = re.compile(r"""^([\S ]*) # name \t([\d,'\.]*) ...
35.346939
79
0.363164
import re from eveparser.utils import regex_match_lines, f_int ASSET_LIST_RE = re.compile(r"""^([\S ]*) # name \t([\d,'\.]*) # quantity (\t([\S ]*))? # group ...
true
true
7902e12e6925b1486db81a0b8f056078bc2938eb
18,676
py
Python
t/test.py
mapcollab/python-tftpy
b4a649dd499ba0add7583d1a1d6557dc13664a68
[ "MIT" ]
null
null
null
t/test.py
mapcollab/python-tftpy
b4a649dd499ba0add7583d1a1d6557dc13664a68
[ "MIT" ]
null
null
null
t/test.py
mapcollab/python-tftpy
b4a649dd499ba0add7583d1a1d6557dc13664a68
[ "MIT" ]
null
null
null
"""Unit tests for tftpy.""" import unittest import logging import tftpy import os import time import threading from errno import EINTR from multiprocessing import Queue log = tftpy.log class TestTftpyClasses(unittest.TestCase): def setUp(self): tftpy.setLogLevel(logging.DEBUG) def testTftpPacketRRQ...
37.277445
93
0.557775
import unittest import logging import tftpy import os import time import threading from errno import EINTR from multiprocessing import Queue log = tftpy.log class TestTftpyClasses(unittest.TestCase): def setUp(self): tftpy.setLogLevel(logging.DEBUG) def testTftpPacketRRQ(self): log.debug("=...
true
true
7902e14b8974d257576b24fae44d938c6e17498b
7,586
py
Python
tests/integration-tests/tests/tags/test_tag_propagation.py
eshpc/aws-parallelcluster
8cc6169a12661ce1c0025c93ebd9019c26e7219e
[ "Apache-2.0" ]
null
null
null
tests/integration-tests/tests/tags/test_tag_propagation.py
eshpc/aws-parallelcluster
8cc6169a12661ce1c0025c93ebd9019c26e7219e
[ "Apache-2.0" ]
108
2021-10-11T09:12:06.000Z
2022-03-28T09:28:39.000Z
tests/integration-tests/tests/tags/test_tag_propagation.py
yuleiwan/aws-parallelcluster
aad2a3019ef4ad08d702f5acf41b152b3f7a0b46
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "LICENSE.txt" file acc...
38.313131
120
0.676246
import json import logging import subprocess as sp import boto3 import pytest from assertpy import assert_that from utils import get_root_volume_id @pytest.mark.regions(["ap-southeast-1"]) @pytest.mark.instances(["c5.xlarge"]) @pytest.mark.oss(["alinux2"]) @pytest.mark.schedulers(["slurm", "awsbatch"]) @...
true
true
7902e254b527a3bf21be52288df5e342c0d9e0af
2,074
py
Python
examples/manual-control-opencv.py
elizabethhng/DJITelloPy
6a84675d531431484f6aee6a111fa2796be55628
[ "MIT" ]
null
null
null
examples/manual-control-opencv.py
elizabethhng/DJITelloPy
6a84675d531431484f6aee6a111fa2796be55628
[ "MIT" ]
null
null
null
examples/manual-control-opencv.py
elizabethhng/DJITelloPy
6a84675d531431484f6aee6a111fa2796be55628
[ "MIT" ]
null
null
null
# simple example demonstrating how to control a Tello using your keyboard. # For a more fully featured example see manual-control-pygame.py # # Use W, A, S, D for moving, E, Q for rotating and R, F for going up and down. # When starting the script the Tello will takeoff, pressing ESC makes it land # and the script ex...
30.057971
96
0.644648
from djitellopy import Tello import cv2, math, time tello = Tello() tello.connect() tello.streamon() frame_read = tello.get_frame_read() height, width, _ = frame_read.frame.shape nSnap = 0 w = width h= height folder = "." name = "snapshot" fileName = "%s/%s_%d_%d_" %(folder, name, w, h) while Tr...
true
true
7902e2f3b6480d92b7cf134af3054cd65eb1621c
718
py
Python
code/optimizer/schedulers.py
HS-YN/PanoAVQA
657b83421ce64ea18b3e79fb580afc7034403ccc
[ "MIT" ]
3
2022-01-22T17:58:22.000Z
2022-03-30T04:41:50.000Z
code/optimizer/schedulers.py
HS-YN/PanoAVQA
657b83421ce64ea18b3e79fb580afc7034403ccc
[ "MIT" ]
1
2022-01-22T18:02:06.000Z
2022-01-22T18:02:06.000Z
code/optimizer/schedulers.py
HS-YN/PanoAVQA
657b83421ce64ea18b3e79fb580afc7034403ccc
[ "MIT" ]
1
2022-01-29T03:38:13.000Z
2022-01-29T03:38:13.000Z
from torch.optim.lr_scheduler import LambdaLR from transformers import get_linear_schedule_with_warmup from exp import ex def get_no_scheduler(optimizer, num_warmup_steps, num_training_steps): def lr_lambda(current_step): return 1 return LambdaLR(optimizer, lr_lambda) sched_dict = { ...
27.615385
79
0.747911
from torch.optim.lr_scheduler import LambdaLR from transformers import get_linear_schedule_with_warmup from exp import ex def get_no_scheduler(optimizer, num_warmup_steps, num_training_steps): def lr_lambda(current_step): return 1 return LambdaLR(optimizer, lr_lambda) sched_dict = { ...
true
true
7902e3b76ef5b2e16744e4cc534a151fafd042b6
665
py
Python
django-website/home/migrations/0012_auto_20170727_1408.py
evonove/evonove
5f5a27245a46a98502f182e3c75aa8e77aa62d42
[ "BSD-3-Clause" ]
9
2016-01-07T14:57:55.000Z
2019-06-25T11:30:57.000Z
django-website/home/migrations/0012_auto_20170727_1408.py
evonove/evonove
5f5a27245a46a98502f182e3c75aa8e77aa62d42
[ "BSD-3-Clause" ]
64
2015-10-20T21:23:56.000Z
2022-01-12T10:03:28.000Z
django-website/home/migrations/0012_auto_20170727_1408.py
evonove/evonove
5f5a27245a46a98502f182e3c75aa8e77aa62d42
[ "BSD-3-Clause" ]
3
2016-08-06T14:29:00.000Z
2021-01-27T10:16:53.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-27 14:08 from __future__ import unicode_literals from django.db import migrations import wagtail.core.fields class Migration(migrations.Migration): dependencies = [ ('home', '0011_auto_20170727_1324'), ] operations = [ migr...
24.62963
64
0.618045
from __future__ import unicode_literals from django.db import migrations import wagtail.core.fields class Migration(migrations.Migration): dependencies = [ ('home', '0011_auto_20170727_1324'), ] operations = [ migrations.AddField( model_name='homepage', name='p...
true
true
7902e3c36705410abe0c552e3e763ddccb4a35e8
6,927
py
Python
Chapter10/Ch10/friendslist.py
henrryyanez/Tkinter-GUI-Programming-by-Example
c8a326d6034b5e54f77605a8ec840cb8fac89412
[ "MIT" ]
127
2018-08-27T16:34:43.000Z
2022-03-22T19:20:53.000Z
Chapter10/Ch10/friendslist.py
PiotrAdaszewski/Tkinter-GUI-Programming-by-Example
c8a326d6034b5e54f77605a8ec840cb8fac89412
[ "MIT" ]
8
2019-04-11T06:47:36.000Z
2022-03-11T23:23:42.000Z
Chapter10/Ch10/friendslist.py
PiotrAdaszewski/Tkinter-GUI-Programming-by-Example
c8a326d6034b5e54f77605a8ec840cb8fac89412
[ "MIT" ]
85
2018-04-30T19:42:21.000Z
2022-03-30T01:22:54.000Z
import base64 import os import tkinter as tk import tkinter.messagebox as msg import tkinter.ttk as ttk from functools import partial from chatwindow import ChatWindow from requester import Requester from avatarwindow import AvatarWindow from addfriendwindow import AddFriendWindow friend_avatars_dir = os.path.abspat...
35.891192
151
0.651653
import base64 import os import tkinter as tk import tkinter.messagebox as msg import tkinter.ttk as ttk from functools import partial from chatwindow import ChatWindow from requester import Requester from avatarwindow import AvatarWindow from addfriendwindow import AddFriendWindow friend_avatars_dir = os.path.abspat...
true
true
7902e3eb23e546d2efa9ea4c1c5b1e405ac5d863
441
py
Python
problems/day-18/part_2.py
stringham/advent-of-code-2020
01cfad88b2d70969976f44efdb66245470d5f925
[ "MIT" ]
1
2020-12-21T10:56:07.000Z
2020-12-21T10:56:07.000Z
problems/day-18/part_2.py
stringham/advent-of-code-2020
01cfad88b2d70969976f44efdb66245470d5f925
[ "MIT" ]
null
null
null
problems/day-18/part_2.py
stringham/advent-of-code-2020
01cfad88b2d70969976f44efdb66245470d5f925
[ "MIT" ]
1
2020-12-23T20:15:16.000Z
2020-12-23T20:15:16.000Z
#!/usr/bin/env python3 import sys import re class Num: def __init__(self, value): self.value = value def __add__(self, num): return Num(self.value * num.value) def __mul__(self, num): return Num(self.value + num.value) s = 0 for line in sys.stdin: line = line.replace("+", "...
18.375
69
0.564626
import sys import re class Num: def __init__(self, value): self.value = value def __add__(self, num): return Num(self.value * num.value) def __mul__(self, num): return Num(self.value + num.value) s = 0 for line in sys.stdin: line = line.replace("+", "$").replace("*", "+")....
true
true
7902e4426faf0ddd660b06b21330b01263d90354
9,805
py
Python
test-framework/test-suites/integration/tests/fixtures/add_data.py
anooprajendra/stacki
5e3f51c928ff5367a7441f07bf28f0121e7abdff
[ "BSD-3-Clause" ]
null
null
null
test-framework/test-suites/integration/tests/fixtures/add_data.py
anooprajendra/stacki
5e3f51c928ff5367a7441f07bf28f0121e7abdff
[ "BSD-3-Clause" ]
null
null
null
test-framework/test-suites/integration/tests/fixtures/add_data.py
anooprajendra/stacki
5e3f51c928ff5367a7441f07bf28f0121e7abdff
[ "BSD-3-Clause" ]
null
null
null
import json import subprocess import ipaddress import pytest @pytest.fixture def add_host(): def _inner(hostname, rack, rank, appliance): cmd = f'stack add host {hostname} rack={rack} rank={rank} appliance={appliance}' result = subprocess.run(cmd.split()) if result.returncode != 0: pytest.fail('unable to ad...
33.694158
137
0.715553
import json import subprocess import ipaddress import pytest @pytest.fixture def add_host(): def _inner(hostname, rack, rank, appliance): cmd = f'stack add host {hostname} rack={rack} rank={rank} appliance={appliance}' result = subprocess.run(cmd.split()) if result.returncode != 0: pytest.fail('unable to ad...
true
true
7902e53e75ed2e7ff4746ee7dab879397772e6f7
318
py
Python
oops/rules/fix_alt_space.py
lardnicus/oops
2cabcdb6726f4583f954d5f3671574bd18c7fdf2
[ "MIT" ]
null
null
null
oops/rules/fix_alt_space.py
lardnicus/oops
2cabcdb6726f4583f954d5f3671574bd18c7fdf2
[ "MIT" ]
null
null
null
oops/rules/fix_alt_space.py
lardnicus/oops
2cabcdb6726f4583f954d5f3671574bd18c7fdf2
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- import re from oops.utils import sudo_support @sudo_support def match(command, settings): return ('command not found' in command.stderr.lower() and u' ' in command.script) @sudo_support def get_new_command(command, settings): return re.sub(u' ', ' ', command.script)
19.875
57
0.679245
import re from oops.utils import sudo_support @sudo_support def match(command, settings): return ('command not found' in command.stderr.lower() and u' ' in command.script) @sudo_support def get_new_command(command, settings): return re.sub(u' ', ' ', command.script)
true
true
7902e57ecd4a3ee6ec22340d68150fa75db62d2e
4,321
py
Python
PyStacks/test/templates/test_route53.py
0xack13/PyStacks
13136c43089c241680beb216a233d1846119dd7c
[ "MIT" ]
11
2018-02-15T04:27:05.000Z
2020-10-02T11:20:08.000Z
PyStacks/test/templates/test_route53.py
0xack13/PyStacks
13136c43089c241680beb216a233d1846119dd7c
[ "MIT" ]
3
2018-02-15T05:46:54.000Z
2018-03-05T04:46:51.000Z
PyStacks/test/templates/test_route53.py
0xack13/PyStacks
13136c43089c241680beb216a233d1846119dd7c
[ "MIT" ]
8
2018-03-05T04:40:41.000Z
2021-02-22T08:07:58.000Z
import unittest from PyStacks.PyStacks.template import templateCF class TestTemplate(unittest.TestCase): def test_templateCF_Route53Zone(self): resources = { 'route53_zone': { 'testr53zone': { 'name': 'example.com', 'comment': 'testzone...
32.734848
70
0.265448
import unittest from PyStacks.PyStacks.template import templateCF class TestTemplate(unittest.TestCase): def test_templateCF_Route53Zone(self): resources = { 'route53_zone': { 'testr53zone': { 'name': 'example.com', 'comment': 'testzone...
true
true
7902e5fb1d85ee01c08088d7910953865f94a68e
3,290
py
Python
mycalendar/settings.py
spralja/mycalendar
a96a70c646d09a39282a51fea53e0faf0e715284
[ "MIT" ]
null
null
null
mycalendar/settings.py
spralja/mycalendar
a96a70c646d09a39282a51fea53e0faf0e715284
[ "MIT" ]
null
null
null
mycalendar/settings.py
spralja/mycalendar
a96a70c646d09a39282a51fea53e0faf0e715284
[ "MIT" ]
null
null
null
""" Django settings for mycalendar project. Generated by 'django-admin startproject' using Django 3.2.8. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from path...
25.307692
91
0.700912
from pathlib import Path from decouple import config BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = config('SECRET_KEY') DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', ...
true
true
7902e5fc584d2617fa4b511750a57b7ae6329745
39,612
py
Python
lib/spack/spack/binary_distribution.py
Mohib-hub/spack
9a350e945ebd8a662151692791d50a62bdf73e90
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
lib/spack/spack/binary_distribution.py
Mohib-hub/spack
9a350e945ebd8a662151692791d50a62bdf73e90
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
lib/spack/spack/binary_distribution.py
Mohib-hub/spack
9a350e945ebd8a662151692791d50a62bdf73e90
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2020-09-21T14:35:49.000Z
2020-09-21T14:35:49.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import codecs import os import re import tarfile import shutil import tempfile import hashlib import glob import platform ...
36.542435
79
0.624735
import codecs import os import re import tarfile import shutil import tempfile import hashlib import glob import platform from contextlib import closing import ruamel.yaml as yaml import json from six.moves.urllib.error import URLError import llnl.util.tty as tty from llnl.util.filesystem import mkdirp import...
true
true
7902e613e027a6d682c3b4828e2c9594bdfafd45
831
py
Python
xlsxwriter/test/comparison/test_image29.py
edparcell/XlsxWriter
d6a5df232ac0091017ae5c65f592bcc776d296ea
[ "BSD-2-Clause-FreeBSD" ]
1
2019-01-09T19:43:43.000Z
2019-01-09T19:43:43.000Z
xlsxwriter/test/comparison/test_image29.py
edparcell/XlsxWriter
d6a5df232ac0091017ae5c65f592bcc776d296ea
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_image29.py
edparcell/XlsxWriter
d6a5df232ac0091017ae5c65f592bcc776d296ea
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2018, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
24.441176
104
0.612515
true
true
7902e64ce6e679080f9662b47802e49d079bf34f
19,230
py
Python
lingvo/core/conv_layers_with_time_padding.py
zhoudoufu/lingvo
bd0f89809942fd0508ff43bd4b6bca1b598220cb
[ "Apache-2.0" ]
null
null
null
lingvo/core/conv_layers_with_time_padding.py
zhoudoufu/lingvo
bd0f89809942fd0508ff43bd4b6bca1b598220cb
[ "Apache-2.0" ]
null
null
null
lingvo/core/conv_layers_with_time_padding.py
zhoudoufu/lingvo
bd0f89809942fd0508ff43bd4b6bca1b598220cb
[ "Apache-2.0" ]
null
null
null
# Lint as: python2, python3 # Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
35.155393
80
0.663599
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from lingvo.core import base_layer from lingvo.core import bn_layers from lingvo.core import py_utils from lingvo.core import tshape def ComputeConvOutputShape(in_shap...
true
true
7902e655dea2c020e0a3db4dd83bf1dbf7cddacd
192
py
Python
django_app/students/serializers.py
RodrigoBLima/app-django-react
749c1ed206334d2e17ce22b5737c1d212f9f4ae7
[ "MIT" ]
null
null
null
django_app/students/serializers.py
RodrigoBLima/app-django-react
749c1ed206334d2e17ce22b5737c1d212f9f4ae7
[ "MIT" ]
2
2022-02-13T08:35:03.000Z
2022-02-27T01:23:53.000Z
django_app/students/serializers.py
RodrigoBLima/app-django-react
749c1ed206334d2e17ce22b5737c1d212f9f4ae7
[ "MIT" ]
1
2021-06-30T02:39:59.000Z
2021-06-30T02:39:59.000Z
from rest_framework import serializers from .models import Student class StudentSerializer(serializers.ModelSerializer): class Meta: model = Student fields = ('__all__')
21.333333
53
0.729167
from rest_framework import serializers from .models import Student class StudentSerializer(serializers.ModelSerializer): class Meta: model = Student fields = ('__all__')
true
true
7902e69fa7db7f459fe2c262ca5e329f7363bc68
1,353
py
Python
interpolML/interpolML/model/model.py
MiguelMque/interpolML
980d55583285ba1d289de69b5c05c65fc34097f5
[ "MIT" ]
null
null
null
interpolML/interpolML/model/model.py
MiguelMque/interpolML
980d55583285ba1d289de69b5c05c65fc34097f5
[ "MIT" ]
null
null
null
interpolML/interpolML/model/model.py
MiguelMque/interpolML
980d55583285ba1d289de69b5c05c65fc34097f5
[ "MIT" ]
null
null
null
from typing import Any from copy import deepcopy class Model: def __init__(self, name: str, model, freq: str): self.name = name self.model = model self.freq = freq self.train = None self.test = None self.prediction = None self.pred_col = "prediction" ...
27.612245
92
0.597931
from typing import Any from copy import deepcopy class Model: def __init__(self, name: str, model, freq: str): self.name = name self.model = model self.freq = freq self.train = None self.test = None self.prediction = None self.pred_col = "prediction" ...
true
true
7902e6d7b86cab4565e6529cb165981907947b27
1,754
py
Python
root/plugins/main_filter.py
KoshikKumar17/TG-RenameBot
3e6d20544fb45156c77f8a2b81c3e1eb8c9143ec
[ "MIT" ]
null
null
null
root/plugins/main_filter.py
KoshikKumar17/TG-RenameBot
3e6d20544fb45156c77f8a2b81c3e1eb8c9143ec
[ "MIT" ]
null
null
null
root/plugins/main_filter.py
KoshikKumar17/TG-RenameBot
3e6d20544fb45156c77f8a2b81c3e1eb8c9143ec
[ "MIT" ]
null
null
null
''' RenameBot This file is a part of mrvishal2k2 rename repo Dont kang !!! © Mrvishal2k2 ''' import pyrogram from pyrogram import Client, filters from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(nam...
38.977778
126
0.72805
import pyrogram from pyrogram import Client, filters from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') log = logging.getLogger(__name__) @Client.on_message(filt...
true
true
7902e7902d198e136e0b578083f411a15efb50e3
60
py
Python
pghoard/__main__.py
pellcorp/pghoard
8a83960ea9ee99fbe2bffa8753e7b7356f7c4417
[ "Apache-2.0" ]
731
2018-06-01T21:48:43.000Z
2022-03-29T08:21:42.000Z
pghoard/__main__.py
pellcorp/pghoard
8a83960ea9ee99fbe2bffa8753e7b7356f7c4417
[ "Apache-2.0" ]
124
2018-06-19T05:59:50.000Z
2022-03-31T18:17:59.000Z
pghoard/__main__.py
pellcorp/pghoard
8a83960ea9ee99fbe2bffa8753e7b7356f7c4417
[ "Apache-2.0" ]
64
2018-06-26T14:12:53.000Z
2022-03-20T07:33:33.000Z
import sys from . import pghoard sys.exit(pghoard.main())
10
24
0.733333
import sys from . import pghoard sys.exit(pghoard.main())
true
true
7902e7f0e2374bc0f2cb04301a2bc9bd459668ca
630
py
Python
modules/Exceptions.py
david-0609/OpenCV-Hand-Gesture-Control
2690216b9d997acc66bfd5f1185a49c9ca7354f5
[ "MIT" ]
1
2022-02-17T15:30:32.000Z
2022-02-17T15:30:32.000Z
modules/Exceptions.py
david-0609/OpenCV-Hand-Gesture-Control
2690216b9d997acc66bfd5f1185a49c9ca7354f5
[ "MIT" ]
null
null
null
modules/Exceptions.py
david-0609/OpenCV-Hand-Gesture-Control
2690216b9d997acc66bfd5f1185a49c9ca7354f5
[ "MIT" ]
null
null
null
class DirectionNotDetermined(BaseException): def __init__(self, message="Hand did not move in only one direction. Direction of movement cannot be determined."): self.message = message super().__init__(self.message) class ConfigError(BaseException): def __init__(self, message="Possible err...
35
119
0.703175
class DirectionNotDetermined(BaseException): def __init__(self, message="Hand did not move in only one direction. Direction of movement cannot be determined."): self.message = message super().__init__(self.message) class ConfigError(BaseException): def __init__(self, message="Possible err...
true
true
7902e8b66999407abb3cddccbea2ccc2a760a719
4,984
py
Python
core/track.py
yycho0108/monovo
9f2b5cf15f97e467c8e6e94ee16bb785ed6c7edd
[ "MIT" ]
null
null
null
core/track.py
yycho0108/monovo
9f2b5cf15f97e467c8e6e94ee16bb785ed6c7edd
[ "MIT" ]
null
null
null
core/track.py
yycho0108/monovo
9f2b5cf15f97e467c8e6e94ee16bb785ed6c7edd
[ "MIT" ]
null
null
null
import time import cv2 import numpy as np from collections import defaultdict class Tracker(object): def __init__(self, pLK=None): if pLK is None: # default LK param pLK = self.pLK0() self.lk_ = cv2.SparsePyrLKOpticalFlow_create( **pLK) self.tmp_ = de...
31.15
83
0.505618
import time import cv2 import numpy as np from collections import defaultdict class Tracker(object): def __init__(self, pLK=None): if pLK is None: pLK = self.pLK0() self.lk_ = cv2.SparsePyrLKOpticalFlow_create( **pLK) self.tmp_ = defaultdict(lambda:N...
true
true
7902e942ac1ee9ebc0b17f459eb8215a678c1135
171,356
py
Python
lib/rucio/core/replica.py
dynamic-entropy/rucio
a0823b3ec19ff1f98639361a14b628ca6c908651
[ "Apache-2.0" ]
2
2021-05-19T08:55:40.000Z
2021-05-19T08:55:43.000Z
lib/rucio/core/replica.py
dynamic-entropy/rucio
a0823b3ec19ff1f98639361a14b628ca6c908651
[ "Apache-2.0" ]
null
null
null
lib/rucio/core/replica.py
dynamic-entropy/rucio
a0823b3ec19ff1f98639361a14b628ca6c908651
[ "Apache-2.0" ]
1
2018-06-25T19:12:53.000Z
2018-06-25T19:12:53.000Z
# -*- coding: utf-8 -*- # Copyright 2013-2021 CERN # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
51.691101
289
0.600376
from __future__ import print_function import heapq import logging import random from collections import defaultdict from copy import deepcopy from curses.ascii import isprint from datetime import datetime, timedelta from hashlib import sha256 from json import dumps from re impo...
true
true
7902e95a547b34bba8e07ed95d68b660f737a29b
883
py
Python
064_minimum_path_sum.py
Sanster/LeetCode
5a0c448928b216b49c127c4542ae3cd74c797782
[ "MIT" ]
2
2018-10-13T15:12:55.000Z
2020-06-07T09:35:40.000Z
064_minimum_path_sum.py
Sanster/PyLeeCode
5a0c448928b216b49c127c4542ae3cd74c797782
[ "MIT" ]
null
null
null
064_minimum_path_sum.py
Sanster/PyLeeCode
5a0c448928b216b49c127c4542ae3cd74c797782
[ "MIT" ]
null
null
null
from typing import List class Solution: def minPathSum(self, grid: List[List[int]]) -> int: m = len(grid) if m == 0: return 0 if m == 1: return sum(grid[0]) n = len(grid[0]) dp = [[0] * n for _ in range(m)] for x in range(n): ...
24.527778
75
0.383918
from typing import List class Solution: def minPathSum(self, grid: List[List[int]]) -> int: m = len(grid) if m == 0: return 0 if m == 1: return sum(grid[0]) n = len(grid[0]) dp = [[0] * n for _ in range(m)] for x in range(n): ...
true
true
7902e9c82770fbbbd899b0a3af1e68b5cd29c31a
5,740
py
Python
google/cloud/compute_v1/services/target_instances/pagers.py
vam-google/python-compute
799f2f55e5e205317862a17ca7ed548ce2ca66e5
[ "Apache-2.0" ]
19
2021-02-10T21:17:20.000Z
2022-02-20T03:16:36.000Z
google/cloud/compute_v1/services/target_instances/pagers.py
vam-google/python-compute
799f2f55e5e205317862a17ca7ed548ce2ca66e5
[ "Apache-2.0" ]
121
2021-01-08T23:46:58.000Z
2022-03-26T04:34:36.000Z
google/cloud/compute_v1/services/target_instances/pagers.py
vam-google/python-compute
799f2f55e5e205317862a17ca7ed548ce2ca66e5
[ "Apache-2.0" ]
20
2021-01-08T23:14:16.000Z
2022-02-25T01:27:20.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
37.032258
89
0.675958
from typing import ( Any, AsyncIterable, Awaitable, Callable, Iterable, Sequence, Tuple, Optional, ) from google.cloud.compute_v1.types import compute class AggregatedListPager: def __init__( self, method: Callable[..., compute.TargetInstanceAggrega...
true
true
7902ea2e9f78819df7c8377f2a396299278f16c8
288
py
Python
setup.py
jorepstein1/bidict
71c01dbf01963c9dc99d0119b63b4a668088982a
[ "MIT" ]
null
null
null
setup.py
jorepstein1/bidict
71c01dbf01963c9dc99d0119b63b4a668088982a
[ "MIT" ]
null
null
null
setup.py
jorepstein1/bidict
71c01dbf01963c9dc99d0119b63b4a668088982a
[ "MIT" ]
null
null
null
from distutils.core import setup setup(name='bidict', version='0.1', description='A bi-directional dictionary API', author='Jordan Epstein', author_email='jorepstein1@gmail.com', url='https://github.com/jorepstein1/bidict', packages=['bidict'], )
28.8
52
0.652778
from distutils.core import setup setup(name='bidict', version='0.1', description='A bi-directional dictionary API', author='Jordan Epstein', author_email='jorepstein1@gmail.com', url='https://github.com/jorepstein1/bidict', packages=['bidict'], )
true
true
7902ea5a5b945062bf7c46b4bcc4ea01608a3184
618
py
Python
producer_server.py
estarguars113/udacity-spark-project
310b8ca315d9e84f7645eacfff58715814a3fd3a
[ "MIT" ]
null
null
null
producer_server.py
estarguars113/udacity-spark-project
310b8ca315d9e84f7645eacfff58715814a3fd3a
[ "MIT" ]
null
null
null
producer_server.py
estarguars113/udacity-spark-project
310b8ca315d9e84f7645eacfff58715814a3fd3a
[ "MIT" ]
null
null
null
from kafka import KafkaProducer from json import dumps as json_dumps, load as json_load import time class ProducerServer(KafkaProducer): def __init__(self, input_file, topic, **kwargs): super().__init__(**kwargs) self.input_file = input_file self.topic = topic def generate_data(self)...
29.428571
55
0.645631
from kafka import KafkaProducer from json import dumps as json_dumps, load as json_load import time class ProducerServer(KafkaProducer): def __init__(self, input_file, topic, **kwargs): super().__init__(**kwargs) self.input_file = input_file self.topic = topic def generate_data(self)...
true
true
7902eb3980d11a9a96c34cebaff2390898a077d5
2,842
py
Python
results_processing/ABC/csv_processing.py
multimodalspectroscopy/hypothermia-bayescmd
94307593de7697140f7563f1b449f1f6165cd79b
[ "MIT" ]
null
null
null
results_processing/ABC/csv_processing.py
multimodalspectroscopy/hypothermia-bayescmd
94307593de7697140f7563f1b449f1f6165cd79b
[ "MIT" ]
5
2020-04-02T16:59:17.000Z
2021-12-13T19:58:50.000Z
results_processing/ABC/csv_processing.py
multimodalspectroscopy/hypothermia-bayescmd
94307593de7697140f7563f1b449f1f6165cd79b
[ "MIT" ]
null
null
null
import os import pandas as pd import re def sort_human(l): """Sort a list of strings by numerical.""" def convert(text): return float(text) if text.isdigit() else text def alphanum(key): return [convert(c) for c in re.split('([-+]?[0-9]*\.?[0-9]*)', key)] l.sort(key=alp...
34.240964
81
0.54715
import os import pandas as pd import re def sort_human(l): def convert(text): return float(text) if text.isdigit() else text def alphanum(key): return [convert(c) for c in re.split('([-+]?[0-9]*\.?[0-9]*)', key)] l.sort(key=alphanum) return l def data_merge_by_batch(p...
true
true
7902ebeeae60d0a2ddc98e1cda2e776a13b5a7be
326
py
Python
osquery_rules/osquery_outdated.py
designing-penguin/panther-analysis
26034cea4504f43227f8d3789225f6ca7b35dfe0
[ "Apache-2.0" ]
null
null
null
osquery_rules/osquery_outdated.py
designing-penguin/panther-analysis
26034cea4504f43227f8d3789225f6ca7b35dfe0
[ "Apache-2.0" ]
null
null
null
osquery_rules/osquery_outdated.py
designing-penguin/panther-analysis
26034cea4504f43227f8d3789225f6ca7b35dfe0
[ "Apache-2.0" ]
null
null
null
LATEST_VERSION = '4.2.0' def rule(event): return (event['name'] == 'pack_it-compliance_osquery_info' and event['columns']['version'] != LATEST_VERSION and event['action'] == 'added') def title(event): return 'Osquery Version {} is Outdated'.format( event['columns'].get('versi...
25.076923
66
0.613497
LATEST_VERSION = '4.2.0' def rule(event): return (event['name'] == 'pack_it-compliance_osquery_info' and event['columns']['version'] != LATEST_VERSION and event['action'] == 'added') def title(event): return 'Osquery Version {} is Outdated'.format( event['columns'].get('versi...
true
true
7902ece0e7c02acca8d73e7f9069ffe6977407ee
1,684
py
Python
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/unsafe/numbers.py
BadDevCode/lumberyard
3d688932f919dbf5821f0cb8a210ce24abe39e9e
[ "AML" ]
1,738
2017-09-21T10:59:12.000Z
2022-03-31T21:05:46.000Z
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/unsafe/numbers.py
olivier-be/lumberyard
3d688932f919dbf5821f0cb8a210ce24abe39e9e
[ "AML" ]
427
2017-09-29T22:54:36.000Z
2022-02-15T19:26:50.000Z
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/unsafe/numbers.py
olivier-be/lumberyard
3d688932f919dbf5821f0cb8a210ce24abe39e9e
[ "AML" ]
671
2017-09-21T08:04:01.000Z
2022-03-29T14:30:07.000Z
""" This module provides the unsafe things for targets/numbers.py """ from .. import types from ..extending import intrinsic from llvmlite import ir @intrinsic def viewer(tyctx, val, viewty): """ Bitcast a scalar 'val' to the given type 'viewty'. """ bits = val.bitwidth if isinstance(viewty.dtype, types....
30.071429
79
0.643705
from .. import types from ..extending import intrinsic from llvmlite import ir @intrinsic def viewer(tyctx, val, viewty): bits = val.bitwidth if isinstance(viewty.dtype, types.Integer): bitcastty = ir.IntType(bits) elif isinstance(viewty.dtype, types.Float): bitcastty = ir.FloatType() if ...
true
true
7902edb247cc73e6dd6c9166c0f1e2a21d07d657
6,202
py
Python
baselines/imit/memory.py
DanielTakeshi/baselines-fork
7ac6f52ff21f43c519e01179740c019bbe1c55bf
[ "MIT" ]
3
2020-10-25T20:32:22.000Z
2021-03-29T01:51:12.000Z
baselines/imit/memory.py
DanielTakeshi/baselines-fork
7ac6f52ff21f43c519e01179740c019bbe1c55bf
[ "MIT" ]
1
2020-02-11T22:56:54.000Z
2020-02-20T00:21:34.000Z
baselines/imit/memory.py
DanielTakeshi/baselines-fork
7ac6f52ff21f43c519e01179740c019bbe1c55bf
[ "MIT" ]
null
null
null
"""Similar to DDPG except we only need obs and act, not the reward, etc. """ import numpy as np class RingBuffer(object): def __init__(self, maxlen, shape, dtype='float32'): self.maxlen = maxlen self.start = 0 self.length = 0 if dtype == 'uint8': # Daniel: special case...
38.04908
84
0.60803
import numpy as np class RingBuffer(object): def __init__(self, maxlen, shape, dtype='float32'): self.maxlen = maxlen self.start = 0 self.length = 0 if dtype == 'uint8': self.data = np.zeros((maxlen,) + shape, dtype=np.uint8) ...
true
true
7902eeefc3a986adfd0736c7bdb30a35c2e8c211
87,662
py
Python
python/pyspark/ml/regression.py
AjithShetty2489/spark
0c6bd3bd0b95d17bc1eebb503269eda43df90394
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
python/pyspark/ml/regression.py
AjithShetty2489/spark
0c6bd3bd0b95d17bc1eebb503269eda43df90394
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2019-03-26T05:30:37.000Z
2019-03-26T05:43:39.000Z
python/pyspark/ml/regression.py
ajithme/spark
0c6bd3bd0b95d17bc1eebb503269eda43df90394
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
33.820216
100
0.605371
import sys from pyspark import since, keyword_only from pyspark.ml.param.shared import * from pyspark.ml.tree import _DecisionTreeModel, _DecisionTreeParams, \ _TreeEnsembleModel, _TreeEnsembleParams, _RandomForestParams, _GBTParams, \ _HasVarianceImpurity, _TreeRegressorParams from pyspark.ml...
true
true
7902ef834b1c58761c7a961bde269e3d05dccb1b
495
py
Python
python/engine/functions/orbit_derived_parameters_test.py
RomainEndelin/keplerian_orbits
3380e5d9a1006e73580cf3a86cb10845196c405d
[ "MIT" ]
null
null
null
python/engine/functions/orbit_derived_parameters_test.py
RomainEndelin/keplerian_orbits
3380e5d9a1006e73580cf3a86cb10845196c405d
[ "MIT" ]
null
null
null
python/engine/functions/orbit_derived_parameters_test.py
RomainEndelin/keplerian_orbits
3380e5d9a1006e73580cf3a86cb10845196c405d
[ "MIT" ]
null
null
null
import pytest from engine.constants import G from pytest import param as p from .orbit_derived_parameters import OrbitalPeriod @pytest.mark.parametrize( ("primary_mass", "secondary_mass", "semimajor_axis", "expected"), [p(10e10, 100, 10, 76.9102, id="arbitrary period")], ) def test_orbital_period(primary_mas...
30.9375
80
0.747475
import pytest from engine.constants import G from pytest import param as p from .orbit_derived_parameters import OrbitalPeriod @pytest.mark.parametrize( ("primary_mass", "secondary_mass", "semimajor_axis", "expected"), [p(10e10, 100, 10, 76.9102, id="arbitrary period")], ) def test_orbital_period(primary_mas...
true
true
7902efe6839b721a246a0971ff8d89aa568d6aa5
821
py
Python
stonesoup/types/particle.py
Isaac-JenkinsRA/Stone-Soup
54c9c7dca8162dadaa58e85933cf10a0f86ce1e1
[ "MIT" ]
1
2021-12-02T00:17:21.000Z
2021-12-02T00:17:21.000Z
stonesoup/types/particle.py
Isaac-JenkinsRA/Stone-Soup
54c9c7dca8162dadaa58e85933cf10a0f86ce1e1
[ "MIT" ]
null
null
null
stonesoup/types/particle.py
Isaac-JenkinsRA/Stone-Soup
54c9c7dca8162dadaa58e85933cf10a0f86ce1e1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from ..base import Property from .array import StateVector from .base import Type class Particle(Type): """ Particle type A particle type which contains a state and weight """ state_vector: StateVector = Property(doc="State vector") weight: float = Property(doc='Weigh...
29.321429
82
0.666261
from ..base import Property from .array import StateVector from .base import Type class Particle(Type): state_vector: StateVector = Property(doc="State vector") weight: float = Property(doc='Weight of particle') parent: 'Particle' = Property(default=None, doc='Parent particle') def __init__(self, s...
true
true
7902f16b5ae36d13d542e5602e3cf18b4356c040
4,957
py
Python
bokeh/server/tests/test_tornado.py
chinasaur/bokeh
d3662a871679adf2cc8f95b80a51120db4dcccd4
[ "BSD-3-Clause" ]
6
2018-02-13T11:06:40.000Z
2020-10-23T09:30:46.000Z
bokeh/server/tests/test_tornado.py
chinasaur/bokeh
d3662a871679adf2cc8f95b80a51120db4dcccd4
[ "BSD-3-Clause" ]
6
2018-11-29T15:40:20.000Z
2021-05-07T14:59:30.000Z
bokeh/server/tests/test_tornado.py
chinasaur/bokeh
d3662a871679adf2cc8f95b80a51120db4dcccd4
[ "BSD-3-Clause" ]
3
2018-06-20T11:43:40.000Z
2021-12-21T06:51:56.000Z
from __future__ import absolute_import, print_function import logging import bokeh.server.tornado as tornado from bokeh.application import Application from bokeh.client import pull_session from bokeh.server.views.static_handler import StaticHandler from .utils import ManagedServerLoop, url logging.basicConfig(leve...
42.732759
80
0.65463
from __future__ import absolute_import, print_function import logging import bokeh.server.tornado as tornado from bokeh.application import Application from bokeh.client import pull_session from bokeh.server.views.static_handler import StaticHandler from .utils import ManagedServerLoop, url logging.basicConfig(leve...
true
true
7902f20ba68d27112a108b05cc9e3030605587d8
943
py
Python
autorenamer.py
hletrd/PyAstrophotography
27dbcae347705b0f73933cb39940f5d9fcce0f93
[ "MIT" ]
4
2019-01-17T17:58:13.000Z
2021-07-29T23:14:16.000Z
autorenamer.py
hletrd/PyAstrophotography
27dbcae347705b0f73933cb39940f5d9fcce0f93
[ "MIT" ]
null
null
null
autorenamer.py
hletrd/PyAstrophotography
27dbcae347705b0f73933cb39940f5d9fcce0f93
[ "MIT" ]
1
2017-06-22T07:53:39.000Z
2017-06-22T07:53:39.000Z
import astropy.io.fits as fits import argparse, os, re, copy parser = argparse.ArgumentParser() parser.add_argument('--list', default='list.list') parser.add_argument('--rename_by', default='DATA-TYP') parser.add_argument('--reparse', default=0, type=int) args = parser.parse_args() def log(description): print(descr...
21.431818
54
0.645811
import astropy.io.fits as fits import argparse, os, re, copy parser = argparse.ArgumentParser() parser.add_argument('--list', default='list.list') parser.add_argument('--rename_by', default='DATA-TYP') parser.add_argument('--reparse', default=0, type=int) args = parser.parse_args() def log(description): print(descr...
true
true
7902f2cd319fe51657f75734ec29382ba427d8ea
1,195
py
Python
view/libs/colorDialog.py
jsk1107/UDK_labeler
cd9071c775658dbb6056d3c65bcbc626a18f1f02
[ "Apache-2.0" ]
6
2021-03-08T02:29:05.000Z
2022-02-18T13:04:51.000Z
view/libs/colorDialog.py
7eta/udk_labeler
8cd8a86bc1a78647c0aaf81ca78e6e518fb86ceb
[ "Apache-2.0" ]
6
2021-03-03T14:18:46.000Z
2022-03-08T06:55:57.000Z
view/libs/colorDialog.py
7eta/udk_labeler
8cd8a86bc1a78647c0aaf81ca78e6e518fb86ceb
[ "Apache-2.0" ]
1
2021-03-08T02:29:07.000Z
2021-03-08T02:29:07.000Z
from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import QColorDialog, QDialogButtonBox BB = QDialogButtonBox class ColorDialog(QColorDialog): def __init__(self, parent=None): super(ColorDialog, self).__init__(parent) self.setOption(QColorDialog.ShowAlphaChannel) ...
35.147059
70
0.680335
from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import QColorDialog, QDialogButtonBox BB = QDialogButtonBox class ColorDialog(QColorDialog): def __init__(self, parent=None): super(ColorDialog, self).__init__(parent) self.setOption(QColorDialog.ShowAlphaChannel) ...
true
true
7902f30e420cc51a9b42e3cee0042d4c19b7a707
9,545
py
Python
lib/python2.7/site-packages/networkx/algorithms/centrality/current_flow_betweenness_subset.py
nishaero/wifi-userseg-ryu
1132f2c813b79eff755bdd1a9e73e7ad3980af7c
[ "Apache-2.0" ]
15
2018-04-26T08:17:18.000Z
2021-03-05T08:44:13.000Z
lib/python2.7/site-packages/networkx/algorithms/centrality/current_flow_betweenness_subset.py
nishaero/wifi-userseg-ryu
1132f2c813b79eff755bdd1a9e73e7ad3980af7c
[ "Apache-2.0" ]
71
2015-01-05T16:50:55.000Z
2020-09-30T19:17:47.000Z
lib/python2.7/site-packages/networkx/algorithms/centrality/current_flow_betweenness_subset.py
nishaero/wifi-userseg-ryu
1132f2c813b79eff755bdd1a9e73e7ad3980af7c
[ "Apache-2.0" ]
14
2015-02-15T22:19:18.000Z
2020-09-30T18:54:54.000Z
""" Current-flow betweenness centrality measures for subsets of nodes. """ # Copyright (C) 2010-2011 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. __author__ = """Aric Hagberg (hagberg@lanl.gov)""" __all_...
36.155303
80
0.629649
__author__ = """Aric Hagberg (hagberg@lanl.gov)""" __all__ = ['current_flow_betweenness_centrality_subset', 'edge_current_flow_betweenness_centrality_subset'] import itertools import networkx as nx from networkx.algorithms.centrality.flow_matrix import * def current_flow_betweenness_centrality_subs...
true
true
7902f31209e73eb3224b41d7307ffa1377d9fc51
6,479
py
Python
runBatch/run_FlapGainSweep_BAR.py
ptrbortolotti/pCrunch
df2488891d8a0d884cb90edd5bb0412ac0af248f
[ "Apache-2.0" ]
5
2020-06-30T14:23:18.000Z
2021-09-02T08:06:24.000Z
runBatch/run_FlapGainSweep_BAR.py
ptrbortolotti/pCrunch
df2488891d8a0d884cb90edd5bb0412ac0af248f
[ "Apache-2.0" ]
6
2021-03-30T21:17:35.000Z
2022-01-10T16:50:44.000Z
runBatch/run_FlapGainSweep_BAR.py
ptrbortolotti/pCrunch
df2488891d8a0d884cb90edd5bb0412ac0af248f
[ "Apache-2.0" ]
9
2020-05-18T14:33:18.000Z
2022-01-05T08:38:18.000Z
""" A python script to run a parameter sweep """ # Python tools import numpy as np import yaml import os # WISDEM tools from wisdem.aeroelasticse import runFAST_pywrapper, CaseGen_General from wisdem.aeroelasticse.Util import FileTools # ROSCO tools from ROSCO_toolbox import controller as ROSCO_controller from ROSCO_to...
34.280423
124
0.722334
import numpy as np import yaml import os from wisdem.aeroelasticse import runFAST_pywrapper, CaseGen_General from wisdem.aeroelasticse.Util import FileTools from ROSCO_toolbox import controller as ROSCO_controller from ROSCO_toolbox import turbine as ROSCO_turbine from ROSCO_toolbox import utilities as ROSCO_utiliti...
true
true
7902f36de311e71b3344188407ed5835b6f51866
2,924
py
Python
PyBank/main.py
abelgk/python-challenge
fbdc3344aac8702dff74d5a14f730dc7f0d105ff
[ "MIT" ]
null
null
null
PyBank/main.py
abelgk/python-challenge
fbdc3344aac8702dff74d5a14f730dc7f0d105ff
[ "MIT" ]
null
null
null
PyBank/main.py
abelgk/python-challenge
fbdc3344aac8702dff74d5a14f730dc7f0d105ff
[ "MIT" ]
null
null
null
import csv source_file = "Resources/budget_data.csv" output_file = "Resources/budget_data_analysis.txt" #initialize months counter, total income, decrease and increase in revenue amounts number_of_months = 0 # to track the total number of months income_total = 0 #variable to hold total income as we iterate through t...
45.6875
128
0.691518
import csv source_file = "Resources/budget_data.csv" output_file = "Resources/budget_data_analysis.txt" number_of_months = 0 income_total = 0 previous_income = 0 greatest_profit_increase = ["",0] greatest_loss_decrease = ["",1000000000000] change_in_pl = [] change_in_income = 0 with open(source_file) as b...
true
true
7902f3a437a67873a6e0d630b67eb7b60de96916
502
py
Python
it_purchase_project/it_purchase_app/migrations/0031_auto_20180607_1031.py
gokhankaraboga/test
6d01ab00b5c03f56e817283dce42330d22e29820
[ "MIT" ]
null
null
null
it_purchase_project/it_purchase_app/migrations/0031_auto_20180607_1031.py
gokhankaraboga/test
6d01ab00b5c03f56e817283dce42330d22e29820
[ "MIT" ]
null
null
null
it_purchase_project/it_purchase_app/migrations/0031_auto_20180607_1031.py
gokhankaraboga/test
6d01ab00b5c03f56e817283dce42330d22e29820
[ "MIT" ]
null
null
null
# Generated by Django 2.0.5 on 2018-06-07 10:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('it_purchase_app', '0030_auto_20180607_1020'), ] operations = [ migrations.AlterField( model_name='purchase', name='m...
26.421053
146
0.609562
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('it_purchase_app', '0030_auto_20180607_1020'), ] operations = [ migrations.AlterField( model_name='purchase', name='manager_approval', field=models.Char...
true
true
7902f3bb9e15286cf85d566adf8d86dd4b7ac876
42,104
py
Python
app.py
Lwnlcks/Vivato
316bd4ee58b9d56e061aacf0757f69a1e1e7c4d0
[ "BSD-3-Clause" ]
6
2020-05-20T00:19:41.000Z
2021-05-09T09:43:24.000Z
app.py
BlueWhiteDev/VientoEngine
9ab061576e5a98aafa2875e99f1e466e40a8c961
[ "BSD-3-Clause" ]
8
2021-01-13T15:37:30.000Z
2021-08-11T15:20:14.000Z
app.py
BlueWhiteDev/VientoEngine
9ab061576e5a98aafa2875e99f1e466e40a8c961
[ "BSD-3-Clause" ]
5
2020-05-30T06:50:49.000Z
2021-07-31T13:33:22.000Z
from sanic import Sanic, response, Blueprint from sanic.request import RequestParameters from sanic_jinja2 import SanicJinja2 from sanic_session import Session, AIORedisSessionInterface import aiosqlite import aiofiles import aioredis import asyncio import json import html import sys import os import re ...
44.087958
251
0.548713
from sanic import Sanic, response, Blueprint from sanic.request import RequestParameters from sanic_jinja2 import SanicJinja2 from sanic_session import Session, AIORedisSessionInterface import aiosqlite import aiofiles import aioredis import asyncio import json import html import sys import os import re ...
true
true
7902f492f731db00642041633d79b41eaaf7f05a
2,298
py
Python
utils/FocalLoss.py
lphxx6222712/MSAN_Retina
f23502603fc2e68afd66d7801f16aad286949b4d
[ "Apache-2.0" ]
1
2022-03-16T12:08:40.000Z
2022-03-16T12:08:40.000Z
utils/FocalLoss.py
86236291/MSAN_Retina
7723fbfe7c6fcd4e310beb8b776a9057af62a2f1
[ "Apache-2.0" ]
1
2022-03-31T05:16:21.000Z
2022-03-31T05:16:21.000Z
utils/FocalLoss.py
86236291/MSAN_Retina
7723fbfe7c6fcd4e310beb8b776a9057af62a2f1
[ "Apache-2.0" ]
1
2022-03-16T12:08:35.000Z
2022-03-16T12:08:35.000Z
import torch import torch.nn as nn def clip_by_tensor(t, t_min, t_max): result = (t>=t_min)*t+(t<t_min)*t_min result = (result<=t_max)*result+(result>t_max)*t_max return result class FocalLoss(nn.Module): def __init__(self, gamma=2, alpha=0.25): super(FocalLoss, self).__init__() self...
46.897959
122
0.639252
import torch import torch.nn as nn def clip_by_tensor(t, t_min, t_max): result = (t>=t_min)*t+(t<t_min)*t_min result = (result<=t_max)*result+(result>t_max)*t_max return result class FocalLoss(nn.Module): def __init__(self, gamma=2, alpha=0.25): super(FocalLoss, self).__init__() self...
true
true
7902f49c40844113abadadb659ecd46f82f4ce99
10,315
py
Python
preprocessing.py
MTC-ETH/RecommenderSystems
ede5aa961740348a68210f271397e1924c5f7cf6
[ "Apache-2.0" ]
null
null
null
preprocessing.py
MTC-ETH/RecommenderSystems
ede5aa961740348a68210f271397e1924c5f7cf6
[ "Apache-2.0" ]
2
2020-11-12T09:12:59.000Z
2020-11-12T09:16:46.000Z
preprocessing.py
MTC-ETH/RecommenderSystems
ede5aa961740348a68210f271397e1924c5f7cf6
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 ETH Zurich, Media Technology Center # # 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...
49.591346
140
0.728938
import datetime import os import pandas as pd def load_data(folder, input_path='user_item', cut=40,high_cut=1000000, seed=None): user_item_train, user_item_test, user_item_validation = pd.read_pickle( f'{folder}/{input_path}_train.pkl'), pd.read_pickle(f'{folder}/{input_path}_test.pkl...
true
true
7902f5679cd3a07f4c6afe32c6fadf126ee0ff76
170
py
Python
maxwell/doer.py
maxwell-dev/maxwell-client-python
9d68ae57974c29d7454f4e95ff3c103e45ac48c7
[ "Apache-2.0" ]
1
2020-11-18T14:39:19.000Z
2020-11-18T14:39:19.000Z
maxwell/doer.py
maxwell-dev/maxwell-client-python
9d68ae57974c29d7454f4e95ff3c103e45ac48c7
[ "Apache-2.0" ]
null
null
null
maxwell/doer.py
maxwell-dev/maxwell-client-python
9d68ae57974c29d7454f4e95ff3c103e45ac48c7
[ "Apache-2.0" ]
1
2021-07-15T01:59:19.000Z
2021-07-15T01:59:19.000Z
class Doer(object): def __init__(self, frontend): self.__frontend = frontend async def do(self, action): return await self.__frontend.do(action)
24.285714
47
0.664706
class Doer(object): def __init__(self, frontend): self.__frontend = frontend async def do(self, action): return await self.__frontend.do(action)
true
true
7902f74fc821350a2773f857e2d3735b48e4a3e4
1,063
py
Python
texaslan/voting/migrations/0003_auto_20170223_1207.py
hsmeans/texaslan.org
a981e7835381e77320e39536a619981ba9d03451
[ "MIT" ]
2
2018-02-06T06:24:03.000Z
2018-03-20T03:32:13.000Z
texaslan/voting/migrations/0003_auto_20170223_1207.py
hsmeans/texaslan.org
a981e7835381e77320e39536a619981ba9d03451
[ "MIT" ]
32
2017-02-21T20:01:43.000Z
2020-02-08T21:52:16.000Z
texaslan/voting/migrations/0003_auto_20170223_1207.py
hsmeans/texaslan.org
a981e7835381e77320e39536a619981ba9d03451
[ "MIT" ]
6
2017-03-21T21:16:40.000Z
2020-02-08T20:46:20.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-02-23 18:07 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('voting', '0002_auto_20170223_1054'), ] operations = [ migrations.RemoveField(...
35.433333
312
0.594544
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('voting', '0002_auto_20170223_1054'), ] operations = [ migrations.RemoveField( model_name='voteballot', name='vote_candidat...
true
true
7902f7e79e29a3cc621fbd2fea33ae1f59e18a46
1,836
py
Python
bdaybot/snailmail.py
Ahsoka/bdaybot
3aec9509119c28b294efdc0c76e8ee7fda7e8553
[ "MIT" ]
5
2021-01-21T07:49:50.000Z
2022-02-09T17:13:09.000Z
bdaybot/snailmail.py
Ahsoka/bdaybot
3aec9509119c28b294efdc0c76e8ee7fda7e8553
[ "MIT" ]
22
2020-12-30T02:13:32.000Z
2022-02-24T05:52:54.000Z
bdaybot/snailmail.py
Ahsoka/bdaybot
3aec9509119c28b294efdc0c76e8ee7fda7e8553
[ "MIT" ]
3
2021-02-02T05:21:14.000Z
2021-08-20T01:16:30.000Z
import os import pathlib from dotenv import load_dotenv, find_dotenv from fpdf import FPDF #envelope size: 110 by 145 mm # Elliot Torres # 4321 Loser Road # La Crescenta, CA 91214 # # Ryan Lee # 1234 Boomer Road # La Crescenta, CA 91214 load_dotenv(find_dotenv()) # types out address on envelope def sendmail( ...
25.5
72
0.634532
import os import pathlib from dotenv import load_dotenv, find_dotenv from fpdf import FPDF load_dotenv(find_dotenv()) def sendmail( FULLNAME, ADDRESS_LINE_ONE, CITY, STATE, ZIPCODE, PERSON=None, ADDRESS_LINE_TWO=None ): if PERSON is None: sender_name = os.environ['...
true
true
7902f803c0ccd4f78c6e5630fda57ecfb85a50ba
481
py
Python
output/models/ms_data/regex/re_g20_xsd/re_g20.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/regex/re_g18_xsd/re_g18.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/regex/re_g20_xsd/re_g20.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from typing import List, Optional @dataclass class Regex: att: Optional[str] = field( default=None, metadata={ "type": "Attribute", "pattern": r"[\C\?a-c\?]+", } ) @dataclass class Doc: class Meta: name = "d...
17.178571
40
0.503119
from dataclasses import dataclass, field from typing import List, Optional @dataclass class Regex: att: Optional[str] = field( default=None, metadata={ "type": "Attribute", "pattern": r"[\C\?a-c\?]+", } ) @dataclass class Doc: class Meta: name = "d...
true
true
7902f91df2e8b13c906f753f86fe4e48e8fd4868
5,249
py
Python
miniimgnet/KD-gan/task_generator.py
WendyBaiYunwei/FSL
e20470872d52332efdb1449b4593445c5d94e4fb
[ "MIT" ]
null
null
null
miniimgnet/KD-gan/task_generator.py
WendyBaiYunwei/FSL
e20470872d52332efdb1449b4593445c5d94e4fb
[ "MIT" ]
null
null
null
miniimgnet/KD-gan/task_generator.py
WendyBaiYunwei/FSL
e20470872d52332efdb1449b4593445c5d94e4fb
[ "MIT" ]
null
null
null
# code is based on https://github.com/katerakelly/pytorch-maml import torchvision import torchvision.datasets as dset import torchvision.transforms as transforms import torch from torch.utils.data import DataLoader,Dataset import random import os from PIL import Image import matplotlib.pyplot as plt import numpy as np ...
34.761589
129
0.668508
import torchvision import torchvision.datasets as dset import torchvision.transforms as transforms import torch from torch.utils.data import DataLoader,Dataset import random import os from PIL import Image import matplotlib.pyplot as plt import numpy as np from torch.utils.data.sampler import Sampler def imshow(img):...
true
true
7902f9afffe60bf396230930977afefb58a2a6f2
3,288
py
Python
applications/ShapeOptimizationApplication/python_scripts/value_logger_steepest_descent.py
Jacklwln/Kratos
12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de
[ "BSD-4-Clause" ]
1
2019-08-01T09:01:08.000Z
2019-08-01T09:01:08.000Z
applications/ShapeOptimizationApplication/python_scripts/value_logger_steepest_descent.py
Jacklwln/Kratos
12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de
[ "BSD-4-Clause" ]
null
null
null
applications/ShapeOptimizationApplication/python_scripts/value_logger_steepest_descent.py
Jacklwln/Kratos
12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de
[ "BSD-4-Clause" ]
null
null
null
# ============================================================================== # KratosShapeOptimizationApplication # # License: BSD License # license: ShapeOptimizationApplication/license.txt # # Main authors: Baumgaertner Daniel, https://github.com/dbaumgaertner # G...
50.584615
135
0.528893
from KratosMultiphysics import * from KratosMultiphysics.ShapeOptimizationApplication import * from value_logger_base import ValueLogger import csv from custom_timer import Timer class ValueLoggerSteepestDescent( ValueLogger ): def InitializeLogging( self ): with open(self.complete_lo...
true
true
7902fa697f6ac2fe46c7e67612dce698a7632d97
6,931
py
Python
tensorflow/python/autograph/impl/conversion_test.py
ranbir/tensorflow
46924b2f7bc4262b2c4b36841d393741113594ca
[ "Apache-2.0" ]
36
2016-12-17T15:25:25.000Z
2022-01-29T21:50:53.000Z
tensorflow/python/autograph/impl/conversion_test.py
ranbir/tensorflow
46924b2f7bc4262b2c4b36841d393741113594ca
[ "Apache-2.0" ]
30
2016-10-04T15:38:08.000Z
2020-07-16T12:09:33.000Z
tensorflow/python/autograph/impl/conversion_test.py
ranbir/tensorflow
46924b2f7bc4262b2c4b36841d393741113594ca
[ "Apache-2.0" ]
36
2017-07-27T21:12:40.000Z
2022-02-03T16:45:56.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
31.361991
80
0.68273
from __future__ import absolute_import from __future__ import division from __future__ import print_function import gast from tensorflow.python.autograph import utils from tensorflow.python.autograph.core import converter from tensorflow.python.autograph.impl import api from tensorflow.python.autograph...
true
true
7902fae55d57433b120b53b363455acee96728b0
236
py
Python
days/day101/Bite 18. Find the most common word/test_harry.py
alex-vegan/100daysofcode-with-python-course
b6c12316abe18274b7963371b8f0ed2fd549ef07
[ "MIT" ]
2
2018-10-28T17:12:37.000Z
2018-10-28T17:12:39.000Z
days/day101/Bite 18. Find the most common word/test_harry.py
alex-vegan/100daysofcode-with-python-course
b6c12316abe18274b7963371b8f0ed2fd549ef07
[ "MIT" ]
3
2018-10-28T17:11:04.000Z
2018-10-29T22:36:36.000Z
days/day101/Bite 18. Find the most common word/test_harry.py
alex-vegan/100daysofcode-with-python-course
b6c12316abe18274b7963371b8f0ed2fd549ef07
[ "MIT" ]
null
null
null
from harry import get_harry_most_common_word def test_get_harry_most_common_word(): top_word = get_harry_most_common_word() assert type(top_word) == tuple assert top_word[0] == 'dursley' assert top_word[1] == 45
29.5
45
0.724576
from harry import get_harry_most_common_word def test_get_harry_most_common_word(): top_word = get_harry_most_common_word() assert type(top_word) == tuple assert top_word[0] == 'dursley' assert top_word[1] == 45
true
true
7902fb8b9b62d3e2631f484ad462b2cd25c1434c
10,492
py
Python
install/app_store/tk-multi-shotgunpanel/v1.4.8/python/app/work_area_button.py
JoanAzpeitia/lp_sg
e0ee79555e419dd2ae3a5f31e5515b3f40b22a62
[ "MIT" ]
null
null
null
install/app_store/tk-multi-shotgunpanel/v1.4.8/python/app/work_area_button.py
JoanAzpeitia/lp_sg
e0ee79555e419dd2ae3a5f31e5515b3f40b22a62
[ "MIT" ]
null
null
null
install/app_store/tk-multi-shotgunpanel/v1.4.8/python/app/work_area_button.py
JoanAzpeitia/lp_sg
e0ee79555e419dd2ae3a5f31e5515b3f40b22a62
[ "MIT" ]
1
2020-02-15T10:42:56.000Z
2020-02-15T10:42:56.000Z
# Copyright (c) 2015 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to the S...
32.583851
106
0.629527
from sgtk.platform.qt import QtCore, QtGui import sgtk class WorkAreaButton(QtGui.QToolButton): WIDGET_WIDTH_COLLAPSED = 30 WIDGET_HEIGHT = 30 NON_WORK_AREA_TYPES = [ "PublishedFile", "Project", "TankPublishedFile", "Version", "Note", "Group", ...
true
true
7902fc15fa979fdab469120dbb1c690152b62290
3,355
py
Python
btcmagic/test_transaction.py
Dirbaio/btcmagic
be8d195dc019a0fdb5d352beb7ad555198f23dfb
[ "MIT" ]
null
null
null
btcmagic/test_transaction.py
Dirbaio/btcmagic
be8d195dc019a0fdb5d352beb7ad555198f23dfb
[ "MIT" ]
null
null
null
btcmagic/test_transaction.py
Dirbaio/btcmagic
be8d195dc019a0fdb5d352beb7ad555198f23dfb
[ "MIT" ]
null
null
null
from unittest import TestCase from btcmagic import transaction, convert import os import json class TestTransaction(TestCase): def setUp(self): self.tx_bin = convert.hex_to_bytes( '0100000001637aaf20d708fcff67bb688af6e41d1807e6883f736c50eacb6042bf6e6c829c010000008c493046022100da1e59d78bb88ca7c...
44.733333
571
0.613115
from unittest import TestCase from btcmagic import transaction, convert import os import json class TestTransaction(TestCase): def setUp(self): self.tx_bin = convert.hex_to_bytes( '0100000001637aaf20d708fcff67bb688af6e41d1807e6883f736c50eacb6042bf6e6c829c010000008c493046022100da1e59d78bb88ca7c...
true
true
7902fc527c8669cfd316d84932dece02136067cd
761
py
Python
src/gnome_extensions_cli/utils.py
essembeh/gnome-extensions-cli
4ce70b7db0411d752aaea2c1fef64fa6f553db83
[ "Apache-2.0" ]
12
2020-11-22T09:00:22.000Z
2022-01-22T20:12:12.000Z
src/gnome_extensions_cli/utils.py
essembeh/gnome-extensions-cli
4ce70b7db0411d752aaea2c1fef64fa6f553db83
[ "Apache-2.0" ]
2
2020-12-22T03:55:30.000Z
2022-02-14T18:34:05.000Z
src/gnome_extensions_cli/utils.py
essembeh/gnome-extensions-cli
4ce70b7db0411d752aaea2c1fef64fa6f553db83
[ "Apache-2.0" ]
null
null
null
import subprocess import sys from distutils.version import LooseVersion from re import fullmatch def get_shell_version(): try: for line in ( subprocess.check_output(["gnome-shell", "--version"]).decode().splitlines() ): m = fullmatch(r"GNOME Shell (?P<version>[0-9.]+)", lin...
23.78125
87
0.576873
import subprocess import sys from distutils.version import LooseVersion from re import fullmatch def get_shell_version(): try: for line in ( subprocess.check_output(["gnome-shell", "--version"]).decode().splitlines() ): m = fullmatch(r"GNOME Shell (?P<version>[0-9.]+)", lin...
true
true
7902fd84010547b574e549c0b484519222d451e3
19,748
py
Python
plugins/modules/oci_waas_access_rules_facts.py
slmjy/oci-ansible-collection
349c91e2868bf4706a6e3d6fb3b47fc622bfe11b
[ "Apache-2.0" ]
108
2020-05-19T20:46:10.000Z
2022-03-25T14:10:01.000Z
plugins/modules/oci_waas_access_rules_facts.py
slmjy/oci-ansible-collection
349c91e2868bf4706a6e3d6fb3b47fc622bfe11b
[ "Apache-2.0" ]
90
2020-06-14T22:07:11.000Z
2022-03-07T05:40:29.000Z
plugins/modules/oci_waas_access_rules_facts.py
slmjy/oci-ansible-collection
349c91e2868bf4706a6e3d6fb3b47fc622bfe11b
[ "Apache-2.0" ]
42
2020-08-30T23:09:12.000Z
2022-03-25T16:58:01.000Z
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
53.663043
160
0.597731
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = """ --- module: oci_waas_access_rules_facts short_description: Fetches details about one or ...
true
true
7902fe0e814a91c3eb4a76ee910bfd916912235b
496
py
Python
packages/python/plotly/plotly/validators/funnel/_insidetextanchor.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/funnel/_insidetextanchor.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/funnel/_insidetextanchor.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class InsidetextanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="insidetextanchor", parent_name="funnel", **kwargs): super(InsidetextanchorValidator, self).__init__( plotly_name=plotly_name, paren...
38.153846
87
0.669355
import _plotly_utils.basevalidators class InsidetextanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="insidetextanchor", parent_name="funnel", **kwargs): super(InsidetextanchorValidator, self).__init__( plotly_name=plotly_name, paren...
true
true
7902feb30271f5231dd4fcf6f88405f6572b5532
205
py
Python
calender/calender/doctype/alaqoal/test_alaqoal.py
bahaaabed/AumAlqura
9d12d7917225d9e82b4a480c3bc8f7acf8edab77
[ "MIT" ]
null
null
null
calender/calender/doctype/alaqoal/test_alaqoal.py
bahaaabed/AumAlqura
9d12d7917225d9e82b4a480c3bc8f7acf8edab77
[ "MIT" ]
null
null
null
calender/calender/doctype/alaqoal/test_alaqoal.py
bahaaabed/AumAlqura
9d12d7917225d9e82b4a480c3bc8f7acf8edab77
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2022, bahaa and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestAlaqoal(unittest.TestCase): pass
18.636364
44
0.756098
from __future__ import unicode_literals import unittest class TestAlaqoal(unittest.TestCase): pass
true
true
79030111cc4867fd53a652d3f11ae14e8ac7efab
26,292
py
Python
artifacts/old_dataset_versions/original_commits_v02/pennylane/pennylane#385/after/test_tf.py
MattePalte/Bugs-Quantum-Computing-Platforms
0c1c805fd5dfce465a8955ee3faf81037023a23e
[ "MIT" ]
3
2021-11-08T11:46:42.000Z
2021-12-27T10:13:38.000Z
artifacts/old_dataset_versions/minimal_commits/pennylane/pennylane#385/after/test_tf.py
MattePalte/Bugs-Quantum-Computing-Platforms
0c1c805fd5dfce465a8955ee3faf81037023a23e
[ "MIT" ]
2
2021-11-09T14:57:09.000Z
2022-01-12T12:35:58.000Z
artifacts/old_dataset_versions/original_commits_v02/pennylane/pennylane#385/after/test_tf.py
MattePalte/Bugs-Quantum-Computing-Platforms
0c1c805fd5dfce465a8955ee3faf81037023a23e
[ "MIT" ]
null
null
null
# Copyright 2018 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
35.577808
115
0.588924
import pytest import numpy as np try: import tensorflow as tf if tf.__version__[0] == "1": import tensorflow.contrib.eager as tfe tf.enable_eager_execution() Variable = tfe.Variable else: from tensorflow import Variable except ImportError as e: pass imp...
true
true
7903025f1f9a9404dc70aaab4d2f4d39ef35b4fc
3,729
py
Python
CircuitPython_101/basic_data_structures/song_book/code.py
billagee/Adafruit_Learning_System_Guides
6e90bd839161573780ab9937c3deaa115deca055
[ "MIT" ]
1
2018-10-17T19:37:08.000Z
2018-10-17T19:37:08.000Z
CircuitPython_101/basic_data_structures/song_book/code.py
billagee/Adafruit_Learning_System_Guides
6e90bd839161573780ab9937c3deaa115deca055
[ "MIT" ]
null
null
null
CircuitPython_101/basic_data_structures/song_book/code.py
billagee/Adafruit_Learning_System_Guides
6e90bd839161573780ab9937c3deaa115deca055
[ "MIT" ]
1
2018-07-16T15:47:52.000Z
2018-07-16T15:47:52.000Z
import time import board import debouncer import busio as io import digitalio import pulseio import adafruit_ssd1306 i2c = io.I2C(board.SCL, board.SDA) reset_pin = digitalio.DigitalInOut(board.D11) oled = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c, reset=reset_pin) button_select = debouncer.Debouncer(board.D7, mode=dig...
41.433333
185
0.448914
import time import board import debouncer import busio as io import digitalio import pulseio import adafruit_ssd1306 i2c = io.I2C(board.SCL, board.SDA) reset_pin = digitalio.DigitalInOut(board.D11) oled = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c, reset=reset_pin) button_select = debouncer.Debouncer(board.D7, mode=dig...
true
true
790303274af75b585a2a75ace0861b4caedf2d12
2,101
py
Python
tabkit/miniast.py
yandex-tabkit/tabkit
5d4cf05682c3435a89e85902b5ea1f1565aeff58
[ "X11" ]
9
2016-02-27T11:37:24.000Z
2020-04-02T09:13:35.000Z
tabkit/miniast.py
yandex-tabkit/tabkit
5d4cf05682c3435a89e85902b5ea1f1565aeff58
[ "X11" ]
4
2016-02-27T11:45:41.000Z
2020-04-24T10:50:37.000Z
tabkit/miniast.py
yandex-tabkit/tabkit
5d4cf05682c3435a89e85902b5ea1f1565aeff58
[ "X11" ]
2
2016-08-09T11:43:01.000Z
2020-04-23T18:43:52.000Z
from _ast import * from _ast import __version__ def parse(expr, filename='<unknown>', mode='exec'): """ Parse an expression into an AST node. Equivalent to compile(expr, filename, mode, PyCF_ONLY_AST). """ return compile(expr, filename, mode, PyCF_ONLY_AST) def dump(node, annotate_fields=True, inc...
37.517857
80
0.569729
from _ast import * from _ast import __version__ def parse(expr, filename='<unknown>', mode='exec'): return compile(expr, filename, mode, PyCF_ONLY_AST) def dump(node, annotate_fields=True, include_attributes=False): def _format(node): if isinstance(node, AST): fields = [(a, _format(b)) for...
true
true
7903046d64dbf2bd872e9a48d137c1877ae46763
2,264
py
Python
main.py
circlestarzero/GenshinMapAutoMarkTools
0d959938a93b43f0d9c082164ee1c5346752e364
[ "MIT" ]
167
2022-02-15T09:55:36.000Z
2022-03-31T08:10:34.000Z
main.py
ChengYang1998/GenshinMapAutoMarkTools
0d959938a93b43f0d9c082164ee1c5346752e364
[ "MIT" ]
5
2022-02-18T07:51:15.000Z
2022-03-12T11:19:19.000Z
main.py
ChengYang1998/GenshinMapAutoMarkTools
0d959938a93b43f0d9c082164ee1c5346752e364
[ "MIT" ]
30
2022-02-15T16:04:36.000Z
2022-03-25T08:18:58.000Z
import sys import win32gui import sys import re import os import delete_mark import keyboard import win32com.client import pythoncom from PyQt5.QtWidgets import QApplication from PyQt5.QtGui import QImage import map_insert import pic_locate import delete_mark base_dir = os.path.dirname(os.path.abspath(__file__)) app =...
37.733333
121
0.658127
import sys import win32gui import sys import re import os import delete_mark import keyboard import win32com.client import pythoncom from PyQt5.QtWidgets import QApplication from PyQt5.QtGui import QImage import map_insert import pic_locate import delete_mark base_dir = os.path.dirname(os.path.abspath(__file__)) app =...
true
true
7903048cb97d4d601b4f027fedda272a57825a7a
316
py
Python
examples/partial_path_process.py
mikelolasagasti/bandit
3dca7820158ea04668878186a29d34e81bbd7fe3
[ "Apache-2.0" ]
4,016
2018-04-26T13:01:54.000Z
2022-03-31T15:57:41.000Z
examples/partial_path_process.py
lweslen/bandit
2bd1ffaae1b83102af8587dcbeecd0b402dbec4e
[ "Apache-2.0" ]
570
2018-04-26T10:07:41.000Z
2022-03-29T18:55:09.000Z
examples/partial_path_process.py
lweslen/bandit
2bd1ffaae1b83102af8587dcbeecd0b402dbec4e
[ "Apache-2.0" ]
484
2018-04-26T09:59:46.000Z
2022-03-31T18:00:50.000Z
from subprocess import Popen as pop pop('gcc --version', shell=False) pop('/bin/gcc --version', shell=False) pop(var, shell=False) pop(['ls', '-l'], shell=False) pop(['/bin/ls', '-l'], shell=False) pop('../ls -l', shell=False) pop('c:\\hello\\something', shell=False) pop('c:/hello/something_else', shell=False)
22.571429
43
0.655063
from subprocess import Popen as pop pop('gcc --version', shell=False) pop('/bin/gcc --version', shell=False) pop(var, shell=False) pop(['ls', '-l'], shell=False) pop(['/bin/ls', '-l'], shell=False) pop('../ls -l', shell=False) pop('c:\\hello\\something', shell=False) pop('c:/hello/something_else', shell=False)
true
true
790304d3eb24049b4ad2a8328d9ce8cbafc80e03
2,532
py
Python
src/bot.py
paradox4280/Erimx
bb7a85d56927c0aa3195f9a1bfc9cef160a28066
[ "MIT" ]
null
null
null
src/bot.py
paradox4280/Erimx
bb7a85d56927c0aa3195f9a1bfc9cef160a28066
[ "MIT" ]
null
null
null
src/bot.py
paradox4280/Erimx
bb7a85d56927c0aa3195f9a1bfc9cef160a28066
[ "MIT" ]
null
null
null
#ERIMX Made By Paradox4280 aka c2FI, x2Fi, RG9t import discord, base64, codecs, requests, urllib.parse, datetime, asyncio, sys, praw import random, aiohttp, io, json, os, string, platform, time, bs4, colorama from discord.ext import ( commands ) from discord.voice_client import VoiceClient # from discord...
33.76
144
0.669431
import discord, base64, codecs, requests, urllib.parse, datetime, asyncio, sys, praw import random, aiohttp, io, json, os, string, platform, time, bs4, colorama from discord.ext import ( commands ) from discord.voice_client import VoiceClient from bs4 import BeautifulSoup as bs4 from colorama import Fo...
true
true
790305dd7cfb2800098189ccedfd45a30fe7dc03
9,287
py
Python
kuryr_kubernetes/tests/unit/cni/test_binding.py
dulek/kuryr-kubernetes
d76a9dad18320ecd57b7735aed34806aa07f4091
[ "Apache-2.0" ]
null
null
null
kuryr_kubernetes/tests/unit/cni/test_binding.py
dulek/kuryr-kubernetes
d76a9dad18320ecd57b7735aed34806aa07f4091
[ "Apache-2.0" ]
null
null
null
kuryr_kubernetes/tests/unit/cni/test_binding.py
dulek/kuryr-kubernetes
d76a9dad18320ecd57b7735aed34806aa07f4091
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
39.688034
78
0.676214
import mock import uuid from os_vif import objects as osv_objects from oslo_config import cfg from kuryr_kubernetes.cni.binding import base from kuryr_kubernetes import objects from kuryr_kubernetes.tests import base as test_base from kuryr_kubernetes.tests import fake CONF = cfg.CONF class TestDrive...
true
true
79030645f283270e550da64e73d9bf2c2f6c7fe1
51,131
py
Python
tensorflow/python/ops/nn.py
calebchoo/modulabs
10fbaf0581700641fc9b38b1bd722044bfb7c638
[ "Apache-2.0" ]
2
2020-06-30T05:52:37.000Z
2021-01-21T04:16:39.000Z
tensorflow/python/ops/nn.py
alainrk/tensorflow
314d9cd9b607460f8bfea80fc828b1521ca18443
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/nn.py
alainrk/tensorflow
314d9cd9b607460f8bfea80fc828b1521ca18443
[ "Apache-2.0" ]
2
2018-03-14T03:10:40.000Z
2018-09-13T13:59:40.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.152514
92
0.678258
from __future__ import absolute_import from __future__ import division from __future__ import print_function from six.moves import xrange from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.pyt...
true
true
7903076f9289940c5666a3312dc3329eddfa0677
8,230
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/aio/operations/_vpn_sites_configuration_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/aio/operations/_vpn_sites_configuration_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/aio/operations/_vpn_sites_configuration_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.490798
200
0.685541
from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impo...
true
true
790307f07fa4a5f5524d0083c9cf6207573d15d4
383
py
Python
sample_settings.py
avinassh/damaris
8c8f7922e4519f66124ff26ac7b107257f162185
[ "MIT" ]
null
null
null
sample_settings.py
avinassh/damaris
8c8f7922e4519f66124ff26ac7b107257f162185
[ "MIT" ]
null
null
null
sample_settings.py
avinassh/damaris
8c8f7922e4519f66124ff26ac7b107257f162185
[ "MIT" ]
null
null
null
# Telegram settings TG_CLI = '/opt/tg/bin/telegram-cli' TG_PUBKEY = '/opt/tg/tg-server.pub' RECEPIENT = '@your-tg-recepient' # Reddit App settings REDDIT_APP_KEY = 'c...w' REDDIT_APP_SECRET = 'T...c' REDDIT_USER_AGENT = ('Damaris Bot, v0.1. Read only bot to read posts from' '/r/cats') # Sample Ca...
21.277778
74
0.631854
TG_CLI = '/opt/tg/bin/telegram-cli' TG_PUBKEY = '/opt/tg/tg-server.pub' RECEPIENT = '@your-tg-recepient' REDDIT_APP_KEY = 'c...w' REDDIT_APP_SECRET = 'T...c' REDDIT_USER_AGENT = ('Damaris Bot, v0.1. Read only bot to read posts from' '/r/cats') CAPTIONS = [ "some", "random", "string...
true
true
79030847982518e44efd97a2103c064babe7d8b0
279
py
Python
cart/urls.py
knkemree/django_ecommerce_website
19876976bc872cf4835778d12d82756c573cf3b9
[ "bzip2-1.0.6" ]
null
null
null
cart/urls.py
knkemree/django_ecommerce_website
19876976bc872cf4835778d12d82756c573cf3b9
[ "bzip2-1.0.6" ]
8
2020-06-06T01:22:59.000Z
2022-01-13T02:14:24.000Z
cart/urls.py
knkemree/django_ecommerce_website
19876976bc872cf4835778d12d82756c573cf3b9
[ "bzip2-1.0.6" ]
null
null
null
from django.urls import path from . import views app_name = 'cart' urlpatterns = [ path('', views.cart_detail, name='cart_detail'), path('add/<int:product_id>/',views.cart_add,name='cart_add'), path('remove/<int:product_id>/',views.cart_remove,name='cart_remove'), ]
31
74
0.702509
from django.urls import path from . import views app_name = 'cart' urlpatterns = [ path('', views.cart_detail, name='cart_detail'), path('add/<int:product_id>/',views.cart_add,name='cart_add'), path('remove/<int:product_id>/',views.cart_remove,name='cart_remove'), ]
true
true
79030b771a82130fd565bc3651c300b549c8e2a4
733
py
Python
soft/template.qiskit.ansatz/python_code/tiny2/custom_ansatz.py
ctuning/qiskit
33126f7c2e00331303727b712717ded6c7420e18
[ "BSD-3-Clause" ]
7
2018-05-05T09:47:54.000Z
2019-04-04T10:00:38.000Z
soft/template.qiskit.ansatz/python_code/tiny2/custom_ansatz.py
ctuning/qiskit
33126f7c2e00331303727b712717ded6c7420e18
[ "BSD-3-Clause" ]
7
2018-03-13T15:38:12.000Z
2018-12-21T15:15:20.000Z
soft/template.qiskit.ansatz/python_code/tiny2/custom_ansatz.py
ctuning/qiskit
33126f7c2e00331303727b712717ded6c7420e18
[ "BSD-3-Clause" ]
2
2018-10-05T11:58:06.000Z
2020-01-19T21:10:17.000Z
#!/usr/bin/env python3 import numpy as np import qiskit num_params = 2 # make sure you set this correctly to the number of parameters used by the ansatz ## Previously used for Helium VQE in Rigetti implementation # def tiny_ansatz_2(current_params): q = qiskit.QuantumRegister(2, "q") qc = qiskit.Quantum...
22.90625
101
0.581173
import numpy as np import qiskit num_params = 2 mRegister(2, "q") qc = qiskit.QuantumCircuit(q, qiskit.ClassicalRegister(2, "c")) qc.x(q[0]) qc.x(q[1]) qc.rx( np.pi/2, q[0]) qc.h(q[1]) qc.cx(q[0], q[1]) qc.rz(current_params[0], q[1]) qc.cx(q[0], q[1]) qc.rx(-np.pi/2, q[0])...
true
true
79030be3f52ee8c3da903478362c1c99f6620bcb
6,599
py
Python
tests-cuda/test_0345-cuda-num.py
colesbury/awkward-1.0
d036ab18eb54de8a2571d9f179d315ac8ee22119
[ "BSD-3-Clause" ]
null
null
null
tests-cuda/test_0345-cuda-num.py
colesbury/awkward-1.0
d036ab18eb54de8a2571d9f179d315ac8ee22119
[ "BSD-3-Clause" ]
null
null
null
tests-cuda/test_0345-cuda-num.py
colesbury/awkward-1.0
d036ab18eb54de8a2571d9f179d315ac8ee22119
[ "BSD-3-Clause" ]
null
null
null
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE import pytest # noqa: F401 import numpy as np # noqa: F401 import cupy as cp # noqa: F401 import awkward as ak # noqa: F401 def test_num_1(): content = ak.Array( ["one", "two", "three", "four", "five", "six", "se...
36.258242
88
0.54387
import pytest import numpy as np import cupy as cp import awkward as ak def test_num_1(): content = ak.Array( ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine"] ).layout bitmask = ak.layout.IndexU8(np.array([40, 34], dtype=np.uint8)) array = ak.Array(ak.layout....
true
true
79030c8e38c8d5bd7994b0e47923280d40e16904
4,714
py
Python
exercises/city_temperature_prediction.py
noamwino/IML.HUJI
0b1b6f333a16200fa7717af1be12e5f38694b74c
[ "MIT" ]
null
null
null
exercises/city_temperature_prediction.py
noamwino/IML.HUJI
0b1b6f333a16200fa7717af1be12e5f38694b74c
[ "MIT" ]
null
null
null
exercises/city_temperature_prediction.py
noamwino/IML.HUJI
0b1b6f333a16200fa7717af1be12e5f38694b74c
[ "MIT" ]
null
null
null
import os.path import IMLearn.learners.regressors.linear_regression from IMLearn.learners.regressors import PolynomialFitting from IMLearn.utils import split_train_test import numpy as np import pandas as pd import plotly.express as px import plotly.io as pio pio.templates.default = "simple_white" from IMLearn.met...
35.179104
108
0.65507
import os.path import IMLearn.learners.regressors.linear_regression from IMLearn.learners.regressors import PolynomialFitting from IMLearn.utils import split_train_test import numpy as np import pandas as pd import plotly.express as px import plotly.io as pio pio.templates.default = "simple_white" from IMLearn.met...
true
true
79030dfbe3d093524733e1c0dff423f969d07f9f
1,060
py
Python
quantum.py
duboviy/misc
4cd8cbcf12fc29dd2f12699fbd2f3dd738b5e4b5
[ "MIT" ]
10
2016-12-19T19:22:17.000Z
2021-03-08T21:12:36.000Z
quantum.py
duboviy/misc
4cd8cbcf12fc29dd2f12699fbd2f3dd738b5e4b5
[ "MIT" ]
null
null
null
quantum.py
duboviy/misc
4cd8cbcf12fc29dd2f12699fbd2f3dd738b5e4b5
[ "MIT" ]
6
2016-12-20T18:12:21.000Z
2017-05-15T06:09:21.000Z
"""Simple quantum computations simulation.""" import numpy as np def I(): """Identity operator.""" return np.identity(2) def X(): """X-rotation, negation operator.""" return np.identity(2)[..., ::-1] def H(): """Adamara operator, superposition.""" return np.array([[1, 1], [1, -1]]) / np.sqrt(2) def SW...
17.966102
57
0.580189
import numpy as np def I(): return np.identity(2) def X(): return np.identity(2)[..., ::-1] def H(): return np.array([[1, 1], [1, -1]]) / np.sqrt(2) def SWAP(): m = np.identity(4) m[[1, 2]] = m[[2, 1]] return m def CX(): m = np.identity(4) m[[3, 2]] = m[[2, 3]] return m def apply(v, *gates): ...
true
true
79030e1e3ca6bf67306602b801266594f48148c1
2,766
py
Python
homeassistant/components/iaqualink/light.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
11
2018-02-16T15:35:47.000Z
2020-01-14T15:20:00.000Z
homeassistant/components/iaqualink/light.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
87
2020-07-06T22:22:54.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/iaqualink/light.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11
2020-12-16T13:48:14.000Z
2022-02-01T00:28:05.000Z
"""Support for Aqualink pool lights.""" from iaqualink import AqualinkLightEffect from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_EFFECT, DOMAIN, SUPPORT_BRIGHTNESS, SUPPORT_EFFECT, LightEntity, ) from homeassistant.config_entries import ConfigEntry from homeassistant.core im...
28.22449
76
0.649313
from iaqualink import AqualinkLightEffect from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_EFFECT, DOMAIN, SUPPORT_BRIGHTNESS, SUPPORT_EFFECT, LightEntity, ) from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from . import Aquali...
true
true
79030f39862224134730805990b7b4e2beb8bd18
1,930
py
Python
src/apscheduler/eventbrokers/async_local.py
sasirajpuvvada/apscheduler
8b68b6c5d1c63faae1ba3769b6475b396328e3a3
[ "MIT" ]
4,294
2015-12-25T19:52:20.000Z
2022-03-31T19:40:12.000Z
src/apscheduler/eventbrokers/async_local.py
sasirajpuvvada/apscheduler
8b68b6c5d1c63faae1ba3769b6475b396328e3a3
[ "MIT" ]
505
2015-12-03T13:57:22.000Z
2022-03-31T00:32:56.000Z
src/apscheduler/eventbrokers/async_local.py
sasirajpuvvada/apscheduler
8b68b6c5d1c63faae1ba3769b6475b396328e3a3
[ "MIT" ]
692
2015-12-24T22:54:56.000Z
2022-03-29T09:32:02.000Z
from __future__ import annotations from asyncio import iscoroutine from contextlib import AsyncExitStack from typing import Any, Callable import attr from anyio import create_task_group from anyio.abc import TaskGroup from ..abc import AsyncEventBroker from ..events import Event from ..util import reentrant from .ba...
33.859649
94
0.701036
from __future__ import annotations from asyncio import iscoroutine from contextlib import AsyncExitStack from typing import Any, Callable import attr from anyio import create_task_group from anyio.abc import TaskGroup from ..abc import AsyncEventBroker from ..events import Event from ..util import reentrant from .ba...
true
true
7903105d025e30fcc0fce2293a672e902b226ce1
3,923
py
Python
tests/parsers/esedb_plugins/msie_webcache.py
roshanmaskey/plaso
637856f578eb4bc81f62b97d7f483f69314e7f47
[ "Apache-2.0" ]
1,253
2015-01-02T13:58:02.000Z
2022-03-31T08:43:39.000Z
tests/parsers/esedb_plugins/msie_webcache.py
roshanmaskey/plaso
637856f578eb4bc81f62b97d7f483f69314e7f47
[ "Apache-2.0" ]
3,388
2015-01-02T11:17:58.000Z
2022-03-30T10:21:45.000Z
tests/parsers/esedb_plugins/msie_webcache.py
roshanmaskey/plaso
637856f578eb4bc81f62b97d7f483f69314e7f47
[ "Apache-2.0" ]
376
2015-01-20T07:04:54.000Z
2022-03-04T23:53:00.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the Microsoft Internet Explorer WebCache database.""" import unittest from plaso.lib import definitions from plaso.parsers.esedb_plugins import msie_webcache from tests.parsers.esedb_plugins import test_lib class MsieWebCacheESEDBPluginTest(test_lib.ESEDB...
39.23
80
0.702014
import unittest from plaso.lib import definitions from plaso.parsers.esedb_plugins import msie_webcache from tests.parsers.esedb_plugins import test_lib class MsieWebCacheESEDBPluginTest(test_lib.ESEDBPluginTestCase): def testConvertHeadersValues(self): plugin = msie_webcache.MsieWebCacheESEDBPlugin()...
true
true
790311018db12a006971d64e0c9032f3195ee66e
8,652
py
Python
dummydf/sql/dataframe.py
moriyoshi/dummydf
39d82f0022ea9d072ce56724f16bf363a37b1bbf
[ "MIT" ]
null
null
null
dummydf/sql/dataframe.py
moriyoshi/dummydf
39d82f0022ea9d072ce56724f16bf363a37b1bbf
[ "MIT" ]
null
null
null
dummydf/sql/dataframe.py
moriyoshi/dummydf
39d82f0022ea9d072ce56724f16bf363a37b1bbf
[ "MIT" ]
null
null
null
# coding: utf-8 # # Copyright 2018 Moriyoshi Koizumi # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, me...
33.796875
118
0.589112
import six import pandas from .column import _DataFrameColumn, _Function, _Literal, eval_column, infer_data_type, compile_to_raf, resolve_alias from .functions import SimpleAggregationFunctionSpec from .group import GroupedData from .types import StructType, StructField class _Raw(object): d...
true
true
790311fbfeca18a7586a061b27aa05ed3a16fc1d
29,143
py
Python
pommerman/forward_model.py
psyoblade/playground
28e60c24004a84d2fd70907988b06bd46d0446ca
[ "Apache-2.0" ]
2
2018-08-26T05:41:10.000Z
2018-09-09T04:36:48.000Z
pommerman/forward_model.py
psyoblade/playground
28e60c24004a84d2fd70907988b06bd46d0446ca
[ "Apache-2.0" ]
null
null
null
pommerman/forward_model.py
psyoblade/playground
28e60c24004a84d2fd70907988b06bd46d0446ca
[ "Apache-2.0" ]
2
2018-08-26T05:41:12.000Z
2018-09-09T04:37:11.000Z
'''Module to manage and advanced game state''' from collections import defaultdict import numpy as np from . import constants from . import characters from . import utility class ForwardModel(object): """Class for helping with the [forward] modeling of the game state.""" def run(self, num_times...
44.561162
103
0.564801
from collections import defaultdict import numpy as np from . import constants from . import characters from . import utility class ForwardModel(object): def run(self, num_times, board, agents, bombs, items, flames, is_partiall...
true
true
7903133b41fa1b97b42a57086a2ea357c2af4943
160
py
Python
civet/__init__.py
PMKielstra/Civet
1731a1b1e670a082dfcbf545f3431a79d7954411
[ "MIT" ]
3
2020-06-27T21:33:53.000Z
2020-07-03T07:39:46.000Z
civet/__init__.py
PMKielstra/Civet
1731a1b1e670a082dfcbf545f3431a79d7954411
[ "MIT" ]
null
null
null
civet/__init__.py
PMKielstra/Civet
1731a1b1e670a082dfcbf545f3431a79d7954411
[ "MIT" ]
null
null
null
from .civet import Civet from .building_blocks import * from .builtin_scenario_sources import * from .builtin_analyzers import * from .builtin_outputs import *
26.666667
39
0.81875
from .civet import Civet from .building_blocks import * from .builtin_scenario_sources import * from .builtin_analyzers import * from .builtin_outputs import *
true
true
79031374fd0c3d90fc7647c75e2c9ee9cc97362f
1,534
py
Python
widgets/lv_arc/lv_arc.py
ndrogness/lvgl_micropython_examples
ea2245a47af8bb8545d465d3b6611b85b9ca948b
[ "MIT" ]
1
2020-11-20T00:48:38.000Z
2020-11-20T00:48:38.000Z
widgets/lv_arc/lv_arc.py
ndrogness/lvgl_micropython_examples
ea2245a47af8bb8545d465d3b6611b85b9ca948b
[ "MIT" ]
null
null
null
widgets/lv_arc/lv_arc.py
ndrogness/lvgl_micropython_examples
ea2245a47af8bb8545d465d3b6611b85b9ca948b
[ "MIT" ]
null
null
null
import lvgl as lv import styles def lv_arc(screen): # Create the arc object on lv screen, ie a lv.scr() object arc = lv.arc(screen) # Set arc size arc.set_size(150, 150) # Set arc background style color blue arc.add_style(arc.PART.BG, styles.gstyle_bg1) # Set arc indicator (i.e. line) st...
29.5
98
0.653846
import lvgl as lv import styles def lv_arc(screen): arc = lv.arc(screen) arc.set_size(150, 150) arc.add_style(arc.PART.BG, styles.gstyle_bg1) arc.add_style(arc.PART.INDIC, styles.gstyle_line1) # in a clockwise direction. The angles should be in [0;360] range. ...
true
true
7903138967210dfe1c31193e8ec853099fe942e5
4,968
py
Python
diy/api.py
sodrooome/diy
1e7e087ad6608ed6770d89aa06ebb347ce5c665c
[ "BSD-3-Clause" ]
6
2019-07-25T07:36:52.000Z
2019-10-31T13:08:01.000Z
diy/api.py
sodrooome/diy
1e7e087ad6608ed6770d89aa06ebb347ce5c665c
[ "BSD-3-Clause" ]
4
2019-06-26T04:25:34.000Z
2020-01-06T19:43:41.000Z
diy/api.py
sodrooome/diy
1e7e087ad6608ed6770d89aa06ebb347ce5c665c
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals import os import inspect from webob import Request, Response from parse import parse from jinja2 import FileSystemLoader, Environment from requests import session as RequestsSession from wsgiadapter import WSGIAdapter as RequestWSGIAdapter class API: """ this is just ...
25.218274
79
0.633655
from __future__ import unicode_literals import os import inspect from webob import Request, Response from parse import parse from jinja2 import FileSystemLoader, Environment from requests import session as RequestsSession from wsgiadapter import WSGIAdapter as RequestWSGIAdapter class API: def __call__(self, e...
true
true
790313c768903bf599eb99df2b3f8f8da465457d
1,083
py
Python
python_basics/Method_ function/mixed_function_guess_game.py
alok8765/basic_python_practicse
9bd61f0b03fc1e703a75df39862a24692bb3fdb7
[ "MIT" ]
null
null
null
python_basics/Method_ function/mixed_function_guess_game.py
alok8765/basic_python_practicse
9bd61f0b03fc1e703a75df39862a24692bb3fdb7
[ "MIT" ]
null
null
null
python_basics/Method_ function/mixed_function_guess_game.py
alok8765/basic_python_practicse
9bd61f0b03fc1e703a75df39862a24692bb3fdb7
[ "MIT" ]
null
null
null
# First create a Shuffle list my_shuffle_list = [1,2,3,4,5] # Now Import shuffle from random import shuffle shuffle(my_shuffle_list) print(my_shuffle_list) # check wether shuffle is working or not # Now let's create Guess Game. First create a list mylist = ['','o',''] # Define function which will used furth...
27.075
84
0.6759
my_shuffle_list = [1,2,3,4,5] from random import shuffle shuffle(my_shuffle_list) print(my_shuffle_list) mylist = ['','o',''] # Define function which will used further def shuffle_list(mylist): shuffle(mylist) return mylist print(mylist) # First check your mylist without shuffl...
true
true
790313d43c91c5b782960900908cf29f70b61a60
232
py
Python
fieldbillard/__init__.py
DFNaiff/FieldBillard
0cbdfbe3e0ee516f5820b2dfa27d9c4ca10aaba4
[ "BSD-3-Clause" ]
null
null
null
fieldbillard/__init__.py
DFNaiff/FieldBillard
0cbdfbe3e0ee516f5820b2dfa27d9c4ca10aaba4
[ "BSD-3-Clause" ]
null
null
null
fieldbillard/__init__.py
DFNaiff/FieldBillard
0cbdfbe3e0ee516f5820b2dfa27d9c4ca10aaba4
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from . import fields from . import integrators from . import points from . import system from . import utils from . import visualizer from .system import NBodySystem from .visualizer import Visualizer, run
19.333333
39
0.75
from . import fields from . import integrators from . import points from . import system from . import utils from . import visualizer from .system import NBodySystem from .visualizer import Visualizer, run
true
true
790313efffec6d2ea46eff668ac1614bdf07855b
23,135
py
Python
index.py
markschrik/syncarr
5a0a252538964d0bc53a8142ab7d8106db51f635
[ "MIT" ]
1
2022-02-20T03:22:35.000Z
2022-02-20T03:22:35.000Z
index.py
markschrik/syncarr
5a0a252538964d0bc53a8142ab7d8106db51f635
[ "MIT" ]
null
null
null
index.py
markschrik/syncarr
5a0a252538964d0bc53a8142ab7d8106db51f635
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import logging import requests import json import configparser import sys import time import re from os.path import dirname from config import ( instanceA_url, instanceA_key, instanceA_path, instanceA_profile, instanceA_profile_id, instanceA_profile_filter, instanceA_profile_f...
46.085657
515
0.684504
import os import logging import requests import json import configparser import sys import time import re from os.path import dirname from config import ( instanceA_url, instanceA_key, instanceA_path, instanceA_profile, instanceA_profile_id, instanceA_profile_filter, instanceA_profile_filter_id, instanc...
true
true
7903150dcac929651d658babe370557022ca5561
18,651
py
Python
opensilexClientToolsPython/models/study_details_dto.py
OpenSILEX/opensilexClientToolsPython
41b1e7e707670ecf1b2c06d79bdd9749945788cb
[ "RSA-MD" ]
null
null
null
opensilexClientToolsPython/models/study_details_dto.py
OpenSILEX/opensilexClientToolsPython
41b1e7e707670ecf1b2c06d79bdd9749945788cb
[ "RSA-MD" ]
7
2021-05-25T14:06:04.000Z
2021-11-05T15:42:14.000Z
opensilexClientToolsPython/models/study_details_dto.py
OpenSILEX/opensilexClientToolsPython
41b1e7e707670ecf1b2c06d79bdd9749945788cb
[ "RSA-MD" ]
null
null
null
# coding: utf-8 """ OpenSilex API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: INSTANCE-SNAPSHOT Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F4...
28.173716
434
0.609458
import pprint import re import six class StudyDetailsDTO(object): swagger_types = { 'active': 'str', 'additional_info': 'dict(str, object)', 'common_crop_name': 'str', 'documentation_url': 'str', 'end_date': 'str', 'location_db_id': 'str', 'location_...
true
true
79031584beddb09002af962a76bc1dbb6e773115
371
py
Python
metaci/cumulusci/utils.py
abhishekalgo/metaci
cd62473b3fb85fb0f39623f9fb2850993ff708a5
[ "BSD-3-Clause" ]
null
null
null
metaci/cumulusci/utils.py
abhishekalgo/metaci
cd62473b3fb85fb0f39623f9fb2850993ff708a5
[ "BSD-3-Clause" ]
null
null
null
metaci/cumulusci/utils.py
abhishekalgo/metaci
cd62473b3fb85fb0f39623f9fb2850993ff708a5
[ "BSD-3-Clause" ]
1
2018-12-07T09:51:07.000Z
2018-12-07T09:51:07.000Z
from cumulusci.core.config import ConnectedAppOAuthConfig from django.conf import settings def get_connected_app(): return ConnectedAppOAuthConfig( { "callback_url": settings.CONNECTED_APP_CALLBACK_URL, "client_id": settings.CONNECTED_APP_CLIENT_ID, "client_secret": set...
28.538462
66
0.708895
from cumulusci.core.config import ConnectedAppOAuthConfig from django.conf import settings def get_connected_app(): return ConnectedAppOAuthConfig( { "callback_url": settings.CONNECTED_APP_CALLBACK_URL, "client_id": settings.CONNECTED_APP_CLIENT_ID, "client_secret": set...
true
true
790315e08da77a2a1c9248ca5b30294a6922ce54
7,492
py
Python
data_loaders/KLens.py
klens-codes/MaskFlownet-Pytorch
94d41fd20f774845a1b2df7f77ec95c44217af94
[ "MIT" ]
null
null
null
data_loaders/KLens.py
klens-codes/MaskFlownet-Pytorch
94d41fd20f774845a1b2df7f77ec95c44217af94
[ "MIT" ]
null
null
null
data_loaders/KLens.py
klens-codes/MaskFlownet-Pytorch
94d41fd20f774845a1b2df7f77ec95c44217af94
[ "MIT" ]
null
null
null
import os import re import struct import glob import numpy as np import frame_utils import skimage import skimage.io import torch from torch.utils.data import Dataset class KLens(Dataset): #def __init__(self,raft_path="/data2/opticalflow/rnd/opticalflow/RAFT/out_klens_raft_chairs", root_path="/data2/opticalflow/...
85.136364
788
0.695275
import os import re import struct import glob import numpy as np import frame_utils import skimage import skimage.io import torch from torch.utils.data import Dataset class KLens(Dataset): def __init__(self,raft_path="/data2/opticalflow/algo_comp/flownet2/out/", root_path="/data2/opticalflow/KLENS/images/",...
true
true
790316507df3bccaae1a4f1bba883ca7ede96d29
27,963
py
Python
pycoin/cmds/tx.py
mewald55/pycoin_ypub-zpub
8c7933802288e2ab33bf611659447fe24b96ada5
[ "MIT" ]
null
null
null
pycoin/cmds/tx.py
mewald55/pycoin_ypub-zpub
8c7933802288e2ab33bf611659447fe24b96ada5
[ "MIT" ]
null
null
null
pycoin/cmds/tx.py
mewald55/pycoin_ypub-zpub
8c7933802288e2ab33bf611659447fe24b96ada5
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import argparse import calendar import codecs import datetime import io import os.path import re import subprocess import sys from pycoinzpub.convention import tx_fee, satoshi_to_mbtc from pycoinzpub.encoding import hash160 from pycoinzpub.key import Key fr...
37.086207
120
0.620999
from __future__ import print_function import argparse import calendar import codecs import datetime import io import os.path import re import subprocess import sys from pycoinzpub.convention import tx_fee, satoshi_to_mbtc from pycoinzpub.encoding import hash160 from pycoinzpub.key import Key from pycoinzpub.key.val...
true
true
790317158e85223b1ef9cc2e4ede51c7c865500d
165,803
py
Python
regolith/schemas.py
priyankaanehra/regolith
393c8a88eb7657d1ae5ea017e2cd0b72ed981e8f
[ "CC0-1.0" ]
null
null
null
regolith/schemas.py
priyankaanehra/regolith
393c8a88eb7657d1ae5ea017e2cd0b72ed981e8f
[ "CC0-1.0" ]
null
null
null
regolith/schemas.py
priyankaanehra/regolith
393c8a88eb7657d1ae5ea017e2cd0b72ed981e8f
[ "CC0-1.0" ]
null
null
null
"""Database schemas, examples, and tools""" import copy from warnings import warn from cerberus import Validator from .sorters import POSITION_LEVELS SORTED_POSITION = sorted(POSITION_LEVELS.keys(), key=POSITION_LEVELS.get) ACTIVITIES_TYPE = ["teaching", "research"] AGENCIES = ["nsf", "doe"] APPOINTMENTS_TYPE = ["g...
39.058422
145
0.424287
import copy from warnings import warn from cerberus import Validator from .sorters import POSITION_LEVELS SORTED_POSITION = sorted(POSITION_LEVELS.keys(), key=POSITION_LEVELS.get) ACTIVITIES_TYPE = ["teaching", "research"] AGENCIES = ["nsf", "doe"] APPOINTMENTS_TYPE = ["gra", "ss", "pd", "ug"] COMMITTEES_TYPE = ["p...
true
true
79031751b8223ad4874b9d60640bb7cc5ead7850
18,724
py
Python
plugins/modules/oci_waas_certificate_facts.py
hanielburton/oci-ansible-collection
dfdffde637f746d346ba35569be8c3a3407022f2
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_waas_certificate_facts.py
hanielburton/oci-ansible-collection
dfdffde637f746d346ba35569be8c3a3407022f2
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_waas_certificate_facts.py
hanielburton/oci-ansible-collection
dfdffde637f746d346ba35569be8c3a3407022f2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2017, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
37.224652
159
0.553354
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = """ --- module: oci_waas_certificate_facts short_description: Fetches details about one or m...
true
true