hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
a9960385ed2b2a560c2a72a121228628d947025f
94
py
Python
run.py
ChinadaCam/HN-webchat
f527ecc3443f90c68345edc47609a3f885bea3ed
[ "MIT" ]
null
null
null
run.py
ChinadaCam/HN-webchat
f527ecc3443f90c68345edc47609a3f885bea3ed
[ "MIT" ]
1
2021-06-02T01:01:20.000Z
2021-06-02T01:01:20.000Z
run.py
ChinadaCam/HN-webchat
f527ecc3443f90c68345edc47609a3f885bea3ed
[ "MIT" ]
null
null
null
from hnchat import app, socketio if __name__ == '__main__': socketio.run(app, debug=True)
23.5
33
0.723404
c4c025ebd9b48f405003cc420ac5378d8f36835e
961
py
Python
utils/common/logger.py
DylanLeeee/jd
a41598de8c1c60cac63fb891e08ef7532092edb1
[ "MIT" ]
161
2018-10-23T07:06:46.000Z
2021-12-06T09:33:20.000Z
utils/common/logger.py
DylanLeeee/jd
a41598de8c1c60cac63fb891e08ef7532092edb1
[ "MIT" ]
null
null
null
utils/common/logger.py
DylanLeeee/jd
a41598de8c1c60cac63fb891e08ef7532092edb1
[ "MIT" ]
15
2019-05-02T07:17:21.000Z
2021-11-25T05:25:22.000Z
# -*- coding: utf-8 -*- # @Time : 19-12-2 下午3:48 # @Author : Redtree # @File : logger.py # @Desc : 调用python内置的logging模块实现日志管理,配置log.IO等框架实现日志可视化管理。 import logging from __init__ import ROOT_PATH def set_log(logWord,level='warning',logName='error'): log_path = ROOT_PATH+'/log/'+str(logName)+'.log' lo...
33.137931
105
0.575442
0f087a2aea4b8e80c5237bebeac3e0d341b4894d
21
py
Python
pyfdb/__init__.py
ecmwf/pyfdb
90716ddcaa8b3d981e695b47a1690123e0c230ba
[ "Apache-2.0" ]
null
null
null
pyfdb/__init__.py
ecmwf/pyfdb
90716ddcaa8b3d981e695b47a1690123e0c230ba
[ "Apache-2.0" ]
null
null
null
pyfdb/__init__.py
ecmwf/pyfdb
90716ddcaa8b3d981e695b47a1690123e0c230ba
[ "Apache-2.0" ]
null
null
null
from .pyfdb import *
10.5
20
0.714286
7af09bf56b4ce80e3b4bcd4191d1615b21bb9f8b
9,309
py
Python
bit_list_utilities.py
paulgclark/rf_utilities
8caada61fa95f308e3e93970ca1419e9d95183af
[ "MIT" ]
10
2017-10-15T18:19:31.000Z
2022-03-24T22:51:25.000Z
bit_list_utilities.py
paulgclark/rf_utilities
8caada61fa95f308e3e93970ca1419e9d95183af
[ "MIT" ]
null
null
null
bit_list_utilities.py
paulgclark/rf_utilities
8caada61fa95f308e3e93970ca1419e9d95183af
[ "MIT" ]
6
2018-12-06T04:58:55.000Z
2022-03-24T22:51:27.000Z
# The following functions simplify manipulating lists of bits, # in which each list item is an integer 0 or 1. This is the # primary way in which binary data is stored and manipulated # within the wave* family of tools. # # note: these functions have not been optimized for performance, # but are instead implemented fo...
31.989691
105
0.61027
047505bbcaf30d88fed81e86d21e26e89ecc69d3
1,485
py
Python
app.py
inderpartap/zschedule
ee5bd7ddf22721148e65bc8039c15d4b541ff885
[ "MIT" ]
null
null
null
app.py
inderpartap/zschedule
ee5bd7ddf22721148e65bc8039c15d4b541ff885
[ "MIT" ]
null
null
null
app.py
inderpartap/zschedule
ee5bd7ddf22721148e65bc8039c15d4b541ff885
[ "MIT" ]
null
null
null
from flask import Flask, render_template, flash, request, redirect, url_for from wtforms import Form, TextField, TextAreaField, validators, StringField, SubmitField from wtforms.validators import DataRequired from main import attendance from jinja2 import Template import numpy as np # App config. DEBUG = True app = F...
30.306122
118
0.724579
077213514349acd21fce482f307a158ec0f89e07
1,372
py
Python
perfectextractor/tests/test_models.py
UUDigitalHumanitieslab/time-in-translation
2b1a3ef2d382b725ec87f0266fc726fbeb818e7b
[ "MIT" ]
3
2020-04-22T15:12:58.000Z
2021-05-31T16:36:23.000Z
perfectextractor/tests/test_models.py
UUDigitalHumanitieslab/time-in-translation
2b1a3ef2d382b725ec87f0266fc726fbeb818e7b
[ "MIT" ]
13
2017-08-17T13:31:40.000Z
2022-03-11T10:29:22.000Z
perfectextractor/tests/test_models.py
UUDigitalHumanitieslab/time-in-translation
2b1a3ef2d382b725ec87f0266fc726fbeb818e7b
[ "MIT" ]
1
2020-04-16T10:33:05.000Z
2020-04-16T10:33:05.000Z
import unittest from lxml import etree from perfectextractor.apps.extractor.models import Perfect XML_ID = 'test_id' class TestPerfect(unittest.TestCase): def setUp(self): mock_s = etree.Element('s') self.pp = Perfect(mock_s) self.pp.add_word('has', 'have', 'VERB', XML_ID) self....
36.105263
85
0.639942
f102f49371d1a989c585ee13c58ef59868229167
25,700
py
Python
grmpy/estimate/estimate_semipar.py
OpenSourceEconomics/grmpy
13a262fb615c79829eb4869cbb6693c9c51fb101
[ "MIT" ]
18
2018-04-10T01:08:22.000Z
2022-02-23T02:37:24.000Z
grmpy/estimate/estimate_semipar.py
grmToolbox/grmpy
13a262fb615c79829eb4869cbb6693c9c51fb101
[ "MIT" ]
127
2017-08-02T13:29:26.000Z
2018-03-27T19:42:07.000Z
grmpy/estimate/estimate_semipar.py
OpenSourceEconomics/grmpy
13a262fb615c79829eb4869cbb6693c9c51fb101
[ "MIT" ]
13
2018-04-28T09:46:22.000Z
2020-11-06T09:32:27.000Z
""" This module contains the semiparametric estimation process. """ import kernreg as kr import matplotlib.pyplot as plt import numpy as np import pandas as pd import statsmodels.api as sm from skmisc.loess import loess lowess = sm.nonparametric.lowess def semipar_fit(dict_, data): """ " This function runs t...
30.741627
88
0.634591
133cb54a8a8ee0df6b9c7a347144204da4997a4f
1,532
py
Python
Bugscan_exploits-master/exp_list/exp-1262.py
csadsl/poc_exp
e3146262e7403f19f49ee2db56338fa3f8e119c9
[ "MIT" ]
11
2020-05-30T13:53:49.000Z
2021-03-17T03:20:59.000Z
Bugscan_exploits-master/exp_list/exp-1262.py
csadsl/poc_exp
e3146262e7403f19f49ee2db56338fa3f8e119c9
[ "MIT" ]
6
2020-05-13T03:25:18.000Z
2020-07-21T06:24:16.000Z
Bugscan_exploits-master/exp_list/exp-1262.py
csadsl/poc_exp
e3146262e7403f19f49ee2db56338fa3f8e119c9
[ "MIT" ]
6
2020-05-30T13:53:51.000Z
2020-12-01T21:44:26.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- #__Author__ = 01001000entai #_PlugName_ = e-cology homepage/LoginHomepage.jsp hpid sqli #__Refer___ = http://www.wooyun.org/bugs/wooyun-2010-078802 import re import md5 import time def assign(service, arg): if service == 'weaver_e-cology': return T...
37.365854
132
0.622063
f2fa32870342295e6586e13551fc94f4837581ac
1,959
py
Python
examples/agnn.py
lsj2408/pytorch_geometric
21cc1efd7c3b2912f4c2c98ddd5e9065a9aef6d4
[ "MIT" ]
null
null
null
examples/agnn.py
lsj2408/pytorch_geometric
21cc1efd7c3b2912f4c2c98ddd5e9065a9aef6d4
[ "MIT" ]
null
null
null
examples/agnn.py
lsj2408/pytorch_geometric
21cc1efd7c3b2912f4c2c98ddd5e9065a9aef6d4
[ "MIT" ]
null
null
null
import os.path as osp import torch import torch.nn.functional as F from torch_geometric.datasets import Planetoid import torch_geometric.transforms as T from torch_geometric.nn import AGNNConv dataset = 'Cora' path = osp.join(osp.dirname(osp.realpath(__file__)), '..', 'data', dataset) dataset = Planetoid(path, datase...
30.609375
76
0.652884
51f30e4d59d9f0d117ad8389c3b53cb369ef371f
2,921
py
Python
parseLDB.py
JeffpanUK/NuPyTools
4c8180d850fff175e24c302757ae745d62258bc0
[ "MIT" ]
2
2017-08-05T17:27:34.000Z
2017-12-17T03:43:33.000Z
parseLDB.py
JeffpanUK/NuPyTools
4c8180d850fff175e24c302757ae745d62258bc0
[ "MIT" ]
null
null
null
parseLDB.py
JeffpanUK/NuPyTools
4c8180d850fff175e24c302757ae745d62258bc0
[ "MIT" ]
1
2019-10-26T00:03:27.000Z
2019-10-26T00:03:27.000Z
#!/usr/bin/env py3 import os import sys import re ''' ============================ @FileName: parserLDB @Author: Jeff Pan (kevinjjp@gmail.com) @Version: 1.0 @DateTime: 2017-11-06 11:01:28 ============================ ''' class LDBPARSER(object): """docstring for LDBPARSER""" def __init__(self, option...
32.098901
136
0.593632
6923349631f1535455f3ed38dbe9c4dde8603746
10,804
py
Python
mars/zstd/tests/test-zstd-versions.py
habbyge/mars
f30884ab41599780c51eb57a19dc1e0662cbc98a
[ "BSD-2-Clause", "Apache-2.0" ]
1
2020-09-17T06:29:28.000Z
2020-09-17T06:29:28.000Z
mars/zstd/tests/test-zstd-versions.py
habbyge/mars
f30884ab41599780c51eb57a19dc1e0662cbc98a
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
mars/zstd/tests/test-zstd-versions.py
habbyge/mars
f30884ab41599780c51eb57a19dc1e0662cbc98a
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """Test zstd interoperability between versions""" # ################################################################ # Copyright (c) 2016-present, Yann Collet, Facebook, Inc. # All rights reserved. # # This source code is licensed under both the BSD-style license (found in the # LICENSE file in ...
38.448399
156
0.572936
2e966ab381ca9dd58a017ae29195a2ba5c65847b
1,464
bzl
Python
third_party/com_fasterxml_jackson_core.bzl
wix/wix-oss-infra
b57ac2f0f66487cfdd08293a8fa389efe3d42c43
[ "MIT" ]
3
2020-01-14T12:57:31.000Z
2021-06-06T20:47:57.000Z
third_party/com_fasterxml_jackson_core.bzl
wix/wix-oss-infra
b57ac2f0f66487cfdd08293a8fa389efe3d42c43
[ "MIT" ]
20
2020-04-02T13:08:43.000Z
2020-11-05T11:27:40.000Z
third_party/com_fasterxml_jackson_core.bzl
wix/wix-oss-infra
b57ac2f0f66487cfdd08293a8fa389efe3d42c43
[ "MIT" ]
1
2021-04-02T09:32:35.000Z
2021-04-02T09:32:35.000Z
load("@wix_oss_infra//:import_external.bzl", import_external = "safe_wix_scala_maven_import_external") def dependencies(): import_external( name = "com_fasterxml_jackson_core_jackson_annotations", artifact = "com.fasterxml.jackson.core:jackson-annotations:2.9.0", artifact_sha256 = "45d32ac...
39.567568
102
0.728825
178020735338c8222f9329beac8083d9a1b8eb2e
165,800
py
Python
theory/sfem/sfem_tria3_example.py
compmech/particles
d23ae69ad4c79024b997a232247b4ae0e1e7031c
[ "BSD-2-Clause" ]
8
2017-06-16T15:50:43.000Z
2021-12-01T10:20:36.000Z
theory/sfem/sfem_tria3_example.py
compmech/particles
d23ae69ad4c79024b997a232247b4ae0e1e7031c
[ "BSD-2-Clause" ]
2
2017-12-27T11:07:04.000Z
2019-01-22T19:34:33.000Z
theory/sfem/sfem_tria3_example.py
compmech/particles
d23ae69ad4c79024b997a232247b4ae0e1e7031c
[ "BSD-2-Clause" ]
4
2017-05-17T17:53:20.000Z
2019-04-03T01:57:58.000Z
"""SFEM - Tria 3, implementation as per phungvan2013 """ import numpy as np import matplotlib.pyplot as plt from scipy.sparse import coo_matrix from composites.laminate import read_stack from structsolve import solve XGLOBAL = np.array([1., 0, 0]) YGLOBAL = np.array([0, 1., 0]) ZGLOBAL = np.array([0, 0, 1.]) def a...
291.901408
1,495
0.704735
346d37debf1155ea8325f2e1680b54c41c30ece2
3,500
py
Python
axelrod/strategies/worse_and_worse.py
t0nyt93/Axelroddd
66d95378d3ece8b32afeb1c77d305397bd9a815e
[ "MIT" ]
null
null
null
axelrod/strategies/worse_and_worse.py
t0nyt93/Axelroddd
66d95378d3ece8b32afeb1c77d305397bd9a815e
[ "MIT" ]
null
null
null
axelrod/strategies/worse_and_worse.py
t0nyt93/Axelroddd
66d95378d3ece8b32afeb1c77d305397bd9a815e
[ "MIT" ]
1
2019-03-11T08:56:09.000Z
2019-03-11T08:56:09.000Z
from axelrod.actions import Actions from axelrod.player import Player from axelrod.random_ import random_choice C, D = Actions.C, Actions.D class WorseAndWorse(Player): """ Defects with probability of 'current turn / 1000'. Therefore it is more and more likely to defect as the round goes on. Source ...
27.559055
80
0.616857
8cc35cef5a97b9a3dc3684cce0e896078a3eb704
494
py
Python
hackerrank/Algorithms/Migratory Birds/solution.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
4
2020-07-24T01:59:50.000Z
2021-07-24T15:14:08.000Z
hackerrank/Algorithms/Migratory Birds/solution.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
hackerrank/Algorithms/Migratory Birds/solution.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
#!/bin/python3 import os # Complete the migratoryBirds function below. def migratoryBirds(arr): count = [0] * 6 # There are 5 types of birds: 1, 2, 3, 4, 5 for b in arr: count[b] += 1 return count.index(max(count)) if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') ...
19
64
0.603239
d1592ab712bbe5a4f74e0b2328fac488664aa681
10,408
py
Python
huaweicloud-sdk-cdn/huaweicloudsdkcdn/v1/model/__init__.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-cdn/huaweicloudsdkcdn/v1/model/__init__.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-cdn/huaweicloudsdkcdn/v1/model/__init__.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 from __future__ import absolute_import # import models into model package from huaweicloudsdkcdn.v1.model.black_white_list_body import BlackWhiteListBody from huaweicloudsdkcdn.v1.model.cache_config import CacheConfig from huaweicloudsdkcdn.v1.model.cache_config_request import CacheConfigRequest from ...
81.952756
142
0.916795
b90702d1d8fa98c4076e0009ba5d51e906572000
284
py
Python
src/utils/photo.py
geoghazwan/geo-server-10
e2170abeee037dad4c44841501bc0eb67b376838
[ "MIT" ]
null
null
null
src/utils/photo.py
geoghazwan/geo-server-10
e2170abeee037dad4c44841501bc0eb67b376838
[ "MIT" ]
null
null
null
src/utils/photo.py
geoghazwan/geo-server-10
e2170abeee037dad4c44841501bc0eb67b376838
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from picamera import PiCamera from time import sleep camera = PiCamera() camera.rotation = 180 camera.start_preview() for i in range(1): camera.capture('/home/pi/Downloads/geo-server-10/src/utils/image.jpg') camera.stop_preview()
18.933333
74
0.711268
18f359eedc8f1d622ae95a8b243b1faf2018a35a
34,451
py
Python
RelationExtraction/utils/run_language_modeling.py
nsu-ai/few-shot-nlu
163b1fa7275cd1a0640c111bfc4bcfead6e0cab4
[ "Apache-2.0" ]
4
2020-09-10T19:50:24.000Z
2021-09-22T13:50:12.000Z
RelationExtraction/utils/run_language_modeling.py
nsu-ai/few-shot-nlu
163b1fa7275cd1a0640c111bfc4bcfead6e0cab4
[ "Apache-2.0" ]
null
null
null
RelationExtraction/utils/run_language_modeling.py
nsu-ai/few-shot-nlu
163b1fa7275cd1a0640c111bfc4bcfead6e0cab4
[ "Apache-2.0" ]
3
2020-08-19T15:47:37.000Z
2022-01-21T02:49:12.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
43.775095
165
0.671011
49fb60c46eaca82afd709fb1d6f86498c43cfd28
548
py
Python
ABC/abc051-abc100/abc088/b.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
2
2020-06-12T09:54:23.000Z
2021-05-04T01:34:07.000Z
ABC/abc051-abc100/abc088/b.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
961
2020-06-23T07:26:22.000Z
2022-03-31T21:34:52.000Z
ABC/abc051-abc100/abc088/b.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- # AtCoder Beginner Contest # Problem B if __name__ == '__main__': card_count = int(input()) card_numbers = [int(i) for i in input().split()] card_numbers.sort(reverse=True) alice_score = 0 bob_score = 0 alice_cards = card_numbers[::2] bob_cards = c...
21.076923
53
0.596715
b2bbc4d30471277070f90b0f25a0a27f034a1337
1,674
py
Python
timm/models/__init__.py
jiangtaoo2333/StaticGestureRecognition
9d554b137f217f3bcb046b2c6978b9487685de2a
[ "MIT" ]
null
null
null
timm/models/__init__.py
jiangtaoo2333/StaticGestureRecognition
9d554b137f217f3bcb046b2c6978b9487685de2a
[ "MIT" ]
null
null
null
timm/models/__init__.py
jiangtaoo2333/StaticGestureRecognition
9d554b137f217f3bcb046b2c6978b9487685de2a
[ "MIT" ]
null
null
null
from .byoanet import * from .byobnet import * from .cait import * from .coat import * from .convit import * from .cspnet import * from .densenet import * from .dla import * from .dpn import * from .efficientnet import * from .ghostnet import * from .gluon_resnet import * from .gluon_xception import * from .hardcorenas ...
30.436364
114
0.79092
96a8dbdba3b54e64e444f73fdc36800c203c25f4
188
py
Python
credentials.py
CoderAtri/Twilio_Sms_Python_App
b54aa886dd05a4de03cf40f75fe99cd7caf9687c
[ "MIT" ]
null
null
null
credentials.py
CoderAtri/Twilio_Sms_Python_App
b54aa886dd05a4de03cf40f75fe99cd7caf9687c
[ "MIT" ]
null
null
null
credentials.py
CoderAtri/Twilio_Sms_Python_App
b54aa886dd05a4de03cf40f75fe99cd7caf9687c
[ "MIT" ]
null
null
null
#Credential Generated from your Twilio Account account_sid= 'Your Twilio Sid' auth_token='Your Twilio Auth Token' my_cell='Number whom you want to sms' my_twilio='Your Twilio number'
31.333333
47
0.781915
ca1ad4f08734d5677d38bcb63f20133a5e1ccd55
510
py
Python
accidents/migrations/0012_auto_20170606_0657.py
Moizes92/CTMS
faceaf71a6fd6fb379dbcc13a60a538e449e13db
[ "Apache-2.0" ]
null
null
null
accidents/migrations/0012_auto_20170606_0657.py
Moizes92/CTMS
faceaf71a6fd6fb379dbcc13a60a538e449e13db
[ "Apache-2.0" ]
null
null
null
accidents/migrations/0012_auto_20170606_0657.py
Moizes92/CTMS
faceaf71a6fd6fb379dbcc13a60a538e449e13db
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-06-06 03:57 from __future__ import unicode_literals import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accidents', '0011_auto_20170606_0656'), ] operations = [ migr...
23.181818
93
0.629412
33672a7dea64521736d4d8fdfe58523fcc915cc9
2,796
py
Python
frappe/core/doctype/comment/test_comment.py
naderelabed/frappe
4d6fefaf6b5af594180c0f9f31c7e28e6f514348
[ "MIT" ]
1
2021-12-23T11:56:09.000Z
2021-12-23T11:56:09.000Z
frappe/core/doctype/comment/test_comment.py
naderelabed/frappe
4d6fefaf6b5af594180c0f9f31c7e28e6f514348
[ "MIT" ]
null
null
null
frappe/core/doctype/comment/test_comment.py
naderelabed/frappe
4d6fefaf6b5af594180c0f9f31c7e28e6f514348
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors # License: MIT. See LICENSE import frappe, json import unittest class TestComment(unittest.TestCase): def tearDown(self): frappe.form_dict.comment = None frappe.form_dict.comment_email = None frappe.form_dict.comment_by = None ...
31.066667
82
0.733906
13a9b5dc054d8637f5fb5b027a62f8a48b325fac
1,301
py
Python
twitter_clone/users/tests/test_admin.py
dashgin/twitter_clone
8e4b73b11b865eac19e8427bf043877b268e4e17
[ "MIT" ]
null
null
null
twitter_clone/users/tests/test_admin.py
dashgin/twitter_clone
8e4b73b11b865eac19e8427bf043877b268e4e17
[ "MIT" ]
null
null
null
twitter_clone/users/tests/test_admin.py
dashgin/twitter_clone
8e4b73b11b865eac19e8427bf043877b268e4e17
[ "MIT" ]
null
null
null
import pytest from django.urls import reverse from twitter_clone.users.models import User pytestmark = pytest.mark.django_db class TestUserAdmin: def test_changelist(self, admin_client): url = reverse("admin:users_user_changelist") response = admin_client.get(url) assert response.status_...
31.731707
79
0.628747
85d865dab997038db8af981fae275fbb9e073db7
3,899
py
Python
goal_pools/collect_positives_multigoal_fixed_screw.py
abhishekunique/RND-ashwin
f8bcf3c593df2dacc0efba0875533be71ccb5011
[ "MIT" ]
null
null
null
goal_pools/collect_positives_multigoal_fixed_screw.py
abhishekunique/RND-ashwin
f8bcf3c593df2dacc0efba0875533be71ccb5011
[ "MIT" ]
7
2020-09-25T22:41:46.000Z
2022-03-12T00:37:25.000Z
goal_pools/collect_positives_multigoal_fixed_screw.py
abhishekunique/RND-ashwin
f8bcf3c593df2dacc0efba0875533be71ccb5011
[ "MIT" ]
null
null
null
import argparse import numpy as np import dsuite import gym from dsuite.dclaw.turn import DClawTurnImage, DClawTurnFixed from softlearning.environments.adapters.gym_adapter import GymAdapter import os import imageio import pickle cur_dir = os.path.dirname(os.path.realpath(__file__)) directory = cur_dir + "/fixed_screw...
32.491667
91
0.513209
a45e973e2e8ea8b34d28f7274eafc905fbc0c5c3
2,463
py
Python
my_work/ch8_sorting/bubble_sort.py
gabrielavirna/PythonDataStructuresAndAlgorithms
d406dc247a8ff2f39ee5aac2a398027298ffbf69
[ "MIT" ]
1
2019-01-22T04:59:02.000Z
2019-01-22T04:59:02.000Z
my_work/ch8_sorting/bubble_sort.py
gabrielavirna/python_data_structures_and_algorithms
d406dc247a8ff2f39ee5aac2a398027298ffbf69
[ "MIT" ]
null
null
null
my_work/ch8_sorting/bubble_sort.py
gabrielavirna/python_data_structures_and_algorithms
d406dc247a8ff2f39ee5aac2a398027298ffbf69
[ "MIT" ]
null
null
null
""" Bubble sort ----------- - very simple idea: Given an unordered list, we compare adjacent elements in the list, each time, putting in the right order of magnitude, only two elements. The algorithm hinges on a swap procedure. Take a list with only two elements: 5 2 [0] [1] To sort this list, swap them effectivel...
47.365385
120
0.71823
2c111dc0104c745746cc01fe23c32b0acbc39a24
883
py
Python
djbootstrap/templatetags/bootstrap_tags.py
madisona/djbootstrap
812f3b3d50140fbb859b59914c4737879021c94d
[ "Apache-2.0" ]
null
null
null
djbootstrap/templatetags/bootstrap_tags.py
madisona/djbootstrap
812f3b3d50140fbb859b59914c4737879021c94d
[ "Apache-2.0" ]
null
null
null
djbootstrap/templatetags/bootstrap_tags.py
madisona/djbootstrap
812f3b3d50140fbb859b59914c4737879021c94d
[ "Apache-2.0" ]
null
null
null
from django import template register = template.Library() # note: in django 1.4 simple tags will be able to take *args so # it would be possible for multiple paths to trigger an 'active' page. # (think a submenu or something similar) @register.simple_tag(takes_context=True) def activate(context, path): """ F...
30.448276
71
0.719139
b50cfc08c931cfe1d4e714d32e6ec7914081d906
30,225
py
Python
main.py
Just-Msv/anti-raid-bot
4a522622d6ed9324d195fe37c7ef4250ab34cd4b
[ "MIT" ]
5
2021-06-03T21:03:28.000Z
2022-02-13T06:31:14.000Z
main.py
MSVFORYOU/anti-raid-bot
4a522622d6ed9324d195fe37c7ef4250ab34cd4b
[ "MIT" ]
2
2021-07-16T16:33:08.000Z
2021-07-18T05:08:15.000Z
main.py
Just-Msv/anti-raid-bot
4a522622d6ed9324d195fe37c7ef4250ab34cd4b
[ "MIT" ]
5
2021-06-04T03:26:08.000Z
2022-01-09T03:53:25.000Z
import discord, datetime, time import asyncio import os import sys from discord.ext import commands from discord.ext import tasks from discord.ext.tasks import loop from datetime import datetime, timezone from discord.utils import get from config import token, CommandPrefix, activitytype, botstatusmessage, developerid,...
57.244318
236
0.583854
130b11226856068d90debcad4ee1e3b0569a556d
5,709
py
Python
model/layers/graph/cgcnn.py
sgbaird/AMDNet
aa1305d1d2c36297bc408bc6aae3f72d27000f46
[ "BSD-3-Clause" ]
3
2022-01-10T14:17:33.000Z
2022-01-10T20:02:01.000Z
model/layers/graph/cgcnn.py
sgbaird/AMDNet
aa1305d1d2c36297bc408bc6aae3f72d27000f46
[ "BSD-3-Clause" ]
2
2021-12-03T05:44:20.000Z
2022-01-10T16:14:13.000Z
model/layers/graph/cgcnn.py
sgbaird/AMDNet
aa1305d1d2c36297bc408bc6aae3f72d27000f46
[ "BSD-3-Clause" ]
3
2021-11-12T19:54:01.000Z
2022-01-10T14:22:34.000Z
from model.layers.graph.base import GraphNetworkLayer import tensorflow.keras.backend as kb import tensorflow as tf class CrystalGraphLayer(GraphNetworkLayer): """ The CGCNN graph implementation as described in the paper Xie et al. PHYSICAL REVIEW LETTERS 120, 145301 (2018) Args: activation ...
43.25
115
0.568751
3d818e8d23cb19940641c9016bf29e3bf97759a9
6,284
py
Python
venv/Lib/site-packages/win32com/test/testPersist.py
itsAbdulKhadar/Machine-Learning-with-Streamlit
c8a0c7ca5a1bcf2730ae9587bcddfebe323965a3
[ "MIT" ]
41
2021-06-19T13:57:18.000Z
2021-12-02T17:08:53.000Z
venv/Lib/site-packages/win32com/test/testPersist.py
itsAbdulKhadar/Machine-Learning-with-Streamlit
c8a0c7ca5a1bcf2730ae9587bcddfebe323965a3
[ "MIT" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
venv/Lib/site-packages/win32com/test/testPersist.py
itsAbdulKhadar/Machine-Learning-with-Streamlit
c8a0c7ca5a1bcf2730ae9587bcddfebe323965a3
[ "MIT" ]
18
2021-11-12T03:15:45.000Z
2022-03-25T05:29:00.000Z
import pythoncom import win32com.server.util import time import win32com, sys, string, win32api, traceback import win32com.client.dynamic import win32com.client import pythoncom from win32com.axcontrol import axcontrol from pywintypes import Unicode from win32com import storagecon from win32com.test.util import CheckC...
29.92381
170
0.647518
b0187a443e3ed95e8b9df8c2147a28f5f9226528
1,214
py
Python
environment/play_blackjack.py
raph-m/blackjack
2a052f4300cd906e7cd6c373d8213803c252dc32
[ "MIT" ]
null
null
null
environment/play_blackjack.py
raph-m/blackjack
2a052f4300cd906e7cd6c373d8213803c252dc32
[ "MIT" ]
null
null
null
environment/play_blackjack.py
raph-m/blackjack
2a052f4300cd906e7cd6c373d8213803c252dc32
[ "MIT" ]
null
null
null
from environment.dealer import Dealer from util.tools import get_score from strategies.counters import ThorpCounter action_space = ["hit", "stick", "double", "split"] number_of_players = 1 number_of_decks = 4 shuffle_every = 52 seed = 1 counter = ThorpCounter() dealer = Dealer( number_of_players=number_of_player...
25.829787
61
0.595552
b0bca365217561671201235d3402d29c3d7b19e5
114
py
Python
altair_pandas/__init__.py
pratapvardhan/altair_pandas
ac9ba8150a5963f11b110fa56986276c506eee5b
[ "BSD-3-Clause" ]
null
null
null
altair_pandas/__init__.py
pratapvardhan/altair_pandas
ac9ba8150a5963f11b110fa56986276c506eee5b
[ "BSD-3-Clause" ]
null
null
null
altair_pandas/__init__.py
pratapvardhan/altair_pandas
ac9ba8150a5963f11b110fa56986276c506eee5b
[ "BSD-3-Clause" ]
2
2019-11-10T23:32:20.000Z
2020-01-07T10:28:48.000Z
"""Altair plotting extension for pandas.""" __version__ = "0.1.0dev0" __all__ = ['plot'] from ._core import plot
19
43
0.701754
4010a0e39dcc2a0719e565cd784cb0d49a73b985
2,708
py
Python
pagerduty/unit_test/test_send_trigger_event.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
null
null
null
pagerduty/unit_test/test_send_trigger_event.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
1
2021-02-23T23:57:37.000Z
2021-02-23T23:57:37.000Z
pagerduty/unit_test/test_send_trigger_event.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
null
null
null
import sys import os sys.path.append(os.path.abspath('../')) from unittest import TestCase from komand_pagerduty.connection.connection import Connection from komand_pagerduty.actions.send_trigger_event import SendTriggerEvent import json import logging class TestSendTriggerEvent(TestCase): def test_integration_s...
37.611111
116
0.672083
2838c9f7964e46747415cae8fb7dfbcc276d2a24
5,621
py
Python
idb/cli/__init__.py
zpao/idb
320e3c689dc0b2f3b6cfd57b29565b30a253c8f0
[ "MIT" ]
null
null
null
idb/cli/__init__.py
zpao/idb
320e3c689dc0b2f3b6cfd57b29565b30a253c8f0
[ "MIT" ]
null
null
null
idb/cli/__init__.py
zpao/idb
320e3c689dc0b2f3b6cfd57b29565b30a253c8f0
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging import os from abc import ABCMeta, abstractmethod from argparse import ArgumentParser, Namespace from ty...
33.861446
111
0.649529
93f00bbf1e70e546381bff8c7f50fe97b9cdcb5b
915
py
Python
run_pd.py
nutorbit/PID
2c6fdc87408519f481e7b87c36b0a2cee605c01e
[ "MIT" ]
1
2020-06-20T17:33:51.000Z
2020-06-20T17:33:51.000Z
run_pd.py
nutorbit/PID
2c6fdc87408519f481e7b87c36b0a2cee605c01e
[ "MIT" ]
null
null
null
run_pd.py
nutorbit/PID
2c6fdc87408519f481e7b87c36b0a2cee605c01e
[ "MIT" ]
null
null
null
import click import numpy as np import matplotlib.pyplot as plt from agent import Robot @click.command() @click.option('--n', default=100) @click.option('--speed', default=1) @click.argument('tau_p') @click.argument('tau_d') def main(n, speed, tau_p, tau_d): robot = Robot() robot.set(0, 1, 0) x_trajecto...
24.078947
68
0.622951
108271d0247738b98d728f8dfc53bb0f87b9bf88
128
py
Python
flair/trainers/__init__.py
mlej8/MultilangStructureKD
735a5a3835f63146cd83132c979fa58a9be2dace
[ "MIT" ]
62
2020-04-28T05:05:10.000Z
2022-03-17T18:26:45.000Z
flair/trainers/__init__.py
mlej8/MultilangStructureKD
735a5a3835f63146cd83132c979fa58a9be2dace
[ "MIT" ]
10
2020-12-21T21:52:09.000Z
2021-08-06T13:11:56.000Z
flair/trainers/__init__.py
mlej8/MultilangStructureKD
735a5a3835f63146cd83132c979fa58a9be2dace
[ "MIT" ]
7
2020-07-09T12:42:00.000Z
2021-04-28T09:17:38.000Z
from .trainer import ModelTrainer from .distillation_trainer import ModelDistiller from .finetune_trainer import ModelFinetuner
32
48
0.882813
317e212197cf398f0be84acafaffa0b2f9989213
5,452
py
Python
kornia/color/gray.py
YanivHollander/kornia
ccd258d0956da89b1feca96448eff8e4969d405a
[ "ECL-2.0", "Apache-2.0" ]
131
2019-01-16T18:33:10.000Z
2019-05-23T02:09:18.000Z
kornia/color/gray.py
YanivHollander/kornia
ccd258d0956da89b1feca96448eff8e4969d405a
[ "ECL-2.0", "Apache-2.0" ]
94
2019-01-17T22:10:45.000Z
2019-05-22T23:47:58.000Z
kornia/color/gray.py
YanivHollander/kornia
ccd258d0956da89b1feca96448eff8e4969d405a
[ "ECL-2.0", "Apache-2.0" ]
18
2019-02-01T07:10:13.000Z
2019-05-21T14:52:03.000Z
from typing import Optional import torch from kornia.color.rgb import bgr_to_rgb from kornia.core import Module, Tensor, concatenate from kornia.testing import KORNIA_CHECK_IS_TENSOR def grayscale_to_rgb(image: Tensor) -> Tensor: r"""Convert a grayscale image to RGB version of image. .. image:: _static/img...
30.977273
101
0.613353
e6993b456f09b096129a7b812f4a2d467a21ecb9
5,336
py
Python
pyroute2/netlink/rtnl/tcmsg/sched_htb.py
li-ma/pyroute2
48b85e39d675c18c05eb209229db082316aa760a
[ "Apache-2.0" ]
null
null
null
pyroute2/netlink/rtnl/tcmsg/sched_htb.py
li-ma/pyroute2
48b85e39d675c18c05eb209229db082316aa760a
[ "Apache-2.0" ]
null
null
null
pyroute2/netlink/rtnl/tcmsg/sched_htb.py
li-ma/pyroute2
48b85e39d675c18c05eb209229db082316aa760a
[ "Apache-2.0" ]
null
null
null
''' htb +++ TODO: list parameters An example with htb qdisc, lets assume eth0 == 2:: # u32 --> +--> htb 1:10 --> sfq 10:0 # | | # | | # eth0 -- htb 1:0 -- htb 1:1 # | | # | | # u32 --> +--> htb...
31.204678
69
0.447714
0969df96ef202d2825a5c1aa7d58db66b12bed02
1,089
py
Python
setup.py
fishjojo/pycosmosac
9984a0ca2c9093142de60112f4c9a7fe33865946
[ "MIT" ]
3
2020-07-28T02:07:57.000Z
2021-02-26T06:25:39.000Z
setup.py
fishjojo/pycosmosac
9984a0ca2c9093142de60112f4c9a7fe33865946
[ "MIT" ]
null
null
null
setup.py
fishjojo/pycosmosac
9984a0ca2c9093142de60112f4c9a7fe33865946
[ "MIT" ]
null
null
null
#!/usr/bin/env python from setuptools import setup, find_packages CLASSIFIERS=[ 'Development Status :: 4 - Beta', 'Environment :: Console', 'Environment :: Web Environment', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT', 'Operating System :: MacOS :: MacOS X', 'O...
33
74
0.612489
88544738de83806779ae5294bc12d620c4539b2c
96
py
Python
venv/lib/python3.8/site-packages/idna/core.py
Retraces/UkraineBot
3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/idna/core.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/idna/core.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/44/52/24/63e1e1159683a011058c6c3219dfef588d38b8e0108e7cee78c5aac0e5
96
96
0.895833
e843b702b93245647772cd30034d113ee38e59ab
19,103
py
Python
synapse/storage/__init__.py
LouisMT/synapse
1241156c82644d5609f45659607a356af5d8fe08
[ "Apache-2.0" ]
null
null
null
synapse/storage/__init__.py
LouisMT/synapse
1241156c82644d5609f45659607a356af5d8fe08
[ "Apache-2.0" ]
null
null
null
synapse/storage/__init__.py
LouisMT/synapse
1241156c82644d5609f45659607a356af5d8fe08
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # Copyright 2018 New Vector Ltd # # 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...
37.752964
88
0.589489
bde3a1dffd0a91c419bcc58e717db6262f40b499
2,965
py
Python
pynger/mask/manipulation.py
DottD/pynger
9a24b43a2170234e5059a54ed20329e036260b0a
[ "MIT" ]
1
2021-11-10T16:37:28.000Z
2021-11-10T16:37:28.000Z
pynger/mask/manipulation.py
DottD/pynger
9a24b43a2170234e5059a54ed20329e036260b0a
[ "MIT" ]
null
null
null
pynger/mask/manipulation.py
DottD/pynger
9a24b43a2170234e5059a54ed20329e036260b0a
[ "MIT" ]
null
null
null
import numpy as np from scipy.ndimage import gaussian_filter from scipy.ndimage.morphology import distance_transform_edt from scipy.ndimage.measurements import label, center_of_mass from pynger.types import Mask def distance_erosion(mask: Mask, threshold: float) -> Mask: """ Erodes the mask, based on the distance...
34.476744
161
0.690388
0bb8fd4457229daa66e68cc7ee156e85824dcc80
120
py
Python
networkx/algorithms/tree/__init__.py
FrancescoBonacina/networkx
a73a610e0bbd6e13b183b15ca47b221df5f8e26a
[ "BSD-3-Clause" ]
445
2019-01-26T13:50:26.000Z
2022-03-18T05:17:38.000Z
networkx/algorithms/tree/__init__.py
FrancescoBonacina/networkx
a73a610e0bbd6e13b183b15ca47b221df5f8e26a
[ "BSD-3-Clause" ]
242
2019-01-29T15:48:27.000Z
2022-03-31T22:09:21.000Z
networkx/algorithms/tree/__init__.py
FrancescoBonacina/networkx
a73a610e0bbd6e13b183b15ca47b221df5f8e26a
[ "BSD-3-Clause" ]
136
2018-01-09T22:52:06.000Z
2022-02-24T13:26:18.000Z
from .branchings import * from .coding import * from .mst import * from .recognition import * from .operations import *
20
26
0.75
3eafc02ac9ab012bfd7b4a1aa8c4545a57b904ca
12,119
py
Python
ief_core/models/base_dummy.py
clinicalml/ief
97bcaad85ec820fbe062a86c6c500a308904f029
[ "MIT" ]
1
2022-01-31T12:56:01.000Z
2022-01-31T12:56:01.000Z
ief_core/models/base_dummy.py
clinicalml/ief
97bcaad85ec820fbe062a86c6c500a308904f029
[ "MIT" ]
null
null
null
ief_core/models/base_dummy.py
clinicalml/ief
97bcaad85ec820fbe062a86c6c500a308904f029
[ "MIT" ]
1
2022-02-01T03:10:16.000Z
2022-02-01T03:10:16.000Z
import torch, os import torch.nn as nn import numpy as np import logging import pytorch_lightning as pl import sys from lifelines.utils import concordance_index from sklearn.metrics import r2_score from pytorch_lightning.metrics.functional import f1_score, precision_recall, auroc #from pytorch_lightning.metrics.sklear...
50.286307
143
0.574387
24d4131e3d8fa581491069f8a39067fadc7baa21
502
py
Python
kolibri/core/webpack/test/test_webpack_tags.py
rrobinson-SIUMEDICINE/kolibri
4a33ac3ca4435dc524a9aba86eae1d3334930d1a
[ "MIT" ]
null
null
null
kolibri/core/webpack/test/test_webpack_tags.py
rrobinson-SIUMEDICINE/kolibri
4a33ac3ca4435dc524a9aba86eae1d3334930d1a
[ "MIT" ]
null
null
null
kolibri/core/webpack/test/test_webpack_tags.py
rrobinson-SIUMEDICINE/kolibri
4a33ac3ca4435dc524a9aba86eae1d3334930d1a
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from django.test.testcases import TestCase from .base import TestHook class KolibriTagNavigationTestCase(TestCase): def setUp(self): super(KolibriTagNavigationTestCase, self).setUp() ...
26.421053
82
0.752988
7212bf8b23a880c808f9f4beece00c2fe75ad991
766
py
Python
recipes/Python/578832_Create_simple_PDF_text_calendars/recipe-578832.py
tdiprima/code
61a74f5f93da087d27c70b2efe779ac6bd2a3b4f
[ "MIT" ]
2,023
2017-07-29T09:34:46.000Z
2022-03-24T08:00:45.000Z
recipes/Python/578832_Create_simple_PDF_text_calendars/recipe-578832.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
32
2017-09-02T17:20:08.000Z
2022-02-11T17:49:37.000Z
recipes/Python/578832_Create_simple_PDF_text_calendars/recipe-578832.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
780
2017-07-28T19:23:28.000Z
2022-03-25T20:39:41.000Z
""" CalendarToPDF.py Author: Vasudev Ram - www.dancingbison.com Copyright 2014 Vasudev Ram This is a demo program to generate PDF calendars. """ import sys import traceback from debug1 import debug1 import calendar from PDFWriter import PDFWriter try: cal = calendar.TextCalendar(calendar.SUNDAY) cal_str = cal...
25.533333
61
0.694517
4bc929546ab43cb7a5aca450a0c9d1f984b7b1a0
527
py
Python
app/chatterbot_api/get_response.py
G1NTOKI0522/WeChatterBot
1a5377713fd3d6c7a6bca1c20e8fdcf70e8215f5
[ "BSD-3-Clause" ]
null
null
null
app/chatterbot_api/get_response.py
G1NTOKI0522/WeChatterBot
1a5377713fd3d6c7a6bca1c20e8fdcf70e8215f5
[ "BSD-3-Clause" ]
null
null
null
app/chatterbot_api/get_response.py
G1NTOKI0522/WeChatterBot
1a5377713fd3d6c7a6bca1c20e8fdcf70e8215f5
[ "BSD-3-Clause" ]
null
null
null
from flask import Blueprint from app.chatterbot_api import chatterbot from app.chatterbot_api.chatterbot import languages from app.chatterbot_api.chatterbot.trainers import ChatterBotCorpusTrainer bp_response = Blueprint('/chatterbot', __name__) """ chatbot = chatterbot.ChatBot('chatbot',tagger_language=languages.CHI) ...
32.9375
74
0.808349
5fe00b409b6c9a40518f448da9268b3a4052fed1
2,873
py
Python
.script/get-msftpubliip-servicetags.py
Microsoft/mstic
356255c0aafcf06aaedff844627547f3ce4bd8c7
[ "CC-BY-4.0", "MIT" ]
null
null
null
.script/get-msftpubliip-servicetags.py
Microsoft/mstic
356255c0aafcf06aaedff844627547f3ce4bd8c7
[ "CC-BY-4.0", "MIT" ]
null
null
null
.script/get-msftpubliip-servicetags.py
Microsoft/mstic
356255c0aafcf06aaedff844627547f3ce4bd8c7
[ "CC-BY-4.0", "MIT" ]
null
null
null
import requests import json import logging import sys import json import pandas as pd from pathlib import Path from requests_html import HTMLSession def parse_and_download_files(servicetags_public, msftpublic_ips, officeworldwide_ips): # URL for Feeds azurepublic = "https://www.microsoft.com/en-us/download/co...
33.8
125
0.683954
046ce72b0a2577325f85362a96bda7da14804847
3,557
py
Python
tests/make_test_certs.py
max619/GameNetworkingSockets
7d3ea9db0faf0ed49cf07ed6a69d39054099ee10
[ "BSD-3-Clause" ]
6,199
2018-03-23T21:17:00.000Z
2022-03-30T22:16:50.000Z
tests/make_test_certs.py
max619/GameNetworkingSockets
7d3ea9db0faf0ed49cf07ed6a69d39054099ee10
[ "BSD-3-Clause" ]
187
2018-03-27T23:28:44.000Z
2022-03-22T17:47:03.000Z
tests/make_test_certs.py
max619/GameNetworkingSockets
7d3ea9db0faf0ed49cf07ed6a69d39054099ee10
[ "BSD-3-Clause" ]
492
2018-03-27T13:38:16.000Z
2022-03-26T03:51:10.000Z
import re import json import subprocess def run_cert_tool( args ): args = [ "../../../bin/win64/steamnetworkingsockets_certtool.exe", "--output-json" ] + args #print ' '.join( args ) stdout = subprocess.check_output( args ) return json.loads( stdout ) def create_keypair(): return run_cert_tool( [ ...
45.602564
419
0.687939
5e9ae48cf3387a2679861476705a8f33d4ab8dd2
426
py
Python
call_mvtjson2oscimv4.py
schedul-xor/nextzen2oscimv4
17902ba52ded4fbebf7249c66414e63e47b75fb7
[ "BSD-2-Clause" ]
null
null
null
call_mvtjson2oscimv4.py
schedul-xor/nextzen2oscimv4
17902ba52ded4fbebf7249c66414e63e47b75fb7
[ "BSD-2-Clause" ]
null
null
null
call_mvtjson2oscimv4.py
schedul-xor/nextzen2oscimv4
17902ba52ded4fbebf7249c66414e63e47b75fb7
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- import os import sys import mvtjson2oscimv4 # In this directory tile_z = int(sys.argv[1]) tile_x = int(sys.argv[2]) tile_y = int(sys.argv[3]) oscimv4_buffer_pixels = int(sys.argv[4]) out_vtm_path = sys.argv[5] oscimv4_binary = mvtjson2oscimv4.convert(tile_z,tile_x,tile_y,...
23.666667
101
0.739437
7069bfd698de8d365edfd1b728859fe132c1e206
376
py
Python
experiment_django3/users/urls.py
elcolie/experiment-django3
6ad8fa9ca56ed90f104edda279b5f7c1c872b533
[ "MIT" ]
null
null
null
experiment_django3/users/urls.py
elcolie/experiment-django3
6ad8fa9ca56ed90f104edda279b5f7c1c872b533
[ "MIT" ]
8
2021-03-19T02:52:26.000Z
2022-01-13T02:40:36.000Z
experiment_django3/users/urls.py
elcolie/experiment-django3
6ad8fa9ca56ed90f104edda279b5f7c1c872b533
[ "MIT" ]
null
null
null
from django.urls import path from experiment_django3.users.views import ( user_detail_view, user_redirect_view, user_update_view, ) app_name = "users" urlpatterns = [ path("~redirect/", view=user_redirect_view, name="redirect"), path("~update/", view=user_update_view, name="update"), path("<st...
25.066667
66
0.710106
61432ef456745429c2c8b3b4e01da4f7973a55a2
4,838
py
Python
inapp_file_lib/record.py
rjanoop/file_access_lib
2a1d192af0ea58357b9db293c959022bf990710e
[ "MIT" ]
null
null
null
inapp_file_lib/record.py
rjanoop/file_access_lib
2a1d192af0ea58357b9db293c959022bf990710e
[ "MIT" ]
null
null
null
inapp_file_lib/record.py
rjanoop/file_access_lib
2a1d192af0ea58357b9db293c959022bf990710e
[ "MIT" ]
null
null
null
class Record: vdict = dict() count = 0 record = dict() reclen = 0 fd = None # The constructor opens the Record Defenition File and sets # the record defenition def __init__(self, recName, fileName, mode="r", encoding="Latin-1"): defstr = self.recordDef(recName) self.vdic...
30.049689
72
0.532865
4d2aac3dd7c171cafb0f16fd2d277e0444c4c2b3
3,915
py
Python
netbox/dcim/tables/racks.py
teixemf/netbox
57759aa4a3dec8f5bc098f28e9cde0cb3c28699c
[ "Apache-2.0" ]
null
null
null
netbox/dcim/tables/racks.py
teixemf/netbox
57759aa4a3dec8f5bc098f28e9cde0cb3c28699c
[ "Apache-2.0" ]
null
null
null
netbox/dcim/tables/racks.py
teixemf/netbox
57759aa4a3dec8f5bc098f28e9cde0cb3c28699c
[ "Apache-2.0" ]
null
null
null
import django_tables2 as tables from django_tables2.utils import Accessor from dcim.models import Rack, RackReservation, RackRole from tenancy.tables import TenantColumn from utilities.tables import ( BaseTable, ButtonsColumn, ChoiceFieldColumn, ColorColumn, ColoredLabelColumn, LinkedCountColumn, MarkdownColumn, ...
27.570423
119
0.608174
f3ed71061c4df99724389a78ba1d9e72105720df
2,940
py
Python
tools/check_documentation.py
riddopic/cloud-foundation-fabric
4a7c1bcb0138475788bdbcddf05aa4a5b46807de
[ "Apache-2.0" ]
null
null
null
tools/check_documentation.py
riddopic/cloud-foundation-fabric
4a7c1bcb0138475788bdbcddf05aa4a5b46807de
[ "Apache-2.0" ]
null
null
null
tools/check_documentation.py
riddopic/cloud-foundation-fabric
4a7c1bcb0138475788bdbcddf05aa4a5b46807de
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
31.612903
78
0.670408
29e7834fb6575daf4edcfc2f7266c27639cb993c
13,896
py
Python
fairseq/options.py
linkerr/fairseq-local
29153e279f659cb27732622b52026d0d7d5de817
[ "BSD-3-Clause" ]
1
2019-01-31T23:47:49.000Z
2019-01-31T23:47:49.000Z
fairseq/options.py
linkerr/fairseq-local
29153e279f659cb27732622b52026d0d7d5de817
[ "BSD-3-Clause" ]
null
null
null
fairseq/options.py
linkerr/fairseq-local
29153e279f659cb27732622b52026d0d7d5de817
[ "BSD-3-Clause" ]
1
2020-03-26T17:51:27.000Z
2020-03-26T17:51:27.000Z
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import argparse import torch fro...
52.044944
104
0.626007
3a12e79f53c02e4ca43223ec553bd7c776f80e70
3,096
py
Python
api/anomaly/services/datasets.py
Slach/CueObserve
4c10cd804d6ca31a21d14d65670fa4c6b9a5d011
[ "Apache-2.0" ]
null
null
null
api/anomaly/services/datasets.py
Slach/CueObserve
4c10cd804d6ca31a21d14d65670fa4c6b9a5d011
[ "Apache-2.0" ]
null
null
null
api/anomaly/services/datasets.py
Slach/CueObserve
4c10cd804d6ca31a21d14d65670fa4c6b9a5d011
[ "Apache-2.0" ]
null
null
null
import json from utils.apiResponse import ApiResponse from anomaly.models import Dataset from anomaly.serializers import DatasetsSerializer, DatasetSerializer class Datasets: """ Provides services related to dataset """ @staticmethod def getDatasets(): """ Gets all datasets ...
30.058252
69
0.606266
59d3e8185522a45f1f6721b4c3eedde0abbd949f
563
py
Python
Chapter4/4_1_2.py
TreezzZ/Introduction_to_Algorithms
049818689c8b2b4732f718ada4f044d0d563c7ca
[ "Apache-2.0" ]
null
null
null
Chapter4/4_1_2.py
TreezzZ/Introduction_to_Algorithms
049818689c8b2b4732f718ada4f044d0d563c7ca
[ "Apache-2.0" ]
null
null
null
Chapter4/4_1_2.py
TreezzZ/Introduction_to_Algorithms
049818689c8b2b4732f718ada4f044d0d563c7ca
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- """ 练习4.1-2 编写暴力求解最大子数组问题 """ def bruce_max_subarray_sum(arr): """暴力求解最大子数组和 Args: arr(list): 数组 Returns: max_sum(int): 最大子数组和 """ max_sum = 0 for i in range(len(arr)): epoch_sum = 0 for j in range(i, len(arr)): epoch_sum += a...
20.107143
77
0.51865
372dd4b9e96525aa66265242c0000831b1db8cac
1,674
py
Python
Main.py
dixantmittal/vanilla-rrt-and-variants
3affcef78491a2a54dd6129470bb17b2ce016c3f
[ "Apache-2.0" ]
10
2019-06-04T17:10:56.000Z
2022-03-21T02:41:35.000Z
Main.py
etarakci-hvl/fast-rrt-star
3affcef78491a2a54dd6129470bb17b2ce016c3f
[ "Apache-2.0" ]
null
null
null
Main.py
etarakci-hvl/fast-rrt-star
3affcef78491a2a54dd6129470bb17b2ce016c3f
[ "Apache-2.0" ]
5
2020-04-07T02:11:33.000Z
2022-03-04T07:48:05.000Z
from fast_rrt_star import * from rrg import * from rrt import * from datetime import datetime from random_data_generator import * import time from plotter import * space_region = ((0, 0), (100, 100)) obstacle = get_random_obstacles(10, space_region) start = get_random_initial_state(space_region, obstacle) target = ge...
39.857143
102
0.551971
a8d3862d388552664bf402822cb7c6e7f2a7b0b3
1,050
py
Python
catlib.py
Bjwebb/detecting-clouds
d2abd1e91243bad6ab76d62a7aa98a710cdc026b
[ "MIT" ]
1
2017-11-09T06:58:47.000Z
2017-11-09T06:58:47.000Z
catlib.py
Bjwebb/detecting-clouds
d2abd1e91243bad6ab76d62a7aa98a710cdc026b
[ "MIT" ]
null
null
null
catlib.py
Bjwebb/detecting-clouds
d2abd1e91243bad6ab76d62a7aa98a710cdc026b
[ "MIT" ]
null
null
null
import pandas def parse_cat(file_name): try: df = pandas.read_csv(file_name, delim_whitespace=True, comment='#', header=None, skiprows=11) except ZeroDivisionError: # This is thrown if there are no lines in the file return None # Exclude object larger than 10 pixels df = df[ (d...
30.882353
101
0.473333
0bc570b246f2be17a7cc438d5d93fd7905694090
1,274
py
Python
Resnet152/utils/config.py
creatist/XueLangTianchi
7deaf2936045f9f2d44035ec35bd9039f054b2cf
[ "MIT" ]
1
2018-08-13T01:17:51.000Z
2018-08-13T01:17:51.000Z
Resnet152/utils/config.py
creatist/XueLangTianchi
7deaf2936045f9f2d44035ec35bd9039f054b2cf
[ "MIT" ]
null
null
null
Resnet152/utils/config.py
creatist/XueLangTianchi
7deaf2936045f9f2d44035ec35bd9039f054b2cf
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- # power by Mr.Li # 设置默认参数 class DefaultConfig(): env = 'Resnet152_XueLang_' # visdom 环境的名字 # 使用的模型,名字必须与models/__init__.py中的名字一致 # 目前支持的网络 # model = 'VGG16_bo' #vgg16不如vgg19好 # model = 'VGG19_bo' # model = 'ResNet18_bo' model = 'ResNet152_bo' #数据集地址 dat...
26
101
0.696232
82f7b5604cf2ec763c059cddce6d056271b40b57
419
py
Python
baseline/utils/chunk.py
yufuinn/baseline
9226e5704b18da1661b1d46a688885e48eba3952
[ "MIT" ]
null
null
null
baseline/utils/chunk.py
yufuinn/baseline
9226e5704b18da1661b1d46a688885e48eba3952
[ "MIT" ]
null
null
null
baseline/utils/chunk.py
yufuinn/baseline
9226e5704b18da1661b1d46a688885e48eba3952
[ "MIT" ]
null
null
null
from typing import TypeVar, Iterable, Generator, List ValueType = TypeVar("ValueType") def chunking(iterable: Iterable[ValueType], chunk_size:int) -> Generator[List[ValueType], None, None]: assert chunk_size > 0 chunk = list() for val in iterable: chunk.append(val) if len(chunk) == chunk_si...
27.933333
102
0.630072
ec757f5088c0d49e4167a0df2cc14ff1e6e9b0a8
4,152
py
Python
venv/Lib/site-packages/two1/bitserv/django/decorator.py
RafaelHMachado/Cioffis_Automation
07965ca71c3d4e78f5cee1fce4ba0bbfe2db9811
[ "MIT" ]
415
2016-06-10T00:46:55.000Z
2021-10-16T00:56:06.000Z
venv/Lib/site-packages/two1/bitserv/django/decorator.py
RafaelHMachado/Cioffis_Automation
07965ca71c3d4e78f5cee1fce4ba0bbfe2db9811
[ "MIT" ]
25
2016-06-11T13:48:59.000Z
2021-01-05T11:19:30.000Z
venv/Lib/site-packages/two1/bitserv/django/decorator.py
RafaelHMachado/Cioffis_Automation
07965ca71c3d4e78f5cee1fce4ba0bbfe2db9811
[ "MIT" ]
109
2016-06-11T05:17:05.000Z
2021-12-22T11:02:22.000Z
"""Django bitserv payment library for selling 402 API endpoints.""" import os from functools import wraps from rest_framework import status from rest_framework.response import Response from rest_framework.exceptions import ParseError import two1.bitserv as bitserv class PaymentRequiredResponse(Response): """Paym...
41.939394
106
0.610067
128e57fcb1f5cfb7d6fdef2678306152c8cd1917
1,130
py
Python
src/pyosphere_main.py
Micutio/Pyosphere
06dff20796f14c428094619e65d468374a1d4bf8
[ "MIT" ]
null
null
null
src/pyosphere_main.py
Micutio/Pyosphere
06dff20796f14c428094619e65d468374a1d4bf8
[ "MIT" ]
null
null
null
src/pyosphere_main.py
Micutio/Pyosphere
06dff20796f14c428094619e65d468374a1d4bf8
[ "MIT" ]
null
null
null
""" Main module of the Flow and Pressure Demo. Uses the Complex Automaton Base. """ from cab.cab_system import ComplexAutomaton from pyo_core.ca.cells import PyoHexCell, TerrainGenerator from pyo_core.abm.agents import GaiaAgent from pyo_core.global_constants import GC from pyo_core.util.input_handling import InputHa...
28.25
109
0.737168
1700229083882403b1c6d212d8cf4aedb99616d7
3,424
py
Python
huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/query_tag_item.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/query_tag_item.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/query_tag_item.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2022-01-17T02:24:18.000Z
2022-01-17T02:24:18.000Z
# coding: utf-8 import pprint import re import six class QueryTagItem: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is js...
25.176471
93
0.544685
9e90858e203546dd2b36f7aecfe6eaf5c3cbfc53
3,545
py
Python
lhc/io/fasta/wrapper.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
lhc/io/fasta/wrapper.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
lhc/io/fasta/wrapper.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
from lhc.binf.genomic_coordinate import GenomicInterval class FastaWrapper: __slots__ = ('_fileobj', '_wrap', '_chunk_size', '_chunk', '_header', '_position', '_chunk_position') def __init__(self, fileobj, wrap=200, chunk_size=2 ** 16): self._fileobj = fileobj self._wrap = wrap self....
41.22093
105
0.565585
10b5ec6d7947534e3cc46fdc49efdd6dce24fd60
2,826
py
Python
angr/exploration_techniques/manual_mergepoint.py
macdaliot/angr
bda03546af86e072aa7c92f6e3e520d0f5418590
[ "BSD-2-Clause" ]
2
2018-12-03T23:14:56.000Z
2018-12-03T23:15:57.000Z
angr/exploration_techniques/manual_mergepoint.py
macdaliot/angr
bda03546af86e072aa7c92f6e3e520d0f5418590
[ "BSD-2-Clause" ]
null
null
null
angr/exploration_techniques/manual_mergepoint.py
macdaliot/angr
bda03546af86e072aa7c92f6e3e520d0f5418590
[ "BSD-2-Clause" ]
null
null
null
import logging from . import ExplorationTechnique l = logging.getLogger('angr.exploration_techniques.manual_mergepoint') class ManualMergepoint(ExplorationTechnique): def __init__(self, address, wait_counter=10): super(ManualMergepoint, self).__init__() self.address = address self.wait_co...
37.68
101
0.626681
23d0bfc693c364f7f9bc7e77b0b55a62bdc22a03
96
py
Python
output/models/ms_data/attribute/att_o009_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/attribute/att_o009_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/attribute/att_o009_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.ms_data.attribute.att_o009_xsd.att_o009 import Doc __all__ = [ "Doc", ]
16
69
0.739583
037ff01227f55eb3f3eaee0a5e09de46e22e8cf8
12,772
py
Python
tw2/dynforms/widgets.py
atbinf/tw2.dynforms
7e912a1eaa4e7413934347efb8e26171d6a1ef9f
[ "MIT" ]
null
null
null
tw2/dynforms/widgets.py
atbinf/tw2.dynforms
7e912a1eaa4e7413934347efb8e26171d6a1ef9f
[ "MIT" ]
1
2020-10-15T11:13:22.000Z
2020-10-15T11:13:22.000Z
tw2/dynforms/widgets.py
atbinf/tw2.dynforms
7e912a1eaa4e7413934347efb8e26171d6a1ef9f
[ "MIT" ]
null
null
null
import datetime as dt import tw2.core as twc import tw2.forms as twf #-- # Growing #-- class DeleteButton(twf.ImageButton): """A button to delete a row in a growing grid. This is created automatically and would not usually be used directly.""" attrs = { 'onclick': 'twd_grow_del(this); ret...
45.942446
283
0.614313
669f102aa8d0bda2d14fc2681036803de54ea187
753
py
Python
Codechef/36274524.py
MayThirtyOne/DS-Algo
12d2d02612fc59c877dcc05f42add5a7f5c88337
[ "MIT" ]
null
null
null
Codechef/36274524.py
MayThirtyOne/DS-Algo
12d2d02612fc59c877dcc05f42add5a7f5c88337
[ "MIT" ]
null
null
null
Codechef/36274524.py
MayThirtyOne/DS-Algo
12d2d02612fc59c877dcc05f42add5a7f5c88337
[ "MIT" ]
null
null
null
import string def solve(): s=list(str(input())) p=str(input()) di=dict(zip(string.ascii_letters,[ord(c)%32 for c in string.ascii_letters])) for letter in p: s.remove(letter) s.sort() prefix1="" suffix1="" prefix2="" suffix2="" for letter in s: if di[letter]<=di[p...
22.818182
80
0.567065
275a2a7792ed9a141691a98f274ac8772c591bc8
387
py
Python
flask/flaskr-tdd/models.py
dineshkumar2509/learning-python
e8af11ff0b396da4c3f2cfe21d14131bae4b2adb
[ "MIT" ]
86
2015-06-13T16:53:55.000Z
2022-03-24T20:56:42.000Z
flask/flaskr-tdd/models.py
pei-zheng-yi/learning-python
55e350dfe44cf04f7d4408e76e72d2f467bd42ce
[ "MIT" ]
9
2015-05-27T07:52:44.000Z
2022-03-29T21:52:40.000Z
flask/flaskr-tdd/models.py
pei-zheng-yi/learning-python
55e350dfe44cf04f7d4408e76e72d2f467bd42ce
[ "MIT" ]
124
2015-12-10T01:17:18.000Z
2021-11-08T04:03:38.000Z
from app import db class Flaskr(db.Model): __tablename__ = "flaskr" post_id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String, nullable=False) text = db.Column(db.String, nullable=False) def __init__(self, title, text): self.title = title self.text = text ...
22.764706
53
0.640827
98da018f0201150d24297686bb967e5e760a587f
221
py
Python
Python/lastElement.py
sattwik21/Hacktoberfest2021-1
74c8edd54f9c967c0f301f74dec31526dffa8222
[ "MIT" ]
215
2021-10-01T08:18:16.000Z
2022-03-29T04:12:03.000Z
Python/lastElement.py
sattwik21/Hacktoberfest2021-1
74c8edd54f9c967c0f301f74dec31526dffa8222
[ "MIT" ]
51
2021-10-01T08:16:42.000Z
2021-10-31T13:51:51.000Z
Python/lastElement.py
sattwik21/Hacktoberfest2021-1
74c8edd54f9c967c0f301f74dec31526dffa8222
[ "MIT" ]
807
2021-10-01T08:11:45.000Z
2021-11-21T18:57:09.000Z
my_list = ['banana', 'apple', 'orange', 'pineapple'] #Using brute force method last_element = my_list[len(my_list) - 1] #Using negative indeces last_element = my_list[-1] #Using pop method last_element = my_list.pop()
20.090909
52
0.723982
3329ce667422bde5a76f26bbf0af0f58532145dc
4,144
py
Python
src/calc/serial/calc_mass.py
paytonrodman/athena-analysis
f635338122e15c318dfd754d06cc3dbaa42273d2
[ "BSD-3-Clause" ]
null
null
null
src/calc/serial/calc_mass.py
paytonrodman/athena-analysis
f635338122e15c318dfd754d06cc3dbaa42273d2
[ "BSD-3-Clause" ]
null
null
null
src/calc/serial/calc_mass.py
paytonrodman/athena-analysis
f635338122e15c318dfd754d06cc3dbaa42273d2
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # # Calculate mass flux crossing inner boundary # # Usage: python calc_mass.py [problem_id] [-u] # import numpy as np import os import sys sys.path.insert(0, '/Users/paytonrodman/athena-sim/athena-analysis/dependencies') #sys.path.insert(0, '/home/per29/rds/rds-accretion-zyNhkonJSR8/athena-analysis/de...
36.034783
148
0.594353
4f7b717a7c5551236eb10bd5270be6e693bb6733
919
py
Python
setup.py
vgrabovets/multi_rake
dd526437c381e8e78b828fa73013170f95990199
[ "MIT" ]
213
2018-06-28T18:10:59.000Z
2022-03-24T23:15:57.000Z
setup.py
vgrabovets/multilang_rake
dd526437c381e8e78b828fa73013170f95990199
[ "MIT" ]
27
2018-10-31T04:36:19.000Z
2022-01-12T04:14:42.000Z
setup.py
vgrabovets/multilang_rake
dd526437c381e8e78b828fa73013170f95990199
[ "MIT" ]
33
2018-09-20T08:37:03.000Z
2022-03-24T23:16:00.000Z
from pathlib import Path from setuptools import find_packages, setup requirements = Path(__file__).parent / 'requirements/core.txt' with requirements.open(mode='rt', encoding='utf-8') as fp: install_requires = [line.strip() for line in fp] readme = Path(__file__).parent / 'README.rst' with readme.open(mode='rt...
30.633333
92
0.708379
00fcf592eb3e543d070802938227699fbd268ee3
1,931
py
Python
pyscf/nao/test/test_0075_water_vna_ena_enl.py
mfkasim1/pyscf
7be5e015b2b40181755c71d888449db936604660
[ "Apache-2.0" ]
3
2021-02-28T00:52:53.000Z
2021-03-01T06:23:33.000Z
pyscf/nao/test/test_0075_water_vna_ena_enl.py
mfkasim1/pyscf
7be5e015b2b40181755c71d888449db936604660
[ "Apache-2.0" ]
36
2018-08-22T19:44:03.000Z
2020-05-09T10:02:36.000Z
pyscf/nao/test/test_0075_water_vna_ena_enl.py
mfkasim1/pyscf
7be5e015b2b40181755c71d888449db936604660
[ "Apache-2.0" ]
4
2018-02-14T16:28:28.000Z
2019-08-12T16:40:30.000Z
# Copyright 2014-2018 The PySCF Developers. 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 appl...
34.482143
74
0.667012
9ebc61c18b9f02d53c6e72d1bf18732bacdea959
9,269
py
Python
lib/model/config.py
simonmeister/old-motion-rcnn
1f62d5e0fa5111b8ad68cea90ad23c9e8e151bd1
[ "MIT" ]
1
2020-01-21T21:05:50.000Z
2020-01-21T21:05:50.000Z
lib/model/config.py
simonmeister/old-motion-rcnn
1f62d5e0fa5111b8ad68cea90ad23c9e8e151bd1
[ "MIT" ]
null
null
null
lib/model/config.py
simonmeister/old-motion-rcnn
1f62d5e0fa5111b8ad68cea90ad23c9e8e151bd1
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import os.path as osp import yaml import numpy as np # `pip install easydict` if you don't have it from easydict import EasyDict as edict __C = edict() # Consumers can get config by: # from model.c...
32.409091
91
0.705254
dd3995a630f094db20e4f8b68e8550673f40166f
1,639
py
Python
ImageNet/moco-v3/moco/optimizer.py
chingyaoc/RINCE
c7f8534260722c92c7ae3e5e677970a94d5522e4
[ "MIT" ]
32
2022-01-13T02:11:19.000Z
2022-03-15T06:30:39.000Z
ImageNet/moco-v3/moco/optimizer.py
chingyaoc/RINCE
c7f8534260722c92c7ae3e5e677970a94d5522e4
[ "MIT" ]
2
2022-01-19T11:40:17.000Z
2022-02-22T02:23:37.000Z
ImageNet/moco-v3/moco/optimizer.py
chingyaoc/RINCE
c7f8534260722c92c7ae3e5e677970a94d5522e4
[ "MIT" ]
3
2022-01-16T12:36:03.000Z
2022-01-18T13:16:26.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch class LARS(torch.optim.Optimizer): """ LARS optimizer, no rate scaling or weight decay for parameters...
37.25
113
0.526541
a61049f459154eaf4ebb0247ad018c313c47cfcf
3,285
py
Python
weixin.py
dark10crk001/alita3.0
70db1bf27e703cfe25f049b1644c0932ce78176b
[ "Unlicense" ]
null
null
null
weixin.py
dark10crk001/alita3.0
70db1bf27e703cfe25f049b1644c0932ce78176b
[ "Unlicense" ]
null
null
null
weixin.py
dark10crk001/alita3.0
70db1bf27e703cfe25f049b1644c0932ce78176b
[ "Unlicense" ]
null
null
null
#coding=utf-8 from wxpy import * import os,uuid,shutil from alita import Alita ai = Alita() bot = Bot(cache_path=True) bot.enable_puid() group = [] group.append(bot.groups().search('中软融通分公司业务群')[0]) group.append(bot.groups().search('自驾游协会')[0]) group.append(bot.groups().search('李桥高中96届妇女联合会')[0]) group.append(bot.gr...
28.815789
128
0.534551
bfa39c9c2395b58b8a5066a1fc6988d2f9dcf835
147
py
Python
CryptoPrice/forms.py
neelarya19/CryptoPrice
e1985529e1c5117072c095780ed08225511d4aac
[ "MIT" ]
1
2022-01-03T11:44:32.000Z
2022-01-03T11:44:32.000Z
CryptoPrice/forms.py
neelarya19/CryptoPrice
e1985529e1c5117072c095780ed08225511d4aac
[ "MIT" ]
null
null
null
CryptoPrice/forms.py
neelarya19/CryptoPrice
e1985529e1c5117072c095780ed08225511d4aac
[ "MIT" ]
null
null
null
from django import forms Crypto_choice=[ ('1','Bitcoin'), ] class CryptoForm(forms.Form): crypto=forms.ChoiceField(choices=Crypto_choice)
18.375
51
0.734694
1958728d02686385e1bc44b18d836911e5775928
1,183
py
Python
Tools/SeeDot/seedot/compiler/converter/converter.py
krantikiran/EdgeML
e5c7bd7c56884ca61f6d54cedb0074553cfdc896
[ "MIT" ]
1
2020-03-26T17:19:54.000Z
2020-03-26T17:19:54.000Z
Tools/SeeDot/seedot/compiler/converter/converter.py
krantikiran/EdgeML
e5c7bd7c56884ca61f6d54cedb0074553cfdc896
[ "MIT" ]
2
2020-03-26T02:59:12.000Z
2020-04-23T19:09:00.000Z
Tools/SeeDot/seedot/compiler/converter/converter.py
krantikiran/EdgeML
e5c7bd7c56884ca61f6d54cedb0074553cfdc896
[ "MIT" ]
3
2020-03-25T18:45:39.000Z
2020-12-17T19:09:54.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. import os from seedot.compiler.converter.quantizer import * from seedot.compiler.converter.util import * import seedot.config as config # Main file which sets the configurations and creates the corresponding object class...
27.511628
88
0.685545
07479beebb0f81509c4ca946d369003794b8bf25
21,652
py
Python
venv/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.py
haind27/test01
7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852
[ "MIT" ]
37
2017-08-15T15:02:43.000Z
2021-07-23T03:44:31.000Z
venv/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.py
haind27/test01
7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852
[ "MIT" ]
12
2018-01-10T05:25:25.000Z
2021-11-28T06:55:48.000Z
venv/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.py
haind27/test01
7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852
[ "MIT" ]
49
2017-08-15T09:52:13.000Z
2022-03-21T17:11:54.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
31.516739
112
0.63172
36365bf8ff930b9aabb183d063888b15f2e68037
8,275
py
Python
tests/unit/lib/telemetry/test_metrics.py
danielsaibt/aws-sam-cli
67edf91b49c54bd494683684e2ce78b64bb203be
[ "Apache-2.0" ]
1
2019-08-14T18:41:56.000Z
2019-08-14T18:41:56.000Z
tests/unit/lib/telemetry/test_metrics.py
53ningen/aws-sam-cli
67edf91b49c54bd494683684e2ce78b64bb203be
[ "Apache-2.0" ]
30
2019-12-03T08:16:25.000Z
2021-06-25T15:29:06.000Z
tests/unit/lib/telemetry/test_metrics.py
danielsaibt/aws-sam-cli
67edf91b49c54bd494683684e2ce78b64bb203be
[ "Apache-2.0" ]
null
null
null
import platform import time from unittest import TestCase from mock import patch, Mock, ANY, call from samcli.lib.telemetry.metrics import send_installed_metric, track_command from samcli.commands.exceptions import UserException class TestSendInstalledMetric(TestCase): def setUp(self): self.gc_mock = M...
35.212766
115
0.65571
b5bd2c263806a63159e37ebcad926df975e08b63
957
py
Python
tweet_temp.py
eggplant60/temp_bot
fc3b524e649b4a1898b094a5a04076d8e144f7ab
[ "MIT" ]
null
null
null
tweet_temp.py
eggplant60/temp_bot
fc3b524e649b4a1898b094a5a04076d8e144f7ab
[ "MIT" ]
null
null
null
tweet_temp.py
eggplant60/temp_bot
fc3b524e649b4a1898b094a5a04076d8e144f7ab
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import tweepy from datetime import datetime import am2320 import time ### Import the bot's information ### consumer_key, consumer_secret, access_token, access_token_secret from password_bot import * def now_str(): return datetime.now().strftime(' (%Y/%m/%d %H:%M)') if...
21.75
68
0.619645
7f3f2c25cef0bbb386dbf47db081b7c5fd77204b
357
py
Python
17. Chapter_/tcp_client.py
Mikma03/Python_Bill_Lubanovic_BookCodes
8b5b228bb500a08af645a1db6f7c5f33ef5f0512
[ "MIT" ]
null
null
null
17. Chapter_/tcp_client.py
Mikma03/Python_Bill_Lubanovic_BookCodes
8b5b228bb500a08af645a1db6f7c5f33ef5f0512
[ "MIT" ]
null
null
null
17. Chapter_/tcp_client.py
Mikma03/Python_Bill_Lubanovic_BookCodes
8b5b228bb500a08af645a1db6f7c5f33ef5f0512
[ "MIT" ]
null
null
null
import socket from datetime import datetime address = ('localhost', 6789) max_size = 1000 print('Czas uruchomienia klienta:', datetime.now()) client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client.connect(address) client.sendall(b'Witaj, serwerze!') data = client.recv(max_size) print('Dane odebrane', datet...
25.5
58
0.753501
13f6476e338e90063a121dccad4743a58d90a3b9
1,056
py
Python
stop_words_finder.py
rainyleaf/Lexical-Diversity
8b01e9ab2661e0485e9079a7927f31701065c001
[ "MIT" ]
null
null
null
stop_words_finder.py
rainyleaf/Lexical-Diversity
8b01e9ab2661e0485e9079a7927f31701065c001
[ "MIT" ]
null
null
null
stop_words_finder.py
rainyleaf/Lexical-Diversity
8b01e9ab2661e0485e9079a7927f31701065c001
[ "MIT" ]
null
null
null
import os import sys import re target = 'tagged' pathstump = "/Users/Torri/Documents/Grad stuff/Thesis stuff/Data - Novels/Analysis/" d = {} for dirname, dirs, files in os.walk('.'): if target in dirname: #author = re.findall("..(.*?)\\\\tagged", dirname)[0] author = dirname.split(o...
35.2
85
0.485795
c5d145b7078da48253e8fb8096bd54b1adee073d
175
py
Python
backend/server/apps/accounts/urls.py
fikryans/django-react-boilerplate
1095c2fcabbe23cee1a640d913d6b171feff8aa1
[ "MIT" ]
null
null
null
backend/server/apps/accounts/urls.py
fikryans/django-react-boilerplate
1095c2fcabbe23cee1a640d913d6b171feff8aa1
[ "MIT" ]
null
null
null
backend/server/apps/accounts/urls.py
fikryans/django-react-boilerplate
1095c2fcabbe23cee1a640d913d6b171feff8aa1
[ "MIT" ]
null
null
null
from django.conf.urls import url, include accounts_urlpatterns = [ url(r'^api/v1/', include('djoser.urls')), url(r'^api/v1/', include('djoser.urls.authtoken')), ]
25
58
0.657143
3b2e070627c33cdbd26e8150cc2c4509d7c624b7
1,273
py
Python
open standards and solutions files/Service_inventory.py
AdiMakkar/Digital-Standards-Alignment-Tracker-main
7c9d8142c86c1e3135626e9c6b98408b6a897bcb
[ "MIT" ]
2
2022-01-11T15:14:49.000Z
2022-01-27T15:48:30.000Z
open standards and solutions files/Service_inventory.py
AdiMakkar/Digital-Standards-Alignment-Tracker-main
7c9d8142c86c1e3135626e9c6b98408b6a897bcb
[ "MIT" ]
17
2021-09-21T13:58:30.000Z
2022-02-28T21:27:24.000Z
open standards and solutions files/Service_inventory.py
AdiMakkar/Digital-Standards-Alignment-Tracker-main
7c9d8142c86c1e3135626e9c6b98408b6a897bcb
[ "MIT" ]
null
null
null
#Service_Inventory code to automate the process of counting the value to be found import pandas as pd #CSV file name (csv file should be saved on the desktop and the name can be changed) my_df = pd.read_csv("test.csv", encoding = "latin-1") #The columns and rows looking to consider in my_df. my_df = my_df.loc[my_d...
50.92
222
0.751767
13d39ce0decb510a671c4c1f28c195a6136b8b7b
3,979
py
Python
circuitpython_at24c32/__init__.py
domdfcoding/CircuitPython_AT24C32
11b90554af960d803557bd6fc533f09e3b71cf7e
[ "MIT" ]
null
null
null
circuitpython_at24c32/__init__.py
domdfcoding/CircuitPython_AT24C32
11b90554af960d803557bd6fc533f09e3b71cf7e
[ "MIT" ]
null
null
null
circuitpython_at24c32/__init__.py
domdfcoding/CircuitPython_AT24C32
11b90554af960d803557bd6fc533f09e3b71cf7e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # __init__.py """ CircuitPython library to support AT24C39 EEPROM ICs. Implementation Notes -------------------- **Software and Dependencies:** * Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice **Notes:** #. Datasheet: https://ww1.microchip.c...
28.421429
92
0.699925
cc9873892d057583e471c74c50c5fce60b484874
14,069
py
Python
p14_all_TC_traces.py
ngglasgow/clamp_ephys
60f1f490837939a0afcf9cf5bdd123fb51546269
[ "MIT" ]
null
null
null
p14_all_TC_traces.py
ngglasgow/clamp_ephys
60f1f490837939a0afcf9cf5bdd123fb51546269
[ "MIT" ]
null
null
null
p14_all_TC_traces.py
ngglasgow/clamp_ephys
60f1f490837939a0afcf9cf5bdd123fb51546269
[ "MIT" ]
null
null
null
import clamp_ephys import os import pandas as pd import matplotlib.pyplot as plt '''####################### SET THE PROPER PATH YOU WANT ########################### ''' paths = clamp_ephys.workflows.file_structure('local', 'Injected_GC_data/VC_pairs') tables = paths.tables figures = paths.figures save_path = os.path....
38.230978
115
0.685692
0bdd062f643c7993f89e8fcfc899b6d57b8376bc
6,972
py
Python
datasets/benchmark/datasets2/cifar10.py
zengshiwen/valen
5e997d1767236bbfdf60a4ac872148aa95ddbca2
[ "MulanPSL-1.0" ]
5
2021-11-12T05:31:45.000Z
2022-03-01T08:51:49.000Z
datasets/benchmark/datasets2/cifar10.py
zengshiwen/valen
5e997d1767236bbfdf60a4ac872148aa95ddbca2
[ "MulanPSL-1.0" ]
null
null
null
datasets/benchmark/datasets2/cifar10.py
zengshiwen/valen
5e997d1767236bbfdf60a4ac872148aa95ddbca2
[ "MulanPSL-1.0" ]
3
2021-11-12T05:31:47.000Z
2022-01-24T05:50:32.000Z
from PIL import Image import os import os.path import sys import torch import numpy as np import pickle import torch.utils.data as data from copy import deepcopy from utils.utils_algo import binarize_class, partialize, check_integrity, download_url class cifar10(data.Dataset): """`CIFAR10 <https://www.cs.toronto....
39.84
191
0.604848
ba12d1beb20973d6ae5728c563477e2ccc8c2589
806
py
Python
learn1/30.py
raghavi101/HackerRank
48bf812f1b3c60b5201a95458be76ae9b7323a88
[ "MIT" ]
null
null
null
learn1/30.py
raghavi101/HackerRank
48bf812f1b3c60b5201a95458be76ae9b7323a88
[ "MIT" ]
null
null
null
learn1/30.py
raghavi101/HackerRank
48bf812f1b3c60b5201a95458be76ae9b7323a88
[ "MIT" ]
null
null
null
def countApplesAndOranges(s, t, a, b, apples, oranges): '''app, ora = 0, 0 for i in apples: if i>=0: if (s-a)<=i and (t-a)>=i: app+=1 for i in oranges: if i<=0: if (b-t)<=-1*i and (b-s)>=-1*i: ora+=1 print(app) print(ora)''' ...
20.15
55
0.468983
81cf6ba11b197f3a05aa9091832381494842c28b
3,366
py
Python
mimic.py
Tywill2020/mimic
1ae772ab26d1154ef5f66f244e3480f77367f8b7
[ "MIT" ]
null
null
null
mimic.py
Tywill2020/mimic
1ae772ab26d1154ef5f66f244e3480f77367f8b7
[ "MIT" ]
null
null
null
mimic.py
Tywill2020/mimic
1ae772ab26d1154ef5f66f244e3480f77367f8b7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 """ Mimic exercise Read in the file specified on the command line. Do a simple split() on whitespace to obtain all the words in the file. Rather tha...
28.769231
75
0.585264
d2a498f633aa13d3c8f172578c4b59ae16b6c1da
2,233
py
Python
tests/functional/test_api.py
pior/appsecrets
dd60147d23f5d4fa575cdbb683c28e62bc58c6f5
[ "MIT" ]
1
2018-04-15T01:15:25.000Z
2018-04-15T01:15:25.000Z
tests/functional/test_api.py
pior/appsecrets
dd60147d23f5d4fa575cdbb683c28e62bc58c6f5
[ "MIT" ]
14
2018-03-29T17:20:40.000Z
2021-02-02T21:51:49.000Z
tests/functional/test_api.py
pior/appsecrets
dd60147d23f5d4fa575cdbb683c28e62bc58c6f5
[ "MIT" ]
null
null
null
import pytest import appsecrets import appsecrets.exc @pytest.fixture(autouse=True) def setup(secretsdir): secretsdir.join('_dummy_key_id').write('DUMMYKEY') def test_empty_dir_store(tmpdir): with pytest.raises(appsecrets.exc.Error) as exc: appsecrets.Secrets(str(tmpdir)) assert 'Missing key fi...
29.381579
97
0.714734
65e899605bdc896abcde7f24f4224a7ed44a5eda
1,932
py
Python
package/spack-r-deldir/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
1
2018-07-17T07:45:09.000Z
2018-07-17T07:45:09.000Z
package/spack-r-deldir/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
package/spack-r-deldir/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
46
78
0.694099
1b68acff9e6b71afe1048a50a99240ccfda0355d
146
py
Python
starter_code/api_keys.py
Brandie-Limon/pythonAPI-challenge
8b7901aea869da3c497d669f005bb9b291f7739b
[ "ADSL" ]
null
null
null
starter_code/api_keys.py
Brandie-Limon/pythonAPI-challenge
8b7901aea869da3c497d669f005bb9b291f7739b
[ "ADSL" ]
null
null
null
starter_code/api_keys.py
Brandie-Limon/pythonAPI-challenge
8b7901aea869da3c497d669f005bb9b291f7739b
[ "ADSL" ]
null
null
null
# OpenWeatherMap API Key weather_api_key = "94a27c72f85dd6b2e5e3a5efb86c7f18" # Google API Key g_key = "AIzaSyBnXxQ6Ht7mcQ0K4n5nqa8WIgak-a4nln4"
24.333333
52
0.835616
9454112dce473134cc80aad0e2f93fb880fe335b
16,558
py
Python
mishris/indonesian_tax/doctype/employee_tax_income/test_employee_tax_income.py
virazura/mishris
60762364347bfa50ffc9948e9d227c569fe68da5
[ "MIT" ]
null
null
null
mishris/indonesian_tax/doctype/employee_tax_income/test_employee_tax_income.py
virazura/mishris
60762364347bfa50ffc9948e9d227c569fe68da5
[ "MIT" ]
null
null
null
mishris/indonesian_tax/doctype/employee_tax_income/test_employee_tax_income.py
virazura/mishris
60762364347bfa50ffc9948e9d227c569fe68da5
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- # Copyright (c) 2019, MIS and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest import os import json import calendar import erpnext from frappe.utils.make_random import get_random from erpnext.accounts.utils import get_fiscal_year from frappe.u...
42.132316
142
0.603515
25219aae945a3df6a7d2416435f6374a1eb1fd9a
4,678
py
Python
utils/set_tf_config_berzelius.py
filtho/GenoCAE
44cff98e3ae8a9ec46b7a5eb96a9cdfd0c2f0327
[ "BSD-3-Clause" ]
null
null
null
utils/set_tf_config_berzelius.py
filtho/GenoCAE
44cff98e3ae8a9ec46b7a5eb96a9cdfd0c2f0327
[ "BSD-3-Clause" ]
null
null
null
utils/set_tf_config_berzelius.py
filtho/GenoCAE
44cff98e3ae8a9ec46b7a5eb96a9cdfd0c2f0327
[ "BSD-3-Clause" ]
null
null
null
import os import json """ This functions sets the necessary values in the TF_CONFIG environment variable. It contains information on the cluster architectures, i.e, which workers are allocated for the job, and the worker for the current task. This has been specifically been developed for using the SLURM ...
43.719626
139
0.599188
d9c0fe3f3d51e6d84149d0e12a0ff617aee3cce0
627
py
Python
leetcode/1175 Prime Arrangements.py
jaredliw/python-question-bank
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
1
2021-04-08T07:49:15.000Z
2021-04-08T07:49:15.000Z
leetcode/1175 Prime Arrangements.py
jaredliw/leetcode-solutions
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
null
null
null
leetcode/1175 Prime Arrangements.py
jaredliw/leetcode-solutions
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
1
2022-01-23T02:12:24.000Z
2022-01-23T02:12:24.000Z
from functools import reduce # Remove this line in python 2 from math import factorial class Solution(object): def numPrimeArrangements(self, n): """ :type n: int :rtype: int """ # Runtime: 20 ms # Memory: 13.7 MB primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 2...
28.5
113
0.500797
251fc16d25a334087bf63ea4f94efe4352403a00
59,314
py
Python
system/forms.py
timb-machine-mirrors/pcf
d697a531da8c4206a6d874e689312a359446f8da
[ "MIT" ]
null
null
null
system/forms.py
timb-machine-mirrors/pcf
d697a531da8c4206a6d874e689312a359446f8da
[ "MIT" ]
null
null
null
system/forms.py
timb-machine-mirrors/pcf
d697a531da8c4206a6d874e689312a359446f8da
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField, IntegerField, \ FieldList, DateField, validators, ValidationError, FloatField, FileField, \ MultipleFileField, SelectMultipleField from flask_wtf.file import FileRequired from wtforms.validators import DataRequired, Ema...
48.262002
121
0.466349
0a79e79db42d44199745bace6e57c86445cf34fe
4,298
py
Python
psana/psana/detector/ts.py
ZLLentz/lcls2
3edbea556779f619944ee9b97fb33cd815a19a37
[ "BSD-3-Clause-LBNL" ]
null
null
null
psana/psana/detector/ts.py
ZLLentz/lcls2
3edbea556779f619944ee9b97fb33cd815a19a37
[ "BSD-3-Clause-LBNL" ]
null
null
null
psana/psana/detector/ts.py
ZLLentz/lcls2
3edbea556779f619944ee9b97fb33cd815a19a37
[ "BSD-3-Clause-LBNL" ]
null
null
null
#import bitstruct import numpy as np import typing import amitypes from collections import namedtuple from psana.detector.detector_impl import DetectorImpl def _to_word(data,shift=0,mask=0): rdata = data[::-1] w = 0 for b in data[::-1]: w = w<<8 w |= b w >>= shift if mask: w...
33.84252
76
0.560261
6a28cd55857e399b37c93d5f5cad26f20bdaeb7a
12,403
py
Python
antlir/btrfs_diff/extent.py
facebookincubator/fs_image
3515a24bb0e93176a5584bdc8839464fa28390d7
[ "MIT" ]
9
2019-12-02T20:17:35.000Z
2020-06-13T16:34:25.000Z
antlir/btrfs_diff/extent.py
facebookincubator/fs_image
3515a24bb0e93176a5584bdc8839464fa28390d7
[ "MIT" ]
19
2019-11-22T23:30:04.000Z
2020-07-16T18:05:48.000Z
antlir/btrfs_diff/extent.py
facebookincubator/fs_image
3515a24bb0e93176a5584bdc8839464fa28390d7
[ "MIT" ]
4
2019-12-04T19:03:28.000Z
2020-06-13T16:34:29.000Z
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import enum import itertools from typing import Iterable, List, NamedTuple, Optional, Tuple, Union class Action(enu...
38.759375
80
0.606627