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
841500952b93f537e08fe02a7b887c918465fe6f
334
py
Python
pinauth/demo/models.py
jtiai/pinauth
f84d068c366f5a63e4ce4da3936d4c0577cb0da8
[ "BSD-2-Clause" ]
null
null
null
pinauth/demo/models.py
jtiai/pinauth
f84d068c366f5a63e4ce4da3936d4c0577cb0da8
[ "BSD-2-Clause" ]
null
null
null
pinauth/demo/models.py
jtiai/pinauth
f84d068c366f5a63e4ce4da3936d4c0577cb0da8
[ "BSD-2-Clause" ]
null
null
null
from django.conf import settings from django.db import models import pyotp class UserPSK(models.Model): """Strores custom secret key per user""" user = models.OneToOneField(settings.AUTH_USER_MODEL, related_name='psk', on_delete=models.CASCADE) secret_key = models.CharField(max_length=16, default=pyotp.r...
30.363636
103
0.778443
from django.conf import settings from django.db import models import pyotp class UserPSK(models.Model): """Strores custom secret key per user""" user = models.OneToOneField(settings.AUTH_USER_MODEL, related_name='psk', on_delete=models.CASCADE) secret_key = models.CharField(max_length=16, default=pyotp.r...
0
0
0
daa49ffdbfcd4ecb29504c0653edf67087038404
39,897
py
Python
sunspec2/tests/test_modbus_client.py
geofragkos/RBAC_Centralized
e1501e9437ef9f5712d802c2e680561d1a5a86ac
[ "Apache-2.0" ]
null
null
null
sunspec2/tests/test_modbus_client.py
geofragkos/RBAC_Centralized
e1501e9437ef9f5712d802c2e680561d1a5a86ac
[ "Apache-2.0" ]
null
null
null
sunspec2/tests/test_modbus_client.py
geofragkos/RBAC_Centralized
e1501e9437ef9f5712d802c2e680561d1a5a86ac
[ "Apache-2.0" ]
null
null
null
import sunspec2.modbus.client as client import pytest import socket import sunspec2.tests.mock_socket as MockSocket import serial import sunspec2.tests.mock_port as MockPort if __name__ == "__main__": pass
54.504098
120
0.559491
import sunspec2.modbus.client as client import pytest import socket import sunspec2.tests.mock_socket as MockSocket import serial import sunspec2.tests.mock_port as MockPort class TestSunSpecModbusClientPoint: def test_read(self, monkeypatch): monkeypatch.setattr(socket, 'socket', MockSocket.mock_socket) ...
38,805
93
780
63d1e648c07ea50bbe78568f68efbb6c5cf12e1d
5,365
py
Python
frag_pele/Helpers/find_dihedrals.py
danielSoler93/FrAG_PELE
0203d8caf51400d2cd4961281c3cc497441ff6fb
[ "MIT" ]
26
2019-05-17T08:21:23.000Z
2022-03-17T22:27:30.000Z
frag_pele/Helpers/find_dihedrals.py
nostrumbiodiscovery/frag_pele
2809c071afa18322613d8432ab271cdf13739883
[ "MIT" ]
37
2019-09-04T08:47:51.000Z
2021-07-13T12:57:23.000Z
frag_pele/Helpers/find_dihedrals.py
nostrumbiodiscovery/frag_pele
2809c071afa18322613d8432ab271cdf13739883
[ "MIT" ]
9
2019-05-17T08:04:32.000Z
2021-04-07T03:54:53.000Z
import os import glob import numpy as np import networkx as nx import peleffy from frag_pele.constants import SCHRODINGER from peleffy.topology import Topology from peleffy.forcefield import OpenForceField, OPLS2005ForceField from peleffy.topology import Molecule from peleffy.utils import Logger from peleffy.topology i...
38.876812
114
0.660205
import os import glob import numpy as np import networkx as nx import peleffy from frag_pele.constants import SCHRODINGER from peleffy.topology import Topology from peleffy.forcefield import OpenForceField, OPLS2005ForceField from peleffy.topology import Molecule from peleffy.utils import Logger from peleffy.topology i...
1,759
0
108
5d7041b6db70633f288345561f480d112b593353
5,715
py
Python
tests/unit/lib/utils/test_handler_observer.py
zhuhaow/aws-sam-cli
59d82ec6848b5a0cdd544d8ada838d4d34052971
[ "Apache-2.0" ]
2,959
2018-05-08T21:48:56.000Z
2020-08-24T14:35:39.000Z
tests/unit/lib/utils/test_handler_observer.py
zhuhaow/aws-sam-cli
59d82ec6848b5a0cdd544d8ada838d4d34052971
[ "Apache-2.0" ]
1,469
2018-05-08T22:44:28.000Z
2020-08-24T20:19:24.000Z
tests/unit/lib/utils/test_handler_observer.py
zhuhaow/aws-sam-cli
59d82ec6848b5a0cdd544d8ada838d4d34052971
[ "Apache-2.0" ]
642
2018-05-08T22:09:19.000Z
2020-08-17T09:04:37.000Z
import re from unittest.case import TestCase from unittest.mock import MagicMock, patch, ANY from samcli.lib.utils.path_observer import HandlerObserver, PathHandler, StaticFolderWrapper
39.143836
107
0.707962
import re from unittest.case import TestCase from unittest.mock import MagicMock, patch, ANY from samcli.lib.utils.path_observer import HandlerObserver, PathHandler, StaticFolderWrapper class TestPathHandler(TestCase): def test_init(self): handler_mock = MagicMock() path_mock = MagicMock() ...
4,914
517
95
a2f1769aaf31e2b6656d870ee3954314a4c10aea
9,533
py
Python
brocade-ssh.py
IBM/ibm-qradar-brocade
6df41d74e23f3018fedcacd8f7d73a38a579a9ac
[ "Apache-2.0" ]
null
null
null
brocade-ssh.py
IBM/ibm-qradar-brocade
6df41d74e23f3018fedcacd8f7d73a38a579a9ac
[ "Apache-2.0" ]
null
null
null
brocade-ssh.py
IBM/ibm-qradar-brocade
6df41d74e23f3018fedcacd8f7d73a38a579a9ac
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # # Copyright IBM Corp. 2016 All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
21.864679
92
0.634323
#!/usr/bin/env python3 # # Copyright IBM Corp. 2016 All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
631
0
72
5319787bd12168d5330cd1dd212c418d6ab71ea1
10,023
py
Python
contextily/plotting.py
martinfleis/contextily
fc00861c9756821f62de27bb06ef6771abc517d6
[ "BSD-3-Clause" ]
182
2020-04-08T15:56:50.000Z
2022-03-24T15:02:19.000Z
contextily/plotting.py
martinfleis/contextily
fc00861c9756821f62de27bb06ef6771abc517d6
[ "BSD-3-Clause" ]
66
2020-04-09T06:23:50.000Z
2022-02-20T19:04:38.000Z
contextily/plotting.py
martinfleis/contextily
fc00861c9756821f62de27bb06ef6771abc517d6
[ "BSD-3-Clause" ]
28
2020-04-08T12:53:44.000Z
2021-12-18T01:05:58.000Z
"""Tools to plot basemaps""" import warnings import numpy as np from . import providers from xyzservices import TileProvider from .tile import bounds2img, _sm2ll, warp_tiles, _warper from rasterio.enums import Resampling from rasterio.warp import transform_bounds from matplotlib import patheffects from matplotlib.pypl...
34.681661
128
0.594632
"""Tools to plot basemaps""" import warnings import numpy as np from . import providers from xyzservices import TileProvider from .tile import bounds2img, _sm2ll, warp_tiles, _warper from rasterio.enums import Resampling from rasterio.warp import transform_bounds from matplotlib import patheffects from matplotlib.pypl...
146
0
23
55f1899331577c5bb1215c2698fc08ac300abe62
6,356
py
Python
code/utils/math_graph.py
ytin16/STGCN-keras
055f33023bd0dda3090ad3dd61d8e967a3692907
[ "MIT" ]
32
2020-02-26T12:56:32.000Z
2022-03-21T13:04:55.000Z
code/utils/math_graph.py
ytin16/STGCN-keras
055f33023bd0dda3090ad3dd61d8e967a3692907
[ "MIT" ]
1
2020-07-14T04:32:26.000Z
2020-08-02T07:05:17.000Z
code/utils/math_graph.py
ytin16/STGCN-keras
055f33023bd0dda3090ad3dd61d8e967a3692907
[ "MIT" ]
13
2020-08-04T08:44:02.000Z
2022-02-21T08:36:31.000Z
# -*- coding: utf-8 -*-# ''' # Name: math_graph # Description: # Author: neu # Date: 2020/7/28 ''' import numpy as np import pandas as pd from scipy.sparse.linalg import eigs import scipy.sparse as sp from scipy.sparse.linalg.eigen.arpack import eigsh, ArpackNoConvergence def weight_matrix(f...
31.156863
107
0.609346
# -*- coding: utf-8 -*-# ''' # Name: math_graph # Description: # Author: neu # Date: 2020/7/28 ''' import numpy as np import pandas as pd from scipy.sparse.linalg import eigs import scipy.sparse as sp from scipy.sparse.linalg.eigen.arpack import eigsh, ArpackNoConvergence def weight_matrix(f...
2,517
0
110
b202aa1277601365717ffb75ffe7653c293e80ad
4,454
py
Python
demos/emotion_transfer/missing_data.py
mathurinm/torch_itl
e3d92d753bd51ccf585029129110c93bbf9b5fd0
[ "MIT" ]
null
null
null
demos/emotion_transfer/missing_data.py
mathurinm/torch_itl
e3d92d753bd51ccf585029129110c93bbf9b5fd0
[ "MIT" ]
null
null
null
demos/emotion_transfer/missing_data.py
mathurinm/torch_itl
e3d92d753bd51ccf585029129110c93bbf9b5fd0
[ "MIT" ]
null
null
null
# This script illustrates the stability of learning vITL # for emotion transfer in the presence of missing data # Runtime ~1h on laptop # ---------------------------------- # Imports # ---------------------------------- import os import torch import matplotlib.pyplot as plt import sys import importlib if importlib.uti...
36.211382
97
0.656713
# This script illustrates the stability of learning vITL # for emotion transfer in the presence of missing data # Runtime ~1h on laptop # ---------------------------------- # Imports # ---------------------------------- import os import torch import matplotlib.pyplot as plt import sys import importlib if importlib.uti...
0
0
0
0db29654cc31afa1db743481460a2490c2bc30e4
293
py
Python
frappe/integration_broker/doctype/integration_service/test_integration_service.py
badili/frappe
8177d7e745f511fcc4da50fed9e291a58172a613
[ "MIT" ]
null
null
null
frappe/integration_broker/doctype/integration_service/test_integration_service.py
badili/frappe
8177d7e745f511fcc4da50fed9e291a58172a613
[ "MIT" ]
null
null
null
frappe/integration_broker/doctype/integration_service/test_integration_service.py
badili/frappe
8177d7e745f511fcc4da50fed9e291a58172a613
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest # test_records = frappe.get_test_records('Integration Service')
22.538462
63
0.788396
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest # test_records = frappe.get_test_records('Integration Service') class TestIntegrationService(unittest.TestCase): pass
0
33
23
6acd30c910e000241963b44f2b671c682200da94
2,997
py
Python
api_1.2/containerd/events/content_pb2.py
siemens/pycontainerd
9b1184ecbcc91144ad6903403818b5b8989a32f3
[ "Apache-2.0" ]
24
2019-12-16T12:38:51.000Z
2022-02-16T18:44:20.000Z
api_1.2/containerd/events/content_pb2.py
siemens/pycontainerd
9b1184ecbcc91144ad6903403818b5b8989a32f3
[ "Apache-2.0" ]
9
2020-03-03T07:42:40.000Z
2021-09-01T10:11:18.000Z
api_1.4/containerd/events/content_pb2.py
siemens/pycontainerd
9b1184ecbcc91144ad6903403818b5b8989a32f3
[ "Apache-2.0" ]
10
2019-12-16T11:20:23.000Z
2022-01-24T01:53:13.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: containerd/events/content.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection f...
39.434211
409
0.797798
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: containerd/events/content.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection f...
0
0
0
bde9c13c3f3cd04175f01be8067a6fc020128c14
1,858
py
Python
embeded_img_processing.py
disanda/MSV
066ed236a4c5df8b4b5e366020fe2954b7a6915a
[ "Apache-2.0", "MIT" ]
31
2021-08-21T10:05:26.000Z
2021-12-22T12:36:46.000Z
embeded_img_processing.py
disanda/MSV
066ed236a4c5df8b4b5e366020fe2954b7a6915a
[ "Apache-2.0", "MIT" ]
null
null
null
embeded_img_processing.py
disanda/MSV
066ed236a4c5df8b4b5e366020fe2954b7a6915a
[ "Apache-2.0", "MIT" ]
6
2021-08-21T10:05:38.000Z
2021-12-10T14:11:27.000Z
#Embedded_ImageProcessing, Just for StyleGAN_v1 FFHQ import numpy as np import math import torch import torchvision import model.E.E_Blur as BE from model.stylegan1.net import Generator, Mapping #StyleGANv1 #Params use_gpu = False device = torch.device("cuda" if use_gpu else "cpu") img_size = 1024 GAN_path = './checkp...
39.531915
116
0.74704
#Embedded_ImageProcessing, Just for StyleGAN_v1 FFHQ import numpy as np import math import torch import torchvision import model.E.E_Blur as BE from model.stylegan1.net import Generator, Mapping #StyleGANv1 #Params use_gpu = False device = torch.device("cuda" if use_gpu else "cpu") img_size = 1024 GAN_path = './checkp...
0
0
0
edbac87d22696c5f1f737f4d1358a21a6926a523
373
py
Python
board/urls.py
suomiy/message-board
0ad469c618acabfed872e3fb2ccb1ab21512bd47
[ "MIT" ]
null
null
null
board/urls.py
suomiy/message-board
0ad469c618acabfed872e3fb2ccb1ab21512bd47
[ "MIT" ]
null
null
null
board/urls.py
suomiy/message-board
0ad469c618acabfed872e3fb2ccb1ab21512bd47
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views from board.views import PostDelete urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^login/$', views.login, name='login'), url(r'^logout/$', views.logout, name='logout'), url(r'^register/$', views.register, name='register'), url(r'^delete/(...
31.083333
66
0.651475
from django.conf.urls import url from . import views from board.views import PostDelete urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^login/$', views.login, name='login'), url(r'^logout/$', views.logout, name='logout'), url(r'^register/$', views.register, name='register'), url(r'^delete/(...
0
0
0
59146e826514dfd29d5834e02f858113ef763390
555
py
Python
app/planes/jet_gx_plane.py
egenerat/gae-django
f12379483cf3917ed3cb46ca5ff0b94daf89fc50
[ "MIT" ]
3
2016-07-08T23:49:32.000Z
2018-04-15T22:55:01.000Z
app/planes/jet_gx_plane.py
egenerat/gae-django
f12379483cf3917ed3cb46ca5ff0b94daf89fc50
[ "MIT" ]
27
2017-02-05T15:57:04.000Z
2018-04-15T22:57:26.000Z
app/planes/jet_gx_plane.py
egenerat/gae-django
f12379483cf3917ed3cb46ca5ff0b94daf89fc50
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from app.common.target_urls import SHOP_GX_ID from app.planes.jet_plane import JetPlane
25.227273
51
0.695495
# -*- coding: utf-8 -*- from app.common.target_urls import SHOP_GX_ID from app.planes.jet_plane import JetPlane class JetGXPlane(JetPlane): engines_nb = 2 consumption_per_hour = 2014 fuel_capacity = 25382 minimum_kerosene_before_mission = fuel_capacity # 7 (max hours one way) * speed * 2 (2 ways)...
59
360
23
d51a4194265a656c05b009484ed30285707f4645
1,038
py
Python
answer/models.py
Jonas1015/codingpride
0418186ee55456cb7035f3afd50120116746f8d7
[ "MIT" ]
1
2021-01-24T18:22:55.000Z
2021-01-24T18:22:55.000Z
answer/models.py
CodingPridePlatform/codingpride
0418186ee55456cb7035f3afd50120116746f8d7
[ "MIT" ]
16
2021-01-24T18:58:46.000Z
2021-05-01T11:02:46.000Z
answer/models.py
Jonas1015/codingpride
0418186ee55456cb7035f3afd50120116746f8d7
[ "MIT" ]
8
2021-01-19T18:56:56.000Z
2021-02-01T11:36:33.000Z
from uuid import uuid4 from ckeditor_uploader.fields import RichTextUploadingField from django.conf import settings from django.db import models from question.models import * User = settings.AUTH_USER_MODEL
32.4375
76
0.688825
from uuid import uuid4 from ckeditor_uploader.fields import RichTextUploadingField from django.conf import settings from django.db import models from question.models import * User = settings.AUTH_USER_MODEL class Answer(models.Model): question = models.ForeignKey( Question, related_name='answers', on_d...
227
577
23
6c7b67d4465a0cf6e9ace534ff92c738613c1ec5
532
py
Python
Task/FizzBuzz/Python/fizzbuzz-7.py
djgoku/RosettaCodeData
91df62d46142e921b3eacdb52b0316c39ee236bc
[ "Info-ZIP" ]
null
null
null
Task/FizzBuzz/Python/fizzbuzz-7.py
djgoku/RosettaCodeData
91df62d46142e921b3eacdb52b0316c39ee236bc
[ "Info-ZIP" ]
null
null
null
Task/FizzBuzz/Python/fizzbuzz-7.py
djgoku/RosettaCodeData
91df62d46142e921b3eacdb52b0316c39ee236bc
[ "Info-ZIP" ]
null
null
null
>>> ' '.join(''.join(''.join(['' if i%3 else 'F', '' if i%5 else 'B']) or str('00')) for i in range(1,16)) '00 00 F 00 B F 00 00 F B 00 F 00 00 FB' >>> _ '00 00 F 00 B F 00 00 F B 00 F 00 00 FB' >>> _.replace('FB','11').replace('F',...
35.466667
90
0.415414
>>> ' '.join(''.join(''.join(['' if i%3 else 'F', '' if i%5 else 'B']) or str('00')) for i in range(1,16)) '00 00 F 00 B F 00 00 F B 00 F 00 00 FB' >>> _ '00 00 F 00 B F 00 00 F B 00 F 00 00 FB' >>> _.replace('FB','11').replace('F',...
0
0
0
2cd1a279b7cf7df392db12b7769200319e3e1dbe
1,534
py
Python
demo/demo.py
derkan/flask-locale
f94e1bb6bcbd658f1c729ec6de58a8a4f5afd86d
[ "BSD-3-Clause" ]
46
2015-10-09T14:42:41.000Z
2021-11-16T12:44:33.000Z
demo/demo.py
derkan/flask-locale
f94e1bb6bcbd658f1c729ec6de58a8a4f5afd86d
[ "BSD-3-Clause" ]
3
2018-02-05T21:22:26.000Z
2021-10-20T14:24:24.000Z
demo/demo.py
derkan/flask-locale
f94e1bb6bcbd658f1c729ec6de58a8a4f5afd86d
[ "BSD-3-Clause" ]
6
2017-02-24T06:51:37.000Z
2020-09-21T08:55:04.000Z
# -*- coding: utf-8 -*- from flask import Flask, request, render_template, g, session, redirect, current_app from flask_locale import Locale, _ app = Flask(__name__) # DEFAULT_LOCALE is the language used for keys ins translation files: app.config['DEFAULT_LOCALE'] = 'tr_TR' app.config['LOCALE_PATH'] = 'translations' ...
31.306122
98
0.702086
# -*- coding: utf-8 -*- from flask import Flask, request, render_template, g, session, redirect, current_app from flask_locale import Locale, _ app = Flask(__name__) # DEFAULT_LOCALE is the language used for keys ins translation files: app.config['DEFAULT_LOCALE'] = 'tr_TR' app.config['LOCALE_PATH'] = 'translations' ...
960
0
66
3c33d204c42708208bd9e270753c1a0f71dfe90d
13,017
py
Python
models/model/seq2seq_nl_with_frames.py
Chucooleg/alfred
250cdc8b1e75dd6acb9e20d3c616beec63307a46
[ "MIT" ]
1
2021-07-19T01:58:51.000Z
2021-07-19T01:58:51.000Z
models/model/seq2seq_nl_with_frames.py
Chucooleg/alfred
250cdc8b1e75dd6acb9e20d3c616beec63307a46
[ "MIT" ]
null
null
null
models/model/seq2seq_nl_with_frames.py
Chucooleg/alfred
250cdc8b1e75dd6acb9e20d3c616beec63307a46
[ "MIT" ]
null
null
null
import os import torch import numpy as np import nn.vnn as vnn import collections from torch import nn from torch.nn import functional as F from torch.nn.utils.rnn import pad_sequence, pack_padded_sequence, pad_packed_sequence from model.seq2seq import Module as Base from models.utils.metric import compute_f1, compute_...
40.30031
178
0.571791
import os import torch import numpy as np import nn.vnn as vnn import collections from torch import nn from torch.nn import functional as F from torch.nn.utils.rnn import pad_sequence, pack_padded_sequence, pad_packed_sequence from model.seq2seq import Module as Base from models.utils.metric import compute_f1, compute_...
525
12,035
23
b97907bf04908f82140d9fe06af904e47945d70a
951
py
Python
stellar_poe/stellar/utils.py
erickgnavar/stellar-poe
dd98f57f7f946f26cf84d412f3ed1136e29c95ce
[ "MIT" ]
null
null
null
stellar_poe/stellar/utils.py
erickgnavar/stellar-poe
dd98f57f7f946f26cf84d412f3ed1136e29c95ce
[ "MIT" ]
null
null
null
stellar_poe/stellar/utils.py
erickgnavar/stellar-poe
dd98f57f7f946f26cf84d412f3ed1136e29c95ce
[ "MIT" ]
1
2019-02-13T07:49:17.000Z
2019-02-13T07:49:17.000Z
import logging import requests from stellar_base.builder import Builder from stellar_base.keypair import Keypair logger = logging.getLogger(__name__)
26.416667
76
0.705573
import logging import requests from stellar_base.builder import Builder from stellar_base.keypair import Keypair logger = logging.getLogger(__name__) def create_new_address(): kp = Keypair.random() public_key = kp.address().decode() seed = kp.seed().decode() return seed, public_key def ask_for_co...
726
0
69
c3b49b47c0a0e99572a9c193a453ee565c642387
494
py
Python
tests/python/test_scheduler.py
Erotemic/misc
6f8460a690d05e7e0117becc6cae9902cbe2cedd
[ "Apache-2.0" ]
5
2021-04-29T21:07:18.000Z
2021-09-29T08:46:08.000Z
tests/python/test_scheduler.py
Erotemic/misc
6f8460a690d05e7e0117becc6cae9902cbe2cedd
[ "Apache-2.0" ]
null
null
null
tests/python/test_scheduler.py
Erotemic/misc
6f8460a690d05e7e0117becc6cae9902cbe2cedd
[ "Apache-2.0" ]
1
2018-04-07T12:26:21.000Z
2018-04-07T12:26:21.000Z
import torch parameters = [torch.autograd.Variable(torch.FloatTensor([0, 0, 0]), requires_grad=True)] optimizer = torch.optim.SGD(parameters, lr=0.1, momentum=0.9) scheduler = torch.optim.lr_scheduler.ReduceLROnPlateau(optimizer, verbose=True) for _ in range(100): scheduler.step(.1) lrs = get_lrs() lr...
24.7
88
0.684211
import torch parameters = [torch.autograd.Variable(torch.FloatTensor([0, 0, 0]), requires_grad=True)] optimizer = torch.optim.SGD(parameters, lr=0.1, momentum=0.9) scheduler = torch.optim.lr_scheduler.ReduceLROnPlateau(optimizer, verbose=True) def get_lrs(): lrs = set(map(lambda group: group['lr'], optimizer.p...
78
0
23
236cf56846b02f7fe0f86940d0bcf6ca533893b6
6,713
py
Python
fairdiplomacy/utils/game_scoring.py
facebookresearch/diplomacy_searchbot
44d6f3272be7567060ba7d0e41f4e44b1bb8b5ca
[ "MIT" ]
32
2021-05-04T17:05:19.000Z
2022-03-21T07:56:53.000Z
fairdiplomacy/utils/game_scoring.py
facebookresearch/diplomacy_searchbot
44d6f3272be7567060ba7d0e41f4e44b1bb8b5ca
[ "MIT" ]
3
2022-01-22T19:44:10.000Z
2022-03-02T23:20:52.000Z
fairdiplomacy/utils/game_scoring.py
facebookresearch/diplomacy_searchbot
44d6f3272be7567060ba7d0e41f4e44b1bb8b5ca
[ "MIT" ]
10
2021-05-07T11:51:29.000Z
2022-02-18T18:29:57.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Dict, Sequence, Tuple, List import collections import json import re from fairdiplomacy.models.consts import POWERS, N_SCS...
41.95625
112
0.682556
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Dict, Sequence, Tuple, List import collections import json import re from fairdiplomacy.models.consts import POWERS, N_SCS...
3,954
0
184
3374490ae81fb09cb4ae79b69a10d63387eb70f1
1,540
py
Python
Data-Wrangling-with-Pandas/code.py
chiragThakur62/ga-learner-dsmp-repo
a525732fad0da0ed2a73bced16b8006621097e2b
[ "MIT" ]
null
null
null
Data-Wrangling-with-Pandas/code.py
chiragThakur62/ga-learner-dsmp-repo
a525732fad0da0ed2a73bced16b8006621097e2b
[ "MIT" ]
null
null
null
Data-Wrangling-with-Pandas/code.py
chiragThakur62/ga-learner-dsmp-repo
a525732fad0da0ed2a73bced16b8006621097e2b
[ "MIT" ]
null
null
null
# -------------- # Import packages import numpy as np import pandas as pd from scipy.stats import mode bank=pd.read_csv(path) #print(bank) # code starts here categorical_var=bank.select_dtypes(include = 'object') print(categorical_var) numerical_var=bank.select_dtypes(include = 'number') print(numerical_var) ...
14.666667
99
0.694805
# -------------- # Import packages import numpy as np import pandas as pd from scipy.stats import mode bank=pd.read_csv(path) #print(bank) # code starts here categorical_var=bank.select_dtypes(include = 'object') print(categorical_var) numerical_var=bank.select_dtypes(include = 'number') print(numerical_var) ...
0
0
0
8fc4d0cd377ffeebcd3f89f11edf4e340a6920f1
4,231
py
Python
baseline_modify/utils/auxiliary.py
lxchtan/DSTC9-Track1
26c3d36df1ab13a766767989434b79894b5317c5
[ "Apache-2.0" ]
7
2021-04-20T09:04:59.000Z
2022-03-07T03:42:09.000Z
baseline_modify/utils/auxiliary.py
lxchtan/DSTC9-Track1
26c3d36df1ab13a766767989434b79894b5317c5
[ "Apache-2.0" ]
null
null
null
baseline_modify/utils/auxiliary.py
lxchtan/DSTC9-Track1
26c3d36df1ab13a766767989434b79894b5317c5
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn.functional as F from torch.utils.data import Sampler import math def top_filtering(logits, top_k=0, top_p=0.0, threshold=-float('Inf'), filter_value=-float('Inf')): """ Filter a distribution of logits using top-k, top-p (nucleus) and/or threshold filtering Args: logits: l...
39.175926
110
0.708816
import torch import torch.nn.functional as F from torch.utils.data import Sampler import math def top_filtering(logits, top_k=0, top_p=0.0, threshold=-float('Inf'), filter_value=-float('Inf')): """ Filter a distribution of logits using top-k, top-p (nucleus) and/or threshold filtering Args: logits: l...
1,471
8
195
688b0da582dadeec1c8665f0835e9c4fe7d30b74
1,176
py
Python
DepthFirstSearch.py
sprasadhpy/Python_Data_structures
c8058b67cd8be0a3198f97b727822c38f7a13df7
[ "MIT" ]
null
null
null
DepthFirstSearch.py
sprasadhpy/Python_Data_structures
c8058b67cd8be0a3198f97b727822c38f7a13df7
[ "MIT" ]
null
null
null
DepthFirstSearch.py
sprasadhpy/Python_Data_structures
c8058b67cd8be0a3198f97b727822c38f7a13df7
[ "MIT" ]
null
null
null
if __name__ == '__main__': # first we have to create the vertices (nodes) node1 = Node("A") node2 = Node("B") node3 = Node("C") node4 = Node("D") node5 = Node("E") # handle and set the neighbors accordingly node1.adjacency_list.append(node2) node1.adjacency_list.append(node3) ...
25.021277
79
0.62415
class Node: def __init__(self, name): self.name = name self.adjacency_list = [] self.visited = False def depth_first_search(start_node): # that we need a LIFO: last item we insert is the first one we take out stack = [start_node] # let's iterate until the stack becomes empt...
668
-10
73
6016e5097628258ac085efa94a0c5801a1ce49c5
706
py
Python
bin-seeds.py
maikthulhu/erl-matter
911c809712ef3e780b934e89d45237fa4aa8b2a7
[ "BSD-3-Clause" ]
63
2017-09-15T15:47:27.000Z
2022-03-30T21:29:42.000Z
bin-seeds.py
maikthulhu/erl-matter
911c809712ef3e780b934e89d45237fa4aa8b2a7
[ "BSD-3-Clause" ]
4
2020-07-20T00:31:29.000Z
2021-11-22T16:06:32.000Z
bin-seeds.py
maikthulhu/erl-matter
911c809712ef3e780b934e89d45237fa4aa8b2a7
[ "BSD-3-Clause" ]
10
2018-09-06T14:55:58.000Z
2022-03-26T09:10:01.000Z
#!/usr/bin/env python2.7 import sys import json data = load_seeds(sys.stdin) n = len(data) intervals = [] for (a, b, count) in make_bins(data): intervals.append({'start': a, 'stop': b, 'prob': (100.0*count)/n}) print(json.dumps(intervals))
21.393939
75
0.645892
#!/usr/bin/env python2.7 import sys import json def load_seeds(f): data = [int(x) for x in f.readlines()] return data def make_bins(data): _min = min(data) _max = max(data) _delta = _max-_min+1 _epsilon = 1000000 _bins = [0 for x in range(int(_delta//_epsilon) + 1)] for d in data: _bins[int((d-...
415
0
46
e2d9699f8770940f7a5e41871f86f0a2b79cb1a7
743
py
Python
examples/serializer.py
gorzechowski/flask-restly
54f28b66f35b0ab12ba4ee37bcd6d39aaf24111a
[ "MIT" ]
16
2018-10-16T20:07:02.000Z
2021-01-07T13:01:05.000Z
examples/serializer.py
gorzechowski/flask-restly
54f28b66f35b0ab12ba4ee37bcd6d39aaf24111a
[ "MIT" ]
16
2018-10-16T14:09:55.000Z
2020-01-16T07:52:22.000Z
examples/serializer.py
gorzechowski/flask-restly
54f28b66f35b0ab12ba4ee37bcd6d39aaf24111a
[ "MIT" ]
1
2019-04-17T03:20:41.000Z
2019-04-17T03:20:41.000Z
from flask import Flask from flask_restly import FlaskRestly from flask_restly.decorator import resource, get app = Flask(__name__) # json is default serializer # from flask_restly.serializer import json # app.config['RESTLY_SERIALIZER'] = json rest = FlaskRestly(app) rest.init_app(app) @resource(name='employees'...
21.228571
68
0.666218
from flask import Flask from flask_restly import FlaskRestly from flask_restly.decorator import resource, get app = Flask(__name__) # json is default serializer # from flask_restly.serializer import json # app.config['RESTLY_SERIALIZER'] = json rest = FlaskRestly(app) rest.init_app(app) @resource(name='employees'...
129
139
22
7c53c1f3c87c5a3e8d711d49440ac0b2f7015b4b
5,333
py
Python
anyioc/ioc_service_info.py
Cologler/anyioc-python
87aaf52208b8c510c9128f89359300a2158e3637
[ "MIT" ]
null
null
null
anyioc/ioc_service_info.py
Cologler/anyioc-python
87aaf52208b8c510c9128f89359300a2158e3637
[ "MIT" ]
null
null
null
anyioc/ioc_service_info.py
Cologler/anyioc-python
87aaf52208b8c510c9128f89359300a2158e3637
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2018~2999 - Cologler <skyoflw@gmail.com> # ---------- # # ---------- from abc import abstractmethod, ABC from enum import Enum from inspect import signature, Parameter from typing import Any from threading import RLock import inspect import contextlib from .symbols import Sym...
27.489691
108
0.617101
# -*- coding: utf-8 -*- # # Copyright (c) 2018~2999 - Cologler <skyoflw@gmail.com> # ---------- # # ---------- from abc import abstractmethod, ABC from enum import Enum from inspect import signature, Parameter from typing import Any from threading import RLock import inspect import contextlib from .symbols import Sym...
2,916
120
424
29818413c4e0e423211aa6c50ec9f07e237070d7
38
py
Python
ctzzy/__init__.py
zzylydx/ctzzy
d51b785f67acae8da84b646e15a8f89634af9445
[ "MIT" ]
null
null
null
ctzzy/__init__.py
zzylydx/ctzzy
d51b785f67acae8da84b646e15a8f89634af9445
[ "MIT" ]
null
null
null
ctzzy/__init__.py
zzylydx/ctzzy
d51b785f67acae8da84b646e15a8f89634af9445
[ "MIT" ]
null
null
null
from ctzzy._version import __version__
38
38
0.894737
from ctzzy._version import __version__
0
0
0
2b9be5e1f667665236c1af0380b6966278583201
1,927
py
Python
tests/testsniff.py
4788665/pcap-ct
dbedb178b82b1f17a371e7ae191074a1c8f870f1
[ "BSD-3-Clause" ]
17
2018-01-28T03:42:41.000Z
2022-01-30T01:47:54.000Z
tests/testsniff.py
4788665/pcap-ct
dbedb178b82b1f17a371e7ae191074a1c8f870f1
[ "BSD-3-Clause" ]
6
2019-11-22T23:06:34.000Z
2022-03-01T01:09:16.000Z
tests/testsniff.py
4788665/pcap-ct
dbedb178b82b1f17a371e7ae191074a1c8f870f1
[ "BSD-3-Clause" ]
3
2020-03-14T22:22:36.000Z
2022-03-01T00:53:53.000Z
#!/usr/bin/env python import getopt import sys import dpkt import pcap if __name__.rpartition(".")[-1] == "__main__": main()
24.0875
85
0.580695
#!/usr/bin/env python import getopt import sys import dpkt import pcap def usage(): sys.stderr.write('Usage: {} [-i device] [-l] [-n] [pattern]'.format(sys.argv[0])) sys.stderr.write(""" Options: \t-i device - Use the specific device. \t-l - Use pcap.loop() method. \t-n - Report timestamps in nanoseconds. ...
1,674
0
115
ab5108b4bd24a6bbd45ef080854fe71f7d639754
1,368
py
Python
microcosm_sagemaker/factories.py
globality-corp/microcosm-sagemaker
c112ea2c1f5c40c1973c292b73ca0fadbf461280
[ "Apache-2.0" ]
null
null
null
microcosm_sagemaker/factories.py
globality-corp/microcosm-sagemaker
c112ea2c1f5c40c1973c292b73ca0fadbf461280
[ "Apache-2.0" ]
15
2019-04-22T19:46:32.000Z
2022-02-11T17:31:43.000Z
microcosm_sagemaker/factories.py
globality-corp/microcosm-sagemaker
c112ea2c1f5c40c1973c292b73ca0fadbf461280
[ "Apache-2.0" ]
null
null
null
""" Consumer factories. """ from microcosm.api import defaults from microcosm.object_graph import ObjectGraph from microcosm_sagemaker.artifact import RootInputArtifact @defaults( perform_load=True, ) def load_active_bundle_and_dependencies(graph: ObjectGraph): """ Loads the active bundle and its depe...
24.428571
82
0.722953
""" Consumer factories. """ from microcosm.api import defaults from microcosm.object_graph import ObjectGraph from microcosm_sagemaker.artifact import RootInputArtifact def configure_active_bundle(graph): if not getattr(graph.config, "active_bundle", ""): return None return getattr(graph, graph.conf...
298
0
46
36d73bf673396d4a70a41c5cc62df04a70906dc7
1,271
py
Python
brother-printer.py
c99koder/telegraf-brother-printer
ff7fada79f4e5fc6f41e43446f3c495e607f2c7f
[ "Apache-2.0" ]
null
null
null
brother-printer.py
c99koder/telegraf-brother-printer
ff7fada79f4e5fc6f41e43446f3c495e607f2c7f
[ "Apache-2.0" ]
null
null
null
brother-printer.py
c99koder/telegraf-brother-printer
ff7fada79f4e5fc6f41e43446f3c495e607f2c7f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # Copyright (C) 2021 Sam Steele # 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...
31
75
0.696302
#!/usr/bin/python3 # Copyright (C) 2021 Sam Steele # 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...
484
0
23
49580ae540eae9c0df2ff0b69fb3a765f77e4ff4
4,415
py
Python
spectrocrunch/io/tests/test_excel.py
woutdenolf/spectrocrunch
fde4b6e0f462f464ce7af6a942b355d3d8f39f77
[ "MIT" ]
3
2018-04-16T15:51:36.000Z
2019-12-16T11:21:05.000Z
spectrocrunch/io/tests/test_excel.py
woutdenolf/spectrocrunch
fde4b6e0f462f464ce7af6a942b355d3d8f39f77
[ "MIT" ]
null
null
null
spectrocrunch/io/tests/test_excel.py
woutdenolf/spectrocrunch
fde4b6e0f462f464ce7af6a942b355d3d8f39f77
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import unittest import numpy as np import pandas as pd import random from collections import OrderedDict from testfixtures import TempDirectory import os from .. import excel def test_suite(): """Test suite including all test suites""" testSuite = unittest.TestSuite() testSuite....
32.226277
86
0.521631
# -*- coding: utf-8 -*- import unittest import numpy as np import pandas as pd import random from collections import OrderedDict from testfixtures import TempDirectory import os from .. import excel class test_excel(unittest.TestCase): def setUp(self): self.dir = TempDirectory() self.nrow, self....
3,584
15
211
f0340e9b622398ae8fb557f894bad5796c9ce19d
4,814
py
Python
examples/B_basic_platform/bsp03_1plat4gw_noAuth_Demo/demonstrator/potentiometer/pott1.py
N5GEH/n5geh.services.rvk_simulator
4a2c2882ddfedd7fcb260be3a86b9088f29b17c6
[ "MIT" ]
null
null
null
examples/B_basic_platform/bsp03_1plat4gw_noAuth_Demo/demonstrator/potentiometer/pott1.py
N5GEH/n5geh.services.rvk_simulator
4a2c2882ddfedd7fcb260be3a86b9088f29b17c6
[ "MIT" ]
null
null
null
examples/B_basic_platform/bsp03_1plat4gw_noAuth_Demo/demonstrator/potentiometer/pott1.py
N5GEH/n5geh.services.rvk_simulator
4a2c2882ddfedd7fcb260be3a86b9088f29b17c6
[ "MIT" ]
null
null
null
import paho.mqtt.client as mqtt import ssl import json import utils #======================================================================= # program that replaces te physical potentiometer # it sends a value between 0 and 255 that emulates the signal from potentiometer # to the topic sub_topic defined in the general ...
40.116667
141
0.585584
import paho.mqtt.client as mqtt import ssl import json import utils #======================================================================= # program that replaces te physical potentiometer # it sends a value between 0 and 255 that emulates the signal from potentiometer # to the topic sub_topic defined in the general ...
2,944
0
161
0421b42e9cdf39350afeaa5ecfd3fccbeb7ed91b
4,545
py
Python
synmod/aggregators.py
Craven-Biostat-Lab/synmod
433e2f1726e68acbc45f226b1235f15508156de1
[ "MIT" ]
null
null
null
synmod/aggregators.py
Craven-Biostat-Lab/synmod
433e2f1726e68acbc45f226b1235f15508156de1
[ "MIT" ]
null
null
null
synmod/aggregators.py
Craven-Biostat-Lab/synmod
433e2f1726e68acbc45f226b1235f15508156de1
[ "MIT" ]
null
null
null
"""Feature temporal aggregation functions""" from abc import ABC import numpy as np class Aggregator(): """Aggregates temporal values""" def update_statistics(self, instances): """Identify statistics to standardize each feature""" for fidx, _ in enumerate(self._aggregation_fns): ...
39.868421
138
0.682948
"""Feature temporal aggregation functions""" from abc import ABC import numpy as np class Aggregator(): """Aggregates temporal values""" def __init__(self, aggregation_fns, windows, instances=None, standardize_features=False): self._aggregation_fns = aggregation_fns # Temporal aggregation functions...
1,590
0
210
a83c92714df8528ee549b10de22f772dd1b8e28d
2,611
py
Python
attic/rojo_scripts/pull_charlesreid1.py
charlesreid1/debian-dotfiles
eb94148598665bf9bc7dd9534c28d90a594ab590
[ "MIT" ]
2
2021-03-08T01:13:01.000Z
2021-07-26T09:20:35.000Z
dotfiles/rojo_scripts/pull_charlesreid1.py
charlesreid1/debian-dotfiles
eb94148598665bf9bc7dd9534c28d90a594ab590
[ "MIT" ]
null
null
null
dotfiles/rojo_scripts/pull_charlesreid1.py
charlesreid1/debian-dotfiles
eb94148598665bf9bc7dd9534c28d90a594ab590
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import getpass import subprocess import glob import time import os import re import socket from datetime import datetime from pprint import pprint """ Pull Charlesreid1.com - Rojo This script pulls the latest version of charlesreid1.com source. """ if __name__=="__main__": host = socket.g...
27.197917
97
0.617388
#!/usr/bin/python3 import getpass import subprocess import glob import time import os import re import socket from datetime import datetime from pprint import pprint """ Pull Charlesreid1.com - Rojo This script pulls the latest version of charlesreid1.com source. """ def extract_output(cmd, cwd): result = subp...
1,967
0
46
8f341c0710c4095ba94bf4daadfe0f4e5d54d280
18
py
Python
test-data/python/editor/codeCompletion/emptyCompletions.py
kiteco/intellij-plugin
dc1361bb3da33f4cc2e2b7ea8aeb9fa4c3b6e0ab
[ "BSD-3-Clause" ]
3
2021-11-16T17:01:23.000Z
2021-12-03T21:18:37.000Z
test-data/python/editor/codeCompletion/emptyCompletions.py
kiteco/intellij-plugin
dc1361bb3da33f4cc2e2b7ea8aeb9fa4c3b6e0ab
[ "BSD-3-Clause" ]
null
null
null
test-data/python/editor/codeCompletion/emptyCompletions.py
kiteco/intellij-plugin
dc1361bb3da33f4cc2e2b7ea8aeb9fa4c3b6e0ab
[ "BSD-3-Clause" ]
2
2022-01-18T20:41:13.000Z
2022-02-23T08:17:04.000Z
a1=1 a2=1+a<caret>
9
13
0.666667
a1=1 a2=1+a<caret>
0
0
0
74aee2a3f6534452e177d21eddc3fb66b9dd5746
2,294
py
Python
Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Apps/Games4Kids/MyGamesEventsComponent.py
sparkslabs/kamaelia_orig
24b5f855a63421a1f7c6c7a35a7f4629ed955316
[ "Apache-2.0" ]
12
2015-10-20T10:22:01.000Z
2021-07-19T10:09:44.000Z
Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Apps/Games4Kids/MyGamesEventsComponent.py
sparkslabs/kamaelia_orig
24b5f855a63421a1f7c6c7a35a7f4629ed955316
[ "Apache-2.0" ]
2
2015-10-20T10:22:55.000Z
2017-02-13T11:05:25.000Z
Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Apps/Games4Kids/MyGamesEventsComponent.py
sparkslabs/kamaelia_orig
24b5f855a63421a1f7c6c7a35a7f4629ed955316
[ "Apache-2.0" ]
6
2015-03-09T12:51:59.000Z
2020-03-01T13:06:21.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ve...
41.709091
78
0.564952
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ve...
1,211
0
22
380c2cf00245ccc7b89a78072a936330c9023bbf
652
py
Python
problems/exercism/book-store/book_store.py
JayMonari/py-personal
ef16d030cc7fe2266d661e1378d95f588229b746
[ "MIT" ]
null
null
null
problems/exercism/book-store/book_store.py
JayMonari/py-personal
ef16d030cc7fe2266d661e1378d95f588229b746
[ "MIT" ]
null
null
null
problems/exercism/book-store/book_store.py
JayMonari/py-personal
ef16d030cc7fe2266d661e1378d95f588229b746
[ "MIT" ]
null
null
null
from typing import List PRICES = { 1: 800, 2: 1520, 3: 2160, 4: 2560, 5: 3000, }
19.176471
50
0.578221
from typing import List PRICES = { 1: 800, 2: 1520, 3: 2160, 4: 2560, 5: 3000, } def find_sets(basket: List[int]) -> List[int]: copy = basket.copy() sets = [] uniq = set(copy) while copy: sets.append(len(uniq)) for b in uniq: copy.remove(b) uni...
501
0
46
330e5b10c753cb624566baa31391572cd4ef88de
3,877
py
Python
architecture/model.py
Xenovortex/INN_Embedding_Classification
df31ec3dcf70780cae5140a69ffafdd64f218e5f
[ "MIT" ]
null
null
null
architecture/model.py
Xenovortex/INN_Embedding_Classification
df31ec3dcf70780cae5140a69ffafdd64f218e5f
[ "MIT" ]
null
null
null
architecture/model.py
Xenovortex/INN_Embedding_Classification
df31ec3dcf70780cae5140a69ffafdd64f218e5f
[ "MIT" ]
null
null
null
from FrEIA import framework as fr from FrEIA import modules as la import torch import torchvision.models as models import torch.nn as nn import numpy as np def get_vgg16(): """ Get features from pretrained VGG16 model. :return: partial VGG16 model, which takes ImageNet images and return feature0 """ ...
30.769841
138
0.653598
from FrEIA import framework as fr from FrEIA import modules as la import torch import torchvision.models as models import torch.nn as nn import numpy as np def get_vgg16(): """ Get features from pretrained VGG16 model. :return: partial VGG16 model, which takes ImageNet images and return feature0 """ ...
2,471
0
138
55b85aac450f05367cce62caf658be6a08c09028
3,165
py
Python
services/web/server/src/simcore_service_webserver/application_proxy.py
oetiker/osparc-simcore
00918bf8f000840cc70cc49458780a55858d52ea
[ "MIT" ]
null
null
null
services/web/server/src/simcore_service_webserver/application_proxy.py
oetiker/osparc-simcore
00918bf8f000840cc70cc49458780a55858d52ea
[ "MIT" ]
2
2018-05-13T09:10:57.000Z
2019-03-06T08:10:40.000Z
services/web/server/src/simcore_service_webserver/application_proxy.py
oetiker/osparc-simcore
00918bf8f000840cc70cc49458780a55858d52ea
[ "MIT" ]
null
null
null
""" Sets up reverse proxy in the application - app's reverse proxy dynamically reroutes communication between web-server's client and dynamic-backend services (or dyb's) - couples director with reverse_proxy subsystems Use case - All requests to `/x/{serviceId}/{proxyPath}` are re-routed to a dyb se...
31.336634
111
0.688468
""" Sets up reverse proxy in the application - app's reverse proxy dynamically reroutes communication between web-server's client and dynamic-backend services (or dyb's) - couples director with reverse_proxy subsystems Use case - All requests to `/x/{serviceId}/{proxyPath}` are re-routed to a dyb se...
1,206
951
68
91418e522d5fd515e0642c6ff5e6d41b16f1b4ec
256
py
Python
therandy/rules/yarn_command_replaced.py
benmonro/therandy
b7c7c4ffc8f82b27f284ba90621a47baa5dfcb03
[ "MIT" ]
null
null
null
therandy/rules/yarn_command_replaced.py
benmonro/therandy
b7c7c4ffc8f82b27f284ba90621a47baa5dfcb03
[ "MIT" ]
null
null
null
therandy/rules/yarn_command_replaced.py
benmonro/therandy
b7c7c4ffc8f82b27f284ba90621a47baa5dfcb03
[ "MIT" ]
null
null
null
import re from therandy.utils import for_app regex = re.compile(r'Run "(.*)" instead') @for_app('yarn', at_least=1)
18.285714
43
0.726563
import re from therandy.utils import for_app regex = re.compile(r'Run "(.*)" instead') @for_app('yarn', at_least=1) def match(command): return regex.findall(command.output) def get_new_command(command): return regex.findall(command.output)[0]
91
0
45
dfe645551145fb5cd7dbe96a4a0482262bc7d285
3,369
py
Python
moai/monads/keypoints/visibility.py
tzole1155/moai
d1afb3aaf8ddcd7a1c98b84d6365afb846ae3180
[ "Apache-2.0" ]
10
2021-04-02T11:21:33.000Z
2022-01-18T18:32:32.000Z
moai/monads/keypoints/visibility.py
tzole1155/moai
d1afb3aaf8ddcd7a1c98b84d6365afb846ae3180
[ "Apache-2.0" ]
1
2022-03-22T20:10:55.000Z
2022-03-24T13:11:02.000Z
moai/monads/keypoints/visibility.py
tzole1155/moai
d1afb3aaf8ddcd7a1c98b84d6365afb846ae3180
[ "Apache-2.0" ]
3
2021-05-16T20:47:40.000Z
2021-12-01T21:15:36.000Z
import torch import functools __all__ = [ "VisibilityFOV", "VisibilityHeatmap" ]
40.107143
136
0.511725
import torch import functools __all__ = [ "VisibilityFOV", "VisibilityHeatmap" ] class VisibilityFOV(torch.nn.Module): def __init__(self, width: int=1, height: int=1, coord_type: str='coord', # [B, K, UV] ): super(VisibilityFOV,self)._...
1,901
1,276
99
bc46a045fdce114c5d4d985d361b468382c41c86
211
py
Python
mwptoolkit/module/Embedder/__init__.py
ShubhamAnandJain/MWP-CS229
ce86233504fdb37e104a3944fd81d4606fbfa621
[ "MIT" ]
71
2021-03-08T06:06:15.000Z
2022-03-30T11:59:37.000Z
mwptoolkit/module/Embedder/__init__.py
ShubhamAnandJain/MWP-CS229
ce86233504fdb37e104a3944fd81d4606fbfa621
[ "MIT" ]
13
2021-09-07T12:38:23.000Z
2022-03-22T15:08:16.000Z
mwptoolkit/module/Embedder/__init__.py
ShubhamAnandJain/MWP-CS229
ce86233504fdb37e104a3944fd81d4606fbfa621
[ "MIT" ]
21
2021-02-16T07:46:36.000Z
2022-03-23T13:41:33.000Z
from __future__ import absolute_import from __future__ import print_function from __future__ import division from mwptoolkit.module.Embedder import basic_embedder,bert_embedder,position_embedder,roberta_embedder
52.75
102
0.905213
from __future__ import absolute_import from __future__ import print_function from __future__ import division from mwptoolkit.module.Embedder import basic_embedder,bert_embedder,position_embedder,roberta_embedder
0
0
0
e02ae7379b7c5223c244d34509f0049669884897
4,575
py
Python
colour/models/cie_ucs.py
canavandl/colour
a453cd37b6135a9092d5ea5b2aafb8d19134bdff
[ "BSD-3-Clause" ]
1
2019-06-27T11:32:48.000Z
2019-06-27T11:32:48.000Z
colour/models/cie_ucs.py
canavandl/colour
a453cd37b6135a9092d5ea5b2aafb8d19134bdff
[ "BSD-3-Clause" ]
null
null
null
colour/models/cie_ucs.py
canavandl/colour
a453cd37b6135a9092d5ea5b2aafb8d19134bdff
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ CIE UCS Colourspace =================== Defines the *CIE UCS* colourspace transformations: - :func:`XYZ_to_UCS` - :func:`UCS_to_XYZ` - :func:`UCS_to_uv` - :func:`UCS_uv_to_xy` See Also -------- `CIE UCS Colourspace IPython Notebook <http://nbviewer.ipython.o...
24.206349
119
0.567869
#!/usr/bin/env python # -*- coding: utf-8 -*- """ CIE UCS Colourspace =================== Defines the *CIE UCS* colourspace transformations: - :func:`XYZ_to_UCS` - :func:`UCS_to_XYZ` - :func:`UCS_to_uv` - :func:`UCS_uv_to_xy` See Also -------- `CIE UCS Colourspace IPython Notebook <http://nbviewer.ipython.o...
0
0
0
99757fb8a30f0935fc92d1bb843ac95491dbdfbf
7,485
py
Python
algorithms/POMDP/3-DRQN-Store-State-HeavenHell/model.py
zhihanyang2022/drqn
ac2482e3b42094e6242c042583dbbd9c98e4750b
[ "MIT" ]
5
2021-03-28T14:12:40.000Z
2021-11-19T20:46:10.000Z
algorithms/POMDP/3-DRQN-Store-State-HeavenHell/model.py
zhihanyang2022/drqn
ac2482e3b42094e6242c042583dbbd9c98e4750b
[ "MIT" ]
null
null
null
algorithms/POMDP/3-DRQN-Store-State-HeavenHell/model.py
zhihanyang2022/drqn
ac2482e3b42094e6242c042583dbbd9c98e4750b
[ "MIT" ]
null
null
null
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.utils.rnn import pad_sequence, pack_padded_sequence, pad_packed_sequence # from config import burn_in_length
37.994924
133
0.600134
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.utils.rnn import pad_sequence, pack_padded_sequence, pad_packed_sequence # from config import burn_in_length class DRQN(nn.Module): def __init__(self, num_inputs, num_outputs, use_deeper_net): super(DRQ...
7,124
126
23
be89cd61695c8f64a9da74198f223bd8b27047f3
2,870
py
Python
resource3.py
Ashutosharma08/Resource_Manager_Python
4e5bf7acb00c72b89e0124a5439ae80f28bb7635
[ "MIT" ]
null
null
null
resource3.py
Ashutosharma08/Resource_Manager_Python
4e5bf7acb00c72b89e0124a5439ae80f28bb7635
[ "MIT" ]
null
null
null
resource3.py
Ashutosharma08/Resource_Manager_Python
4e5bf7acb00c72b89e0124a5439ae80f28bb7635
[ "MIT" ]
null
null
null
import psutil import time import GPUtil import csv import pandas as pd # process_name = 'LiDAR360.exe' name = psutil.Process(15500) name_1 = psutil.Process(9996) name_2 = psutil.Process(1476) name_3 = psutil.Process(14976) print(name.pid) # print("Hello") sleep_time = 2 mins = 60 # start = time.time() ...
28.137255
101
0.554355
import psutil import time import GPUtil import csv import pandas as pd # process_name = 'LiDAR360.exe' name = psutil.Process(15500) name_1 = psutil.Process(9996) name_2 = psutil.Process(1476) name_3 = psutil.Process(14976) print(name.pid) # print("Hello") sleep_time = 2 mins = 60 # start = time.time() ...
243
0
25
9498fd49ed4a4b92604ac1923fd424d00fa30b23
9,171
py
Python
moviedb.py
sre28/Movie-database
bc99cf1ecd712c77d60c24fd82d4a4edfe3eb204
[ "Apache-2.0" ]
null
null
null
moviedb.py
sre28/Movie-database
bc99cf1ecd712c77d60c24fd82d4a4edfe3eb204
[ "Apache-2.0" ]
null
null
null
moviedb.py
sre28/Movie-database
bc99cf1ecd712c77d60c24fd82d4a4edfe3eb204
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
29.488746
144
0.637335
#!/usr/bin/env python # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
6,549
79
253
25b8784ade9962cdf9c3155abb0987d48efd8033
2,438
py
Python
haystack_topology/query_shannon_entropy_bolt.py
sourcekris/Haystack
d2c9b24660a5c9d06547ed8f59e94e25dde395cc
[ "BSD-3-Clause" ]
2
2016-09-21T01:34:21.000Z
2020-01-12T12:27:35.000Z
haystack_topology/query_shannon_entropy_bolt.py
sourcekris/Haystack
d2c9b24660a5c9d06547ed8f59e94e25dde395cc
[ "BSD-3-Clause" ]
null
null
null
haystack_topology/query_shannon_entropy_bolt.py
sourcekris/Haystack
d2c9b24660a5c9d06547ed8f59e94e25dde395cc
[ "BSD-3-Clause" ]
null
null
null
# ____ _ _ # | _ \ _ __ ___ (_) ___ ___| |_ # | |_) | '__/ _ \| |/ _ \/ __| __| # | __/| | | (_) | | __/ (__| |_ # |_| _|_| \___// |\___|\___|\__| # | | | | __ _ _|__/ ___| |_ __ _ ___| | __ # | |_| |/ _` | | | / __| __/ _` |/ __| |/ / # | _ | (_| | |_| \__ \ || (_| |...
29.373494
154
0.554553
# ____ _ _ # | _ \ _ __ ___ (_) ___ ___| |_ # | |_) | '__/ _ \| |/ _ \/ __| __| # | __/| | | (_) | | __/ (__| |_ # |_| _|_| \___// |\___|\___|\__| # | | | | __ _ _|__/ ___| |_ __ _ ___| | __ # | |_| |/ _` | | | / __| __/ _` |/ __| |/ / # | _ | (_| | |_| \__ \ || (_| |...
1,057
197
23
6698cda7bc1b99f2131409192b00fe915fe63454
31,453
py
Python
pywbemtools/pywbemcli/_pywbemcli_operations.py
pywbem/pywbemtools
6b7c3f124324fd3ab7cffb82bc98c8f9555317e4
[ "Apache-2.0" ]
8
2017-04-01T13:55:00.000Z
2022-03-15T18:28:47.000Z
pywbemtools/pywbemcli/_pywbemcli_operations.py
pywbem/pywbemtools
6b7c3f124324fd3ab7cffb82bc98c8f9555317e4
[ "Apache-2.0" ]
918
2017-03-03T14:29:03.000Z
2022-03-29T15:32:16.000Z
pywbemtools/pywbemcli/_pywbemcli_operations.py
pywbem/pywbemtools
6b7c3f124324fd3ab7cffb82bc98c8f9555317e4
[ "Apache-2.0" ]
2
2020-01-17T15:56:46.000Z
2020-02-12T18:49:30.000Z
# (C) Copyright 2017 IBM Corp. # (C) Copyright 2017 Inova Development Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
40.848052
80
0.601723
# (C) Copyright 2017 IBM Corp. # (C) Copyright 2017 Inova Development Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
0
0
0
3ccfaab268fd992dee668ab9c0ed10bb59ba6a5f
449
py
Python
setup.py
vallsv/atop_raw
531e9c6749f199a55dc3138c73310a5105da7b7f
[ "MIT" ]
null
null
null
setup.py
vallsv/atop_raw
531e9c6749f199a55dc3138c73310a5105da7b7f
[ "MIT" ]
null
null
null
setup.py
vallsv/atop_raw
531e9c6749f199a55dc3138c73310a5105da7b7f
[ "MIT" ]
null
null
null
from setuptools import setup packages = ["atop_raw", "atop_raw.headers"] install_requires = ["numpy"] extras_require = {"pycstruct": ["pycstruct >= 0.9"]} package_data = {"atop_raw.headers": ["*.h"]} setup( name="atop_raw", version="2", packages=packages, extras_require=extras_require, package...
20.409091
52
0.688196
from setuptools import setup packages = ["atop_raw", "atop_raw.headers"] install_requires = ["numpy"] extras_require = {"pycstruct": ["pycstruct >= 0.9"]} package_data = {"atop_raw.headers": ["*.h"]} setup( name="atop_raw", version="2", packages=packages, extras_require=extras_require, package...
0
0
0
a37b60dd8042c70ef8a412bcfc9242934135b726
3,461
py
Python
apps/data_taking_scripts/2016-06-jpl-hex-271/sweep_and_stream_sloppy.py
danielflanigan/kid_readout
07202090d468669200cab78297122880c1c03e87
[ "BSD-2-Clause" ]
null
null
null
apps/data_taking_scripts/2016-06-jpl-hex-271/sweep_and_stream_sloppy.py
danielflanigan/kid_readout
07202090d468669200cab78297122880c1c03e87
[ "BSD-2-Clause" ]
null
null
null
apps/data_taking_scripts/2016-06-jpl-hex-271/sweep_and_stream_sloppy.py
danielflanigan/kid_readout
07202090d468669200cab78297122880c1c03e87
[ "BSD-2-Clause" ]
null
null
null
import time import numpy as np from equipment.custom import mmwave_source from equipment.srs import lockin from equipment.hittite import signal_generator from kid_readout.interactive import * from kid_readout.equipment import hardware from kid_readout.measurement import acquire from kid_readout.roach import analog #...
37.215054
108
0.675527
import time import numpy as np from equipment.custom import mmwave_source from equipment.srs import lockin from equipment.hittite import signal_generator from kid_readout.interactive import * from kid_readout.equipment import hardware from kid_readout.measurement import acquire from kid_readout.roach import analog #...
0
0
0
3d98bc5392758f5ff781304dc25462056d321cef
11,674
py
Python
modeemintternet/models.py
modeemi/intternetvelho
f63027d6d845df4ed54516931623a5b7d501297f
[ "BSD-4-Clause" ]
4
2016-03-28T18:09:54.000Z
2018-09-19T16:47:33.000Z
modeemintternet/models.py
modeemi/intternetvelho
f63027d6d845df4ed54516931623a5b7d501297f
[ "BSD-4-Clause" ]
270
2015-04-03T21:42:45.000Z
2019-08-05T17:22:27.000Z
modeemintternet/models.py
modeemi/website
dc1710bbc5495fc525b975c9a3b5026a9c341868
[ "BSD-4-Clause" ]
4
2015-04-03T21:39:58.000Z
2019-05-01T19:30:21.000Z
from logging import getLogger from re import match from time import time from django.conf import settings from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models, transaction f...
30.401042
117
0.653161
from logging import getLogger from re import match from time import time from django.conf import settings from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models, transaction f...
3,381
7,216
299
ca5caf08089302776d94055759a08bf41fcee900
1,535
py
Python
pokemon_project_python_201.py
radekwilk/pokemons-python201-project
38fdd7153d15c51da552bf4e0490ec7f881de5ad
[ "MIT" ]
null
null
null
pokemon_project_python_201.py
radekwilk/pokemons-python201-project
38fdd7153d15c51da552bf4e0490ec7f881de5ad
[ "MIT" ]
null
null
null
pokemon_project_python_201.py
radekwilk/pokemons-python201-project
38fdd7153d15c51da552bf4e0490ec7f881de5ad
[ "MIT" ]
null
null
null
# 1. Ask for user input # 2. Create a dynamic URL based on step 1 # 3. Fetch data from using url # 4. Convert json to dictionary # 5. Print Pokemon data import requests while True: # getting Pokemon name from the user user_pokemon_input = input( 'Please type name of pokemon you want to learn about? ') ...
37.439024
89
0.658632
# 1. Ask for user input # 2. Create a dynamic URL based on step 1 # 3. Fetch data from using url # 4. Convert json to dictionary # 5. Print Pokemon data import requests while True: # getting Pokemon name from the user user_pokemon_input = input( 'Please type name of pokemon you want to learn about? ') ...
0
0
0
efd7a81ad423c38bb92b509ca7e1613355d987e7
69
py
Python
notebook/book/python/Learn-OOP-with-Python/Chapter-2/python_init_test/module_1/say.py
JMwill/note
30e931f18c9ba942f5e5040b524047a996cf0c6c
[ "MIT" ]
null
null
null
notebook/book/python/Learn-OOP-with-Python/Chapter-2/python_init_test/module_1/say.py
JMwill/note
30e931f18c9ba942f5e5040b524047a996cf0c6c
[ "MIT" ]
2
2018-11-27T10:45:45.000Z
2018-12-13T14:44:54.000Z
notebook/book/python/Learn-OOP-with-Python/Chapter-2/python_init_test/module_2/say.py
JMwill/note
30e931f18c9ba942f5e5040b524047a996cf0c6c
[ "MIT" ]
null
null
null
if __name__ == '__main__': say()
11.5
26
0.57971
def say(): print(__name__) if __name__ == '__main__': say()
9
0
22
b864beec013df48447b4dba70c53b9227d007099
59
py
Python
gunicorn_config.py
DS4A-Team19-2021/Agustin-Codazzi-Project
1fbfb093c013a2f840d586754fdd17b5bee9ea24
[ "MIT" ]
1
2021-09-22T00:31:27.000Z
2021-09-22T00:31:27.000Z
gunicorn_config.py
DS4A-Team19-2021/Agustin-Codazzi-Project
1fbfb093c013a2f840d586754fdd17b5bee9ea24
[ "MIT" ]
null
null
null
gunicorn_config.py
DS4A-Team19-2021/Agustin-Codazzi-Project
1fbfb093c013a2f840d586754fdd17b5bee9ea24
[ "MIT" ]
null
null
null
bind = "0.0.0.0:8085" workers = 2 threads = 2 timeout = 120
14.75
21
0.644068
bind = "0.0.0.0:8085" workers = 2 threads = 2 timeout = 120
0
0
0
a37feba7f51aa7fb106c5bc7b7baf3ebca747a23
1,994
py
Python
src/common_utils_data/jupyter_functions.py
Mi524/common_utils_data
400baf3be1bc96a06bd1f3d70abaf8dd749cfb85
[ "MIT" ]
null
null
null
src/common_utils_data/jupyter_functions.py
Mi524/common_utils_data
400baf3be1bc96a06bd1f3d70abaf8dd749cfb85
[ "MIT" ]
null
null
null
src/common_utils_data/jupyter_functions.py
Mi524/common_utils_data
400baf3be1bc96a06bd1f3d70abaf8dd749cfb85
[ "MIT" ]
null
null
null
import re import nbformat from nbconvert import PythonExporter import warnings warnings.filterwarnings('ignore') def nbconverter(notebookPath,directionPath=None): """method name is the same as jupyter default converter name : Nbconvert(notebookPath,directionPath) :param notebookPath: source path of...
37.622642
99
0.679539
import re import nbformat from nbconvert import PythonExporter import warnings warnings.filterwarnings('ignore') def nbconverter(notebookPath,directionPath=None): """method name is the same as jupyter default converter name : Nbconvert(notebookPath,directionPath) :param notebookPath: source path of...
58
0
26
01135b803f5beaf4d240c3e7cf8cfe01a0e87dbb
959
py
Python
solution/lc5373.py
sth4nothing/pyleetcode
70ac2dc55b0cbcd243b38103a96dd796538a3c05
[ "MIT" ]
null
null
null
solution/lc5373.py
sth4nothing/pyleetcode
70ac2dc55b0cbcd243b38103a96dd796538a3c05
[ "MIT" ]
null
null
null
solution/lc5373.py
sth4nothing/pyleetcode
70ac2dc55b0cbcd243b38103a96dd796538a3c05
[ "MIT" ]
null
null
null
# encoding: utf-8 import bisect import collections import json import math import queue import heapq from typing import (Any, Callable, Counter, DefaultDict, Dict, Iterable, List, Set, Tuple) data: Dict[str, List[Any]] = json.loads(''' {"inputs":[[7],[10],[19]],"outputs":[2,2,3]} ''') fib = [1,...
20.847826
78
0.558916
# encoding: utf-8 import bisect import collections import json import math import queue import heapq from typing import (Any, Callable, Counter, DefaultDict, Dict, Iterable, List, Set, Tuple) def assert_equal(x: Any, eq: Any): if x == eq: print(f'√\t{x}=={eq}') else: print(...
353
-6
72
ebeb78c187a0b89a66d9bee323f6b1f8040a3ccb
405
py
Python
com/LimePencil/Q13305/Main.py
LimePencil/baekjoonProblems
61eeeeb875585d165d9e39ecdb3d905b4ba6aa87
[ "MIT" ]
2
2021-07-17T13:05:42.000Z
2021-09-12T09:14:24.000Z
com/LimePencil/Q13305/Main.py
LimePencil/baekjoonProblems
61eeeeb875585d165d9e39ecdb3d905b4ba6aa87
[ "MIT" ]
null
null
null
com/LimePencil/Q13305/Main.py
LimePencil/baekjoonProblems
61eeeeb875585d165d9e39ecdb3d905b4ba6aa87
[ "MIT" ]
null
null
null
import sys n = int(sys.stdin.readline().rstrip("\n")) distance = list(map(int,sys.stdin.readline().rstrip("\n").split(" "))) price = list(map(int,sys.stdin.readline().rstrip("\n").split(" "))) money = 0 curr_price = price[0] for i in range(len(price)-1): if curr_price > price[i]: curr_price = price[i] ...
22.5
70
0.619753
import sys n = int(sys.stdin.readline().rstrip("\n")) distance = list(map(int,sys.stdin.readline().rstrip("\n").split(" "))) price = list(map(int,sys.stdin.readline().rstrip("\n").split(" "))) money = 0 curr_price = price[0] for i in range(len(price)-1): if curr_price > price[i]: curr_price = price[i] ...
0
0
0
bc94ba777ef1705443dc51220cd1597fd1077ef2
1,020
py
Python
cvat/apps/dataset_repo/migrations/0001_initial.py
adasdevops/ADAS_UPDATE_STABLE
306202b4e291b5876e3dd4fdd201c761e9d182f0
[ "Intel", "MIT" ]
null
null
null
cvat/apps/dataset_repo/migrations/0001_initial.py
adasdevops/ADAS_UPDATE_STABLE
306202b4e291b5876e3dd4fdd201c761e9d182f0
[ "Intel", "MIT" ]
null
null
null
cvat/apps/dataset_repo/migrations/0001_initial.py
adasdevops/ADAS_UPDATE_STABLE
306202b4e291b5876e3dd4fdd201c761e9d182f0
[ "Intel", "MIT" ]
1
2022-03-04T09:18:30.000Z
2022-03-04T09:18:30.000Z
# Generated by Django 3.2.12 on 2022-02-14 16:39 import cvat.apps.dataset_repo.models from django.db import migrations, models import django.db.models.deletion
34
145
0.613725
# Generated by Django 3.2.12 on 2022-02-14 16:39 import cvat.apps.dataset_repo.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('engine', '0001_initial'), ] operations = [ migrat...
0
835
23
c765363d3dac71f961f0d0c83995838836d3df92
2,942
py
Python
tests/utils/test_crypt_util.py
bhavik2018/WALinuxAgent
684120121b44bfbf533dda3414be2fe10757f53a
[ "Apache-2.0" ]
1
2021-01-22T05:44:51.000Z
2021-01-22T05:44:51.000Z
tests/utils/test_crypt_util.py
bhavik2018/WALinuxAgent
684120121b44bfbf533dda3414be2fe10757f53a
[ "Apache-2.0" ]
null
null
null
tests/utils/test_crypt_util.py
bhavik2018/WALinuxAgent
684120121b44bfbf533dda3414be2fe10757f53a
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
40.861111
103
0.741672
# Copyright 2018 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
1,572
25
134
2ebe99b58d926cf4296236885d782f26416f67ce
4,708
py
Python
scripts/calpha.py
rwk-unil/gqt
9deb46196abc8bebe337d7516f46949d7aeab538
[ "MIT" ]
112
2015-01-04T17:25:04.000Z
2022-02-02T10:39:32.000Z
scripts/calpha.py
rwk-unil/gqt
9deb46196abc8bebe337d7516f46949d7aeab538
[ "MIT" ]
25
2015-03-24T14:29:50.000Z
2021-09-27T10:14:24.000Z
scripts/calpha.py
rwk-unil/gqt
9deb46196abc8bebe337d7516f46949d7aeab538
[ "MIT" ]
31
2015-04-29T20:53:22.000Z
2021-03-29T08:28:33.000Z
#!/usr/bin/env python import sys import math import numpy as np from optparse import OptionParser def choose(n, k): """ A fast way to calculate binomial coefficients by Andrew Dalke (contrib). """ if 0 <= k <= n: ntok = 1 ktok = 1 for t in xrange(1, min(k, n - k) + 1): ...
27.057471
76
0.402082
#!/usr/bin/env python import sys import math import numpy as np from optparse import OptionParser def choose(n, k): """ A fast way to calculate binomial coefficients by Andrew Dalke (contrib). """ if 0 <= k <= n: ntok = 1 ktok = 1 for t in xrange(1, min(k, n - k) + 1): ...
4,104
0
115
a73f1c2e588560e15532744d739b6a087d653e0c
3,486
py
Python
examples/fwd_test.py
Jack-Shen/fwd_python_api
d9fd0dfb0dfb6eb8755058028ebe2a09e4835442
[ "MIT" ]
null
null
null
examples/fwd_test.py
Jack-Shen/fwd_python_api
d9fd0dfb0dfb6eb8755058028ebe2a09e4835442
[ "MIT" ]
null
null
null
examples/fwd_test.py
Jack-Shen/fwd_python_api
d9fd0dfb0dfb6eb8755058028ebe2a09e4835442
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # ### 1 - SET UP THE API # In[1]: import requests import sys import os sys.path.insert(0, "/home/admin/ansible/fwd_python_api") sys.path.append("..") import fwd_json from fwd_json import fwdApi username = os.environ['fwd_saas_user'] token = os.environ['fwd_saas_token'] network ...
19.47486
78
0.722892
#!/usr/bin/env python # coding: utf-8 # ### 1 - SET UP THE API # In[1]: import requests import sys import os sys.path.insert(0, "/home/admin/ansible/fwd_python_api") sys.path.append("..") import fwd_json from fwd_json import fwdApi username = os.environ['fwd_saas_user'] token = os.environ['fwd_saas_token'] network ...
0
0
0
b66e07a40f973e481532ee8a3497d7bb086a3065
37
py
Python
SWIM-Executables/Windows/pyinstaller-2.0 for windows/PyInstaller/hooks/hook-PyQt4.Qt3Support.py
alexsigaras/SWIM
1a35df8acb26bdcb307a1b8f60e9feba68ed1715
[ "MIT" ]
47
2020-03-08T08:43:28.000Z
2022-03-18T18:51:55.000Z
SWIM-Executables/Windows/pyinstaller-2.0 for windows/PyInstaller/hooks/hook-PyQt4.Qt3Support.py
alexsigaras/SWIM
1a35df8acb26bdcb307a1b8f60e9feba68ed1715
[ "MIT" ]
null
null
null
SWIM-Executables/Windows/pyinstaller-2.0 for windows/PyInstaller/hooks/hook-PyQt4.Qt3Support.py
alexsigaras/SWIM
1a35df8acb26bdcb307a1b8f60e9feba68ed1715
[ "MIT" ]
16
2020-03-08T08:43:30.000Z
2022-01-10T22:05:57.000Z
hiddenimports = ['sip', 'PyQt4._qt']
18.5
36
0.648649
hiddenimports = ['sip', 'PyQt4._qt']
0
0
0
4c2b38e42ec870c19d3d951346e64ac61ac3bfc2
11,373
py
Python
packages/snet_cli/snet_cli/config.py
anandrgitnirman/snet-cli
6c8a60fe9cc1c1737f6f493369b7fbec5340fe69
[ "MIT" ]
67
2018-05-21T22:15:38.000Z
2022-03-05T15:53:33.000Z
packages/snet_cli/snet_cli/config.py
anandrgitnirman/snet-cli
6c8a60fe9cc1c1737f6f493369b7fbec5340fe69
[ "MIT" ]
295
2018-05-27T23:43:36.000Z
2021-10-06T14:33:40.000Z
packages/snet_cli/snet_cli/config.py
anandrgitnirman/snet-cli
6c8a60fe9cc1c1737f6f493369b7fbec5340fe69
[ "MIT" ]
48
2018-05-22T21:15:28.000Z
2022-02-10T04:11:56.000Z
from configparser import ConfigParser, ExtendedInterpolation from pathlib import Path default_snet_folder = Path("~").expanduser().joinpath(".snet")
47.585774
151
0.660248
from configparser import ConfigParser, ExtendedInterpolation from pathlib import Path default_snet_folder = Path("~").expanduser().joinpath(".snet") class Config(ConfigParser): def __init__(self, _snet_folder=default_snet_folder): super(Config, self).__init__(interpolation=ExtendedInterpolation(), delimi...
8,728
2,351
138
0d68e81ea58e5535999a29ec68b1af0b6ea9df2f
23,395
py
Python
vistrails/packages/tabledata/convert/convert_dates.py
remram44/VisTrails-mybinder
ee7477b471920d738f3ac430932f01901b56ed44
[ "BSD-3-Clause" ]
1
2020-07-13T11:33:45.000Z
2020-07-13T11:33:45.000Z
vistrails/packages/tabledata/convert/convert_dates.py
remram44/VisTrails-mybinder
ee7477b471920d738f3ac430932f01901b56ed44
[ "BSD-3-Clause" ]
null
null
null
vistrails/packages/tabledata/convert/convert_dates.py
remram44/VisTrails-mybinder
ee7477b471920d738f3ac430932f01901b56ed44
[ "BSD-3-Clause" ]
null
null
null
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2013-2014, NYU-Poly. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
37.491987
79
0.554178
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2013-2014, NYU-Poly. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
7,010
9,784
659
2d0627e9080608c23776616f34c3e2904bb98bcb
14,076
py
Python
src/04_visualization/plotly_visualization.py
saraghsm/sound-of-failure
4c71ea1c4a0891f9149a2f09af2246dc1c5b9e10
[ "MIT" ]
4
2021-03-24T10:03:24.000Z
2021-09-11T21:50:20.000Z
src/04_visualization/plotly_visualization.py
wrijupan/sound-of-failure
a235a9041de15d9b33364e5e3f6d2811bbafe636
[ "MIT" ]
13
2021-03-15T21:51:58.000Z
2021-04-04T11:54:46.000Z
src/04_visualization/plotly_visualization.py
wrijupan/sound-of-failure
a235a9041de15d9b33364e5e3f6d2811bbafe636
[ "MIT" ]
2
2021-04-04T10:49:57.000Z
2021-04-12T08:14:40.000Z
import sys import plotly.graph_objects as go import numpy as np from plotly.subplots import make_subplots from scipy import interpolate sys.path += ['src/01_data_processing', 'src/02_modelling', 'src/03_modell_evaluation', 'src/00_utils'] import spectrogram as spec import train_test_split as splt import train_model_a...
38.67033
117
0.50135
import sys import plotly.graph_objects as go import numpy as np from plotly.subplots import make_subplots from scipy import interpolate sys.path += ['src/01_data_processing', 'src/02_modelling', 'src/03_modell_evaluation', 'src/00_utils'] import spectrogram as spec import train_test_split as splt import train_model_a...
0
0
0
007082f4b7ad2ef310f02199ed70e651282b80b5
3,361
py
Python
SNOMEDCTToOWL/RF2Files/Relationship.py
hsolbrig/SNOMEDToOWL
b9994e842822e98f6d01561d4b54902e4da5e79a
[ "Apache-2.0" ]
9
2016-11-22T14:54:10.000Z
2021-02-16T01:49:54.000Z
SNOMEDCTToOWL/RF2Files/Relationship.py
hsolbrig/SNOMEDToOWL
b9994e842822e98f6d01561d4b54902e4da5e79a
[ "Apache-2.0" ]
24
2016-12-20T17:55:05.000Z
2021-08-17T14:07:08.000Z
SNOMEDCTToOWL/RF2Files/Relationship.py
hsolbrig/SNOMEDToOWL
b9994e842822e98f6d01561d4b54902e4da5e79a
[ "Apache-2.0" ]
1
2017-01-09T16:47:14.000Z
2017-01-09T16:47:14.000Z
from typing import Dict, Set from .RF2File import RF2File from .Transitive import Transitive from SNOMEDCTToOWL.TransformationContext import TransformationContext from SNOMEDCTToOWL.SNOMEDToOWLConstants import * class Relationship: """ A RF2 stated relationship or relationship entry Properties: * so...
43.089744
115
0.65903
from typing import Dict, Set from .RF2File import RF2File from .Transitive import Transitive from SNOMEDCTToOWL.TransformationContext import TransformationContext from SNOMEDCTToOWL.SNOMEDToOWLConstants import * class Relationship: """ A RF2 stated relationship or relationship entry Properties: * so...
486
1,763
50
763eba53c8b3ff1b00fb89db187325b7c17da143
7,317
py
Python
vulnerable_image_check/lib/report.py
cloudpassage-community/vulnerable_image_check
5ba1133753b366efe5276bf0879bc5c3a74b3263
[ "BSD-2-Clause" ]
2
2018-02-05T20:09:21.000Z
2018-02-20T16:11:09.000Z
vulnerable_image_check/lib/report.py
cloudpassage-community/vulnerable_image_check
5ba1133753b366efe5276bf0879bc5c3a74b3263
[ "BSD-2-Clause" ]
11
2018-02-07T01:53:09.000Z
2018-03-15T00:49:04.000Z
vulnerable_image_check/lib/report.py
cloudpassage-community/vulnerable_image_check
5ba1133753b366efe5276bf0879bc5c3a74b3263
[ "BSD-2-Clause" ]
null
null
null
import base64 import csv import io from utility import Utility class Report(object): """ We use this class to generate text reports. Class based on awilson@cloudpassage.com's Report.py class and modified for this purpose """ @classmethod def create_csv_report(cls, vulnerable_image_check_da...
33.410959
120
0.563619
import base64 import csv import io from utility import Utility class Report(object): """ We use this class to generate text reports. Class based on awilson@cloudpassage.com's Report.py class and modified for this purpose """ @classmethod def create_csv_report(cls, vulnerable_image_check_da...
0
0
0
b6673d7bf9274ebe5763cc02700041918991fdc3
248
py
Python
webserver/configure.py
cuauv/software
5ad4d52d603f81a7f254f365d9b0fe636d03a260
[ "BSD-3-Clause" ]
70
2015-11-16T18:04:01.000Z
2022-03-05T09:04:02.000Z
webserver/configure.py
cuauv/software
5ad4d52d603f81a7f254f365d9b0fe636d03a260
[ "BSD-3-Clause" ]
1
2016-08-03T05:13:19.000Z
2016-08-03T06:19:39.000Z
webserver/configure.py
cuauv/software
5ad4d52d603f81a7f254f365d9b0fe636d03a260
[ "BSD-3-Clause" ]
34
2015-12-15T17:29:23.000Z
2021-11-18T14:15:12.000Z
#!/usr/bin/env python3 from build import ninja_common build = ninja_common.Build('webserver') build.webpack('static/bundle.js', 'webpack.config.js', 'src', 'webserver/package.json') build.install('auv-webserver', f='webserver/auv-webserver.py')
27.555556
87
0.75
#!/usr/bin/env python3 from build import ninja_common build = ninja_common.Build('webserver') build.webpack('static/bundle.js', 'webpack.config.js', 'src', 'webserver/package.json') build.install('auv-webserver', f='webserver/auv-webserver.py')
0
0
0
f2fdc059f1c387105beb7cef04d51ec6284369dc
1,608
py
Python
N10037/main.py
carmocca/UVA
c02bf55fc444309c94d938618911f22b0d9a14e1
[ "MIT" ]
3
2019-05-05T06:00:06.000Z
2021-02-25T19:03:32.000Z
N10037/main.py
carmocca/UVA
c02bf55fc444309c94d938618911f22b0d9a14e1
[ "MIT" ]
null
null
null
N10037/main.py
carmocca/UVA
c02bf55fc444309c94d938618911f22b0d9a14e1
[ "MIT" ]
3
2019-10-16T15:42:58.000Z
2021-04-11T16:50:20.000Z
import sys if __name__ == '__main__': print(''.join(main(sys.stdin)), end='')
27.724138
81
0.518657
import sys def get_movements(waiting): people = len(waiting) if people == 1: return [[waiting.pop()]] elif people == 2: return [[waiting.pop(), waiting.pop()]] elif people == 3: fastest = waiting.pop(0) return [[fastest, waiting.pop()], [fastest], ...
1,452
0
69
f12aafcc0f274588085b0864de694cadc3f97e94
3,409
py
Python
tests/feature_tests/test_avg_size_of_hole.py
smogork/TAiO_ImageClassification
14b2f6e707475b45e936a8ddd4345309aaef78f2
[ "MIT" ]
null
null
null
tests/feature_tests/test_avg_size_of_hole.py
smogork/TAiO_ImageClassification
14b2f6e707475b45e936a8ddd4345309aaef78f2
[ "MIT" ]
2
2021-10-12T17:45:49.000Z
2021-12-21T19:23:30.000Z
tests/feature_tests/test_avg_size_of_hole.py
smogork/TAiO_ImageClassification
14b2f6e707475b45e936a8ddd4345309aaef78f2
[ "MIT" ]
null
null
null
#! /usr/bin/env python """ Modul zawiera testy klasy AvgSizeOfHoleFeature """ import unittest from bitmap.bitmap_grayscale import BitmapGrayscale from feature.simple_features.avg_size_of_hole_feature import AvgSizeOfHoleFeature from tests.bitmap_generator import BitmapGenerator class TestAvgSizeOfHoleFeature(unitt...
28.889831
100
0.652684
#! /usr/bin/env python """ Modul zawiera testy klasy AvgSizeOfHoleFeature """ import unittest from bitmap.bitmap_grayscale import BitmapGrayscale from feature.simple_features.avg_size_of_hole_feature import AvgSizeOfHoleFeature from tests.bitmap_generator import BitmapGenerator class TestAvgSizeOfHoleFeature(unitt...
44
0
26
2f9d999e06154f8a14aebf5627c5c8382781dca7
1,126
py
Python
utility/read_input.py
ParsaHejabi/USC-CSCI570-AnalysisOfAlgorithms
0c565c8ddc799d6ca379b3f807fda5579f8e1607
[ "MIT" ]
null
null
null
utility/read_input.py
ParsaHejabi/USC-CSCI570-AnalysisOfAlgorithms
0c565c8ddc799d6ca379b3f807fda5579f8e1607
[ "MIT" ]
null
null
null
utility/read_input.py
ParsaHejabi/USC-CSCI570-AnalysisOfAlgorithms
0c565c8ddc799d6ca379b3f807fda5579f8e1607
[ "MIT" ]
null
null
null
def read_input_file(input_file_address) -> dict: """ Takes a string as input file address and returns the base strings along indices for each base string """ res = dict() res['first_base_string'] = '' res['first_base_string_indices'] = [] res['second_base_string'] = '' res['second_base_s...
43.307692
104
0.624334
def read_input_file(input_file_address) -> dict: """ Takes a string as input file address and returns the base strings along indices for each base string """ res = dict() res['first_base_string'] = '' res['first_base_string_indices'] = [] res['second_base_string'] = '' res['second_base_s...
0
0
0
867c88608ae0b2f7eae8b9bf37ebf6d007238668
7,479
py
Python
applications/link/modules/wrapper/db.py
link-money-dev/link-api-web-service
3da226c7115ee4267f8346620029b710b9987e74
[ "BSD-3-Clause" ]
null
null
null
applications/link/modules/wrapper/db.py
link-money-dev/link-api-web-service
3da226c7115ee4267f8346620029b710b9987e74
[ "BSD-3-Clause" ]
1
2021-06-01T22:32:25.000Z
2021-06-01T22:32:25.000Z
applications/watcher/modules/wrapper/db.py
link-money-dev/link-api-web-service
3da226c7115ee4267f8346620029b710b9987e74
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: UTF-8 -*- # 基于 sqlite4dummy 的基本架构重新写了一个超简易版本的 sqlite 数据库管理库 # 本程序提供必要的sqlite操作方法,并对一个sqlite数据库进行初始化 # 本程序从自己启动,外部只能调用其方法 # 本程序的主入口程序为 main() # 请填写下面几个参数: # 第一个参数为数据库名称 DB_NAME='' import os import sqlite3 import sqlite4dummy import psycopg2 class Column(): """Represent a Column in a :class:`Table`...
28.876448
110
0.598476
# -*- coding: UTF-8 -*- # 基于 sqlite4dummy 的基本架构重新写了一个超简易版本的 sqlite 数据库管理库 # 本程序提供必要的sqlite操作方法,并对一个sqlite数据库进行初始化 # 本程序从自己启动,外部只能调用其方法 # 本程序的主入口程序为 main() # 请填写下面几个参数: # 第一个参数为数据库名称 DB_NAME='' import os import sqlite3 import sqlite4dummy import psycopg2 class Column(): """Represent a Column in a :class:`Table`...
4,171
-5
449
deeecbe0ef1f614800c14507ab55e8e7531582f4
255
py
Python
src/gedml/launcher/creators/factories/selectors_creator.py
wangck20/GeDML
1f76ac2094d7b88be7fd4eb6145e5586e547b9ca
[ "MIT" ]
25
2021-09-06T13:26:02.000Z
2022-01-06T13:25:24.000Z
src/gedml/launcher/creators/factories/selectors_creator.py
wangck20/GeDML
1f76ac2094d7b88be7fd4eb6145e5586e547b9ca
[ "MIT" ]
1
2021-09-09T08:29:29.000Z
2021-09-13T15:05:59.000Z
src/gedml/launcher/creators/factories/selectors_creator.py
wangck20/GeDML
1f76ac2094d7b88be7fd4eb6145e5586e547b9ca
[ "MIT" ]
2
2021-09-07T08:44:41.000Z
2021-09-09T08:31:55.000Z
from .base_creator import BaseCreator
28.333333
38
0.670588
from .base_creator import BaseCreator class selectorsCreator(BaseCreator): def __init__(self, **kwargs): super().__init__(**kwargs) def prepare_packages(self): from ....core import selectors self.package = [selectors]
123
15
80
729dea7bac9475aa81c26b745205c007344b419a
2,773
py
Python
src/AuShadha/immunisation/urls.py
GosthMan/AuShadha
3ab48825a0dba19bf880b6ac6141ab7a6adf1f3e
[ "PostgreSQL" ]
46
2015-03-04T14:19:47.000Z
2021-12-09T02:58:46.000Z
src/AuShadha/immunisation/urls.py
aytida23/AuShadha
3ab48825a0dba19bf880b6ac6141ab7a6adf1f3e
[ "PostgreSQL" ]
2
2015-06-05T10:29:04.000Z
2015-12-06T16:54:10.000Z
src/AuShadha/immunisation/urls.py
aytida23/AuShadha
3ab48825a0dba19bf880b6ac6141ab7a6adf1f3e
[ "PostgreSQL" ]
24
2015-03-23T01:38:11.000Z
2022-01-24T16:23:42.000Z
################################################################################ # Project : AuShadha # Description : URLS for Immunisation History # Author : Dr. Easwar T.R # Date : 21-09-2013 # License : GNU-GPL Version 3, see AuShadha/LICENSE.txt #############################################...
34.6625
80
0.434187
################################################################################ # Project : AuShadha # Description : URLS for Immunisation History # Author : Dr. Easwar T.R # Date : 21-09-2013 # License : GNU-GPL Version 3, see AuShadha/LICENSE.txt #############################################...
0
0
0
d255b9bc53c5841e75c0734453756785611dcc3d
694
py
Python
examples/collection.py
tushkanin/jsondataclass
a96d749de9a1c46b1f0bbf380d61dc40e72c51d9
[ "MIT" ]
null
null
null
examples/collection.py
tushkanin/jsondataclass
a96d749de9a1c46b1f0bbf380d61dc40e72c51d9
[ "MIT" ]
1
2021-11-15T17:49:32.000Z
2021-11-15T17:49:32.000Z
examples/collection.py
tushkanin/jsondataclass
a96d749de9a1c46b1f0bbf380d61dc40e72c51d9
[ "MIT" ]
null
null
null
from dataclasses import dataclass from typing import List, Tuple, Dict from jsondataclass import from_json, to_json @dataclass movie = Movie(["comedy", "crime"], (5.6, 100), {"en": "WALL-E", "de": "WALL-E"}) json_str = to_json(movie) print(json_str) # {"genres": ["comedy", "crime"], "rating": [5.6, 100], "name": {"...
31.545455
108
0.610951
from dataclasses import dataclass from typing import List, Tuple, Dict from jsondataclass import from_json, to_json @dataclass class Movie: genres: List[str] rating: Tuple[float, int] name: Dict[str, str] movie = Movie(["comedy", "crime"], (5.6, 100), {"en": "WALL-E", "de": "WALL-E"}) json_str = to_json...
0
68
22
2204dc414b6912eb03b9d5e8e2dbe8e4c2b009aa
2,865
py
Python
utils/metrics.py
PPGod95/FIDTM
b5582c5cc485496d85af2043ffd6e4266f354f3b
[ "MIT" ]
null
null
null
utils/metrics.py
PPGod95/FIDTM
b5582c5cc485496d85af2043ffd6e4266f354f3b
[ "MIT" ]
null
null
null
utils/metrics.py
PPGod95/FIDTM
b5582c5cc485496d85af2043ffd6e4266f354f3b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @Project : @FileName: @Author :penghr @Time :202x/xx/xx xx:xx @Desc : """ import math import cv2 import numpy as np import scipy.spatial import torch import torch.nn as nn import torch.nn.functional as F def generate_point_map(kpoint, f_loc, rate=1): '''obtain the location c...
30.478723
120
0.575567
# -*- coding: utf-8 -*- """ @Project : @FileName: @Author :penghr @Time :202x/xx/xx xx:xx @Desc : """ import math import cv2 import numpy as np import scipy.spatial import torch import torch.nn as nn import torch.nn.functional as F def LMDS_counting(fmap, img_name, f_loc): input_max = torch.max(fmap).it...
612
0
23
2935d7d8b452877c5c148013fc96811bccebe1ad
33,897
py
Python
examples/rsfmri_preprocessing.py
dmordom/nipype
e815741ad68d63b7134b6db6225aabb0c38511ac
[ "BSD-3-Clause" ]
1
2018-04-18T12:13:37.000Z
2018-04-18T12:13:37.000Z
examples/rsfmri_preprocessing.py
ito-takuya/nipype
9099a5809487b55868cdec82a719030419cbd6ba
[ "BSD-3-Clause" ]
null
null
null
examples/rsfmri_preprocessing.py
ito-takuya/nipype
9099a5809487b55868cdec82a719030419cbd6ba
[ "BSD-3-Clause" ]
1
2021-09-08T14:31:47.000Z
2021-09-08T14:31:47.000Z
#!/usr/bin/env python """ ================================================================ rsfMRI: AFNI, ANTS, DicomStack, FreeSurfer, FSL, Nipy, aCompCorr ================================================================ A preprocessing workflow for Siemens resting state data. This workflow makes use of: - AFNI - A...
42.85335
136
0.620468
#!/usr/bin/env python """ ================================================================ rsfMRI: AFNI, ANTS, DicomStack, FreeSurfer, FSL, Nipy, aCompCorr ================================================================ A preprocessing workflow for Siemens resting state data. This workflow makes use of: - AFNI - A...
21,924
0
46
ef39c4661ae82fb6ae41df37716b835a60ad8d39
1,399
py
Python
tests/storage/dav/test_main.py
AlecPapierniak/vdirsyncer
27ebb0902bba66c2d26f892353bf6f05e849fe81
[ "BSD-3-Clause" ]
1
2020-09-29T14:42:08.000Z
2020-09-29T14:42:08.000Z
tests/storage/dav/test_main.py
AlecPapierniak/vdirsyncer
27ebb0902bba66c2d26f892353bf6f05e849fe81
[ "BSD-3-Clause" ]
null
null
null
tests/storage/dav/test_main.py
AlecPapierniak/vdirsyncer
27ebb0902bba66c2d26f892353bf6f05e849fe81
[ "BSD-3-Clause" ]
1
2020-09-30T08:36:36.000Z
2020-09-30T08:36:36.000Z
import pytest from vdirsyncer.storage.dav import _BAD_XML_CHARS from vdirsyncer.storage.dav import _merge_xml from vdirsyncer.storage.dav import _parse_xml @pytest.mark.parametrize('char', range(32))
32.534884
72
0.518227
import pytest from vdirsyncer.storage.dav import _BAD_XML_CHARS from vdirsyncer.storage.dav import _merge_xml from vdirsyncer.storage.dav import _parse_xml def test_xml_utilities(): x = _parse_xml(b'''<?xml version="1.0" encoding="UTF-8" ?> <D:multistatus xmlns:D="DAV:"> <D:response> ...
1,150
0
45
7040b36361e9dc301170f0d358f3b21042e633a0
4,241
py
Python
prev_ob_models/exclude/GilraBhalla2015/channels/load_channels.py
fameshpatel/olfactorybulb
8d7a644b4560309ef177c0590ff73ed4c2432604
[ "MIT" ]
null
null
null
prev_ob_models/exclude/GilraBhalla2015/channels/load_channels.py
fameshpatel/olfactorybulb
8d7a644b4560309ef177c0590ff73ed4c2432604
[ "MIT" ]
null
null
null
prev_ob_models/exclude/GilraBhalla2015/channels/load_channels.py
fameshpatel/olfactorybulb
8d7a644b4560309ef177c0590ff73ed4c2432604
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import math sys.path.extend(["..","../channels/"]) from NaChannel import * from KFastChannel import * from KSlowChannel import * from CaLChannel import * from KAChannel import * ## use KCaChannel instead of KCaMPIChannel, in a non-MPI i.e. non-parall...
46.097826
153
0.683801
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import math sys.path.extend(["..","../channels/"]) from NaChannel import * from KFastChannel import * from KSlowChannel import * from CaLChannel import * from KAChannel import * ## use KCaChannel instead of KCaMPIChannel, in a non-MPI i.e. non-parall...
3,198
0
46
c4be31d36b3518697eb7d6f927237f318ef53b65
2,804
py
Python
ztest/api_1_0/phone.py
Kk0t/Flask-phone-administration
4acdcedabe7725c6ce2b57e32bd54551cdbb5297
[ "CC0-1.0" ]
null
null
null
ztest/api_1_0/phone.py
Kk0t/Flask-phone-administration
4acdcedabe7725c6ce2b57e32bd54551cdbb5297
[ "CC0-1.0" ]
null
null
null
ztest/api_1_0/phone.py
Kk0t/Flask-phone-administration
4acdcedabe7725c6ce2b57e32bd54551cdbb5297
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2021/9/10 14:23 # @Author : WuBingTai from ztest import db from ztest.models import Phone from ztest.utils.common import login_required from ztest.utils.response_code import RET from . import api from flask import jsonify, request, current_app # 测试机列表 @api.route("/phone/list") @...
31.155556
101
0.64301
# -*- coding: utf-8 -*- # @Time : 2021/9/10 14:23 # @Author : WuBingTai from ztest import db from ztest.models import Phone from ztest.utils.common import login_required from ztest.utils.response_code import RET from . import api from flask import jsonify, request, current_app # 测试机列表 @api.route("/phone/list") @...
2,406
0
44
92db780c10a1808558c4ea098be409cccef53599
4,145
py
Python
example_planets/epic203771098.py
lgbouma/radvel
4ba645468d4c742e04c5965a3c74180f1ed2353b
[ "MIT" ]
null
null
null
example_planets/epic203771098.py
lgbouma/radvel
4ba645468d4c742e04c5965a3c74180f1ed2353b
[ "MIT" ]
2
2019-03-13T18:37:41.000Z
2019-04-10T19:57:36.000Z
example_planets/epic203771098.py
lgbouma/radvel
4ba645468d4c742e04c5965a3c74180f1ed2353b
[ "MIT" ]
null
null
null
# Example Keplerian fit configuration file # Required packages for setup import os import pandas as pd import numpy as np import radvel # Define global planetary system and dataset parameters starname = 'epic203771098' nplanets = 2 # number of planets in the system instnames = ['j'] # list of instrument names. ...
45.549451
134
0.72304
# Example Keplerian fit configuration file # Required packages for setup import os import pandas as pd import numpy as np import radvel # Define global planetary system and dataset parameters starname = 'epic203771098' nplanets = 2 # number of planets in the system instnames = ['j'] # list of instrument names. ...
0
0
0
a2ed73df44165a0b6222692affca1d7a0ede3535
1,536
py
Python
tests/pipeline_test.py
isi-vista/adam
43542c4486af7533938e77e7191eae630541a891
[ "MIT" ]
8
2019-07-02T20:29:31.000Z
2022-01-03T18:20:41.000Z
tests/pipeline_test.py
Tubbz-alt/adam
91f392f2529a98cd50c095a18769ae4b55ce4292
[ "MIT" ]
1,011
2019-07-02T18:00:48.000Z
2022-03-25T14:56:32.000Z
tests/pipeline_test.py
Tubbz-alt/adam
91f392f2529a98cd50c095a18769ae4b55ce4292
[ "MIT" ]
4
2020-08-05T15:36:55.000Z
2022-01-12T17:16:28.000Z
from vistautils.iter_utils import only from adam.language import TokenSequenceLinguisticDescription from adam.learner import LearningExample, MemorizingLanguageLearner from adam.perception import ( BagOfFeaturesPerceptualRepresentationFrame, PerceptualRepresentation, )
34.909091
90
0.721354
from vistautils.iter_utils import only from adam.language import TokenSequenceLinguisticDescription from adam.learner import LearningExample, MemorizingLanguageLearner from adam.perception import ( BagOfFeaturesPerceptualRepresentationFrame, PerceptualRepresentation, ) def test_pipeline(): curriculum = [...
1,233
0
23
75ea05792a1f9507e47a6c1f81b0ac0d04cc3a14
87
py
Python
programs/exceptions/syntax_error.py
dasari-mohana/100_page_python_intro
7b8aecb3be2f2abbaf168b068b1299a1f3b9b97e
[ "MIT" ]
163
2020-12-26T13:24:20.000Z
2022-03-24T14:30:42.000Z
programs/exceptions/syntax_error.py
pr0b3r7/100_page_python_intro
7b8aecb3be2f2abbaf168b068b1299a1f3b9b97e
[ "MIT" ]
1
2021-06-26T18:26:39.000Z
2021-06-26T18:27:26.000Z
programs/exceptions/syntax_error.py
pr0b3r7/100_page_python_intro
7b8aecb3be2f2abbaf168b068b1299a1f3b9b97e
[ "MIT" ]
33
2021-02-09T14:13:28.000Z
2022-03-28T21:23:14.000Z
print('hello') main)
8.7
21
0.517241
print('hello') def main(): num = 5 total = num + 09 print(total) main)
41
0
23
ac84d923e6756df2ed1d75aa35203c8338b59d07
1,155
py
Python
Proper/proper/prop_get_nyquistsampling.py
RupertDodkins/medis
bdb1f00fb93506da2a1f251bc6780e70e97a16c5
[ "MIT" ]
1
2021-06-25T17:35:56.000Z
2021-06-25T17:35:56.000Z
Proper/proper/prop_get_nyquistsampling.py
RupertDodkins/medis
bdb1f00fb93506da2a1f251bc6780e70e97a16c5
[ "MIT" ]
null
null
null
Proper/proper/prop_get_nyquistsampling.py
RupertDodkins/medis
bdb1f00fb93506da2a1f251bc6780e70e97a16c5
[ "MIT" ]
2
2018-12-08T15:05:13.000Z
2019-08-08T17:28:24.000Z
# Copyright 2016, 2017 California Institute of Technology # Users must agree to abide by the restrictions listed in the # file "LegalStuff.txt" in the PROPER library directory. # # PROPER developed at Jet Propulsion Laboratory/California Inst. Technology # Original IDL version by John Krist # Python transla...
32.083333
77
0.674459
# Copyright 2016, 2017 California Institute of Technology # Users must agree to abide by the restrictions listed in the # file "LegalStuff.txt" in the PROPER library directory. # # PROPER developed at Jet Propulsion Laboratory/California Inst. Technology # Original IDL version by John Krist # Python transla...
0
0
0
689daa725033885ac10d168ae036c0ccfd02ab2f
1,071
py
Python
django_google_recaptcha/checks.py
GustavoBPereira/django-recaptcha
944c93b1412f1756d1818185bae88147dd16995d
[ "X11", "MIT" ]
null
null
null
django_google_recaptcha/checks.py
GustavoBPereira/django-recaptcha
944c93b1412f1756d1818185bae88147dd16995d
[ "X11", "MIT" ]
null
null
null
django_google_recaptcha/checks.py
GustavoBPereira/django-recaptcha
944c93b1412f1756d1818185bae88147dd16995d
[ "X11", "MIT" ]
null
null
null
from django.conf import settings from django.core import checks from django_google_recaptcha.constants import TEST_PRIVATE_KEY, TEST_PUBLIC_KEY
38.25
79
0.678805
from django.conf import settings from django.core import checks from django_google_recaptcha.constants import TEST_PRIVATE_KEY, TEST_PUBLIC_KEY def recaptcha_key_check(app_configs, **kwargs): errors = [] private_key = getattr( settings, "RECAPTCHA_PRIVATE_KEY", TEST_PRIVATE_KEY) public_key = geta...
902
0
23
b67cb72fba5ffe6b256b7a9edc6f10aabfa0030c
926
py
Python
ricerca_app/migrations/0037_auto_20211202_0439.py
UniversitaDellaCalabria/Ricerca
b46157d3182d1c59cff4d36cc63b9e89f2f320c9
[ "Apache-2.0" ]
null
null
null
ricerca_app/migrations/0037_auto_20211202_0439.py
UniversitaDellaCalabria/Ricerca
b46157d3182d1c59cff4d36cc63b9e89f2f320c9
[ "Apache-2.0" ]
1
2020-08-03T15:12:46.000Z
2020-09-03T22:12:16.000Z
ricerca_app/migrations/0037_auto_20211202_0439.py
UniversitaDellaCalabria/Ricerca
b46157d3182d1c59cff4d36cc63b9e89f2f320c9
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.7 on 2021-12-02 04:39 from django.db import migrations, models import django.db.models.deletion
31.931034
164
0.647948
# Generated by Django 3.2.7 on 2021-12-02 04:39 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('ricerca_app', '0036_laboratoriodatibase_nome_file_logo'), ] operations = [ migrations.RemoveField( ...
0
779
23
3b3d78c726e1c168161e921e693197654cc8d476
3,258
py
Python
africanus/util/code.py
JoshVStaden/codex-africanus
4a38994431d51510b1749fa0e4b8b6190b8b530f
[ "BSD-3-Clause" ]
13
2018-04-06T09:36:13.000Z
2021-04-13T13:11:00.000Z
africanus/util/code.py
JoshVStaden/codex-africanus
4a38994431d51510b1749fa0e4b8b6190b8b530f
[ "BSD-3-Clause" ]
153
2018-03-28T14:13:48.000Z
2022-02-03T07:49:17.000Z
africanus/util/code.py
JoshVStaden/codex-africanus
4a38994431d51510b1749fa0e4b8b6190b8b530f
[ "BSD-3-Clause" ]
14
2018-03-29T13:30:52.000Z
2021-06-12T02:56:55.000Z
# -*- coding: utf-8 -*- from functools import wraps try: from dask.utils import SerializableLock as Lock except ImportError: from threading import Lock def format_code(code): """ Formats some code with line numbers Parameters ---------- code : str Code Returns -------...
27.610169
78
0.556476
# -*- coding: utf-8 -*- from functools import wraps try: from dask.utils import SerializableLock as Lock except ImportError: from threading import Lock class SingletonMixin(object): __singleton_lock = Lock() __singleton_instance = None @classmethod def instance(cls): if not cls.__s...
668
114
77
983d10efe6acf6f4dbb6c708e453e20c0b3674bc
112
py
Python
Conditions/Climates/Hail.py
saisua/RAF-Game
79b2b618aa18c31a40c080865b58fac02c1cac68
[ "MIT" ]
null
null
null
Conditions/Climates/Hail.py
saisua/RAF-Game
79b2b618aa18c31a40c080865b58fac02c1cac68
[ "MIT" ]
null
null
null
Conditions/Climates/Hail.py
saisua/RAF-Game
79b2b618aa18c31a40c080865b58fac02c1cac68
[ "MIT" ]
null
null
null
from .Climate import Climate
16
28
0.625
from .Climate import Climate class Hail(Climate): name:str="Hail" def __init__(self): pass
11
50
23
b9c81a7b70f41df791135857217abd8e545c6539
665
py
Python
tests/test_configuration.py
ta4tsering/pyrrha-bo
d5afbe4b37d4d2ad5b5bb4129b1dccaeb50c9b17
[ "MIT" ]
16
2018-11-16T13:48:20.000Z
2020-11-13T21:28:06.000Z
tests/test_configuration.py
ta4tsering/pyrrha-bo
d5afbe4b37d4d2ad5b5bb4129b1dccaeb50c9b17
[ "MIT" ]
179
2018-11-16T12:43:05.000Z
2022-03-31T08:52:22.000Z
tests/test_configuration.py
ta4tsering/pyrrha-bo
d5afbe4b37d4d2ad5b5bb4129b1dccaeb50c9b17
[ "MIT" ]
21
2019-02-17T15:56:29.000Z
2022-03-28T09:27:57.000Z
from unittest import TestCase from glob import glob
31.666667
70
0.544361
from unittest import TestCase from glob import glob class CheckConfigurations(TestCase): def test_unique_values(self): """ Check that configuration do not contain duplicate lines""" for config in glob("app/configurations/langs/**/*.txt"): with open(config) as f: content...
0
589
23
73cf6863bbca4b6719de97cc9d81ce4bd5459cf8
746
py
Python
2018/11/part1.py
mihaip/adventofcode
3725668595bfcf619fe6c97d12e2f14b42e3f0cb
[ "Apache-2.0" ]
null
null
null
2018/11/part1.py
mihaip/adventofcode
3725668595bfcf619fe6c97d12e2f14b42e3f0cb
[ "Apache-2.0" ]
null
null
null
2018/11/part1.py
mihaip/adventofcode
3725668595bfcf619fe6c97d12e2f14b42e3f0cb
[ "Apache-2.0" ]
null
null
null
#!/usr/local/bin/python3 input = 1133 power_levels = [] for x in range(1, 301): row = [] for y in range(1, 301): row.append(power_level(x, y)) power_levels.append(row) best_square = None best_power = None for x in range(1, 298): for y in range(1, 298): sum = 0 for i in range(0, 3): for j in range(0, ...
21.314286
89
0.647453
#!/usr/local/bin/python3 input = 1133 def power_level(x, y): rack_id = x + 10 power_level = rack_id * y power_level += input power_level *= rack_id power_level = int(power_level / 100) % 10 power_level -= 5 return power_level power_levels = [] for x in range(1, 301): row = [] for y in range(1, 301): row.a...
173
0
23
6d19666ed61331bdd9b8526005047ebf3a9aa098
2,645
py
Python
plugins/collage.py
loktacar/wallpapermaker
3feb075c30b138decca8f6d57566ab4258d8ac75
[ "MIT" ]
1
2021-12-07T11:03:47.000Z
2021-12-07T11:03:47.000Z
plugins/collage.py
loktacar/wallpapermaker
3feb075c30b138decca8f6d57566ab4258d8ac75
[ "MIT" ]
null
null
null
plugins/collage.py
loktacar/wallpapermaker
3feb075c30b138decca8f6d57566ab4258d8ac75
[ "MIT" ]
1
2021-12-07T11:06:10.000Z
2021-12-07T11:06:10.000Z
### Base class for Collage plugins ### import math import logging import pygame from plugin import Plugin class Collage(Plugin): """ Base class for collage plugins See simple_resize.py or recursive_split.py for example implementation of a plugin """ @staticmethod def generate(s...
30.056818
93
0.593573
### Base class for Collage plugins ### import math import logging import pygame from plugin import Plugin class Collage(Plugin): """ Base class for collage plugins See simple_resize.py or recursive_split.py for example implementation of a plugin """ def __init__(self, config): ...
749
0
80
53a804a1567d561668b0c64f534904bfd9e880d3
570
py
Python
templatetricks/override_autoescaped.py
jinalharia/flask-snippets
9871815f32f6eaf6d27e8be34b0a0b22172e203f
[ "BSD-3-Clause" ]
43
2015-10-23T06:36:56.000Z
2022-02-23T09:22:30.000Z
templatetricks/override_autoescaped.py
jinalharia/flask-snippets
9871815f32f6eaf6d27e8be34b0a0b22172e203f
[ "BSD-3-Clause" ]
null
null
null
templatetricks/override_autoescaped.py
jinalharia/flask-snippets
9871815f32f6eaf6d27e8be34b0a0b22172e203f
[ "BSD-3-Clause" ]
15
2015-09-27T12:39:02.000Z
2021-07-17T16:16:15.000Z
# -*- coding: utf-8 -*- """ templatetricks.override_autoescaped ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Override which templates are autoescaped http://flask.pocoo.org/snippets/41/ """ import os import sys sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) from flask import F...
23.75
79
0.664912
# -*- coding: utf-8 -*- """ templatetricks.override_autoescaped ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Override which templates are autoescaped http://flask.pocoo.org/snippets/41/ """ import os import sys sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) from flask import F...
148
11
50
a29afba16dbdda98ece1a57a82a914b4c0f3b1bf
5,062
py
Python
ffx_render.py
tinkerbeast/ffx-ai
b4d0e6397d8c18c2d5a4f423f8f6866a06c6d2b4
[ "Apache-2.0" ]
null
null
null
ffx_render.py
tinkerbeast/ffx-ai
b4d0e6397d8c18c2d5a4f423f8f6866a06c6d2b4
[ "Apache-2.0" ]
null
null
null
ffx_render.py
tinkerbeast/ffx-ai
b4d0e6397d8c18c2d5a4f423f8f6866a06c6d2b4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import logging import os import pandas as pd import shutil import subprocess import tempfile from multiprocessing.pool import ThreadPool import bg_convert from thirdparty_xentax import phyre if __name__ == '__main__': # get available models chr_pat...
38.06015
136
0.615765
# -*- coding: utf-8 -*- import logging import os import pandas as pd import shutil import subprocess import tempfile from multiprocessing.pool import ThreadPool import bg_convert from thirdparty_xentax import phyre def model_gather(chr_path, filter_dirs=[]): model_data = [] sub_dirs = os.lis...
2,521
0
149
6ef26fa3bcf2699bb73789962e23ccdf5714ee22
447
py
Python
backend/cart/urls.py
harizMunawar/La-Virtuele
051d11a281620b36638b6be50e71d3c893ce1568
[ "MIT" ]
2
2021-02-23T16:30:27.000Z
2021-03-21T08:12:39.000Z
backend/cart/urls.py
harizMunawar/La-Virtuele
051d11a281620b36638b6be50e71d3c893ce1568
[ "MIT" ]
9
2021-02-23T09:05:32.000Z
2021-07-02T11:41:55.000Z
backend/cart/urls.py
harizMunawar/La-Virtuele
051d11a281620b36638b6be50e71d3c893ce1568
[ "MIT" ]
1
2021-02-23T07:42:17.000Z
2021-02-23T07:42:17.000Z
from django.urls import path from cart.views import CartItem, Carts, Checkout, ToggleCartItem app_name = 'cart' urlpatterns = [ path('carts/', Carts.as_view(),name='cart-list'), path('carts/items/<slug:slug>/<size>/', CartItem.as_view(), name='add-remove-cart-item'), path('carts/toggle/items/<slug:slug>/<s...
44.7
102
0.695749
from django.urls import path from cart.views import CartItem, Carts, Checkout, ToggleCartItem app_name = 'cart' urlpatterns = [ path('carts/', Carts.as_view(),name='cart-list'), path('carts/items/<slug:slug>/<size>/', CartItem.as_view(), name='add-remove-cart-item'), path('carts/toggle/items/<slug:slug>/<s...
0
0
0
0dbb59bbb43a54238ffdc076caee1cbf2ff74581
33,165
py
Python
hummingbird/ml/_container.py
hannahaih/hummingbird
b8ec670b3c90ec7e87d3ae4a2b268075bd5eae65
[ "MIT" ]
1
2020-12-29T12:51:10.000Z
2020-12-29T12:51:10.000Z
hummingbird/ml/_container.py
hannahaih/hummingbird
b8ec670b3c90ec7e87d3ae4a2b268075bd5eae65
[ "MIT" ]
null
null
null
hummingbird/ml/_container.py
hannahaih/hummingbird
b8ec670b3c90ec7e87d3ae4a2b268075bd5eae65
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ All c...
38.296767
133
0.668657
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ All c...
14,047
3,600
909
9a9aaa55b2245d41e80ede3b36d28d0e62ff0f68
35
py
Python
orchestra/contrib/payments/methods/__init__.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
68
2015-02-09T10:28:44.000Z
2022-03-12T11:08:36.000Z
orchestra/contrib/payments/methods/__init__.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
17
2015-05-01T18:10:03.000Z
2021-03-19T21:52:55.000Z
orchestra/contrib/payments/methods/__init__.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
29
2015-03-31T04:51:03.000Z
2022-02-17T02:58:50.000Z
from .options import PaymentMethod
17.5
34
0.857143
from .options import PaymentMethod
0
0
0
6b3b860f8de66d6e240b469addd2766a5117864d
1,305
py
Python
components/studio/studio/KCRFbackend.py
aitmlouk/stackn
c8029394a15b03796a4864938f9db251b65c7354
[ "Apache-2.0" ]
25
2020-05-08T22:24:54.000Z
2022-03-11T18:16:58.000Z
components/studio/studio/KCRFbackend.py
aitmlouk/stackn
c8029394a15b03796a4864938f9db251b65c7354
[ "Apache-2.0" ]
75
2020-05-08T22:15:59.000Z
2021-11-22T10:00:04.000Z
components/studio/studio/KCRFbackend.py
aitmlouk/stackn
c8029394a15b03796a4864938f9db251b65c7354
[ "Apache-2.0" ]
12
2020-11-04T13:09:46.000Z
2022-03-14T16:22:40.000Z
from django.contrib.auth.models import User from rest_framework import authentication from rest_framework import exceptions from django.conf import settings import jwt import requests as r import modules.keycloak_lib as keylib
40.78125
111
0.671264
from django.contrib.auth.models import User from rest_framework import authentication from rest_framework import exceptions from django.conf import settings import jwt import requests as r import modules.keycloak_lib as keylib class KeycloakAuthentication(authentication.BaseAuthentication): def authenticate(self,...
986
43
49
1b0f1918f46a3472d52ee7c7d05a7733037cefcc
755
py
Python
blogger_publish.py
durgaswaroop/blog-automation
d1f5bb2f35b85f1e2487e7b5e711dfd5864270de
[ "Unlicense" ]
null
null
null
blogger_publish.py
durgaswaroop/blog-automation
d1f5bb2f35b85f1e2487e7b5e711dfd5864270de
[ "Unlicense" ]
null
null
null
blogger_publish.py
durgaswaroop/blog-automation
d1f5bb2f35b85f1e2487e7b5e711dfd5864270de
[ "Unlicense" ]
null
null
null
# Call easyblogger # Client secret and authentication is already stored in ~/.easyblogger.credentials # blogid is stored in ~/.easyblogger import subprocess import blogger_modifications
35.952381
118
0.682119
# Call easyblogger # Client secret and authentication is already stored in ~/.easyblogger.credentials # blogid is stored in ~/.easyblogger import subprocess import blogger_modifications def publish(html_file, title, labels, post_id): # print('publishing', html_file, 'with title', title, 'labels', labels, 'and po...
544
0
23
ed01993e511f84c08d098c1f3223a571cfb8ac43
19,321
py
Python
gnsq/nsqd.py
hiringsolved/gnsq
d1d3c949d3920ba96befac5b9718b1d03ccb6e8b
[ "BSD-3-Clause" ]
null
null
null
gnsq/nsqd.py
hiringsolved/gnsq
d1d3c949d3920ba96befac5b9718b1d03ccb6e8b
[ "BSD-3-Clause" ]
null
null
null
gnsq/nsqd.py
hiringsolved/gnsq
d1d3c949d3920ba96befac5b9718b1d03ccb6e8b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import import blinker import time from gevent import socket try: import simplejson as json except ImportError: import json # pyflakes.ignore from . import protocol as nsq from . import errors from .message import Message from .httpclient import HTTPCl...
31.777961
80
0.625123
# -*- coding: utf-8 -*- from __future__ import absolute_import import blinker import time from gevent import socket try: import simplejson as json except ImportError: import json # pyflakes.ignore from . import protocol as nsq from . import errors from .message import Message from .httpclient import HTTPCl...
3,855
0
538
1f2d1844b3eccb84918f80fdac47539a12562abf
950
py
Python
perfil/migrations/0002_auto_20211018_0921.py
Felipe-007/Ecommerce
f3003b3130709b12ae87b45867a8364f00fef2f1
[ "MIT" ]
null
null
null
perfil/migrations/0002_auto_20211018_0921.py
Felipe-007/Ecommerce
f3003b3130709b12ae87b45867a8364f00fef2f1
[ "MIT" ]
null
null
null
perfil/migrations/0002_auto_20211018_0921.py
Felipe-007/Ecommerce
f3003b3130709b12ae87b45867a8364f00fef2f1
[ "MIT" ]
null
null
null
# Generated by Django 3.2.7 on 2021-10-18 12:21 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
29.6875
137
0.629474
# Generated by Django 3.2.7 on 2021-10-18 12:21 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('perfil', '0001_initial')...
0
773
23