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
6d19137bdd0ff814c101d2bf78521b04db326e71
1,736
py
Python
technical_testing/tun_server.py
calllivecn/VirtualLAN
a6d90bf95a8c8a9a923e78d54238921fa2e9e5aa
[ "Apache-2.0" ]
1
2020-11-09T05:37:51.000Z
2020-11-09T05:37:51.000Z
technical_testing/tun_server.py
calllivecn/VirtualLAN
a6d90bf95a8c8a9a923e78d54238921fa2e9e5aa
[ "Apache-2.0" ]
null
null
null
technical_testing/tun_server.py
calllivecn/VirtualLAN
a6d90bf95a8c8a9a923e78d54238921fa2e9e5aa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 #coding=utf-8 import fcntl,subprocess,socket,struct,multiprocessing,queue,threading sock_dict={} sock_dict_lock=threading.Lock() Buffer=2048 accept_access() for k,v in zip(sock_dict.keys(),sock_dict.values()): print(k,v) th1=threading.Thread(target=router,args=(socket.inet_aton('172.16.10.1...
25.15942
119
0.711982
#!/usr/bin/env python3 #coding=utf-8 import fcntl,subprocess,socket,struct,multiprocessing,queue,threading sock_dict={} sock_dict_lock=threading.Lock() Buffer=2048 def accept_access(): global sock_dict sock = socket.socket() sock.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1) sock.bind(('0.0.0.0',6789)) so...
1,046
0
46
d5d3272d07a57926a2ffea8ed52878ae08a674d6
39
py
Python
pyemma/datasets/__init__.py
trendelkampschroer/PyEMMA
ee5784d5c1c5bc070fe2e9e6ad4f24b36185dc20
[ "BSD-2-Clause" ]
1
2020-01-21T16:55:38.000Z
2020-01-21T16:55:38.000Z
pyemma/datasets/__init__.py
trendelkampschroer/PyEMMA
ee5784d5c1c5bc070fe2e9e6ad4f24b36185dc20
[ "BSD-2-Clause" ]
1
2022-01-10T18:09:25.000Z
2022-01-10T18:09:25.000Z
pyemma/datasets/__init__.py
clonker/PyEMMA
a36534ce2ec6a799428dfbdef0465c979e6c68aa
[ "BSD-2-Clause" ]
null
null
null
__author__ = 'noe' from .api import *
9.75
18
0.666667
__author__ = 'noe' from .api import *
0
0
0
dea7b5b4a1f57a26402e9a05dce5e51d5a8971c4
1,172
py
Python
migrations/versions/82184d7d1e88_altered-OAuth2Token-token_type-to-Enum.py
IsmaelJS/test-github-actions
97223df261e9736c46875f590c9593dbac0d417b
[ "MIT" ]
1,420
2015-11-20T01:25:14.000Z
2022-03-22T03:51:33.000Z
migrations/versions/82184d7d1e88_altered-OAuth2Token-token_type-to-Enum.py
IsmaelJS/test-github-actions
97223df261e9736c46875f590c9593dbac0d417b
[ "MIT" ]
151
2016-01-07T09:11:42.000Z
2020-11-17T08:37:07.000Z
migrations/versions/82184d7d1e88_altered-OAuth2Token-token_type-to-Enum.py
IsmaelJS/test-github-actions
97223df261e9736c46875f590c9593dbac0d417b
[ "MIT" ]
389
2015-11-23T01:14:31.000Z
2022-02-07T08:23:11.000Z
"""Alter OAuth2Token.token_type to Enum Revision ID: 82184d7d1e88 Revises: 5e2954a2af18 Create Date: 2016-11-10 21:14:33.787194 """ # revision identifiers, used by Alembic. revision = '82184d7d1e88' down_revision = '5e2954a2af18' from alembic import op import sqlalchemy as sa
27.255814
77
0.674915
"""Alter OAuth2Token.token_type to Enum Revision ID: 82184d7d1e88 Revises: 5e2954a2af18 Create Date: 2016-11-10 21:14:33.787194 """ # revision identifiers, used by Alembic. revision = '82184d7d1e88' down_revision = '5e2954a2af18' from alembic import op import sqlalchemy as sa def upgrade(): connection = op.ge...
843
0
46
9a293daabc9144ea9f43e8e0d87e3ba663015e9f
1,232
py
Python
src/main/sarscovhierarchy.py
JasterV/SARSCOV-HIERARCHY
46d94443c69a6f874329e18bf2718dc0ee629a89
[ "Unlicense" ]
4
2020-05-26T08:38:58.000Z
2020-11-01T02:13:14.000Z
src/main/sarscovhierarchy.py
manudiv16/SARSCOV-HIERARCHY
b10657f78c7d54a91d58431339e58f8324783ed1
[ "Unlicense" ]
null
null
null
src/main/sarscovhierarchy.py
manudiv16/SARSCOV-HIERARCHY
b10657f78c7d54a91d58431339e58f8324783ed1
[ "Unlicense" ]
1
2020-05-25T21:00:32.000Z
2020-05-25T21:00:32.000Z
import os import signal from os.path import join from sys import argv from utils.csv_table import CsvTable from utils.fasta_map import FastaMap from utils.hierarchy_tree import HierarchyTree signal.signal(signal.SIGTSTP, signal.SIG_IGN) if __name__ == '__main__': if len(argv) == 2: pid_h = os.fork() ...
28.651163
72
0.659903
import os import signal from os.path import join from sys import argv from utils.csv_table import CsvTable from utils.fasta_map import FastaMap from utils.hierarchy_tree import HierarchyTree signal.signal(signal.SIGTSTP, signal.SIG_IGN) def main(): data_dir = argv[1] csv_path = join(data_dir, "sequences.cs...
604
0
23
4c946c759e71316a2f48c5939a22685bf4629ac0
750
py
Python
cohort_back/views.py
aphp/Cohort360-Back-end
03184db6c4cb639955e2f3726c7e1b5cc7809f01
[ "Apache-2.0" ]
9
2020-11-04T13:08:47.000Z
2022-02-03T17:04:05.000Z
cohort_back/views.py
aphp/Cohort360-Back-end
03184db6c4cb639955e2f3726c7e1b5cc7809f01
[ "Apache-2.0" ]
7
2021-03-17T17:48:26.000Z
2022-02-10T13:27:43.000Z
cohort_back/views.py
aphp/Cohort360-Back-end
03184db6c4cb639955e2f3726c7e1b5cc7809f01
[ "Apache-2.0" ]
2
2020-11-23T10:42:40.000Z
2022-02-03T17:04:09.000Z
from rest_framework import status from rest_framework.response import Response
35.714286
92
0.690667
from rest_framework import status from rest_framework.response import Response class NoDeleteViewSetMixin: def destroy(self, request, *args, **kwargs): return Response({"response": "request_query_snapshot manual deletion not possible"}, status=status.HTTP_400_BAD_REQUEST) class N...
530
12
125
7f8324a4e70c461d823a06bf024e94c7e1abe7ba
1,829
py
Python
tests/test_stack.py
stoyan3d/python-algorithms
1d18647c821d4dac04b7d7c98443a3218f6348a6
[ "MIT" ]
null
null
null
tests/test_stack.py
stoyan3d/python-algorithms
1d18647c821d4dac04b7d7c98443a3218f6348a6
[ "MIT" ]
null
null
null
tests/test_stack.py
stoyan3d/python-algorithms
1d18647c821d4dac04b7d7c98443a3218f6348a6
[ "MIT" ]
null
null
null
from datastructures.stack import Stack import unittest if __name__ == '__main__': unittest.main()
24.386667
58
0.592674
from datastructures.stack import Stack import unittest class TestStack(unittest.TestCase): def test_is_empty_on_stack_with_items(self): stack = Stack() stack.push(2) self.assertFalse(stack.is_empty) def test_is_empty_on_empty_stack(self): stack = Stack() self.assertTr...
1,446
14
265
80e594274b796137765cdaa1ff34b7b4195fd631
347
py
Python
Prosjekt 4 - Raspberry pi/waveshare/fiks_image.py
stellanova88/DigiFab
1a5e7abbc8a9535c67e3d826408508b7e53584c0
[ "MIT" ]
null
null
null
Prosjekt 4 - Raspberry pi/waveshare/fiks_image.py
stellanova88/DigiFab
1a5e7abbc8a9535c67e3d826408508b7e53584c0
[ "MIT" ]
null
null
null
Prosjekt 4 - Raspberry pi/waveshare/fiks_image.py
stellanova88/DigiFab
1a5e7abbc8a9535c67e3d826408508b7e53584c0
[ "MIT" ]
null
null
null
from PIL import Image import requests url = "https://www.yr.no/place/Norway/Viken/Halden/Halden//meteogram.png" response = requests.get(url, stream = True) img = Image.open(response.raw) #TODO! Test image size 800, x img.thumbnail((800, 262)) #Resizing #TODO! Convert better img = img.convert("L") #img.show() img...
15.086957
73
0.708934
from PIL import Image import requests url = "https://www.yr.no/place/Norway/Viken/Halden/Halden//meteogram.png" response = requests.get(url, stream = True) img = Image.open(response.raw) #TODO! Test image size 800, x img.thumbnail((800, 262)) #Resizing #TODO! Convert better img = img.convert("L") #img.show() img...
0
0
0
67e9775c49230406c399f8ec6bbaf10b3a57dddc
202,905
py
Python
sources/duployan.py
dscorbett/duployan-font
966e4e233f56d818bbbcb4548f1cf232cd3fe4a1
[ "Apache-2.0" ]
6
2020-04-06T02:14:07.000Z
2022-03-22T09:13:47.000Z
sources/duployan.py
dscorbett/duployan-font
966e4e233f56d818bbbcb4548f1cf232cd3fe4a1
[ "Apache-2.0" ]
2
2021-07-19T10:20:41.000Z
2021-12-16T01:25:02.000Z
sources/duployan.py
dscorbett/duployan-font
966e4e233f56d818bbbcb4548f1cf232cd3fe4a1
[ "Apache-2.0" ]
1
2019-08-04T03:40:57.000Z
2019-08-04T03:40:57.000Z
# Copyright 2018-2019 David Corbett # Copyright 2019-2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
52.013586
1,416
0.580779
# Copyright 2018-2019 David Corbett # Copyright 2019-2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
195,461
3,133
846
38613dd189f81dfb63a70406958935bebfb29887
589
py
Python
src/accounts/migrations/0003_auto_20170805_1012.py
balaji319/Q-A-app-
a33eab4605942a8429ea85da72061abde2defb1e
[ "MIT" ]
null
null
null
src/accounts/migrations/0003_auto_20170805_1012.py
balaji319/Q-A-app-
a33eab4605942a8429ea85da72061abde2defb1e
[ "MIT" ]
null
null
null
src/accounts/migrations/0003_auto_20170805_1012.py
balaji319/Q-A-app-
a33eab4605942a8429ea85da72061abde2defb1e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-08-05 04:42 from __future__ import unicode_literals from django.db import migrations, models
28.047619
188
0.65365
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-08-05 04:42 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0002_auto_20170803_1446'), ] operations = [ migrations.AlterFie...
0
410
23
b32f8a420fee596e85b202652bbaa404a3ddf2ee
7,180
py
Python
easyTCP/SERVER/backend/server.py
dsal3389/easyTCP
0a11ffe4726bfd0461c24fa459e417fd2fe3cd7f
[ "MIT" ]
4
2018-12-09T13:57:59.000Z
2019-10-19T19:34:28.000Z
easyTCP/SERVER/backend/server.py
dsal3389/easyTCP
0a11ffe4726bfd0461c24fa459e417fd2fe3cd7f
[ "MIT" ]
null
null
null
easyTCP/SERVER/backend/server.py
dsal3389/easyTCP
0a11ffe4726bfd0461c24fa459e417fd2fe3cd7f
[ "MIT" ]
null
null
null
import asyncio from .Client import CLIENT
35.196078
130
0.591226
import asyncio from .Client import CLIENT class SERVER: client = CLIENT client_functions = [] # make this easier to see stuff superuser_functions = [] def __init__(self, IP:str, PORT:int, encryption, *, settings, superuser_password, loop=None): self.ip ...
827
6,281
24
6fac5fc482e7f243e59972947175d00959c2e012
3,201
py
Python
ZZZ/DES/process/match_worker.py
ivmfnal/striped
eef1a4d544fa1b97fde39d7ee5ef779071218891
[ "BSD-3-Clause" ]
1
2019-07-01T15:19:43.000Z
2019-07-01T15:19:43.000Z
ZZZ/DES/process/match_worker.py
ivmfnal/striped
eef1a4d544fa1b97fde39d7ee5ef779071218891
[ "BSD-3-Clause" ]
null
null
null
ZZZ/DES/process/match_worker.py
ivmfnal/striped
eef1a4d544fa1b97fde39d7ee5ef779071218891
[ "BSD-3-Clause" ]
1
2020-04-21T21:18:01.000Z
2020-04-21T21:18:01.000Z
import numpy as np, math
40.518987
167
0.515464
import numpy as np, math class Worker(object): Columns = ["ALPHAWIN_J2000", "DELTAWIN_J2000", "HPIX", "OBJECT_ID"] Delta = 1.0/3600.0 # 1 arcsecond def dist(self, ra1, dec1, ra2, dec2): return max(abs(ra1-ra2), abs(dec1-dec2)) def close(self, ra1, dec1, ra2, dec2): return ...
2,951
202
23
14f858b4edd77eb78d71efa839cce2b57e5872e6
10,615
py
Python
xcrypto/xcrypto.py
azweb76/x-crypto
a90c0e7149d7365e82c2133f68a4fc683855ee5c
[ "MIT" ]
1
2019-03-19T18:19:33.000Z
2019-03-19T18:19:33.000Z
xcrypto/xcrypto.py
azweb76/x-crypto
a90c0e7149d7365e82c2133f68a4fc683855ee5c
[ "MIT" ]
1
2020-12-16T22:11:55.000Z
2020-12-16T22:11:55.000Z
xcrypto/xcrypto.py
azweb76/x-crypto
a90c0e7149d7365e82c2133f68a4fc683855ee5c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 import argparse import base64 import glob import os import platform import re import sys import tempfile import json import time import logging from pymongo import MongoClient import requests log = logging.getLogger(name=__name__) if platform.system() != 'Windows': from Cr...
29.242424
88
0.599906
#!/usr/bin/env python # coding: utf-8 import argparse import base64 import glob import os import platform import re import sys import tempfile import json import time import logging from pymongo import MongoClient import requests log = logging.getLogger(name=__name__) if platform.system() != 'Windows': from Cr...
8,207
0
441
8e13600e086bc5b40baaa6af76bea54dbb26f1c7
254
py
Python
osp/test/corpus/syllabus/test_log_path.py
davidmcclure/open-syllabus-project
078cfd4c5a257fbfb0901d43bfbc6350824eed4e
[ "Apache-2.0" ]
220
2016-01-22T21:19:02.000Z
2022-01-25T04:33:55.000Z
osp/test/corpus/syllabus/test_log_path.py
davidmcclure/open-syllabus-project
078cfd4c5a257fbfb0901d43bfbc6350824eed4e
[ "Apache-2.0" ]
14
2016-01-23T14:34:39.000Z
2016-09-19T19:58:37.000Z
osp/test/corpus/syllabus/test_log_path.py
davidmcclure/open-syllabus-project
078cfd4c5a257fbfb0901d43bfbc6350824eed4e
[ "Apache-2.0" ]
14
2016-02-03T13:47:48.000Z
2019-03-27T13:09:05.000Z
from osp.corpus.syllabus import Syllabus def test_log_path(mock_osp): """ Syllabus#log_path should return the .log file path. """ path = mock_osp.add_file() syllabus = Syllabus(path) assert syllabus.log_path == path+'.log'
15.875
55
0.669291
from osp.corpus.syllabus import Syllabus def test_log_path(mock_osp): """ Syllabus#log_path should return the .log file path. """ path = mock_osp.add_file() syllabus = Syllabus(path) assert syllabus.log_path == path+'.log'
0
0
0
80bb7fed3aabf0b674314f1bde732f8e77644ddb
10,915
py
Python
relancer-exp/original_notebooks/toramky_automobile-dataset/auto-imports-beginner-level-analysis.py
Chenguang-Zhu/relancer
bf1a175b77b7da4cff12fbc5de17dd55246d264d
[ "Apache-2.0" ]
1
2022-03-05T22:27:49.000Z
2022-03-05T22:27:49.000Z
relancer-exp/original_notebooks/toramky_automobile-dataset/auto-imports-beginner-level-analysis.py
Chenguang-Zhu/relancer
bf1a175b77b7da4cff12fbc5de17dd55246d264d
[ "Apache-2.0" ]
null
null
null
relancer-exp/original_notebooks/toramky_automobile-dataset/auto-imports-beginner-level-analysis.py
Chenguang-Zhu/relancer
bf1a175b77b7da4cff12fbc5de17dd55246d264d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # Title : 1985 Auto Imports Database Analyses # <img src='Large10.jpg'> # ## <font color='green'>Data Dictionary</font> # ### Input variables # # 01. **symboling**: [its assigned insurance risk rating -> [-3, -2, -1, 0, 1, 2, 3]] # 02. **normalized-losses**: ...
20.950096
271
0.647091
#!/usr/bin/env python # coding: utf-8 # # Title : 1985 Auto Imports Database Analyses # <img src='Large10.jpg'> # ## <font color='green'>Data Dictionary</font> # ### Input variables # # 01. **symboling**: [its assigned insurance risk rating -> [-3, -2, -1, 0, 1, 2, 3]] # 02. **normalized-losses**: ...
0
0
0
82e078877509947328d3525d632d333624a78bb6
7,315
py
Python
main.py
DangVietH/DHB
4118a07d701701a72cc7dd88698b1a2138fb6b25
[ "MIT" ]
3
2021-12-01T07:09:33.000Z
2022-01-22T16:48:14.000Z
main.py
DangVietH/DHB
4118a07d701701a72cc7dd88698b1a2138fb6b25
[ "MIT" ]
null
null
null
main.py
DangVietH/DHB
4118a07d701701a72cc7dd88698b1a2138fb6b25
[ "MIT" ]
null
null
null
import discord from discord.ext import commands from motor.motor_asyncio import AsyncIOMotorClient import json with open('config.json') as f: config_var = json.load(f) cluster = AsyncIOMotorClient(config_var['mango_link']) cursor = cluster["custom_prefix"]["prefix"] bcursor = cluster['bot']['blacklist'] in...
40.414365
206
0.648804
import discord from discord.ext import commands from motor.motor_asyncio import AsyncIOMotorClient import json with open('config.json') as f: config_var = json.load(f) class CustomHelp(commands.HelpCommand): def get_ending_note(self): return f'Use help [command] for more info on a command. \nYou can...
5,881
18
317
a4d192fc80da3a2cae7bcd04675f7528921ccd70
3,143
py
Python
courses/demo/code/imjaysigpayatinlay.py
jimmahoney/umber
0507a30a81415441408c26951c76c740a6945d86
[ "MIT" ]
6
2018-04-18T14:05:39.000Z
2022-01-29T04:23:46.000Z
courses/demo/code/imjaysigpayatinlay.py
jimmahoney/umber
0507a30a81415441408c26951c76c740a6945d86
[ "MIT" ]
null
null
null
courses/demo/code/imjaysigpayatinlay.py
jimmahoney/umber
0507a30a81415441408c26951c76c740a6945d86
[ "MIT" ]
2
2019-05-25T16:09:49.000Z
2022-01-12T09:26:12.000Z
""" imjayigpayatinlay.py Jim's pig latin See ./readme.md. Here are tests based on the design constraints, in roughly order of increasing difficulty. --- tests -------------------------------------- >>> text_to_piglatin("apple") # word starts with vowel 'appleway' >>> text_to_piglatin("cat") ...
28.315315
79
0.624881
""" imjayigpayatinlay.py Jim's pig latin See ./readme.md. Here are tests based on the design constraints, in roughly order of increasing difficulty. --- tests -------------------------------------- >>> text_to_piglatin("apple") # word starts with vowel 'appleway' >>> text_to_piglatin("cat") ...
0
0
0
6346937aad6c4e772409a7163d0cba3165257ae3
2,934
py
Python
models/squeezenet.py
csruiliu/pytorch_cifar
6d3c80092255571c2d5f497ed036148a4202c08e
[ "MIT" ]
null
null
null
models/squeezenet.py
csruiliu/pytorch_cifar
6d3c80092255571c2d5f497ed036148a4202c08e
[ "MIT" ]
null
null
null
models/squeezenet.py
csruiliu/pytorch_cifar
6d3c80092255571c2d5f497ed036148a4202c08e
[ "MIT" ]
null
null
null
import torch import torch.nn as nn
38.103896
90
0.640423
import torch import torch.nn as nn class FireBLK(nn.Module): def __init__(self, in_chn, s1x1_chn, e1x1_chn, e3x3_chn): super(FireBLK, self).__init__() self.conv1 = nn.Conv2d(in_chn, s1x1_chn, kernel_size=1, stride=1) self.relu1 = nn.ReLU(inplace=True) self.bn1 = nn.BatchNorm2d(s1x1...
2,734
11
152
5a088c628b2c99e37d458fe0e1cf22c51c5360d6
863
py
Python
Fduers/alumni/migrations/0002_auto_20210721_2315.py
bblss123/ALUMNI
294ecf066137070f4b28923e8cd03f74eeddb345
[ "MIT" ]
1
2021-07-11T00:39:46.000Z
2021-07-11T00:39:46.000Z
Fduers/alumni/migrations/0002_auto_20210721_2315.py
bblss123/ALUMNI
294ecf066137070f4b28923e8cd03f74eeddb345
[ "MIT" ]
null
null
null
Fduers/alumni/migrations/0002_auto_20210721_2315.py
bblss123/ALUMNI
294ecf066137070f4b28923e8cd03f74eeddb345
[ "MIT" ]
3
2021-07-10T11:55:45.000Z
2021-07-21T13:25:12.000Z
# Generated by Django 3.2.5 on 2021-07-21 15:15 from django.db import migrations, models
28.766667
117
0.565469
# Generated by Django 3.2.5 on 2021-07-21 15:15 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('alumni', '0001_auto_20210721_1622'), ] operations = [ migrations.CreateModel( name='StudentSheet', fields=[ ...
0
769
23
4614fe0cf402069b594647bc85117a84e7c17ab6
8,781
py
Python
xo.py
adelnobel/JS-games
8555038af889dc68f6e8d9528677f52b23e04954
[ "MIT" ]
null
null
null
xo.py
adelnobel/JS-games
8555038af889dc68f6e8d9528677f52b23e04954
[ "MIT" ]
null
null
null
xo.py
adelnobel/JS-games
8555038af889dc68f6e8d9528677f52b23e04954
[ "MIT" ]
null
null
null
import random import copy import json import time import sys players = [QLearnerModelAgent(), RandomAgent()] game = XOGame() '''print players[1].observe([[['X', 'O', 'X'],['O', 'O', '.'],['.', 'X', '.']], 'O'], 0, game) sys.exit(0)''' totalx = 0 totalo = 0 total_games = 10000 for x in range(2): for i in ran...
34.300781
193
0.603918
import random import copy import json import time import sys class AbstractGame: def getNextStateFromStateAndAction(self, state, action): return NotImplemented def getInitialState(self, state, action): return NotImplemented def isTerminalState(self, state): return NotImplemented ...
6,402
17
934
9ec709631ecb032aa4f2882cfbd62aba2b9ec496
1,032
py
Python
08_Graphs/clone_graph.py
Sheetal0601/InterviewBit
72ba1507278dafac6e5fb81da20d372e3d141348
[ "MIT" ]
61
2018-02-18T08:16:31.000Z
2022-02-17T17:18:57.000Z
08_Graphs/clone_graph.py
Sheetal0601/InterviewBit
72ba1507278dafac6e5fb81da20d372e3d141348
[ "MIT" ]
1
2018-02-23T20:06:18.000Z
2019-12-29T18:52:20.000Z
08_Graphs/clone_graph.py
Sheetal0601/InterviewBit
72ba1507278dafac6e5fb81da20d372e3d141348
[ "MIT" ]
30
2018-03-28T19:02:23.000Z
2021-07-06T20:00:14.000Z
# Clone Graph # https://www.interviewbit.com/problems/clone-graph/ # # Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Definition for a undirected graph node # class U...
27.891892
99
0.560078
# Clone Graph # https://www.interviewbit.com/problems/clone-graph/ # # Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Definition for a undirected graph node # class U...
457
-6
77
1e2d3f92f07964c30f7467323c5e6dbff303b6a5
14,413
py
Python
channels/casacinema.py
sodicarus/channels
d77402f4f460ea6daa66959aa5384aaffbff70b5
[ "MIT" ]
null
null
null
channels/casacinema.py
sodicarus/channels
d77402f4f460ea6daa66959aa5384aaffbff70b5
[ "MIT" ]
null
null
null
channels/casacinema.py
sodicarus/channels
d77402f4f460ea6daa66959aa5384aaffbff70b5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # streamondemand-.- XBMC Plugin # Canale casacinema # ------------------------------------------------------------ import re import urlparse from core import httptools from core import config from core import logger from core impo...
38.744624
177
0.499202
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # streamondemand-.- XBMC Plugin # Canale casacinema # ------------------------------------------------------------ import re import urlparse from core import httptools from core import config from core import logger from core impo...
12,072
0
234
dac5059e88a06cdb5eeb8ff58c8d261a98379b43
330
py
Python
src/konfetti/_compat.py
samarcan/konfetti
77bd06ae0971e854a0241b5b097d004d3c81e3de
[ "MIT" ]
23
2019-07-01T09:31:46.000Z
2021-07-19T11:38:47.000Z
src/konfetti/_compat.py
samarcan/konfetti
77bd06ae0971e854a0241b5b097d004d3c81e3de
[ "MIT" ]
33
2019-06-30T17:08:16.000Z
2022-02-10T12:23:57.000Z
src/konfetti/_compat.py
kiwicom/kwonfig
f80d175301e0a2ad3178e6ded60a6a3d8525d9d9
[ "MIT" ]
2
2019-07-23T13:02:19.000Z
2020-01-09T16:20:30.000Z
try: # Python 2 old-style classes from types import ClassType as class_type # type: ignore class_types = (class_type, type) string_types = (unicode, str) # type: ignore # pylint: disable=undefined-variable except ImportError: class_types = (type,) # type: ignore string_types = (str,) # typ...
33
87
0.681818
try: # Python 2 old-style classes from types import ClassType as class_type # type: ignore class_types = (class_type, type) string_types = (unicode, str) # type: ignore # pylint: disable=undefined-variable except ImportError: class_types = (type,) # type: ignore string_types = (str,) # typ...
0
0
0
46a717df7e8b20444e1582efee3fa56389463899
3,000
py
Python
src/h5_eq.py
whoDisGuy/testGit
cff4d7fcfa1940d8517ed696e8a1f62c40bf55ef
[ "Apache-2.0" ]
7
2019-05-17T18:30:32.000Z
2021-07-27T05:58:15.000Z
src/h5_eq.py
whoDisGuy/testGit
cff4d7fcfa1940d8517ed696e8a1f62c40bf55ef
[ "Apache-2.0" ]
2
2021-03-12T16:12:00.000Z
2021-03-12T19:11:58.000Z
src/h5_eq.py
whoDisGuy/testGit
cff4d7fcfa1940d8517ed696e8a1f62c40bf55ef
[ "Apache-2.0" ]
4
2019-11-25T04:13:46.000Z
2021-11-03T21:12:26.000Z
""" This is an equality comparator for hdf5 files. """ import h5py import itertools import numpy import sys def files_match(filename1, filename2): "Checks that two files have the same HDF5 structure." f1 = h5py.File(filename1, mode='r') f2 = h5py.File(filename2, mode='r') for k in iter(f1): # s...
33.333333
73
0.556
""" This is an equality comparator for hdf5 files. """ import h5py import itertools import numpy import sys def files_match(filename1, filename2): "Checks that two files have the same HDF5 structure." f1 = h5py.File(filename1, mode='r') f2 = h5py.File(filename2, mode='r') for k in iter(f1): # s...
572
0
69
351069ad2a17934bd167e0d90d05d7585b01ace1
370
py
Python
pandas.py
GalacticalEdge/Python-test
e48209926ab78798c3ad9bc9bb925f4dc37e3ce6
[ "MIT" ]
null
null
null
pandas.py
GalacticalEdge/Python-test
e48209926ab78798c3ad9bc9bb925f4dc37e3ce6
[ "MIT" ]
null
null
null
pandas.py
GalacticalEdge/Python-test
e48209926ab78798c3ad9bc9bb925f4dc37e3ce6
[ "MIT" ]
null
null
null
print("This is pandas basics") brics = pd.DataFrame(dict) print(brics)
24.666667
68
0.594595
def pandas(): import pandas as pd print("This is pandas basics") def my_function(pandas): dict = {"country": ["Brazil", "India", "China", "South Africa"], "capital": ["Brasilia", "New Dehli", "Beijing", "Pretoria"], "area": [8.516, 3.286, 9.597, 1.221], "population": [200.4, 1252, 1357, ...
252
0
45
766bc97d855b42b93c8fc43e1f876253f0d21824
1,260
py
Python
members/conferences/management/commands/conference_emails.py
ocwc/ocwc-members
3ede8e0ff830e2aaff4ae09f9aaefd3eaa83146b
[ "MIT" ]
null
null
null
members/conferences/management/commands/conference_emails.py
ocwc/ocwc-members
3ede8e0ff830e2aaff4ae09f9aaefd3eaa83146b
[ "MIT" ]
7
2015-11-27T15:59:52.000Z
2022-01-13T00:38:38.000Z
members/conferences/management/commands/conference_emails.py
ocwc/ocwc-members
3ede8e0ff830e2aaff4ae09f9aaefd3eaa83146b
[ "MIT" ]
null
null
null
import os from django.conf import settings from django.core.management.base import BaseCommand import gspread from conferences.models import ( ConferenceEmailTemplate, ConferenceEmailRegistration, ConferenceEmailLogs, )
28
84
0.650794
import os from django.conf import settings from django.core.management.base import BaseCommand import gspread from conferences.models import ( ConferenceEmailTemplate, ConferenceEmailRegistration, ConferenceEmailLogs, ) class Command(BaseCommand): help = "Syncs google spreadsheet with db" def...
921
79
23
218c4ad1f0199158a731dbd92606423cca0783ce
266
py
Python
apps/sizes/urls.py
JuanJoseStone/shoe-app
b9eb10e59877d6eb0582b65cf1b91cdd47bdcdb0
[ "MIT" ]
null
null
null
apps/sizes/urls.py
JuanJoseStone/shoe-app
b9eb10e59877d6eb0582b65cf1b91cdd47bdcdb0
[ "MIT" ]
null
null
null
apps/sizes/urls.py
JuanJoseStone/shoe-app
b9eb10e59877d6eb0582b65cf1b91cdd47bdcdb0
[ "MIT" ]
null
null
null
from django.urls import path from .views import index, store, update urlpatterns = [ path('tallas/', index, name='sizes.index'), path('crear-nueva-talla/', store, name='sizes.store'), path('actualizar-talla/<id>/', update, name='sizes.update'), ]
33.25
65
0.657895
from django.urls import path from .views import index, store, update urlpatterns = [ path('tallas/', index, name='sizes.index'), path('crear-nueva-talla/', store, name='sizes.store'), path('actualizar-talla/<id>/', update, name='sizes.update'), ]
0
0
0
860829354f9a0ed2e4c4d242cf31435bb059d1f5
180
py
Python
solutions/05_5_solutions.py
glemaitre/pyparis-2018-sklearn
2ef0158aa13babb2d7317cea0e8930bd7ad145b2
[ "CC0-1.0" ]
71
2018-11-13T13:29:24.000Z
2021-07-03T15:47:37.000Z
solutions/05_5_solutions.py
JL1829/pyparis-2018-sklearn
2ef0158aa13babb2d7317cea0e8930bd7ad145b2
[ "CC0-1.0" ]
1
2018-11-14T22:22:17.000Z
2018-11-14T22:22:17.000Z
solutions/05_5_solutions.py
JL1829/pyparis-2018-sklearn
2ef0158aa13babb2d7317cea0e8930bd7ad145b2
[ "CC0-1.0" ]
20
2018-11-08T15:43:19.000Z
2022-01-14T08:32:29.000Z
from sklearn.preprocessing import OneHotEncoder from sklearn.preprocessing import KBinsDiscretizer pipe_cat = OneHotEncoder(handle_unknown='ignore') pipe_num = KBinsDiscretizer()
30
50
0.855556
from sklearn.preprocessing import OneHotEncoder from sklearn.preprocessing import KBinsDiscretizer pipe_cat = OneHotEncoder(handle_unknown='ignore') pipe_num = KBinsDiscretizer()
0
0
0
f74aa16bcbbe64cf11dada7ce248b0c66a7d6273
7,409
py
Python
Tests.py
agamia/RegExpBuilder
087231288d8a6d81b7152d3adbe8ab466710d347
[ "MIT" ]
1
2015-07-26T10:45:14.000Z
2015-07-26T10:45:14.000Z
Tests.py
agamia/RegExpBuilder
087231288d8a6d81b7152d3adbe8ab466710d347
[ "MIT" ]
null
null
null
Tests.py
agamia/RegExpBuilder
087231288d8a6d81b7152d3adbe8ab466710d347
[ "MIT" ]
null
null
null
import unittest from RegExpBuilder import RegExpBuilder if __name__ == '__main__': unittest.main()
34.621495
75
0.570792
import unittest from RegExpBuilder import RegExpBuilder class Test(unittest.TestCase): def test_startOfLine(self): regex = RegExpBuilder() regex.startOfLine() regex.exactly(1).of("p") regex = regex.getRegExp() self.assertTrue(regex.match("p") is not None) ...
6,686
9
605
7c314aaf179065acba8767f7396f7f66b271bd40
10,363
py
Python
mayan/apps/documents/tests/mixins.py
O2Graphics/Mayan-EDMS
e11e6f47240f3c536764be66828dbe6428dceb41
[ "Apache-2.0" ]
null
null
null
mayan/apps/documents/tests/mixins.py
O2Graphics/Mayan-EDMS
e11e6f47240f3c536764be66828dbe6428dceb41
[ "Apache-2.0" ]
5
2021-03-19T22:56:45.000Z
2022-03-12T00:08:43.000Z
mayan/apps/documents/tests/mixins.py
halsten/mayan-edms
10372daede6e6dea0bea67eb98767e3be6fbf86f
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import os from django.conf import settings from mayan.apps.converter.classes import Layer from mayan.apps.converter.layers import layer_saved_transformations from ..literals import PAGE_RANGE_ALL from ..models import DocumentType from .literals import ( TEST_DOCUMENT_TYP...
32.690852
84
0.652031
from __future__ import unicode_literals import os from django.conf import settings from mayan.apps.converter.classes import Layer from mayan.apps.converter.layers import layer_saved_transformations from ..literals import PAGE_RANGE_ALL from ..models import DocumentType from .literals import ( TEST_DOCUMENT_TYP...
8,086
453
1,122
d4eeaae82d0677299d93393b7dbfd5ec50fa75bd
9,698
py
Python
stackalytics/processor/user_processor.py
wzshiming/stackalytics
f71fd28cbb081a2edd19a84f4a7d16645b0557b3
[ "Apache-2.0" ]
null
null
null
stackalytics/processor/user_processor.py
wzshiming/stackalytics
f71fd28cbb081a2edd19a84f4a7d16645b0557b3
[ "Apache-2.0" ]
null
null
null
stackalytics/processor/user_processor.py
wzshiming/stackalytics
f71fd28cbb081a2edd19a84f4a7d16645b0557b3
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the ...
32.543624
79
0.627243
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the ...
4,587
0
207
3ca34ff899dad05788f490bef9414eb9aee460c7
149
py
Python
excel_project/excel_api/apps.py
Korred/drf_excel_processing
143654667cb0dc0fdd8867e25f1f041f8c542776
[ "Unlicense" ]
null
null
null
excel_project/excel_api/apps.py
Korred/drf_excel_processing
143654667cb0dc0fdd8867e25f1f041f8c542776
[ "Unlicense" ]
null
null
null
excel_project/excel_api/apps.py
Korred/drf_excel_processing
143654667cb0dc0fdd8867e25f1f041f8c542776
[ "Unlicense" ]
null
null
null
from django.apps import AppConfig
21.285714
56
0.765101
from django.apps import AppConfig class ExcelApiConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'excel_api'
0
91
23
4647d83a3fc2d253b88c2a3de48912dfba68a706
2,675
py
Python
mapel/elections/not_in_the_package/__all_elections.py
kaszperro/mapel
d4e6486ee97f5d5a5a737c581ba3f9f874ebcef3
[ "MIT" ]
null
null
null
mapel/elections/not_in_the_package/__all_elections.py
kaszperro/mapel
d4e6486ee97f5d5a5a737c581ba3f9f874ebcef3
[ "MIT" ]
null
null
null
mapel/elections/not_in_the_package/__all_elections.py
kaszperro/mapel
d4e6486ee97f5d5a5a737c581ba3f9f874ebcef3
[ "MIT" ]
null
null
null
import math import random as rand from itertools import product import numpy as np from mapel.voting.models_main import store_ordinal_election from mapel.voting.metrics.main_ordinal_distances import compute_swap_bf_distance from mapel.voting.objects.OrdinalElection import OrdinalElection try: from sympy.utilitie...
29.076087
109
0.598505
import math import random as rand from itertools import product import numpy as np from mapel.voting.models_main import store_ordinal_election from mapel.voting.metrics.main_ordinal_distances import compute_swap_bf_distance from mapel.voting.objects.OrdinalElection import OrdinalElection try: from sympy.utilitie...
0
0
0
38df7c5cd95cbbb56c3536b5e923d8adc7367e40
244
py
Python
budgets/urls.py
saks/hb
6f103efc90adcb00c8ec1bed9868c20f85273b37
[ "MIT" ]
3
2016-06-23T09:32:38.000Z
2016-07-28T03:33:55.000Z
budgets/urls.py
saks/hb
6f103efc90adcb00c8ec1bed9868c20f85273b37
[ "MIT" ]
76
2016-07-24T09:59:11.000Z
2022-02-10T08:53:09.000Z
budgets/urls.py
saks/hb
6f103efc90adcb00c8ec1bed9868c20f85273b37
[ "MIT" ]
2
2016-06-14T12:54:33.000Z
2016-07-27T10:43:32.000Z
from django.conf.urls import url, include from rest_framework import routers from . import views router = routers.DefaultRouter() router.register(r'budget-detail', views.BudgetViewSet) urlpatterns = [ url(r'^', include(router.urls)), ]
18.769231
54
0.75
from django.conf.urls import url, include from rest_framework import routers from . import views router = routers.DefaultRouter() router.register(r'budget-detail', views.BudgetViewSet) urlpatterns = [ url(r'^', include(router.urls)), ]
0
0
0
7d8d6c75da789901a3f4519300039cd24febd94d
2,939
py
Python
cngi/vis/chansmooth.py
FedeMPouzols/cngi_prototype
421a99c460f4092b79120f5bec122de7ce9b8b96
[ "Apache-2.0" ]
null
null
null
cngi/vis/chansmooth.py
FedeMPouzols/cngi_prototype
421a99c460f4092b79120f5bec122de7ce9b8b96
[ "Apache-2.0" ]
null
null
null
cngi/vis/chansmooth.py
FedeMPouzols/cngi_prototype
421a99c460f4092b79120f5bec122de7ce9b8b96
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 AUI, Inc. Washington DC, USA # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
39.716216
141
0.672678
# Copyright 2020 AUI, Inc. Washington DC, USA # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
0
0
0
2b471b0cbd7f5fcad09c10e922fd96c5315dbf27
2,083
py
Python
setup.py
gburca/ccs-py
c69b6c7f8a899f6747b8632541ef1a4159a2baab
[ "MIT" ]
1
2019-09-26T17:15:47.000Z
2019-09-26T17:15:47.000Z
setup.py
gburca/ccs-py
c69b6c7f8a899f6747b8632541ef1a4159a2baab
[ "MIT" ]
null
null
null
setup.py
gburca/ccs-py
c69b6c7f8a899f6747b8632541ef1a4159a2baab
[ "MIT" ]
1
2021-11-29T18:34:17.000Z
2021-11-29T18:34:17.000Z
import os from setuptools import find_packages, setup # TODO random links... # https://docs.pytest.org/en/latest/goodpractices.html?highlight=src#tests-outside-application-code # https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure # https://realpython.com/pypi-publish-python-package/ # https://github.c...
34.147541
101
0.68459
import os from setuptools import find_packages, setup # TODO random links... # https://docs.pytest.org/en/latest/goodpractices.html?highlight=src#tests-outside-application-code # https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure # https://realpython.com/pypi-publish-python-package/ # https://github.c...
165
0
23
7bc62174da0347378856083fbfac273d9acce3b0
950
py
Python
Codefights/arcade/python-arcade/level-8/50.Float-Range/Python/test.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
7
2017-09-20T16:40:39.000Z
2021-08-31T18:15:08.000Z
Codefights/arcade/python-arcade/level-8/50.Float-Range/Python/test.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
null
null
null
Codefights/arcade/python-arcade/level-8/50.Float-Range/Python/test.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
null
null
null
# Python3 from solution1 import floatRange as f qa = [ (-0.9, 0.45, 0.2, [-0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3]), (1.5, 1.5, 10, []), (1, 2, 1.5, [1]), (-21.11, 21.11, 1.11, [-21.11, -20, -18.89, -17.78, -16.67, -15.56, -14.45, -13.34, -12.23, -11.12, -10.01, -8.9, -7.79, -6.68, ...
31.666667
276
0.432632
# Python3 from solution1 import floatRange as f qa = [ (-0.9, 0.45, 0.2, [-0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3]), (1.5, 1.5, 10, []), (1, 2, 1.5, [1]), (-21.11, 21.11, 1.11, [-21.11, -20, -18.89, -17.78, -16.67, -15.56, -14.45, -13.34, -12.23, -11.12, -10.01, -8.9, -7.79, -6.68, ...
0
0
0
0b7659df9470327d36152b5032fae0a1013ce854
8,418
py
Python
osu/match.py
brandonnly/Vaughan-Esports-VetoBot
3d68de5cff9d686805e8c27cfcf847547ca384a6
[ "MIT" ]
1
2021-06-14T03:27:30.000Z
2021-06-14T03:27:30.000Z
osu/match.py
brandonnly/Vaughan-Esports-VetoBot
3d68de5cff9d686805e8c27cfcf847547ca384a6
[ "MIT" ]
22
2021-03-08T18:54:39.000Z
2022-03-25T03:07:52.000Z
osu/match.py
brandonnly/Vaughan-Esports-VetoBot
3d68de5cff9d686805e8c27cfcf847547ca384a6
[ "MIT" ]
null
null
null
import asyncio from typing import List import discord import discord.ext from osu.game import Game from settings import tourney_name, rulebook_url, footer_icon, footer_note, \ veto_timeout, newline from utils.checks import beatmapCheck, playerCheck class Match: """ Represents an osu! match """ ...
36.441558
80
0.518532
import asyncio from typing import List import discord import discord.ext from osu.game import Game from settings import tourney_name, rulebook_url, footer_icon, footer_note, \ veto_timeout, newline from utils.checks import beatmapCheck, playerCheck class Match: """ Represents an osu! match """ ...
7,524
0
159
a794b0500bf950de132acda17b870d8057781c4f
4,138
py
Python
songmam/security.py
codustry/songmam
b461799f69428e4fd5e47e1c234d28a75832e76a
[ "0BSD" ]
7
2020-11-13T02:31:04.000Z
2021-11-20T10:48:47.000Z
songmam/security.py
codustry/songmam
b461799f69428e4fd5e47e1c234d28a75832e76a
[ "0BSD" ]
108
2020-11-18T07:01:30.000Z
2022-03-30T14:06:24.000Z
songmam/security.py
codustry/songmam
b461799f69428e4fd5e47e1c234d28a75832e76a
[ "0BSD" ]
1
2021-11-20T10:48:51.000Z
2021-11-20T10:48:51.000Z
from typing import Dict, Optional import base64 import hashlib import hmac import json import re import arrow from pydantic import conint RequestContent = Dict def verify_signed_request( signed_request, app_secret, acceptable_freshness_sec: Optional[conint(ge=0)] = None, ) -> Optional[RequestContent]...
32.84127
358
0.692605
from typing import Dict, Optional import base64 import hashlib import hmac import json import re import arrow from pydantic import conint def base64_url_decode(inp) -> bytes: padding_factor = (4 - len(inp) % 4) % 4 inp += "=" * padding_factor return base64.b64decode(inp.translate(dict(zip(map(ord, "-_")...
1,870
189
46
a5433c0179ab08ab86a644229d3418a26c3d39cf
2,419
py
Python
x7/view/undo.py
gribbg/x7-view
53a07b651a08eae63f019b388584cfffceeb2ccb
[ "BSD-2-Clause", "MIT" ]
null
null
null
x7/view/undo.py
gribbg/x7-view
53a07b651a08eae63f019b388584cfffceeb2ccb
[ "BSD-2-Clause", "MIT" ]
null
null
null
x7/view/undo.py
gribbg/x7-view
53a07b651a08eae63f019b388584cfffceeb2ccb
[ "BSD-2-Clause", "MIT" ]
null
null
null
""" Undo/redo framework for anim.edit """ from x7.geom.typing import * from x7.geom.model import ControlPoint __all__ = ['Command', 'CommandDummy', 'CommandStack', 'CommandEditCP'] class Command(object): """ABC for Command pattern""" def do(self): """Apply the change and call .update() or .erase()...
22.607477
89
0.598181
""" Undo/redo framework for anim.edit """ from x7.geom.typing import * from x7.geom.model import ControlPoint __all__ = ['Command', 'CommandDummy', 'CommandStack', 'CommandEditCP'] class Command(object): """ABC for Command pattern""" def __init__(self): pass def description(self): unus...
1,199
230
394
ee4bbc2966794561fd56c51f176ce8a7aa870d4e
16,626
py
Python
gcn/lib/varann/utils/fpvariants.py
kalon33/divine
2db92c093d98722f011224140e652c162a4f4336
[ "Intel" ]
11
2018-11-09T15:47:14.000Z
2021-08-18T18:05:11.000Z
gcn/lib/varann/utils/fpvariants.py
kalon33/divine
2db92c093d98722f011224140e652c162a4f4336
[ "Intel" ]
5
2018-08-31T15:07:20.000Z
2020-03-30T18:52:04.000Z
gcn/lib/varann/utils/fpvariants.py
kalon33/divine
2db92c093d98722f011224140e652c162a4f4336
[ "Intel" ]
1
2019-04-18T13:42:30.000Z
2019-04-18T13:42:30.000Z
# # COPYRIGHT (C) 2012-2013 TCS Ltd # """ .. module:: fpvariants :platform: Unix, Windows, MacOSX :synopsis: Module to list out variants downstream to frameshift/stopgain mutation also present in same chromatid. .. moduleauthor:: Kunal Kundu (kunal@atc.tcs.com); modified by changjin.hong@gmail.c...
44.100796
86
0.424275
# # COPYRIGHT (C) 2012-2013 TCS Ltd # """ .. module:: fpvariants :platform: Unix, Windows, MacOSX :synopsis: Module to list out variants downstream to frameshift/stopgain mutation also present in same chromatid. .. moduleauthor:: Kunal Kundu (kunal@atc.tcs.com); modified by changjin.hong@gmail.c...
0
0
0
96f37f02743750f7af6ed70b5ecd8e70840445ee
6,096
py
Python
boston_keras_explorer.py
xblaauw/dense_neural_network_explorer
f6492fe9ccb7e7a86b77cf6805b505bf3ec34151
[ "CC0-1.0" ]
null
null
null
boston_keras_explorer.py
xblaauw/dense_neural_network_explorer
f6492fe9ccb7e7a86b77cf6805b505bf3ec34151
[ "CC0-1.0" ]
null
null
null
boston_keras_explorer.py
xblaauw/dense_neural_network_explorer
f6492fe9ccb7e7a86b77cf6805b505bf3ec34151
[ "CC0-1.0" ]
null
null
null
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import streamlit as st from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from tensorflow import keras from tensorflow.keras.models ...
40.912752
233
0.692257
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import streamlit as st from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from tensorflow import keras from tensorflow.keras.models ...
1,287
0
98
af034f9e1cc91dfba9323339fdb9ccd9e84b946b
5,892
py
Python
src/quakestats/sdk.py
LaudateCorpus1/quakestats
d4e44d593e6c7334628d34b5ec648ade5976003e
[ "MIT" ]
21
2018-04-24T09:33:01.000Z
2022-03-05T10:53:45.000Z
src/quakestats/sdk.py
brabiega/quakestats
1628720350a1e4e40ebebdb7988785663892f0be
[ "MIT" ]
42
2018-04-13T18:09:19.000Z
2021-08-05T20:23:22.000Z
src/quakestats/sdk.py
LaudateCorpus1/quakestats
d4e44d593e6c7334628d34b5ec648ade5976003e
[ "MIT" ]
8
2018-06-12T18:07:39.000Z
2021-08-28T02:26:17.000Z
import logging from typing import ( Iterator, List, Optional, Tuple, ) from quakestats.core.game.qlmatch import ( FullMatchInfo, ) from quakestats.core.q3parser.api import ( Q3ParserAPI, ) from quakestats.core.q3toql.api import ( Q3toQLAPI, QuakeGame, ) from quakestats.core.ql import ( ...
32.021739
107
0.629667
import logging from typing import ( Iterator, List, Optional, Tuple, ) from quakestats.core.game.qlmatch import ( FullMatchInfo, ) from quakestats.core.q3parser.api import ( Q3ParserAPI, ) from quakestats.core.q3toql.api import ( Q3toQLAPI, QuakeGame, ) from quakestats.core.ql import ( ...
3,692
1,419
23
310e4bae73897220c7c37458d7f26084bd19b439
708
py
Python
examples/obsolete_legacy/destroyNetworks.py
dasec/ForTrace
b8187522a2c83fb661e5a1a5f403da8f40a31ead
[ "MIT" ]
1
2022-03-31T14:01:51.000Z
2022-03-31T14:01:51.000Z
examples/obsolete_legacy/destroyNetworks.py
dasec/ForTrace
b8187522a2c83fb661e5a1a5f403da8f40a31ead
[ "MIT" ]
null
null
null
examples/obsolete_legacy/destroyNetworks.py
dasec/ForTrace
b8187522a2c83fb661e5a1a5f403da8f40a31ead
[ "MIT" ]
1
2022-03-31T14:02:30.000Z
2022-03-31T14:02:30.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2013-2014 Reinhard Stampp # This file is part of fortrace - http://fortrace.fbi.h-da.de # See the file 'docs/LICENSE' for copying permission. """This python script destroy the networks local and internet using libvirt. """ from __future__ import absolute...
21.454545
76
0.710452
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2013-2014 Reinhard Stampp # This file is part of fortrace - http://fortrace.fbi.h-da.de # See the file 'docs/LICENSE' for copying permission. """This python script destroy the networks local and internet using libvirt. """ from __future__ import absolute...
21
0
23
584a62300dfe29fa5ed29a2bd483da0701c06f57
3,900
py
Python
challenge4.py
pviafore/AdventOfCode2020
380e682558b22679639f72c178dd09114db0cbd6
[ "MIT" ]
null
null
null
challenge4.py
pviafore/AdventOfCode2020
380e682558b22679639f72c178dd09114db0cbd6
[ "MIT" ]
null
null
null
challenge4.py
pviafore/AdventOfCode2020
380e682558b22679639f72c178dd09114db0cbd6
[ "MIT" ]
1
2021-12-09T09:54:54.000Z
2021-12-09T09:54:54.000Z
import itertools import re from collections import defaultdict from dataclasses import dataclass from typing import Iterable, Optional import common.input_data as input_data @dataclass PASSPORTS: list[str] = input_data.read("input/input4.txt") if __name__ == "__main__": print(f"Number of valid passports: " ...
36.792453
78
0.624359
import itertools import re from collections import defaultdict from dataclasses import dataclass from typing import Iterable, Optional import common.input_data as input_data @dataclass class Passport: # pylint: disable=R0902 birth_year: Optional[str] issue_year: Optional[str] expiration_year: Optional[str...
2,802
502
114
c2591b8a605722a1287d38e7b61896da829e1d72
824
py
Python
http/server.py
jbaines-r7/staystaystay
e52a8e2b6ff3a55f763f3a0c6823928b9ae36b75
[ "BSD-3-Clause" ]
6
2022-02-11T02:55:59.000Z
2022-02-15T03:32:05.000Z
http/server.py
jbaines-r7/staystaystay
e52a8e2b6ff3a55f763f3a0c6823928b9ae36b75
[ "BSD-3-Clause" ]
null
null
null
http/server.py
jbaines-r7/staystaystay
e52a8e2b6ff3a55f763f3a0c6823928b9ae36b75
[ "BSD-3-Clause" ]
null
null
null
from http.server import HTTPServer, SimpleHTTPRequestHandler import ssl import os import argparse if __name__ == '__main__': top_parser = argparse.ArgumentParser(description='Simple HTTPS server') top_parser.add_argument('--port', action="store", dest="port", type=int, help="The port to listen on", default="443")...
39.238095
120
0.740291
from http.server import HTTPServer, SimpleHTTPRequestHandler import ssl import os import argparse if __name__ == '__main__': top_parser = argparse.ArgumentParser(description='Simple HTTPS server') top_parser.add_argument('--port', action="store", dest="port", type=int, help="The port to listen on", default="443")...
0
0
0
6c35fb4807906e4b5cc5a68f0dbba87b2301c758
443
py
Python
Android/logdel.py
y007at/meghadoot
e95628cbff11e1e7802c75758af8e2ae2d7b1d20
[ "MIT" ]
null
null
null
Android/logdel.py
y007at/meghadoot
e95628cbff11e1e7802c75758af8e2ae2d7b1d20
[ "MIT" ]
null
null
null
Android/logdel.py
y007at/meghadoot
e95628cbff11e1e7802c75758af8e2ae2d7b1d20
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys, os, re; dTs = 0 oldTs=-1 for l in sys.stdin: l2=l.rstrip() t = l2.split(' ') if len(t) < 2: continue ts = t[1].split(':') tsInMs = (int(ts[0])*3600 + int(ts[1])*60 + float(ts[2]))*1000 #print '%f -- %s ffffffffffffff\n' % ( tsInMs, t[1]) if (oldTs > 0): d...
16.407407
64
0.51693
#!/usr/bin/python import sys, os, re; dTs = 0 oldTs=-1 for l in sys.stdin: l2=l.rstrip() t = l2.split(' ') if len(t) < 2: continue ts = t[1].split(':') tsInMs = (int(ts[0])*3600 + int(ts[1])*60 + float(ts[2]))*1000 #print '%f -- %s ffffffffffffff\n' % ( tsInMs, t[1]) if (oldTs > 0): d...
0
0
0
3f4a61cf35c7e50780cf901c36dd6887a92cbc8c
5,966
py
Python
build/lib/Py_FS/wrapper/nature_inspired/CS_test.py
rishavpramanik/Feature-Selection
afe96cb8271f1e86a77075d19ec107c37afbbff3
[ "MIT" ]
31
2020-11-17T10:42:22.000Z
2022-03-27T11:20:13.000Z
build/lib/Py_FS/wrapper/nature_inspired/CS_test.py
rishavpramanik/Feature-Selection
afe96cb8271f1e86a77075d19ec107c37afbbff3
[ "MIT" ]
11
2020-10-21T18:05:12.000Z
2022-03-25T18:54:53.000Z
build/lib/Py_FS/wrapper/nature_inspired/CS_test.py
rishavpramanik/Feature-Selection
afe96cb8271f1e86a77075d19ec107c37afbbff3
[ "MIT" ]
23
2020-11-18T14:01:09.000Z
2022-03-31T04:36:33.000Z
""" Programmer: Trinav Bhattacharyya Date of Development: 18/10/2020 This code has been developed according to the procedures mentioned in the following research article: X.-S. Yang, S. Deb, “Cuckoo search via Levy flights”, in: Proc. of World Congress on Nature & Biologically Inspired Computing (NaBIC 2009), December ...
45.19697
182
0.56051
""" Programmer: Trinav Bhattacharyya Date of Development: 18/10/2020 This code has been developed according to the procedures mentioned in the following research article: X.-S. Yang, S. Deb, “Cuckoo search via Levy flights”, in: Proc. of World Congress on Nature & Biologically Inspired Computing (NaBIC 2009), December ...
3,791
-1
229
1fa9401be7270550a0df0f48cc0049a5bf73787e
2,852
py
Python
src/main/python/fontspecs.py
sourcery-ai-bot/retcom
7879ddc86990b61c32b4a531a4db12515935ab74
[ "MIT" ]
10
2021-02-28T11:45:40.000Z
2022-03-20T02:24:55.000Z
src/main/python/fontspecs.py
sourcery-ai-bot/retcom
7879ddc86990b61c32b4a531a4db12515935ab74
[ "MIT" ]
2
2021-05-29T19:03:37.000Z
2022-01-14T18:20:03.000Z
src/main/python/fontspecs.py
sourcery-ai-bot/retcom
7879ddc86990b61c32b4a531a4db12515935ab74
[ "MIT" ]
6
2021-02-22T17:19:26.000Z
2021-09-13T12:47:58.000Z
from fontTools.ttLib import TTFont from fontTools.ttLib.tables._c_m_a_p import CmapSubtable HALF2FULLWIDTH = dict((i, i + 0xFEE0) for i in range(0x21, 0x7F)) FULL2HALFWIDTH = dict((i + 0xFEE0, i) for i in range(0x21, 0x7F)) if __name__ == "__main__": text = 'This is a test\nABCDEFGHIJKLMNOPQRSTUVW' fontSpec =...
26.407407
68
0.596424
from fontTools.ttLib import TTFont from fontTools.ttLib.tables._c_m_a_p import CmapSubtable def fetchFontSpec(path): font = TTFont(path) cmap = font['cmap'] t = cmap.getcmap(3,1).cmap s = font.getGlyphSet() unitsPerEm = font['head'].unitsPerEm return { 'font' : font, 't' : t, ...
1,999
2
326
0081a1dac15339b1b7886f2b9a79a88cdd4843b6
105
py
Python
src/elections_lk/parliamentary/ELECTION_YEAR_LIST.py
nuuuwan/elections_lk
08835e420788271b6d6df190a19eb791c0c1c69e
[ "MIT" ]
5
2019-10-18T04:57:44.000Z
2020-09-11T08:19:43.000Z
src/elections_lk/parliamentary/ELECTION_YEAR_LIST.py
nuuuwan/elections_lk
08835e420788271b6d6df190a19eb791c0c1c69e
[ "MIT" ]
null
null
null
src/elections_lk/parliamentary/ELECTION_YEAR_LIST.py
nuuuwan/elections_lk
08835e420788271b6d6df190a19eb791c0c1c69e
[ "MIT" ]
null
null
null
ELECTION_YEAR_LIST = [ 1989, 1994, 2000, 2001, 2004, 2010, 2015, 2020, ]
9.545455
22
0.47619
ELECTION_YEAR_LIST = [ 1989, 1994, 2000, 2001, 2004, 2010, 2015, 2020, ]
0
0
0
d1aed4610f072e1117443a2c1854df92fdf0c18c
8,052
py
Python
src/openeo_classification/classify.py
openEOPlatform/openeo-classification
2e593a0760c210d78454a6a4cd54e0c78cda8b22
[ "Apache-2.0" ]
null
null
null
src/openeo_classification/classify.py
openEOPlatform/openeo-classification
2e593a0760c210d78454a6a4cd54e0c78cda8b22
[ "Apache-2.0" ]
2
2022-03-31T12:19:19.000Z
2022-03-31T14:35:39.000Z
src/openeo_classification/classify.py
openEOPlatform/openeo-classification
2e593a0760c210d78454a6a4cd54e0c78cda8b22
[ "Apache-2.0" ]
null
null
null
import pandas as pd from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.metrics import accuracy_score, precision_recall_fscore_support, confusion_matrix,plot_confusion_matrix, ConfusionMatrixDisplay from catboost import CatBoostClassifier import matplotlib.pyplot as plt from explore import ...
41.292308
144
0.643194
import pandas as pd from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.metrics import accuracy_score, precision_recall_fscore_support, confusion_matrix,plot_confusion_matrix, ConfusionMatrixDisplay from catboost import CatBoostClassifier import matplotlib.pyplot as plt from explore import ...
2,480
0
24
69990cfc9621ec7083d9cf51ca5e92ac2a42610b
5,567
py
Python
opp/baseline_lrrf_upper.py
heeryoncho/sensors2018cnnhar
2c0ae84b83a95bd5b5ab13df0fb3f5e8529df91f
[ "MIT" ]
10
2018-09-25T07:55:30.000Z
2020-05-08T15:01:56.000Z
opp/baseline_lrrf_upper.py
heeryoncho/sensors2018cnnhar
2c0ae84b83a95bd5b5ab13df0fb3f5e8529df91f
[ "MIT" ]
null
null
null
opp/baseline_lrrf_upper.py
heeryoncho/sensors2018cnnhar
2c0ae84b83a95bd5b5ab13df0fb3f5e8529df91f
[ "MIT" ]
5
2018-12-12T16:40:26.000Z
2020-10-29T01:24:07.000Z
from sklearn.metrics import accuracy_score from sklearn.metrics import confusion_matrix from sklearn.linear_model import LogisticRegression from sklearn.ensemble import RandomForestClassifier import select_data as sd ''' See paper: Sensors 2018, 18(4), 1055; https://doi.org/10.3390/s18041055 "Divide and Conquer-Base...
29.146597
96
0.60679
from sklearn.metrics import accuracy_score from sklearn.metrics import confusion_matrix from sklearn.linear_model import LogisticRegression from sklearn.ensemble import RandomForestClassifier import select_data as sd ''' See paper: Sensors 2018, 18(4), 1055; https://doi.org/10.3390/s18041055 "Divide and Conquer-Base...
0
0
0
5a2a781d8bedfa1ae1938c4a0ce6bae02332448f
3,108
py
Python
eva-server/src/test_web_service_rate_limiting.py
sundarvenkata-EBI/eva-ws
8ee7a17d4715301ed7344df3bd309dcbda0e0c3d
[ "Apache-2.0" ]
2
2019-04-04T17:29:05.000Z
2019-08-20T04:29:53.000Z
eva-server/src/test_web_service_rate_limiting.py
sundarvenkata-EBI/eva-ws
8ee7a17d4715301ed7344df3bd309dcbda0e0c3d
[ "Apache-2.0" ]
45
2016-09-06T12:32:20.000Z
2022-02-22T17:15:16.000Z
eva-server/src/test_web_service_rate_limiting.py
sundarvenkata-EBI/eva-ws
8ee7a17d4715301ed7344df3bd309dcbda0e0c3d
[ "Apache-2.0" ]
18
2016-09-16T12:30:00.000Z
2021-06-25T08:34:56.000Z
# Copyright 2019 EMBL - European Bioinformatics Institute # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
37.902439
119
0.630309
# Copyright 2019 EMBL - European Bioinformatics Institute # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
1,065
0
92
08d99fd3dce63ad10aa7a19c511695bf54345399
506
py
Python
TSpy/stack2D.py
jtrebosc/JTutils
124941a3e9101a82209b5f9b01a1276182baa9b4
[ "BSD-3-Clause" ]
2
2018-06-19T19:37:38.000Z
2022-01-29T15:38:51.000Z
TSpy/stack2D.py
jtrebosc/JTutils
124941a3e9101a82209b5f9b01a1276182baa9b4
[ "BSD-3-Clause" ]
2
2020-02-16T23:35:25.000Z
2022-02-21T10:32:11.000Z
TSpy/stack2D.py
jtrebosc/JTutils
124941a3e9101a82209b5f9b01a1276182baa9b4
[ "BSD-3-Clause" ]
2
2022-01-29T15:38:52.000Z
2022-03-05T10:25:21.000Z
# -*- coding: utf-8 -*- import sys import os import os.path import subprocess import JTutils if len(sys.argv)>1: destproc = sys.argv[1] else: destproc = "999" if len(sys.argv) >2: showRES = sys.argv[2] else: showRES = "y" data2d = CURDATA() data1d = data2d[:] data1d[2] = destproc fulld2d = JTutils.fullpat...
16.322581
60
0.677866
# -*- coding: utf-8 -*- import sys import os import os.path import subprocess import JTutils if len(sys.argv)>1: destproc = sys.argv[1] else: destproc = "999" if len(sys.argv) >2: showRES = sys.argv[2] else: showRES = "y" data2d = CURDATA() data1d = data2d[:] data1d[2] = destproc fulld2d = JTutils.fullpat...
0
0
0
3fd0bdd71e7a55eb15e5ccd5845880f21f01b43f
434
py
Python
version_query/__init__.py
mbdevpl/version-query
7131b643e405351b6d0123059d3f3ec4154faf39
[ "Apache-2.0" ]
9
2017-11-23T11:20:54.000Z
2021-02-18T10:34:30.000Z
version_query/__init__.py
mbdevpl/version-query
7131b643e405351b6d0123059d3f3ec4154faf39
[ "Apache-2.0" ]
7
2018-08-31T21:13:41.000Z
2020-11-15T14:26:59.000Z
version_query/__init__.py
mbdevpl/version-query
7131b643e405351b6d0123059d3f3ec4154faf39
[ "Apache-2.0" ]
5
2019-07-16T00:30:09.000Z
2021-06-16T07:37:18.000Z
"""Initialization of version_query package.""" __all__ = ['VersionComponent', 'Version', 'query_folder', 'query_caller', 'query_version_str', 'predict_git_repo', 'predict_caller', 'predict_version_str'] from .version import VersionComponent, Version from .query import query_folder, query_caller,...
39.454545
83
0.771889
"""Initialization of version_query package.""" __all__ = ['VersionComponent', 'Version', 'query_folder', 'query_caller', 'query_version_str', 'predict_git_repo', 'predict_caller', 'predict_version_str'] from .version import VersionComponent, Version from .query import query_folder, query_caller,...
0
0
0
65d30c8e6e67f70bee892b75356503589b1b4429
3,046
py
Python
lib/hmmlearn/_utils.py
markrl/hmmlearn
b2b4f9e5b54a737330844caae9ff9102910d34f3
[ "BSD-3-Clause" ]
null
null
null
lib/hmmlearn/_utils.py
markrl/hmmlearn
b2b4f9e5b54a737330844caae9ff9102910d34f3
[ "BSD-3-Clause" ]
null
null
null
lib/hmmlearn/_utils.py
markrl/hmmlearn
b2b4f9e5b54a737330844caae9ff9102910d34f3
[ "BSD-3-Clause" ]
null
null
null
"""Private utilities.""" import numpy as np # from sklearn.utils.validation import NotFittedError # Copied from scikit-learn 0.19. def _validate_covars(covars, covariance_type, n_components): """Do basic checks on matrix covariance sizes and values.""" from scipy import linalg if covariance_type == 'sphe...
42.305556
76
0.586014
"""Private utilities.""" import numpy as np # from sklearn.utils.validation import NotFittedError # Copied from scikit-learn 0.19. def _validate_covars(covars, covariance_type, n_components): """Do basic checks on matrix covariance sizes and values.""" from scipy import linalg if covariance_type == 'sphe...
257
0
22
9f9bc41f165ced95e2acc47ecfd23d84f83165df
18,140
py
Python
main/views.py
geosoco/coding_experiment
bd17b703c3ba7a3de59ffc846fbcbbdb42fa8a77
[ "MIT" ]
null
null
null
main/views.py
geosoco/coding_experiment
bd17b703c3ba7a3de59ffc846fbcbbdb42fa8a77
[ "MIT" ]
null
null
null
main/views.py
geosoco/coding_experiment
bd17b703c3ba7a3de59ffc846fbcbbdb42fa8a77
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User from django.contrib.auth import authenticate, login from django.contrib.auth.decorators import login_required, permission_required from django.template.context_processors import csrf from django.shortcuts import render, render_to_response, get_object_or_404 from django.http i...
28.167702
163
0.699559
from django.contrib.auth.models import User from django.contrib.auth import authenticate, login from django.contrib.auth.decorators import login_required, permission_required from django.template.context_processors import csrf from django.shortcuts import render, render_to_response, get_object_or_404 from django.http i...
8,904
408
417
fc659e41217a69ca8cfb992b78736b347fb73276
3,601
py
Python
util/data_loader.py
giuliabaldini/brainclustering
853bd46e12338da9ae4fe348c508163d9951feb3
[ "MIT" ]
null
null
null
util/data_loader.py
giuliabaldini/brainclustering
853bd46e12338da9ae4fe348c508163d9951feb3
[ "MIT" ]
null
null
null
util/data_loader.py
giuliabaldini/brainclustering
853bd46e12338da9ae4fe348c508163d9951feb3
[ "MIT" ]
null
null
null
import nibabel as nib import numpy as np from util.util import transform_single, warning, error, remove_outliers, normalize_with_opt
40.011111
120
0.63038
import nibabel as nib import numpy as np from util.util import transform_single, warning, error, remove_outliers, normalize_with_opt class DataLoader: def __init__(self, args, options): self.train_folder = args.data_folder / "train" self.query_folder = args.data_folder / args.test_set sel...
3,286
-4
184
29c8d246831a423c1d2c3af70d49942d02739f00
5,149
py
Python
rsscraper/feeds/tests/test_views.py
Sunno/rsscraper
a9897d507980ec4525e8521188cf76203829caca
[ "MIT" ]
null
null
null
rsscraper/feeds/tests/test_views.py
Sunno/rsscraper
a9897d507980ec4525e8521188cf76203829caca
[ "MIT" ]
null
null
null
rsscraper/feeds/tests/test_views.py
Sunno/rsscraper
a9897d507980ec4525e8521188cf76203829caca
[ "MIT" ]
null
null
null
import pytest from django.conf import settings from django.urls import reverse, resolve from django.test import RequestFactory, Client from django.http import Http404 from rsscraper.feeds.models import Feed, FeedItem from rsscraper.feeds.views import FeedDetailView, FeedItemDetailView,\ FeedDeleteView from rsscrap...
27.832432
78
0.632938
import pytest from django.conf import settings from django.urls import reverse, resolve from django.test import RequestFactory, Client from django.http import Http404 from rsscraper.feeds.models import Feed, FeedItem from rsscraper.feeds.views import FeedDetailView, FeedItemDetailView,\ FeedDeleteView from rsscrap...
4,451
16
277
9534719b3e125dbac0b54b5caf8f320f2ae78a02
108
py
Python
Subprocess/sub1.py
Anilkumar95/python-75-hackathon
0cc9304e46ceace826090614b46d8048a068d106
[ "MIT" ]
null
null
null
Subprocess/sub1.py
Anilkumar95/python-75-hackathon
0cc9304e46ceace826090614b46d8048a068d106
[ "MIT" ]
null
null
null
Subprocess/sub1.py
Anilkumar95/python-75-hackathon
0cc9304e46ceace826090614b46d8048a068d106
[ "MIT" ]
2
2019-01-27T16:59:48.000Z
2019-01-29T13:07:40.000Z
# subprocess to return the information of the directory import subprocess subprocess.call('dir',shell=True)
27
55
0.814815
# subprocess to return the information of the directory import subprocess subprocess.call('dir',shell=True)
0
0
0
cfed271305f893402cf646c4aa7d2b1407d159e9
745
py
Python
src/utils/program3/block.py
amasiukevich/InterpreterNew
159fe52ac1a978c44093e268e44616904f2da5b4
[ "MIT" ]
null
null
null
src/utils/program3/block.py
amasiukevich/InterpreterNew
159fe52ac1a978c44093e268e44616904f2da5b4
[ "MIT" ]
null
null
null
src/utils/program3/block.py
amasiukevich/InterpreterNew
159fe52ac1a978c44093e268e44616904f2da5b4
[ "MIT" ]
null
null
null
from src.utils.program3.node import Node from src.utils.program3.statements.statement import Statement
24.833333
110
0.65906
from src.utils.program3.node import Node from src.utils.program3.statements.statement import Statement class Block(Node): def __init__(self, statements=[]): # if len(statements) != 0 and not all([isinstance(statement, Statement) for statement in statements]): # raise ParserException("All ele...
511
-3
131
f8f5f6dae01564157f684e47ebce54601fd84ad3
19,845
py
Python
calplus/tests/unit/v1/compute/drivers/test_openstack_driver.py
nghiadt16/CALplus
68c108e6abf7eeac4937b870dc7462dd6ee2fcc3
[ "Apache-2.0" ]
null
null
null
calplus/tests/unit/v1/compute/drivers/test_openstack_driver.py
nghiadt16/CALplus
68c108e6abf7eeac4937b870dc7462dd6ee2fcc3
[ "Apache-2.0" ]
4
2017-04-05T16:14:07.000Z
2018-12-14T14:19:15.000Z
calplus/tests/unit/v1/compute/drivers/test_openstack_driver.py
nghiadt16/CALplus
68c108e6abf7eeac4937b870dc7462dd6ee2fcc3
[ "Apache-2.0" ]
2
2017-04-18T16:53:58.000Z
2018-12-04T05:42:51.000Z
""" OpenstackDriver for Compute based on BaseDriver for Compute Resource """ import mock from keystoneauth1.exceptions.base import ClientException from calplus.tests import base from calplus.v1.compute.drivers.openstack import OpenstackDriver fake_config_driver = { 'os_auth_url': 'http://controller:5000/v2...
35.500894
75
0.638045
""" OpenstackDriver for Compute based on BaseDriver for Compute Resource """ import mock from keystoneauth1.exceptions.base import ClientException from calplus.tests import base from calplus.v1.compute.drivers.openstack import OpenstackDriver fake_config_driver = { 'os_auth_url': 'http://controller:5000/v2...
17,844
28
1,018
d2e027362d4fedcab9c1fae25130ea86473b654e
1,409
py
Python
disco/util/functional.py
Lymia/rowboat
391e1eab0323e4fc295404f367e62136265e9a60
[ "MIT" ]
6
2018-07-20T04:07:51.000Z
2021-01-15T04:52:34.000Z
disco/util/functional.py
Lymia/rowboat
391e1eab0323e4fc295404f367e62136265e9a60
[ "MIT" ]
1
2018-11-05T22:47:43.000Z
2020-10-04T09:45:42.000Z
disco/util/functional.py
Lymia/rowboat
391e1eab0323e4fc295404f367e62136265e9a60
[ "MIT" ]
6
2018-07-20T03:19:30.000Z
2021-11-05T22:51:18.000Z
from six.moves import range NO_MORE_SENTINEL = object() def take(seq, count): """ Take count many elements from a sequence or generator. Args ---- seq : sequnce or generator The sequnce to take elements from. count : int The number of elments to take. """ for _ in ran...
20.42029
81
0.569198
from six.moves import range NO_MORE_SENTINEL = object() def take(seq, count): """ Take count many elements from a sequence or generator. Args ---- seq : sequnce or generator The sequnce to take elements from. count : int The number of elments to take. """ for _ in ran...
500
0
49
936d6aaa28edcd78d8154908db637a8124ec7f29
154
py
Python
python/vital/__init__.py
mwoehlke-kitware/kwiver
614a488bd2b7fe551ac75eec979766d882709791
[ "BSD-3-Clause" ]
176
2015-07-31T23:33:37.000Z
2022-03-21T23:42:44.000Z
python/vital/__init__.py
mwoehlke-kitware/kwiver
614a488bd2b7fe551ac75eec979766d882709791
[ "BSD-3-Clause" ]
1,276
2015-05-03T01:21:27.000Z
2022-03-31T15:32:20.000Z
python/vital/__init__.py
mwoehlke-kitware/kwiver
614a488bd2b7fe551ac75eec979766d882709791
[ "BSD-3-Clause" ]
85
2015-01-25T05:13:38.000Z
2022-01-14T14:59:37.000Z
import warnings warnings.warn( '`import vital` is deprecated, use import kwiver.vital instead', UserWarning ) from kwiver.vital import * # NOQA
19.25
68
0.727273
import warnings warnings.warn( '`import vital` is deprecated, use import kwiver.vital instead', UserWarning ) from kwiver.vital import * # NOQA
0
0
0
cb406c3cdc7290f5ffc3b2d571e3f9b27f5b35a6
2,002
py
Python
gvapi/cli.py
TitaniumHocker/gvapi
3848b0ff21f2c6d55501e2c4ebff1669fcd8cfea
[ "MIT" ]
1
2021-01-18T09:07:13.000Z
2021-01-18T09:07:13.000Z
gvapi/cli.py
TitaniumHocker/gvapi
3848b0ff21f2c6d55501e2c4ebff1669fcd8cfea
[ "MIT" ]
8
2020-07-09T06:40:16.000Z
2021-04-24T01:49:51.000Z
gvapi/cli.py
TitaniumHocker/gvapi
3848b0ff21f2c6d55501e2c4ebff1669fcd8cfea
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Модуль, описывающий CLI-утилиту пакета gvapi""" import sys from os import environ from pathlib import Path from hashlib import md5 import pickle import click from gvapi import Hero, errors @click.command() @click.option('-g', '--god', required=False, default=environ.get('GVAPI_GOD'), help='...
31.777778
99
0.663337
# -*- coding: utf-8 -*- """Модуль, описывающий CLI-утилиту пакета gvapi""" import sys from os import environ from pathlib import Path from hashlib import md5 import pickle import click from gvapi import Hero, errors @click.command() @click.option('-g', '--god', required=False, default=environ.get('GVAPI_GOD'), help='...
0
0
0
93f28a3589207ee43e53a4354028a0d0083de144
15,726
py
Python
ecmwf_inmet/py/ecmwf_download.py
beneduzi/METEO
5e3446b9ab1111ed88eab16252fcc84225abd6ed
[ "Apache-2.0" ]
1
2018-08-09T16:23:40.000Z
2018-08-09T16:23:40.000Z
ecmwf_inmet/py/ecmwf_download.py
beneduzi/METEO
5e3446b9ab1111ed88eab16252fcc84225abd6ed
[ "Apache-2.0" ]
null
null
null
ecmwf_inmet/py/ecmwf_download.py
beneduzi/METEO
5e3446b9ab1111ed88eab16252fcc84225abd6ed
[ "Apache-2.0" ]
null
null
null
from ecmwfapi import ECMWFDataServer server = ECMWFDataServer() server.retrieve({ "class": "ei", "dataset": "interim", "date": "1979-01-01/to/1979-12-31", "expver": "1", "grid": "0.75/0.75", "levtype": "sfc", "param": "34.128/49.128/134.128/143.128/164.128/165.128/166.128/167.128/168...
28.855046
102
0.50248
from ecmwfapi import ECMWFDataServer server = ECMWFDataServer() server.retrieve({ "class": "ei", "dataset": "interim", "date": "1979-01-01/to/1979-12-31", "expver": "1", "grid": "0.75/0.75", "levtype": "sfc", "param": "34.128/49.128/134.128/143.128/164.128/165.128/166.128/167.128/168...
0
0
0
85a4186e3b7d83eabbe11a7f409d3bb4baf221bc
9,949
py
Python
apps/cms/urls.py
1786016767jjk/pj
17de9e2ab2bac842abf7ad4605c00dcb1a7d079f
[ "Apache-2.0" ]
null
null
null
apps/cms/urls.py
1786016767jjk/pj
17de9e2ab2bac842abf7ad4605c00dcb1a7d079f
[ "Apache-2.0" ]
null
null
null
apps/cms/urls.py
1786016767jjk/pj
17de9e2ab2bac842abf7ad4605c00dcb1a7d079f
[ "Apache-2.0" ]
null
null
null
# 后台 from flask import Blueprint from flask.views import MethodView from flask import render_template, session, g from apps.cms.forms import UserForm, ResetPwdForm, ResetEailForm, ResetEmailSendCode,URL from flask import request, jsonify from apps.common.baseResp import * from ext import db, mail from flask_mail import...
30.425076
98
0.633129
# 后台 from flask import Blueprint from flask.views import MethodView from flask import render_template, session, g from apps.cms.forms import UserForm, ResetPwdForm, ResetEailForm, ResetEmailSendCode,URL from flask import request, jsonify from apps.common.baseResp import * from ext import db, mail from flask_mail import...
5,793
1,298
469
bb2eabe8086251aa300894c724e1c7358f5d19af
10,180
py
Python
resources/usr/local/lib/python2.7/dist-packages/sklearn/utils/linear_assignment_.py
edawson/parliament2
2632aa3484ef64c9539c4885026b705b737f6d1e
[ "Apache-2.0" ]
null
null
null
resources/usr/local/lib/python2.7/dist-packages/sklearn/utils/linear_assignment_.py
edawson/parliament2
2632aa3484ef64c9539c4885026b705b737f6d1e
[ "Apache-2.0" ]
null
null
null
resources/usr/local/lib/python2.7/dist-packages/sklearn/utils/linear_assignment_.py
edawson/parliament2
2632aa3484ef64c9539c4885026b705b737f6d1e
[ "Apache-2.0" ]
1
2020-05-28T23:01:44.000Z
2020-05-28T23:01:44.000Z
""" Solve the unique lowest-cost assignment problem using the Hungarian algorithm (also known as Munkres algorithm). """ # Based on original code by Brain Clapper, adapted to numpy by Gael Varoquaux # Copyright (c) 2008 Brian M. Clapper <bmc@clapper.org>, Gael Varoquaux # Author: Brian M. Clapper, Gael Varoquaux # LI...
35.347222
79
0.558251
""" Solve the unique lowest-cost assignment problem using the Hungarian algorithm (also known as Munkres algorithm). """ # Based on original code by Brain Clapper, adapted to numpy by Gael Varoquaux # Copyright (c) 2008 Brian M. Clapper <bmc@clapper.org>, Gael Varoquaux # Author: Brian M. Clapper, Gael Varoquaux # LI...
0
0
0
b32f1fcd2ed12feff6ea6a9bb82744f2bda3549f
897
py
Python
predict.py
Thesharing/lfesm
e956ed76f5a85259000742db093726d4b4c51751
[ "Apache-2.0" ]
6
2020-01-31T13:14:11.000Z
2021-05-16T11:43:17.000Z
predict.py
Thesharing/lfesm
e956ed76f5a85259000742db093726d4b4c51751
[ "Apache-2.0" ]
5
2020-11-16T06:23:31.000Z
2022-01-04T10:17:16.000Z
predict.py
Thesharing/lfesm
e956ed76f5a85259000742db093726d4b4c51751
[ "Apache-2.0" ]
4
2020-11-04T02:42:57.000Z
2022-03-21T06:36:20.000Z
import logging import sys import time import torch from model import MatchModel from data import TripletTextDataset from util import seed_all logging.disable(sys.maxsize) start_time = time.time() input_path = "./data/test/test.json" output_path = "./data/test/output.txt" if len(sys.argv) == 3: input_path = sys...
20.386364
55
0.720178
import logging import sys import time import torch from model import MatchModel from data import TripletTextDataset from util import seed_all logging.disable(sys.maxsize) start_time = time.time() input_path = "./data/test/test.json" output_path = "./data/test/output.txt" if len(sys.argv) == 3: input_path = sys...
0
0
0
744d1261d11c6824d5c1990f03db65e2dab3b1a9
423
py
Python
paper_oh_maser.py
e-koch/VLA_Lband
8fca7b2de0b88ce5c5011b34bf3936c69338d0b0
[ "MIT" ]
1
2021-03-08T23:19:12.000Z
2021-03-08T23:19:12.000Z
paper_oh_maser.py
e-koch/VLA_Lband
8fca7b2de0b88ce5c5011b34bf3936c69338d0b0
[ "MIT" ]
null
null
null
paper_oh_maser.py
e-koch/VLA_Lband
8fca7b2de0b88ce5c5011b34bf3936c69338d0b0
[ "MIT" ]
null
null
null
''' Analysis and figures for research notes Requires running OH_1665_narrowchannel_imaging ''' from os.path import join as osjoin from paths import c_path # Masking and moment-making scripts # Make velocity corrected cubes execfile(osjoin(c_path, "Lines/OH_maser_luminosity.py")) execfile(osjoin(c_path, "Lines/OH_...
22.263158
73
0.794326
''' Analysis and figures for research notes Requires running OH_1665_narrowchannel_imaging ''' from os.path import join as osjoin from paths import c_path # Masking and moment-making scripts # Make velocity corrected cubes execfile(osjoin(c_path, "Lines/OH_maser_luminosity.py")) execfile(osjoin(c_path, "Lines/OH_...
0
0
0
7b140b5e6845c09557147479c944f96de760c4c4
2,288
py
Python
src/tinder/user.py
maxime-peim/tinder-api
82333eb11fc6e5c2bb61ce51b11e78910ef1dd37
[ "MIT" ]
null
null
null
src/tinder/user.py
maxime-peim/tinder-api
82333eb11fc6e5c2bb61ce51b11e78910ef1dd37
[ "MIT" ]
null
null
null
src/tinder/user.py
maxime-peim/tinder-api
82333eb11fc6e5c2bb61ce51b11e78910ef1dd37
[ "MIT" ]
1
2021-12-28T01:13:29.000Z
2021-12-28T01:13:29.000Z
from functools import reduce, wraps from typing import Any import requests import tinder from tinder.recs import Rec, TimeOutException, RetryException
29.714286
104
0.573427
from functools import reduce, wraps from typing import Any import requests import tinder from tinder.recs import Rec, TimeOutException, RetryException class UserNotLoggedException(tinder.APIException): pass class UnknownError(tinder.APIException): def __init__(self, message: str = ''): ...
1,633
387
107
462ad1bc8800602d01c097ab6883424598622ad8
2,142
py
Python
Ene-Jun-2020/almaguer-constante-juan-de-dios/Parcial1/Practica3/Ejercicio2/comp.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
41
2017-09-26T09:36:32.000Z
2022-03-19T18:05:25.000Z
Ene-Jun-2020/almaguer-constante-juan-de-dios/Parcial1/Practica3/Ejercicio2/comp.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
67
2017-09-11T05:06:12.000Z
2022-02-14T04:44:04.000Z
Ene-Jun-2020/almaguer-constante-juan-de-dios/Parcial1/Practica3/Ejercicio2/comp.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
210
2017-09-01T00:10:08.000Z
2022-03-19T18:05:12.000Z
import abc if __name__ == '__main__': #se crean los diferentes archivos que formaran parte del directorio root = directory('/') etc = directory('/etc') var = directory('/var') usr = directory('/usr') include = directory('/include') home = directory('/home') users = directory('/user...
23.032258
71
0.634454
import abc class archivoComponent(metaclass=abc.ABCMeta): @abc.abstractmethod def path(self): pass def get_Name(self): return self.name # Nombre del archivo def get_Type(self): return self.type # Directorio o archivo class directory(archivoComponent): def __init__(sel...
813
154
359
08cd1f1319f3109fd20c7687a9bac69fb3bca05f
581
py
Python
info_security/lab7/lab7_test.py
smithros/kpi-stuff
60da5f960ab6ab3d1c2b0ea451d4d113c333d7ad
[ "MIT" ]
21
2021-01-20T19:49:31.000Z
2021-12-15T20:26:18.000Z
info_security/lab7/lab7_test.py
smithros/kpi-stuff
60da5f960ab6ab3d1c2b0ea451d4d113c333d7ad
[ "MIT" ]
1
2021-03-13T17:24:41.000Z
2021-05-28T18:33:49.000Z
info_security/lab7/lab7_test.py
smithros/kpi-stuff
60da5f960ab6ab3d1c2b0ea451d4d113c333d7ad
[ "MIT" ]
3
2021-02-16T17:41:16.000Z
2022-03-25T13:18:04.000Z
import time if __name__ == '__main__': print(enc_test()) print(dec_test())
20.034483
54
0.48537
import time def enc_test(): y = [] for i in range(1, 101): (pb, pr) = rsa.newkeys(1024) t1 = time.time() rsa.encrypt(bytes("a" * i, 'utf-8'), pb) t2 = time.time() y.append(t2 - t1) return y def dec_test(): y = [] for i in range(1, 5): (pb, pr) = rsa...
449
0
46
d0fec10afe3bb9093452151a9d44d48f51be9668
1,237
py
Python
apps/pages/views/PagesView.py
Nelson-Morais/HA-OOAD
82bd00ba7ab5f11f43bc90b505ee8afd0b86c7b5
[ "Apache-2.0" ]
null
null
null
apps/pages/views/PagesView.py
Nelson-Morais/HA-OOAD
82bd00ba7ab5f11f43bc90b505ee8afd0b86c7b5
[ "Apache-2.0" ]
null
null
null
apps/pages/views/PagesView.py
Nelson-Morais/HA-OOAD
82bd00ba7ab5f11f43bc90b505ee8afd0b86c7b5
[ "Apache-2.0" ]
null
null
null
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
31.717949
61
0.753436
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
0
0
0
c444adea26dfc14584493a3e75526f91bcf3521b
6,304
py
Python
nsrdb_wrapper/wrapper.py
P-Tillmann/nsrdb_wrapper
f3bf8deb8dae09c7fba7ff8e19377090d431a28f
[ "MIT" ]
1
2021-04-26T01:18:58.000Z
2021-04-26T01:18:58.000Z
nsrdb_wrapper/wrapper.py
P-Tillmann/nsrdb_wrapper
f3bf8deb8dae09c7fba7ff8e19377090d431a28f
[ "MIT" ]
null
null
null
nsrdb_wrapper/wrapper.py
P-Tillmann/nsrdb_wrapper
f3bf8deb8dae09c7fba7ff8e19377090d431a28f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """module containg the API wrapper""" import io import requests import yaml from pysolar import solar import pandas as pd class EndpointWrapper: """Base class for endpoint wrapper The usage of the API requires an API key that can be requested for free at: "https://developer.nrel....
42.594595
79
0.576459
# -*- coding: utf-8 -*- """module containg the API wrapper""" import io import requests import yaml from pysolar import solar import pandas as pd class EndpointWrapper: """Base class for endpoint wrapper The usage of the API requires an API key that can be requested for free at: "https://developer.nrel....
1,418
0
52
5435b2a3fdc22b0749ebfcb7b84af3f0482d7ddf
1,529
py
Python
tests/sentry/api/endpoints/test_organization_api_key_index.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
1
2019-10-17T17:46:16.000Z
2019-10-17T17:46:16.000Z
tests/sentry/api/endpoints/test_organization_api_key_index.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/api/endpoints/test_organization_api_key_index.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.testutils import APITestCase
31.204082
91
0.697842
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.testutils import APITestCase class OrganizationApiKeyIndex(APITestCase): def test_org_admin_can_access(self): self.login_as(user=self.user) organization = self.create_organization(name="foo", owner=s...
1,276
22
103
939740ae11092dcd27714477128b1a74a1d75911
14,070
py
Python
tools/client_mods.py
fadams/emscripten
42fb486c53d627b203b77af6e5d0c088c0ad03ad
[ "MIT" ]
1
2021-06-02T19:42:13.000Z
2021-06-02T19:42:13.000Z
tools/client_mods.py
TheGoozah/emscripten
42fb486c53d627b203b77af6e5d0c088c0ad03ad
[ "MIT" ]
null
null
null
tools/client_mods.py
TheGoozah/emscripten
42fb486c53d627b203b77af6e5d0c088c0ad03ad
[ "MIT" ]
1
2019-10-22T12:25:11.000Z
2019-10-22T12:25:11.000Z
# Handlers handlers = [PreciseF32, Pthreads] # client-side asm code modification
75.240642
229
0.524094
class PreciseF32: name = 'PRECISE_F32 == 2' @staticmethod def get(settings, minified): if settings.PRECISE_F32 == 2: # Potentially-modifiable code, load as text, modify, then execute. This lets you # patch the code on the client machine right before it is executed, perhaps based # on infor...
13,787
129
69
9cca714f558e27cda0fba8243b08966f6db03dee
1,739
py
Python
src/repositioning/rectpack_utils.py
PeterJackNaylor/CellularHeatmaps
52829685683b6f3315b62246a77cc2206326e2b3
[ "Apache-2.0" ]
null
null
null
src/repositioning/rectpack_utils.py
PeterJackNaylor/CellularHeatmaps
52829685683b6f3315b62246a77cc2206326e2b3
[ "Apache-2.0" ]
2
2022-01-13T03:57:02.000Z
2022-03-12T01:01:45.000Z
src/repositioning/rectpack_utils.py
PeterJackNaylor/CellularHeatmaps
52829685683b6f3315b62246a77cc2206326e2b3
[ "Apache-2.0" ]
1
2020-10-12T07:56:51.000Z
2020-10-12T07:56:51.000Z
import skimage as sk import numpy as np from rectpack import newPacker ## not commented
29.474576
79
0.567568
import skimage as sk import numpy as np from rectpack import newPacker ## not commented def get_rectangles(labeled): rect = [] dic = {} cc = sk.measure.regionprops(labeled) for cc_i in sk.measure.regionprops(labeled): x, y, w, h = cc_i.bbox #removing object around dic[cc_i.la...
1,575
0
70
b25c3be4003dde5c47d2c685f495cd4a2be40846
1,306
py
Python
web-app/backend/emotion/main/utils.py
syzroy/4099-Emotion-Analyser
de5b0fc28f97fbe7c55cf50413587fd55ae572ea
[ "MIT" ]
1
2019-09-02T09:18:19.000Z
2019-09-02T09:18:19.000Z
web-app/backend/emotion/main/utils.py
syzroy/4099-Emotion-Analyser
de5b0fc28f97fbe7c55cf50413587fd55ae572ea
[ "MIT" ]
null
null
null
web-app/backend/emotion/main/utils.py
syzroy/4099-Emotion-Analyser
de5b0fc28f97fbe7c55cf50413587fd55ae572ea
[ "MIT" ]
1
2020-03-31T22:48:55.000Z
2020-03-31T22:48:55.000Z
""" Created on Sep 22, 2018 @author: Yizhe Sun """ import os import uuid from werkzeug.utils import secure_filename from redis import Redis from rq import Queue import sqlalchemy as db from .config import ALLOWED_EXTENSIONS, DATABASE_URI # Initialise the task queue for background tasks q = Queue(connection=Redis()...
22.517241
72
0.735069
""" Created on Sep 22, 2018 @author: Yizhe Sun """ import os import uuid from werkzeug.utils import secure_filename from redis import Redis from rq import Queue import sqlalchemy as db from .config import ALLOWED_EXTENSIONS, DATABASE_URI # Initialise the task queue for background tasks q = Queue(connection=Redis()...
370
0
88
2797deca1ca8da22e7f9a8002dd57f085389265e
418
py
Python
src/helpers/config.py
juanmanuelcarrera/parking-butler
c856328660ef1ac5eab735c87d8d8a7e4cbc1a06
[ "MIT" ]
null
null
null
src/helpers/config.py
juanmanuelcarrera/parking-butler
c856328660ef1ac5eab735c87d8d8a7e4cbc1a06
[ "MIT" ]
null
null
null
src/helpers/config.py
juanmanuelcarrera/parking-butler
c856328660ef1ac5eab735c87d8d8a7e4cbc1a06
[ "MIT" ]
null
null
null
import argparse import warnings import json # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-c", "--conf", required=True, help="path to the JSON configuration file") args = vars(ap.parse_args()) # filter warnings, load the configuration and initialize the Dro...
26.125
68
0.760766
import argparse import warnings import json # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-c", "--conf", required=True, help="path to the JSON configuration file") args = vars(ap.parse_args()) # filter warnings, load the configuration and initialize the Dro...
0
0
0
bf109e0c551b87d0b71ffe96454f6c41544ec2c6
13,815
py
Python
acoular/tests/unsupported/validationOfBeamformerFuncsPOSTAcoularIntegration.py
ishine/acoular
4d790517adb38dc012b1f06966262b94f3625358
[ "BSD-3-Clause" ]
294
2015-03-24T09:19:12.000Z
2022-03-11T02:59:11.000Z
acoular/tests/unsupported/validationOfBeamformerFuncsPOSTAcoularIntegration.py
haoshimaster/acoular
3f630abde2ffbe1183aefceba2c4f7faa586656a
[ "BSD-3-Clause" ]
45
2015-11-06T15:15:22.000Z
2022-03-18T07:05:30.000Z
acoular/tests/unsupported/validationOfBeamformerFuncsPOSTAcoularIntegration.py
haoshimaster/acoular
3f630abde2ffbe1183aefceba2c4f7faa586656a
[ "BSD-3-Clause" ]
100
2015-05-05T15:18:57.000Z
2022-03-21T09:48:05.000Z
# -*- coding: utf-8 -*- """ This script is a help for checking if the new NUMBA functions are correctly integrated into acoular. One has to make a savefile (see 'all_bfWeave.sav') for both, the old acoular version an the new one. In section '#%% Compare Weave vs Numba' both versions are compared. This scri...
54.176471
122
0.723127
# -*- coding: utf-8 -*- """ This script is a help for checking if the new NUMBA functions are correctly integrated into acoular. One has to make a savefile (see 'all_bfWeave.sav') for both, the old acoular version an the new one. In section '#%% Compare Weave vs Numba' both versions are compared. This scri...
0
0
0
d2ae69bc034f36afb7b38bac01799b44bd61dd97
152
py
Python
privacy_analytics/templatetags/analytics_tags.py
milesmcc/django-privacy-analytics
f1de9f69a432e0dc2a53fa1d79a87ab8db1ef38a
[ "Apache-2.0" ]
7
2019-09-27T01:24:50.000Z
2021-07-28T01:50:52.000Z
privacy_analytics/templatetags/analytics_tags.py
milesmcc/django-privacy-analytics
f1de9f69a432e0dc2a53fa1d79a87ab8db1ef38a
[ "Apache-2.0" ]
5
2020-05-11T00:48:46.000Z
2022-01-06T22:56:12.000Z
privacy_analytics/templatetags/analytics_tags.py
milesmcc/django-privacy-analytics
f1de9f69a432e0dc2a53fa1d79a87ab8db1ef38a
[ "Apache-2.0" ]
1
2020-05-08T14:10:26.000Z
2020-05-08T14:10:26.000Z
from django import template register = template.Library() @register.filter(name='percent')
21.714286
32
0.723684
from django import template register = template.Library() @register.filter(name='percent') def percent(value, arg=2): return format(value, f'.2%')
38
0
22
9d641f04475017401d9e5d2db08c78113653302f
504
py
Python
wandb/vendor/prompt_toolkit/styles/__init__.py
dreamflasher/client
c8267f1c6b8b6970172d622bb8fbf7cc773d78b2
[ "MIT" ]
6,989
2017-07-18T06:23:18.000Z
2022-03-31T15:58:36.000Z
wandb/vendor/prompt_toolkit/styles/__init__.py
dreamflasher/client
c8267f1c6b8b6970172d622bb8fbf7cc773d78b2
[ "MIT" ]
1,978
2017-07-18T09:17:58.000Z
2022-03-31T14:28:43.000Z
wandb/vendor/prompt_toolkit/styles/__init__.py
dreamflasher/client
c8267f1c6b8b6970172d622bb8fbf7cc773d78b2
[ "MIT" ]
1,228
2017-07-18T09:03:13.000Z
2022-03-29T05:57:40.000Z
""" Styling for prompt_toolkit applications. """ from __future__ import unicode_literals from .base import * from .defaults import * from .from_dict import * from .from_pygments import * from .utils import * #: The default built-in style. #: (For backwards compatibility, when Pygments is installed, this includes the...
22.909091
78
0.769841
""" Styling for prompt_toolkit applications. """ from __future__ import unicode_literals from .base import * from .defaults import * from .from_dict import * from .from_pygments import * from .utils import * #: The default built-in style. #: (For backwards compatibility, when Pygments is installed, this includes the...
0
0
0
31649d15480677618ebc918eff888ce116981683
101
py
Python
paperboy/storage/sqla/models/base.py
chris-aeviator/paperboy
604c912c3530cd37fb07dcf22321d9dde15465ee
[ "Apache-2.0" ]
233
2018-11-01T09:17:08.000Z
2022-03-22T08:27:24.000Z
paperboy/storage/sqla/models/base.py
chris-aeviator/paperboy
604c912c3530cd37fb07dcf22321d9dde15465ee
[ "Apache-2.0" ]
99
2018-10-17T21:48:42.000Z
2021-05-07T08:33:36.000Z
paperboy/storage/sqla/models/base.py
chris-aeviator/paperboy
604c912c3530cd37fb07dcf22321d9dde15465ee
[ "Apache-2.0" ]
29
2018-11-01T11:33:08.000Z
2022-01-12T22:12:19.000Z
from sqlalchemy.ext.declarative import declarative_base # Base sqlalchemy Base = declarative_base()
20.2
55
0.831683
from sqlalchemy.ext.declarative import declarative_base # Base sqlalchemy Base = declarative_base()
0
0
0
0e0936779cc398669e650f09a8ab60fb3932dc26
812
py
Python
ddb/feature/certs/__init__.py
gfi-centre-ouest/docker-devbox-ddb
1597d85ef6e9e8322cce195a454de54186ce9ec7
[ "MIT" ]
4
2020-06-11T20:54:47.000Z
2020-09-22T13:07:17.000Z
ddb/feature/certs/__init__.py
gfi-centre-ouest/docker-devbox-ddb
1597d85ef6e9e8322cce195a454de54186ce9ec7
[ "MIT" ]
113
2019-11-07T00:40:36.000Z
2021-01-18T12:50:16.000Z
ddb/feature/certs/__init__.py
inetum-orleans/docker-devbox-ddb
20c713cf7bfcaf289226a17a9648c17d16003b4d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from typing import Iterable, ClassVar from .actions import GenerateCertAction, RemoveCertAction, GenerateSignerCertificateAction from .schema import CertsSchema from ..feature import Feature from ..schema import FeatureSchema from ...action import Action class CertsFeature(Feature): """ ...
23.2
90
0.657635
# -*- coding: utf-8 -*- from typing import Iterable, ClassVar from .actions import GenerateCertAction, RemoveCertAction, GenerateSignerCertificateAction from .schema import CertsSchema from ..feature import Feature from ..schema import FeatureSchema from ...action import Action class CertsFeature(Feature): """ ...
273
0
104
3d26adc045ecff7837f3edc5c641cba3f07d7b28
884
py
Python
ZeroMQ/filecode/examples/Python/mdclient2.py
JailbreakFox/LightWeightRepository
710dc8cacf934930b8f91b2cfe93cba0f1765094
[ "BSD-2-Clause" ]
1
2021-05-12T12:49:15.000Z
2021-05-12T12:49:15.000Z
ZeroMQ/filecode/examples/Python/mdclient2.py
JailbreakFox/LightWeightRepository
710dc8cacf934930b8f91b2cfe93cba0f1765094
[ "BSD-2-Clause" ]
null
null
null
ZeroMQ/filecode/examples/Python/mdclient2.py
JailbreakFox/LightWeightRepository
710dc8cacf934930b8f91b2cfe93cba0f1765094
[ "BSD-2-Clause" ]
1
2021-11-21T08:12:19.000Z
2021-11-21T08:12:19.000Z
""" Majordomo Protocol client example. Uses the mdcli API to hide all MDP aspects Author : Min RK <benjaminrk@gmail.com> """ import sys from mdcliapi2 import MajorDomoClient if __name__ == '__main__': main()
23.263158
77
0.58371
""" Majordomo Protocol client example. Uses the mdcli API to hide all MDP aspects Author : Min RK <benjaminrk@gmail.com> """ import sys from mdcliapi2 import MajorDomoClient def main(): verbose = '-v' in sys.argv client = MajorDomoClient("tcp://localhost:5555", verbose) requests = 100000 for i in xr...
645
0
23
340bd8e908daf1b4227501dae63234bb8f104c28
76
py
Python
en/002/python/main.py
franciscogomes2020/exercises
8b33c4b9349a9331e4002a8225adc2a482c70024
[ "MIT" ]
null
null
null
en/002/python/main.py
franciscogomes2020/exercises
8b33c4b9349a9331e4002a8225adc2a482c70024
[ "MIT" ]
null
null
null
en/002/python/main.py
franciscogomes2020/exercises
8b33c4b9349a9331e4002a8225adc2a482c70024
[ "MIT" ]
null
null
null
# Make a program that reads a person's name and displays a welcome message.
38
75
0.776316
# Make a program that reads a person's name and displays a welcome message.
0
0
0
434b2838d4b5d030630c2f84bbd4f7ff92b35960
287
py
Python
agents/__init__.py
RobertSamoilescu/RL_CarRacing
c1b4c3bed00fd1630e68f32a02798034df57c73a
[ "MIT" ]
null
null
null
agents/__init__.py
RobertSamoilescu/RL_CarRacing
c1b4c3bed00fd1630e68f32a02798034df57c73a
[ "MIT" ]
null
null
null
agents/__init__.py
RobertSamoilescu/RL_CarRacing
c1b4c3bed00fd1630e68f32a02798034df57c73a
[ "MIT" ]
null
null
null
from . import ppo AGENTS = { "PPO": ppo.PPOAlgo, }
23.916667
69
0.658537
from . import ppo AGENTS = { "PPO": ppo.PPOAlgo, } def get_agent(cfg, envs, acmodel, agent_data, **kwargs): assert hasattr(cfg, "name") and cfg.name in AGENTS,\ "Please provide a valid Agent name." return AGENTS[cfg.name](cfg, envs, acmodel, agent_data, **kwargs)
207
0
23
b1a308d0e6300ba0b686d9f9e4a380145b4d49c3
3,482
py
Python
modules/packages/models/package_progress.py
heolin123/funcrowd
20167783de208394c09ed0429a5f02ec6dd79c42
[ "MIT" ]
null
null
null
modules/packages/models/package_progress.py
heolin123/funcrowd
20167783de208394c09ed0429a5f02ec6dd79c42
[ "MIT" ]
11
2019-11-12T23:26:45.000Z
2021-06-10T17:37:23.000Z
modules/packages/models/package_progress.py
heolin123/funcrowd
20167783de208394c09ed0429a5f02ec6dd79c42
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from typing import Optional from django.apps import apps from django.db import models from modules.packages.consts import UserPackageStatus, USER_PACKAGE_STATUSES from modules.packages.models.utils import get_reward_token from users.models.end_workers ...
32.542056
88
0.643021
# -*- coding: utf-8 -*- from __future__ import unicode_literals from typing import Optional from django.apps import apps from django.db import models from modules.packages.consts import UserPackageStatus, USER_PACKAGE_STATUSES from modules.packages.models.utils import get_reward_token from users.models.end_workers ...
122
0
53
b158d445d96aa69598d9339ae15e06072dc20d02
11,495
py
Python
tests/server/test_pipeline.py
DiamondLightSource/SuRVoS2
42bacfb6a5cc267f38ca1337e51a443eae1a9d2b
[ "MIT" ]
4
2017-10-10T14:47:16.000Z
2022-01-14T05:57:50.000Z
tests/server/test_pipeline.py
DiamondLightSource/SuRVoS2
42bacfb6a5cc267f38ca1337e51a443eae1a9d2b
[ "MIT" ]
1
2022-01-11T21:11:12.000Z
2022-01-12T08:22:34.000Z
tests/server/test_pipeline.py
DiamondLightSource/SuRVoS2
42bacfb6a5cc267f38ca1337e51a443eae1a9d2b
[ "MIT" ]
2
2018-03-06T06:31:29.000Z
2019-03-04T03:33:18.000Z
import os import h5py import numpy as np import pytest from torch.testing import assert_allclose from loguru import logger from skimage.data import binary_blobs import survos import survos2.frontend.control from survos2.frontend.control import Launcher from survos2.entity.pipeline import Patch import survos2.fronten...
33.031609
87
0.559113
import os import h5py import numpy as np import pytest from torch.testing import assert_allclose from loguru import logger from skimage.data import binary_blobs import survos import survos2.frontend.control from survos2.frontend.control import Launcher from survos2.entity.pipeline import Patch import survos2.fronten...
7,017
-1
125
3aa21e24712a069ba32436e7ab15d7fe21bfae02
1,102
py
Python
examples/hex_variation.py
danoneata/pydiagrams
aae37e7b37ad973e5ac05cbd3078acd5f3d67662
[ "MIT" ]
null
null
null
examples/hex_variation.py
danoneata/pydiagrams
aae37e7b37ad973e5ac05cbd3078acd5f3d67662
[ "MIT" ]
null
null
null
examples/hex_variation.py
danoneata/pydiagrams
aae37e7b37ad973e5ac05cbd3078acd5f3d67662
[ "MIT" ]
null
null
null
import math import random from itertools import product from chalk import * random.seed(1337) h = math.sqrt(3) / 2 h1 = math.cos(math.pi / 3) dia = hex_variation(12).line_width(0.02).rotate_by(1 / 4) dia.render("examples/output/hex-variation.png", height=512) dia.render_svg("examples/output/hex-variation.sv...
22.489796
79
0.62069
import math import random from itertools import product from chalk import * random.seed(1337) h = math.sqrt(3) / 2 h1 = math.cos(math.pi / 3) def hexagon_tile(): arc1 = arc(0.5, -math.pi / 3, math.pi / 3) return ( arc1.translate(-1, 0) + vrule(2 * h) + arc1.rotate_by(1 / 2).trans...
674
0
92
0f41fcca594cde4bea6054e0fb361166b60f9ef2
5,736
py
Python
restkit/tee.py
gelnior/restkit
6a8507afde15d576318ce24134016511b5e14331
[ "MIT" ]
null
null
null
restkit/tee.py
gelnior/restkit
6a8507afde15d576318ce24134016511b5e14331
[ "MIT" ]
null
null
null
restkit/tee.py
gelnior/restkit
6a8507afde15d576318ce24134016511b5e14331
[ "MIT" ]
1
2019-04-28T11:04:14.000Z
2019-04-28T11:04:14.000Z
# -*- coding: utf-8 - # # This file is part of restkit released under the MIT license. # See the NOTICE for more information. """ TeeInput replace old FileInput. It use a file if size > MAX_BODY or memory. It's now possible to rewind read or restart etc ... It's based on TeeInput from Gunicorn. """ import copy impor...
26.43318
62
0.529114
# -*- coding: utf-8 - # # This file is part of restkit released under the MIT license. # See the NOTICE for more information. """ TeeInput replace old FileInput. It use a file if size > MAX_BODY or memory. It's now possible to rewind read or restart etc ... It's based on TeeInput from Gunicorn. """ import copy impor...
2,744
2,498
46
06d2fa4c56be71f6ae3666f53cd2c7a0b628410a
2,187
py
Python
facturador/stock/migrations/0001_initial.py
crodriguezud/Facturador
1a1e08072ae1d54f3f7963cdd202444618a0fa2e
[ "Apache-2.0" ]
null
null
null
facturador/stock/migrations/0001_initial.py
crodriguezud/Facturador
1a1e08072ae1d54f3f7963cdd202444618a0fa2e
[ "Apache-2.0" ]
9
2020-06-05T17:25:18.000Z
2022-03-11T23:15:36.000Z
facturador/stock/migrations/0001_initial.py
crodriguezud/Facturador
1a1e08072ae1d54f3f7963cdd202444618a0fa2e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-10-18 02:51 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
35.852459
114
0.565615
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-10-18 02:51 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
0
1,975
23
727938e2377b0190e840295ad04a019d8a40f2ca
1,158
py
Python
logging/example_1.py
Adeon18/Youtube_templates
7743c7997ff5cb799479060a5e28c55c8683c0ab
[ "MIT" ]
2
2021-06-13T04:42:31.000Z
2022-02-15T11:21:30.000Z
logging/example_1.py
Adeon18/Youtube_templates
7743c7997ff5cb799479060a5e28c55c8683c0ab
[ "MIT" ]
null
null
null
logging/example_1.py
Adeon18/Youtube_templates
7743c7997ff5cb799479060a5e28c55c8683c0ab
[ "MIT" ]
4
2022-01-21T14:57:03.000Z
2022-02-22T15:56:18.000Z
""" Example 1 of logging usage """ import logging logging.basicConfig(filename="logs.log", filemode="w", level=logging.DEBUG) def process1(): """ Process 1, okay? """ logging.info("Process 1 is complete...") return def process2(): """ Process 2, okay? """ logging.info("Process 2 i...
24.125
109
0.587219
""" Example 1 of logging usage """ import logging logging.basicConfig(filename="logs.log", filemode="w", level=logging.DEBUG) def process1(): """ Process 1, okay? """ logging.info("Process 1 is complete...") return def process2(): """ Process 2, okay? """ logging.info("Process 2 i...
0
0
0
54be46a1b64278806802c13adc0ae2773bade670
3,426
py
Python
src/collectors/kafka_consumer_lag/test/testkafka_consumer_lag.py
hermdog/Diamond
0f3eb04327d6d3ed5e53a9967d6c9d2c09714a47
[ "MIT" ]
1,795
2015-01-05T11:14:55.000Z
2022-03-25T12:07:15.000Z
src/collectors/kafka_consumer_lag/test/testkafka_consumer_lag.py
hermdog/Diamond
0f3eb04327d6d3ed5e53a9967d6c9d2c09714a47
[ "MIT" ]
671
2015-01-02T05:57:27.000Z
2022-03-29T22:39:05.000Z
src/collectors/kafka_consumer_lag/test/testkafka_consumer_lag.py
hermdog/Diamond
0f3eb04327d6d3ed5e53a9967d6c9d2c09714a47
[ "MIT" ]
793
2015-01-03T01:39:02.000Z
2022-02-18T05:12:27.000Z
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from mock import patch, Mock from diamond.collector import Collector from kafka_consumer_lag import KafkaConsumerLagCollector ##########...
36.446809
79
0.60829
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from mock import patch, Mock from diamond.collector import Collector from kafka_consumer_lag import KafkaConsumerLagCollector ##########...
2,794
223
23
d3faec563d67b070235463605ad4839ea763f4f9
2,964
py
Python
PyPoll/PyPoll - main.py
bigbluey/HW-3-Python
a561a964936fd491f024faedd5cfe73ae0673421
[ "MIT" ]
null
null
null
PyPoll/PyPoll - main.py
bigbluey/HW-3-Python
a561a964936fd491f024faedd5cfe73ae0673421
[ "MIT" ]
null
null
null
PyPoll/PyPoll - main.py
bigbluey/HW-3-Python
a561a964936fd491f024faedd5cfe73ae0673421
[ "MIT" ]
4
2020-03-26T00:58:26.000Z
2021-03-20T16:54:51.000Z
# Unit 3 | Assignment - Py Me Up, Charlie (PyPoll) # Import Modules/Dependencies import os import csv # Variables total_votes = 0 khan_votes = 0 correy_votes = 0 li_votes = 0 otooley_votes = 0 # Set Path For File csvpath = os.path.join('.', 'PyPoll', 'Resources', 'election_data.csv') # Open & Read CSV File with ope...
32.933333
84
0.601552
# Unit 3 | Assignment - Py Me Up, Charlie (PyPoll) # Import Modules/Dependencies import os import csv # Variables total_votes = 0 khan_votes = 0 correy_votes = 0 li_votes = 0 otooley_votes = 0 # Set Path For File csvpath = os.path.join('.', 'PyPoll', 'Resources', 'election_data.csv') # Open & Read CSV File with ope...
0
0
0
dbf3d8a40c5c82b896ece9454b8cd8a0a454e1d4
741
py
Python
example.py
LuneZ99/aircv
00a54939d9082f106cf3d9521d19d423a001f710
[ "MIT" ]
null
null
null
example.py
LuneZ99/aircv
00a54939d9082f106cf3d9521d19d423a001f710
[ "MIT" ]
null
null
null
example.py
LuneZ99/aircv
00a54939d9082f106cf3d9521d19d423a001f710
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Author: hzsunshx # Created: 2015-03-23 14:42 """ sift """ import aircv as ac if __name__ == '__main__': # sift_test() # tmpl_test()
20.027027
108
0.605938
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Author: hzsunshx # Created: 2015-03-23 14:42 """ sift """ import aircv as ac def sift_test(): t1 = ac.imread("testdata/1s.png") t2 = ac.imread("testdata/2s.png") print(ac.sift_count(t1), ac.sift_count(t2)) result = ac.find_sift(t1, t2, min_match_co...
498
0
46
919e86283caab7ca91a759c0ce531a5b70fb2fa8
2,821
py
Python
platonpm/_utils/chains.py
shinnng/platon.py
3197fac3839896290210da04dd0d45f0bdc731ce
[ "MIT" ]
null
null
null
platonpm/_utils/chains.py
shinnng/platon.py
3197fac3839896290210da04dd0d45f0bdc731ce
[ "MIT" ]
null
null
null
platonpm/_utils/chains.py
shinnng/platon.py
3197fac3839896290210da04dd0d45f0bdc731ce
[ "MIT" ]
null
null
null
import re from typing import ( TYPE_CHECKING, Any, Tuple, ) from urllib import ( parse, ) from platon_typing import ( URI, BlockNumber, HexStr, ) from platon_utils import ( add_0x_prefix, is_integer, remove_0x_prefix, ) from hexbytes import ( HexBytes, ) from platonpm.const...
24.318966
97
0.661822
import re from typing import ( TYPE_CHECKING, Any, Tuple, ) from urllib import ( parse, ) from platon_typing import ( URI, BlockNumber, HexStr, ) from platon_utils import ( add_0x_prefix, is_integer, remove_0x_prefix, ) from hexbytes import ( HexBytes, ) from platonpm.const...
1,076
0
161
03ceb0b6e019ecba5d6a23be7dd791e978329e4a
513
py
Python
terrascript/resource/vmware/vmc.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/resource/vmware/vmc.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/resource/vmware/vmc.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/resource/vmware/vmc.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:30:35 UTC) import terrascript __all__ = [ "vmc_cluster", "vmc_public_ip", "vmc_sddc", "vmc_site_recovery", "vmc_srm_node", ]
15.545455
73
0.727096
# terrascript/resource/vmware/vmc.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:30:35 UTC) import terrascript class vmc_cluster(terrascript.Resource): pass class vmc_public_ip(terrascript.Resource): pass class vmc_sddc(terrascript.Resource): pass class vmc_site_recovery(terrascri...
0
146
115
f01e331f4e61c9d3c7700f80a2d47be855d796ce
8,512
py
Python
frugy/cli.py
MicroTCA-Tech-Lab/frugy
a83ce6f7850d4babfd6d89d5284a93ea252dd647
[ "BSD-3-Clause" ]
2
2022-03-30T10:03:57.000Z
2022-03-31T09:54:33.000Z
frugy/cli.py
MicroTCA-Tech-Lab/frugy
a83ce6f7850d4babfd6d89d5284a93ea252dd647
[ "BSD-3-Clause" ]
null
null
null
frugy/cli.py
MicroTCA-Tech-Lab/frugy
a83ce6f7850d4babfd6d89d5284a93ea252dd647
[ "BSD-3-Clause" ]
2
2020-09-14T01:40:00.000Z
2021-03-26T09:39:59.000Z
########################################################################### # ____ _____________ __ __ __ _ _____ ___ _ # # / __ \/ ____/ ___/\ \/ / | \/ (_)__ _ _ __|_ _/ __| /_\ (R) # # / / / / __/ \__ \ \ / | |\/| | / _| '_/ _ \| || (__ / _ \ # # / /_/ / /___...
35.915612
115
0.492951
########################################################################### # ____ _____________ __ __ __ _ _____ ___ _ # # / __ \/ ____/ ___/\ \/ / | \/ (_)__ _ _ __|_ _/ __| /_\ (R) # # / / / / __/ \__ \ \ / | |\/| | / _| '_/ _ \| || (__ / _ \ # # / /_/ / /___...
7,155
0
115
832ccfa9b0a05ad9848d788ce21e677fccac394a
4,846
py
Python
tests/tasks/test_ietf.py
kellerza/data-playbook
382c369505a5cb0c28bd786ebdda51c05417165c
[ "Apache-2.0" ]
3
2018-07-06T08:34:46.000Z
2021-05-27T23:29:04.000Z
tests/tasks/test_ietf.py
kellerza/data-playbook
382c369505a5cb0c28bd786ebdda51c05417165c
[ "Apache-2.0" ]
null
null
null
tests/tasks/test_ietf.py
kellerza/data-playbook
382c369505a5cb0c28bd786ebdda51c05417165c
[ "Apache-2.0" ]
null
null
null
"""Tests for ietf.py""" from pathlib import Path from dataplaybook.const import ATable import dataplaybook.tasks.ietf as ietf def test_extract_standards(): """Test starting from string.""" txt = "IEEE 802.3ah" std = list(ietf.extract_standards(txt)) assert std == ["IEEE 802.3ah"] txt = "draft-i...
29.017964
87
0.596574
"""Tests for ietf.py""" from pathlib import Path from dataplaybook.const import ATable import dataplaybook.tasks.ietf as ietf def test_extract_standards(): """Test starting from string.""" txt = "IEEE 802.3ah" std = list(ietf.extract_standards(txt)) assert std == ["IEEE 802.3ah"] txt = "draft-i...
0
0
0