hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
790e2a1a50362588a76240d2a0bca349b6970a3b
1,619
py
Python
Application/ReclamaCaicoProject/ReclamaCaicoApp/forms.py
WesleyVitor/ReclamaCaico
df67997821fc00236f1d9c77e8685ed8e4a6934b
[ "MIT" ]
null
null
null
Application/ReclamaCaicoProject/ReclamaCaicoApp/forms.py
WesleyVitor/ReclamaCaico
df67997821fc00236f1d9c77e8685ed8e4a6934b
[ "MIT" ]
null
null
null
Application/ReclamaCaicoProject/ReclamaCaicoApp/forms.py
WesleyVitor/ReclamaCaico
df67997821fc00236f1d9c77e8685ed8e4a6934b
[ "MIT" ]
null
null
null
from django import forms from .models import Reclamacao,Login,Comentario from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User class CadastraReclamacaoForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(CadastraReclamacaoForm,self).__init__(*args,...
33.040816
97
0.657196
from django import forms from .models import Reclamacao,Login,Comentario from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User class CadastraReclamacaoForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(CadastraReclamacaoForm,self).__init__(*args,...
true
true
790e2a29bb037db669a415534e68bfcb8ec39c40
834
py
Python
sukh_site_v1/sukh_site_v1/urls.py
sbhuller98/main_django
6c54aef90cf222dac608f6742251d3a83934fc82
[ "MIT" ]
1
2021-02-09T21:38:02.000Z
2021-02-09T21:38:02.000Z
sukh_site_v1/sukh_site_v1/urls.py
sbhuller98/main_django
6c54aef90cf222dac608f6742251d3a83934fc82
[ "MIT" ]
null
null
null
sukh_site_v1/sukh_site_v1/urls.py
sbhuller98/main_django
6c54aef90cf222dac608f6742251d3a83934fc82
[ "MIT" ]
null
null
null
"""sukh_site_v1 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-...
34.75
77
0.708633
from django.contrib import admin from django.urls import path from django.conf.urls import url, include urlpatterns = [ path('admin/', admin.site.urls), path('', include('mysite.urls')), ]
true
true
790e2c0f81736d4d3a5ba35c4c9cf12d9ddd6c8b
1,842
py
Python
test/test_get_extended_contact_details_statistics.py
Danilka/APIv3-python-library
c96472f47d652d2e09e8b4a48a80e33fde06e7f1
[ "MIT" ]
null
null
null
test/test_get_extended_contact_details_statistics.py
Danilka/APIv3-python-library
c96472f47d652d2e09e8b4a48a80e33fde06e7f1
[ "MIT" ]
null
null
null
test/test_get_extended_contact_details_statistics.py
Danilka/APIv3-python-library
c96472f47d652d2e09e8b4a48a80e33fde06e7f1
[ "MIT" ]
null
null
null
# coding: utf-8 """ SendinBlue API SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at h...
44.926829
820
0.704126
from __future__ import absolute_import import unittest import sib_api_v3_sdk from sib_api_v3_sdk.models.get_extended_contact_details_statistics import GetExtendedContactDetailsStatistics from sib_api_v3_sdk.rest import ApiException class TestGetExtendedContactDetailsStatistics(unittest.TestCase): def set...
true
true
790e2c4249252004a98d8571062b891cd4898944
259
py
Python
backend/edw_shop/money/__init__.py
infolabs/django-edw-shop
2f83235361ce89199dc867b06930440904a54db6
[ "BSD-3-Clause" ]
null
null
null
backend/edw_shop/money/__init__.py
infolabs/django-edw-shop
2f83235361ce89199dc867b06930440904a54db6
[ "BSD-3-Clause" ]
null
null
null
backend/edw_shop/money/__init__.py
infolabs/django-edw-shop
2f83235361ce89199dc867b06930440904a54db6
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Source: https://github.com/awesto/django-shop/blob/12e246b356dbc1bc5bbdc8f056e3cb109c617997/shop/money/__init__.py """ from .money_maker import MoneyMaker, AbstractMoney # The default Money type for this shop Money = MoneyMaker()
28.777778
114
0.764479
from .money_maker import MoneyMaker, AbstractMoney Money = MoneyMaker()
true
true
790e2c73153e861a996df906a6e26ba5aaabf8e7
149
py
Python
igov_main/apps.py
morrisedu/igov_africa
d1a96c18e22034a32f122b2369940583e6719194
[ "MIT" ]
null
null
null
igov_main/apps.py
morrisedu/igov_africa
d1a96c18e22034a32f122b2369940583e6719194
[ "MIT" ]
null
null
null
igov_main/apps.py
morrisedu/igov_africa
d1a96c18e22034a32f122b2369940583e6719194
[ "MIT" ]
null
null
null
from django.apps import AppConfig class IgovMainConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'igov_main'
21.285714
56
0.765101
from django.apps import AppConfig class IgovMainConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'igov_main'
true
true
790e2d0bf96b7645e968f6589fc30a1e66e201e2
411
py
Python
leetcode/12.integer-to-roman.py
geemaple/algorithm
68bc5032e1ee52c22ef2f2e608053484c487af54
[ "MIT" ]
177
2017-08-21T08:57:43.000Z
2020-06-22T03:44:22.000Z
leetcode/12.integer-to-roman.py
geemaple/leetcode
68bc5032e1ee52c22ef2f2e608053484c487af54
[ "MIT" ]
2
2020-09-22T09:51:17.000Z
2021-12-25T08:18:45.000Z
leetcode/12.integer-to-roman.py
geemaple/algorithm
68bc5032e1ee52c22ef2f2e608053484c487af54
[ "MIT" ]
23
2017-08-23T06:01:28.000Z
2020-04-20T03:17:36.000Z
class Solution: def intToRoman(self, num: int) -> str: romans = ["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"] values = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1] res = '' for i in range(len(romans)): while (num - values[i] >...
31.615385
88
0.403893
class Solution: def intToRoman(self, num: int) -> str: romans = ["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"] values = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1] res = '' for i in range(len(romans)): while (num - values[i] >...
true
true
790e2edf5bdcb3eefc1ecc68d696dba2da95267d
1,414
py
Python
GoldenTimes/urls.py
liuxue0905/GoldenTimes
9cc1fdd0b8c4b06e1f4f932baba0db02e895bc41
[ "BSD-3-Clause" ]
null
null
null
GoldenTimes/urls.py
liuxue0905/GoldenTimes
9cc1fdd0b8c4b06e1f4f932baba0db02e895bc41
[ "BSD-3-Clause" ]
10
2020-06-20T02:04:24.000Z
2021-12-13T19:47:35.000Z
GoldenTimes/urls.py
liuxue0905/GoldenTimes
9cc1fdd0b8c4b06e1f4f932baba0db02e895bc41
[ "BSD-3-Clause" ]
null
null
null
"""GoldenTimes URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Clas...
35.35
91
0.719236
from django.conf.urls import url from django.contrib import admin from django.conf.urls import include from django.views.generic import RedirectView urlpatterns = [ url(r'^$', RedirectView.as_view(url='/portal/')), url(r'^admin/', admin.site.urls), url(r'^portal/', include('portal.urls')), url...
true
true
790e2f1206912b7fe22dd2186353a00b583aeb88
812
py
Python
bag.py
schwehr/bag-py
3805a85a57d993ea12af228076eb5d8ac5b011fd
[ "Apache-2.0" ]
7
2015-03-25T01:28:47.000Z
2020-06-16T14:02:20.000Z
bag.py
xavierherron/bag-py
3805a85a57d993ea12af228076eb5d8ac5b011fd
[ "Apache-2.0" ]
null
null
null
bag.py
xavierherron/bag-py
3805a85a57d993ea12af228076eb5d8ac5b011fd
[ "Apache-2.0" ]
4
2015-02-08T13:31:52.000Z
2021-05-18T19:09:22.000Z
#!/usr/bin/env python import h5py f = h5py.File('H11302_OLS_OSS/H11302_2m_1.bag') print f.listobjects() print f.listitems() bag_root = f['/BAG_root'] metadata = ''.join(bag_root['metadata']) o = file('metadata.xml','w') o.write(metadata) del o #print metadata #[0:200] elevation = bag_root['elevation'] print 'sh...
19.804878
53
0.635468
import h5py f = h5py.File('H11302_OLS_OSS/H11302_2m_1.bag') print f.listobjects() print f.listitems() bag_root = f['/BAG_root'] metadata = ''.join(bag_root['metadata']) o = file('metadata.xml','w') o.write(metadata) del o ion = bag_root['elevation'] print 'shape:',elevation.shape data = elevation.value prin...
false
true
790e30859321a5e763de3820ea1fea1dd98d732c
11,751
py
Python
sorolla/sorolla.py
bq/sorolla
f9fc2f35a673f2f11d370975be4e06c520341d88
[ "Apache-2.0" ]
16
2015-04-22T09:17:17.000Z
2015-12-05T17:17:22.000Z
sorolla/sorolla.py
bq/sorolla
f9fc2f35a673f2f11d370975be4e06c520341d88
[ "Apache-2.0" ]
null
null
null
sorolla/sorolla.py
bq/sorolla
f9fc2f35a673f2f11d370975be4e06c520341d88
[ "Apache-2.0" ]
null
null
null
import subprocess import math import os from pipes import quote import platform class Sorolla: """ Main class which will launch ImageMagick commands to apply selected transformations to the given images. It needs ImageMagick & GhostScript installed in the system and in PATH to work properly ""...
41.522968
129
0.512722
import subprocess import math import os from pipes import quote import platform class Sorolla: """ Main class which will launch ImageMagick commands to apply selected transformations to the given images. It needs ImageMagick & GhostScript installed in the system and in PATH to work properly ""...
false
true
790e3123cdc9d99b9090abcfcb239142e7d814c9
9,153
py
Python
dm/templates/external_load_balancer/external_load_balancer.py
trevorjwilliams/cloud-foundation-toolkit
5abcd362f118c7721cf10ba22d038517df421b73
[ "Apache-2.0" ]
null
null
null
dm/templates/external_load_balancer/external_load_balancer.py
trevorjwilliams/cloud-foundation-toolkit
5abcd362f118c7721cf10ba22d038517df421b73
[ "Apache-2.0" ]
null
null
null
dm/templates/external_load_balancer/external_load_balancer.py
trevorjwilliams/cloud-foundation-toolkit
5abcd362f118c7721cf10ba22d038517df421b73
[ "Apache-2.0" ]
1
2020-06-20T09:45:29.000Z
2020-06-20T09:45:29.000Z
# Copyright 2018 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
29.336538
132
0.57839
import copy from hashlib import sha1 import json def set_optional_property(destination, source, prop_name): if prop_name in source: destination[prop_name] = source[prop_name] def get_backend_service(properties, backend_spec, res_name, project_id): name = backend_spec.get('resourceNam...
true
true
790e316af9a26848af5da0502b2886d875c009bd
3,324
py
Python
smarts/core/tests/test_sensors.py
zbzhu99/SMARTS
652aa23e71bd4e2732e2742140cfcd0ec082a7da
[ "MIT" ]
null
null
null
smarts/core/tests/test_sensors.py
zbzhu99/SMARTS
652aa23e71bd4e2732e2742140cfcd0ec082a7da
[ "MIT" ]
null
null
null
smarts/core/tests/test_sensors.py
zbzhu99/SMARTS
652aa23e71bd4e2732e2742140cfcd0ec082a7da
[ "MIT" ]
null
null
null
# MIT License # # Copyright (C) 2021. Huawei Technologies Co., Ltd. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation th...
33.24
83
0.690734
from unittest import mock import numpy as np import pytest from helpers.scenario import temp_scenario from smarts.core.agent_interface import AgentInterface from smarts.core.coordinates import Heading, Pose from smarts.core.plan import Plan from smarts.core.scenario import Scenario from smarts.co...
true
true
790e31b1372979e39e09f95e42d22ae54b2a220b
8,385
py
Python
pythran/tests/pydata/compute_mask.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
1,647
2015-01-13T01:45:38.000Z
2022-03-28T01:23:41.000Z
pythran/tests/pydata/compute_mask.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
1,116
2015-01-01T09:52:05.000Z
2022-03-18T21:06:40.000Z
pythran/tests/pydata/compute_mask.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
180
2015-02-12T02:47:28.000Z
2022-03-14T10:28:18.000Z
#pythran export compute_mask(int[:,:], int[:,:]) #runas import numpy as np; coords = np.array([[0, 0, 1, 1, 2, 2]]); indices = np.array([[0, 3, 2]]); compute_mask(coords, indices) import numpy as np def compute_mask(coords, indices): # pragma: no cover """ Gets the mask for the coords given the indices in sli...
30.714286
130
0.584377
import numpy as np def compute_mask(coords, indices): starts = [0] stops = [coords.shape[1]] n_matches = coords.shape[1] i = 0 while i < len(indices): n_pairs = len(starts) n_current_slices = _get_slice_len(indices[i]) * n_pairs...
true
true
790e32c1527812cf451bbea000970659b3399682
6,233
py
Python
soccer/gameplay/skills/angle_receive.py
Alex-Gurung/robocup-software
9271df5ed16928f0081fc81c50affb0a08dd54bd
[ "Apache-2.0" ]
1
2019-01-18T02:03:26.000Z
2019-01-18T02:03:26.000Z
soccer/gameplay/skills/angle_receive.py
Alex-Gurung/robocup-software
9271df5ed16928f0081fc81c50affb0a08dd54bd
[ "Apache-2.0" ]
null
null
null
soccer/gameplay/skills/angle_receive.py
Alex-Gurung/robocup-software
9271df5ed16928f0081fc81c50affb0a08dd54bd
[ "Apache-2.0" ]
null
null
null
import robocup import constants import main import math import skills.touch_ball import skills._kick import skills.pass_receive ## AngleReceive accepts a receive_point as a parameter and gets setup there to catch the ball # It transitions to the 'aligned' state once it's there within its error thresholds and is stead...
42.691781
153
0.636932
import robocup import constants import main import math import skills.touch_ball import skills._kick import skills.pass_receive ed on where # the ball is moving and attempt to catch it. # It will move to the 'completed' state if it catches the ball, otherwise it will go to 'failed'. # Kick is a single_robot_behavior,...
true
true
790e357d014fdc21403ef02d0e57957a4fa0e0e7
1,012
py
Python
utils/args.py
BruceWW/odyn
aac5887ecd3daf5864aa99db0927ed86857dfb09
[ "Apache-2.0" ]
null
null
null
utils/args.py
BruceWW/odyn
aac5887ecd3daf5864aa99db0927ed86857dfb09
[ "Apache-2.0" ]
null
null
null
utils/args.py
BruceWW/odyn
aac5887ecd3daf5864aa99db0927ed86857dfb09
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 _*- # @author : Lin Luo / Bruce Liu # @time : 2020/1/3 21:35 # @contact : 15869300264@163.com / bruce.w.y.liu@gmail.com import argparse parser = argparse.ArgumentParser() parser.add_argument_group() parser.add_argument('-c', '--config', help='config file for run and operati...
50.6
116
0.697628
import argparse parser = argparse.ArgumentParser() parser.add_argument_group() parser.add_argument('-c', '--config', help='config file for run and operation', required=False) group = parser.add_mutually_exclusive_group() group.add_argument('-a', '--add', help='add sk with ip', required=False) group.add_argument('...
true
true
790e36494da98b513d2ae9804861c0907501b1cd
5,611
py
Python
osc_bge/agent/models.py
jisuhan3201/osc-bge
125c441d23d7f1fdb2d9b8f42f859082e757e25a
[ "MIT" ]
null
null
null
osc_bge/agent/models.py
jisuhan3201/osc-bge
125c441d23d7f1fdb2d9b8f42f859082e757e25a
[ "MIT" ]
5
2020-06-05T19:49:47.000Z
2021-09-08T00:50:55.000Z
osc_bge/agent/models.py
jisuhan3201/osc-bge
125c441d23d7f1fdb2d9b8f42f859082e757e25a
[ "MIT" ]
null
null
null
from django.db import models from osc_bge.users import models as user_models # Create your models here. class TimeStampedModel(models.Model): created_at = models.DateTimeField(auto_now_add=True, null=True) updated_at = models.DateTimeField(auto_now=True, null=True) class Meta: abstract = True #...
38.696552
106
0.724826
from django.db import models from osc_bge.users import models as user_models class TimeStampedModel(models.Model): created_at = models.DateTimeField(auto_now_add=True, null=True) updated_at = models.DateTimeField(auto_now=True, null=True) class Meta: abstract = True class AgencyHead(TimeStamp...
true
true
790e38bcf40153c2751ff631c6ec731a3fac3b77
363
py
Python
Statistics/SampleMean.py
brittrubil/miniProject2-601
eccc43b52de55e2f3ea5400c6b28309aabef1596
[ "MIT" ]
null
null
null
Statistics/SampleMean.py
brittrubil/miniProject2-601
eccc43b52de55e2f3ea5400c6b28309aabef1596
[ "MIT" ]
null
null
null
Statistics/SampleMean.py
brittrubil/miniProject2-601
eccc43b52de55e2f3ea5400c6b28309aabef1596
[ "MIT" ]
null
null
null
def sample_mean(a, b, c): try: a = int(a) b = int(b) c = int(c) mean_numbers = [a, b, c] d = len(mean_numbers) result_mean = (a + b + c)/d return float(result_mean) except ZeroDivisionError: print("Error: Number Not Valid") except ValueError: ...
25.928571
43
0.53168
def sample_mean(a, b, c): try: a = int(a) b = int(b) c = int(c) mean_numbers = [a, b, c] d = len(mean_numbers) result_mean = (a + b + c)/d return float(result_mean) except ZeroDivisionError: print("Error: Number Not Valid") except ValueError: ...
true
true
790e392b371d6772f622e6b0553821d52a55e346
273
py
Python
CSCS/benchmarks/cosmoflow/implementations/cosmoflow-benchmark/utils/distributed.py
bgerofi/hpc_results_v0.7
9cd9fa80ebc57db8438b1ac8dbd2d49232da6c2e
[ "Apache-2.0" ]
2
2021-06-09T19:38:22.000Z
2021-11-15T18:01:21.000Z
CSCS/benchmarks/cosmoflow/implementations/cosmoflow-benchmark/utils/distributed.py
bgerofi/hpc_results_v0.7
9cd9fa80ebc57db8438b1ac8dbd2d49232da6c2e
[ "Apache-2.0" ]
null
null
null
CSCS/benchmarks/cosmoflow/implementations/cosmoflow-benchmark/utils/distributed.py
bgerofi/hpc_results_v0.7
9cd9fa80ebc57db8438b1ac8dbd2d49232da6c2e
[ "Apache-2.0" ]
3
2021-01-20T13:57:25.000Z
2021-08-05T06:48:58.000Z
"""Utilties for distributed processing""" import horovod.tensorflow.keras as hvd def rank(): try: return hvd.rank() except ValueError: return 0 def barrier(): try: hvd.allreduce([], name='Barrier') except ValueError: pass
17.0625
41
0.611722
import horovod.tensorflow.keras as hvd def rank(): try: return hvd.rank() except ValueError: return 0 def barrier(): try: hvd.allreduce([], name='Barrier') except ValueError: pass
true
true
790e39373087442606769c88aa4dccc98ac7794d
807
py
Python
code/grab_foreground.py
ultimus11/Foreground-Detection-OpenCV
910d6ffa2d37b999ed746ebc69da289d9b48bdf1
[ "MIT" ]
3
2021-02-15T13:38:07.000Z
2022-03-16T07:52:58.000Z
code/grab_foreground.py
ultimus11/Foreground-Detection-OpenCV
910d6ffa2d37b999ed746ebc69da289d9b48bdf1
[ "MIT" ]
null
null
null
code/grab_foreground.py
ultimus11/Foreground-Detection-OpenCV
910d6ffa2d37b999ed746ebc69da289d9b48bdf1
[ "MIT" ]
null
null
null
import numpy as np import cv2 import matplotlib.pyplot as plt #read image img = np.array(cv2.imread('1.jpg')) #this is mask mask = np.zeros(img.shape[:2],np.uint8) #this bgdModel and fgdModel is used in background bgdModel = np.zeros((1,65),np.float64) fgdModel = np.zeros((1,65),np.float64) #This is a...
26.9
88
0.708798
import numpy as np import cv2 import matplotlib.pyplot as plt img = np.array(cv2.imread('1.jpg')) mask = np.zeros(img.shape[:2],np.uint8) bgdModel = np.zeros((1,65),np.float64) fgdModel = np.zeros((1,65),np.float64) rect = (35,30,330,312) cv2.grabCut(img,mask,rect,bgdModel,fgdModel,5,cv2.GC_INIT_...
true
true
790e39f443da1284ca39de4fbc82304831509a67
1,324
py
Python
update_results.py
tomaszwozniak/behave-docker-parallel
b0e8f6083c46e8cb375f2e989d6a85b14363ca14
[ "Apache-2.0" ]
5
2018-08-28T07:38:31.000Z
2020-11-26T16:09:01.000Z
update_results.py
tomaszwozniak/behave-docker-parallel
b0e8f6083c46e8cb375f2e989d6a85b14363ca14
[ "Apache-2.0" ]
null
null
null
update_results.py
tomaszwozniak/behave-docker-parallel
b0e8f6083c46e8cb375f2e989d6a85b14363ca14
[ "Apache-2.0" ]
3
2018-11-08T15:51:28.000Z
2021-01-30T22:19:23.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import json import os import sys def update_allure_feature_name(results_dir: str, prefix: str): """Make Allure JSON results unique by pre-pending a prefix to: name, historyId & uuid. Use it when not all of the test results show up in the Allure report. This ...
38.941176
101
0.638218
import json import os import sys def update_allure_feature_name(results_dir: str, prefix: str): results_dir_path = os.path.join(".", results_dir) update_count = 0 for filename in os.listdir(results_dir_path): if filename.endswith(".json"): result_file = os.path.join(results_dir_path,...
true
true
790e3b7b85a16d9b17ada753ea275397735d7da4
4,217
py
Python
Code/EvaluationsStub.py
isibord/LogisticRegression
5802e8fd3acd73993e0e8891adcb3ab1f58e4544
[ "MIT" ]
null
null
null
Code/EvaluationsStub.py
isibord/LogisticRegression
5802e8fd3acd73993e0e8891adcb3ab1f58e4544
[ "MIT" ]
null
null
null
Code/EvaluationsStub.py
isibord/LogisticRegression
5802e8fd3acd73993e0e8891adcb3ab1f58e4544
[ "MIT" ]
null
null
null
import math import collections import numpy as np def __CheckEvaluationInput(y, yPredicted): # Check sizes if(len(y) != len(yPredicted)): raise UserWarning("Attempting to evaluate between the true labels and predictions.\n Arrays contained different numbers of samples. Check your work and try again."...
30.781022
174
0.641688
import math import collections import numpy as np def __CheckEvaluationInput(y, yPredicted): if(len(y) != len(yPredicted)): raise UserWarning("Attempting to evaluate between the true labels and predictions.\n Arrays contained different numbers of samples. Check your work and try again.") v...
true
true
790e3b9c411165a5658a226e6f906ced62de333a
7,739
py
Python
plugins/cosigner_pool/qt.py
SirSevenG/electrum-komodo
a38d01baf216aad9429ac8f3707a12818c30a4a2
[ "MIT" ]
4
2019-06-21T10:22:07.000Z
2020-01-03T16:02:48.000Z
plugins/cosigner_pool/qt.py
SirSevenG/electrum-komodo
a38d01baf216aad9429ac8f3707a12818c30a4a2
[ "MIT" ]
28
2019-07-24T12:37:44.000Z
2020-10-12T11:21:28.000Z
plugins/cosigner_pool/qt.py
SirSevenG/electrum-komodo
a38d01baf216aad9429ac8f3707a12818c30a4a2
[ "MIT" ]
9
2019-09-13T08:04:44.000Z
2020-09-17T01:19:23.000Z
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2014 Thomas Voegtlin # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without...
35.177273
151
0.628117
import time from xmlrpc.client import ServerProxy from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import QPushButton from electrum_zcash import bitcoin, util from electrum_zcash import transaction from electrum_zcash.plugins import BasePlugin, hook from electrum_zcas...
true
true
790e3bdf8b4dc471ace490a7934054d0cd52e6bb
376
py
Python
Desafios/Desafio 040.py
tiagosm1/Pyhton_CEV
67bae36169922fe2168505393cc47b1bab50c39b
[ "MIT" ]
null
null
null
Desafios/Desafio 040.py
tiagosm1/Pyhton_CEV
67bae36169922fe2168505393cc47b1bab50c39b
[ "MIT" ]
null
null
null
Desafios/Desafio 040.py
tiagosm1/Pyhton_CEV
67bae36169922fe2168505393cc47b1bab50c39b
[ "MIT" ]
null
null
null
n1 = float(input('Digite sua primera nota: ')) n2 = float(input('Digite sua segunda nota: ')) media = (n1 + n2) / 2 if media <= 5: print('Sua média é {} e você está REPROVADO!'.format(media)) elif media >= 7: print('Sua média é {} e você está APROVADO!'.format(media)) elif media >5 or media <6.9: print('Sua...
37.6
69
0.646277
n1 = float(input('Digite sua primera nota: ')) n2 = float(input('Digite sua segunda nota: ')) media = (n1 + n2) / 2 if media <= 5: print('Sua média é {} e você está REPROVADO!'.format(media)) elif media >= 7: print('Sua média é {} e você está APROVADO!'.format(media)) elif media >5 or media <6.9: print('Sua...
true
true
790e3c6c1d1a3772687a9a748e4a4bba53b42c2c
3,039
py
Python
tests/test_mgear/test_core/test_vector.py
tk-aria/mgear4
eac1af6882dd7dc4cec1a4b71854040d376704ce
[ "MIT" ]
72
2020-09-28T20:00:59.000Z
2022-03-25T14:35:14.000Z
tests/test_mgear/test_core/test_vector.py
Mikfr83/mgear4
2fa28080027f1004e8e0139ccf93f7ec2448b1fd
[ "MIT" ]
101
2020-09-28T19:53:53.000Z
2022-03-31T01:44:41.000Z
tests/test_mgear/test_core/test_vector.py
Mikfr83/mgear4
2fa28080027f1004e8e0139ccf93f7ec2448b1fd
[ "MIT" ]
32
2020-10-09T10:49:45.000Z
2022-03-31T08:27:37.000Z
"""mgear.core.vector test""" def test_get_distance(run_with_maya_pymel, setup_path): # Maya imports from maya import OpenMaya import pymel.core as pm # mGear imports from mgear.core.vector import get_distance v_1 = [0, 0, 0] v_2 = [1, 0, 0] assert get_distance(v_1, v_2) == 1.0 v_...
31.989474
62
0.657782
def test_get_distance(run_with_maya_pymel, setup_path): from maya import OpenMaya import pymel.core as pm from mgear.core.vector import get_distance v_1 = [0, 0, 0] v_2 = [1, 0, 0] assert get_distance(v_1, v_2) == 1.0 v_1 = OpenMaya.MVector(0, 0, 0) v_2 = OpenMaya.MVector(1...
true
true
790e3cc3c709b664fbdc0505d1a9e2e7cbc004fb
5,677
py
Python
TextSummarization/TF_IDF.py
hazim111/Data-Science-Meetup-Oxford
8b7ab85f30cdefe9f4f75c66e935efc422100742
[ "Apache-2.0" ]
60
2020-02-27T11:00:10.000Z
2022-03-29T19:26:17.000Z
TextSummarization/TF_IDF.py
hazim111/Data-Science-Meetup-Oxford
8b7ab85f30cdefe9f4f75c66e935efc422100742
[ "Apache-2.0" ]
8
2021-01-26T16:53:04.000Z
2022-02-17T21:04:33.000Z
TextSummarization/TF_IDF.py
hazim111/Data-Science-Meetup-Oxford
8b7ab85f30cdefe9f4f75c66e935efc422100742
[ "Apache-2.0" ]
19
2020-03-09T11:43:39.000Z
2022-02-09T17:47:04.000Z
import math import pandas as pd import spacy # Requires: python -m spacy download en_core_web_sm from spacy import displacy from nltk import sent_tokenize, word_tokenize, PorterStemmer from nltk.corpus import stopwords from data import load_model import streamlit as st class tf_idf(): nlp = load_model('en_cor...
35.704403
136
0.611414
import math import pandas as pd import spacy from spacy import displacy from nltk import sent_tokenize, word_tokenize, PorterStemmer from nltk.corpus import stopwords from data import load_model import streamlit as st class tf_idf(): nlp = load_model('en_core_web_md') def word_freq(self, text) -> dict: ...
true
true
790e3d01adaa9a953e524685db85d1ba218e9d78
277
py
Python
tests/test_import.py
MacHu-GWU/pytq_crawlib-project
ccb980574f698d481e8a8cb61e0888f4afef68df
[ "MIT" ]
null
null
null
tests/test_import.py
MacHu-GWU/pytq_crawlib-project
ccb980574f698d481e8a8cb61e0888f4afef68df
[ "MIT" ]
2
2018-01-31T19:32:03.000Z
2018-01-31T20:32:33.000Z
tests/test_import.py
MacHu-GWU/pytq_crawlib-project
ccb980574f698d481e8a8cb61e0888f4afef68df
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from pytest import raises, approx def test(): import pytq_crawlib pass if __name__ == "__main__": import os basename = os.path.basename(__file__) pytest.main([basename, "-s", "--tb=native"])
15.388889
48
0.638989
import pytest from pytest import raises, approx def test(): import pytq_crawlib pass if __name__ == "__main__": import os basename = os.path.basename(__file__) pytest.main([basename, "-s", "--tb=native"])
true
true
790e3e536dd01d77260e85b0de8cfac011048480
8,702
py
Python
Outils/TRIOXDATA/XTriou/Extract_xdata.py
cea-trust-platform/trust-code
c4f42d8f8602a8cc5e0ead0e29dbf0be8ac52f72
[ "BSD-3-Clause" ]
12
2021-06-30T18:50:38.000Z
2022-03-23T09:03:16.000Z
Outils/TRIOXDATA/XTriou/Extract_xdata.py
pledac/trust-code
46ab5c5da3f674185f53423090f526a38ecdbad1
[ "BSD-3-Clause" ]
null
null
null
Outils/TRIOXDATA/XTriou/Extract_xdata.py
pledac/trust-code
46ab5c5da3f674185f53423090f526a38ecdbad1
[ "BSD-3-Clause" ]
2
2021-10-04T09:19:39.000Z
2021-12-15T14:21:04.000Z
from optparse import OptionParser import os,sys import itertools import re def readSrc(src_dir): lines=[] for root, dirs, files in os.walk(src_dir): for file in files: if file.endswith(".cpp"): lines+=["New_file "+ file] lines_file = open(os.path.join(root, ...
33.469231
119
0.478626
from optparse import OptionParser import os,sys import itertools import re def readSrc(src_dir): lines=[] for root, dirs, files in os.walk(src_dir): for file in files: if file.endswith(".cpp"): lines+=["New_file "+ file] lines_file = open(os.path.join(root, ...
true
true
790e3e6b392afd742243686f2f2dd2c835a4afdb
5,832
py
Python
python/src/cm_api/endpoints/host_templates.py
cloudsoft/cm_api
85c7179044188c785c793a649677a22e427d2924
[ "Apache-2.0" ]
329
2015-01-06T15:41:14.000Z
2022-03-12T15:28:20.000Z
python/src/cm_api/endpoints/host_templates.py
cloudsoft/cm_api
85c7179044188c785c793a649677a22e427d2924
[ "Apache-2.0" ]
58
2015-02-10T11:43:42.000Z
2021-01-20T23:05:55.000Z
python/src/cm_api/endpoints/host_templates.py
cloudsoft/cm_api
85c7179044188c785c793a649677a22e427d2924
[ "Apache-2.0" ]
257
2015-01-15T10:57:20.000Z
2022-03-09T12:13:57.000Z
# Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ex...
35.345455
120
0.736968
import copy from cm_api.endpoints.types import * __docformat__ = "epytext" HOST_TEMPLATES_PATH = "/clusters/%s/hostTemplates" HOST_TEMPLATE_PATH = "/clusters/%s/hostTemplates/%s" APPLY_HOST_TEMPLATE_PATH = HOST_TEMPLATE_PATH + "/commands/applyHostTemplate" def create_host_template(resource_root, name...
true
true
790e3e6f067d05367b89b6794a611617bc7cd257
5,379
py
Python
test/test_ping.py
velopaymentsapi/velo-python
59b39555e9714139b4bf697151cc7d15f6dd510e
[ "Apache-2.0" ]
null
null
null
test/test_ping.py
velopaymentsapi/velo-python
59b39555e9714139b4bf697151cc7d15f6dd510e
[ "Apache-2.0" ]
null
null
null
test/test_ping.py
velopaymentsapi/velo-python
59b39555e9714139b4bf697151cc7d15f6dd510e
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Velo Payments APIs ## Terms and Definitions Throughout this document and the Velo platform the following terms are used: * **Payor.** An entity (typically a corporation) which wishes to pay funds to one or more payees via a payout. * **Payee.** The recipient of funds paid out by a payor....
134.475
4,651
0.770961
from __future__ import absolute_import import unittest import velo_payments from velo_payments.models.ping import Ping from velo_payments.rest import ApiException class TestPing(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testPing(self): ...
true
true
790e3f3b10cc4554c59e1cd61e3f47851c4f1e89
1,300
py
Python
pgdrive/tests/vis_block/vis_t_intersection.py
gamecraftCZ/pgdrive
11fbb5a5ca1dc354d755f00eb282bcffe5720bcc
[ "Apache-2.0" ]
null
null
null
pgdrive/tests/vis_block/vis_t_intersection.py
gamecraftCZ/pgdrive
11fbb5a5ca1dc354d755f00eb282bcffe5720bcc
[ "Apache-2.0" ]
null
null
null
pgdrive/tests/vis_block/vis_t_intersection.py
gamecraftCZ/pgdrive
11fbb5a5ca1dc354d755f00eb282bcffe5720bcc
[ "Apache-2.0" ]
null
null
null
from pgdrive.scene_creator.blocks.curve import Curve from pgdrive.scene_creator.blocks.first_block import FirstBlock from pgdrive.scene_creator.blocks.straight import Straight from pgdrive.scene_creator.blocks.t_intersection import TInterSection from pgdrive.scene_creator.road.road_network import RoadNetwork from pgdri...
40.625
86
0.766923
from pgdrive.scene_creator.blocks.curve import Curve from pgdrive.scene_creator.blocks.first_block import FirstBlock from pgdrive.scene_creator.blocks.straight import Straight from pgdrive.scene_creator.blocks.t_intersection import TInterSection from pgdrive.scene_creator.road.road_network import RoadNetwork from pgdri...
true
true
790e3f8ff78fefaceefc11289c245443f0e584c0
10,233
py
Python
tests/test_sns/test_application.py
mrucci/moto
076a6a7055ad18908b5661e599648c40b251cdc1
[ "Apache-2.0" ]
null
null
null
tests/test_sns/test_application.py
mrucci/moto
076a6a7055ad18908b5661e599648c40b251cdc1
[ "Apache-2.0" ]
null
null
null
tests/test_sns/test_application.py
mrucci/moto
076a6a7055ad18908b5661e599648c40b251cdc1
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import boto from boto.exception import BotoServerError from moto import mock_sns import sure # noqa @mock_sns def test_create_platform_application(): conn = boto.connect_sns() platform_application = conn.create_platform_application( name="my-application", ...
36.546429
162
0.731262
from __future__ import unicode_literals import boto from boto.exception import BotoServerError from moto import mock_sns import sure @mock_sns def test_create_platform_application(): conn = boto.connect_sns() platform_application = conn.create_platform_application( name="my-application", pl...
true
true
790e44191bf61e44a3467f34f97652043db7963a
414
py
Python
pwncat/commands/exit.py
Mitul16/pwncat
b8d7876a9779c2c7796a9a29110d3f1cda721dff
[ "MIT" ]
1,454
2020-05-07T02:20:52.000Z
2022-03-31T21:32:22.000Z
pwncat/commands/exit.py
akr3ch/pwncat
d67865bdaac60dd0761d0698062e7b443a62c6db
[ "MIT" ]
187
2020-05-08T06:26:01.000Z
2022-03-07T21:15:29.000Z
pwncat/commands/exit.py
akr3ch/pwncat
d67865bdaac60dd0761d0698062e7b443a62c6db
[ "MIT" ]
184
2020-05-07T02:31:58.000Z
2022-03-31T09:11:59.000Z
#!/usr/bin/env python3 import pwncat from pwncat.commands import CommandDefinition class Command(CommandDefinition): """ Exit the interactive prompt. If sessions are active, you will be prompted to confirm. This shouldn't be run from a configuration script. """ PROG = "exit" ARGS = {} ...
21.789474
70
0.683575
import pwncat from pwncat.commands import CommandDefinition class Command(CommandDefinition): PROG = "exit" ARGS = {} LOCAL = True def run(self, manager, args): raise pwncat.manager.InteractiveExit
true
true
790e4520a95545a14ffacee45d176549735c05a2
1,983
py
Python
tests/patterns/test_patterns_Pn.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
null
null
null
tests/patterns/test_patterns_Pn.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
null
null
null
tests/patterns/test_patterns_Pn.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
null
null
null
import pytest import uqbar.strings import supriya.patterns pattern_01 = supriya.patterns.Pn( supriya.patterns.Pbind(foo=supriya.patterns.Pseq(["A", "B", "C"])), repetitions=2 ) pattern_02 = supriya.patterns.Pn( supriya.patterns.Pbind(foo=supriya.patterns.Pseq(["A", "B", "C"])), key="repeat", repetit...
20.030303
85
0.420575
import pytest import uqbar.strings import supriya.patterns pattern_01 = supriya.patterns.Pn( supriya.patterns.Pbind(foo=supriya.patterns.Pseq(["A", "B", "C"])), repetitions=2 ) pattern_02 = supriya.patterns.Pn( supriya.patterns.Pbind(foo=supriya.patterns.Pseq(["A", "B", "C"])), key="repeat", repetit...
true
true
790e4546d732c6ce113d26fdfabfb52f208a249d
24,018
py
Python
django/http/request.py
cutegony/django
5d654e1e7104d2ce86ec1b9fe52865a7dca4b4be
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
2
2015-11-08T11:32:49.000Z
2022-03-26T23:11:46.000Z
django/http/request.py
cutegony/django
5d654e1e7104d2ce86ec1b9fe52865a7dca4b4be
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
django/http/request.py
cutegony/django
5d654e1e7104d2ce86ec1b9fe52865a7dca4b4be
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
import cgi import codecs import copy from io import BytesIO from itertools import chain from urllib.parse import quote, urlencode, urljoin, urlsplit from django.conf import settings from django.core import signing from django.core.exceptions import ( DisallowedHost, ImproperlyConfigured, RequestDataTooBig, ) from ...
36.063063
110
0.616704
import cgi import codecs import copy from io import BytesIO from itertools import chain from urllib.parse import quote, urlencode, urljoin, urlsplit from django.conf import settings from django.core import signing from django.core.exceptions import ( DisallowedHost, ImproperlyConfigured, RequestDataTooBig, ) from ...
true
true
790e455dd64429c97352e7ac01408784a583c481
1,883
py
Python
src/dinosaur/game/resources.py
lukDev/dinosaur
a585c64741a1639b520176bb26a611e59e59659d
[ "MIT" ]
null
null
null
src/dinosaur/game/resources.py
lukDev/dinosaur
a585c64741a1639b520176bb26a611e59e59659d
[ "MIT" ]
null
null
null
src/dinosaur/game/resources.py
lukDev/dinosaur
a585c64741a1639b520176bb26a611e59e59659d
[ "MIT" ]
null
null
null
import pyglet class Resources: # --- Player Parameters --- player_animation_started = False player_images = [] player_animation_time = 1. / 9. player_animation_index = 0 # --- Obstacle Parameters --- obstacle_images = [] # --- Player Methods --- # loads the images neede...
36.211538
108
0.698885
import pyglet class Resources: player_animation_started = False player_images = [] player_animation_time = 1. / 9. player_animation_index = 0 obstacle_images = [] @staticmethod def load_images(): if len(Resources.player_images) == 0: Reso...
true
true
790e46918dd184f2c67478851f1a3679fe32bcd1
22,303
py
Python
olo/query.py
kadaliao/olo
29763264aec641e50448fc5f606244b7db3d5ad4
[ "Apache-2.0" ]
null
null
null
olo/query.py
kadaliao/olo
29763264aec641e50448fc5f606244b7db3d5ad4
[ "Apache-2.0" ]
1
2022-01-18T10:23:08.000Z
2022-01-18T10:23:08.000Z
olo/query.py
kadaliao/olo
29763264aec641e50448fc5f606244b7db3d5ad4
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations import operator import re import sys import types from enum import Enum from typing import TYPE_CHECKING, Optional, List, Union, Iterable, Type, Tuple from olo.expression import UnaryExpression, BinaryExpression, Expression from olo.funcs import DISTINCT, Function if TYPE_CHECKING:...
32.464338
120
0.584092
from __future__ import annotations import operator import re import sys import types from enum import Enum from typing import TYPE_CHECKING, Optional, List, Union, Iterable, Type, Tuple from olo.expression import UnaryExpression, BinaryExpression, Expression from olo.funcs import DISTINCT, Function if TYPE_CHECKING:...
true
true
790e47e65bd4bcbaa3061560d8b59f02e2d375b0
2,499
py
Python
laas/tests/test_action_get_task_list.py
opnfv/laas-reflab
ab24a8de07dac62569ec79425241a6b974ed32a9
[ "Apache-2.0" ]
1
2021-03-29T12:33:52.000Z
2021-03-29T12:33:52.000Z
laas/tests/test_action_get_task_list.py
opnfv/laas-reflab
ab24a8de07dac62569ec79425241a6b974ed32a9
[ "Apache-2.0" ]
null
null
null
laas/tests/test_action_get_task_list.py
opnfv/laas-reflab
ab24a8de07dac62569ec79425241a6b974ed32a9
[ "Apache-2.0" ]
null
null
null
############################################################################## # Copyright 2019 Parker Berberian and Others # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # yo...
47.150943
78
0.502201
true
true
790e47e8d533aaf3195e7b0523a2e78693861069
4,463
py
Python
nsecpy/listing.py
MattBSG/Switch-REST
c16400ef540e1de954f24b2c7567c5debe740940
[ "MIT" ]
2
2020-10-30T19:42:50.000Z
2020-10-30T20:46:25.000Z
nsecpy/listing.py
MattBSG/Switch-REST
c16400ef540e1de954f24b2c7567c5debe740940
[ "MIT" ]
9
2021-02-17T02:54:40.000Z
2021-05-17T23:43:19.000Z
nsecpy/listing.py
MattBSG/Switch-REST
c16400ef540e1de954f24b2c7567c5debe740940
[ "MIT" ]
1
2021-01-26T20:54:34.000Z
2021-01-26T20:54:34.000Z
from dataclasses import dataclass, field from datetime import datetime # for typehinting from typing import TYPE_CHECKING, Generator, List, Literal, Optional import aiohttp import dateparser from .exceptions import UnsupportedRegionError from .pricing import PriceQuery, query_price COUNT = 30 # Items per page of ...
32.816176
115
0.636791
from dataclasses import dataclass, field from datetime import datetime from typing import TYPE_CHECKING, Generator, List, Literal, Optional import aiohttp import dateparser from .exceptions import UnsupportedRegionError from .pricing import PriceQuery, query_price COUNT = 30 if TYPE_CHECKING: from .regions...
true
true
790e49961dfec24e92686a76dbe6e64c6826e0c3
4,236
py
Python
app/views.py
Bekarysalashybayev/Nomad
3dda626763fe2b57535717f223046e13340f6741
[ "MIT" ]
null
null
null
app/views.py
Bekarysalashybayev/Nomad
3dda626763fe2b57535717f223046e13340f6741
[ "MIT" ]
null
null
null
app/views.py
Bekarysalashybayev/Nomad
3dda626763fe2b57535717f223046e13340f6741
[ "MIT" ]
null
null
null
from django.contrib.auth.decorators import login_required from django.shortcuts import render, get_object_or_404, redirect from django.template import loader from django.http import HttpResponse from django import template from mainsite.forms import NewsCreate from mainsite.models import News, ContactForm, Issue @lo...
31.61194
106
0.684372
from django.contrib.auth.decorators import login_required from django.shortcuts import render, get_object_or_404, redirect from django.template import loader from django.http import HttpResponse from django import template from mainsite.forms import NewsCreate from mainsite.models import News, ContactForm, Issue @lo...
true
true
790e4a21bff540c4eae3e972412204fa5207e8a9
7,357
py
Python
test/sagemaker_tests/mxnet/training/resources/mnist/horovod_mnist.py
Elizaaaaa/deep-learning-containers
6274ecb264645070d11b27e5c7e60d2e4110537d
[ "Apache-2.0" ]
383
2020-05-19T18:09:10.000Z
2022-03-29T22:41:05.000Z
test/sagemaker_tests/mxnet/training/resources/mnist/horovod_mnist.py
Elizaaaaa/deep-learning-containers
6274ecb264645070d11b27e5c7e60d2e4110537d
[ "Apache-2.0" ]
551
2020-05-27T17:25:50.000Z
2022-03-31T18:00:35.000Z
test/sagemaker_tests/mxnet/training/resources/mnist/horovod_mnist.py
Elizaaaaa/deep-learning-containers
6274ecb264645070d11b27e5c7e60d2e4110537d
[ "Apache-2.0" ]
263
2020-05-19T18:17:12.000Z
2022-03-29T22:41:10.000Z
# Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.:wq # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" ...
36.241379
106
0.610711
import argparse import logging import os import zipfile import time import mxnet as mx import horovod.mxnet as hvd from mxnet import autograd, gluon, nd from mxnet.test_utils import download def main(): def get_mnist_iterator(rank): data_dir = "data-%d" % rank if not os.path.isd...
true
true
790e4bc3353be242b1ecceaeedd41a8b07cdef24
1,149
py
Python
main_app/api/views.py
XOyarz/polstats-django
6bc383f4cae56c21a403a337d2f7d2488e3e7d57
[ "MIT" ]
null
null
null
main_app/api/views.py
XOyarz/polstats-django
6bc383f4cae56c21a403a337d2f7d2488e3e7d57
[ "MIT" ]
1
2021-05-21T07:05:41.000Z
2021-05-21T07:05:41.000Z
main_app/api/views.py
XOyarz/polstats-django
6bc383f4cae56c21a403a337d2f7d2488e3e7d57
[ "MIT" ]
1
2021-04-30T17:27:57.000Z
2021-04-30T17:27:57.000Z
from rest_framework import generics from ..models import Article, Country, Source from .serializers import ArticleSerializer, CountrySerializer, SourceSerializer class ArticleListView(generics.ListCreateAPIView): queryset = Article.objects.all() serializer_class = ArticleSerializer permission_classes = []...
28.725
79
0.781549
from rest_framework import generics from ..models import Article, Country, Source from .serializers import ArticleSerializer, CountrySerializer, SourceSerializer class ArticleListView(generics.ListCreateAPIView): queryset = Article.objects.all() serializer_class = ArticleSerializer permission_classes = []...
true
true
790e4cb78e3a29f390a2b7dad549433c7cc743db
2,721
py
Python
pandapipes/plotting/geo.py
nsanina/pandapipes
b2daaca6b83e7d8934502796721846bd9d552364
[ "BSD-3-Clause" ]
null
null
null
pandapipes/plotting/geo.py
nsanina/pandapipes
b2daaca6b83e7d8934502796721846bd9d552364
[ "BSD-3-Clause" ]
null
null
null
pandapipes/plotting/geo.py
nsanina/pandapipes
b2daaca6b83e7d8934502796721846bd9d552364
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020 by Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. # Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. from pandapower.plotting.geo import _node_geometries_from_geodata, \ _transform_no...
41.861538
99
0.728776
from pandapower.plotting.geo import _node_geometries_from_geodata, \ _transform_node_geometry_to_geodata, _branch_geometries_from_geodata, \ _transform_branch_geometry_to_coords, _convert_xy_epsg def convert_gis_to_geodata(net, node_geodata=True, branch_geodata=True): if node_geodata: _transfo...
true
true
790e4d05191f10fc75b9e2bde12747ba1af4297c
8,022
py
Python
model_aton/datasets.py
xuhongzuo/Outlier-Interpretation
9bc2dbedcb7b89d0e4ecf7cea2a60612ab19ae4a
[ "Apache-2.0" ]
17
2021-04-21T08:44:02.000Z
2022-03-20T07:42:54.000Z
model_aton/datasets.py
xuhongzuo/outlier-Interpretation
9bc2dbedcb7b89d0e4ecf7cea2a60612ab19ae4a
[ "Apache-2.0" ]
null
null
null
model_aton/datasets.py
xuhongzuo/outlier-Interpretation
9bc2dbedcb7b89d0e4ecf7cea2a60612ab19ae4a
[ "Apache-2.0" ]
1
2021-06-08T20:40:12.000Z
2021-06-08T20:40:12.000Z
""" This script implements an outlier interpretation method of the following paper: "Beyond Outlier Detection: Outlier Interpretation by Attention-Guided Triplet Deviation Network". in WWW'21. @ Author: Hongzuo Xu @ email: hongzuo.xu@gmail.com or leogarcia@126.com or xuhongzuo13@nudt.edu.cn """ import numpy as np imp...
36.135135
120
0.639616
import numpy as np import torch from torch.utils.data import Dataset from sklearn.neighbors import NearestNeighbors class SingleTripletDataset(Dataset): def __init__(self, anom_idx, x, y, triplets_selector, transform=None): self.transform = transform self.data = x self.triplets = triplet...
true
true
790e5075de8a0f53c9d2821fac0ee766f920d684
2,798
py
Python
heat/tests/test_nokey.py
citrix-openstack-build/heat
fa31873529481472e037e3ce157b87f8057fe622
[ "Apache-2.0" ]
null
null
null
heat/tests/test_nokey.py
citrix-openstack-build/heat
fa31873529481472e037e3ce157b87f8057fe622
[ "Apache-2.0" ]
null
null
null
heat/tests/test_nokey.py
citrix-openstack-build/heat
fa31873529481472e037e3ce157b87f8057fe622
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
34.121951
78
0.651894
from heat.tests.v1_1 import fakes from heat.engine.resources import instance as instances from heat.engine.resources import nova_utils from heat.common import template_format from heat.engine import scheduler from heat.tests.common import HeatTestCase from heat.tests import utils nokey_template = ''' { ...
true
true
790e508da25fc3efb1adca0872aa25ea29815d33
1,658
py
Python
test/test_meow_data.py
ttpro1995/CV_Assignment02
407205bd450243a85c52dee1b2c4b4664e833a24
[ "MIT" ]
null
null
null
test/test_meow_data.py
ttpro1995/CV_Assignment02
407205bd450243a85c52dee1b2c4b4664e833a24
[ "MIT" ]
null
null
null
test/test_meow_data.py
ttpro1995/CV_Assignment02
407205bd450243a85c52dee1b2c4b4664e833a24
[ "MIT" ]
null
null
null
# Thai Thien # 1351040 import pytest import cv2 import sys import sys, os import numpy as np import upload # make sure it can find matcher.py file sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/..")) import util from matcher import Matcher # make sure it can find detector.py file sys.path.append(os.pat...
25.121212
66
0.693004
import pytest import cv2 import sys import sys, os import numpy as np import upload sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/..")) import util from matcher import Matcher sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/..")) from detector import Detector prefix = './image/meow...
true
true
790e50e9fe657a945302ad88e755c133d3d728ae
3,512
py
Python
backend/env/lib/python3.8/site-packages/werkzeug/wrappers/cors.py
lubitelpospat/CFM-source
4e6af33ee68c6f2f05b6952b64a6b3f0591d5b03
[ "MIT" ]
32
2020-04-05T08:29:40.000Z
2022-01-08T03:10:00.000Z
backend/env/lib/python3.8/site-packages/werkzeug/wrappers/cors.py
lubitelpospat/CFM-source
4e6af33ee68c6f2f05b6952b64a6b3f0591d5b03
[ "MIT" ]
9
2020-08-26T12:16:47.000Z
2021-09-22T19:40:22.000Z
backend/env/lib/python3.8/site-packages/werkzeug/wrappers/cors.py
lubitelpospat/CFM-source
4e6af33ee68c6f2f05b6952b64a6b3f0591d5b03
[ "MIT" ]
5
2020-03-29T18:55:15.000Z
2020-12-13T09:34:21.000Z
from ..http import dump_header from ..http import parse_set_header from ..utils import environ_property from ..utils import header_property class CORSRequestMixin(object): """A mixin for :class:`~werkzeug.wrappers.BaseRequest` subclasses that adds descriptors for Cross Origin Resource Sharing (CORS) heade...
34.097087
88
0.669989
from ..http import dump_header from ..http import parse_set_header from ..utils import environ_property from ..utils import header_property class CORSRequestMixin(object): origin = environ_property( "HTTP_ORIGIN", doc=( "The host that the request originated from. Set" " :a...
true
true
790e50ee2e482a4ebdc785314c77848d4054b05d
6,224
py
Python
tf_agents/environments/random_py_environment_test.py
adammichaelwood/agents
66ad01b9ae909bc6c344b8f0cb356758cae95236
[ "Apache-2.0" ]
16
2020-09-23T06:21:49.000Z
2022-03-28T05:45:04.000Z
tf_agents/environments/random_py_environment_test.py
adammichaelwood/agents
66ad01b9ae909bc6c344b8f0cb356758cae95236
[ "Apache-2.0" ]
13
2019-06-18T03:36:39.000Z
2019-08-28T18:30:29.000Z
tf_agents/environments/random_py_environment_test.py
adammichaelwood/agents
66ad01b9ae909bc6c344b8f0cb356758cae95236
[ "Apache-2.0" ]
6
2020-10-09T06:33:23.000Z
2022-02-03T16:16:36.000Z
# coding=utf-8 # Copyright 2018 The TF-Agents Authors. # # 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...
34.77095
75
0.696497
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import parameterized import numpy as np from tf_agents.environments import random_py_environment from tf_agents.specs import array_spec from tf_agents.utils import test_utils ...
true
true
790e50f085f96675619957c8359eeab6c7a1018f
808
py
Python
examples/dmrg/03-density_matrix.py
gmwang18/pyscf
fcd6877751661c8a9743c1c872a4a2b65f6dd7ac
[ "BSD-2-Clause" ]
null
null
null
examples/dmrg/03-density_matrix.py
gmwang18/pyscf
fcd6877751661c8a9743c1c872a4a2b65f6dd7ac
[ "BSD-2-Clause" ]
null
null
null
examples/dmrg/03-density_matrix.py
gmwang18/pyscf
fcd6877751661c8a9743c1c872a4a2b65f6dd7ac
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # # Author: Qiming Sun <osirpt.sun@gmail.com> # from pyscf import gto from pyscf import scf from pyscf import mcscf from pyscf.dmrgscf import dmrgci ''' Block code for active space N-particle density matrices. ''' b = 1.2 mol = gto.M( verbose = 4, atom = 'N 0 0 0; N 0 0 %f'%b, basis...
20.2
64
0.679455
from pyscf import gto from pyscf import scf from pyscf import mcscf from pyscf.dmrgscf import dmrgci b = 1.2 mol = gto.M( verbose = 4, atom = 'N 0 0 0; N 0 0 %f'%b, basis = 'cc-pvdz', symmetry = True, ) m = scf.RHF(mol) m.kernel() mc = mcscf.CASSCF(m, 8, 8) mc.fcisolver = dmrgci.DMRGCI(mol) mc.k...
true
true
790e51c07371909390efb89febed60c1951094e7
5,648
py
Python
tests/test_update.py
lukaszlacinski/zstash
e2b1ab3166e468e7a0813c84a56032e7becbb6ec
[ "BSD-3-Clause" ]
5
2019-08-19T22:58:17.000Z
2022-03-25T01:21:16.000Z
tests/test_update.py
lukaszlacinski/zstash
e2b1ab3166e468e7a0813c84a56032e7becbb6ec
[ "BSD-3-Clause" ]
154
2018-08-29T17:15:56.000Z
2022-03-17T23:21:22.000Z
tests/test_update.py
lukaszlacinski/zstash
e2b1ab3166e468e7a0813c84a56032e7becbb6ec
[ "BSD-3-Clause" ]
9
2019-05-01T19:04:10.000Z
2022-01-14T19:18:00.000Z
import os import unittest from tests.base import ( HPSS_ARCHIVE, TOP_LEVEL, ZSTASH_PATH, TestZstash, compare, print_starred, run_cmd, write_file, ) class TestUpdate(TestZstash): """ Test `zstash --update`. """ # x = on, no mark = off, b = both on and off tested # ...
32.274286
112
0.561969
import os import unittest from tests.base import ( HPSS_ARCHIVE, TOP_LEVEL, ZSTASH_PATH, TestZstash, compare, print_starred, run_cmd, write_file, ) class TestUpdate(TestZstash): def helperUpdate(self, test_name, hpss_path, zstash_path=ZSTASH_PA...
true
true
790e51ca452c9f9b5b925fe3dd3dcaaa9a257ee3
1,452
py
Python
bentoml/yatai/repository/__init__.py
henrywu2019/BentoML
d3665f052374a1a419b2a3912b1986334fdae2ac
[ "Apache-2.0" ]
3,451
2019-04-02T01:47:42.000Z
2022-03-31T16:20:49.000Z
bentoml/yatai/repository/__init__.py
henrywu2019/BentoML
d3665f052374a1a419b2a3912b1986334fdae2ac
[ "Apache-2.0" ]
1,925
2019-04-03T00:19:05.000Z
2022-03-31T22:41:54.000Z
bentoml/yatai/repository/__init__.py
henrywu2019/BentoML
d3665f052374a1a419b2a3912b1986334fdae2ac
[ "Apache-2.0" ]
451
2019-04-02T01:53:41.000Z
2022-03-29T08:49:06.000Z
# Copyright 2019 Atalaya Tech, 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 agreed to in writing, ...
39.243243
80
0.769284
from bentoml.yatai.repository.base_repository import BaseRepository from bentoml.yatai.repository.file_system_repository import FileSystemRepository from bentoml.yatai.repository.s3_repository import S3Repository from bentoml.yatai.repository.gcs_repository import GCSRepository def create_repository( ...
true
true
790e51ee35e2f07744708831775bcdd4ccc9b250
159
py
Python
utils/image.py
Amjad50/Fyp
6bd934ef42edf7e355ade6cf5d2a151f098f2352
[ "BSD-3-Clause" ]
1
2021-08-17T10:33:17.000Z
2021-08-17T10:33:17.000Z
utils/image.py
Amjad50/Fyp
6bd934ef42edf7e355ade6cf5d2a151f098f2352
[ "BSD-3-Clause" ]
null
null
null
utils/image.py
Amjad50/Fyp
6bd934ef42edf7e355ade6cf5d2a151f098f2352
[ "BSD-3-Clause" ]
null
null
null
from PIL import Image def img_to_binary(img: Image, min_value=100) -> Image: return img.convert('L').point(lambda p: p > min_value and 255).convert('1')
26.5
79
0.704403
from PIL import Image def img_to_binary(img: Image, min_value=100) -> Image: return img.convert('L').point(lambda p: p > min_value and 255).convert('1')
true
true
790e545878fcf0aed12e117eb2963dd0a8f29329
61,361
py
Python
lib/spack/spack/solver/asp.py
mtmiller/spack
c97c135f1dbe24955048fcc4f0f98281ef0c9300
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2018-11-16T02:42:57.000Z
2019-06-06T19:18:50.000Z
lib/spack/spack/solver/asp.py
mtmiller/spack
c97c135f1dbe24955048fcc4f0f98281ef0c9300
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
18
2021-03-12T16:22:58.000Z
2022-03-02T17:07:08.000Z
lib/spack/spack/solver/asp.py
mtmiller/spack
c97c135f1dbe24955048fcc4f0f98281ef0c9300
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2021-06-28T04:48:37.000Z
2021-06-28T04:48:37.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from __future__ import print_function import collections import copy import itertools import os import pprint import sys i...
36.265366
85
0.595264
from __future__ import print_function import collections import copy import itertools import os import pprint import sys import types import warnings from six import string_types import archspec.cpu try: import clingo clingo_cffi = hasattr(clingo.Symbol, '_rep') except ImportError: clingo = No...
true
true
790e546fbfa49f09a7db2613f15910a5cbedbf1e
1,905
py
Python
userbot/modules/sql_helper/welcome_sql.py
Thegreatfoxxgoddess/RemixGeng
67816ea61aba788a0f61884a55b3af9f1d6abc24
[ "Naumen", "Condor-1.1", "MS-PL" ]
11
2020-07-16T10:50:06.000Z
2020-12-21T02:37:54.000Z
userbot/modules/sql_helper/welcome_sql.py
Thegreatfoxxgoddess/RemixGeng
67816ea61aba788a0f61884a55b3af9f1d6abc24
[ "Naumen", "Condor-1.1", "MS-PL" ]
66
2020-07-19T02:17:08.000Z
2021-01-08T04:48:21.000Z
userbot/modules/sql_helper/welcome_sql.py
Thegreatfoxxgoddess/RemixGeng
67816ea61aba788a0f61884a55b3af9f1d6abc24
[ "Naumen", "Condor-1.1", "MS-PL" ]
38
2020-06-02T10:09:48.000Z
2021-05-18T04:48:36.000Z
try: from userbot.modules.sql_helper import SESSION, BASE except ImportError: raise AttributeError from sqlalchemy import BigInteger, Column, Numeric, String, UnicodeText class Welcome(BASE): __tablename__ = "welcome" chat_id = Column(String(14), primary_key=True) previous_welcome = Column(BigInt...
26.09589
71
0.67979
try: from userbot.modules.sql_helper import SESSION, BASE except ImportError: raise AttributeError from sqlalchemy import BigInteger, Column, Numeric, String, UnicodeText class Welcome(BASE): __tablename__ = "welcome" chat_id = Column(String(14), primary_key=True) previous_welcome = Column(BigInt...
true
true
790e54ae1f4e470c330272bbe3f753a3dbe12b43
242
py
Python
lib/galaxy/model/unittest_utils/__init__.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/model/unittest_utils/__init__.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
6
2021-11-11T20:57:49.000Z
2021-12-10T15:30:33.000Z
lib/galaxy/model/unittest_utils/__init__.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
null
null
null
"""Interface provided by galaxy-data modules for unittest utilities for reuse by other modules.""" from .data_app import ( GalaxyDataTestApp, GalaxyDataTestConfig, ) __all__ = [ "GalaxyDataTestApp", "GalaxyDataTestConfig", ]
22
98
0.731405
from .data_app import ( GalaxyDataTestApp, GalaxyDataTestConfig, ) __all__ = [ "GalaxyDataTestApp", "GalaxyDataTestConfig", ]
true
true
790e54f88c52369fbfcded777bf392b5f89edb5b
898
py
Python
day-22/test.py
DallogFheir/aoc-2020
089bd45d5fbdf98b9729a23f3a142ca3b792567c
[ "MIT" ]
null
null
null
day-22/test.py
DallogFheir/aoc-2020
089bd45d5fbdf98b9729a23f3a142ca3b792567c
[ "MIT" ]
null
null
null
day-22/test.py
DallogFheir/aoc-2020
089bd45d5fbdf98b9729a23f3a142ca3b792567c
[ "MIT" ]
null
null
null
from combat import Combat, RecursiveCombat with open("test_input.txt") as f: game = Combat.parse_from_file(f) f.seek(0) recursive_game = RecursiveCombat.parse_from_file(f) # 1st round round_1 = game[1] assert round_1.player_1==[2, 6, 3, 1, 9, 5] assert round_1.player_2==[8, 4, 7, 10] # 28th round round_...
18.326531
55
0.699332
from combat import Combat, RecursiveCombat with open("test_input.txt") as f: game = Combat.parse_from_file(f) f.seek(0) recursive_game = RecursiveCombat.parse_from_file(f) round_1 = game[1] assert round_1.player_1==[2, 6, 3, 1, 9, 5] assert round_1.player_2==[8, 4, 7, 10] round_28 = game[27] assert r...
true
true
790e55db40617c7c8a7abcbcec7e1e8b5908d8db
10,840
py
Python
telegram_commands/getgame.py
SalamiArmy/TelegramSteamBotForGoogleAppEngine
1d6d1bb50fc8dd71e9a36682dbeca19ca44a2bf6
[ "Apache-2.0" ]
null
null
null
telegram_commands/getgame.py
SalamiArmy/TelegramSteamBotForGoogleAppEngine
1d6d1bb50fc8dd71e9a36682dbeca19ca44a2bf6
[ "Apache-2.0" ]
null
null
null
telegram_commands/getgame.py
SalamiArmy/TelegramSteamBotForGoogleAppEngine
1d6d1bb50fc8dd71e9a36682dbeca19ca44a2bf6
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 import json import urllib import urllib2 from bs4 import BeautifulSoup def run(bot, chat_id, user, keyConfig='', message='', totalResults=1): requestText = str(message) if requestText == '': totalSteamGames = int(Get_steam_total()) totalGOGGames = int(Get_GOG_total()) ...
46.724138
163
0.609502
import json import urllib import urllib2 from bs4 import BeautifulSoup def run(bot, chat_id, user, keyConfig='', message='', totalResults=1): requestText = str(message) if requestText == '': totalSteamGames = int(Get_steam_total()) totalGOGGames = int(Get_GOG_total()) if totalSteamG...
true
true
790e5778f848762c7ce6987dc100d2fd2ea59abd
4,343
py
Python
utilities/connmanagermqtt.py
connax-utim/uhost-micropython
853d5e12d050715aadf20eb065cf0658ba95696a
[ "Apache-2.0" ]
1
2018-10-28T18:38:40.000Z
2018-10-28T18:38:40.000Z
utilities/connmanagermqtt.py
connax-utim/uhost-micropython
853d5e12d050715aadf20eb065cf0658ba95696a
[ "Apache-2.0" ]
1
2018-11-20T09:42:52.000Z
2018-11-20T09:42:52.000Z
utilities/connmanagermqtt.py
connax-utim/uhost-micropython
853d5e12d050715aadf20eb065cf0658ba95696a
[ "Apache-2.0" ]
null
null
null
"""ConnManagerMQTT containing script""" import _thread import time import random import logging from .uconn_mqtt import UConnMQTT from . import exceptions class ConnManagerMQTT(object): """ UconnMQTT wrapper that guarantee delivery to addressee """ _SENDER = 'sender' _DESTINATION = 'destination' ...
35.024194
99
0.588994
import _thread import time import random import logging from .uconn_mqtt import UConnMQTT from . import exceptions class ConnManagerMQTT(object): _SENDER = 'sender' _DESTINATION = 'destination' _MESSAGE = 'message' def __init__(self): logging.info('Initializing ConnmanagerMQTT') self...
true
true
790e585d98a2c69da340d368be90e40711f59e3f
9,033
py
Python
pyinsteon/topics.py
michaeldavie/pyinsteon
e5b2e2910f4eff1474f158051fa71f75c2077dd6
[ "MIT" ]
15
2020-07-08T05:29:14.000Z
2022-03-24T18:56:26.000Z
pyinsteon/topics.py
michaeldavie/pyinsteon
e5b2e2910f4eff1474f158051fa71f75c2077dd6
[ "MIT" ]
107
2019-06-03T09:23:02.000Z
2022-03-31T23:12:38.000Z
pyinsteon/topics.py
teharris1/pyinsteon
9476473676d714a62f0cfcc5124f7cd7e96de98b
[ "MIT" ]
16
2019-01-24T01:09:49.000Z
2022-02-24T03:48:42.000Z
"""Constants used to ensure topic consistantancy.""" STANDARD_RECEIVED = "standard_received" EXTENDED_RECEIVED = "extended_received" X10_RECEIVED = "x10_received" ALL_LINKING_COMPLETED = "all_linking_completed" BUTTON_EVENT_REPORT = "button_event_report" USER_RESET_DETECTED = "user_reset_detected" ALL_LINK_CLEANUP_FAI...
48.564516
83
0.878224
STANDARD_RECEIVED = "standard_received" EXTENDED_RECEIVED = "extended_received" X10_RECEIVED = "x10_received" ALL_LINKING_COMPLETED = "all_linking_completed" BUTTON_EVENT_REPORT = "button_event_report" USER_RESET_DETECTED = "user_reset_detected" ALL_LINK_CLEANUP_FAILURE_REPORT = "all_link_cleanup_failure_report" ALL_L...
true
true
790e59397dcef942cdcb90c1bca35ebe3af98ab2
4,500
py
Python
setup.py
Yanshang1991/espnet
174bc42814036cfa42ea133f937f59d7a89ecf5d
[ "Apache-2.0" ]
null
null
null
setup.py
Yanshang1991/espnet
174bc42814036cfa42ea133f937f59d7a89ecf5d
[ "Apache-2.0" ]
null
null
null
setup.py
Yanshang1991/espnet
174bc42814036cfa42ea133f937f59d7a89ecf5d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """ESPnet setup script.""" import os from distutils.version import LooseVersion from setuptools import find_packages from setuptools import setup requirements = { "install": [ "setuptools>=38.5.1", "configargparse>=1.2.1", "typeguard>=2.7.0", "humanfriendl...
30.821918
87
0.572667
import os from distutils.version import LooseVersion from setuptools import find_packages from setuptools import setup requirements = { "install": [ "setuptools>=38.5.1", "configargparse>=1.2.1", "typeguard>=2.7.0", "humanfriendly", "scipy>=1.4.1", "matplotlib==...
true
true
790e5977e01b613959d5f6ef80e325921d5aa3ff
6,509
py
Python
neuralhydrology/modelzoo/ealstm.py
visr/neuralhydrology
77f6c9214945c8e857e3b9545afe8470da751cab
[ "BSD-3-Clause" ]
null
null
null
neuralhydrology/modelzoo/ealstm.py
visr/neuralhydrology
77f6c9214945c8e857e3b9545afe8470da751cab
[ "BSD-3-Clause" ]
null
null
null
neuralhydrology/modelzoo/ealstm.py
visr/neuralhydrology
77f6c9214945c8e857e3b9545afe8470da751cab
[ "BSD-3-Clause" ]
null
null
null
from typing import Dict, Tuple import torch import torch.nn as nn from neuralhydrology.modelzoo.basemodel import BaseModel from neuralhydrology.modelzoo.fc import FC from neuralhydrology.modelzoo.head import get_head from neuralhydrology.utils.config import Config class EALSTM(BaseModel): """Entity-Aware LSTM (...
40.937107
119
0.649101
from typing import Dict, Tuple import torch import torch.nn as nn from neuralhydrology.modelzoo.basemodel import BaseModel from neuralhydrology.modelzoo.fc import FC from neuralhydrology.modelzoo.head import get_head from neuralhydrology.utils.config import Config class EALSTM(BaseModel): module_parts = ['...
true
true
790e59e8577def6088dd6be0c6089fab686dad2b
503
py
Python
env/Lib/site-packages/plotly/validators/choroplethmapbox/hoverlabel/font/_color.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
venv/Lib/site-packages/plotly/validators/choroplethmapbox/hoverlabel/font/_color.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
venv/Lib/site-packages/plotly/validators/choroplethmapbox/hoverlabel/font/_color.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="choroplethmapbox.hoverlabel.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plot...
27.944444
66
0.620278
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="choroplethmapbox.hoverlabel.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plot...
true
true
790e5d0d53be79fd7df36cb0ca4ecc96f552c5b0
9,572
py
Python
django/contrib/auth/tests/test_remote_user.py
benjaoming/django
6dbe979b4d9396e1b307c7d27388c97c13beb21c
[ "BSD-3-Clause" ]
2
2015-01-21T15:45:07.000Z
2015-02-21T02:38:13.000Z
django/contrib/auth/tests/test_remote_user.py
HenriqueLR/django
d1ca70110f49f0be90206c8da516ac16aebc8c75
[ "BSD-3-Clause" ]
null
null
null
django/contrib/auth/tests/test_remote_user.py
HenriqueLR/django
d1ca70110f49f0be90206c8da516ac16aebc8c75
[ "BSD-3-Clause" ]
1
2020-05-25T08:55:19.000Z
2020-05-25T08:55:19.000Z
from datetime import datetime from django.conf import settings from django.contrib.auth import authenticate from django.contrib.auth.backends import RemoteUserBackend from django.contrib.auth.middleware import RemoteUserMiddleware from django.contrib.auth.models import User from django.contrib.auth.tests.utils import ...
39.717842
87
0.66496
from datetime import datetime from django.conf import settings from django.contrib.auth import authenticate from django.contrib.auth.backends import RemoteUserBackend from django.contrib.auth.middleware import RemoteUserMiddleware from django.contrib.auth.models import User from django.contrib.auth.tests.utils import ...
true
true
790e5ddd622bac946e3a162d790ba18695bc6ec7
1,673
py
Python
13/00/finditer.py
pylangstudy/201708
126b1af96a1d1f57522d5a1d435b58597bea2e57
[ "CC0-1.0" ]
null
null
null
13/00/finditer.py
pylangstudy/201708
126b1af96a1d1f57522d5a1d435b58597bea2e57
[ "CC0-1.0" ]
39
2017-07-31T22:54:01.000Z
2017-08-31T00:19:03.000Z
13/00/finditer.py
pylangstudy/201708
126b1af96a1d1f57522d5a1d435b58597bea2e57
[ "CC0-1.0" ]
null
null
null
#!python3.6 #coding:utf-8 #regex.finditer(string[, pos[, endpos]]) import re regex = re.compile(r'^ab') print(regex) for target in ['abcdefg', 'cdefg', 'abcdabcd', 'cdabAB', 'ABcd']: print(target, regex.finditer(target)) print() regex = re.compile(r'^ab', re.IGNORECASE) print(regex) for target in ['abcdefg', 'cdef...
34.142857
110
0.62642
import re regex = re.compile(r'^ab') print(regex) for target in ['abcdefg', 'cdefg', 'abcdabcd', 'cdabAB', 'ABcd']: print(target, regex.finditer(target)) print() regex = re.compile(r'^ab', re.IGNORECASE) print(regex) for target in ['abcdefg', 'cdefg', 'abcdabcd', 'cdabAB', 'ABcd']: print(target, regex.findi...
true
true
790e5e0dc7393e5ba2a65abbb2a62d4cd9da9543
2,713
py
Python
squareconnect/models/v1_retrieve_business_request.py
shaminmeerankutty/connect-python-sdk
524c8fe344bc3c0340833984970a07d519c4f5be
[ "Apache-2.0" ]
53
2016-08-06T17:12:16.000Z
2020-08-02T19:43:58.000Z
squareconnect/models/v1_retrieve_business_request.py
shaminmeerankutty/connect-python-sdk
524c8fe344bc3c0340833984970a07d519c4f5be
[ "Apache-2.0" ]
32
2016-08-19T16:32:30.000Z
2020-01-14T18:01:37.000Z
squareconnect/models/v1_retrieve_business_request.py
shaminmeerankutty/connect-python-sdk
524c8fe344bc3c0340833984970a07d519c4f5be
[ "Apache-2.0" ]
45
2016-09-05T11:58:09.000Z
2020-11-15T16:26:41.000Z
# coding: utf-8 """ Copyright 2017 Square, 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 la...
28.260417
77
0.555474
from pprint import pformat from six import iteritems import re class V1RetrieveBusinessRequest(object): def __init__(self): self.swagger_types = { } self.attribute_map = { } def to_dict(self): result = {} for attr, _ in iteritems...
true
true
790e5ec257778133a9ac30ca59887a817c05e144
14,150
py
Python
src/qa4sm_preprocessing/nc_image_reader/transpose.py
s-scherrer/qa4sm-preprocessing
dbb6dea8e4d34b69ee4d5f82f0a0028294d45170
[ "MIT" ]
null
null
null
src/qa4sm_preprocessing/nc_image_reader/transpose.py
s-scherrer/qa4sm-preprocessing
dbb6dea8e4d34b69ee4d5f82f0a0028294d45170
[ "MIT" ]
5
2021-07-29T11:41:24.000Z
2022-01-18T14:34:38.000Z
src/qa4sm_preprocessing/nc_image_reader/transpose.py
s-scherrer/qa4sm-preprocessing
dbb6dea8e4d34b69ee4d5f82f0a0028294d45170
[ "MIT" ]
3
2021-07-28T13:56:05.000Z
2021-11-15T07:39:45.000Z
import copy import dask import dask.array as da from dask.distributed import Client import datetime import logging import math from multiprocessing.pool import ThreadPool import numpy as np from pathlib import Path from tqdm.auto import tqdm from typing import Union, TypeVar, Tuple import xarray as xr import shutil imp...
34.681373
84
0.637597
import copy import dask import dask.array as da from dask.distributed import Client import datetime import logging import math from multiprocessing.pool import ThreadPool import numpy as np from pathlib import Path from tqdm.auto import tqdm from typing import Union, TypeVar, Tuple import xarray as xr import shutil imp...
true
true
790e5ec333865c7a8b4e9f1508d99ef7ab507008
205
py
Python
maxixe/decorators.py
tswicegood/maxixe
680fc8e92bf34e5b825ee0685659e40e992b0328
[ "Apache-2.0" ]
1
2020-07-09T04:30:52.000Z
2020-07-09T04:30:52.000Z
maxixe/decorators.py
tswicegood/maxixe
680fc8e92bf34e5b825ee0685659e40e992b0328
[ "Apache-2.0" ]
null
null
null
maxixe/decorators.py
tswicegood/maxixe
680fc8e92bf34e5b825ee0685659e40e992b0328
[ "Apache-2.0" ]
null
null
null
from . import registry def step(match): def outer(func): registry.add(match, func) def inner(*args, **kwargs): func(*args, **kwargs) return inner return outer
18.636364
35
0.565854
from . import registry def step(match): def outer(func): registry.add(match, func) def inner(*args, **kwargs): func(*args, **kwargs) return inner return outer
true
true
790e5ec55cf44098cc2983ef4a97e0c2dde08281
14,466
py
Python
processlib/activity.py
RaphaelKimmig/processlib
3eb5a3c9e2999e782b5a740bd5747d62a1c35077
[ "BSD-3-Clause" ]
1
2020-07-14T10:42:55.000Z
2020-07-14T10:42:55.000Z
processlib/activity.py
RaphaelKimmig/processlib
3eb5a3c9e2999e782b5a740bd5747d62a1c35077
[ "BSD-3-Clause" ]
2
2019-07-12T14:22:11.000Z
2019-07-30T07:27:20.000Z
processlib/activity.py
RaphaelKimmig/processlib
3eb5a3c9e2999e782b5a740bd5747d62a1c35077
[ "BSD-3-Clause" ]
2
2018-08-22T11:09:06.000Z
2019-07-12T14:16:00.000Z
import django import six from django.http import HttpResponseRedirect if django.VERSION[0] < 2: from django.core.urlresolvers import reverse else: from django.urls import reverse from django.db import transaction from django.utils import timezone import logging from processlib.assignment import inherit from ...
31.793407
93
0.635144
import django import six from django.http import HttpResponseRedirect if django.VERSION[0] < 2: from django.core.urlresolvers import reverse else: from django.urls import reverse from django.db import transaction from django.utils import timezone import logging from processlib.assignment import inherit from ...
true
true
790e5f1b0df53c72c03c75628c8a50d0925777d6
251
py
Python
src/components/api/wrappers/test.py
ghsecuritylab/comanche
a8862eaed59045377874b95b120832a0cba42193
[ "Apache-2.0" ]
19
2017-10-03T16:01:49.000Z
2021-06-07T10:21:46.000Z
src/components/api/wrappers/test.py
dnbaker/comanche
121cd0fa16e55d461b366e83511d3810ea2b11c9
[ "Apache-2.0" ]
25
2018-02-21T23:43:03.000Z
2020-09-02T08:47:32.000Z
src/components/api/wrappers/test.py
dnbaker/comanche
121cd0fa16e55d461b366e83511d3810ea2b11c9
[ "Apache-2.0" ]
19
2017-10-24T17:41:40.000Z
2022-02-22T02:17:18.000Z
#!/usr/bin/python -i import Block import rlcompleter, readline readline.parse_and_bind("tab: complete") device = Block.Block("86:00.0",2,"libcomanche-blknvme.so") buffer = device.allocate_io_buffer(4096,32,-1) info = device.get_volume_info() info
19.307692
58
0.756972
import Block import rlcompleter, readline readline.parse_and_bind("tab: complete") device = Block.Block("86:00.0",2,"libcomanche-blknvme.so") buffer = device.allocate_io_buffer(4096,32,-1) info = device.get_volume_info() info
true
true
790e5fde9f6d2a34f208992d40c79984032e5703
6,715
py
Python
python/cuml/dask/preprocessing/label.py
codereport/cuml
7225fadb72ef5408af58ab16ce062762b64f2c79
[ "Apache-2.0" ]
null
null
null
python/cuml/dask/preprocessing/label.py
codereport/cuml
7225fadb72ef5408af58ab16ce062762b64f2c79
[ "Apache-2.0" ]
null
null
null
python/cuml/dask/preprocessing/label.py
codereport/cuml
7225fadb72ef5408af58ab16ce062762b64f2c79
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020, NVIDIA 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...
28.696581
77
0.586746
from cuml.preprocessing.label import LabelBinarizer as LB from dask.distributed import default_client from cuml.dask.common.input_utils import _extract_partitions from cuml.common import rmm_cupy_ary import dask import cupy as cp class LabelBinarizer(object): def __init__(self, client=None, **kwa...
true
true
790e6026009666cf369fded3d07108280c0bf789
7,582
py
Python
tests/test_feedback.py
slarse/repobee-feedback
a3a059dd04a81ff0ed9979839b8cc0c2ce90220b
[ "MIT" ]
null
null
null
tests/test_feedback.py
slarse/repobee-feedback
a3a059dd04a81ff0ed9979839b8cc0c2ce90220b
[ "MIT" ]
2
2019-09-11T14:10:03.000Z
2019-09-11T22:24:08.000Z
tests/test_feedback.py
slarse/repobee-feedback
a3a059dd04a81ff0ed9979839b8cc0c2ce90220b
[ "MIT" ]
null
null
null
import argparse import sys import pathlib import random from unittest import mock import pytest from _repobee import plugin import repobee_plug as plug from repobee_feedback import feedback ASSIGNMENT_NAMES = ("task-1", "task-2") STUDENT_TEAMS = tuple( [ plug.StudentTeam(members=members) for memb...
33.548673
79
0.684648
import argparse import sys import pathlib import random from unittest import mock import pytest from _repobee import plugin import repobee_plug as plug from repobee_feedback import feedback ASSIGNMENT_NAMES = ("task-1", "task-2") STUDENT_TEAMS = tuple( [ plug.StudentTeam(members=members) for memb...
true
true
790e622afb9411d289cf87fa112c25e164c1e4a2
7,768
py
Python
racecar-code/labs/test_utils.py
abhatia25/Beaverworks-Racecar
7c579e27de3688d58f280ff260897f77efa5fb4a
[ "MIT" ]
null
null
null
racecar-code/labs/test_utils.py
abhatia25/Beaverworks-Racecar
7c579e27de3688d58f280ff260897f77efa5fb4a
[ "MIT" ]
1
2021-03-06T21:24:28.000Z
2021-03-06T21:24:28.000Z
racecar-code/labs/test_utils.py
abhatia25/Beaverworks-Racecar
7c579e27de3688d58f280ff260897f77efa5fb4a
[ "MIT" ]
1
2021-03-06T21:04:55.000Z
2021-03-06T21:04:55.000Z
""" Copyright MIT and Harvey Mudd College MIT License Summer 2020 A simple program which can be used to manually test racecar_utils functionality. """ ######################################################################################## # Imports ####################################################################...
41.319149
139
0.609166
true
true
790e62a5c151bac56ff72c68dada6b0f35c59d2f
7,082
py
Python
summarizer/bert.py
stungkit/bert-extractive-summarizer
84f27333aef33629444589c24933b76448777d4f
[ "MIT" ]
null
null
null
summarizer/bert.py
stungkit/bert-extractive-summarizer
84f27333aef33629444589c24933b76448777d4f
[ "MIT" ]
null
null
null
summarizer/bert.py
stungkit/bert-extractive-summarizer
84f27333aef33629444589c24933b76448777d4f
[ "MIT" ]
null
null
null
from functools import partial from typing import List, Optional, Union from transformers import (AlbertModel, AlbertTokenizer, BartModel, BigBirdModel, BigBirdTokenizer, BartTokenizer, BertModel, BertTokenizer, CamembertModel, CamembertTokenizer, CTRLModel, ...
48.176871
120
0.673539
from functools import partial from typing import List, Optional, Union from transformers import (AlbertModel, AlbertTokenizer, BartModel, BigBirdModel, BigBirdTokenizer, BartTokenizer, BertModel, BertTokenizer, CamembertModel, CamembertTokenizer, CTRLModel, ...
true
true
790e63a10493bf287298406333fe7d5c1754ea94
775
py
Python
src/advent_2021/day_12/part_1.py
mgesbert/advent
5768691b110a954f834686147432657dcb63e59f
[ "MIT" ]
null
null
null
src/advent_2021/day_12/part_1.py
mgesbert/advent
5768691b110a954f834686147432657dcb63e59f
[ "MIT" ]
null
null
null
src/advent_2021/day_12/part_1.py
mgesbert/advent
5768691b110a954f834686147432657dcb63e59f
[ "MIT" ]
null
null
null
from collections import defaultdict from advent_2021.helpers import get_input def dfs( caves: dict[str, list[str]], current: str, visited: set[str] | None = None, ) -> int: if current == "end": return 1 nb_paths = 0 if visited is None: visited = set() for cave in caves[cu...
23.484848
78
0.580645
from collections import defaultdict from advent_2021.helpers import get_input def dfs( caves: dict[str, list[str]], current: str, visited: set[str] | None = None, ) -> int: if current == "end": return 1 nb_paths = 0 if visited is None: visited = set() for cave in caves[cu...
true
true
790e67b4a0130e236418657be57ccbb358b26c43
119
py
Python
prometheus_manager/database.py
wikimedia/cloud-metricsinfra-prometheus-manager
ad42e8e1173cabb0d9333cb07d3e1506f5729380
[ "BSD-3-Clause" ]
null
null
null
prometheus_manager/database.py
wikimedia/cloud-metricsinfra-prometheus-manager
ad42e8e1173cabb0d9333cb07d3e1506f5729380
[ "BSD-3-Clause" ]
null
null
null
prometheus_manager/database.py
wikimedia/cloud-metricsinfra-prometheus-manager
ad42e8e1173cabb0d9333cb07d3e1506f5729380
[ "BSD-3-Clause" ]
null
null
null
from flask_alembic import Alembic from flask_sqlalchemy import SQLAlchemy database = SQLAlchemy() alembic = Alembic()
19.833333
39
0.823529
from flask_alembic import Alembic from flask_sqlalchemy import SQLAlchemy database = SQLAlchemy() alembic = Alembic()
true
true
790e684ea71bd28eb7fa097fe3844b1b6a49fcee
4,568
py
Python
LW-UI/authosm/models.py
5g-media/OIDC_ON_OSMr5
cd4cb104e32352d030b349c7d36711482394d283
[ "Apache-2.0" ]
null
null
null
LW-UI/authosm/models.py
5g-media/OIDC_ON_OSMr5
cd4cb104e32352d030b349c7d36711482394d283
[ "Apache-2.0" ]
1
2020-02-12T03:23:39.000Z
2020-02-12T03:23:39.000Z
LW-UI_MODIFIED/authosm/models.py
5g-media/OIDC_ON_OSMr5
cd4cb104e32352d030b349c7d36711482394d283
[ "Apache-2.0" ]
null
null
null
# # Copyright 2018 EveryUP Srl # # 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 t...
35.138462
115
0.669002
from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User, AbstractBaseUser, BaseUserManager, PermissionsMixin from django.utils import timezone from authosm.exceptions import OSMAuthException ...
true
true
790e6890758163cd3fda1f0c4496ccae14411aed
8,311
py
Python
pypy/module/test_lib_pypy/ctypes_tests/test_bitfields.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
4
2019-02-11T06:58:43.000Z
2020-03-15T14:12:32.000Z
pypy/module/test_lib_pypy/ctypes_tests/test_bitfields.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
null
null
null
pypy/module/test_lib_pypy/ctypes_tests/test_bitfields.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
null
null
null
import py from ctypes import * from support import BaseCTypesTestChecker import os import ctypes signed_int_types = (c_byte, c_short, c_int, c_long, c_longlong) unsigned_int_types = (c_ubyte, c_ushort, c_uint, c_ulong, c_ulonglong) int_types = unsigned_int_types + signed_int_types def setup_module(mod): import ...
32.980159
85
0.47395
import py from ctypes import * from support import BaseCTypesTestChecker import os import ctypes signed_int_types = (c_byte, c_short, c_int, c_long, c_longlong) unsigned_int_types = (c_ubyte, c_ushort, c_uint, c_ulong, c_ulonglong) int_types = unsigned_int_types + signed_int_types def setup_module(mod): import ...
true
true
790e69307b517e5850779f3ab10406fbba52eff4
2,582
py
Python
tests/test_prep_manager.py
Transcranial-Solutions/t-bears
4712b8bb425814c444ee75f3220a31df934982aa
[ "Apache-2.0" ]
35
2018-08-24T03:39:35.000Z
2021-08-21T23:35:57.000Z
tests/test_prep_manager.py
Transcranial-Solutions/t-bears
4712b8bb425814c444ee75f3220a31df934982aa
[ "Apache-2.0" ]
40
2018-08-24T05:35:54.000Z
2021-12-15T08:23:38.000Z
tests/test_prep_manager.py
Transcranial-Solutions/t-bears
4712b8bb425814c444ee75f3220a31df934982aa
[ "Apache-2.0" ]
22
2018-08-28T15:11:46.000Z
2021-12-01T23:34:45.000Z
# -*- coding: utf-8 -*- # Copyright 2017-2018 ICON Foundation # # 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 ...
41.645161
154
0.731603
import unittest from tbears.block_manager.block_manager import PRepManager from tbears.config.tbears_config import keystore_test1 PREP_LIST = [ { "id": "hx86aba2210918a9b116973f3c4b27c41a54d5dafe", "publicKey": "04a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b21...
true
true
790e694a4377c119090144e982153fce7e3aaae2
814
py
Python
gooddata-afm-client/gooddata_afm_client/__init__.py
jaceksan/gooddata-python-sdk
640bd8b679e00a5f0eb627bdf6143de078f8b59b
[ "MIT" ]
null
null
null
gooddata-afm-client/gooddata_afm_client/__init__.py
jaceksan/gooddata-python-sdk
640bd8b679e00a5f0eb627bdf6143de078f8b59b
[ "MIT" ]
null
null
null
gooddata-afm-client/gooddata_afm_client/__init__.py
jaceksan/gooddata-python-sdk
640bd8b679e00a5f0eb627bdf6143de078f8b59b
[ "MIT" ]
null
null
null
# flake8: noqa """ OpenAPI definition No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v0 Generated by: https://openapi-generator.tech """ __version__ = "0.6.0" # import ApiClient from good...
29.071429
124
0.829238
__version__ = "0.6.0" from gooddata_afm_client.api_client import ApiClient from gooddata_afm_client.configuration import Configuration from gooddata_afm_client.exceptions import OpenApiException from gooddata_afm_client.exceptions import ApiAttributeError from gooddata_afm_client.exceptions import ApiTypeErro...
true
true
790e6aeaed48e237d93e3acae13c96381715b42a
1,558
py
Python
pytglib/api/types/page_block_related_article.py
iTeam-co/pytglib
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
6
2019-10-30T08:57:27.000Z
2021-02-08T14:17:43.000Z
pytglib/api/types/page_block_related_article.py
iTeam-co/python-telegram
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
1
2021-08-19T05:44:10.000Z
2021-08-19T07:14:56.000Z
pytglib/api/types/page_block_related_article.py
iTeam-co/python-telegram
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
5
2019-12-04T05:30:39.000Z
2021-05-21T18:23:32.000Z
from ..utils import Object class PageBlockRelatedArticle(Object): """ Contains information about a related article Attributes: ID (:obj:`str`): ``PageBlockRelatedArticle`` Args: url (:obj:`str`): Related article URL title (:obj:`str`): Article titl...
29.396226
92
0.589217
from ..utils import Object class PageBlockRelatedArticle(Object): ID = "pageBlockRelatedArticle" def __init__(self, url, title, description, photo, author, publish_date, **kwargs): self.url = url self.title = title self.description = description self.photo = p...
true
true
790e6afe5f02236b00d9c67b7b25a881e07abace
2,853
py
Python
python/paddle/fluid/tests/unittests/test_while_op.py
skylarch/Paddle
d58d8df6f5f7aa6fd2f0780f87475055db57a80d
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/test_while_op.py
skylarch/Paddle
d58d8df6f5f7aa6fd2f0780f87475055db57a80d
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/test_while_op.py
skylarch/Paddle
d58d8df6f5f7aa6fd2f0780f87475055db57a80d
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
35.222222
76
0.629513
import unittest import paddle.fluid.layers as layers from paddle.fluid.executor import Executor import paddle.fluid.core as core from paddle.fluid.backward import append_backward import numpy class TestWhileOp(unittest.TestCase): def test_simple_forward(self): d0 = layers.data( "...
true
true
790e6b341b98fcabe4870ecf271e0c5e7fe03c82
3,467
py
Python
baselines/scripts/segvae/models/networks/normalization.py
atmacvit/meronymnet
47e1a7caadc0f770439bb26a93b885f790f62804
[ "MIT" ]
1
2021-11-02T05:13:12.000Z
2021-11-02T05:13:12.000Z
baselines/scripts/segvae/models/networks/normalization.py
atmacvit/meronymnet
47e1a7caadc0f770439bb26a93b885f790f62804
[ "MIT" ]
1
2021-12-17T14:29:18.000Z
2021-12-17T14:29:18.000Z
baselines/scripts/segvae/models/networks/normalization.py
atmacvit/meronymnet
47e1a7caadc0f770439bb26a93b885f790f62804
[ "MIT" ]
null
null
null
import re import torch import torch.nn as nn import torch.nn.functional as F from models.networks.sync_batchnorm import SynchronizedBatchNorm2d import torch.nn.utils.spectral_norm as spectral_norm # Returns a function that creates a normalization function # that does not condition on semantic map def get_nonspade_norm...
38.098901
87
0.651284
import re import torch import torch.nn as nn import torch.nn.functional as F from models.networks.sync_batchnorm import SynchronizedBatchNorm2d import torch.nn.utils.spectral_norm as spectral_norm def get_nonspade_norm_layer(opt, norm_type='instance'): if hasattr(layer, 'out_channels'): return geta...
true
true
790e6b57221b260f6e51419db22576bea765eb79
1,547
py
Python
src/wallet/wallet.py
MikitaSaladukha/my-blockchain
c09091762dc559d41b8aa29fbe8267aff834a57c
[ "Apache-2.0" ]
null
null
null
src/wallet/wallet.py
MikitaSaladukha/my-blockchain
c09091762dc559d41b8aa29fbe8267aff834a57c
[ "Apache-2.0" ]
null
null
null
src/wallet/wallet.py
MikitaSaladukha/my-blockchain
c09091762dc559d41b8aa29fbe8267aff834a57c
[ "Apache-2.0" ]
null
null
null
import binascii import requests from Crypto.PublicKey import RSA from common.transaction import Transaction from common.transaction_input import TransactionInput from common.transaction_output import TransactionOutput from common.utils import calculate_hash class Owner: def __init__(self, private_key: str = "")...
33.630435
113
0.678087
import binascii import requests from Crypto.PublicKey import RSA from common.transaction import Transaction from common.transaction_input import TransactionInput from common.transaction_output import TransactionOutput from common.utils import calculate_hash class Owner: def __init__(self, private_key: str = "")...
true
true
790e6c0828b1fab68913cce7fbb1b9224435ad13
364
py
Python
third_party/antlr_grammars_v4/sql/plsql/Python3/PlSqlBaseParser.py
mikhan808/rsyntaxtextarea-antlr4-extension
be6a7881e0f6e1a5e8c8e65f7ca4898a2298aa77
[ "BSD-3-Clause" ]
4
2020-10-14T13:44:57.000Z
2021-07-08T00:54:33.000Z
third_party/antlr_grammars_v4/sql/plsql/Python3/PlSqlBaseParser.py
mikhan808/rsyntaxtextarea-antlr4-extension
be6a7881e0f6e1a5e8c8e65f7ca4898a2298aa77
[ "BSD-3-Clause" ]
null
null
null
third_party/antlr_grammars_v4/sql/plsql/Python3/PlSqlBaseParser.py
mikhan808/rsyntaxtextarea-antlr4-extension
be6a7881e0f6e1a5e8c8e65f7ca4898a2298aa77
[ "BSD-3-Clause" ]
2
2021-09-06T08:50:58.000Z
2021-09-16T11:37:27.000Z
from antlr4 import * class PlSqlBaseParser(Parser): _isVersion10 = False _isVersion12 = True def isVersion10(self): return self._isVersion10 def isVersion12(self): return self._isVersion12 def setVersion10(self, value): self._isVersion10 = value def setVersion12(sel...
20.222222
34
0.673077
from antlr4 import * class PlSqlBaseParser(Parser): _isVersion10 = False _isVersion12 = True def isVersion10(self): return self._isVersion10 def isVersion12(self): return self._isVersion12 def setVersion10(self, value): self._isVersion10 = value def setVersion12(sel...
true
true
790e6d438e22ff30321e479ffbce3f43c0e787a0
3,826
py
Python
varfish_cli/__main__.py
bihealth/varfish-cli
e2b56ef8a158cc7fbe523cbd1c02f13cff8682e5
[ "MIT" ]
2
2020-09-24T08:01:03.000Z
2022-03-23T15:49:13.000Z
varfish_cli/__main__.py
bihealth/varfish-cli
e2b56ef8a158cc7fbe523cbd1c02f13cff8682e5
[ "MIT" ]
9
2021-02-16T21:07:35.000Z
2022-03-24T13:36:07.000Z
varfish_cli/__main__.py
bihealth/varfish-cli
e2b56ef8a158cc7fbe523cbd1c02f13cff8682e5
[ "MIT" ]
2
2022-03-23T15:06:19.000Z
2022-03-23T15:49:17.000Z
"""Main entry point for VarFish CLI.""" import argparse import logging import os import sys import logzero import toml from logzero import logger from varfish_cli import __version__ from .common import run_nocmd, CommonConfig from .case import setup_argparse as setup_argparse_case from .case import run as run_case ...
31.619835
100
0.669106
import argparse import logging import os import sys import logzero import toml from logzero import logger from varfish_cli import __version__ from .common import run_nocmd, CommonConfig from .case import setup_argparse as setup_argparse_case from .case import run as run_case GLOBAL_CONFIG_PATHS = ("~/.varfishrc.to...
true
true
790e6d5d485d8a9cf391ffe0a4445dca116402f4
2,044
py
Python
tests/core/test_fragment.py
trumanw/ScaffoldGraph
a594e5c5effe6c5e45c0061a235ccbeb64e416f9
[ "MIT" ]
null
null
null
tests/core/test_fragment.py
trumanw/ScaffoldGraph
a594e5c5effe6c5e45c0061a235ccbeb64e416f9
[ "MIT" ]
null
null
null
tests/core/test_fragment.py
trumanw/ScaffoldGraph
a594e5c5effe6c5e45c0061a235ccbeb64e416f9
[ "MIT" ]
null
null
null
""" scaffoldgraph tests.core.test_fragment """ import pytest from rdkit import Chem from scaffoldgraph.core.fragment import * @pytest.fixture(name='mol') def test_molecule(): smiles = 'CCN1CCc2c(C1)sc(NC(=O)Nc3ccc(Cl)cc3)c2C#N' return Chem.MolFromSmiles(smiles) def canon(smiles): """Canonicalize SMILE...
31.446154
104
0.719667
import pytest from rdkit import Chem from scaffoldgraph.core.fragment import * @pytest.fixture(name='mol') def test_molecule(): smiles = 'CCN1CCc2c(C1)sc(NC(=O)Nc3ccc(Cl)cc3)c2C#N' return Chem.MolFromSmiles(smiles) def canon(smiles): return Chem.MolToSmiles(Chem.MolFromSmiles(smiles)) def test_murck...
true
true
790e6f0c2ddcc586747397ef7be1a6248ef7817f
138
py
Python
condominios/apps.py
mpeyrotc/govector
5429d538d0bcee4d95d9069dd397b3b5b35b504c
[ "MIT" ]
null
null
null
condominios/apps.py
mpeyrotc/govector
5429d538d0bcee4d95d9069dd397b3b5b35b504c
[ "MIT" ]
null
null
null
condominios/apps.py
mpeyrotc/govector
5429d538d0bcee4d95d9069dd397b3b5b35b504c
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class CondominiosConfig(AppConfig): name = 'condominios'
17.25
39
0.804348
from __future__ import unicode_literals from django.apps import AppConfig class CondominiosConfig(AppConfig): name = 'condominios'
true
true
790e708e4fd42df30662fd05e0fd27cb6d2b56ae
1,525
py
Python
gdsfactory/components/cdsem_straight.py
jorgepadilla19/gdsfactory
68e1c18257a75d4418279851baea417c8899a165
[ "MIT" ]
42
2020-05-25T09:33:45.000Z
2022-03-29T03:41:19.000Z
gdsfactory/components/cdsem_straight.py
jorgepadilla19/gdsfactory
68e1c18257a75d4418279851baea417c8899a165
[ "MIT" ]
133
2020-05-28T18:29:04.000Z
2022-03-31T22:21:42.000Z
gdsfactory/components/cdsem_straight.py
jorgepadilla19/gdsfactory
68e1c18257a75d4418279851baea417c8899a165
[ "MIT" ]
17
2020-06-30T07:07:50.000Z
2022-03-17T15:45:27.000Z
"""CD SEM structures.""" from functools import partial from typing import Optional, Tuple from gdsfactory.cell import cell from gdsfactory.component import Component from gdsfactory.components.straight import straight as straight_function from gdsfactory.components.text_rectangular import text_rectangular from gdsfact...
28.773585
76
0.685902
from functools import partial from typing import Optional, Tuple from gdsfactory.cell import cell from gdsfactory.component import Component from gdsfactory.components.straight import straight as straight_function from gdsfactory.components.text_rectangular import text_rectangular from gdsfactory.cross_section import ...
true
true
790e70f9e9c6e39d9007e0b280f55ffda2cb3bfb
484
py
Python
demo_snippets/15_Bootstrap/main.py
fabod/pro2_demos
6ff1babf07eefa90db2a6d36727c290c7085c588
[ "MIT" ]
3
2021-04-27T09:42:00.000Z
2022-03-03T13:21:33.000Z
demo_snippets/15_Bootstrap/main.py
hackerman7000/pro2_demos
6ff1babf07eefa90db2a6d36727c290c7085c588
[ "MIT" ]
null
null
null
demo_snippets/15_Bootstrap/main.py
hackerman7000/pro2_demos
6ff1babf07eefa90db2a6d36727c290c7085c588
[ "MIT" ]
1
2022-03-03T12:49:27.000Z
2022-03-03T12:49:27.000Z
from flask import Flask from flask import render_template app = Flask("Boostrap_Demo") @app.route("/") def start(): name = "Fabian" cards = [ {"titel": "Card 0", "inhalt": "Blubber"}, {"titel": "Card 1", "inhalt": "Bla"}, {"titel": "Card 2", "inhalt": "Käsekuchen"}, {"titel": ...
23.047619
64
0.578512
from flask import Flask from flask import render_template app = Flask("Boostrap_Demo") @app.route("/") def start(): name = "Fabian" cards = [ {"titel": "Card 0", "inhalt": "Blubber"}, {"titel": "Card 1", "inhalt": "Bla"}, {"titel": "Card 2", "inhalt": "Käsekuchen"}, {"titel": ...
true
true
790e7118041275c984e663ed66d4fddc0b7a1fae
1,084
py
Python
examples/decoupledibpm/flatplate3dRe100AoA30_GPU/scripts/createBody.py
CFD-lab-ZJU/PetIBM
a6578217ec1022b380f3f2a5972c8d2868ea3202
[ "BSD-3-Clause" ]
71
2015-01-19T18:22:12.000Z
2022-03-29T01:46:14.000Z
examples/decoupledibpm/flatplate3dRe100AoA30_GPU/scripts/createBody.py
CFD-lab-ZJU/PetIBM
a6578217ec1022b380f3f2a5972c8d2868ea3202
[ "BSD-3-Clause" ]
105
2015-03-02T18:10:27.000Z
2022-03-31T21:06:01.000Z
examples/decoupledibpm/flatplate3dRe100AoA30_GPU/scripts/createBody.py
piyueh/PetIBM
59c9ddd7373c2f4659761ca425db05491069c601
[ "MIT" ]
45
2015-01-22T16:32:07.000Z
2022-02-09T02:41:26.000Z
""" Create a flat plate of length 1.0 with aspect ratio 2.0 and a 30-degree inclination. The plate is discretized with spacing 0.04 in the x-y plane and with spacing 0.04 along the z-direction. """ import math import pathlib import numpy # Flat-plate's parameters. L = 1.0 # chord length AR = 2.0 # aspect ratio xc,...
27.794872
76
0.657749
import math import pathlib import numpy L = 1.0 # chord length AR = 2.0 # aspect ratio xc, yc, zc = 0.0, 0.0, 0.0 # center's coordinates aoa = 30.0 ds = 0.04 simu_dir = pathlib.Path(__file__).absolute().parents[1] n = math.ceil(L / ds) s = numpy.linspace(xc - L / 2, xc + L / 2, num=n + 1) x = xc + numpy....
true
true
790e713f9b9db9c56828ed101058ef1722be48bc
7,322
py
Python
Lib3/bsddb/test/test_db.py
wchangque/bsddb3
477f9defcf61b47d2cc769374afff468e4b4a248
[ "BSD-3-Clause" ]
null
null
null
Lib3/bsddb/test/test_db.py
wchangque/bsddb3
477f9defcf61b47d2cc769374afff468e4b4a248
[ "BSD-3-Clause" ]
null
null
null
Lib3/bsddb/test/test_db.py
wchangque/bsddb3
477f9defcf61b47d2cc769374afff468e4b4a248
[ "BSD-3-Clause" ]
null
null
null
""" Copyright (c) 2008-2020, Jesus Cea Avion <jcea@jcea.es> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of...
36.979798
79
0.642721
import unittest import os, glob from .test_all import db, test_support, get_new_environment_path, \ get_new_database_path class DB(unittest.TestCase): def setUp(self): self.path = get_new_database_path() self.db = db.DB() def tearDown(self): self.db.close() del self...
true
true
790e71563257e0b2ab4a36cb3403c7b30a3b5499
7,381
py
Python
skyblock/object/object.py
peter-hunt/skyblock
a3ef6329e2579940f39944544d02f49727247f44
[ "MIT" ]
13
2021-05-29T09:59:16.000Z
2022-03-16T13:19:28.000Z
skyblock/object/object.py
peter-hunt/skyblock
a3ef6329e2579940f39944544d02f49727247f44
[ "MIT" ]
4
2021-07-11T00:33:53.000Z
2022-01-28T08:16:52.000Z
skyblock/object/object.py
peter-hunt/skyblock
a3ef6329e2579940f39944544d02f49727247f44
[ "MIT" ]
2
2021-07-24T05:18:14.000Z
2021-08-06T06:45:11.000Z
from typing import Dict, Iterator, List, Optional, Tuple, Union from ..constant.util import Amount, ItemPointer, Number from .item_wrapper import item_type from .other_wrapper import * __all__ = [ 'ItemType', 'Item', 'Empty', 'Accessory', 'EnchantedBook', 'ReforgeStone', 'TravelScroll', 'Bow', 'Sword', ...
19.423684
77
0.618886
from typing import Dict, Iterator, List, Optional, Tuple, Union from ..constant.util import Amount, ItemPointer, Number from .item_wrapper import item_type from .other_wrapper import * __all__ = [ 'ItemType', 'Item', 'Empty', 'Accessory', 'EnchantedBook', 'ReforgeStone', 'TravelScroll', 'Bow', 'Sword', ...
true
true
790e717eaac52736abd2a5e6bee89fa90e8b38de
10,101
py
Python
main.py
capjamesg/indieweb-search
856ac117974bba593549136dfc17c3402c9f0066
[ "MIT" ]
14
2021-08-31T14:36:55.000Z
2022-03-14T15:14:14.000Z
main.py
capjamesg/indieweb-search
856ac117974bba593549136dfc17c3402c9f0066
[ "MIT" ]
22
2021-09-24T06:21:49.000Z
2022-02-13T15:41:57.000Z
main.py
capjamesg/indieweb-search
856ac117974bba593549136dfc17c3402c9f0066
[ "MIT" ]
1
2021-09-24T09:40:14.000Z
2021-09-24T09:40:14.000Z
from flask import render_template, request, redirect, send_from_directory, jsonify, Blueprint from direct_answers import choose_direct_answer from direct_answers import search_result_features import indieweb_utils import search_helpers, config, search_page_feeds import requests import json import math import spacy impo...
30.242515
137
0.701416
from flask import render_template, request, redirect, send_from_directory, jsonify, Blueprint from direct_answers import choose_direct_answer from direct_answers import search_result_features import indieweb_utils import search_helpers, config, search_page_feeds import requests import json import math import spacy impo...
true
true
790e7285e09d46500a56e5d22afa96479369a23f
6,048
py
Python
plotly/validators/violin/hoverlabel/__init__.py
piyush1301/plotly.py
50cd5c4cd4732042422751c7760acbab8dd8a50d
[ "MIT" ]
6
2019-05-03T02:12:04.000Z
2020-03-01T06:33:21.000Z
plotly/validators/violin/hoverlabel/__init__.py
piyush1301/plotly.py
50cd5c4cd4732042422751c7760acbab8dd8a50d
[ "MIT" ]
null
null
null
plotly/validators/violin/hoverlabel/__init__.py
piyush1301/plotly.py
50cd5c4cd4732042422751c7760acbab8dd8a50d
[ "MIT" ]
5
2019-05-18T16:50:11.000Z
2021-07-06T21:14:36.000Z
import _plotly_utils.basevalidators class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name='namelengthsrc', parent_name='violin.hoverlabel', **kwargs ): super(NamelengthsrcValidator, self).__init__( plotly...
28.8
78
0.590112
import _plotly_utils.basevalidators class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name='namelengthsrc', parent_name='violin.hoverlabel', **kwargs ): super(NamelengthsrcValidator, self).__init__( plotly...
true
true
790e72f872c82ca6398e4e0770eef1c3e634e5d4
3,724
py
Python
bindsnet_master/examples/breakout/random_network_baseline.py
Singular-Brain/ProjectBrain
2d22d45c13a86825c0dcaf517a59e02f2c4f6164
[ "MIT" ]
null
null
null
bindsnet_master/examples/breakout/random_network_baseline.py
Singular-Brain/ProjectBrain
2d22d45c13a86825c0dcaf517a59e02f2c4f6164
[ "MIT" ]
null
null
null
bindsnet_master/examples/breakout/random_network_baseline.py
Singular-Brain/ProjectBrain
2d22d45c13a86825c0dcaf517a59e02f2c4f6164
[ "MIT" ]
null
null
null
import torch import argparse from bindsnet.network import Network from bindsnet.learning import Hebbian from bindsnet.pipeline import EnvironmentPipeline from bindsnet.encoding import bernoulli from bindsnet.network.monitors import Monitor from bindsnet.environment import GymEnvironment from bindsnet.network.topology ...
27.791045
72
0.713212
import torch import argparse from bindsnet.network import Network from bindsnet.learning import Hebbian from bindsnet.pipeline import EnvironmentPipeline from bindsnet.encoding import bernoulli from bindsnet.network.monitors import Monitor from bindsnet.environment import GymEnvironment from bindsnet.network.topology ...
true
true
790e7337f486d034d1c34e7f36b05469c5a79ef6
274
py
Python
python/itertools-product.py
gajubadge11/HackerRank-1
7b136ccaa1ed47ae737467ace6b494c720ccb942
[ "MIT" ]
340
2018-06-17T19:45:56.000Z
2022-03-22T02:26:15.000Z
python/itertools-product.py
gajubadge11/HackerRank-1
7b136ccaa1ed47ae737467ace6b494c720ccb942
[ "MIT" ]
3
2021-02-02T17:17:29.000Z
2021-05-18T10:06:04.000Z
python/itertools-product.py
gajubadge11/HackerRank-1
7b136ccaa1ed47ae737467ace6b494c720ccb942
[ "MIT" ]
229
2019-04-20T08:28:49.000Z
2022-03-31T04:23:52.000Z
#!/usr/bin/env python3 from itertools import product if __name__ == "__main__": arr1 = list(map(int, input().strip().split(' '))) arr2 = list(map(int, input().strip().split(' '))) for el in product(arr1, arr2): print("{} ".format(el), end='')
24.909091
53
0.569343
from itertools import product if __name__ == "__main__": arr1 = list(map(int, input().strip().split(' '))) arr2 = list(map(int, input().strip().split(' '))) for el in product(arr1, arr2): print("{} ".format(el), end='')
true
true
790e73a7152d3b0e4f788b230eb22120fd104d5c
45,576
py
Python
wokkel/muc.py
Gandi/wokkel
74631b43f5016ac32443468fd608a9baa1ecce39
[ "MIT" ]
null
null
null
wokkel/muc.py
Gandi/wokkel
74631b43f5016ac32443468fd608a9baa1ecce39
[ "MIT" ]
null
null
null
wokkel/muc.py
Gandi/wokkel
74631b43f5016ac32443468fd608a9baa1ecce39
[ "MIT" ]
null
null
null
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...
29.234124
79
0.607447
from dateutil.tz import tzutc from zope.interface import implements from twisted.internet import defer from twisted.words.protocols.jabber import jid, error, xmlstream from twisted.words.xish import domish from wokkel import data_form, generic, iwokkel, xmppim from wokkel.compat import Values, ValueConstant fro...
true
true
790e74c8370be5ee794d9d226bcc2a00fa272636
7,563
py
Python
pybind/slxos/v16r_1_00b/brocade_mpls_rpc/show_mpls_lsp_extensive/output/lsp/show_mpls_lsp_extensive_info/show_mpls_lsp_sec_path_info/sec_path/lsp_sec_path_config_admin_groups/lsp_admin_group/lsp_admin_group_include_any/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v16r_1_00b/brocade_mpls_rpc/show_mpls_lsp_extensive/output/lsp/show_mpls_lsp_extensive_info/show_mpls_lsp_sec_path_info/sec_path/lsp_sec_path_config_admin_groups/lsp_admin_group/lsp_admin_group_include_any/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v16r_1_00b/brocade_mpls_rpc/show_mpls_lsp_extensive/output/lsp/show_mpls_lsp_extensive_info/show_mpls_lsp_sec_path_info/sec_path/lsp_sec_path_config_admin_groups/lsp_admin_group/lsp_admin_group_include_any/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
1
2021-11-05T22:15:42.000Z
2021-11-05T22:15:42.000Z
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
57.295455
504
0.74838
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
true
true
790e7546f4b2894ee4a4ed5d525dc89c0e953b69
65
py
Python
Wellington_python/exemplo_listas.py
jwellington58/Wellingtonlp220172vacation
c246c6d9604f93a6d846eeb4af34a4065b3f3c4d
[ "MIT" ]
null
null
null
Wellington_python/exemplo_listas.py
jwellington58/Wellingtonlp220172vacation
c246c6d9604f93a6d846eeb4af34a4065b3f3c4d
[ "MIT" ]
null
null
null
Wellington_python/exemplo_listas.py
jwellington58/Wellingtonlp220172vacation
c246c6d9604f93a6d846eeb4af34a4065b3f3c4d
[ "MIT" ]
null
null
null
lista = [1,2,3,4,5] for i in range(0,5): print(lista[i])
16.25
20
0.523077
lista = [1,2,3,4,5] for i in range(0,5): print(lista[i])
true
true
790e76ced01e61aad876b2c1d9379ac88c777b97
11,572
py
Python
kombu/tests/test_compat.py
chartbeat/kombu
e73033b38899f2300f50100ade1d5a8d652a6864
[ "BSD-3-Clause" ]
1
2016-04-26T10:09:35.000Z
2016-04-26T10:09:35.000Z
kombu/tests/test_compat.py
serverdensity/kombu
a48dc5b55141f021a47912c73d2c20498c593795
[ "BSD-3-Clause" ]
null
null
null
kombu/tests/test_compat.py
serverdensity/kombu
a48dc5b55141f021a47912c73d2c20498c593795
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from mock import patch from kombu import Connection, Exchange, Queue from kombu import compat from .mocks import Transport, Channel from .utils import TestCase from .utils import Mock class test_misc(TestCase): def test_iterconsume(self): class MyConnection(obje...
35.716049
76
0.571638
from __future__ import absolute_import from mock import patch from kombu import Connection, Exchange, Queue from kombu import compat from .mocks import Transport, Channel from .utils import TestCase from .utils import Mock class test_misc(TestCase): def test_iterconsume(self): class MyConnection(obje...
true
true
790e7920cc465ce6604d5a02d4a3e1aefa47b008
508
py
Python
tools/unpool_test.py
rcmalli/polimi-dl-project
5bf26a8e930dc98fe59a74bc473ddc74ff7dd201
[ "MIT" ]
4
2018-09-03T13:36:43.000Z
2020-02-13T18:52:09.000Z
tools/unpool_test.py
rcmalli/polimi-dl-project
5bf26a8e930dc98fe59a74bc473ddc74ff7dd201
[ "MIT" ]
null
null
null
tools/unpool_test.py
rcmalli/polimi-dl-project
5bf26a8e930dc98fe59a74bc473ddc74ff7dd201
[ "MIT" ]
1
2019-01-09T04:02:49.000Z
2019-01-09T04:02:49.000Z
from src.model import unpool_resize,unpool_deconv, unpool_checkerboard, unpool_simple from tensorflow.keras.layers import Input, UpSampling2D from tensorflow.keras.models import Model input = Input(shape=(20, 20, 3)) out1 = unpool_resize(input) model1 = Model(inputs=input, outputs=out1) print("") out2 = unpool_decon...
25.4
85
0.769685
from src.model import unpool_resize,unpool_deconv, unpool_checkerboard, unpool_simple from tensorflow.keras.layers import Input, UpSampling2D from tensorflow.keras.models import Model input = Input(shape=(20, 20, 3)) out1 = unpool_resize(input) model1 = Model(inputs=input, outputs=out1) print("") out2 = unpool_decon...
true
true
790e793a4accee9fcf2281ab1385405585257fb9
4,847
py
Python
wandb/sdk/service/service.py
TachikakaMin/client
27d1ef98285e3cb94881b370a8c37bfb310000c1
[ "MIT" ]
1
2021-11-15T08:26:28.000Z
2021-11-15T08:26:28.000Z
wandb/sdk/service/service.py
webclinic017/client
8225a30e2db2094d817d3048a66edfaa8803941c
[ "MIT" ]
null
null
null
wandb/sdk/service/service.py
webclinic017/client
8225a30e2db2094d817d3048a66edfaa8803941c
[ "MIT" ]
null
null
null
"""grpc service. Reliably launch and connect to grpc process. """ import datetime import enum import logging import os import subprocess import sys import tempfile import time from typing import Any, Dict, Optional from typing import TYPE_CHECKING import grpc from wandb.proto import wandb_server_pb2 as spb from wand...
31.070513
99
0.592119
import datetime import enum import logging import os import subprocess import sys import tempfile import time from typing import Any, Dict, Optional from typing import TYPE_CHECKING import grpc from wandb.proto import wandb_server_pb2 as spb from wandb.proto import wandb_server_pb2_grpc as pbgrpc from wandb.sdk.wandb...
true
true