hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
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
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
b62c597f195dcf743fb3a167a9eaed18cc862a19
158
py
Python
Codeforces/B_Valerii_Against_Everyone.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
Codeforces/B_Valerii_Against_Everyone.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
Codeforces/B_Valerii_Against_Everyone.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
for _ in range(int(input())): n=int(input()) l=list(map(int,input().split())) if len(set(l))<n: print("YES") else: print("NO")
22.571429
36
0.493671
for _ in range(int(input())): n=int(input()) l=list(map(int,input().split())) if len(set(l))<n: print("YES") else: print("NO")
0
0
0
372cd338d7801eac151b4a42aaafdb47487007b8
3,692
py
Python
auto_pose/test/aae_retina_webcam_pose.py
dfraska-ftl/AugmentedAutoencoder
ef000e82c1b64ab72bdb203ed1f4ce6fcd536829
[ "MIT" ]
null
null
null
auto_pose/test/aae_retina_webcam_pose.py
dfraska-ftl/AugmentedAutoencoder
ef000e82c1b64ab72bdb203ed1f4ce6fcd536829
[ "MIT" ]
null
null
null
auto_pose/test/aae_retina_webcam_pose.py
dfraska-ftl/AugmentedAutoencoder
ef000e82c1b64ab72bdb203ed1f4ce6fcd536829
[ "MIT" ]
null
null
null
import cv2 import numpy as np import os import argparse import configparser from webcam_video_stream import WebcamVideoStream from auto_pose.ae.utils import get_dataset_path from aae_retina_pose_estimator import AePoseEstimator if __name__ == '__main__': main()
41.022222
134
0.592362
import cv2 import numpy as np import os import argparse import configparser from webcam_video_stream import WebcamVideoStream from auto_pose.ae.utils import get_dataset_path from aae_retina_pose_estimator import AePoseEstimator def main(): parser = argparse.ArgumentParser() parser.add_argument("-test_config",...
3,401
0
23
ab375a9a86a57d9bae7928a3b13e6f66fe01c183
3,825
py
Python
cdlib/test/test_nodeclustering.py
xing-lab-pitt/cdlib
590e145429cda1db4d3671c994c502bedd77f108
[ "BSD-2-Clause" ]
248
2019-02-17T05:31:22.000Z
2022-03-30T04:57:20.000Z
cdlib/test/test_nodeclustering.py
xing-lab-pitt/cdlib
590e145429cda1db4d3671c994c502bedd77f108
[ "BSD-2-Clause" ]
130
2019-02-10T19:35:55.000Z
2022-03-31T10:58:39.000Z
cdlib/test/test_nodeclustering.py
xing-lab-pitt/cdlib
590e145429cda1db4d3671c994c502bedd77f108
[ "BSD-2-Clause" ]
70
2019-02-15T19:04:29.000Z
2022-03-27T12:58:50.000Z
import unittest import networkx as nx from cdlib import algorithms from cdlib import NodeClustering from cdlib import evaluation
47.8125
87
0.722614
import unittest import networkx as nx from cdlib import algorithms from cdlib import NodeClustering from cdlib import evaluation class NodeClusteringTests(unittest.TestCase): def test_to_json(self): g = nx.karate_club_graph() coms = algorithms.louvain(g) self.assertIsInstance(coms, NodeClu...
3,541
24
130
4c77f6d85b11a737eb2343a49ac72153de3cce51
1,656
py
Python
gammapy/datasets/data/poisson_stats_image/fit_sherpa.py
joleroi/gammapy
c4e0c4bd74c79d30e0837559d18b7a1a269f70d9
[ "BSD-3-Clause" ]
null
null
null
gammapy/datasets/data/poisson_stats_image/fit_sherpa.py
joleroi/gammapy
c4e0c4bd74c79d30e0837559d18b7a1a269f70d9
[ "BSD-3-Clause" ]
null
null
null
gammapy/datasets/data/poisson_stats_image/fit_sherpa.py
joleroi/gammapy
c4e0c4bd74c79d30e0837559d18b7a1a269f70d9
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Compute results with Sherpa""" from __future__ import print_function, division # __doctest_skip__ __doctest_skip__ = ['*'] import numpy as np import sherpa.astro.ui as sau sau.load_data('counts.fits.gz') sau.set_source('normgauss2d.source + const2d.bac...
30.109091
78
0.737319
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Compute results with Sherpa""" from __future__ import print_function, division # __doctest_skip__ __doctest_skip__ = ['*'] import numpy as np import sherpa.astro.ui as sau sau.load_data('counts.fits.gz') sau.set_source('normgauss2d.source + const2d.bac...
0
0
0
b19060aa18c8c5ed4dce0857e401f13ce6d76e4c
8,765
py
Python
abusehelper/tools/botnet/commands.py
AbuseSA/abusehelper
3e953632d20317c6bfe7eeb987ea9104d8f2a957
[ "MIT" ]
117
2015-11-30T09:52:52.000Z
2021-11-24T23:58:13.000Z
abusehelper/tools/botnet/commands.py
AbuseSA/abusehelper
3e953632d20317c6bfe7eeb987ea9104d8f2a957
[ "MIT" ]
57
2015-12-08T10:06:57.000Z
2018-03-28T11:13:11.000Z
abusehelper/tools/botnet/commands.py
AbuseSA/abusehelper
3e953632d20317c6bfe7eeb987ea9104d8f2a957
[ "MIT" ]
29
2016-02-08T08:24:30.000Z
2022-03-31T13:53:15.000Z
import os import re import sys import time import errno import signal import select from botnet import Command # Helpers # Instance # Commands
26.560606
80
0.538049
import os import re import sys import time import errno import signal import select from botnet import Command # Helpers def popen(*args, **keys): import subprocess defaults = { "stdout": subprocess.PIPE, "stderr": subprocess.PIPE, "stdin": subprocess.PIPE, "close_fds": True...
7,626
420
558
bc3a92e3a48e9127358372dd8af00e971b51c372
5,792
py
Python
db_repository/versions/019_migration.py
calcutec/flask-burtonblog
23b02f81f7772f2f50a382bb885b4fb008e4f815
[ "BSD-3-Clause" ]
null
null
null
db_repository/versions/019_migration.py
calcutec/flask-burtonblog
23b02f81f7772f2f50a382bb885b4fb008e4f815
[ "BSD-3-Clause" ]
null
null
null
db_repository/versions/019_migration.py
calcutec/flask-burtonblog
23b02f81f7772f2f50a382bb885b4fb008e4f815
[ "BSD-3-Clause" ]
null
null
null
from sqlalchemy import * from migrate import * from migrate.changeset import schema pre_meta = MetaData() post_meta = MetaData() exifstats = Table('exifstats', pre_meta, Column('id', INTEGER, primary_key=True, nullable=False), Column('post_id', INTEGER), Column('date_time', TIMESTAMP), Column('exposur...
50.807018
77
0.718577
from sqlalchemy import * from migrate import * from migrate.changeset import schema pre_meta = MetaData() post_meta = MetaData() exifstats = Table('exifstats', pre_meta, Column('id', INTEGER, primary_key=True, nullable=False), Column('post_id', INTEGER), Column('date_time', TIMESTAMP), Column('exposur...
4,014
0
46
0096c5c037b19dd74046c09319dfafc30e3bd9fe
1,206
py
Python
string-operations/A3_2.py
hscup/assignment
fab1c8589f45fba1fe0cbb14a138dc60bbcd942d
[ "MIT" ]
null
null
null
string-operations/A3_2.py
hscup/assignment
fab1c8589f45fba1fe0cbb14a138dc60bbcd942d
[ "MIT" ]
null
null
null
string-operations/A3_2.py
hscup/assignment
fab1c8589f45fba1fe0cbb14a138dc60bbcd942d
[ "MIT" ]
null
null
null
# this list will store the test scores we will read from the file scores = [] # Ask the user for a file name file_name = input('Please enter the file name: ') # open the file for reading with open(file_name, 'r') as score_file: for line in score_file: # Convert the test score in the current line to a num...
32.594595
79
0.689884
# this list will store the test scores we will read from the file scores = [] # Ask the user for a file name file_name = input('Please enter the file name: ') # open the file for reading with open(file_name, 'r') as score_file: for line in score_file: # Convert the test score in the current line to a num...
0
0
0
579a5de7477fdf1cb772d87478442f27b0aefd8a
1,040
py
Python
#4_Task.O'zgaruvchilar.py
ShukurDev/Examples-in-Python
94d9d977efeb7bb0a3a5cd258d58b74e1bd9a0f6
[ "Unlicense" ]
1
2021-10-09T17:12:07.000Z
2021-10-09T17:12:07.000Z
#4_Task.O'zgaruvchilar.py
Shukurali777/Python_Tasks
94d9d977efeb7bb0a3a5cd258d58b74e1bd9a0f6
[ "Unlicense" ]
null
null
null
#4_Task.O'zgaruvchilar.py
Shukurali777/Python_Tasks
94d9d977efeb7bb0a3a5cd258d58b74e1bd9a0f6
[ "Unlicense" ]
null
null
null
# "Hello World!" matnini yangi o'zgaruvchiga yuklang va print() yordamida konsolga chiqaring a = "Hello World!" print(a) # xabar deb nomlangan o'zgaruvchiga biror matn yuklang va konsolga chiqaring, # keyin esa o'zgaruvchiga yangi qiymat berib uni ham konsolga chiqaring. xabar = "Shuningdek o'zgaruvchilarga Pythonda ...
54.736842
365
0.7875
# "Hello World!" matnini yangi o'zgaruvchiga yuklang va print() yordamida konsolga chiqaring a = "Hello World!" print(a) # xabar deb nomlangan o'zgaruvchiga biror matn yuklang va konsolga chiqaring, # keyin esa o'zgaruvchiga yangi qiymat berib uni ham konsolga chiqaring. xabar = "Shuningdek o'zgaruvchilarga Pythonda ...
0
0
0
50864039f63f91a92b3c4c41238a0131c77470e4
599
py
Python
AGC/agc001-agc050/agc041/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
2
2020-06-12T09:54:23.000Z
2021-05-04T01:34:07.000Z
AGC/agc001-agc050/agc041/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
961
2020-06-23T07:26:22.000Z
2022-03-31T21:34:52.000Z
AGC/agc001-agc050/agc041/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- if __name__ == '__main__': main()
23.038462
56
0.480801
# -*- coding: utf-8 -*- def main(): n, a, b = map(int, input().split()) diff = b - a # See: # https://img.atcoder.jp/agc041/editorial.pdf # KeyInsight: 移動パターンを分解する # ◯:A, Bの位置の偶奇が一致しているかどうかの場合分け # :A, Bの位置の偶奇が不一致のときに,片方が端部まで移動する # ×:上記のcaseでの最短roundを計算する部分 if diff...
730
0
25
fd87b3f2c7adc035b5a80f6f65ae2db670b41d19
213,697
py
Python
mdfstudio/blocks/v4_blocks.py
hyundai-autoever-opensource/mdfstudio-hkmc
ac0e5ed657855c058116c69144fabac7b3601c41
[ "OML" ]
null
null
null
mdfstudio/blocks/v4_blocks.py
hyundai-autoever-opensource/mdfstudio-hkmc
ac0e5ed657855c058116c69144fabac7b3601c41
[ "OML" ]
null
null
null
mdfstudio/blocks/v4_blocks.py
hyundai-autoever-opensource/mdfstudio-hkmc
ac0e5ed657855c058116c69144fabac7b3601c41
[ "OML" ]
null
null
null
# -*- coding: utf-8 -*- """ classes that implement the blocks for MDF version 4 Edit history Author : yda Date : 2020-11-12 Package name changed - asammdf to mdfstudio Functions --------- * Channel.metadata - Get rid of b" text when decoding byte type data * Channel.__init__ - Set ...
35.480159
139
0.483984
# -*- coding: utf-8 -*- """ classes that implement the blocks for MDF version 4 Edit history Author : yda Date : 2020-11-12 Package name changed - asammdf to mdfstudio Functions --------- * Channel.metadata - Get rid of b" text when decoding byte type data * Channel.__init__ - Set ...
175,513
2,108
2,838
dea172b81061f1df2c8f672d6fa72284f9fe92cd
2,791
py
Python
lsp/server/daemon.py
paulovap/pinelang
bfe76be96423d2098275d6c7d1598b72cf9617be
[ "BSD-3-Clause" ]
3
2020-08-19T10:04:01.000Z
2021-12-23T11:09:48.000Z
lsp/server/daemon.py
paulovap/pinelang
bfe76be96423d2098275d6c7d1598b72cf9617be
[ "BSD-3-Clause" ]
null
null
null
lsp/server/daemon.py
paulovap/pinelang
bfe76be96423d2098275d6c7d1598b72cf9617be
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import asyncore, socket import sys import threading import logging logger = logging.getLogger('lsp-daemon') hdlr = logging.FileHandler('/Users/ppinheiro/git_tree/pinelang/lsp/server/lsp-daemon.log') formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') hdlr.setFormatter(formatte...
30.67033
95
0.640631
#!/usr/bin/env python3 import asyncore, socket import sys import threading import logging logger = logging.getLogger('lsp-daemon') hdlr = logging.FileHandler('/Users/ppinheiro/git_tree/pinelang/lsp/server/lsp-daemon.log') formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') hdlr.setFormatter(formatte...
1,369
15
293
758678212654c7b045c5fe936f5a93ec54475534
3,594
py
Python
students/k3342/laboratory_works/Litvinova_Elizaveta/laboratory_work_2/django_hotel/hotel_app/migrations/0001_initial.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
10
2020-03-20T09:06:12.000Z
2021-07-27T13:06:02.000Z
students/k3342/laboratory_works/Litvinova_Elizaveta/laboratory_work_2/django_hotel/hotel_app/migrations/0001_initial.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
134
2020-03-23T09:47:48.000Z
2022-03-12T01:05:19.000Z
students/k3342/laboratory_works/Litvinova_Elizaveta/laboratory_work_2/django_hotel/hotel_app/migrations/0001_initial.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
71
2020-03-20T12:45:56.000Z
2021-10-31T19:22:25.000Z
# Generated by Django 3.0.8 on 2020-07-02 10:30 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
46.675325
168
0.567334
# Generated by Django 3.0.8 on 2020-07-02 10:30 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
0
3,491
23
ab94d8784cdf3b4540eb9295805739df84f1e91b
469
py
Python
library/lib_study/141_i18n_gettext.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
13
2020-01-04T07:37:38.000Z
2021-08-31T05:19:58.000Z
library/lib_study/141_i18n_gettext.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
3
2020-06-05T22:42:53.000Z
2020-08-24T07:18:54.000Z
library/lib_study/141_i18n_gettext.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
9
2020-10-19T04:53:06.000Z
2021-08-31T05:20:01.000Z
# internationalization (I18N) 国际化 and localization (L10N) 本土化 # gettext 是GNU国际化与本地化(i18n)函数库 """ gettext 是一套 GNU下的国际化工具。主要有工具: xgettext: 从源码中抽取字符串,生成po文件(portable object) msgfmt: 将po文件编译成mo文件(machine object) gettext: 进行翻译 https://blog.csdn.net/handsomekang/article/details/78747504 """ # https://www.gnu.org/software/g...
26.055556
74
0.780384
# internationalization (I18N) 国际化 and localization (L10N) 本土化 # gettext 是GNU国际化与本地化(i18n)函数库 """ gettext 是一套 GNU下的国际化工具。主要有工具: xgettext: 从源码中抽取字符串,生成po文件(portable object) msgfmt: 将po文件编译成mo文件(machine object) gettext: 进行翻译 https://blog.csdn.net/handsomekang/article/details/78747504 """ # https://www.gnu.org/software/g...
0
0
0
0f39174d0598c3845e6a8b5a2c1545bbd65ccd7e
7,484
py
Python
Courses/Cryptography DIT250-TDA352/Assignment 4/Implementation/tb_block_cipher.py
itismesam/Courses-1
7669c4460be02b8bbaea2ae79182af2667e9e6b2
[ "MIT" ]
40
2020-09-30T13:45:50.000Z
2022-03-10T10:22:19.000Z
Courses/Cryptography DIT250-TDA352/Assignment 4/Implementation/tb_block_cipher.py
itismesam/Courses-1
7669c4460be02b8bbaea2ae79182af2667e9e6b2
[ "MIT" ]
null
null
null
Courses/Cryptography DIT250-TDA352/Assignment 4/Implementation/tb_block_cipher.py
itismesam/Courses-1
7669c4460be02b8bbaea2ae79182af2667e9e6b2
[ "MIT" ]
24
2020-10-06T07:05:38.000Z
2022-03-10T10:23:29.000Z
import numpy as np # Declare 'global' variables, matrices used for function P and also S_boxes lambd = np.loadtxt(open("matrix.txt", "rb"), delimiter=" ", skiprows=0) lambd_inv = np.loadtxt(open("matrix_inv.txt", "rb"), delimiter=" ", skiprows=0) S_box = {'00':'67', '01':'64', '02':'14', '03':'35', '04':'60',...
35.638095
120
0.561865
import numpy as np # Declare 'global' variables, matrices used for function P and also S_boxes lambd = np.loadtxt(open("matrix.txt", "rb"), delimiter=" ", skiprows=0) lambd_inv = np.loadtxt(open("matrix_inv.txt", "rb"), delimiter=" ", skiprows=0) S_box = {'00':'67', '01':'64', '02':'14', '03':'35', '04':'60',...
5,218
0
178
7a0f85559b9d0b0785f0827419cfbe7fa22f45be
3,275
py
Python
LinkedList.py
ashmit-sachan/python-data-sets
8e54632bd93d92b138e5a28a11daeba678914a33
[ "MIT" ]
null
null
null
LinkedList.py
ashmit-sachan/python-data-sets
8e54632bd93d92b138e5a28a11daeba678914a33
[ "MIT" ]
null
null
null
LinkedList.py
ashmit-sachan/python-data-sets
8e54632bd93d92b138e5a28a11daeba678914a33
[ "MIT" ]
null
null
null
from Node import Node
29.504505
83
0.528244
from Node import Node class LinkedList: def __init__(self): self.head = None self.tail = None def append(self, data): new_node = Node(data) if self.head is None: self.head = new_node self.tail = new_node else: new_node.prev = self.ta...
2,964
-4
292
dcc3d8443058bc59e63d3d2d4bdb76beddc46fec
4,112
py
Python
src/momento/cache_operation_responses.py
kvcache/client-sdk-python
433f69425ff8a6de2e56bf2689f4560a088d00dc
[ "Apache-2.0" ]
null
null
null
src/momento/cache_operation_responses.py
kvcache/client-sdk-python
433f69425ff8a6de2e56bf2689f4560a088d00dc
[ "Apache-2.0" ]
null
null
null
src/momento/cache_operation_responses.py
kvcache/client-sdk-python
433f69425ff8a6de2e56bf2689f4560a088d00dc
[ "Apache-2.0" ]
null
null
null
from enum import Enum from typing import Any, Optional, List from momento_wire_types import cacheclient_pb2 as cache_client_types from . import _cache_service_errors_converter as error_converter from . import _momento_logger
33.16129
106
0.65321
from enum import Enum from typing import Any, Optional, List from momento_wire_types import cacheclient_pb2 as cache_client_types from . import _cache_service_errors_converter as error_converter from . import _momento_logger class CacheGetStatus(Enum): HIT = 1 MISS = 2 class CacheSetResponse: def __ini...
132
3,534
213
c1b4f4581ebc212647c26b4494e4c8c04e3a484f
967
py
Python
quadratic_formula.py
Oh-Turry/Conjecture
8a048c4532e40d8c7923cb84ac86f93f3691d733
[ "MIT" ]
1
2021-12-17T09:38:49.000Z
2021-12-17T09:38:49.000Z
quadratic_formula.py
Oh-Turry/Conjecture
8a048c4532e40d8c7923cb84ac86f93f3691d733
[ "MIT" ]
null
null
null
quadratic_formula.py
Oh-Turry/Conjecture
8a048c4532e40d8c7923cb84ac86f93f3691d733
[ "MIT" ]
null
null
null
import math
30.21875
60
0.574974
import math class Quadratic: def __init__(self, a, b, c): self.a = float(a) self.b = float(b) self.c = float(c) def quadratic(self): # Making things more readable.... b = float(self.b) a = float(self.a) c = float(self.c) # Calculating the first...
883
-5
76
4755948769114a4ff01f3bed64d1d7df80cc03d0
1,441
py
Python
api/src/opentrons/hardware_control/emulation/scripts/run_app.py
anuwrag/opentrons
28c8d76a19e367c6bd38f5290faaa32abf378715
[ "Apache-2.0" ]
2
2015-11-10T17:49:51.000Z
2016-01-15T04:43:37.000Z
api/src/opentrons/hardware_control/emulation/scripts/run_app.py
anuwrag/opentrons
28c8d76a19e367c6bd38f5290faaa32abf378715
[ "Apache-2.0" ]
2
2022-02-15T03:28:35.000Z
2022-02-28T01:34:18.000Z
api/src/opentrons/hardware_control/emulation/scripts/run_app.py
anuwrag/opentrons
28c8d76a19e367c6bd38f5290faaa32abf378715
[ "Apache-2.0" ]
null
null
null
"""Script for starting up emulation up with module emulators.""" import logging import asyncio from argparse import ArgumentParser from typing import List from opentrons.hardware_control.emulation.app import Application from opentrons.hardware_control.emulation.scripts.run_module_emulator import ( emulator_builder...
26.2
84
0.687023
"""Script for starting up emulation up with module emulators.""" import logging import asyncio from argparse import ArgumentParser from typing import List from opentrons.hardware_control.emulation.app import Application from opentrons.hardware_control.emulation.scripts.run_module_emulator import ( emulator_builder...
0
0
0
5499f0f0a20f64c154562ea3dead6cf06a9f5d87
12,839
py
Python
mmseg/models/backbones/ddrnet.py
evgeniya-egupova/mmsegmentation
3857f19321ad6af41c8a6af364898ee050225f4c
[ "Apache-2.0" ]
null
null
null
mmseg/models/backbones/ddrnet.py
evgeniya-egupova/mmsegmentation
3857f19321ad6af41c8a6af364898ee050225f4c
[ "Apache-2.0" ]
null
null
null
mmseg/models/backbones/ddrnet.py
evgeniya-egupova/mmsegmentation
3857f19321ad6af41c8a6af364898ee050225f4c
[ "Apache-2.0" ]
null
null
null
# The original repo: https://github.com/ydhongHIT/DDRNet import torch import torch.nn as nn import torch.nn.functional as F from mmcv.runner import load_checkpoint from mmcv.utils.parrots_wrapper import _BatchNorm from mmseg.utils import get_root_logger from ..builder import BACKBONES BatchNorm2d = nn.S...
34.888587
103
0.569671
# The original repo: https://github.com/ydhongHIT/DDRNet import torch import torch.nn as nn import torch.nn.functional as F from mmcv.runner import load_checkpoint from mmcv.utils.parrots_wrapper import _BatchNorm from mmseg.utils import get_root_logger from ..builder import BACKBONES BatchNorm2d = nn.S...
10,511
172
214
3bbb20db10884d4e068896ed9c52bd988b1a34e3
434
py
Python
kawalc1/authentication_middleware.py
SamTheisens/kawalc1
c0189c04d130680e51ca4396794c735bd51cf258
[ "MIT" ]
14
2019-04-07T08:04:15.000Z
2019-11-03T08:27:51.000Z
kawalc1/authentication_middleware.py
kawalc1/kawalc1
6963f7f3f93e7ab897dfcda265c9dd3b12433f18
[ "MIT" ]
22
2019-03-25T05:27:12.000Z
2020-08-17T22:13:19.000Z
kawalc1/authentication_middleware.py
kawalc1/kawalc1
6963f7f3f93e7ab897dfcda265c9dd3b12433f18
[ "MIT" ]
1
2019-04-07T16:18:33.000Z
2019-04-07T16:18:33.000Z
from django.http import HttpResponse from kawalc1 import settings
28.933333
155
0.751152
from django.http import HttpResponse from kawalc1 import settings class AuthenticationMiddleware(object): def __init__(self, get_response): self.get_response = get_response def __call__(self, request): auth = request.META.get('HTTP_AUTHORIZATION') return self.get_response(request) i...
270
18
77
fc196d4a53af9df4c92f8c39711e2ba76da88a58
72
py
Python
AtC_Beg_Con_061-070/ABC063/A.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
AtC_Beg_Con_061-070/ABC063/A.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
AtC_Beg_Con_061-070/ABC063/A.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
a, b = map(int, input().split()) print(a + b if a + b < 10 else "error")
36
39
0.555556
a, b = map(int, input().split()) print(a + b if a + b < 10 else "error")
0
0
0
9c2f74d1c05690dd8920c064e5e3e7a8fe1e59aa
5,011
py
Python
bin/contentctl_project/contentctl_core/domain/entities/detection.py
stevengoossensB/security_content
f2edb19317ea67eadf96c9193622c8607011738c
[ "Apache-2.0" ]
null
null
null
bin/contentctl_project/contentctl_core/domain/entities/detection.py
stevengoossensB/security_content
f2edb19317ea67eadf96c9193622c8607011738c
[ "Apache-2.0" ]
null
null
null
bin/contentctl_project/contentctl_core/domain/entities/detection.py
stevengoossensB/security_content
f2edb19317ea67eadf96c9193622c8607011738c
[ "Apache-2.0" ]
null
null
null
import enum import uuid import string import re import requests from pydantic import BaseModel, validator, root_validator from dataclasses import dataclass from datetime import datetime from bin.contentctl_project.contentctl_core.domain.entities.security_content_object import SecurityContentObject from bin.contentctl...
35.539007
138
0.648174
import enum import uuid import string import re import requests from pydantic import BaseModel, validator, root_validator from dataclasses import dataclass from datetime import datetime from bin.contentctl_project.contentctl_core.domain.entities.security_content_object import SecurityContentObject from bin.contentctl...
1,992
1,910
23
86f9c59c82df8db520fe842e19c4ec432bfd83be
6,609
py
Python
tests/common/platform/transceiver_utils.py
arista-northwest/sonic-mgmt
ef83219cf68b03693aedf22c22a040000a491a64
[ "Apache-2.0" ]
132
2016-10-19T12:34:44.000Z
2022-03-16T09:00:39.000Z
tests/common/platform/transceiver_utils.py
arista-northwest/sonic-mgmt
ef83219cf68b03693aedf22c22a040000a491a64
[ "Apache-2.0" ]
3,152
2016-09-21T23:05:58.000Z
2022-03-31T23:29:08.000Z
tests/common/platform/transceiver_utils.py
arista-northwest/sonic-mgmt
ef83219cf68b03693aedf22c22a040000a491a64
[ "Apache-2.0" ]
563
2016-09-20T01:00:15.000Z
2022-03-31T22:43:54.000Z
""" Helper script for checking status of transceivers This script contains re-usable functions for checking status of transceivers. """ import logging import re def parse_transceiver_info(output_lines): """ @summary: Parse the list of transceiver from DB table TRANSCEIVER_INFO content @param output_lines...
47.207143
118
0.70752
""" Helper script for checking status of transceivers This script contains re-usable functions for checking status of transceivers. """ import logging import re def parse_transceiver_info(output_lines): """ @summary: Parse the list of transceiver from DB table TRANSCEIVER_INFO content @param output_lines...
0
0
0
a0f305a25e2af26b289000c2eb32a910738fd39a
2,051
py
Python
utils/load.py
Vlammar/SAM
0627db502c541d7f1aa601d8b788ac4985610f58
[ "MIT" ]
null
null
null
utils/load.py
Vlammar/SAM
0627db502c541d7f1aa601d8b788ac4985610f58
[ "MIT" ]
null
null
null
utils/load.py
Vlammar/SAM
0627db502c541d7f1aa601d8b788ac4985610f58
[ "MIT" ]
null
null
null
from msdi_io import * if __name__ == '__main__': print('Labels:', get_label_list()) bl = batchLoader(100,path_msdi=msdi_path) for i in range(10): X,y=bl.load(i) print(X.shape,len(y)) #print(X[1]) """ print('Labels:', get_label_list()) bl = batchLoader(100,path_msdi=msdi_path) for i in range(10): f...
26.986842
81
0.678693
from msdi_io import * class batchLoader(): def __init__(self,batch_size,path_msdi,max_size=30712): self.i = 0 self.batch_size= batch_size self.path_msdi = path_msdi self.max_size = max_size self.msdi = get_msdi_dataframe(msdi_path) def load(self,batch_nb,img_size): batch_size = min(self.i+self.batch...
1,551
-1
94
dd689192f764ee3d1393fbc2a97c9fdaed6e1f83
8,712
py
Python
cerami/datatype/dynamic.py
gummybuns/dorm
e97c0baa42c4bdfb10bbe3b4b859873e3d50aa3a
[ "MIT" ]
null
null
null
cerami/datatype/dynamic.py
gummybuns/dorm
e97c0baa42c4bdfb10bbe3b4b859873e3d50aa3a
[ "MIT" ]
null
null
null
cerami/datatype/dynamic.py
gummybuns/dorm
e97c0baa42c4bdfb10bbe3b4b859873e3d50aa3a
[ "MIT" ]
null
null
null
import numbers from copy import deepcopy from .number import Number from .string import String from .set import Set from .base_datatype import DynamoDataType from .expression import ListAppendExpression from .translator import ( DictTranslator, ListTranslator) class DefaultMapGuesser(object): """A class to...
37.390558
90
0.642103
import numbers from copy import deepcopy from .number import Number from .string import String from .set import Set from .base_datatype import DynamoDataType from .expression import ListAppendExpression from .translator import ( DictTranslator, ListTranslator) class DefaultMapGuesser(object): """A class to...
0
0
0
12651f8b860f73c5c65274cede5661efe213867f
364
py
Python
habu/lib/arpoison.py
optimustoaster/habu
9ab5e7b8dd3b81b25dc48d4afc9f731a1b7489f0
[ "BSD-3-Clause" ]
461
2017-05-27T15:35:13.000Z
2019-11-30T23:13:15.000Z
habu/lib/arpoison.py
dolboBobo/habu
d9f2df6ac66b7527f7a731f943af07726ff7e2e2
[ "BSD-3-Clause" ]
10
2017-10-12T09:43:23.000Z
2019-06-21T17:25:09.000Z
habu/lib/arpoison.py
dolboBobo/habu
d9f2df6ac66b7527f7a731f943af07726ff7e2e2
[ "BSD-3-Clause" ]
108
2017-09-23T19:55:23.000Z
2019-11-30T19:08:32.000Z
from scapy.all import arpcachepoison, conf import ipaddress conf.verb = 0 if __name__ == '__main__': pass
18.2
46
0.678571
from scapy.all import arpcachepoison, conf import ipaddress conf.verb = 0 def arpoison(target1, target2, interval=5): try: ipaddress.ip_address(target1) ipaddress.ip_address(target2) except ValueError: print("Bad IP address") return 1 arpcachepoison(target1, target2, inte...
228
0
23
3465ddbd9219f8f87ae8022db65d60033f1cb870
1,472
py
Python
api/app.py
RomanZorkin/contracts_accounting
0b4d0427a2b5fffc3b8c012318a9e19f9f7c734f
[ "MIT" ]
null
null
null
api/app.py
RomanZorkin/contracts_accounting
0b4d0427a2b5fffc3b8c012318a9e19f9f7c734f
[ "MIT" ]
null
null
null
api/app.py
RomanZorkin/contracts_accounting
0b4d0427a2b5fffc3b8c012318a9e19f9f7c734f
[ "MIT" ]
null
null
null
from typing import Optional from fastapi import FastAPI import api.sql_handler as sql_handler app = FastAPI() @app.get("/items/") @app.get("/all") @app.get("/notifications") @app.get("/budget_commitment") @app.get("/commitment_treasury") @app.get("/deals") @app.get("/limits") @app.get("/payment_schedule") ...
20.444444
46
0.66644
from typing import Optional from fastapi import FastAPI import api.sql_handler as sql_handler app = FastAPI() @app.get("/items/") def read_item(num: str): #reg_num = f'{item_id}/{str(year)[2:4]}' query_sd = sql_handler.filter_query(num) #print('query', query_sd) return query_sd @app.get("/all"...
696
0
308
67f3fa1df65cf2e009450b056204eaeb084e08b9
18,678
py
Python
crossplatform.py
msdrigg/dotbot-crossplatform
d0903a07c375b62a131f9564a8fbbc522970500c
[ "MIT" ]
1
2021-09-08T23:55:20.000Z
2021-09-08T23:55:20.000Z
crossplatform.py
msdrigg/dotbot-crossplatform
d0903a07c375b62a131f9564a8fbbc522970500c
[ "MIT" ]
null
null
null
crossplatform.py
msdrigg/dotbot-crossplatform
d0903a07c375b62a131f9564a8fbbc522970500c
[ "MIT" ]
null
null
null
import os import sys import shutil import dotbot import subprocess import platform class CrossPlatformLink(dotbot.plugins.Link, dotbot.Plugin, CrossPlatformTask): """ Symbolically links dotfiles. """ _directive = "crossplatform-link" def _link( self, source, link_name, ...
39.239496
102
0.505675
import os import sys import shutil import dotbot import subprocess import platform class CrossPlatformTask: def parse_platform(self, platform_val) -> bool: if platform_val is None: return True if len(platform_val) > 0 and platform_val[0] == "!": reverse_it = True ...
14,720
3
346
4f30702fc2c746d02e7b4301d70f095f4cb60cab
258
py
Python
env/lib/python3.8/site-packages/munch/python3_compat.py
CristianCristanchoT/predyctiva
d745f9d687dc0de0a1615ee219b86a9d68571782
[ "MIT" ]
563
2015-02-27T02:02:06.000Z
2022-03-25T04:40:33.000Z
env/lib/python3.8/site-packages/munch/python3_compat.py
CristianCristanchoT/predyctiva
d745f9d687dc0de0a1615ee219b86a9d68571782
[ "MIT" ]
64
2015-04-11T22:24:11.000Z
2022-02-02T12:39:57.000Z
env/lib/python3.8/site-packages/munch/python3_compat.py
CristianCristanchoT/predyctiva
d745f9d687dc0de0a1615ee219b86a9d68571782
[ "MIT" ]
84
2015-01-05T22:50:13.000Z
2022-03-30T15:25:06.000Z
from six import u, iteritems, iterkeys # pylint: disable=unused-import try: from collections.abc import Mapping # pylint: disable=unused-import except ImportError: # Legacy Python from collections import Mapping # pylint: disable=unused-import
36.857143
72
0.763566
from six import u, iteritems, iterkeys # pylint: disable=unused-import try: from collections.abc import Mapping # pylint: disable=unused-import except ImportError: # Legacy Python from collections import Mapping # pylint: disable=unused-import
0
0
0
aa7e0f5e47e2bde49afce7d49dcdd9eaf4af6e16
1,429
py
Python
src/mergedictionaries/sources/hunspell.py
nasqueron/merge-dictionaries
657fb61165e33ad7dbb6f9641c6cf10752acf9e6
[ "BSD-2-Clause" ]
null
null
null
src/mergedictionaries/sources/hunspell.py
nasqueron/merge-dictionaries
657fb61165e33ad7dbb6f9641c6cf10752acf9e6
[ "BSD-2-Clause" ]
null
null
null
src/mergedictionaries/sources/hunspell.py
nasqueron/merge-dictionaries
657fb61165e33ad7dbb6f9641c6cf10752acf9e6
[ "BSD-2-Clause" ]
null
null
null
# ------------------------------------------------------------- # Merge dictionaries :: Sources :: Hunspell # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Project: Nasqueron # Description: Find Hunspell personal dictionaries # License: BSD-2-Clause # -------------------...
25.070175
79
0.572428
# ------------------------------------------------------------- # Merge dictionaries :: Sources :: Hunspell # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Project: Nasqueron # Description: Find Hunspell personal dictionaries # License: BSD-2-Clause # -------------------...
934
0
115
6ca2de88fb4aa102db89166e6f1b09ca2ac1daff
2,358
py
Python
main_interface.py
DrJonoG/Robot
677c38092219e6c3d41830965ce708705a8f902e
[ "Apache-2.0" ]
null
null
null
main_interface.py
DrJonoG/Robot
677c38092219e6c3d41830965ce708705a8f902e
[ "Apache-2.0" ]
null
null
null
main_interface.py
DrJonoG/Robot
677c38092219e6c3d41830965ce708705a8f902e
[ "Apache-2.0" ]
null
null
null
from hardware import camera, robot, turntable from calibration import calibration_axyb, calibration_camera, calibration_functions from threading import Thread import configparser
34.676471
163
0.583121
from hardware import camera, robot, turntable from calibration import calibration_axyb, calibration_camera, calibration_functions from threading import Thread import configparser class main_interface(object): def __init__(self, path, config): self.cam_thread = None self.robot_thread = None ...
1,987
8
184
40c308d59966bf697eb149c92d9e696ab0203863
4,056
py
Python
neutron/tests/tools.py
NeCTAR-RC/neutron
acf78cc3c88aff638180819419a65145a9a79695
[ "Apache-2.0" ]
null
null
null
neutron/tests/tools.py
NeCTAR-RC/neutron
acf78cc3c88aff638180819419a65145a9a79695
[ "Apache-2.0" ]
null
null
null
neutron/tests/tools.py
NeCTAR-RC/neutron
acf78cc3c88aff638180819419a65145a9a79695
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2013 NEC Corporation # 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 requi...
33.245902
79
0.68072
# Copyright (c) 2013 NEC Corporation # 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 requi...
1,391
0
180
10e7da5e5add2a0fef79620668df2fd41114a06b
466
py
Python
scenarios/cicd/assets/src/app.py
agroyz/cloudgoat
ec5e5950c6878b96cfc20e8f82b9c30e5264e9cb
[ "BSD-3-Clause" ]
1
2018-08-15T10:53:39.000Z
2018-08-15T10:53:39.000Z
scenarios/cicd/assets/src/app.py
agroyz/cloudgoat
ec5e5950c6878b96cfc20e8f82b9c30e5264e9cb
[ "BSD-3-Clause" ]
null
null
null
scenarios/cicd/assets/src/app.py
agroyz/cloudgoat
ec5e5950c6878b96cfc20e8f82b9c30e5264e9cb
[ "BSD-3-Clause" ]
null
null
null
import sys import json
21.181818
49
0.656652
import sys import json def handle(event): body = event.get('body') if body is None: return 400, "missing body" if 'superSecretData=' not in body: return 400, "missing superSecretData" return 200, "OK" def handler(event, context): statusCode, responseBody = handle(event) return { "isBase64En...
397
0
47
f405aef888a7d57a246116047e830731adf12bb7
757
py
Python
drones/v2/views.py
Zoki92/Drone
7c637220d1c085ec804d72f148b1c98b088799df
[ "MIT" ]
null
null
null
drones/v2/views.py
Zoki92/Drone
7c637220d1c085ec804d72f148b1c98b088799df
[ "MIT" ]
null
null
null
drones/v2/views.py
Zoki92/Drone
7c637220d1c085ec804d72f148b1c98b088799df
[ "MIT" ]
null
null
null
from rest_framework import generics from rest_framework.response import Response from rest_framework.reverse import reverse from drones import views
36.047619
71
0.5786
from rest_framework import generics from rest_framework.response import Response from rest_framework.reverse import reverse from drones import views class ApiRootVersion2(generics.GenericAPIView): name = 'api-root' def get(self, request, *args, **kwargs): return Response({ 'vehicle-catego...
509
75
23
d9c73d18fc4c77cc267c1980ca6864474a5f8d3a
732
py
Python
names/views.py
DavidGarciaFer/Flag-Challenge
083b589041393bff0e783406bf6bff2d6c7e6c7e
[ "MIT" ]
null
null
null
names/views.py
DavidGarciaFer/Flag-Challenge
083b589041393bff0e783406bf6bff2d6c7e6c7e
[ "MIT" ]
null
null
null
names/views.py
DavidGarciaFer/Flag-Challenge
083b589041393bff0e783406bf6bff2d6c7e6c7e
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse from names.models import Country from random import shuffle
30.5
91
0.684426
from django.shortcuts import render from django.http import HttpResponse from names.models import Country from random import shuffle def shuffle_countries(): countries = list(Country.objects.order_by('name_es')) shuffle(countries) return countries def prueba(n): ret = [] count = shuffle_countries(...
530
0
69
fee871b0271a48d9b790a885e40bd17abcb886b4
13,024
py
Python
nyc311calendar/__init__.py
elahd/nyc311calendar
d34c586d78b7c46bcb349a023a3441514872d4ed
[ "MIT" ]
null
null
null
nyc311calendar/__init__.py
elahd/nyc311calendar
d34c586d78b7c46bcb349a023a3441514872d4ed
[ "MIT" ]
null
null
null
nyc311calendar/__init__.py
elahd/nyc311calendar
d34c586d78b7c46bcb349a023a3441514872d4ed
[ "MIT" ]
null
null
null
"""NYC 311 Calendar API.""" from __future__ import annotations from dataclasses import dataclass from datetime import date from datetime import datetime from datetime import timedelta from enum import Enum import logging import aiohttp from nyc311calendar.services import Parking from nyc311calendar.services import Sa...
35.487738
248
0.557125
"""NYC 311 Calendar API.""" from __future__ import annotations from dataclasses import dataclass from datetime import date from datetime import datetime from datetime import timedelta from enum import Enum import logging import aiohttp from nyc311calendar.services import Parking from nyc311calendar.services import Sa...
769
0
27
152c41e86c139479e0885fc6932483535d7e9ae4
424
py
Python
traffic_monitor/migrations/0010_auto_20200915_0115.py
mcdomx/monitor
55082a3ea985224b819e4e2b7e13f44e70ac0b74
[ "MIT" ]
1
2020-09-23T14:36:30.000Z
2020-09-23T14:36:30.000Z
traffic_monitor/migrations/0010_auto_20200915_0115.py
mcdomx/monitor
55082a3ea985224b819e4e2b7e13f44e70ac0b74
[ "MIT" ]
3
2021-09-08T02:32:20.000Z
2022-03-12T00:49:29.000Z
traffic_monitor/migrations/0010_auto_20200915_0115.py
mcdomx/monitor
55082a3ea985224b819e4e2b7e13f44e70ac0b74
[ "MIT" ]
null
null
null
# Generated by Django 3.1.1 on 2020-09-15 01:15 from django.db import migrations, models
22.315789
68
0.634434
# Generated by Django 3.1.1 on 2020-09-15 01:15 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('traffic_monitor', '0009_monitor_detector_sleep_throttle'), ] operations = [ migrations.AlterField( model_name='monitor', ...
0
310
23
a7cd484b213c5d28189470f9ac0948f312244ea2
392
py
Python
Problems/LeetCode/217-ContainsDuplicate.py
bvlqz/code
2908aaf1b83391aaf9d8012888766151b7aa404b
[ "MIT" ]
null
null
null
Problems/LeetCode/217-ContainsDuplicate.py
bvlqz/code
2908aaf1b83391aaf9d8012888766151b7aa404b
[ "MIT" ]
null
null
null
Problems/LeetCode/217-ContainsDuplicate.py
bvlqz/code
2908aaf1b83391aaf9d8012888766151b7aa404b
[ "MIT" ]
null
null
null
# https://leetcode.com/problems/contains-duplicate/
23.058824
51
0.469388
# https://leetcode.com/problems/contains-duplicate/ class Solution(object): def containsDuplicate(self, nums): """ :type nums: List[int] :rtype: bool """ hashmap = {} for num in nums: if num in hashmap: return True else: ...
0
305
23
93db3adffb4df3438a37f2afd5aab9a38af98dc5
419
py
Python
PicImageSearch/__init__.py
Coder-Sakura/PicImageSearch
f947d0aa5648f39763f35295e7d67b9ec2eecca8
[ "MIT" ]
null
null
null
PicImageSearch/__init__.py
Coder-Sakura/PicImageSearch
f947d0aa5648f39763f35295e7d67b9ec2eecca8
[ "MIT" ]
null
null
null
PicImageSearch/__init__.py
Coder-Sakura/PicImageSearch
f947d0aa5648f39763f35295e7d67b9ec2eecca8
[ "MIT" ]
null
null
null
from .ascii2d import Ascii2D from .Async import * from .baidu import BaiDu from .google import Google from .iqdb import Iqdb from .saucenao import SauceNAO from .tracemoe import ( TraceMoe, TraceMoeAnilist, TraceMoeMe, TraceMoeNorm, TraceMoeResponse, ) __author__ = "kitUIN" __license__ = "MIT Licen...
22.052632
62
0.735084
from .ascii2d import Ascii2D from .Async import * from .baidu import BaiDu from .google import Google from .iqdb import Iqdb from .saucenao import SauceNAO from .tracemoe import ( TraceMoe, TraceMoeAnilist, TraceMoeMe, TraceMoeNorm, TraceMoeResponse, ) __author__ = "kitUIN" __license__ = "MIT Licen...
0
0
0
28f789dd413a4c18c704650f20ff868e730364e3
372
py
Python
AdventOfCode_14_1.py
Trapper007/A-beautiful-code-in-Python
80c4209a7f74e5693b576fe636f667b7195e8b5f
[ "MIT" ]
1
2019-03-02T19:57:25.000Z
2019-03-02T19:57:25.000Z
AdventOfCode_14_1.py
Trapper007/A-beautiful-code-in-Python
80c4209a7f74e5693b576fe636f667b7195e8b5f
[ "MIT" ]
null
null
null
AdventOfCode_14_1.py
Trapper007/A-beautiful-code-in-Python
80c4209a7f74e5693b576fe636f667b7195e8b5f
[ "MIT" ]
null
null
null
import time start = time.perf_counter() receips = '37' von = 509671 bis = von + 10 elf1, elf2 = 0,1 for i in range(bis): score = int(receips[elf1]) + int(receips[elf2]) receips += str(score) lr = len(receips) elf1 = (elf1 + int(receips[elf1])+ 1) % lr elf2 = (elf2 + int(receips[elf2])+ 1) % lr print(r...
19.578947
49
0.63172
import time start = time.perf_counter() receips = '37' von = 509671 bis = von + 10 elf1, elf2 = 0,1 for i in range(bis): score = int(receips[elf1]) + int(receips[elf2]) receips += str(score) lr = len(receips) elf1 = (elf1 + int(receips[elf1])+ 1) % lr elf2 = (elf2 + int(receips[elf2])+ 1) % lr print(r...
0
0
0
6295ec734f390a221241926822cf5e28aefa8cba
739
py
Python
src/atcoder/abc030/c/sol_0.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
1
2021-07-11T03:20:10.000Z
2021-07-11T03:20:10.000Z
src/atcoder/abc030/c/sol_0.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
39
2021-07-10T05:21:09.000Z
2021-12-15T06:10:12.000Z
src/atcoder/abc030/c/sol_0.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
null
null
null
import typing import sys import numpy as np import numba as nb @nb.njit((nb.i8, nb.i8, nb.i8[:], nb.i8[:]), cache=True) main()
17.186047
56
0.514208
import typing import sys import numpy as np import numba as nb @nb.njit((nb.i8, nb.i8, nb.i8[:], nb.i8[:]), cache=True) def solve( x: int, y: int, a: np.ndarray, b: np.ndarray, ) -> typing.NoReturn: n, m = len(a), len(b) t = 0 cnt = 0 i = j = 0 while True: while i < n and a[i] < t: i += 1...
560
0
45
00584a9365e7c5ed315adc5f133b60601b132525
1,124
py
Python
imgur.py
chrispwns/CLimgur
88067613a2402bd57a98dd850f9afcff9faa4d89
[ "MIT" ]
null
null
null
imgur.py
chrispwns/CLimgur
88067613a2402bd57a98dd850f9afcff9faa4d89
[ "MIT" ]
null
null
null
imgur.py
chrispwns/CLimgur
88067613a2402bd57a98dd850f9afcff9faa4d89
[ "MIT" ]
null
null
null
import argparse import os from credentials import get, set from upload import upload def main(): """ get command line options and upload the file(s) accordingly :return: None """ parser = argparse.ArgumentParser() options = parser.add_mutually_exclusive_group() options.add_arg...
31.222222
102
0.651246
import argparse import os from credentials import get, set from upload import upload def main(): """ get command line options and upload the file(s) accordingly :return: None """ parser = argparse.ArgumentParser() options = parser.add_mutually_exclusive_group() options.add_arg...
0
0
0
fb599016f8722c293bf9ec3a554475aa2b959f18
174
py
Python
run.py
lijingui2010/ProxyPool
3d4f732c8305458fb26619b67c617313afbea605
[ "Apache-2.0" ]
null
null
null
run.py
lijingui2010/ProxyPool
3d4f732c8305458fb26619b67c617313afbea605
[ "Apache-2.0" ]
null
null
null
run.py
lijingui2010/ProxyPool
3d4f732c8305458fb26619b67c617313afbea605
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from proxypool.schedule import Schedule if __name__ == '__main__': main()
11.6
39
0.591954
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from proxypool.schedule import Schedule def main(): s = Schedule() s.run() if __name__ == '__main__': main()
21
0
23
50bdcd821a2d6b324d6a2920f02b012bd6951a36
1,394
py
Python
lib/content_page_generator.py
elliottmina/doctor_static
3d5e6f369e7e23615a3c5c90d6faef33c7edbd9e
[ "MIT" ]
1
2016-02-23T16:21:49.000Z
2016-02-23T16:21:49.000Z
lib/content_page_generator.py
elliottmina/doctor_static
3d5e6f369e7e23615a3c5c90d6faef33c7edbd9e
[ "MIT" ]
null
null
null
lib/content_page_generator.py
elliottmina/doctor_static
3d5e6f369e7e23615a3c5c90d6faef33c7edbd9e
[ "MIT" ]
null
null
null
from lib import file_util from lib import render_path from lib import template_renderer from lib import source_converter from lib import console_outputter from datetime import date
28.44898
75
0.758967
from lib import file_util from lib import render_path from lib import template_renderer from lib import source_converter from lib import console_outputter from datetime import date def get(config): return ContentPageGenerator( source_converter, template_renderer.get(config), file_util, render_path.get(config...
1,080
14
118
e0edd158e303079b903487fb1bb3457afbac7308
3,670
py
Python
Participants/triple-dungeon/tests.py
python-discord/game-jam-2020
cdcb1c2c9246825518a29b05cc39a679b36d666e
[ "MIT" ]
15
2020-04-17T12:02:14.000Z
2022-03-16T03:01:34.000Z
triple-dungeon/tests.py
n0remac/game-jam-2020
1a80bd538cf3221a6f15cc9e56d17d17720e8d03
[ "MIT" ]
18
2020-04-18T07:01:02.000Z
2020-10-31T12:13:48.000Z
triple-dungeon/tests.py
n0remac/game-jam-2020
1a80bd538cf3221a6f15cc9e56d17d17720e8d03
[ "MIT" ]
55
2020-04-17T12:01:11.000Z
2021-12-28T10:14:02.000Z
""" tests.py A file dedicated to testing our game and ensuring it can run. Integrate this into your IDE's workflow to ensure the game runs from top to bottom. The tests used here should test all of our game's features as best they can. """ import pytest from typing import Pattern, List class TestGame: """ T...
27.185185
95
0.571662
""" tests.py A file dedicated to testing our game and ensuring it can run. Integrate this into your IDE's workflow to ensure the game runs from top to bottom. The tests used here should test all of our game's features as best they can. """ import pytest from typing import Pattern, List class TestGame: """ T...
0
0
0
a2c9b8e0ec74db319bbcc2c4933fbffa9c1d9f46
5,676
py
Python
fingerprint/server/server.py
ghoshishan/comp-sec
f1bec8fc68814bc421337069e58a67447baf2a89
[ "MIT" ]
null
null
null
fingerprint/server/server.py
ghoshishan/comp-sec
f1bec8fc68814bc421337069e58a67447baf2a89
[ "MIT" ]
null
null
null
fingerprint/server/server.py
ghoshishan/comp-sec
f1bec8fc68814bc421337069e58a67447baf2a89
[ "MIT" ]
null
null
null
import json import logging import pathlib from phe import paillier, EncryptedNumber, PaillierPublicKey import server.dbhandler as dbhandler class Server(): """ Implements functionality related to cloud biometric storage and processing. Return values to the client: store_template(): ...
35.254658
96
0.633897
import json import logging import pathlib from phe import paillier, EncryptedNumber, PaillierPublicKey import server.dbhandler as dbhandler class Server(): """ Implements functionality related to cloud biometric storage and processing. Return values to the client: store_template(): ...
0
0
0
9d0eabb05c63acbbe873538689cef1f4401e916d
196
py
Python
ex021.py
jefernathan/Python
2f840a625e8d46d41ab36df07ef50ae15a03c5ab
[ "MIT" ]
null
null
null
ex021.py
jefernathan/Python
2f840a625e8d46d41ab36df07ef50ae15a03c5ab
[ "MIT" ]
null
null
null
ex021.py
jefernathan/Python
2f840a625e8d46d41ab36df07ef50ae15a03c5ab
[ "MIT" ]
null
null
null
# Faça um programa em Python que abra e reproduza o áudio de um arquivo MP3. from pygame import mixer # pip3 install pygame mixer.init() mixer.music.load('ex021.ogg') mixer.music.play() input()
21.777778
76
0.75
# Faça um programa em Python que abra e reproduza o áudio de um arquivo MP3. from pygame import mixer # pip3 install pygame mixer.init() mixer.music.load('ex021.ogg') mixer.music.play() input()
0
0
0
5f247a666cf17b372a30c244ea50465008600289
238
py
Python
PipelineProfiler/_demodata.py
VIDA-NYU/PipelineVis
044f212a87bdd6de0df0d002968b6be5fb8fa499
[ "BSD-3-Clause" ]
63
2020-04-30T23:07:29.000Z
2022-03-23T20:09:31.000Z
PipelineProfiler/_demodata.py
VIDA-NYU/PipelineVis
044f212a87bdd6de0df0d002968b6be5fb8fa499
[ "BSD-3-Clause" ]
7
2020-10-20T12:39:03.000Z
2022-02-27T03:58:02.000Z
PipelineProfiler/_demodata.py
VIDA-NYU/PipelineVis
044f212a87bdd6de0df0d002968b6be5fb8fa499
[ "BSD-3-Clause" ]
2
2021-01-25T05:32:11.000Z
2021-07-23T03:33:29.000Z
import pkg_resources import json
29.75
95
0.739496
import pkg_resources import json def get_heartstatlog_data(): data_path = pkg_resources.resource_filename(__name__, "data/teaser_data_heartstatlog.json") with open(data_path, "r") as f: data = json.load(f) return data
183
0
23
4f02c85f8c577d5e5aacb66bd08e0065f5306739
2,884
py
Python
reinforcement_learning/rl_traveling_salesman_vehicle_routing_coach/src/evaluate-coach.py
rituraj17/amazon-sagemaker-examples
b435bb2efb9d94da0cca64d007b44e75dc1675e3
[ "Apache-2.0" ]
4
2018-12-03T08:14:15.000Z
2019-01-25T04:06:20.000Z
reinforcement_learning/rl_traveling_salesman_vehicle_routing_coach/src/evaluate-coach.py
ragavvenkatesan/amazon-sagemaker-examples
555e84714d8004210bf8bbf254313a021bb2372e
[ "Apache-2.0" ]
null
null
null
reinforcement_learning/rl_traveling_salesman_vehicle_routing_coach/src/evaluate-coach.py
ragavvenkatesan/amazon-sagemaker-examples
555e84714d8004210bf8bbf254313a021bb2372e
[ "Apache-2.0" ]
2
2019-01-03T04:52:53.000Z
2019-01-13T06:46:51.000Z
from rl_coach.agents.clipped_ppo_agent import ClippedPPOAgentParameters from rl_coach.environments.gym_environment import GymVectorEnvironment from rl_coach.graph_managers.basic_rl_graph_manager import BasicRLGraphManager from rl_coach.graph_managers.graph_manager import ScheduleParameters from rl_coach.base_parameters...
41.797101
115
0.755895
from rl_coach.agents.clipped_ppo_agent import ClippedPPOAgentParameters from rl_coach.environments.gym_environment import GymVectorEnvironment from rl_coach.graph_managers.basic_rl_graph_manager import BasicRLGraphManager from rl_coach.graph_managers.graph_manager import ScheduleParameters from rl_coach.base_parameters...
1,887
0
69
68916536c1d5ca465b85a8616a7d557c0fd87b0d
26
py
Python
dispatch/__init__.py
jdotpy/dispatch
bf7d8e17fe7b680ca3ec2edf740fb0ed0498d14a
[ "MIT" ]
null
null
null
dispatch/__init__.py
jdotpy/dispatch
bf7d8e17fe7b680ca3ec2edf740fb0ed0498d14a
[ "MIT" ]
null
null
null
dispatch/__init__.py
jdotpy/dispatch
bf7d8e17fe7b680ca3ec2edf740fb0ed0498d14a
[ "MIT" ]
null
null
null
from .core import Reactor
13
25
0.807692
from .core import Reactor
0
0
0
bb2c4d24e323fbe9a91177fedb196262bb2b4c3e
2,070
py
Python
models.py
byCM/Project-5
f504687819ee8e3a041fad4c8978803e095a6844
[ "BSD-3-Clause" ]
null
null
null
models.py
byCM/Project-5
f504687819ee8e3a041fad4c8978803e095a6844
[ "BSD-3-Clause" ]
null
null
null
models.py
byCM/Project-5
f504687819ee8e3a041fad4c8978803e095a6844
[ "BSD-3-Clause" ]
null
null
null
import datetime from flask.ext.bcrypt import generate_password_hash from flask.ext.login import UserMixin from peewee import * DATABASE = SqliteDatabase('journal.db')
26.202532
65
0.579227
import datetime from flask.ext.bcrypt import generate_password_hash from flask.ext.login import UserMixin from peewee import * DATABASE = SqliteDatabase('journal.db') class User(UserMixin, Model): username = CharField(unique=True) email = CharField(unique=True) password = CharField(max_length=100) jo...
941
874
80
2a6b90215d5fbc4ceab501a0249519102e977d01
404
py
Python
juno/additional_data.py
ASG09/juno-python
45d7a58c5d226fd3ef8c33abfefa62644577e3be
[ "MIT" ]
7
2021-04-16T01:55:43.000Z
2021-11-29T22:56:51.000Z
juno/additional_data.py
ASG09/juno-python
45d7a58c5d226fd3ef8c33abfefa62644577e3be
[ "MIT" ]
6
2021-02-16T14:23:26.000Z
2022-02-13T20:39:23.000Z
juno/additional_data.py
ASG09/juno-python
45d7a58c5d226fd3ef8c33abfefa62644577e3be
[ "MIT" ]
3
2021-06-24T04:17:18.000Z
2021-11-29T22:20:32.000Z
from juno.resources import handler_request from juno.resources.routes import additional_data_routes
33.666667
79
0.839109
from juno.resources import handler_request from juno.resources.routes import additional_data_routes def list_banks(): return handler_request.get(additional_data_routes.get_banks_url()) def list_company_types(): return handler_request.get(additional_data_routes.get_company_types_url()) def list_business_area...
235
0
69
b70c025efaaeacb71bccea9b6bad94e23f08c8b4
5,662
py
Python
admin/tests/test_restriction_areas.py
vvmruder/c2cgeoportal
2aa1cfbfa3872fb745db6dae1e0c4ae9a0692542
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
admin/tests/test_restriction_areas.py
vvmruder/c2cgeoportal
2aa1cfbfa3872fb745db6dae1e0c4ae9a0692542
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
admin/tests/test_restriction_areas.py
vvmruder/c2cgeoportal
2aa1cfbfa3872fb745db6dae1e0c4ae9a0692542
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
# pylint: disable=no-self-use import json import pytest import re from geoalchemy2.shape import from_shape from shapely.geometry import box, Polygon, shape from . import AbstractViewsTests @pytest.fixture(scope='function') @pytest.mark.usefixtures('dbsession', 'transact') @pytest.mark.usefixtures('restriction_ar...
39.873239
107
0.651713
# pylint: disable=no-self-use import json import pytest import re from geoalchemy2.shape import from_shape from shapely.geometry import box, Polygon, shape from . import AbstractViewsTests @pytest.fixture(scope='function') @pytest.mark.usefixtures('dbsession', 'transact') def restriction_area_test_data(dbsession, ...
5,016
255
44
44ce39ef5ce4e2fb2f3af39ce433a9ebd41b5670
3,293
py
Python
paper_updater/paper_updater.py
abnormalend/minecraft_aws_tools
1db289d6d4d266798fda795487fc3725189f430b
[ "MIT" ]
null
null
null
paper_updater/paper_updater.py
abnormalend/minecraft_aws_tools
1db289d6d4d266798fda795487fc3725189f430b
[ "MIT" ]
null
null
null
paper_updater/paper_updater.py
abnormalend/minecraft_aws_tools
1db289d6d4d266798fda795487fc3725189f430b
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import requests import boto3 from os import listdir from os.path import isfile, join import re def install_paper(mc_version, paper_build): """This will download the paper jar""" url = "https://papermc.io/api/v2/projects/paper" mc_version = requests.get(url).json()['versions'][-1] if mc_...
43.906667
186
0.697844
#!/usr/bin/python3 import requests import boto3 from os import listdir from os.path import isfile, join import re def install_paper(mc_version, paper_build): """This will download the paper jar""" url = "https://papermc.io/api/v2/projects/paper" mc_version = requests.get(url).json()['versions'][-1] if mc_...
0
0
0
e07abf23c0b702a9441d51f706497dd10bcfb0b2
158
py
Python
python/core/poccore/simple.py
xmnlab/poc-multi-api
0b7814ed16c885aa63a8c63829e503879aab6837
[ "MIT" ]
null
null
null
python/core/poccore/simple.py
xmnlab/poc-multi-api
0b7814ed16c885aa63a8c63829e503879aab6837
[ "MIT" ]
null
null
null
python/core/poccore/simple.py
xmnlab/poc-multi-api
0b7814ed16c885aa63a8c63829e503879aab6837
[ "MIT" ]
1
2022-03-23T04:48:51.000Z
2022-03-23T04:48:51.000Z
from __future__ import annotations
22.571429
49
0.696203
from __future__ import annotations def avg_list(values: list) -> float | int | None: size = len(values) return sum(values) / size if size else None
99
0
23
ffa084f259f180cef3a97924d0efdc0c591a6878
86
py
Python
esrt/models/__init__.py
utahIRlab/ESRT
cac09827c72d84a664545418cc1ccae651db7f6f
[ "BSD-2-Clause" ]
18
2020-01-07T21:45:05.000Z
2022-03-27T18:51:34.000Z
esrt/models/__init__.py
utahIRlab/ESRT
cac09827c72d84a664545418cc1ccae651db7f6f
[ "BSD-2-Clause" ]
null
null
null
esrt/models/__init__.py
utahIRlab/ESRT
cac09827c72d84a664545418cc1ccae651db7f6f
[ "BSD-2-Clause" ]
3
2020-03-17T08:56:32.000Z
2022-02-03T00:25:40.000Z
from .hem import HEM from .drem import DREM from .aem import AEM from .zam import ZAM
17.2
22
0.767442
from .hem import HEM from .drem import DREM from .aem import AEM from .zam import ZAM
0
0
0
16d9c7495eec1e0c8a647e37e4e6440ea07a3d42
7,176
py
Python
python/py_diff_pd/env/duck_env_3d.py
brokencuph/diff_pd
2c30ecfa39762c5fc78dea9c7a226000e9fc5c15
[ "MIT" ]
4
2022-03-11T20:13:17.000Z
2022-03-31T00:49:59.000Z
python/py_diff_pd/env/duck_env_3d.py
brokencuph/diff_pd
2c30ecfa39762c5fc78dea9c7a226000e9fc5c15
[ "MIT" ]
null
null
null
python/py_diff_pd/env/duck_env_3d.py
brokencuph/diff_pd
2c30ecfa39762c5fc78dea9c7a226000e9fc5c15
[ "MIT" ]
2
2022-03-11T20:13:24.000Z
2022-03-12T03:38:46.000Z
import time from pathlib import Path import numpy as np import os from py_diff_pd.env.env_base import EnvBase from py_diff_pd.common.common import create_folder, ndarray, print_info from py_diff_pd.common.tet_mesh import tetrahedralize, read_tetgen_file, generate_tet_mesh, tet2obj from py_diff_pd.common.tri_mesh impo...
39.866667
103
0.578038
import time from pathlib import Path import numpy as np import os from py_diff_pd.env.env_base import EnvBase from py_diff_pd.common.common import create_folder, ndarray, print_info from py_diff_pd.common.tet_mesh import tetrahedralize, read_tetgen_file, generate_tet_mesh, tet2obj from py_diff_pd.common.tri_mesh impo...
6,314
4
157
965fae10a84a055b5ea1a275c65d5f8c61898dea
5,483
py
Python
core_functionality/tree_generation.py
yT0n1/D3MEAP-Projekt
138a10da2eba7b57d79a7b051f687652c1e05f86
[ "BSD-Source-Code" ]
null
null
null
core_functionality/tree_generation.py
yT0n1/D3MEAP-Projekt
138a10da2eba7b57d79a7b051f687652c1e05f86
[ "BSD-Source-Code" ]
null
null
null
core_functionality/tree_generation.py
yT0n1/D3MEAP-Projekt
138a10da2eba7b57d79a7b051f687652c1e05f86
[ "BSD-Source-Code" ]
null
null
null
import functools import operator from statistics import mean import math from anytree import LevelOrderIter, RenderTree, DoubleStyle from anytree.exporter import DotExporter from sympy.ntheory import factorint from core_functionality.solver_node import SolverNode if __name__ == '__main__': trees_8 = ...
34.702532
100
0.638884
import functools import operator from statistics import mean import math from anytree import LevelOrderIter, RenderTree, DoubleStyle from anytree.exporter import DotExporter from sympy.ntheory import factorint from core_functionality.solver_node import SolverNode def add_split_ratios(root: SolverNode): [node.se...
4,568
0
299
0ebe0a89e1ef06bd6b860120aa49f831523cd805
1,926
py
Python
app/tests/components_tests/test_services.py
nlessmann/grand-challenge.org
36abf6ccb40e2fc3fd3ff00e81deabd76f7e1ef8
[ "Apache-2.0" ]
101
2018-04-11T14:48:04.000Z
2022-03-28T00:29:48.000Z
app/tests/components_tests/test_services.py
nlessmann/grand-challenge.org
36abf6ccb40e2fc3fd3ff00e81deabd76f7e1ef8
[ "Apache-2.0" ]
1,733
2018-03-21T11:56:16.000Z
2022-03-31T14:58:30.000Z
app/tests/components_tests/test_services.py
nlessmann/grand-challenge.org
36abf6ccb40e2fc3fd3ff00e81deabd76f7e1ef8
[ "Apache-2.0" ]
42
2018-06-08T05:49:07.000Z
2022-03-29T08:43:01.000Z
import docker from django.conf import settings from grandchallenge.components.backends.docker import Service
35.018182
93
0.656802
import docker from django.conf import settings from grandchallenge.components.backends.docker import Service def test_service_start_cleanup(): job_id = "12345" exec_image = "crccheck/hello-world" filters = {"label": f"job={job_id}"} dockerclient = docker.DockerClient( base_url=settings.COMPO...
1,792
0
23
aace844a7e6eb350de4791c2e075aba9b776e445
1,312
py
Python
workflow/migrations/0030_auto_20180907_0704.py
sannleen/TolaActivity
b47154339c3a45583063ecad43b0b16ae2f8f36e
[ "Apache-2.0" ]
null
null
null
workflow/migrations/0030_auto_20180907_0704.py
sannleen/TolaActivity
b47154339c3a45583063ecad43b0b16ae2f8f36e
[ "Apache-2.0" ]
null
null
null
workflow/migrations/0030_auto_20180907_0704.py
sannleen/TolaActivity
b47154339c3a45583063ecad43b0b16ae2f8f36e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-09-07 14:04 from __future__ import unicode_literals import django.contrib.postgres.fields.hstore from django.db import migrations from django.db.utils import ProgrammingError
35.459459
234
0.682927
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-09-07 14:04 from __future__ import unicode_literals import django.contrib.postgres.fields.hstore from django.db import migrations from django.db.utils import ProgrammingError def create_fields(apps, schema_editor): # If fields are not there, add them. ...
862
165
46
b38399eca97c3af45e2e3f94f974bfee6c0723a3
243
py
Python
src/tf_components/visualization/clip_uint8.py
YorkUCVIL/Wavelet-Flow
8d6d63fa116ec44299c32f37e66817594510f644
[ "MIT" ]
59
2020-10-28T03:09:05.000Z
2022-01-29T22:10:04.000Z
src/tf_components/visualization/clip_uint8.py
YorkUCVIL/Wavelet-Flow
8d6d63fa116ec44299c32f37e66817594510f644
[ "MIT" ]
4
2020-12-24T11:00:40.000Z
2021-05-22T06:14:27.000Z
src/tf_components/visualization/clip_uint8.py
YorkUCVIL/Wavelet-Flow
8d6d63fa116ec44299c32f37e66817594510f644
[ "MIT" ]
2
2020-10-29T01:15:03.000Z
2021-04-20T11:55:51.000Z
import tensorflow as tf def clip_uint8(im_in): ''' clips a float value between 0 and 255 and casts to uint8 ''' with tf.variable_scope(None,default_name='clip_uint8'): im = tf.clip_by_value(im_in, 0, 255) return tf.cast(im, tf.uint8)
24.3
57
0.72428
import tensorflow as tf def clip_uint8(im_in): ''' clips a float value between 0 and 255 and casts to uint8 ''' with tf.variable_scope(None,default_name='clip_uint8'): im = tf.clip_by_value(im_in, 0, 255) return tf.cast(im, tf.uint8)
0
0
0
63002ce1ff3038ce8ac0dd5d1bea693d67e52bcf
4,899
py
Python
tests/python/xgboost/05_FraudDetection_GPU.py
cclauss/h2o4gpu
1bb161694ce67500383b7b3a542b349aa13ed7fe
[ "Apache-2.0" ]
null
null
null
tests/python/xgboost/05_FraudDetection_GPU.py
cclauss/h2o4gpu
1bb161694ce67500383b7b3a542b349aa13ed7fe
[ "Apache-2.0" ]
null
null
null
tests/python/xgboost/05_FraudDetection_GPU.py
cclauss/h2o4gpu
1bb161694ce67500383b7b3a542b349aa13ed7fe
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ :copyright: 2017-2018 H2O.ai, Inc. :license: Apache License Version 2.0 (see LICENSE for details) """ # # Experiment 05: Credit card Fraud (GPU version) # # This experiment uses the data from the Kaggle dataset [Credit Card Fraud Detection](https://www.kaggle.com/dalpozz/creditcardfraud). The dat...
18.077491
224
0.684221
# coding: utf-8 """ :copyright: 2017-2018 H2O.ai, Inc. :license: Apache License Version 2.0 (see LICENSE for details) """ # # Experiment 05: Credit card Fraud (GPU version) # # This experiment uses the data from the Kaggle dataset [Credit Card Fraud Detection](https://www.kaggle.com/dalpozz/creditcardfraud). The dat...
0
0
0
e11e8e6035a55dc0f762b22093fc412f27524ef8
1,002
py
Python
setup.py
ronin-gw/cqstat
44333c1904134358d1c54f03a68cd33b12f43b2a
[ "MIT" ]
2
2018-04-14T09:09:53.000Z
2020-03-16T09:41:00.000Z
setup.py
ronin-gw/cqstat
44333c1904134358d1c54f03a68cd33b12f43b2a
[ "MIT" ]
null
null
null
setup.py
ronin-gw/cqstat
44333c1904134358d1c54f03a68cd33b12f43b2a
[ "MIT" ]
null
null
null
#!/usr/bin/env python from os import path from setuptools import setup with open(path.join(path.dirname(__file__), "README.rst")) as f: readme = f.read() setup( name="cqstat", version="1.0.0", description="A colorful command line tool substitutes for Grid Engine qstat command", long_description=r...
28.628571
89
0.623752
#!/usr/bin/env python from os import path from setuptools import setup with open(path.join(path.dirname(__file__), "README.rst")) as f: readme = f.read() setup( name="cqstat", version="1.0.0", description="A colorful command line tool substitutes for Grid Engine qstat command", long_description=r...
0
0
0
32dc22f4e3c16a0278bb7582299d84a2f85d06da
2,555
py
Python
_app/list_fields.py
Wilfongjt/lb-data
eca16bcec6cae5822146dfce8ea56e5f533c7f87
[ "MIT" ]
null
null
null
_app/list_fields.py
Wilfongjt/lb-data
eca16bcec6cae5822146dfce8ea56e5f533c7f87
[ "MIT" ]
6
2020-04-15T10:15:30.000Z
2020-07-10T16:12:42.000Z
_app/list_fields.py
Wilfongjt/lb-data
eca16bcec6cae5822146dfce8ea56e5f533c7f87
[ "MIT" ]
null
null
null
from pathlib import Path from context_dict import ContextDict from pprint import pprint ''' common lists of fields getFields is all fields in table ''' if __name__ == "__main__": main()
42.583333
125
0.592172
from pathlib import Path from context_dict import ContextDict from pprint import pprint ''' common lists of fields getFields is all fields in table ''' class FieldList(list): def __init__(self, tbl_dictionary, test_list=[]): self.tbl_dictionary = tbl_dictionary self.test_list = test_list ...
2,289
1
72
97fcddf59fc7a873b57616f4f62ce172821bdab4
3,783
py
Python
src/app.py
pralphv/hkportfolioanalysis-backend
6dbf6f17e6ebd95e28ee042126b34408dde4f520
[ "MIT" ]
null
null
null
src/app.py
pralphv/hkportfolioanalysis-backend
6dbf6f17e6ebd95e28ee042126b34408dde4f520
[ "MIT" ]
1
2021-03-31T19:44:25.000Z
2021-03-31T19:44:25.000Z
src/app.py
pralphv/hkportfolioanalysis-backend
6dbf6f17e6ebd95e28ee042126b34408dde4f520
[ "MIT" ]
1
2020-11-27T17:56:38.000Z
2020-11-27T17:56:38.000Z
from datetime import datetime, time import logging import json import os import requests import traceback from dotenv import load_dotenv from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from src import models from src import data from src import finance_stats load_dotenv() send_slack_...
28.877863
96
0.663759
from datetime import datetime, time import logging import json import os import requests import traceback from dotenv import load_dotenv from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from src import models from src import data from src import finance_stats load_dotenv() def send_sla...
2,522
0
91
0fc95fa6d9d133629c0cae5b197980cb3d74544d
1,033
py
Python
main.py
Nandan-18/Validator
1c148428d7183ce5ff13a90b611d21ba280c2ba6
[ "MIT" ]
null
null
null
main.py
Nandan-18/Validator
1c148428d7183ce5ff13a90b611d21ba280c2ba6
[ "MIT" ]
null
null
null
main.py
Nandan-18/Validator
1c148428d7183ce5ff13a90b611d21ba280c2ba6
[ "MIT" ]
null
null
null
# Main Program import validate print(""" --------------------------------------------------- | MENU | --------------------------------------------------- | 1. Generate a 4 digit OTP | | 2. Generate a Captcha of...
30.382353
80
0.332043
# Main Program import validate print(""" --------------------------------------------------- | MENU | --------------------------------------------------- | 1. Generate a 4 digit OTP | | 2. Generate a Captcha of...
0
0
0
06a2db0bc48e822702191bdf15744004cd1e9e57
7,428
py
Python
tools/train_utils/kd_train_utilsv2.py
EmiyaNing/OpenPCDet
41ff28209cb000b51626a0ed8593b0adbe3dd447
[ "Apache-2.0" ]
null
null
null
tools/train_utils/kd_train_utilsv2.py
EmiyaNing/OpenPCDet
41ff28209cb000b51626a0ed8593b0adbe3dd447
[ "Apache-2.0" ]
null
null
null
tools/train_utils/kd_train_utilsv2.py
EmiyaNing/OpenPCDet
41ff28209cb000b51626a0ed8593b0adbe3dd447
[ "Apache-2.0" ]
null
null
null
import glob import os import torch import tqdm import numpy as np from torch.nn.utils import clip_grad_norm_ def compact_batch(tensor_list): ''' Write some code to pad the teacher predicts.... ''' bs, ch, fix = tensor_list[0].shape max_ch = ch pad_tensor_list = [] for tensor in tensor_...
38.092308
152
0.645396
import glob import os import torch import tqdm import numpy as np from torch.nn.utils import clip_grad_norm_ def compact_batch(tensor_list): ''' Write some code to pad the teacher predicts.... ''' bs, ch, fix = tensor_list[0].shape max_ch = ch pad_tensor_list = [] for tensor in tensor_...
6,595
0
138
e75fad90d3020501fcd399fd91216b325469158f
844
py
Python
social_core/backends/echosign.py
shnaqawi/social-core
402e15bd2854ade0b8f0d19663966473f0e1c6ff
[ "BSD-3-Clause" ]
745
2016-12-03T16:38:37.000Z
2022-03-29T17:18:52.000Z
social_core/backends/echosign.py
shnaqawi/social-core
402e15bd2854ade0b8f0d19663966473f0e1c6ff
[ "BSD-3-Clause" ]
624
2016-12-06T16:01:46.000Z
2022-03-29T15:50:35.000Z
virtual/lib/python3.6/site-packages/social_core/backends/echosign.py
dennismwaniki67/awards
80ed10541f5f751aee5f8285ab1ad54cfecba95f
[ "MIT" ]
583
2016-12-03T16:40:38.000Z
2022-03-28T05:32:37.000Z
from .oauth import BaseOAuth2
33.76
67
0.689573
from .oauth import BaseOAuth2 class EchosignOAuth2(BaseOAuth2): name = 'echosign' REDIRECT_STATE = False ACCESS_TOKEN_METHOD = 'POST' REFRESH_TOKEN_METHOD = 'POST' REVOKE_TOKEN_METHOD = 'POST' AUTHORIZATION_URL = 'https://secure.echosign.com/public/oauth' ACCESS_TOKEN_URL = 'https://secure...
282
508
23
e2720421e911967459aa186f7dc37538a0fb3b84
11,701
py
Python
DiscordBot/Commands/DiscordBets.py
aronjanosch/kirbec-bot
6d44e177c5cf6669564047fbbc8f6e8c342bca28
[ "MIT" ]
null
null
null
DiscordBot/Commands/DiscordBets.py
aronjanosch/kirbec-bot
6d44e177c5cf6669564047fbbc8f6e8c342bca28
[ "MIT" ]
null
null
null
DiscordBot/Commands/DiscordBets.py
aronjanosch/kirbec-bot
6d44e177c5cf6669564047fbbc8f6e8c342bca28
[ "MIT" ]
null
null
null
import discord import itertools import re from datetime import datetime from .utils import * class DiscordBets: """ Class that creates bets within the Discord Community Attributes __________ fire (Fire obj): The fire instance where information is fetched/updated Functions __________ ...
41.492908
184
0.626869
import discord import itertools import re from datetime import datetime from .utils import * class DiscordBets: """ Class that creates bets within the Discord Community Attributes __________ fire (Fire obj): The fire instance where information is fetched/updated Functions __________ ...
9,528
0
443
80ee24721b08cf08f3111c7ddfe447b96cee264b
5,199
py
Python
src/datasets.py
mhilmiasyrofi/DeepConcolic
87180ff4dafe5413f92cdd4839b087c5fb8a7f33
[ "BSD-3-Clause" ]
null
null
null
src/datasets.py
mhilmiasyrofi/DeepConcolic
87180ff4dafe5413f92cdd4839b087c5fb8a7f33
[ "BSD-3-Clause" ]
null
null
null
src/datasets.py
mhilmiasyrofi/DeepConcolic
87180ff4dafe5413f92cdd4839b087c5fb8a7f33
[ "BSD-3-Clause" ]
null
null
null
# NB: do NOT import utils as this disables eager execution that seems # to be required for proper operations of `tf.summary`. import os import tensorflow as tf import numpy as np from sklearn.model_selection import train_test_split # --- default_datadir = os.getenv ('DC_DATADIR') or \ os.getenv ('TM...
39.687023
111
0.612425
# NB: do NOT import utils as this disables eager execution that seems # to be required for proper operations of `tf.summary`. import os import tensorflow as tf import numpy as np from sklearn.model_selection import train_test_split # --- default_datadir = os.getenv ('DC_DATADIR') or \ os.getenv ('TM...
4,076
0
135
36407867a0511a19c71db75ca6674120653ca797
549
py
Python
recipes/Python/576823_Prints_full_name_all_occurrences_given_filename_/recipe-576823.py
tdiprima/code
61a74f5f93da087d27c70b2efe779ac6bd2a3b4f
[ "MIT" ]
2,023
2017-07-29T09:34:46.000Z
2022-03-24T08:00:45.000Z
recipes/Python/576823_Prints_full_name_all_occurrences_given_filename_/recipe-576823.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
32
2017-09-02T17:20:08.000Z
2022-02-11T17:49:37.000Z
recipes/Python/576823_Prints_full_name_all_occurrences_given_filename_/recipe-576823.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
780
2017-07-28T19:23:28.000Z
2022-03-25T20:39:41.000Z
"""Prints full name of all occurrences of given filename in your PATH. Usage: findinpath.py filename""" import os import sys if __name__ == '__main__': sys.exit(main())
20.333333
70
0.595628
"""Prints full name of all occurrences of given filename in your PATH. Usage: findinpath.py filename""" import os import sys def main(): if len(sys.argv) < 2: print __doc__ return 2 filename = sys.argv[1] status = 1 sep = ';' if sys.platform == 'win32' else ':' for path in os.en...
350
0
23
9723f6fefa2411f19b03b3f939bc6e21453de8e3
5,890
py
Python
ethwizard/wizard.py
stake-house/eth2-validator-wizard
90a0182afc2efa70d4398035a966200856d4a556
[ "MIT" ]
17
2021-04-15T10:44:25.000Z
2021-08-05T13:05:22.000Z
ethwizard/wizard.py
g3n3s1sl4b/eth-wizard
60e9d81227e8e26af0e5e6e97316caadc8343dfe
[ "MIT" ]
43
2021-04-15T14:43:53.000Z
2021-08-23T15:20:18.000Z
ethwizard/wizard.py
stake-house/eth2-validator-wizard
90a0182afc2efa70d4398035a966200856d4a556
[ "MIT" ]
1
2021-03-09T19:42:01.000Z
2021-03-09T19:42:01.000Z
import sys from ethwizard import __version__ from prompt_toolkit.formatted_text import HTML from prompt_toolkit.shortcuts import button_dialog from ethwizard.platforms import ( get_install_steps, supported_platform, has_su_perm, init_logging, quit_app, get_save_state, get_load_state, ...
28.181818
86
0.656537
import sys from ethwizard import __version__ from prompt_toolkit.formatted_text import HTML from prompt_toolkit.shortcuts import button_dialog from ethwizard.platforms import ( get_install_steps, supported_platform, has_su_perm, init_logging, quit_app, get_save_state, get_load_state, ...
5,317
0
161
8ac8892a88323ab858f7b429e11a4795b84f7c8a
711
py
Python
elevenclock/globals.py
kinr0k/ElevenClock
f52fdc024491e16c266af2710f9012a2dd6927a7
[ "Apache-2.0" ]
null
null
null
elevenclock/globals.py
kinr0k/ElevenClock
f52fdc024491e16c266af2710f9012a2dd6927a7
[ "Apache-2.0" ]
null
null
null
elevenclock/globals.py
kinr0k/ElevenClock
f52fdc024491e16c266af2710f9012a2dd6927a7
[ "Apache-2.0" ]
null
null
null
import io from types import FunctionType from PySide2.QtGui import * from PySide2.QtCore import * from PySide2.QtWidgets import * app: QApplication = None buffer: io.StringIO = None old_stdout: io.StringIO = None trayIcon: QSystemTrayIcon = None sw: QScrollArea = None tempDir: str = None
23.7
80
0.763713
import io from types import FunctionType from PySide2.QtGui import * from PySide2.QtCore import * from PySide2.QtWidgets import * def loadTimeFormat(): raise NotImplementedError("loadTimeFormat function has not been defined!") def updateIfPossible(): raise NotImplementedError("updateIfPossible function has...
312
0
100
ec03486350601be93a93d2185352a42728bc4237
5,680
py
Python
dev/google_communicator/worker.py
dapatil211/deep_architect
feadfb545d166216e27532ea47e8efa178e0d142
[ "MIT" ]
272
2017-05-01T08:14:15.000Z
2022-02-02T15:21:24.000Z
dev/google_communicator/worker.py
dapatil211/deep_architect
feadfb545d166216e27532ea47e8efa178e0d142
[ "MIT" ]
16
2017-09-25T02:19:40.000Z
2022-02-10T00:37:09.000Z
dev/google_communicator/worker.py
dapatil211/deep_architect
feadfb545d166216e27532ea47e8efa178e0d142
[ "MIT" ]
35
2017-05-10T14:39:40.000Z
2021-01-17T10:09:34.000Z
import argparse import pickle import json import time import threading import pprint import deep_architect.utils as ut from google.cloud import pubsub_v1 from deep_architect.contrib.misc.datasets.loaders import (load_cifar10, load_mnist) from deep_architect.con...
32.272727
112
0.602113
import argparse import pickle import json import time import threading import pprint import deep_architect.utils as ut from google.cloud import pubsub_v1 from deep_architect.contrib.misc.datasets.loaders import (load_cifar10, load_mnist) from deep_architect.con...
4,489
0
69
6da44c69fddd3660960a30116a68e21ca2c73ed2
337
py
Python
2020/05-seccon4b/rev-mask/sol.py
wani-hackase/wani-writeup
dd4ad0607d2f2193ad94c1ce65359294aa591681
[ "MIT" ]
25
2019-03-06T11:55:56.000Z
2021-05-21T22:07:14.000Z
2020/05-seccon4b/rev-mask/sol.py
wani-hackase/wani-writeup
dd4ad0607d2f2193ad94c1ce65359294aa591681
[ "MIT" ]
1
2020-06-25T07:27:15.000Z
2020-06-25T07:27:15.000Z
2020/05-seccon4b/rev-mask/sol.py
wani-hackase/wani-writeup
dd4ad0607d2f2193ad94c1ce65359294aa591681
[ "MIT" ]
1
2019-02-14T00:42:28.000Z
2019-02-14T00:42:28.000Z
import angr import claripy project = angr.Project("./mask") argv1 = claripy.BVS("argv1",100*8) initial_state = project.factory.entry_state(args=["./mask",argv1]) sm = project.factory.simulation_manager(initial_state) sm.explore(find=0x4012d6) found = sm.found[0] solution = found.solver.eval(argv1, cast_to=bytes) print...
28.083333
66
0.765579
import angr import claripy project = angr.Project("./mask") argv1 = claripy.BVS("argv1",100*8) initial_state = project.factory.entry_state(args=["./mask",argv1]) sm = project.factory.simulation_manager(initial_state) sm.explore(find=0x4012d6) found = sm.found[0] solution = found.solver.eval(argv1, cast_to=bytes) print...
0
0
0
e73584a958e92931104e842e71cf07417d8fe8d1
2,123
py
Python
Plugins/Aspose.BarCode Java for Jython/asposebarcode/WorkingWithBarcode/UtilityFeatures/CodeText.py
aspose-barcode/Aspose.BarCode-for-Java
00a0ef02cb58fda84b47939f7f8c0e2e5ca9fb65
[ "MIT" ]
10
2016-05-09T07:05:51.000Z
2019-05-22T07:31:49.000Z
Plugins/Aspose.BarCode Java for Jython/asposebarcode/WorkingWithBarcode/UtilityFeatures/CodeText.py
aspose-barcode/Aspose.BarCode-for-Java
00a0ef02cb58fda84b47939f7f8c0e2e5ca9fb65
[ "MIT" ]
3
2017-05-01T08:36:07.000Z
2019-01-09T21:16:13.000Z
Plugins/Aspose.BarCode Java for Jython/asposebarcode/WorkingWithBarcode/UtilityFeatures/CodeText.py
aspose-barcode/Aspose.BarCode-for-Java
00a0ef02cb58fda84b47939f7f8c0e2e5ca9fb65
[ "MIT" ]
14
2016-04-09T07:27:37.000Z
2021-05-26T10:42:26.000Z
from asposebarcode import Settings from com.aspose.barcode import BarCodeBuilder from com.aspose.barcode import Symbology from com.aspose.barcode import CodeLocation from com.aspose.barcode import BarCodeImageFormat from java.awt import Color if __name__ == '__main__': CodeText()
29.082192
83
0.66227
from asposebarcode import Settings from com.aspose.barcode import BarCodeBuilder from com.aspose.barcode import Symbology from com.aspose.barcode import CodeLocation from com.aspose.barcode import BarCodeImageFormat from java.awt import Color class CodeText: def __init__(self): # Set appearance of...
1,717
-6
112
ddba732acdf4ef9caaeb7a5549b3b5239f2a356f
919
py
Python
thai2transformers/utils.py
modem888/thai2transformers
04716ecb9a88c1b1ea08d63511265245d53b1eb9
[ "Apache-2.0" ]
64
2020-02-28T04:15:23.000Z
2022-03-13T16:01:21.000Z
thai2transformers/utils.py
modem888/thai2transformers
04716ecb9a88c1b1ea08d63511265245d53b1eb9
[ "Apache-2.0" ]
28
2021-01-27T04:43:30.000Z
2022-01-26T10:27:47.000Z
thai2transformers/utils.py
modem888/thai2transformers
04716ecb9a88c1b1ea08d63511265245d53b1eb9
[ "Apache-2.0" ]
17
2020-06-11T07:54:44.000Z
2021-11-24T07:45:22.000Z
import operator from functools import reduce from typing import Tuple, Dict, Union, List def get_dict_val(root:Dict, keys:Union[str, List[str]]): """ Access a nested object in root by item sequence. Args: root: Dict target object for accessing the value keys: Union[str, Tuple[...
24.837838
71
0.527748
import operator from functools import reduce from typing import Tuple, Dict, Union, List def get_dict_val(root:Dict, keys:Union[str, List[str]]): """ Access a nested object in root by item sequence. Args: root: Dict target object for accessing the value keys: Union[str, Tuple[...
0
0
0
99125d4e0dedd2344f832eb145a95dc92be6d0fd
432
py
Python
gen_progs/are_anagram.py
kmad1729/python_notes
8d94c504fcd9a1adf61788efc0fbe6e7513bbaf4
[ "Unlicense" ]
null
null
null
gen_progs/are_anagram.py
kmad1729/python_notes
8d94c504fcd9a1adf61788efc0fbe6e7513bbaf4
[ "Unlicense" ]
null
null
null
gen_progs/are_anagram.py
kmad1729/python_notes
8d94c504fcd9a1adf61788efc0fbe6e7513bbaf4
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 from collections import Counter def are_anagrams(*args): 'return True if args are anagrams' if len(args) < 2: raise TypeError("expected 2 or more arguments") c = Counter(args[0]) return all(c == Counter(a) for a in args[1:]) arg1 = "appel apple aplep leapp".split() #pri...
25.411765
65
0.659722
#!/usr/bin/env python3 from collections import Counter def are_anagrams(*args): 'return True if args are anagrams' if len(args) < 2: raise TypeError("expected 2 or more arguments") c = Counter(args[0]) return all(c == Counter(a) for a in args[1:]) arg1 = "appel apple aplep leapp".split() #pri...
0
0
0
0b8346220088348f5f4c59fadca6fb18df8090a6
2,475
py
Python
src/menu/menu.py
KrbDevelopment/LCD-Matrix
f5064ace1bb42b7e8cacbf91434bf0064a6812a6
[ "MIT" ]
null
null
null
src/menu/menu.py
KrbDevelopment/LCD-Matrix
f5064ace1bb42b7e8cacbf91434bf0064a6812a6
[ "MIT" ]
null
null
null
src/menu/menu.py
KrbDevelopment/LCD-Matrix
f5064ace1bb42b7e8cacbf91434bf0064a6812a6
[ "MIT" ]
null
null
null
from src.wrapper.sh1106 import Screen from src.modules.clock_module import Module as ClockModule from src.modules.temperature_module import Module as TemperatureModule from PIL import Image, ImageDraw, ImageFont import os font_path = os.path.join('assets', 'Font.ttf')
31.730769
126
0.64404
from src.wrapper.sh1106 import Screen from src.modules.clock_module import Module as ClockModule from src.modules.temperature_module import Module as TemperatureModule from PIL import Image, ImageDraw, ImageFont import os font_path = os.path.join('assets', 'Font.ttf') class MenuItem: def __init__(self, title, mod...
1,804
26
376
195456e3400acb5aee9e58c89dd74b7d13410202
665
py
Python
tasks/python3/util.py
greck2908/worldview
d17c463080218ce0a3d922be3dc8da5152860391
[ "NASA-1.3" ]
592
2015-01-19T15:32:19.000Z
2022-03-22T02:33:23.000Z
tasks/python3/util.py
katarenamatos/worldview
d98949a772eb19d99c14c4dc8128241ec9f72798
[ "NASA-1.3" ]
2,515
2016-01-05T17:20:04.000Z
2022-03-30T15:56:46.000Z
tasks/python3/util.py
katarenamatos/worldview
d98949a772eb19d99c14c4dc8128241ec9f72798
[ "NASA-1.3" ]
208
2015-03-07T23:40:06.000Z
2022-03-29T16:59:42.000Z
from copy import deepcopy # dict_merge from # http://blog.impressiver.com/post/31434674390/deep-merge-multiple-python-dicts
26.6
79
0.645113
from copy import deepcopy # dict_merge from # http://blog.impressiver.com/post/31434674390/deep-merge-multiple-python-dicts def dict_merge(target, *args): # Merge multiple dicts if len(args) > 1: for obj in args: dict_merge(target, obj) return target # Recursively merge dicts and set non-dict valu...
519
0
22
f8b6bfc8ac13bb89cab24d2120e69c1251599616
63
py
Python
cursoPy/main.py
joninhasmcz/newProjects
3d8d329f36a6cdfe544ea3c70d4daf6618510c7d
[ "MIT" ]
null
null
null
cursoPy/main.py
joninhasmcz/newProjects
3d8d329f36a6cdfe544ea3c70d4daf6618510c7d
[ "MIT" ]
null
null
null
cursoPy/main.py
joninhasmcz/newProjects
3d8d329f36a6cdfe544ea3c70d4daf6618510c7d
[ "MIT" ]
null
null
null
frase = 'curso em video python' print('{}'.format(frase[9:21]))
31.5
31
0.666667
frase = 'curso em video python' print('{}'.format(frase[9:21]))
0
0
0
ea98d4ceea31a24d64f90ec7870a09620e86a15e
512
py
Python
tools/port-finder.py
EijiEternal/ddos-toolkit-sakura
b71d1e5b3431c9f24312605b3f6ac7868bd960e9
[ "MIT" ]
2
2021-01-20T15:11:51.000Z
2022-03-31T07:33:21.000Z
tools/port-finder.py
EijiEternal/ddos-toolkit-sakura
b71d1e5b3431c9f24312605b3f6ac7868bd960e9
[ "MIT" ]
null
null
null
tools/port-finder.py
EijiEternal/ddos-toolkit-sakura
b71d1e5b3431c9f24312605b3f6ac7868bd960e9
[ "MIT" ]
null
null
null
from pip._vendor.distlib.compat import raw_input import subprocess import pyfiglet pf = pyfiglet.figlet_format("S-PF", font="5lineoblique") print(pf) print("ip example 192.168.1.1") ipadd = raw_input("Ip-Address" r"""-------->>>> """) print("Port range example 20-40") pr = raw_input("Port-range" r"""-----...
22.26087
57
0.585938
from pip._vendor.distlib.compat import raw_input import subprocess import pyfiglet pf = pyfiglet.figlet_format("S-PF", font="5lineoblique") print(pf) print("ip example 192.168.1.1") ipadd = raw_input("Ip-Address" r"""-------->>>> """) print("Port range example 20-40") pr = raw_input("Port-range" r"""-----...
0
0
0
b301f2fef09a7157e294444991d6968096a53b68
1,764
py
Python
vec2graph/usage_realtime.py
lizaku/vec2graph
337c73d6ae0c19284710fccb9a1d1b139ef6cfbd
[ "MIT" ]
23
2019-06-29T20:27:52.000Z
2022-02-12T08:39:52.000Z
vec2graph/usage_realtime.py
lizaku/vec2graph
337c73d6ae0c19284710fccb9a1d1b139ef6cfbd
[ "MIT" ]
5
2019-07-09T14:26:41.000Z
2021-12-20T19:27:26.000Z
vec2graph/usage_realtime.py
lizaku/vec2graph
337c73d6ae0c19284710fccb9a1d1b139ef6cfbd
[ "MIT" ]
4
2020-05-12T15:55:35.000Z
2021-09-19T14:54:39.000Z
#!/usr/bin/env python import argparse import logging import os import webbrowser from example_usage import load_embeddings from vec2graph import visualize logging.basicConfig( format="%(asctime)s : %(levelname)s : %(message)s", level=logging.INFO ) parser = argparse.ArgumentParser() parser.add_argument( "-m...
26.727273
86
0.628118
#!/usr/bin/env python import argparse import logging import os import webbrowser from example_usage import load_embeddings from vec2graph import visualize logging.basicConfig( format="%(asctime)s : %(levelname)s : %(message)s", level=logging.INFO ) parser = argparse.ArgumentParser() parser.add_argument( "-m...
0
0
0
0f5c4f724bc0a9e005f10e32d01ea5dad0a16231
973
py
Python
colections/stratify_dataset.py
vanducng/learning-spark
b7e93361b1ae37fbcd718c4d7034b8355b65fd94
[ "MIT" ]
null
null
null
colections/stratify_dataset.py
vanducng/learning-spark
b7e93361b1ae37fbcd718c4d7034b8355b65fd94
[ "MIT" ]
null
null
null
colections/stratify_dataset.py
vanducng/learning-spark
b7e93361b1ae37fbcd718c4d7034b8355b65fd94
[ "MIT" ]
null
null
null
# Way 1 from pyspark.sql import functions as F def stratified_split_train_test(df, frac, label, join_on, seed=42): """ stratfied split of a dataframe in train and test set. inspiration gotten from: https://stackoverflow.com/a/47672336/1771155 https://stackoverflow.com/a/39889263/1771155""" fractio...
33.551724
98
0.720452
# Way 1 from pyspark.sql import functions as F def stratified_split_train_test(df, frac, label, join_on, seed=42): """ stratfied split of a dataframe in train and test set. inspiration gotten from: https://stackoverflow.com/a/47672336/1771155 https://stackoverflow.com/a/39889263/1771155""" fractio...
0
0
0
8a756757db5f5a2c1ab33799cedb5c92d5153f89
2,366
py
Python
scripts/makeelectrodes.py
flyingfalling/nvisutils
b1a36f2968c9e2bee323ac9e64081860b35ccd2b
[ "MIT" ]
null
null
null
scripts/makeelectrodes.py
flyingfalling/nvisutils
b1a36f2968c9e2bee323ac9e64081860b35ccd2b
[ "MIT" ]
null
null
null
scripts/makeelectrodes.py
flyingfalling/nvisutils
b1a36f2968c9e2bee323ac9e64081860b35ccd2b
[ "MIT" ]
null
null
null
#REV: read it, separate it, use freq to make timings ;) #REV: convert from old 7-el to 49-el, pain in the butt. #REV: assume I have 0, 2, 4, 6, 8, 10, 12, makes 7 electrodes, at 150 spacing ugh. #REV: I *think* 0 is x=50, 2 is x=200, 4 is x=350, 6 is x=500 #REV: Just do single correlations, if right now electrodes go...
25.717391
204
0.532544
#REV: read it, separate it, use freq to make timings ;) #REV: convert from old 7-el to 49-el, pain in the butt. #REV: assume I have 0, 2, 4, 6, 8, 10, 12, makes 7 electrodes, at 150 spacing ugh. #REV: I *think* 0 is x=50, 2 is x=200, 4 is x=350, 6 is x=500 #REV: Just do single correlations, if right now electrodes go...
757
0
22
4a533f28e1d77428d3cc7befc42ad01e05e6f27d
2,912
py
Python
files/app.py
pnoj/judge-executor
3b90c3f9da7c9a912cd40ded4abf409ebae15297
[ "MIT" ]
null
null
null
files/app.py
pnoj/judge-executor
3b90c3f9da7c9a912cd40ded4abf409ebae15297
[ "MIT" ]
null
null
null
files/app.py
pnoj/judge-executor
3b90c3f9da7c9a912cd40ded4abf409ebae15297
[ "MIT" ]
null
null
null
import requests from flask import Flask, request import os import info import isolate app = Flask(__name__) @app.route('/') @app.route('/compile', methods=["POST"]) @app.route('/run', methods=["POST"]) @app.before_first_request
34.258824
160
0.637706
import requests from flask import Flask, request import os import info import isolate app = Flask(__name__) @app.route('/') def status(): executor_status = { "language": info.language, "status": config['status'], } return executor_status @app.route('/compile', methods=["POST"]) def compi...
2,589
0
88
bfd6b1e2de49c5421669e4fb87b28ce26ecd3f61
5,397
py
Python
cogs/hl.py
achueves/AceBot
30cce6206df49ddb18dc4af03c146a564f3594ea
[ "MIT" ]
1
2021-09-04T04:52:13.000Z
2021-09-04T04:52:13.000Z
cogs/hl.py
achueves/AceBot
30cce6206df49ddb18dc4af03c146a564f3594ea
[ "MIT" ]
null
null
null
cogs/hl.py
achueves/AceBot
30cce6206df49ddb18dc4af03c146a564f3594ea
[ "MIT" ]
null
null
null
import re import disnake from disnake.ext import commands from ids import AHK_GUILD_ID from cogs.mixins import AceMixin from utils.context import is_mod from utils.converters import LengthConverter DELETE_EMOJI = '\N{Put Litter in Its Place Symbol}' DEFAULT_LANG = 'py' lang_converter = LangConverter(1, 32) clas...
29.653846
112
0.699092
import re import disnake from disnake.ext import commands from ids import AHK_GUILD_ID from cogs.mixins import AceMixin from utils.context import is_mod from utils.converters import LengthConverter DELETE_EMOJI = '\N{Put Litter in Its Place Symbol}' DEFAULT_LANG = 'py' class LangConverter(LengthConverter): async ...
249
16
69
ab1858651821aadefadd0d2abb750bbdf4eb9e94
1,304
py
Python
inference.py
hukefei/SOLO-master
fcc034470ea7b4dee39d6071d179695df8a3a61b
[ "BSD-2-Clause" ]
2
2020-11-11T12:39:31.000Z
2020-12-25T01:44:15.000Z
inference.py
hukefei/SOLO-master
fcc034470ea7b4dee39d6071d179695df8a3a61b
[ "BSD-2-Clause" ]
null
null
null
inference.py
hukefei/SOLO-master
fcc034470ea7b4dee39d6071d179695df8a3a61b
[ "BSD-2-Clause" ]
null
null
null
from mmdet.apis import init_detector, inference_detector, show_result_pyplot, show_result_ins import mmcv import os, glob, time config_file = 'cfg/aug_solov2_tuned.py' # download the checkpoint from model zoo and put it in `checkpoints/` checkpoint_file = 'work_dirs/solov2_tianchi_tuned.pth' # build the model from a ...
36.222222
93
0.706288
from mmdet.apis import init_detector, inference_detector, show_result_pyplot, show_result_ins import mmcv import os, glob, time config_file = 'cfg/aug_solov2_tuned.py' # download the checkpoint from model zoo and put it in `checkpoints/` checkpoint_file = 'work_dirs/solov2_tianchi_tuned.pth' # build the model from a ...
0
0
0
f36bff001773a91726a85ac58fcc47dc05c722f7
690
py
Python
sara_flexbe_states/src/sara_flexbe_states/SetKey.py
WalkingMachine/sara_behaviors
fcb55d274331915cd39d7d444546f17a39f85a44
[ "BSD-3-Clause" ]
5
2018-05-07T19:58:08.000Z
2021-04-21T10:49:05.000Z
sara_flexbe_states/src/sara_flexbe_states/SetKey.py
WalkingMachine/sara_behaviors
fcb55d274331915cd39d7d444546f17a39f85a44
[ "BSD-3-Clause" ]
21
2017-05-26T01:20:06.000Z
2021-01-26T23:03:36.000Z
sara_flexbe_states/src/sara_flexbe_states/SetKey.py
WalkingMachine/sara_behaviors
fcb55d274331915cd39d7d444546f17a39f85a44
[ "BSD-3-Clause" ]
2
2019-07-22T07:21:20.000Z
2019-11-11T20:49:22.000Z
# !/usr/bin/env python import rospy from flexbe_core import EventState, Logger ''' Created on 21.09.2017 @author: Philippe La Madeleine ''' class SetKey(EventState): ''' Set a Key to a predefined Value -- Value object The desired value. <# Key object The key to set. <...
19.166667
77
0.542029
# !/usr/bin/env python import rospy from flexbe_core import EventState, Logger ''' Created on 21.09.2017 @author: Philippe La Madeleine ''' class SetKey(EventState): ''' Set a Key to a predefined Value -- Value object The desired value. <# Key object The key to set. <...
0
0
0
2a35b3d501774ece5d4197fc8383e2d539d999ae
1,001
py
Python
chapter4_特征提取/C4_1_y_2.py
busyyang/python_sound_open
91bc284f0ed538c1e8756a1a1475956191b4ae86
[ "Apache-2.0" ]
165
2020-06-10T03:39:17.000Z
2022-03-28T08:37:32.000Z
chapter4_特征提取/C4_1_y_2.py
shangminghao/python_sound_open
91bc284f0ed538c1e8756a1a1475956191b4ae86
[ "Apache-2.0" ]
3
2020-11-20T03:00:56.000Z
2021-08-05T01:30:32.000Z
chapter4_特征提取/C4_1_y_2.py
shangminghao/python_sound_open
91bc284f0ed538c1e8756a1a1475956191b4ae86
[ "Apache-2.0" ]
66
2020-06-02T01:57:24.000Z
2022-03-16T07:54:59.000Z
from chapter2_基础.soundBase import * from chapter4_特征提取.end_detection import * data, fs = soundBase('C4_1_y.wav').audioread() data -= np.mean(data) data /= np.max(data) IS = 0.25 wlen = 200 inc = 80 N = len(data) time = [i / fs for i in range(N)] wnd = np.hamming(wlen) NIS = int((IS * fs - wlen) // inc + 1)...
26.342105
71
0.601399
from chapter2_基础.soundBase import * from chapter4_特征提取.end_detection import * data, fs = soundBase('C4_1_y.wav').audioread() data -= np.mean(data) data /= np.max(data) IS = 0.25 wlen = 200 inc = 80 N = len(data) time = [i / fs for i in range(N)] wnd = np.hamming(wlen) NIS = int((IS * fs - wlen) // inc + 1)...
0
0
0
86e323cb7f7044782cf0f45004b7d35357193803
2,022
py
Python
src/models/production_model_selection.py
mfalila/backorder_analytics_mlops
48d11bb49d50b49432a706f425b6ff66fee282dc
[ "MIT" ]
3
2022-01-16T13:03:29.000Z
2022-02-20T04:07:56.000Z
src/models/production_model_selection.py
mfalila/backorder_analytics_mlops
48d11bb49d50b49432a706f425b6ff66fee282dc
[ "MIT" ]
null
null
null
src/models/production_model_selection.py
mfalila/backorder_analytics_mlops
48d11bb49d50b49432a706f425b6ff66fee282dc
[ "MIT" ]
null
null
null
import os import mlflow import argparse from pprint import pprint import src.data.load_data from mlflow.tracking import MlflowClient from tensorflow.python.saved_model import signature_constants key = signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY if __name__ == '__main__': args = argparse...
34.271186
90
0.641939
import os import mlflow import argparse from pprint import pprint import src.data.load_data from mlflow.tracking import MlflowClient from tensorflow.python.saved_model import signature_constants key = signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY def log_production_model(config_path): confi...
1,496
0
25
d1f56b5afdc85d18b28ee428597d78935bfa7c4a
952
py
Python
edm_web1/django_php_bridge/backends/mybackends.py
zhouli121018/nodejsgm
0ccbc8acf61badc812f684dd39253d55c99f08eb
[ "MIT" ]
null
null
null
edm_web1/django_php_bridge/backends/mybackends.py
zhouli121018/nodejsgm
0ccbc8acf61badc812f684dd39253d55c99f08eb
[ "MIT" ]
18
2020-06-05T18:17:40.000Z
2022-03-11T23:25:21.000Z
edm_web1/django_php_bridge/backends/mybackends.py
zhouli121018/nodejsgm
0ccbc8acf61badc812f684dd39253d55c99f08eb
[ "MIT" ]
null
null
null
from django.contrib.auth.backends import ModelBackend from app.core.models import Customer
34
84
0.664916
from django.contrib.auth.backends import ModelBackend from app.core.models import Customer class CustomerUserBackend(ModelBackend): def authenticate(self, username=None, password=None, t_password=None, **kwargs): UserModel = Customer if username is None: username = kwargs.get(UserModel...
762
19
77
5b6c64494de90271c124598c79749f9c3e927a18
370
py
Python
chapter6/6.1/Personal.py
yifengyou/crazy-python
28099bd5011de6981a7c5412783952cc7601ae0c
[ "Unlicense" ]
null
null
null
chapter6/6.1/Personal.py
yifengyou/crazy-python
28099bd5011de6981a7c5412783952cc7601ae0c
[ "Unlicense" ]
null
null
null
chapter6/6.1/Personal.py
yifengyou/crazy-python
28099bd5011de6981a7c5412783952cc7601ae0c
[ "Unlicense" ]
null
null
null
# coding:utf-8 # File Name: Personal # Author : yifengyou # Date : 2021/07/18 p = Person() print(p.name, p.age) p.name = '李刚' p.say("python语言很简单") print(p.name,p.age)
18.5
49
0.578378
# coding:utf-8 # File Name: Personal # Author : yifengyou # Date : 2021/07/18 class Person: hair = 'black' def __init__(self, name='microease', age=24): self.name = name self.age = age def say(self, content): print(content) p = Person() print(p.name, p.age) p.na...
97
65
22
47e9ba085b3b42c97883bd839c3f0d513046826f
511
py
Python
profiles_api/urls.py
ravenours251/profiles-rest-api
43e15414f9c18089f03f12311c6910a853981b97
[ "MIT" ]
1
2021-03-08T14:33:31.000Z
2021-03-08T14:33:31.000Z
profiles_api/urls.py
ravenours251/profiles-rest-api
43e15414f9c18089f03f12311c6910a853981b97
[ "MIT" ]
null
null
null
profiles_api/urls.py
ravenours251/profiles-rest-api
43e15414f9c18089f03f12311c6910a853981b97
[ "MIT" ]
null
null
null
from django.urls import path,include from rest_framework.routers import DefaultRouter from . import views router = DefaultRouter() router.register('hello-viewset',views.HelloViewSet, basename='hello_viewset') router.register('profiles',views.ProfileViewSet,basename='Profiles') router.register('feed',views.UserProfileF...
34.066667
77
0.772994
from django.urls import path,include from rest_framework.routers import DefaultRouter from . import views router = DefaultRouter() router.register('hello-viewset',views.HelloViewSet, basename='hello_viewset') router.register('profiles',views.ProfileViewSet,basename='Profiles') router.register('feed',views.UserProfileF...
0
0
0
ff408a5ce216d52ec52820d3b4eed53d0a9b0f9d
52
py
Python
keras_bert/keras_layer_normalization/__init__.py
DanielWeidinger/DocNet
77be87e8f944dc38e415ce15069ebd6cb5212490
[ "MIT" ]
421
2019-05-19T04:09:15.000Z
2022-03-31T07:48:20.000Z
keras_bert/keras_layer_normalization/__init__.py
DanielWeidinger/DocNet
77be87e8f944dc38e415ce15069ebd6cb5212490
[ "MIT" ]
32
2019-06-24T15:56:31.000Z
2022-02-10T00:12:43.000Z
keras_bert/keras_layer_normalization/__init__.py
DanielWeidinger/DocNet
77be87e8f944dc38e415ce15069ebd6cb5212490
[ "MIT" ]
126
2019-05-19T10:59:55.000Z
2022-03-11T09:22:42.000Z
from .layer_normalization import LayerNormalization
26
51
0.903846
from .layer_normalization import LayerNormalization
0
0
0
afd14f0af565135798a76b8ca29c26156e131546
75
py
Python
napari_pyclesperanto_assistant/_gui/__init__.py
haesleinhuepf/napari_pyclesperanto_assistant
659b5ae8e5626771afdd5d0e6d1ba8112e48ff97
[ "BSD-3-Clause" ]
null
null
null
napari_pyclesperanto_assistant/_gui/__init__.py
haesleinhuepf/napari_pyclesperanto_assistant
659b5ae8e5626771afdd5d0e6d1ba8112e48ff97
[ "BSD-3-Clause" ]
null
null
null
napari_pyclesperanto_assistant/_gui/__init__.py
haesleinhuepf/napari_pyclesperanto_assistant
659b5ae8e5626771afdd5d0e6d1ba8112e48ff97
[ "BSD-3-Clause" ]
null
null
null
from ._Assistant import Assistant from ._napari_plugin import napari_plugin
37.5
41
0.88
from ._Assistant import Assistant from ._napari_plugin import napari_plugin
0
0
0
d9467a21a88bfd543c5f4540ebacafcfe7ae933d
2,772
py
Python
bluebottle/geo/models.py
maykinmedia/bluebottle
355d4729662b5e9a03398efb4fe882e0f8cfa28d
[ "BSD-3-Clause" ]
null
null
null
bluebottle/geo/models.py
maykinmedia/bluebottle
355d4729662b5e9a03398efb4fe882e0f8cfa28d
[ "BSD-3-Clause" ]
null
null
null
bluebottle/geo/models.py
maykinmedia/bluebottle
355d4729662b5e9a03398efb4fe882e0f8cfa28d
[ "BSD-3-Clause" ]
null
null
null
from django.db import models from django.utils.translation import ugettext_lazy as _ from .validators import Alpha2CodeValidator, Alpha3CodeValidator, NumericCodeValidator class GeoBaseModel(models.Model): """ Abstract base model for the UN M.49 geoscheme. Refs: http://unstats.un.org/unsd/methods/m49/m49....
34.65
152
0.673882
from django.db import models from django.utils.translation import ugettext_lazy as _ from .validators import Alpha2CodeValidator, Alpha3CodeValidator, NumericCodeValidator class GeoBaseModel(models.Model): """ Abstract base model for the UN M.49 geoscheme. Refs: http://unstats.un.org/unsd/methods/m49/m49....
168
370
162
19d6f4fa418e033137082f40a4f913e6f9d8b45c
133
py
Python
jarbas/dashboard/urls.py
vbarceloscs/serenata-de-amor
87e6c8932469478d177372ed7b6311cd66a71efe
[ "MIT" ]
3,001
2016-08-08T17:43:36.000Z
2018-02-09T19:13:35.000Z
jarbas/dashboard/urls.py
vbarceloscs/serenata-de-amor
87e6c8932469478d177372ed7b6311cd66a71efe
[ "MIT" ]
259
2016-08-08T09:53:23.000Z
2018-01-24T13:30:27.000Z
jarbas/dashboard/urls.py
vbarceloscs/serenata-de-amor
87e6c8932469478d177372ed7b6311cd66a71efe
[ "MIT" ]
674
2016-08-08T22:04:04.000Z
2018-02-05T15:30:15.000Z
from django.urls import path from jarbas.public_admin.sites import public_admin urlpatterns = [ path('', public_admin.urls) ]
14.777778
50
0.75188
from django.urls import path from jarbas.public_admin.sites import public_admin urlpatterns = [ path('', public_admin.urls) ]
0
0
0
c4d7471256e25ad7b3d2bd3072925af32812e662
2,861
py
Python
load_cifar10.py
ShangtongZhang/Crossprop
8e23b36015d3f79e559d78c24473de21e49df123
[ "Apache-2.0" ]
8
2017-05-26T22:04:38.000Z
2020-12-07T11:26:48.000Z
load_cifar10.py
ShangtongZhang/Crossprop
8e23b36015d3f79e559d78c24473de21e49df123
[ "Apache-2.0" ]
1
2019-04-01T21:18:21.000Z
2019-04-01T21:18:21.000Z
load_cifar10.py
ShangtongZhang/Crossprop
8e23b36015d3f79e559d78c24473de21e49df123
[ "Apache-2.0" ]
3
2018-08-18T21:12:15.000Z
2019-10-23T17:21:20.000Z
import numpy as np import cPickle import re import os n_classes=10 image_width=32 image_height=32 image_depth=3 # regular expression that matches a datafile r_data_file = re.compile('^data_batch_\d+') # training and validate datasets as numpy n-d arrays, # apropriate portions of which are ready to be fed to the plac...
38.146667
94
0.673541
import numpy as np import cPickle import re import os n_classes=10 image_width=32 image_height=32 image_depth=3 # regular expression that matches a datafile r_data_file = re.compile('^data_batch_\d+') # training and validate datasets as numpy n-d arrays, # apropriate portions of which are ready to be fed to the plac...
1,943
0
69
803989a8b549c188f5c951f5ad75eb9f384b8a1b
336
py
Python
Algorithms/EDSR/common.py
TheStarkor/SuperResolution
823aa004b15d1477f685b31bef0c3d8e181741bf
[ "MIT" ]
null
null
null
Algorithms/EDSR/common.py
TheStarkor/SuperResolution
823aa004b15d1477f685b31bef0c3d8e181741bf
[ "MIT" ]
12
2020-03-24T18:01:50.000Z
2022-02-10T01:22:39.000Z
Algorithms/EDSR/common.py
TheStarkor/SuperResolution
823aa004b15d1477f685b31bef0c3d8e181741bf
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf DIV2K_RGB_MEAN = np.array([0.4488, 0.4371, 0.4040]) * 255
25.846154
57
0.720238
import numpy as np import tensorflow as tf DIV2K_RGB_MEAN = np.array([0.4488, 0.4371, 0.4040]) * 255 def normalize(x, rgb_mean=DIV2K_RGB_MEAN): return (x - rgb_mean) / 127.5 def denormalize(x, rgb_mean=DIV2K_RGB_MEAN): return x * 127.5 + rgb_mean def pixel_shuffle(scale): return lambda x: tf.nn.depth_to...
166
0
69