hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
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
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
982b798bc343755a3272085df113ecba5567376b
687
py
Python
tests/test_utils.py
capybala/find-ebook-edition-backend
0321ae8c883fdc241553ad16abf0db9d47eb278d
[ "MIT" ]
null
null
null
tests/test_utils.py
capybala/find-ebook-edition-backend
0321ae8c883fdc241553ad16abf0db9d47eb278d
[ "MIT" ]
null
null
null
tests/test_utils.py
capybala/find-ebook-edition-backend
0321ae8c883fdc241553ad16abf0db9d47eb278d
[ "MIT" ]
null
null
null
from unittest import TestCase from utils import to_bytes, to_str class TestUtils(TestCase): def test_bytes(self): self.assertEqual(to_bytes(b'Should be bytes \xe3\x81\xa0\xe3\x82\x88'), b'Should be bytes \xe3\x81\xa0\xe3\x82\x88') self.assertEqual(to_bytes('Should be byt...
36.157895
86
0.58952
634
0.901849
0
0
0
0
0
0
304
0.432432
982c08be97b8ab5fb5bcf91b48cfeba930557c31
1,723
py
Python
alipay/aop/api/response/AlipayTradeBatchTransferQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/response/AlipayTradeBatchTransferQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/response/AlipayTradeBatchTransferQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.BatchRoyaltyDetail import BatchRoyaltyDetail class AlipayTradeBatchTransferQueryResponse(AlipayResponse): def __init__(self): super(AlipayTradeBatchTrans...
32.509434
110
0.676146
1,523
0.883923
0
0
772
0.448056
0
0
130
0.07545
982c4d2462efaa8078e7d8cc19486e7b382ca3e9
9,418
py
Python
barcodes/views.py
bihealth/digestiflow-server
298c53f95dbf56e7be0d0b8bcceacabc21257d5f
[ "MIT" ]
13
2019-11-27T19:12:15.000Z
2021-12-01T21:32:18.000Z
barcodes/views.py
bihealth/digestiflow-server
298c53f95dbf56e7be0d0b8bcceacabc21257d5f
[ "MIT" ]
60
2019-03-27T14:43:19.000Z
2022-03-22T09:12:53.000Z
barcodes/views.py
bihealth/digestiflow-server
298c53f95dbf56e7be0d0b8bcceacabc21257d5f
[ "MIT" ]
3
2020-11-09T07:08:42.000Z
2022-02-09T11:37:54.000Z
"""The views for the barcodes app.""" import json from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib import messages from django.contrib.messages.views import SuccessMessageMixin from django.db import transaction from django.db.models import ProtectedError from django.shortcuts import rever...
36.223077
108
0.621151
8,663
0.919834
0
0
4,224
0.448503
0
0
2,291
0.243258
982ee8da8c5f2de58352f5bf4f00e71e8a1a90b0
857
py
Python
src/chapter 2/exercise 7.py
group5BCS1/BCS-2021
696b53bdfc46799b4a527604fbd6cd6cfb3982eb
[ "MIT" ]
null
null
null
src/chapter 2/exercise 7.py
group5BCS1/BCS-2021
696b53bdfc46799b4a527604fbd6cd6cfb3982eb
[ "MIT" ]
null
null
null
src/chapter 2/exercise 7.py
group5BCS1/BCS-2021
696b53bdfc46799b4a527604fbd6cd6cfb3982eb
[ "MIT" ]
null
null
null
dollars = float(input("Enter amount to change in dollars :")) # 20 dollar notes num1 = dollars//20 # remainder after 20 num2 = dollars%20 # notes by 10 num3 = num2//10 # remainder after 10 num4 = num2%10 # notes by 5 dollar num5 = num4//5 # remainder after 5 dollars num6 = num4%5 # notes by 1 dollar num7 = num6//1 #rem...
20.902439
61
0.705951
0
0
0
0
0
0
0
0
412
0.480747
983092fd7cd3bc6824b23f7203f539b42bec1abe
713
py
Python
ULA/testeULA.py
RicardoFedrigo/ULA_PYTHON
23c746b2076cf2bc637aa34330e54db49d7a8554
[ "MIT" ]
null
null
null
ULA/testeULA.py
RicardoFedrigo/ULA_PYTHON
23c746b2076cf2bc637aa34330e54db49d7a8554
[ "MIT" ]
null
null
null
ULA/testeULA.py
RicardoFedrigo/ULA_PYTHON
23c746b2076cf2bc637aa34330e54db49d7a8554
[ "MIT" ]
null
null
null
from ula import Ula ula=Ula(4) A = [1,0,0,0,1,0,0,1] B = [1,0,0,0,1,0,0,1] C = [1,1,1,1,1,1,1,1] ula.setA(A) ula.setB(B) ula.setInstrucao([0,0,0,1]) ula.selecao() print(ula.getSaida()) ula.setInstrucao([0,0,1,0]) ula.selecao() print(ula.getSaida()) ula.setInstrucao([0,0,1,1]) ula.selecao() print(ula.getSaida()) ...
13.980392
27
0.660589
0
0
0
0
0
0
0
0
0
0
9831311007b8bf4c390cc44301f62f55d2e750be
12,902
py
Python
wagtailorderable/modeladmin/mixins.py
kausaltech/wagtail-orderable
72ca5835b9aa83e02cb7eb564a4517fac2273c28
[ "MIT" ]
null
null
null
wagtailorderable/modeladmin/mixins.py
kausaltech/wagtail-orderable
72ca5835b9aa83e02cb7eb564a4517fac2273c28
[ "MIT" ]
null
null
null
wagtailorderable/modeladmin/mixins.py
kausaltech/wagtail-orderable
72ca5835b9aa83e02cb7eb564a4517fac2273c28
[ "MIT" ]
null
null
null
from django.conf.urls import url from django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured, PermissionDenied from django.db import connections, transaction from django.db.models import F, Count from django.db.models.expressions import Case, Value, When from django.db.models.functions import Cast from d...
45.111888
99
0.634553
12,317
0.954658
0
0
5,499
0.426213
0
0
3,748
0.290498
9833ab5177863126b1d352268f98e263bfeed2b3
4,875
py
Python
train.py
ahrnbom/guts
9134e7f6568a24b435841e5934a640bdbe329a68
[ "MIT" ]
null
null
null
train.py
ahrnbom/guts
9134e7f6568a24b435841e5934a640bdbe329a68
[ "MIT" ]
null
null
null
train.py
ahrnbom/guts
9134e7f6568a24b435841e5934a640bdbe329a68
[ "MIT" ]
null
null
null
""" Copyright (C) 2022 Martin Ahrnbom Released under MIT License. See the file LICENSE for details. General script for training a CNN in PyTorch """ from typing import List import torch from torch import optim import numpy as np from datetime import datetime from plot import multi_plot from u...
35.583942
80
0.537846
0
0
0
0
0
0
0
0
1,170
0.24
9834c4b6e694746ce6bd6fb10e5fcbdc3c27ff60
1,179
py
Python
Communication/Mqtt/MqttPublish.py
landbroken/python-learning
48351f8e1990ca6823fdcb1ac71574542167fb11
[ "MIT" ]
1
2018-07-13T07:46:59.000Z
2018-07-13T07:46:59.000Z
Communication/Mqtt/MqttPublish.py
landbroken/python-learning
48351f8e1990ca6823fdcb1ac71574542167fb11
[ "MIT" ]
null
null
null
Communication/Mqtt/MqttPublish.py
landbroken/python-learning
48351f8e1990ca6823fdcb1ac71574542167fb11
[ "MIT" ]
1
2018-07-13T03:21:02.000Z
2018-07-13T03:21:02.000Z
# import paho.mqtt.client as mqtt import paho.mqtt.publish as publish import time HOST = "127.0.0.1" PORT = 8222 def on_connect(client, userdata, flags, rc): print("Connected with result code " + str(rc)) client.subscribe("test") def on_message(client, userdata, msg): print(msg.topic + " " + msg.payloa...
32.75
91
0.597964
0
0
0
0
0
0
0
0
579
0.46506
98350a26a814c2d0a64a7520f06048d7bfb761fc
476
py
Python
leetcode/020/20.py
shankar-shiv/CS1010E_Kattis_practice
9a8597b7ab61d5afa108a8b943ca2bb3603180c6
[ "MIT" ]
null
null
null
leetcode/020/20.py
shankar-shiv/CS1010E_Kattis_practice
9a8597b7ab61d5afa108a8b943ca2bb3603180c6
[ "MIT" ]
null
null
null
leetcode/020/20.py
shankar-shiv/CS1010E_Kattis_practice
9a8597b7ab61d5afa108a8b943ca2bb3603180c6
[ "MIT" ]
null
null
null
class Solution: def isValid(self, s: str) -> bool: stack = [] d = {"]": "[", "}": "{", ")": "("} for char in s: # Opening if char in d.values(): stack.append(char) elif char in d.keys(): if stack == [] or d[char] != stack.po...
25.052632
57
0.386555
431
0.905462
0
0
0
0
0
0
35
0.073529
98351c2147ed07a632f10bfd99940c5816becbe4
339
py
Python
alyBlog/apps/course/urls.py
Hx-someone/aly-blog
e0205777d2ff1642fde5741a5b5c1b06ad675001
[ "WTFPL" ]
1
2020-04-17T02:15:45.000Z
2020-04-17T02:15:45.000Z
alyBlog/apps/course/urls.py
Hx-someone/aly-blog
e0205777d2ff1642fde5741a5b5c1b06ad675001
[ "WTFPL" ]
null
null
null
alyBlog/apps/course/urls.py
Hx-someone/aly-blog
e0205777d2ff1642fde5741a5b5c1b06ad675001
[ "WTFPL" ]
null
null
null
# -*- coding: utf-8 -*- """ @Time : 2020/3/4 13:58 @Author : 半纸梁 @File : urls.py """ from django.urls import path from course import views app_name = "course" urlpatterns = [ path("index/", views.CourseIndexView.as_view(), name="index"), path("<int:course_id>/", views.CourseDetailView.as_view(), name=...
21.1875
85
0.646018
0
0
0
0
0
0
0
0
152
0.44058
98359bcafb43958d81e407a2ccbc55ca959dfeb4
10,932
py
Python
XlsxTools/xls2json/Tools/xls2json.py
maplelearC/Unity3DTraining
3824d5f92c5fce5cbd8806feb1852e9a99e4a711
[ "MIT" ]
3,914
2017-01-20T04:55:53.000Z
2022-03-31T18:06:12.000Z
XlsxTools/xls2json/Tools/xls2json.py
maplelearC/Unity3DTraining
3824d5f92c5fce5cbd8806feb1852e9a99e4a711
[ "MIT" ]
5
2019-12-17T05:27:58.000Z
2022-01-20T11:55:33.000Z
XlsxTools/xls2json/Tools/xls2json.py
maplelearC/Unity3DTraining
3824d5f92c5fce5cbd8806feb1852e9a99e4a711
[ "MIT" ]
1,263
2017-01-15T09:54:44.000Z
2022-03-31T14:59:11.000Z
# -*- coding: utf-8 -*- import os,sys,importlib import xml.etree.ElementTree as ET import xdrlib,xlrd # 防止中文乱码 importlib.reload(sys) #配置文件名 CONFIG_NAME = "config.ini" #保存文件类型 SAVE_FILE_TYPE = ".json" #保存映射类类型 SAVE_MAPPING_TYPE = ".cs" #分隔符 SPLIT_CAHR = ":" #表格路径 XLS_PATH = "" #解析路径 XML_PATH = "" #导出路径 OUT_PATH = ""...
36.198675
171
0.608214
0
0
0
0
0
0
0
0
3,203
0.272781
9835c7cc4a39384752be9935949cb467e753607d
3,318
py
Python
tests.py
kylefox/openmerch
eee28c67789fcc053031a1e15addf366316e8590
[ "BSD-3-Clause" ]
1
2016-05-08T18:18:53.000Z
2016-05-08T18:18:53.000Z
tests.py
kylefox/openmerch
eee28c67789fcc053031a1e15addf366316e8590
[ "BSD-3-Clause" ]
1
2021-02-05T02:55:02.000Z
2021-02-05T02:59:45.000Z
tests.py
kylefox/openmerch
eee28c67789fcc053031a1e15addf366316e8590
[ "BSD-3-Clause" ]
1
2021-07-13T07:16:05.000Z
2021-07-13T07:16:05.000Z
from gateways.authorizenet import AuthorizeNet from creditcard import CreditCard from datetime import datetime LOGIN = '' PASSWORD = '' def setup_authorize(): options = { 'order_id': '1', 'description': 'Test of AUTH code', 'email': 'john@doe.com', 'customer': '947', 'ip': ...
22.418919
64
0.566004
0
0
0
0
0
0
0
0
992
0.298975
983645ba8bb0cbefb83e179f06ceca1eabb1c5e8
393
py
Python
Class 12/12th - Project/using yield giving primes.py
edwardmasih/Python-School-Level
545e8fcd87f540be2bbf01d3493bd84dd5504739
[ "MIT" ]
null
null
null
Class 12/12th - Project/using yield giving primes.py
edwardmasih/Python-School-Level
545e8fcd87f540be2bbf01d3493bd84dd5504739
[ "MIT" ]
null
null
null
Class 12/12th - Project/using yield giving primes.py
edwardmasih/Python-School-Level
545e8fcd87f540be2bbf01d3493bd84dd5504739
[ "MIT" ]
null
null
null
n=int(input("Enter the number upto which you want the prime numbers => ")) print print ("The List of Prime Nubmber :-") def prime(n): for i in range (1,n): x=1 for j in range (2,i): n=i%j if n==0: x=0 break if x==1: ...
20.684211
75
0.445293
0
0
210
0.534351
0
0
0
0
90
0.229008
9837bcd5e661ac2fc2610832a9e2f5b9c2137ebd
3,117
py
Python
tests/test_scenario/test_follow_my_commit.py
magnusbaeck/eiffel-graphql-api
c0cd0dc3fdad7787988599974ace2a4cebf70844
[ "Apache-2.0" ]
null
null
null
tests/test_scenario/test_follow_my_commit.py
magnusbaeck/eiffel-graphql-api
c0cd0dc3fdad7787988599974ace2a4cebf70844
[ "Apache-2.0" ]
null
null
null
tests/test_scenario/test_follow_my_commit.py
magnusbaeck/eiffel-graphql-api
c0cd0dc3fdad7787988599974ace2a4cebf70844
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Axis Communications AB. # # For a full list of individual contributors, please see the commit history. # # 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.apac...
37.554217
108
0.686878
2,216
0.71094
0
0
858
0.275265
0
0
1,431
0.459095
98381c463f46171f1ce8608a5ff47f13ed8e7cd4
27,628
py
Python
drupal/Drupal.py
EmlynK/deployments
18c6f3de73af36dd7ed95d4ef3bf844765e74fa3
[ "MIT" ]
null
null
null
drupal/Drupal.py
EmlynK/deployments
18c6f3de73af36dd7ed95d4ef3bf844765e74fa3
[ "MIT" ]
null
null
null
drupal/Drupal.py
EmlynK/deployments
18c6f3de73af36dd7ed95d4ef3bf844765e74fa3
[ "MIT" ]
null
null
null
from fabric.api import * from fabric.contrib.files import * import random import string import common.ConfigFile import common.Services import common.Utils import Revert @task def drush_fra_branches(config): # If a 'branches' option exists in the [Features] section in config.ini, proceed if config.has_option("Fea...
53.028791
229
0.67837
0
0
0
0
26,262
0.950557
0
0
15,674
0.567323
9839fd79b37a51ec886ce8d16a51e8fa84a12dda
1,012
py
Python
halfplane.py
christiankuhl/VortexDynamics
97b96a6231aacb3d0f1e74fda52457bafb833964
[ "MIT" ]
null
null
null
halfplane.py
christiankuhl/VortexDynamics
97b96a6231aacb3d0f1e74fda52457bafb833964
[ "MIT" ]
null
null
null
halfplane.py
christiankuhl/VortexDynamics
97b96a6231aacb3d0f1e74fda52457bafb833964
[ "MIT" ]
null
null
null
""" This module implements the N-vortex dynamics for the half plane. Insert code here as if it were inside a class definition statement """ import numpy as np def JGradG(self, z1, z2): """ JGradG(z1, z2) is the product of the 2d symplectic matrix J with the gradient with respect to the first variable of t...
30.666667
81
0.613636
0
0
0
0
0
0
0
0
593
0.585968
983ae88806b05eed4c4e4a551d138fce15302291
6,929
py
Python
ultracart/models/email_segment_customers_response.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
1
2018-03-15T16:56:23.000Z
2018-03-15T16:56:23.000Z
ultracart/models/email_segment_customers_response.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
null
null
null
ultracart/models/email_segment_customers_response.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ UltraCart Rest API V2 UltraCart REST API Version 2 # noqa: E501 OpenAPI spec version: 2.0.0 Contact: support@ultracart.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class EmailSegmentCustomersRes...
30.126087
127
0.613508
6,638
0.958003
0
0
3,377
0.487372
0
0
3,649
0.526627
983be58bb63dc7b647ea00d07052aed03e33357c
225
py
Python
Mundo 1/desafios/desafio003_soma de dois numeros.py
marioarl/python
0bd677cdbec87e9603866c09cb8009fef295b89b
[ "MIT" ]
1
2021-11-21T21:04:04.000Z
2021-11-21T21:04:04.000Z
Mundo 1/desafios/desafio003_soma de dois numeros.py
marioarl/python
0bd677cdbec87e9603866c09cb8009fef295b89b
[ "MIT" ]
null
null
null
Mundo 1/desafios/desafio003_soma de dois numeros.py
marioarl/python
0bd677cdbec87e9603866c09cb8009fef295b89b
[ "MIT" ]
null
null
null
print('\033[1;35m#\033[m'*10, '\033[1;30;46mDESAFIO 03\033[m', '\033[1;35m#\033[m'*10) n1 = int(input('\033[1;33mPrimeiro numero:\033[m ')) n2 = int(input('\033[1;36mSegundo numero:\033[m ')) r = n1 + n2 print('A soma é', r)
37.5
86
0.617778
0
0
0
0
0
0
0
0
149
0.659292
983c81777a4b29030eb8774ec012a2f1391416a7
793
py
Python
editBot/todo/views.py
KApilBD/python
9b5c11418c396fcdb10d9615d5d28c3ccdea7b14
[ "MIT" ]
null
null
null
editBot/todo/views.py
KApilBD/python
9b5c11418c396fcdb10d9615d5d28c3ccdea7b14
[ "MIT" ]
null
null
null
editBot/todo/views.py
KApilBD/python
9b5c11418c396fcdb10d9615d5d28c3ccdea7b14
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect from .models import TodoItem def todoView(request): # return HttpResponse("Hello! This is Todo View Page...") all_todo_items=TodoItem.objects.all() return render(request, 'todo.html', {'all_items':...
31.72
63
0.699874
0
0
0
0
0
0
0
0
222
0.27995
983d36fb52bfd8dc267daed6bd1722f87ca8c9d7
2,852
py
Python
gameProj/gameApp/views.py
cs-fullstack-2019-spring/django-mini-project4-chelsea-porche
54b73e89c67c5cf2ada57e529e982ffd291fc314
[ "Apache-2.0" ]
null
null
null
gameProj/gameApp/views.py
cs-fullstack-2019-spring/django-mini-project4-chelsea-porche
54b73e89c67c5cf2ada57e529e982ffd291fc314
[ "Apache-2.0" ]
null
null
null
gameProj/gameApp/views.py
cs-fullstack-2019-spring/django-mini-project4-chelsea-porche
54b73e89c67c5cf2ada57e529e982ffd291fc314
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.http import HttpResponse from .models import Game, Person from .forms import NewUserForm, NewGameForm from django.contrib.auth.models import User # Create your views here. # TO REQUI...
32.044944
110
0.680926
0
0
0
0
437
0.153226
0
0
1,143
0.400771
983feb73273a2249b6440b588403dab50f5f78f8
676
py
Python
migrations/versions/2c64078d1aff_.py
Alhuin/playlist-handler
99b008ec8d9f4f2163266af19ad2ece478b0b172
[ "MIT" ]
null
null
null
migrations/versions/2c64078d1aff_.py
Alhuin/playlist-handler
99b008ec8d9f4f2163266af19ad2ece478b0b172
[ "MIT" ]
null
null
null
migrations/versions/2c64078d1aff_.py
Alhuin/playlist-handler
99b008ec8d9f4f2163266af19ad2ece478b0b172
[ "MIT" ]
null
null
null
"""empty message Revision ID: 2c64078d1aff Revises: 635e91180d41 Create Date: 2021-03-04 20:03:25.441608 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '2c64078d1aff' down_revision = '635e91180d41' branch_labels = None depends_on = None def upgrade(): # ...
23.310345
94
0.699704
0
0
0
0
0
0
0
0
406
0.600592
9841245f738118e4913e7d61e4e18f45d42f104e
2,115
py
Python
runs/kubernetes/start_haproxy_cfg.py
Ruilkyu/kubernetes_start
9e88a7f1c64899454af8f9be1dd9653ba435e21f
[ "Apache-2.0" ]
2
2020-07-24T14:19:57.000Z
2020-08-10T18:30:08.000Z
runs/kubernetes/start_haproxy_cfg.py
Ruilkyu/kubernetes_start
9e88a7f1c64899454af8f9be1dd9653ba435e21f
[ "Apache-2.0" ]
null
null
null
runs/kubernetes/start_haproxy_cfg.py
Ruilkyu/kubernetes_start
9e88a7f1c64899454af8f9be1dd9653ba435e21f
[ "Apache-2.0" ]
1
2021-07-09T10:29:11.000Z
2021-07-09T10:29:11.000Z
""" 时间:2020/6/13 作者:lurui 功能:根据提供的模版,生成haprocy对应的haproxy.cfg配置文件 时间:2020/6/16 作者:lurui 修改:读master.txt文件改为读config.ini 时间:2020/6/17 作者:lurui 修改:基路径 basedir = os.path.dirname(os.path.dirname(os.getcwd())),改为调用者路径 basedir = os.path.abspath('.') """ import os import configparser def start_haproxy_cfg(): basedir = o...
27.467532
101
0.628369
0
0
0
0
0
0
0
0
1,054
0.471167
984150f5c2ce37c60a6c7646551282b4404a706e
3,025
py
Python
app/server/database.py
situkangsayur/async-fastapi-mongo
2ee9dcb87687bcf5e3eba5cdb4ec49573d6c1f16
[ "MIT" ]
null
null
null
app/server/database.py
situkangsayur/async-fastapi-mongo
2ee9dcb87687bcf5e3eba5cdb4ec49573d6c1f16
[ "MIT" ]
null
null
null
app/server/database.py
situkangsayur/async-fastapi-mongo
2ee9dcb87687bcf5e3eba5cdb4ec49573d6c1f16
[ "MIT" ]
1
2021-12-05T17:26:08.000Z
2021-12-05T17:26:08.000Z
import motor.motor_asyncio from bson.objectid import ObjectId from decouple import config from outfit import Outfit, Logger, ConsulCon, VaultCon, merge_dict __confit_info__ = 'configs/config.yaml' # load config via python-outfit Outfit.setup(__confit_info__) vault = VaultCon().get_secret_kv() consul = ConsulCon()....
28.537736
81
0.677355
0
0
0
0
0
0
1,207
0.399008
1,069
0.353388
98428c858cd2ff5cf0e1c7d684b9bde11e18d613
340
py
Python
UDPClient.py
Eadral/socket_test
97c98f9d1e922867b0260994407d39d5aca42751
[ "MIT" ]
null
null
null
UDPClient.py
Eadral/socket_test
97c98f9d1e922867b0260994407d39d5aca42751
[ "MIT" ]
null
null
null
UDPClient.py
Eadral/socket_test
97c98f9d1e922867b0260994407d39d5aca42751
[ "MIT" ]
null
null
null
from socket import * serverName = "localhost" serverPort = 12000 clientSocket = socket(AF_INET, SOCK_DGRAM) message = bytes(input("Input lowercase sentence: "), encoding="UTF-8") clientSocket.sendto(message, (serverName, serverPort)) modifiedMessage, serverAddress = clientSocket.recvfrom(2048) print(modifiedMessage) c...
30.909091
70
0.794118
0
0
0
0
0
0
0
0
46
0.135294
9843182ad243a7e8647ccf7f723564adcfe419f4
1,300
py
Python
tests/test_nullable_fields.py
marctc/django-rest-framework
06fd63dade20e1a19276b7414a54b9f5d2ef8329
[ "Unlicense" ]
null
null
null
tests/test_nullable_fields.py
marctc/django-rest-framework
06fd63dade20e1a19276b7414a54b9f5d2ef8329
[ "Unlicense" ]
null
null
null
tests/test_nullable_fields.py
marctc/django-rest-framework
06fd63dade20e1a19276b7414a54b9f5d2ef8329
[ "Unlicense" ]
null
null
null
# from django.core.urlresolvers import reverse # from django.conf.urls import patterns, url # from rest_framework import serializers, generics # from rest_framework.test import APITestCase # from tests.models import NullableForeignKeySource # class NullableFKSourceSerializer(serializers.ModelSerializer): # class...
32.5
94
0.724615
0
0
0
0
0
0
0
0
1,261
0.97
98453d92e060154057bdd6c781bbf32f5d97ae0b
2,745
py
Python
src/tests/t_kadmin.py
frozencemetery/krb5
bb8fa495d00ccd931eec87a01b8920636cf7903e
[ "MIT" ]
1
2015-05-14T22:15:04.000Z
2015-05-14T22:15:04.000Z
src/tests/t_kadmin.py
frozencemetery/krb5
bb8fa495d00ccd931eec87a01b8920636cf7903e
[ "MIT" ]
1
2018-08-09T19:05:03.000Z
2018-08-10T18:46:20.000Z
src/tests/t_kadmin.py
frozencemetery/krb5
bb8fa495d00ccd931eec87a01b8920636cf7903e
[ "MIT" ]
null
null
null
from k5test import * realm = K5Realm(start_kadmind=True) # Create a principal. Test -q option and keyboard entry of the admin # password and principal password. Verify creation with kadmin.local. realm.run([kadmin, '-q', 'addprinc princ/pw'], input=password('admin') + '\npw1\npw1\n') realm.run([kadminl, '...
40.970149
73
0.715118
0
0
0
0
0
0
0
0
1,560
0.568306
98463e119070853e4ff482c858d10b20b3eec8fb
3,332
py
Python
lib/tri_declarative/shortcut.py
TriOptima/tri.declarative
e1972287f7b00ab335cc6c9a8384d5a39232171e
[ "BSD-3-Clause" ]
15
2016-02-09T18:07:30.000Z
2021-11-08T09:05:40.000Z
lib/tri_declarative/shortcut.py
TriOptima/tri.declarative
e1972287f7b00ab335cc6c9a8384d5a39232171e
[ "BSD-3-Clause" ]
7
2016-02-08T12:07:13.000Z
2020-10-08T06:51:06.000Z
lib/tri_declarative/shortcut.py
TriOptima/tri.declarative
e1972287f7b00ab335cc6c9a8384d5a39232171e
[ "BSD-3-Clause" ]
7
2016-01-06T09:29:11.000Z
2021-04-07T09:35:20.000Z
import functools from .declarative import get_members from .dispatch import dispatch from .namespace import ( Namespace, setdefaults_path, ) # This is just a marker class for declaring shortcuts, and later for collecting them class Shortcut(Namespace): shortcut = True # decorator def shortcut(f): f...
34.708333
127
0.620348
46
0.013806
0
0
2,380
0.714286
0
0
603
0.180972
98463fa3b6a220d27d47ba06579da54d0fd9e3d5
1,032
py
Python
ml-agents/mlagents/torch_utils/torch.py
Phong13/ml-agents
393808b50581e66085578b01d9d907b65a9240f0
[ "Apache-2.0" ]
null
null
null
ml-agents/mlagents/torch_utils/torch.py
Phong13/ml-agents
393808b50581e66085578b01d9d907b65a9240f0
[ "Apache-2.0" ]
null
null
null
ml-agents/mlagents/torch_utils/torch.py
Phong13/ml-agents
393808b50581e66085578b01d9d907b65a9240f0
[ "Apache-2.0" ]
null
null
null
import os # Detect availability of torch package here. # NOTE: this try/except is temporary until torch is required for ML-Agents. try: # This should be the only place that we import torch directly. # Everywhere else is caught by the banned-modules setting for flake8 import torch # noqa I201 torch.se...
27.157895
91
0.695736
0
0
0
0
0
0
0
0
499
0.483527
9846cb63a0389b2e69e89ec1122292cd314266af
43
py
Python
pykutils/__init__.py
pyokagan/pykutils
339a4e4db12f0ce44fd5ca3a94d385dbae7f4c34
[ "MIT" ]
null
null
null
pykutils/__init__.py
pyokagan/pykutils
339a4e4db12f0ce44fd5ca3a94d385dbae7f4c34
[ "MIT" ]
null
null
null
pykutils/__init__.py
pyokagan/pykutils
339a4e4db12f0ce44fd5ca3a94d385dbae7f4c34
[ "MIT" ]
null
null
null
"pyokagan's personal utilities collection"
21.5
42
0.837209
0
0
0
0
0
0
0
0
42
0.976744
9846d7a929dfc7206aaef3926e2eb249dc72eda7
30
py
Python
notebooks/utils/tui/__init__.py
k4t0mono/ipln
ba71860bc38df52780903f647fb2404c61a6b3f2
[ "BSD-2-Clause" ]
1
2021-03-15T11:53:40.000Z
2021-03-15T11:53:40.000Z
python/progress/__init__.py
pedromxavier/cookbook
243532f893651c34e70fbba8a52f3f129dbc8dd3
[ "MIT" ]
2
2020-03-24T17:06:03.000Z
2020-03-31T02:16:40.000Z
python/progress/__init__.py
pedromxavier/cookbook
243532f893651c34e70fbba8a52f3f129dbc8dd3
[ "MIT" ]
null
null
null
from .progress import Progress
30
30
0.866667
0
0
0
0
0
0
0
0
0
0
9847e44921afc7a8b82a4f3d93c3296fce6e3790
13,352
py
Python
Ui_WorldGenDialog.py
Kamilcuk/Anthill
8f8f0a8acd8597da5adf918584a225cfbb485e2f
[ "MIT" ]
1
2016-03-10T12:51:01.000Z
2016-03-10T12:51:01.000Z
Ui_WorldGenDialog.py
Kamilcuk/Anthill
8f8f0a8acd8597da5adf918584a225cfbb485e2f
[ "MIT" ]
null
null
null
Ui_WorldGenDialog.py
Kamilcuk/Anthill
8f8f0a8acd8597da5adf918584a225cfbb485e2f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'worldgen.ui' # # Created by: PyQt5 UI code generator 5.6 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_WorldGenDialog(object): def setupUi(self, WorldGenDialog): Wo...
59.079646
122
0.736669
13,112
0.982025
0
0
0
0
0
0
1,301
0.097439
98480be6c6b339a9b16fc6aaedb013fff31d11b5
3,958
py
Python
tests/server/database.py
0x0mar/king-phisher
ff294c1a6ea3d59e238f0f4ed7ec668c5e8c2cfd
[ "BSD-3-Clause" ]
null
null
null
tests/server/database.py
0x0mar/king-phisher
ff294c1a6ea3d59e238f0f4ed7ec668c5e8c2cfd
[ "BSD-3-Clause" ]
null
null
null
tests/server/database.py
0x0mar/king-phisher
ff294c1a6ea3d59e238f0f4ed7ec668c5e8c2cfd
[ "BSD-3-Clause" ]
1
2018-12-18T00:44:14.000Z
2018-12-18T00:44:14.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # tests/server/database.py # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this li...
34.417391
95
0.757959
2,046
0.516928
0
0
0
0
0
0
2,121
0.535877
984957707b9c7d7b3eba54240e2b89bd9acc85f0
1,645
py
Python
restaurant_project/sales/models.py
deepaksood619/Projects
93f09db22ad65e72e2a2ffc909b2bb3e1e5c5fa7
[ "MIT" ]
null
null
null
restaurant_project/sales/models.py
deepaksood619/Projects
93f09db22ad65e72e2a2ffc909b2bb3e1e5c5fa7
[ "MIT" ]
5
2021-03-19T03:52:50.000Z
2022-02-10T11:43:51.000Z
sales/models.py
deepchatterjeevns/SmartQHiringChallenge
1151e8ac69325461179a7c15dec2e7709b811a74
[ "MIT" ]
null
null
null
from datetime import time, datetime from django.db import models # Create your models here. class FoodAvailabilityTimings(models.Model): shift_name = models.CharField(max_length=255, unique=True, blank=False, null=False) start_time = models.TimeField(default=time(hour=0, minute=0)) end_time = models.Time...
33.571429
100
0.731915
1,537
0.934347
0
0
0
0
0
0
111
0.067477
984a26f181b80332cd6014478a8eb8713af1bd02
860
py
Python
examples/plot_geodesics_s2.py
effigies/geomstats
0d6979a15cefcf98f7f92bade9d0e4abee3dde14
[ "MIT" ]
null
null
null
examples/plot_geodesics_s2.py
effigies/geomstats
0d6979a15cefcf98f7f92bade9d0e4abee3dde14
[ "MIT" ]
null
null
null
examples/plot_geodesics_s2.py
effigies/geomstats
0d6979a15cefcf98f7f92bade9d0e4abee3dde14
[ "MIT" ]
null
null
null
""" Plot a geodesic on the sphere S2 """ import matplotlib.pyplot as plt import numpy as np import geomstats.visualization as visualization from geomstats.hypersphere import Hypersphere SPHERE2 = Hypersphere(dimension=2) METRIC = SPHERE2.metric def main(): initial_point = [1., 0., 0.] initial_tangent_vec ...
23.888889
71
0.624419
0
0
0
0
0
0
0
0
65
0.075581
984a405ea5778fbc9af3554ca90adfa1ba3e5686
3,666
py
Python
video_utils/collect_and_store.py
monocongo/video_utils
c1fd5d0041294f91b498f2878029723377fe6f66
[ "BSD-3-Clause" ]
null
null
null
video_utils/collect_and_store.py
monocongo/video_utils
c1fd5d0041294f91b498f2878029723377fe6f66
[ "BSD-3-Clause" ]
9
2019-05-14T21:52:09.000Z
2019-06-12T17:32:13.000Z
video_utils/collect_and_store.py
monocongo/video_save_boto3
c1fd5d0041294f91b498f2878029723377fe6f66
[ "BSD-3-Clause" ]
null
null
null
import argparse import datetime import os import boto3 import ffmpeg # ------------------------------------------------------------------------------ def collect_and_store(rtsp_url: str, start_seconds: int, duration_seconds: int, s3_bucket: str, ...
36.29703
128
0.516094
0
0
0
0
0
0
0
0
1,570
0.42826
984b7b0287b2a89ff337b5b57399afb859eeb8ee
332
py
Python
actions/update_field_value.py
gmenie-ak/stackstorm-jira
55c3cd92229e6cac15da270a324571aba83e5834
[ "Apache-2.0" ]
12
2017-11-18T04:34:56.000Z
2022-03-06T08:32:18.000Z
actions/update_field_value.py
gmenie-ak/stackstorm-jira
55c3cd92229e6cac15da270a324571aba83e5834
[ "Apache-2.0" ]
26
2016-12-22T01:53:40.000Z
2021-10-01T14:00:51.000Z
actions/update_field_value.py
gmenie-ak/stackstorm-jira
55c3cd92229e6cac15da270a324571aba83e5834
[ "Apache-2.0" ]
31
2017-03-06T20:16:12.000Z
2021-12-26T06:54:26.000Z
from lib.base import BaseJiraAction __all__ = [ 'UpdateFieldValue' ] class UpdateFieldValue(BaseJiraAction): def run(self, issue_key, field, value, notify): issue = self._client.issue(issue_key) issue.update(fields={field: value}, notify=notify) result = issue.fields.labels re...
23.714286
58
0.686747
255
0.768072
0
0
0
0
0
0
18
0.054217
984b8c04887c7501cecb6fde367655eeb502c29a
153
py
Python
src/tests/functional/orga/test_init.py
td00/pretalx
aff450de9420fca167e04345fa24ee7140fae819
[ "Apache-2.0" ]
null
null
null
src/tests/functional/orga/test_init.py
td00/pretalx
aff450de9420fca167e04345fa24ee7140fae819
[ "Apache-2.0" ]
null
null
null
src/tests/functional/orga/test_init.py
td00/pretalx
aff450de9420fca167e04345fa24ee7140fae819
[ "Apache-2.0" ]
null
null
null
import pytest from django.core.management import call_command @pytest.mark.django_db def test_frab_import_minimal(superuser): call_command('init')
19.125
47
0.816993
0
0
0
0
88
0.575163
0
0
6
0.039216
984d60f3c8bc904d220d941b1dd1c7fd3ce9eac2
6,524
py
Python
vespa/datasim/util_menu.py
vespa-mrs/vespa
6d3e84a206ec427ac1304e70c7fadf817432956b
[ "BSD-3-Clause" ]
null
null
null
vespa/datasim/util_menu.py
vespa-mrs/vespa
6d3e84a206ec427ac1304e70c7fadf817432956b
[ "BSD-3-Clause" ]
4
2021-04-17T13:58:31.000Z
2022-01-20T14:19:57.000Z
vespa/datasim/util_menu.py
vespa-mrs/vespa
6d3e84a206ec427ac1304e70c7fadf817432956b
[ "BSD-3-Clause" ]
3
2021-06-05T16:34:57.000Z
2022-01-19T16:13:22.000Z
# Python modules # 3rd party modules import wx # Our modules import vespa.common.menu as common_menu import vespa.common.util.config as util_common_config ######################################################################## # This is a collection of menu-related constants, functions and utilities. # The funct...
42.921053
113
0.592888
1,646
0.252299
0
0
0
0
0
0
2,234
0.342428
984f29cb3a06a2a9327f4655badc0fb6832ecefe
5,198
py
Python
data.py
Simon-Swenson-8351/hs-bot
af2613ffa71c34e1d66c9f9d65249962d21a6b4a
[ "BSD-3-Clause" ]
null
null
null
data.py
Simon-Swenson-8351/hs-bot
af2613ffa71c34e1d66c9f9d65249962d21a6b4a
[ "BSD-3-Clause" ]
null
null
null
data.py
Simon-Swenson-8351/hs-bot
af2613ffa71c34e1d66c9f9d65249962d21a6b4a
[ "BSD-3-Clause" ]
null
null
null
import os import PIL.Image import numpy import cv2 import threading import datetime import config import game_region as game_region_module class BoundingBoxInfo(object): def __init__(self, name, source_coords): self.name = name self.source_coords = source_coords class BoundingBox(object): ...
38.503704
126
0.647172
3,658
0.703732
0
0
1,755
0.33763
0
0
961
0.184879
9850c05df27bb10d9bb85ebb3ffbbd1b73871ffa
1,536
py
Python
ibt/docker_util.py
rcook/ibt
6ab5bda2067ef053874938a4ec445ea0e54b30f2
[ "MIT" ]
null
null
null
ibt/docker_util.py
rcook/ibt
6ab5bda2067ef053874938a4ec445ea0e54b30f2
[ "MIT" ]
13
2018-08-08T15:40:54.000Z
2021-06-22T21:00:36.000Z
ibt/docker_util.py
rcook/ibt
6ab5bda2067ef053874938a4ec445ea0e54b30f2
[ "MIT" ]
null
null
null
############################################################################### # # IBT: Isolated Build Tool # Copyright (C) 2016, Richard Cook. All rights reserved. # # Simple wrappers around Docker etc. for fully isolated build environments # ###########################################################################...
32
79
0.623698
0
0
0
0
0
0
0
0
510
0.332031
98523176d76da547436cf4562259ecd15472ff25
3,241
py
Python
tests/systems/test_spins.py
sirmarcel/floq
a456957500c809a5bb4cdae2d7b1d4720c28f2c4
[ "MIT" ]
3
2020-10-31T00:30:42.000Z
2021-02-27T14:59:17.000Z
tests/systems/test_spins.py
sirmarcel/floq
a456957500c809a5bb4cdae2d7b1d4720c28f2c4
[ "MIT" ]
1
2019-06-06T12:56:46.000Z
2019-06-06T14:41:13.000Z
tests/systems/test_spins.py
sirmarcel/floq
a456957500c809a5bb4cdae2d7b1d4720c28f2c4
[ "MIT" ]
5
2017-07-25T11:22:56.000Z
2021-02-27T14:59:24.000Z
from tests.assertions import CustomAssertions import numpy as np import floq.systems.spins as spins def single_hf(controls, omega): a1 = controls[0] b1 = controls[1] a2 = controls[2] b2 = controls[3] return np.array([[[0, 0.25*(1j*a2 + b2)], [0.25*1j*(a2 + 1j*b2), 0]], ...
30.575472
79
0.444924
1,485
0.458192
0
0
0
0
0
0
71
0.021907
9852f98b97ad9ca649e132fb523a2aba2132c424
877
py
Python
utils/localization/tests/test_helper/test_utils/test_utils.py
Open-Speech-EkStep/crowdsource-dataplatform
cf2a6c36717cb06f75de7b097959c59699564ad0
[ "MIT" ]
22
2021-03-23T05:36:51.000Z
2022-01-28T10:50:23.000Z
utils/localization/tests/test_helper/test_utils/test_utils.py
Open-Speech-EkStep/crowdsource-dataplatform
cf2a6c36717cb06f75de7b097959c59699564ad0
[ "MIT" ]
13
2021-05-27T07:18:58.000Z
2022-02-24T06:33:58.000Z
utils/localization/tests/test_helper/test_utils/test_utils.py
Open-Speech-EkStep/crowdsource-dataplatform
cf2a6c36717cb06f75de7b097959c59699564ad0
[ "MIT" ]
14
2021-03-22T22:47:17.000Z
2021-12-22T05:00:52.000Z
import json import pandas as pd from unittest import TestCase from pandas._testing import assert_frame_equal from helper.utils.utils import load_json_as_df, reformat_json class TestUtils(TestCase): def test_load_json_as_df(self): test_json_data = {'text1': 'translation1', 'text2': 'translation2'} ...
35.08
116
0.692132
702
0.800456
0
0
0
0
0
0
122
0.139111
98537b856a259b47a9404a77c28aea3a4de091c5
1,954
py
Python
src/spider/guozhi/guozhi.py
objcat/test-python
97b3cb610a80b8e00b8a032ca94bb3fead4102fb
[ "MIT" ]
null
null
null
src/spider/guozhi/guozhi.py
objcat/test-python
97b3cb610a80b8e00b8a032ca94bb3fead4102fb
[ "MIT" ]
null
null
null
src/spider/guozhi/guozhi.py
objcat/test-python
97b3cb610a80b8e00b8a032ca94bb3fead4102fb
[ "MIT" ]
null
null
null
# description: guozhi # date: 2021/1/9 9:54 # author: objcat # version: 1.0 import requests from bs4 import BeautifulSoup from win32com.client import Dispatch import pathlib import os class Guozhi: FC_URL = "http://2018.emu618.net:6180/index.php?controller=site&action=pro_list&cat=23" SFC_URL = "http://2018...
36.867925
113
0.623337
1,851
0.884799
0
0
1,548
0.739962
0
0
821
0.392447
985612c5152d046b00d7b926e420d9322d0211d3
1,066
py
Python
setup.py
tzickel/forif
be976fdbb854df4e5366341733f5d7c9ecc11cc9
[ "Apache-2.0" ]
2
2018-04-01T19:33:27.000Z
2018-04-02T08:09:25.000Z
setup.py
tzickel/forif
be976fdbb854df4e5366341733f5d7c9ecc11cc9
[ "Apache-2.0" ]
null
null
null
setup.py
tzickel/forif
be976fdbb854df4e5366341733f5d7c9ecc11cc9
[ "Apache-2.0" ]
null
null
null
from setuptools import setup import codecs import os here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): return codecs.open(os.path.join(here, *parts), 'r').read() long_description = read('README.md') setup( name='forif', version='0.0.1', py_modules=['forif'], url='https://git...
25.380952
71
0.62758
0
0
0
0
0
0
0
0
553
0.518762
9856e14fcd9d4be167f509ba97bef98318eeb15a
2,742
py
Python
Question_31_40/myanswers/myans_38.py
OverHall27/Gasyori100knock
341c528eb4c0789034898ee1f7d0a4b2f8b23eff
[ "MIT" ]
null
null
null
Question_31_40/myanswers/myans_38.py
OverHall27/Gasyori100knock
341c528eb4c0789034898ee1f7d0a4b2f8b23eff
[ "MIT" ]
null
null
null
Question_31_40/myanswers/myans_38.py
OverHall27/Gasyori100knock
341c528eb4c0789034898ee1f7d0a4b2f8b23eff
[ "MIT" ]
null
null
null
import cv2 import numpy as np def DCTConstant(u, v): if u == 0 and v == 0: return 1 / 2 elif u == 0 or v == 0: return 1 / np.sqrt(2) else: return 1 def DCT(img, block=8): Ver, Hor, Col = img.shape result = np.zeros((Ver, Hor, Col)).astype(np.float32) x = np.tile(np.a...
29.483871
171
0.515317
0
0
0
0
0
0
0
0
86
0.031364
98575fafd78ee322f3d70690d931128909d9c1dc
19,861
py
Python
prune.py
poppin-mice/ShiftAddNet
a17369a50da5bba6250fdeac7c065bd00f293f3c
[ "MIT" ]
55
2020-10-04T17:17:46.000Z
2022-03-31T02:56:51.000Z
prune.py
poppin-mice/ShiftAddNet
a17369a50da5bba6250fdeac7c065bd00f293f3c
[ "MIT" ]
8
2020-12-07T03:37:48.000Z
2021-07-21T09:26:45.000Z
prune.py
poppin-mice/ShiftAddNet
a17369a50da5bba6250fdeac7c065bd00f293f3c
[ "MIT" ]
14
2020-10-29T16:51:41.000Z
2021-11-16T01:36:43.000Z
import argparse import os, time import torch import shutil import numpy as np import torch.nn as nn import torchvision.transforms as transforms import torchvision.datasets as datasets import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable import models import torch.backends.cud...
44.431767
178
0.589698
0
0
0
0
0
0
0
0
3,778
0.190222
9857800007ceff368c121bd9101455e6fb400d8d
6,200
py
Python
L5NeuronSimulation/raster_maker.py
JuliusvR/L5NeuronSimulation
1fc68c7367c439e1f9c9b73a15a95609858ec720
[ "MIT" ]
2
2020-11-12T15:12:31.000Z
2021-12-09T19:12:55.000Z
L5NeuronSimulation/raster_maker.py
JuliusvR/L5NeuronSimulation
1fc68c7367c439e1f9c9b73a15a95609858ec720
[ "MIT" ]
2
2021-05-20T21:36:12.000Z
2021-08-29T15:32:35.000Z
L5NeuronSimulation/raster_maker.py
JuliusvR/L5NeuronSimulation
1fc68c7367c439e1f9c9b73a15a95609858ec720
[ "MIT" ]
6
2021-03-03T22:14:39.000Z
2021-11-23T13:44:35.000Z
""" Contains the functions and class (SonataWriter) necessary for generating and saving the input spike rasters. """ import numpy as np import scipy.signal as ss import scipy import scipy.stats as st import matplotlib.pyplot as plt import h5py from bmtk.utils.reports.spike_trains import PoissonSpikeGenerator import pa...
30.243902
117
0.602581
2,339
0.377258
0
0
0
0
0
0
3,513
0.566613
98579a29b18e47304be5f1259c1a91c9aae8a65f
8,086
py
Python
Task.py
omercsp/taskrunner
f972c7879ce9f4e390524a332388ea8c478ea19b
[ "MIT" ]
5
2022-01-04T13:35:48.000Z
2022-03-20T11:34:32.000Z
Task.py
omercsp/taskrunner
f972c7879ce9f4e390524a332388ea8c478ea19b
[ "MIT" ]
null
null
null
Task.py
omercsp/taskrunner
f972c7879ce9f4e390524a332388ea8c478ea19b
[ "MIT" ]
null
null
null
from config import * from argparse import Namespace as Args from schemas import Schema import shlex import subprocess import signal class Task(object): def _check_empty_setting(self, s, title): if len(s) > 0: return raise TaskException("Expanded {} for task '{}' is empty".format(title,...
40.029703
100
0.581499
7,951
0.983304
0
0
0
0
0
0
761
0.094113
9858db76b7f230493a4c3aa09572747983cf6874
1,853
py
Python
recipes/tinyobjloader/all/conanfile.py
balintfodor/conan-center-index
9afc15a805f8ab323a312327c68c80f81a6ceade
[ "MIT" ]
2
2022-01-04T11:30:41.000Z
2022-01-04T11:31:32.000Z
recipes/tinyobjloader/all/conanfile.py
balintfodor/conan-center-index
9afc15a805f8ab323a312327c68c80f81a6ceade
[ "MIT" ]
4
2019-12-27T01:09:03.000Z
2019-12-27T01:49:59.000Z
recipes/tinyobjloader/all/conanfile.py
balintfodor/conan-center-index
9afc15a805f8ab323a312327c68c80f81a6ceade
[ "MIT" ]
1
2020-12-11T02:35:13.000Z
2020-12-11T02:35:13.000Z
import os from conans import ConanFile, CMake, tools class TinyObjLoaderConan(ConanFile): name = "tinyobjloader" description = "Tiny but powerful single file wavefront obj loader" settings = "os", "arch", "build_type", "compiler" options = {"shared": [True, False], "fPIC": [True, False]} default_o...
37.06
83
0.665407
1,797
0.969779
0
0
0
0
0
0
487
0.262817
985c54343672eceee6a9d1dd94eac7c468981170
42
py
Python
secrets/__init__.py
kskewes-sf/spinnakerbot
32a7ad75a0c12e09498d24fe0cc8dd1b810bd6f7
[ "Apache-2.0" ]
6
2020-03-18T10:33:53.000Z
2021-05-02T01:58:10.000Z
secrets/__init__.py
kskewes-sf/spinnakerbot
32a7ad75a0c12e09498d24fe0cc8dd1b810bd6f7
[ "Apache-2.0" ]
8
2020-03-28T23:01:00.000Z
2020-12-01T06:52:00.000Z
secrets/__init__.py
kskewes-sf/spinnakerbot
32a7ad75a0c12e09498d24fe0cc8dd1b810bd6f7
[ "Apache-2.0" ]
10
2020-02-05T16:24:28.000Z
2022-03-17T21:37:36.000Z
from .gcp_secrets import GcpSecretsManager
42
42
0.904762
0
0
0
0
0
0
0
0
0
0
985d32e1f4f905bd4cdae415d067eca4717b3385
1,074
py
Python
Day 15: Rambunctious Recitation/day15-part2.py
Ryan-Kan/Advent-Of-Code-2020
56ed9ab5e01e86781051a9fb774d0a313e0dc15a
[ "MIT" ]
null
null
null
Day 15: Rambunctious Recitation/day15-part2.py
Ryan-Kan/Advent-Of-Code-2020
56ed9ab5e01e86781051a9fb774d0a313e0dc15a
[ "MIT" ]
null
null
null
Day 15: Rambunctious Recitation/day15-part2.py
Ryan-Kan/Advent-Of-Code-2020
56ed9ab5e01e86781051a9fb774d0a313e0dc15a
[ "MIT" ]
null
null
null
""" day15-part2.py Created on 2020-12-15 Updated on 2020-12-20 Copyright © Ryan Kan """ # INPUT with open("input.txt", "r") as f: numbers = [int(number) for number in f.readline().split(",")] f.close() # COMPUTATION saidNumbers = {} # Process the first numbers for i, number in enumerate(numbers): print...
26.195122
98
0.691806
0
0
0
0
0
0
0
0
301
0.28
985e339098540df929a0de7a5cadb4b7c51dc175
1,309
py
Python
home/tests.py
apoorvanand/tweet-search
9dcb94a474c638b5a44fcc2249b5ce6579a209a4
[ "MIT" ]
51
2015-10-06T10:00:09.000Z
2021-09-10T10:27:52.000Z
home/tests.py
apoorvanand/tweet-search
9dcb94a474c638b5a44fcc2249b5ce6579a209a4
[ "MIT" ]
20
2015-12-22T04:59:29.000Z
2021-06-10T17:45:08.000Z
home/tests.py
apoorvanand/tweet-search
9dcb94a474c638b5a44fcc2249b5ce6579a209a4
[ "MIT" ]
22
2015-03-24T14:57:20.000Z
2021-05-29T13:51:36.000Z
import unittest import timeframe import timeseries import datetime import frequency #from django.test import TestCase # Create your tests here. class Tests(unittest.TestCase): """ Class for tests """ def setUp(self): pass def test_timeframe(self): empty_timeframe = timeframe.Timefr...
31.166667
147
0.618793
1,115
0.851795
0
0
0
0
0
0
301
0.229947
985e8bfeca006e01603b2e2887b6636296128621
7,488
py
Python
CUT/experiments/tmux_launcher.py
Theomat/colorization-av-enseirb-2020
c54c2388ea39a62289fa2f1c51b4757bf55d3c4f
[ "Apache-2.0" ]
1,422
2020-07-31T00:31:19.000Z
2022-03-31T11:35:26.000Z
CUT/experiments/tmux_launcher.py
Theomat/colorization-av-enseirb-2020
c54c2388ea39a62289fa2f1c51b4757bf55d3c4f
[ "Apache-2.0" ]
123
2020-07-31T04:16:03.000Z
2022-03-21T14:02:20.000Z
CUT/experiments/tmux_launcher.py
Theomat/colorization-av-enseirb-2020
c54c2388ea39a62289fa2f1c51b4757bf55d3c4f
[ "Apache-2.0" ]
324
2020-07-31T00:40:11.000Z
2022-03-31T10:01:10.000Z
""" experiment launcher using tmux panes """ import os import math import GPUtil import re available_gpu_devices = None class Options(): def __init__(self, *args, **kwargs): self.args = [] self.kvs = {"gpu_ids": "0"} self.set(*args, **kwargs) def set(self, *args, **kwargs): f...
34.666667
175
0.581063
6,904
0.922009
0
0
0
0
0
0
883
0.117922
985ff6ad544a34fd7123b7189fde0bbabfec1f58
1,557
py
Python
code/strats/punitiveDetective.py
yasirroni/PrisonersDilemmaTournament
ce3de71ff2ccb647aa00129473ff60f985e16e17
[ "MIT" ]
null
null
null
code/strats/punitiveDetective.py
yasirroni/PrisonersDilemmaTournament
ce3de71ff2ccb647aa00129473ff60f985e16e17
[ "MIT" ]
null
null
null
code/strats/punitiveDetective.py
yasirroni/PrisonersDilemmaTournament
ce3de71ff2ccb647aa00129473ff60f985e16e17
[ "MIT" ]
null
null
null
def strategy(history, memory): """ Orannis's punitive detective: Cooperate but when the other player defects, cooperate one more turn to see if they defect again. If they do, defect for 10 turns. Cooperate twice more and if they defect the second time, defect forever. memory is a tu...
40.973684
80
0.619139
0
0
0
0
0
0
0
0
932
0.598587
9860422041ee2bb31eb6ba81c5dea5d1adfbba12
948
py
Python
olwi/weight_sensor.py
molkoback/olwi
449874a1de1a9addaaefe74010d49ca0fa2f9ce3
[ "MIT" ]
null
null
null
olwi/weight_sensor.py
molkoback/olwi
449874a1de1a9addaaefe74010d49ca0fa2f9ce3
[ "MIT" ]
null
null
null
olwi/weight_sensor.py
molkoback/olwi
449874a1de1a9addaaefe74010d49ca0fa2f9ce3
[ "MIT" ]
1
2021-11-23T07:19:00.000Z
2021-11-23T07:19:00.000Z
class WeightSensorException(Exception): pass class WeightSensor: async def reset(self) -> None: raise NotImplementedError() async def start(self, delay: float = 0) -> None: raise NotImplementedError() async def stop(self) -> None: raise NotImplementedError() async def reset(self) -> None: raise NotI...
20.170213
71
0.714135
647
0.682489
0
0
0
0
523
0.551688
43
0.045359
9860ac1ece57fe757569f0cde14494aa4c063246
2,438
py
Python
data_client/controller/event_client.py
trcox/py-core-data-client
a6d35a792c99ccf5196d5618d5dc9df6413e16f7
[ "Apache-2.0" ]
null
null
null
data_client/controller/event_client.py
trcox/py-core-data-client
a6d35a792c99ccf5196d5618d5dc9df6413e16f7
[ "Apache-2.0" ]
null
null
null
data_client/controller/event_client.py
trcox/py-core-data-client
a6d35a792c99ccf5196d5618d5dc9df6413e16f7
[ "Apache-2.0" ]
null
null
null
# ******************************************************************************* # Copyright 2017 Dell 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/L...
28.348837
99
0.637818
0
0
0
0
0
0
0
0
1,140
0.467596
9861a9c527d45b483c922148595e6eb6f8bdd786
4,743
py
Python
src/main/python/salento/reports/map_computation/get_state_call_values.py
khanhgithead/salento
b4933a44ce4a18639b207db0bd555785cee2cc94
[ "Apache-2.0" ]
4
2019-01-14T06:21:49.000Z
2019-12-10T08:55:23.000Z
src/main/python/salento/reports/map_computation/get_state_call_values.py
khanhgithead/salento
b4933a44ce4a18639b207db0bd555785cee2cc94
[ "Apache-2.0" ]
9
2017-12-03T18:27:07.000Z
2018-06-08T19:43:38.000Z
src/main/python/salento/reports/map_computation/get_state_call_values.py
khanhgithead/salento
b4933a44ce4a18639b207db0bd555785cee2cc94
[ "Apache-2.0" ]
3
2017-12-18T19:39:25.000Z
2019-01-17T11:00:05.000Z
""" # **************************************************************************** # # GOVERNMENT PURPOSE RIGHTS # # Contract Number: FA8750-15-2-0270 (Prime: William Marsh Rice University) # Contractor Name: GrammaTech, Inc. (Right Holder - subaward R18683) # Contractor Address: 531 Esty Street, Ithaca, NY 14850 # Ex...
41.243478
81
0.528779
2,740
0.577693
0
0
0
0
0
0
2,591
0.546279
986332363d33a9f488a6d0159f4d3cda7543cedb
316
py
Python
butterfree/transform/features/__init__.py
fossabot/butterfree
8a7da8c540b51c6560b2825cb926c40a351f202b
[ "Apache-2.0" ]
208
2020-07-17T18:46:10.000Z
2022-03-21T12:44:12.000Z
butterfree/transform/features/__init__.py
fossabot/butterfree
8a7da8c540b51c6560b2825cb926c40a351f202b
[ "Apache-2.0" ]
124
2020-07-17T19:42:47.000Z
2021-07-21T00:38:05.000Z
butterfree/transform/features/__init__.py
fossabot/butterfree
8a7da8c540b51c6560b2825cb926c40a351f202b
[ "Apache-2.0" ]
30
2020-07-17T20:24:09.000Z
2022-03-17T00:50:37.000Z
"""Holds all feature types to be part of a FeatureSet.""" from butterfree.transform.features.feature import Feature from butterfree.transform.features.key_feature import KeyFeature from butterfree.transform.features.timestamp_feature import TimestampFeature __all__ = ["Feature", "KeyFeature", "TimestampFeature"]
39.5
76
0.822785
0
0
0
0
0
0
0
0
96
0.303797
9863633cc61296d6ee525b953753de22c61a3ff2
971
py
Python
testAdmin.py
Krenair/wmcs-misc-scripts
ae91b5756d73a9405634df9d6c32e98f21b97d5f
[ "Apache-2.0" ]
null
null
null
testAdmin.py
Krenair/wmcs-misc-scripts
ae91b5756d73a9405634df9d6c32e98f21b97d5f
[ "Apache-2.0" ]
null
null
null
testAdmin.py
Krenair/wmcs-misc-scripts
ae91b5756d73a9405634df9d6c32e98f21b97d5f
[ "Apache-2.0" ]
null
null
null
from keystoneclient.session import Session as KeystoneSession from keystoneclient.auth.identity.v3 import Password as KeystonePassword from keystoneclient.v3 import Client as KeystoneClient #from novaclient import client as novaclient from designateclient.v2 import client as designateclient def get_keystone_session(pr...
33.482759
76
0.762101
0
0
0
0
0
0
0
0
275
0.283213
98659147aeb87e203d9832403d6ea41ee4d2ded3
17,679
py
Python
src/cascade/model/priors.py
adolgert/cascade
2084e07c9ee5e901dd407b817220de882c7246a3
[ "MIT" ]
null
null
null
src/cascade/model/priors.py
adolgert/cascade
2084e07c9ee5e901dd407b817220de882c7246a3
[ "MIT" ]
null
null
null
src/cascade/model/priors.py
adolgert/cascade
2084e07c9ee5e901dd407b817220de882c7246a3
[ "MIT" ]
null
null
null
from copy import copy from functools import total_ordering import numpy as np import scipy.stats as stats from cascade.core import getLoggers CODELOG, MATHLOG = getLoggers(__name__) # A description of how dismod interprets these distributions and their parameters can be found here: # https://bradbell.github.io/dismo...
32.085299
118
0.591606
15,063
0.852028
0
0
1,480
0.083715
0
0
7,235
0.409243
986599e9146af7fc917f4235236600f156665da2
2,581
py
Python
pubsubat/pubsub/schema.py
zerobased-co/pubsub.at
c53ee698d3d2beced0147a8aa9707f69c3ef46c1
[ "MIT" ]
null
null
null
pubsubat/pubsub/schema.py
zerobased-co/pubsub.at
c53ee698d3d2beced0147a8aa9707f69c3ef46c1
[ "MIT" ]
null
null
null
pubsubat/pubsub/schema.py
zerobased-co/pubsub.at
c53ee698d3d2beced0147a8aa9707f69c3ef46c1
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from graphene import relay from graphene_django.filter import DjangoFilterConnectionField from graphene_django.types import DjangoObjectType from .models import User, Category, Publisher, Subscription import graphene class UserType(DjangoObjectType): class Meta: ...
28.362637
70
0.646649
2,297
0.889965
0
0
0
0
0
0
218
0.084463
986926fd782aa8032b7947a3571c5bda5cd88e40
4,057
py
Python
xamarin_ida_script.py
AkshayJainG/xamarin_frida_ios_bypassjb
69c6358bb4a3b9475dfda08ca23d7fffde9252ff
[ "MIT" ]
5
2019-10-20T04:14:49.000Z
2021-07-20T09:17:43.000Z
xamarin_ida_script.py
AkshayJainG/xamarin_frida_ios_bypassjb
69c6358bb4a3b9475dfda08ca23d7fffde9252ff
[ "MIT" ]
1
2019-12-09T12:34:10.000Z
2020-04-23T08:10:29.000Z
xamarin_ida_script.py
AkshayJainG/xamarin_frida_ios_bypassjb
69c6358bb4a3b9475dfda08ca23d7fffde9252ff
[ "MIT" ]
1
2019-10-24T11:00:19.000Z
2019-10-24T11:00:19.000Z
import idautils import idc import collections searchItems = {"mono_init_internal" : "Max native code in a domain", #req'd for iOS "mono_class_load_from_name" : "Runtime critical type %s.%s not found", # req'd for iOS "mono_assembly_request_open" : "Assembly Loader probing location: '%s'."...
54.093333
126
0.556815
0
0
0
0
0
0
0
0
1,882
0.46389
98697fdbc551569cdb320c6bb06e86e48be7478f
389
py
Python
test.py
bpetterborg/vex_vacuum
f4a6dc69b4a10eebcf247d34d9155ec74c3f9f99
[ "MIT" ]
null
null
null
test.py
bpetterborg/vex_vacuum
f4a6dc69b4a10eebcf247d34d9155ec74c3f9f99
[ "MIT" ]
null
null
null
test.py
bpetterborg/vex_vacuum
f4a6dc69b4a10eebcf247d34d9155ec74c3f9f99
[ "MIT" ]
null
null
null
# file where i test everything import pi_vex_393, screen # fix this import time motor = pi_vex_393.Motor() screen = screen.Screen() while True: screen.clearScreen() screen.drawIP() screen.drawSystemLoad() screen.drawDebugLine(motor.currentStatus()) try: motor.spin('left', 50) motor.spin('right', 50) ...
16.208333
44
0.719794
0
0
0
0
0
0
0
0
66
0.169666
986ac397932279d6a6baa2e1d1a81f4621e3adb3
2,193
py
Python
bin/watcher.py
kitaro-tn/lambda_deploy
7da5d604f214daf3d14ada5f3a69f324130c821b
[ "MIT" ]
null
null
null
bin/watcher.py
kitaro-tn/lambda_deploy
7da5d604f214daf3d14ada5f3a69f324130c821b
[ "MIT" ]
1
2021-06-01T23:00:26.000Z
2021-06-01T23:00:26.000Z
bin/watcher.py
tanish-kr/lambda_deploy
7da5d604f214daf3d14ada5f3a69f324130c821b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys import time import re import logging import subprocess from watchdog.observers import Observer from watchdog.events import LoggingEventHandler from watchdog.events import FileSystemEventHandler class CIHandler(FileSystemEventHandler): def __init__(self, context): ...
30.887324
100
0.622891
269
0.122663
0
0
0
0
0
0
261
0.119015
986afc8c8252f43697256a6f683c7548d2d1d640
558
py
Python
example/gaussian_elimination.py
iamaris/ppf
60f798eaea69e7dec2b8c422ceb684219b1645d0
[ "MIT" ]
2
2019-10-26T17:18:41.000Z
2020-06-05T11:26:10.000Z
example/gaussian_elimination.py
iamaris/ppf
60f798eaea69e7dec2b8c422ceb684219b1645d0
[ "MIT" ]
null
null
null
example/gaussian_elimination.py
iamaris/ppf
60f798eaea69e7dec2b8c422ceb684219b1645d0
[ "MIT" ]
5
2019-01-24T16:44:07.000Z
2020-09-14T06:56:55.000Z
import numpy from numpy import dot def gaussian_elimination(a, b): n = len(b) for k in range(0, n - 1): for i in range(k + 1, n): lam = a[i, k]/a[k, k] a[i, k:n] -= lam*a[k, k:n] b[i] -= lam*b[k] for k in range(n - 1, -1, -1): b[k] = (b[k] - dot(a[k, k + 1:n], b[k + 1:n]))/a[k, k] re...
22.32
58
0.453405
0
0
0
0
0
0
0
0
10
0.017921
986b4eb3404a6056f028d5b2e0888b2f1504a9e7
1,009
py
Python
src/python/strelka/scanners/scan_bzip2.py
weslambert/strelka
a941020a9f363774017cb045c4ec173f144c13a0
[ "Apache-2.0" ]
513
2018-09-26T18:57:40.000Z
2022-03-31T18:13:53.000Z
src/python/strelka/scanners/scan_bzip2.py
weslambert/strelka
a941020a9f363774017cb045c4ec173f144c13a0
[ "Apache-2.0" ]
79
2018-09-28T01:05:25.000Z
2022-03-02T12:22:23.000Z
src/python/strelka/scanners/scan_bzip2.py
weslambert/strelka
a941020a9f363774017cb045c4ec173f144c13a0
[ "Apache-2.0" ]
88
2018-09-26T20:10:56.000Z
2022-03-28T02:06:22.000Z
import bz2 import io from strelka import strelka class ScanBzip2(strelka.Scanner): """Decompresses bzip2 files.""" def scan(self, data, file, options, expire_at): with io.BytesIO(data) as bzip2_io: with bz2.BZ2File(filename=bzip2_io) as bzip2_obj: try: ...
30.575758
64
0.474727
956
0.947473
0
0
0
0
0
0
58
0.057483
986c75e370e34a52e4bf7dc513dbd76a17105cd9
245
py
Python
ENV/lib/python3.6/site-packages/pyramid/resource.py
captain-c00keys/pyramid-stocks
0acf3363a6a7ee61cd41b855f43c9d6f9582ae6a
[ "MIT" ]
null
null
null
ENV/lib/python3.6/site-packages/pyramid/resource.py
captain-c00keys/pyramid-stocks
0acf3363a6a7ee61cd41b855f43c9d6f9582ae6a
[ "MIT" ]
null
null
null
ENV/lib/python3.6/site-packages/pyramid/resource.py
captain-c00keys/pyramid-stocks
0acf3363a6a7ee61cd41b855f43c9d6f9582ae6a
[ "MIT" ]
null
null
null
""" Backwards compatibility shim module (forever). """ from pyramid.asset import * # b/w compat resolve_resource_spec = resolve_asset_spec resource_spec_from_abspath = asset_spec_from_abspath abspath_from_resource_spec = abspath_from_asset_spec
40.833333
54
0.840816
0
0
0
0
0
0
0
0
66
0.269388
986e12c15ea58c908f90556561a79c323476a15d
2,985
py
Python
tgext/evolve/__init__.py
axant/tgext.evolve
9072a156f63c22445be385014541bb5c0ad065f2
[ "MIT" ]
null
null
null
tgext/evolve/__init__.py
axant/tgext.evolve
9072a156f63c22445be385014541bb5c0ad065f2
[ "MIT" ]
null
null
null
tgext/evolve/__init__.py
axant/tgext.evolve
9072a156f63c22445be385014541bb5c0ad065f2
[ "MIT" ]
null
null
null
from tg.configuration import milestones from tg.appwrappers.base import ApplicationWrapper from .evolver import Evolution from webob.exc import HTTPServiceUnavailable from threading import Thread __all__ = ['plugme', 'Evolution'] import logging log = logging.getLogger('tgext.evolve') def plugme(configurator, option...
36.402439
115
0.688442
2,168
0.726298
0
0
0
0
0
0
636
0.213065
986f4f99c75768f4e311bdc0d8bfb4d47dcf11f2
1,189
py
Python
simple linear regression/simpleLinearReg.py
Sammy-Barasa/Artificial-Inteligence-and-Machine-Learning
7668ec502f13fa0ec36bb909da1160c19106c4fc
[ "MIT" ]
null
null
null
simple linear regression/simpleLinearReg.py
Sammy-Barasa/Artificial-Inteligence-and-Machine-Learning
7668ec502f13fa0ec36bb909da1160c19106c4fc
[ "MIT" ]
null
null
null
simple linear regression/simpleLinearReg.py
Sammy-Barasa/Artificial-Inteligence-and-Machine-Learning
7668ec502f13fa0ec36bb909da1160c19106c4fc
[ "MIT" ]
null
null
null
#imports import matplotlib.pyplot as plt import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split #Loading the data from a csv dataset=pd.read_csv("Salary_Data.csv") #Data pre processing for salary vs experience x=dataset.iloc[:,:-1].values print(...
23.78
80
0.787216
0
0
0
0
0
0
0
0
419
0.352397
986fb6556cd010b2a735198814dbb2a544ab1e34
2,235
py
Python
py/1041.robot-bounded-in-circle.py
ck2w/leetcode
2d411530b690a2e51b0ae518bf3efaad2edc1083
[ "MIT" ]
null
null
null
py/1041.robot-bounded-in-circle.py
ck2w/leetcode
2d411530b690a2e51b0ae518bf3efaad2edc1083
[ "MIT" ]
null
null
null
py/1041.robot-bounded-in-circle.py
ck2w/leetcode
2d411530b690a2e51b0ae518bf3efaad2edc1083
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=1041 lang=python3 # # [1041] Robot Bounded In Circle # # https://leetcode.com/problems/robot-bounded-in-circle/description/ # # algorithms # Medium (54.22%) # Likes: 557 # Dislikes: 176 # Total Accepted: 39.9K # Total Submissions: 73.7K # Testcase Example: '"GGLLGG"' # # On an infinite pl...
21.699029
78
0.561074
825
0.368962
0
0
0
0
0
0
1,630
0.72898
986fc1135486d171a1e649556cb3989527131ad3
133
py
Python
tests/regularizedtau/__init__.py
TukisTukis/linvpy
471fb8b456af3bf22ced5e8fe1ec0fbbad8a08c8
[ "BSD-2-Clause" ]
16
2016-10-18T03:36:47.000Z
2020-03-02T08:01:21.000Z
tests/regularizedtau/__init__.py
TukisTukis/linvpy
471fb8b456af3bf22ced5e8fe1ec0fbbad8a08c8
[ "BSD-2-Clause" ]
3
2016-10-18T03:37:19.000Z
2019-01-24T13:02:28.000Z
tests/regularizedtau/__init__.py
TukisTukis/linvpy
471fb8b456af3bf22ced5e8fe1ec0fbbad8a08c8
[ "BSD-2-Clause" ]
4
2017-04-07T07:03:55.000Z
2020-07-17T03:40:10.000Z
# __all__ = ['linvpy_latest', 'toolboxutilities_latest', 'toolboxinverse_latest'] # in your __init__.py from regularizedtau import *
33.25
81
0.781955
0
0
0
0
0
0
0
0
102
0.766917
986fec6407d29e5bfc411010d765dcbb343988ce
2,381
py
Python
persistence/layer.py
pminervini/DeepKGC
ed55d0a28d7607324def7c48ebde98786c11d5e1
[ "MIT" ]
5
2015-11-22T11:20:45.000Z
2017-09-20T13:14:51.000Z
persistence/layer.py
pminervini/DeepKGC
ed55d0a28d7607324def7c48ebde98786c11d5e1
[ "MIT" ]
null
null
null
persistence/layer.py
pminervini/DeepKGC
ed55d0a28d7607324def7c48ebde98786c11d5e1
[ "MIT" ]
5
2016-03-17T03:03:22.000Z
2018-10-23T08:59:40.000Z
# -*- coding: utf-8 -*- from abc import ABCMeta, abstractmethod import datetime, time import sys, os, os.path import pymongo import cPickle as pickle import logging class PersistenceLayer(object): __metaclass__ = ABCMeta @abstractmethod def create(self, name, document): pass @abstractmethod de...
25.063158
108
0.601428
2,205
0.926081
0
0
203
0.085258
0
0
150
0.062999
9871044a50f6b8ea1c144e417127b1e4c3c0e043
1,035
py
Python
Day10-19/11.py
bcongdon/advent_of_code_2017
ad9a9b028716c9387dddc3ef9ee34c3a70fea151
[ "MIT" ]
15
2017-12-05T16:01:39.000Z
2020-11-03T00:01:03.000Z
Day10-19/11.py
bcongdon/advent_of_code_2017
ad9a9b028716c9387dddc3ef9ee34c3a70fea151
[ "MIT" ]
null
null
null
Day10-19/11.py
bcongdon/advent_of_code_2017
ad9a9b028716c9387dddc3ef9ee34c3a70fea151
[ "MIT" ]
null
null
null
def manhatten_hex_dist(orig, dest): dist_x = dest[0] - orig[0] dist_y = dest[1] - orig[1] if dist_x > 0 == dist_y > 0: return abs(dist_x + dist_y) else: return max(abs(dist_x), abs(dist_y)) def next_loc(orig, direc): if direc == 'n': return (orig[0], orig[1]+1) elif di...
25.243902
51
0.535266
0
0
0
0
0
0
0
0
67
0.064734
987212e9935b27eb8454286fdd3a99fa1b5c3a93
3,809
py
Python
handwritten_ocr/pdf_to_images.py
testigos2022/ocr-forms
da4e4b70975d799754bdc470526295cdefc77d34
[ "MIT" ]
null
null
null
handwritten_ocr/pdf_to_images.py
testigos2022/ocr-forms
da4e4b70975d799754bdc470526295cdefc77d34
[ "MIT" ]
null
null
null
handwritten_ocr/pdf_to_images.py
testigos2022/ocr-forms
da4e4b70975d799754bdc470526295cdefc77d34
[ "MIT" ]
null
null
null
import os from dataclasses import dataclass, field from pathlib import Path from typing import Any, Callable, Union, Iterator, Iterable from PIL.PpmImagePlugin import PpmImageFile from misc_utils.cached_data import CachedData from misc_utils.dataclass_utils import _UNDEFINED, UNDEFINED from misc_utils.prefix_suffix im...
34.627273
128
0.667104
2,637
0.692308
642
0.168548
2,659
0.698083
0
0
717
0.188238
98725bcf75d90a74eac93b39fd6ebe4b9b3823b0
1,654
py
Python
pd_parallel/tools.py
xbanke/pandas-parallel
f3b5f0cba1b639551cc9a1e04af58f4015053c99
[ "MIT" ]
1
2019-05-11T22:11:46.000Z
2019-05-11T22:11:46.000Z
pd_parallel/tools.py
xbanke/pandas-parallel
f3b5f0cba1b639551cc9a1e04af58f4015053c99
[ "MIT" ]
null
null
null
pd_parallel/tools.py
xbanke/pandas-parallel
f3b5f0cba1b639551cc9a1e04af58f4015053c99
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- """ @version: 0.1 @author: quantpy @file: tools.py @time: 2018/4/11 16:25 """ import os from functools import partial import numpy as np import pandas as pd from .apply_parallel import df_group_apply_parallel def get_grouper(df: pd.DataFrame, by=None, axis=0, le...
31.207547
121
0.689843
0
0
0
0
0
0
0
0
327
0.197703
987362642a365e5423cf2bd55917ff9447725133
512
py
Python
workers/metric_status_worker/tests/tests_worker.py
ishagarg06/augur
2295d48288d243c9ac01bf54ba140ca756828929
[ "MIT" ]
null
null
null
workers/metric_status_worker/tests/tests_worker.py
ishagarg06/augur
2295d48288d243c9ac01bf54ba140ca756828929
[ "MIT" ]
null
null
null
workers/metric_status_worker/tests/tests_worker.py
ishagarg06/augur
2295d48288d243c9ac01bf54ba140ca756828929
[ "MIT" ]
null
null
null
import requests import pytest from metric_status_worker.worker import MetricsStatus def test_get_metric_index_in_table_row(): row = "metric |sTatuS|TestString" metric_status = MetricsStatus("api.github.com") result = metric_status.get_metric_index_in_table_row(row) print(result) assert result == (...
30.117647
67
0.734375
0
0
0
0
0
0
0
0
87
0.169922
9873a808f133176d36f13d62415361d7e99b6f93
3,563
py
Python
general/lies-damnlies-stats/server/stats/tests.py
jeremyosborne/examples-python
5900b3a4f47d59de0a32d3257a8b90a44e80fdcd
[ "MIT" ]
null
null
null
general/lies-damnlies-stats/server/stats/tests.py
jeremyosborne/examples-python
5900b3a4f47d59de0a32d3257a8b90a44e80fdcd
[ "MIT" ]
null
null
null
general/lies-damnlies-stats/server/stats/tests.py
jeremyosborne/examples-python
5900b3a4f47d59de0a32d3257a8b90a44e80fdcd
[ "MIT" ]
null
null
null
""" Automated tests for the ldls application. """ import json from datetime import datetime from django.utils import unittest from django.db import models from jsonserializermixin import JSONSerializerMixin from jsonencoderdelegator import JSONEncoderDelegator class TestModel(models.Model, JSONSerializerMixin): ...
33.613208
80
0.579848
3,286
0.922257
0
0
0
0
0
0
937
0.262981
9874849b08248f2d12b5e87f81348c5947b4f011
609
py
Python
abstract/view.py
bkosciow/piader
81ca2c8a4bd4a834fb460b5306fca0c5ce0584c4
[ "MIT" ]
null
null
null
abstract/view.py
bkosciow/piader
81ca2c8a4bd4a834fb460b5306fca0c5ce0584c4
[ "MIT" ]
null
null
null
abstract/view.py
bkosciow/piader
81ca2c8a4bd4a834fb460b5306fca0c5ce0584c4
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- #pylint: disable=I0011,R0913,R0902,R0921 """View interface""" from builtins import object class View(object): """Class for views""" def hide(self): """on hide event""" raise NotImplementedError("hide not implemented") def show(self): """o...
25.375
60
0.632184
473
0.776683
0
0
0
0
0
0
344
0.56486
9874c094dee995f171864cf9fc6e8566bd56593c
888
py
Python
src/sage/misc/multireplace.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
4
2020-07-17T04:49:44.000Z
2020-07-29T06:33:51.000Z
src/sage/misc/multireplace.py
Ivo-Maffei/sage
467fbc70a08b552b3de33d9065204ee9cbfb02c7
[ "BSL-1.0" ]
2
2018-10-30T13:40:20.000Z
2020-07-23T12:13:30.000Z
src/sage/misc/multireplace.py
dimpase/sage
468f23815ade42a2192b0a9cd378de8fdc594dcd
[ "BSL-1.0" ]
7
2021-11-08T10:01:59.000Z
2022-03-03T11:25:52.000Z
"multi_replace" ########################################################################## # # multi_replace function # # By Xavier Defrang. # # From the Python cookbook: # # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81330 # # There's more cool related code at the above site... # #######################...
24.666667
75
0.573198
0
0
0
0
0
0
0
0
666
0.75
98750fb5aa7191d7cee8eb6e8dd2026b54b8928a
344
py
Python
test/test_pettingzoo.py
PettingZoo-Team/hanabi-learning-environment
2c91462cbdd8df94e6e63f24aec746343b48b664
[ "Apache-2.0" ]
8
2020-05-29T04:21:29.000Z
2020-06-05T20:24:39.000Z
test/test_pettingzoo.py
PettingZoo-Team/hanabi-learning-environment
2c91462cbdd8df94e6e63f24aec746343b48b664
[ "Apache-2.0" ]
null
null
null
test/test_pettingzoo.py
PettingZoo-Team/hanabi-learning-environment
2c91462cbdd8df94e6e63f24aec746343b48b664
[ "Apache-2.0" ]
4
2020-05-29T04:31:28.000Z
2020-06-05T20:24:43.000Z
import pytest from pettingzoo.classic import hanabi_v4 def test_pettingzoo(): env = hanabi_v4.env() env.reset() for agent in env.agent_iter(): observation, reward, done, info = env.last() if done: return else: action = env.action_space(agent).sample() ...
21.5
53
0.59593
0
0
0
0
0
0
0
0
0
0
98769521800947b03e8abc619624645a9f5604cc
1,002
py
Python
aiida_bigdft/futile/doc/doxygen-filter-f90.py
adegomme/aiida-bigdft-plugin
dfd17f166a8cd547d3e581c7c3c9f4eb32bd2aab
[ "MIT" ]
2
2020-06-10T02:45:59.000Z
2020-08-05T18:55:05.000Z
aiida_bigdft/futile/doc/doxygen-filter-f90.py
mikiec84/aiida-bigdft-plugin
ce6ddc69def97977fe0209861ea7f1637090b60f
[ "MIT" ]
6
2019-12-15T19:35:34.000Z
2021-05-07T15:32:18.000Z
aiida_bigdft/futile/doc/doxygen-filter-f90.py
mikiec84/aiida-bigdft-plugin
ce6ddc69def97977fe0209861ea7f1637090b60f
[ "MIT" ]
1
2020-08-05T18:55:21.000Z
2020-08-05T18:55:21.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Filter used by doxygen to any fortran file to do: # 0 - no error, always return something # 1 - Add include file (recursive call) import re import sys #Include command re_include = re.compile('^[ ]*include.*?\n',re.MULTILINE+re.IGNORECASE) #Extract file of the include...
26.368421
93
0.585828
0
0
0
0
0
0
0
0
409
0.408184
987ef5d0afe01238bcfb2e49227c0d50f2adadf7
965
py
Python
src/cmd/root.py
public0821/dnas
d28af238dbf3d6a5cd4ef0b85abe16044b6f729d
[ "Apache-2.0" ]
null
null
null
src/cmd/root.py
public0821/dnas
d28af238dbf3d6a5cd4ef0b85abe16044b6f729d
[ "Apache-2.0" ]
null
null
null
src/cmd/root.py
public0821/dnas
d28af238dbf3d6a5cd4ef0b85abe16044b6f729d
[ "Apache-2.0" ]
null
null
null
from cli import Command from cmd.status import Status from cmd.samba import Samba class RootCommand(Command): def __init__(self, name): super().__init__(name=name) # self.add_child(Test(parent=self, name='test')) self.add_child(Status(parent=self, name='status')) self.add_child(Samb...
35.740741
101
0.645596
879
0.910881
0
0
0
0
0
0
248
0.256995
98802c9f1ac3cac5655a6b81c0649a8621ae583b
38,401
py
Python
bucky/model/main.py
ragram88/bucky
7840e3821af0124bedf4d806a1af34b8ebb20647
[ "MIT" ]
1
2021-08-11T20:31:35.000Z
2021-08-11T20:31:35.000Z
bucky/model/main.py
ragram88/bucky
7840e3821af0124bedf4d806a1af34b8ebb20647
[ "MIT" ]
null
null
null
bucky/model/main.py
ragram88/bucky
7840e3821af0124bedf4d806a1af34b8ebb20647
[ "MIT" ]
null
null
null
"""The main module handling the simulation""" import copy import datetime import logging import os import pickle import queue import random import sys import threading import warnings from functools import lru_cache from pprint import pformat # TODO set some defaults for width/etc with partial? import numpy as np imp...
41.922489
147
0.609672
31,946
0.831905
0
0
273
0.007109
0
0
8,517
0.221791
988147fa4143728a5e12261688a08199610fecd9
10,557
py
Python
bootini_star/views.py
rseichter/bootini-star
a80258f01a05e4df38748b8cb47dfadabd42c20d
[ "MIT" ]
null
null
null
bootini_star/views.py
rseichter/bootini-star
a80258f01a05e4df38748b8cb47dfadabd42c20d
[ "MIT" ]
null
null
null
bootini_star/views.py
rseichter/bootini-star
a80258f01a05e4df38748b8cb47dfadabd42c20d
[ "MIT" ]
null
null
null
""" Application views/routes are based on Flask's MethodView. All primary views are combined into a Flask blueprint. """ __author__ = 'Ralph Seichter' import datetime from operator import attrgetter import flask_login from flask import Blueprint, flash, redirect, url_for from flask.templating import render_template f...
36.278351
79
0.62783
7,169
0.679075
0
0
6,409
0.607085
0
0
2,047
0.1939
9881570c2307209bb16898489ef2c768f90b46b1
514
py
Python
3_corpus_chatterbot.py
OtacilioMaia/Chatbots-Desenvolvimento-Orientado-a-Conversas
aadb7384d64549749508d594138e07221c200f68
[ "MIT" ]
null
null
null
3_corpus_chatterbot.py
OtacilioMaia/Chatbots-Desenvolvimento-Orientado-a-Conversas
aadb7384d64549749508d594138e07221c200f68
[ "MIT" ]
null
null
null
3_corpus_chatterbot.py
OtacilioMaia/Chatbots-Desenvolvimento-Orientado-a-Conversas
aadb7384d64549749508d594138e07221c200f68
[ "MIT" ]
null
null
null
__author__ = "Otacilio Maia" __version__ = "1.0.0" from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer def main(): chatbot = ChatBot('Chat AI') trainer = ChatterBotCorpusTrainer(chatbot) trainer.train("chatterbot.corpus.portuguese") user_text = "" while(user_tex...
25.7
71
0.684825
0
0
0
0
0
0
0
0
94
0.182879
9881f1e32280b6d69007c8828095a1ac61745d01
3,290
py
Python
alipay/aop/api/domain/AlipayMarketingPassInstanceQueryModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayMarketingPassInstanceQueryModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayMarketingPassInstanceQueryModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AlipayMarketingPassInstanceQueryModel(object): def __init__(self): self._page_num = None self._page_size = None self._pass_id = None self._serial_num...
28.362069
77
0.573252
3,159
0.960182
0
0
1,417
0.430699
0
0
388
0.117933
9882a6621e2f9d2ca4d617578cd087b3c1b9a289
74
py
Python
test/test_resources/python-unittest/py_several_files2/Root/application.py
jocelyn/codeboard_mantra
05a4c783dbae8d87b55c834382d8d12f957ffea9
[ "MIT" ]
1
2019-01-12T02:57:53.000Z
2019-01-12T02:57:53.000Z
test/test_resources/python-unittest/py_several_files2/Root/application.py
jocelyn/codeboard_mantra
05a4c783dbae8d87b55c834382d8d12f957ffea9
[ "MIT" ]
1
2017-10-13T11:57:41.000Z
2017-10-13T11:57:41.000Z
test/test_resources/python-unittest/py_several_files2/Root/application.py
jocelyn/codeboard_mantra
05a4c783dbae8d87b55c834382d8d12f957ffea9
[ "MIT" ]
6
2017-10-13T11:27:58.000Z
2020-10-06T19:06:22.000Z
from b import foo from c import bar1 foo() bar1() print "Goodbye, World!"
12.333333
23
0.716216
0
0
0
0
0
0
0
0
17
0.22973
9882fd7a26e84caf45194e8eb71a993e438a8861
149
py
Python
abm/abm/agents/__init__.py
giacrava/sbp-adoption-abm
18f683caac8aa0efecfcce18598305b1670b6dba
[ "MIT" ]
null
null
null
abm/abm/agents/__init__.py
giacrava/sbp-adoption-abm
18f683caac8aa0efecfcce18598305b1670b6dba
[ "MIT" ]
null
null
null
abm/abm/agents/__init__.py
giacrava/sbp-adoption-abm
18f683caac8aa0efecfcce18598305b1670b6dba
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .municipality import Municipality from .government import Government from .environment import MunicipalityEnvironment
21.285714
48
0.791946
0
0
0
0
0
0
0
0
23
0.154362
9883440a5388568181a9f4d444ede27a94ebd59a
9,053
py
Python
MCEq/misc.py
afedynitch/MCEq_classic
cbbe4b00c923b54afb0221e980bc716a395ed4b5
[ "MIT" ]
null
null
null
MCEq/misc.py
afedynitch/MCEq_classic
cbbe4b00c923b54afb0221e980bc716a395ed4b5
[ "MIT" ]
null
null
null
MCEq/misc.py
afedynitch/MCEq_classic
cbbe4b00c923b54afb0221e980bc716a395ed4b5
[ "MIT" ]
2
2019-12-10T14:12:12.000Z
2020-05-06T14:25:58.000Z
# -*- coding: utf-8 -*- """ :mod:`MCEq.misc` - other useful things ====================================== Some helper functions and plotting features are collected in this module. """ import numpy as np from mceq_config import dbg def normalize_hadronic_model_name(name): """Converts hadronic model name into st...
30.176667
78
0.577046
2,519
0.27825
0
0
724
0.079973
0
0
2,493
0.275378
9883506bbef48623a9d156fc156d445016a20d6a
5,103
py
Python
examples/test_wf/test_convergence.py
yakutovicha/yambo-aiida
5c722961ebabe5ea14fbcb20a866c6fb99398a7d
[ "MIT", "BSD-3-Clause" ]
null
null
null
examples/test_wf/test_convergence.py
yakutovicha/yambo-aiida
5c722961ebabe5ea14fbcb20a866c6fb99398a7d
[ "MIT", "BSD-3-Clause" ]
null
null
null
examples/test_wf/test_convergence.py
yakutovicha/yambo-aiida
5c722961ebabe5ea14fbcb20a866c6fb99398a7d
[ "MIT", "BSD-3-Clause" ]
null
null
null
from aiida.backends.utils import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): load_dbenv() from aiida_yambo.workflows.yamboconvergence import YamboConvergenceWorkflow try: from aiida.orm.data.base import Float, Str, NumericType, BaseType, List from aiida.work.run import run, submit except Impo...
50.524752
130
0.562806
0
0
0
0
0
0
0
0
1,412
0.2767
98839343d4c13dcd80dfa12f748035fe5fe131e4
503
py
Python
src/storage.py
xyzza/Sancho
ed0b7914bbd3f92b39ff5ef6fe92711855d2d45b
[ "MIT" ]
null
null
null
src/storage.py
xyzza/Sancho
ed0b7914bbd3f92b39ff5ef6fe92711855d2d45b
[ "MIT" ]
null
null
null
src/storage.py
xyzza/Sancho
ed0b7914bbd3f92b39ff5ef6fe92711855d2d45b
[ "MIT" ]
null
null
null
# coding: utf-8 _USERS_STORAGE = { 'default_id': None, # current issue } def set_user_issues(user_id, issue=None): if not issue: issue = Issue('', '') _USERS_STORAGE[user_id] = issue return _USERS_STORAGE[user_id] def get_user_issue(user_id): return _USERS_STORAGE[user_id] class Issue(...
20.12
49
0.644135
194
0.385686
0
0
0
0
0
0
67
0.133201
9883b6e8d4d307c1b52e2f3a77df6fc639e8d98d
4,936
py
Python
lungSegmentation/evalutate_performance.py
slowy07/medical-BCDU
dab1ddcacbe093b78e6830d52db2a4e6fabc3d52
[ "MIT" ]
null
null
null
lungSegmentation/evalutate_performance.py
slowy07/medical-BCDU
dab1ddcacbe093b78e6830d52db2a4e6fabc3d52
[ "MIT" ]
null
null
null
lungSegmentation/evalutate_performance.py
slowy07/medical-BCDU
dab1ddcacbe093b78e6830d52db2a4e6fabc3d52
[ "MIT" ]
null
null
null
import os os.environ["CUDA_VISIBLE_DEVICES"] = "1" import models as M import numpy as np import scipy import matplotlib.pyplot as plt from sklearn.metrics import roc_curve from sklearn.metrics import roc_auc_score from sklearn.metrics import confusion_matrix from sklearn.metrics import precision_recall_curve from sklea...
36.562963
109
0.709887
0
0
0
0
0
0
0
0
1,120
0.226904
988492255fff6a05146e48a47f6f7316997bd490
600
py
Python
A_source_code/carbon/code/mocsy_module.py
vanHoek-dgnm/CARBON-DISC
3ecd5f4efba5e032d43679ee977064d6b25154a9
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
A_source_code/carbon/code/mocsy_module.py
vanHoek-dgnm/CARBON-DISC
3ecd5f4efba5e032d43679ee977064d6b25154a9
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
A_source_code/carbon/code/mocsy_module.py
vanHoek-dgnm/CARBON-DISC
3ecd5f4efba5e032d43679ee977064d6b25154a9
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# ****************************************************** ## Copyright 2019, PBL Netherlands Environmental Assessment Agency and Utrecht University. ## Reuse permitted under Gnu Public License, GPL v3. # ****************************************************** ''' imports mocsy module ''' try: import mocsy except Modul...
31.578947
90
0.55
0
0
0
0
0
0
0
0
334
0.556667
98861ad043d727327fb39c7ecee6e55bdc8d3211
311
py
Python
project/stocks/__init__.py
YellowFlash2012/stock-portfolio-io
0a39c9a692aecc8d6b39e728efd63061112bc975
[ "MIT" ]
null
null
null
project/stocks/__init__.py
YellowFlash2012/stock-portfolio-io
0a39c9a692aecc8d6b39e728efd63061112bc975
[ "MIT" ]
null
null
null
project/stocks/__init__.py
YellowFlash2012/stock-portfolio-io
0a39c9a692aecc8d6b39e728efd63061112bc975
[ "MIT" ]
null
null
null
""" The stocks blueprint handles the user management for this application. Specifically, this blueprint allows for users to add, edit, and delete stock data from their portfolio. """ from flask import Blueprint stocks_blueprint = Blueprint('stocks', __name__, template_folder='templates') from . import routes
31.1
77
0.794212
0
0
0
0
0
0
0
0
201
0.646302
98862016069a5935ad27d5ce8118f56358c9629c
1,548
py
Python
1.5-one-away.py
jmartenstein/interview-questions
0e2dca36b02f82e7a30453ef7ae2165f04e50710
[ "MIT" ]
null
null
null
1.5-one-away.py
jmartenstein/interview-questions
0e2dca36b02f82e7a30453ef7ae2165f04e50710
[ "MIT" ]
null
null
null
1.5-one-away.py
jmartenstein/interview-questions
0e2dca36b02f82e7a30453ef7ae2165f04e50710
[ "MIT" ]
null
null
null
import unittest class OneAwayTest(unittest.TestCase): def test_oneaway_missing_letter1(self): actual = one_away("pale", "ple") self.assertTrue(actual) def test_oneaway_missing_letter2(self): actual = one_away("p", "") self.assertTrue(actual) def test_oneaway_same_letters(self): actual = on...
21.802817
70
0.631783
687
0.443798
0
0
0
0
0
0
165
0.106589
9886841ad97481579a6dce1caae1343591e52f5d
9,593
py
Python
Pressure_Converter/pressure_converter_script.py
Affanmir/Awesome-Python-Scripts
bba0512e1c580d605205744ece878da13f2c7661
[ "MIT" ]
1,026
2018-10-02T18:51:12.000Z
2022-03-31T13:45:14.000Z
Pressure_Converter/pressure_converter_script.py
Affanmir/Awesome-Python-Scripts
bba0512e1c580d605205744ece878da13f2c7661
[ "MIT" ]
164
2018-10-02T18:37:40.000Z
2021-11-18T13:29:54.000Z
Pressure_Converter/pressure_converter_script.py
Affanmir/Awesome-Python-Scripts
bba0512e1c580d605205744ece878da13f2c7661
[ "MIT" ]
521
2018-10-02T18:15:40.000Z
2022-03-26T12:10:15.000Z
from typing import Union def atmospeheres_to_bars(atm: float, unit: str) -> Union[float, str]: """ This function converts atm to bar Wikipedia reference: https://en.wikipedia.org/wiki/Standard_atmosphere_(unit) Wikipedia reference: https://en.wikipedia.org/wiki/Bar_(unit) >>> atmospeheres_to_bars...
29.791925
83
0.640154
0
0
0
0
0
0
0
0
7,313
0.762327
9886f6ef61ce8671578994a8e3555d6131699f26
444
py
Python
jp.atcoder/abc129/abc129_c/10071155.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc129/abc129_c/10071155.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc129/abc129_c/10071155.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
import sys MOD = 10 ** 9 + 7 n, m, *a = map(int, sys.stdin.read().split()) broken = set(a) def main(): res = [None] * (n + 1) res[0] = 1 res[1] = 0 if 1 in broken else 1 for i in range(2, n+1): if i in broken: res[i] = 0 else: res[i] = res[i-2]...
17.76
46
0.432432
0
0
0
0
0
0
0
0
10
0.022523
9886fd5ef77fff993bad45edb77225659ddd988c
6,569
py
Python
venv/lib/python3.6/site-packages/ansible_collections/cisco/nxos/plugins/modules/nxos_banner.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/cisco/nxos/plugins/modules/nxos_banner.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/cisco/nxos/plugins/modules/nxos_banner.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function __metaclass__ = type # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pu...
28.437229
102
0.630994
0
0
0
0
0
0
0
0
3,252
0.495053
98877c694a0a259f7bba574f818a2c84334902b2
8,555
py
Python
guv/greenthread.py
timgates42/guv
d7bac2ca6a73cc2059969af08223b82f3e187922
[ "MIT" ]
120
2015-01-05T15:15:26.000Z
2020-07-28T11:25:10.000Z
guv/greenthread.py
timgates42/guv
d7bac2ca6a73cc2059969af08223b82f3e187922
[ "MIT" ]
22
2015-01-12T21:52:32.000Z
2017-01-22T18:18:20.000Z
guv/greenthread.py
timgates42/guv
d7bac2ca6a73cc2059969af08223b82f3e187922
[ "MIT" ]
13
2015-01-18T11:42:34.000Z
2021-07-15T10:59:22.000Z
from collections import deque import sys import greenlet from . import event, hubs from .support import reraise __all__ = ['sleep', 'spawn', 'spawn_n', 'kill', 'spawn_after', 'GreenThread'] def sleep(seconds=0): """Yield control to the hub until at least `seconds` have elapsed :param float seconds: time to...
35.205761
100
0.658679
3,726
0.435535
0
0
0
0
0
0
4,989
0.583168
988be3dce863409b6b062d305bd83405f34d1ed8
460
py
Python
While_loop/while_loop.py
SaicharanKandukuri/snippets-python-from-scrach
b0823fde3cf1a88bf43d97bdc542de7e32c76dac
[ "MIT" ]
1
2021-05-29T03:09:24.000Z
2021-05-29T03:09:24.000Z
While_loop/while_loop.py
SaicharanKandukuri/snippets-python-from-scrach
b0823fde3cf1a88bf43d97bdc542de7e32c76dac
[ "MIT" ]
null
null
null
While_loop/while_loop.py
SaicharanKandukuri/snippets-python-from-scrach
b0823fde3cf1a88bf43d97bdc542de7e32c76dac
[ "MIT" ]
null
null
null
name = None x=0 while not name: x=x+1 if x<3: name = input("Enter your name: ") if x==3: name = input("Man enter your name : ") if x==4: name = input("Why are spamming mate: ") if x==5: name = input("For God sake: ") if x==6: name = input("Bro!........") ...
20.909091
47
0.465217
0
0
0
0
0
0
0
0
147
0.319565