hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
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
4
247
max_forks_repo_name
stringlengths
4
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
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
e05ed200a2a8a3f55fc59bea4c0cb97b0a233945
15,065
py
Python
notepad.py
SukruGokk/python-notepad
8f9f1c7bfdfa27a05190534f8256d1690d55f900
[ "Apache-2.0" ]
1
2020-07-01T11:05:20.000Z
2020-07-01T11:05:20.000Z
notepad.py
SukruGokk/python-notepad
8f9f1c7bfdfa27a05190534f8256d1690d55f900
[ "Apache-2.0" ]
null
null
null
notepad.py
SukruGokk/python-notepad
8f9f1c7bfdfa27a05190534f8256d1690d55f900
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ###################### # TRKE NOT DEFTER # ###################### # @author : kr Erdem Gk # @date : 28/06/2020 # @os : Windows 10 # @version : Python 3.8 # @description: Kodlar dnda yorumlar ve uygulaman grnen ksmn tamamen trke yaptm. Umarm iinize yarar. # GK DEFTER # Ktphaneler # PyQt5 from...
39.028497
124
0.667707
# -*- coding: utf-8 -*- ###################### # TÜRKÇE NOT DEFTERİ # ###################### # @author : Şükrü Erdem Gök # @date : 28/06/2020 # @os : Windows 10 # @version : Python 3.8 # @description: Kodlar dışında yorumları ve uygulamanı görünen kısmını tamamen türkçe yaptım. Umarım işinize yarar. # GÖK DEFTER # K...
620
0
0
13,721
0
0
0
207
132
96d4c0a3bbeb30f1666a465e23b74a59a5b9a9bb
2,804
py
Python
src/features/previous_application_loans.py
elfaizamine/loan_default_prediction
c76632b0757e9f23d347e00bcd755d26800a54be
[ "MIT" ]
null
null
null
src/features/previous_application_loans.py
elfaizamine/loan_default_prediction
c76632b0757e9f23d347e00bcd755d26800a54be
[ "MIT" ]
null
null
null
src/features/previous_application_loans.py
elfaizamine/loan_default_prediction
c76632b0757e9f23d347e00bcd755d26800a54be
[ "MIT" ]
null
null
null
def sum_one_hot_columns_on_rows(df, col_to_aggregate): """ aggregate past loans information (category columns) in one row :param df: previous loans application dataframe :param col_to_aggregate: columns to be aggregated :return dataframe aggregated columns plus SK_ID_CURR """ df = one_h...
31.505618
98
0.702568
from src.utils.utils import * import src.config.Consts as cs def sum_one_hot_columns_on_rows(df, col_to_aggregate): """ aggregate past loans information (category columns) in one row :param df: previous loans application dataframe :param col_to_aggregate: columns to be aggregated :return datafr...
0
0
0
0
0
0
0
17
44
b8d2083b80a7501af9306c08a47d71c5031164e8
271
py
Python
哥伦布(STM32F407)/1.基础实验/12.EEPROM/main.py
01studio-lab/MicroPython_Examples
f06a1bee398674ceafebed2aac88d8413cc8abad
[ "MIT" ]
73
2020-05-02T13:48:27.000Z
2022-03-26T13:15:10.000Z
哥伦布(STM32F407)/1.基础实验/12.EEPROM/main.py
01studio-lab/MicroPython_Examples
f06a1bee398674ceafebed2aac88d8413cc8abad
[ "MIT" ]
null
null
null
哥伦布(STM32F407)/1.基础实验/12.EEPROM/main.py
01studio-lab/MicroPython_Examples
f06a1bee398674ceafebed2aac88d8413cc8abad
[ "MIT" ]
50
2020-05-15T13:57:28.000Z
2022-03-30T14:03:33.000Z
''' EEPROMAT24C02 v1.0 2020.12 01Studio EEPROM ''' from at24c02 import AT24C02 import time EE = AT24C02(i2c_num=1) #B8,B9I2C1 EE.write(1,8) #18 time.sleep_ms(5) # print(EE.read(1)) #1
15.055556
43
0.726937
''' 实验名称:EEPROM(AT24C02) 版本:v1.0 日期:2020.12 作者:01Studio 说明:EEPROM的读写实验 ''' from at24c02 import AT24C02 import time EE = AT24C02(i2c_num=1) #哥伦布的B8,B9为I2C1 EE.write(1,8) #往地址1写入数字8(用户可以更改自己写的数字) time.sleep_ms(5) #需要适当延时再读取 print(EE.read(1)) #读取地址1数据,等于前面写入的数字
225
0
0
0
0
0
0
0
0
6aabaa357f6fc3fce94d6b8382f28bdea5017684
21,729
py
Python
neutron/agent/l3/dvr_fip_ns.py
congnt95/neutron
6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1
[ "Apache-2.0" ]
1,080
2015-01-04T08:35:00.000Z
2022-03-27T09:15:52.000Z
neutron/agent/l3/dvr_fip_ns.py
congnt95/neutron
6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1
[ "Apache-2.0" ]
24
2015-02-21T01:48:28.000Z
2021-11-26T02:38:56.000Z
neutron/agent/l3/dvr_fip_ns.py
congnt95/neutron
6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1
[ "Apache-2.0" ]
1,241
2015-01-02T10:47:10.000Z
2022-03-27T09:42:23.000Z
# Copyright (c) 2015 OpenStack 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 ...
45.745263
79
0.6096
# Copyright (c) 2015 OpenStack 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 ...
0
1,480
0
18,537
0
0
0
279
356
dfb662e7ea084a66d1d7b1485d7da04ee1ec3015
5,348
py
Python
netease_im/components/team.py
jsli/NIM_SDK_Python
e2ed059a2ab6acbba09c6692deb1e4767f505982
[ "MIT" ]
7
2018-05-21T03:36:43.000Z
2020-03-25T08:10:46.000Z
netease_im/components/team.py
jsli/NIM_SDK_Python
e2ed059a2ab6acbba09c6692deb1e4767f505982
[ "MIT" ]
1
2019-01-29T09:20:39.000Z
2019-03-30T09:55:45.000Z
netease_im/components/team.py
jsli/NIM_SDK_Python
e2ed059a2ab6acbba09c6692deb1e4767f505982
[ "MIT" ]
2
2018-10-09T02:56:50.000Z
2019-03-29T08:27:31.000Z
# -*- coding: utf-8 -*- """NIM REST API Python Client -- Team component""" from __future__ import absolute_import __author__ = "Manson Li" __email__ = "manson.li3307@gmail.com"
32.216867
100
0.580965
# -*- coding: utf-8 -*- """NIM REST API Python Client -- Team component""" from __future__ import absolute_import import json from netease_im import util from netease_im.components import base from netease_im.util import is_str_type __author__ = "Manson Li" __email__ = "manson.li3307@gmail.com" class TeamCompone...
408
0
0
4,887
0
0
0
31
113
9b057a4f374c0826ddd97db09a2b3a5c666d068c
4,527
py
Python
View/Task/LinkedBrowsing.py
parente/clique
e0a36e592d194a822f0078781d08a2d1aa63c9e4
[ "BSD-3-Clause" ]
3
2015-05-02T10:00:50.000Z
2018-10-26T02:42:13.000Z
View/Task/LinkedBrowsing.py
parente/clique
e0a36e592d194a822f0078781d08a2d1aa63c9e4
[ "BSD-3-Clause" ]
null
null
null
View/Task/LinkedBrowsing.py
parente/clique
e0a36e592d194a822f0078781d08a2d1aa63c9e4
[ "BSD-3-Clause" ]
1
2018-10-26T02:42:14.000Z
2018-10-26T02:42:14.000Z
''' Defines classes for the pattern of browsing a number of dyanmic views. @author: Peter Parente <parente@cs.unc.edu> @copyright: Copyright (c) 2008 Peter Parente @license: BSD License All rights reserved. This program and the accompanying materials are made available under the terms of The BSD License which accompa...
33.043796
81
0.682792
''' Defines classes for the pattern of browsing a number of dyanmic views. @author: Peter Parente <parente@cs.unc.edu> @copyright: Copyright (c) 2008 Peter Parente @license: BSD License All rights reserved. This program and the accompanying materials are made available under the terms of The BSD License which accompa...
0
0
0
4,045
0
0
0
14
46
01903e287d0bd96d907635d63c34e6715718b51f
785
py
Python
kata/07/dominator.py
vyahello/upgrade-python-kata
15de7b094f3aaef69a845887f0df5e0958c29ed4
[ "MIT" ]
null
null
null
kata/07/dominator.py
vyahello/upgrade-python-kata
15de7b094f3aaef69a845887f0df5e0958c29ed4
[ "MIT" ]
4
2021-01-25T16:58:39.000Z
2022-03-12T13:46:37.000Z
kata/07/dominator.py
vyahello/upgrade-python-kata
15de7b094f3aaef69a845887f0df5e0958c29ed4
[ "MIT" ]
null
null
null
""" A zero-indexed array arr consisting of n integers is given. The dominator of array arr is the value that occurs in more than half of the elements of arr. For example, consider array arr such that arr = [3,4,3,2,3,1,3,3] The dominator of arr is 3 because it occurs in 5 out of 8 elements of arr and 5 is more than a ...
28.035714
105
0.633121
""" A zero-indexed array arr consisting of n integers is given. The dominator of array arr is the value that occurs in more than half of the elements of arr. For example, consider array arr such that arr = [3,4,3,2,3,1,3,3] The dominator of arr is 3 because it occurs in 5 out of 8 elements of arr and 5 is more than a ...
0
0
0
0
0
0
0
0
0
04ddf723c77e5e13afa75ce73ec94a59fc369de8
2,315
py
Python
rawa/models.py
hackerspace-silesia/rawa
ba0a32c342185407292cc084c2bd1f4c1d5f220a
[ "MIT" ]
4
2019-12-07T18:34:52.000Z
2020-01-11T15:32:52.000Z
rawa/models.py
hackerspace-silesia/rawa
ba0a32c342185407292cc084c2bd1f4c1d5f220a
[ "MIT" ]
4
2021-06-08T20:41:45.000Z
2022-03-12T00:07:55.000Z
rawa/models.py
hackerspace-silesia/rawa
ba0a32c342185407292cc084c2bd1f4c1d5f220a
[ "MIT" ]
1
2019-12-07T20:24:38.000Z
2019-12-07T20:24:38.000Z
from flask_sqlalchemy import SQLAlchemy from sqlalchemy.sql.schema import MetaData db = SQLAlchemy( metadata=MetaData( naming_convention={ "ix": 'ix_%(column_0_label)s', "uq": "uq_%(table_name)s_%(column_0_name)s", "ck": "ck_%(table_name)s_%(column_0_name)s", ...
30.866667
83
0.685961
from flask_sqlalchemy import SQLAlchemy from sqlalchemy.ext.declarative import declared_attr from sqlalchemy.orm import relationship from sqlalchemy.sql.schema import MetaData db = SQLAlchemy( metadata=MetaData( naming_convention={ "ix": 'ix_%(column_0_label)s', "uq": "uq_%(table_na...
0
57
0
1,551
0
0
0
49
205
d445f0e736d5c29229101c8be1d7ecab26e3c67e
764
py
Python
lib/logger.py
yorozultd/nobrand
ee308f87f7f5929df803ffef11b3b79eec6e763b
[ "MIT" ]
null
null
null
lib/logger.py
yorozultd/nobrand
ee308f87f7f5929df803ffef11b3b79eec6e763b
[ "MIT" ]
null
null
null
lib/logger.py
yorozultd/nobrand
ee308f87f7f5929df803ffef11b3b79eec6e763b
[ "MIT" ]
null
null
null
import time
28.296296
73
0.692408
import requests,sys,time import time,datetime class Logger: def __init__(self,application_name): ts = time.time() prefix = "./log/" tms = datetime.datetime.fromtimestamp(ts).strftime('%Y_%m_%d_%H_%M_%S') self.file_name = prefix+str(application_name)+"_log_"+str(tms) self.pointer = open(self.file_name,"w+"...
0
0
0
693
0
0
0
12
45
8f148f893dea9817a14e75b1cb53be28f0b376a0
18,564
py
Python
plugin.picture.sane-scanner/addon.py
Heckie75/kodi-addon-sane-scanner
a67b16146325cf9bce8d5c07ab6354959a8124bf
[ "MIT" ]
null
null
null
plugin.picture.sane-scanner/addon.py
Heckie75/kodi-addon-sane-scanner
a67b16146325cf9bce8d5c07ab6354959a8124bf
[ "MIT" ]
null
null
null
plugin.picture.sane-scanner/addon.py
Heckie75/kodi-addon-sane-scanner
a67b16146325cf9bce8d5c07ab6354959a8124bf
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys import urllib.parse import xbmcaddon import xbmcvfs __PLUGIN_ID__ = "plugin.picture.sane-scanner" _PLUGIN_NAME = "Kodi Sane Scanner" _TMP_FOLDER = "/tmp/" _IMG_FILE = "kodi-sane-scanner-img" _PDF_PREVIEW_FILE = "kodi-sane-scanner-pdf" _SCANNER_MODES = [ ["--m...
24.68617
103
0.49693
#!/usr/bin/python3 # -*- coding: utf-8 -*- import datetime import os import re import shutil import subprocess import sys import time import urllib.parse import xbmc import xbmcgui import xbmcplugin import xbmcaddon import xbmcvfs __PLUGIN_ID__ = "plugin.picture.sane-scanner" _PLUGIN_NAME = "Kodi Sane Scanner" _TMP...
0
0
0
19
0
16,168
0
-73
936
d207c9e59b96883918e294858849c73358860f28
852
py
Python
Bloglog/app/requests.py
NzauM/Github-API
69649068de1e397ac9f2566b212b5a723b99e944
[ "MIT" ]
null
null
null
Bloglog/app/requests.py
NzauM/Github-API
69649068de1e397ac9f2566b212b5a723b99e944
[ "MIT" ]
8
2021-03-09T22:14:42.000Z
2022-03-02T06:10:03.000Z
Bloglog/app/requests.py
NzauM/blog-log
69649068de1e397ac9f2566b212b5a723b99e944
[ "MIT" ]
null
null
null
get_quotes_url = 'http://quotes.stormconsultancy.co.uk/random.json'
16.705882
67
0.657277
import urllib.request,json from .models import Quote get_quotes_url = 'http://quotes.stormconsultancy.co.uk/random.json' def getquotes(): with urllib.request.urlopen(get_quotes_url) as url: get_quotes_data = url.read() get_quotes_resp = json.loads(get_quotes_data) quote_results = None ...
0
0
0
0
0
643
0
9
90
ffad50c0e72851c09ab2c741602dafb6d2e712e6
911
py
Python
test_scripts/ns_instance/duan/service/vfc/nfvo/lcm/lcm/ns/const.py
lremember/VFC
837559db1396091811382359100bfc60e1aab5b2
[ "MIT" ]
4
2018-08-29T02:51:38.000Z
2021-11-16T11:36:11.000Z
test_scripts/ns_instance/duan/service/vfc/nfvo/lcm/lcm/ns/const.py
lremember/VFC-Files
837559db1396091811382359100bfc60e1aab5b2
[ "MIT" ]
null
null
null
test_scripts/ns_instance/duan/service/vfc/nfvo/lcm/lcm/ns/const.py
lremember/VFC-Files
837559db1396091811382359100bfc60e1aab5b2
[ "MIT" ]
1
2019-05-12T08:21:19.000Z
2019-05-12T08:21:19.000Z
# Copyright 2016-2017 ZTE 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 t...
41.409091
74
0.771679
# Copyright 2016-2017 ZTE 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 t...
0
0
0
0
0
0
0
0
0
2e4461e9fc8fdaf4c31f784c3d8e483b389c1f9f
8,317
py
Python
tcutils/traffic_utils/ping_traffic.py
vkolli/contrail-test-perf
db04b8924a2c330baabe3059788b149d957a7d67
[ "Apache-2.0" ]
1
2017-06-13T04:42:34.000Z
2017-06-13T04:42:34.000Z
tcutils/traffic_utils/ping_traffic.py
vkolli/contrail-test-perf
db04b8924a2c330baabe3059788b149d957a7d67
[ "Apache-2.0" ]
null
null
null
tcutils/traffic_utils/ping_traffic.py
vkolli/contrail-test-perf
db04b8924a2c330baabe3059788b149d957a7d67
[ "Apache-2.0" ]
null
null
null
result_file = '/tmp/ping'
38.50463
99
0.564266
import re import string import logging from tcutils.util import get_random_name, retry, is_v6 result_file = '/tmp/ping' class Ping: ''' Helper to generate ping traffic Mandatory args: host : Dest IP sender_vm_fixture : Sender VMs fixture handle Supports ping with IPv4 and IPv6 ...
0
279
0
7,894
0
0
0
6
111
cabc8a4726226c8b82b7751986327c467fc71dc6
5,714
py
Python
python/origen/origen/web/origen_sphinx_extension/templating.py
Origen-SDK/o2
5b0f9a6d113ddebc73c7ee224931e8b2d0301794
[ "MIT" ]
null
null
null
python/origen/origen/web/origen_sphinx_extension/templating.py
Origen-SDK/o2
5b0f9a6d113ddebc73c7ee224931e8b2d0301794
[ "MIT" ]
127
2019-11-23T17:09:35.000Z
2021-09-02T11:06:20.000Z
python/origen/origen/web/origen_sphinx_extension/templating.py
Origen-SDK/o2
5b0f9a6d113ddebc73c7ee224931e8b2d0301794
[ "MIT" ]
null
null
null
import origen, pathlib from .. import origen_sphinx_extension as ose def insert_header(app, docname, source): ''' Insert content at the beginning of the docs. Currently inserts: * Any |shorthand| ``include`` RST files ''' ext = ose.sphinx_ext(app, 'origen.web.shorthand') doc = pathl...
39.136986
137
0.60133
import origen, subprocess, builtins, types, inspect, re, pathlib from .. import origen_sphinx_extension as ose def preprocess_src(app, docname, source): # Origen's compiler supports multiple templating engines as well as a different context # than Sphinx's Jinja engine. # The Jinja compiler will be run on...
0
1,149
0
0
0
3,215
0
42
137
ca1e1401ba5b03affbad982f7de4e708a5e292ac
2,326
py
Python
python/code_challenges/graph-depth-first/tests/test_graph_depth_first.py
AbdullahElian1/data-structures-and-algorithms
857faea9bcb56ef75b544ed485ad892e4ed74cf7
[ "MIT" ]
null
null
null
python/code_challenges/graph-depth-first/tests/test_graph_depth_first.py
AbdullahElian1/data-structures-and-algorithms
857faea9bcb56ef75b544ed485ad892e4ed74cf7
[ "MIT" ]
2
2021-08-15T13:51:41.000Z
2021-09-07T19:18:13.000Z
python/code_challenges/graph-depth-first/tests/test_graph_depth_first.py
AbdullahElian1/data-structures-and-algorithms
857faea9bcb56ef75b544ed485ad892e4ed74cf7
[ "MIT" ]
1
2021-09-05T18:33:59.000Z
2021-09-05T18:33:59.000Z
# Node can be successfully added to the graph # An edge can be successfully added to the graph # A collection of all nodes can be properly retrieved from the graph # All appropriate neighbors can be retrieved from the graph # Neighbors are returned with the weight between nodes included # The proper...
21.943396
76
0.703353
from graph_depth_first import __version__ import pytest def test_version(): assert __version__ == '0.1.0' from graph_depth_first.graph_depth import * @pytest.fixture def date(): ver=Vertex('a') ver2=Vertex('c') ver3=Vertex('d') ver4=Vertex('p') graph=Graph() graph.add_vertex(ver) ...
0
325
0
0
0
1,140
0
34
334
86f8f698335c00c5ec191f79d553e09b22414e2b
13,038
py
Python
PythonScripts/Lib/libDuplicateAlongACurve.py
Neill3d/MoPlugs
84efea03e045f820f3dc132c1a60a779fc5e34fc
[ "BSD-3-Clause" ]
23
2017-10-20T07:01:18.000Z
2022-02-25T08:46:07.000Z
PythonScripts/Lib/libDuplicateAlongACurve.py
droidoid/MoPlugs
fce52e6469408e32e94af8ac8a303840bc956e53
[ "BSD-3-Clause" ]
1
2019-11-08T04:03:38.000Z
2019-11-10T10:16:00.000Z
PythonScripts/Lib/libDuplicateAlongACurve.py
droidoid/MoPlugs
fce52e6469408e32e94af8ac8a303840bc956e53
[ "BSD-3-Clause" ]
5
2017-12-03T20:43:27.000Z
2020-01-22T16:54:13.000Z
############################################################## # # script uses local X axis to compute element Length and snapshot it along a curve # 21.02.2016 # Sergey Solohin (Neill3d) 2016 # e-mail to: s@neill3d.com # www.neill3d.com # # Github repo - https://github.com/Neill3d/MoPlugs # Licensed under BSD...
32.272277
139
0.546173
############################################################## # # script uses local X axis to compute element Length and snapshot it along a curve # 21.02.2016 # Sergey Solohin (Neill3d) 2016 # e-mail to: s@neill3d.com # www.neill3d.com # # Github repo - https://github.com/Neill3d/MoPlugs # Licensed under BSD...
0
3,745
0
8,648
0
0
0
-10
91
3d71c6221d5712af50d5ded07ee8fe8505612bac
4,209
py
Python
PAN03.py
zfng/Synth2021
80f854a38c8d9e2ad315d92d83f554e717b83140
[ "MIT" ]
null
null
null
PAN03.py
zfng/Synth2021
80f854a38c8d9e2ad315d92d83f554e717b83140
[ "MIT" ]
null
null
null
PAN03.py
zfng/Synth2021
80f854a38c8d9e2ad315d92d83f554e717b83140
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from FUNCS import FNS from LEGS import LegVar, LegFun from BMAP3D import MapVar, MapFun # --------------------------------------------------------------------------------------------------------------------- # Leg Module - pr...
36.284483
119
0.540508
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from FUNCS import FNS from LEGS import LegVar, LegFun from BMAP3D import MapVar, MapFun # --------------------------------------------------------------------------------------------------------------------- # Leg Module - pr...
0
0
0
0
0
2,334
0
0
27
b4fa1f153a1f39fc6ff70b1f33e0a3deba093dce
901
py
Python
2021/day21/part1.py
trongbq/adventofcode
7ab692a91304a00a7843460052238b98c6f44963
[ "MIT" ]
null
null
null
2021/day21/part1.py
trongbq/adventofcode
7ab692a91304a00a7843460052238b98c6f44963
[ "MIT" ]
null
null
null
2021/day21/part1.py
trongbq/adventofcode
7ab692a91304a00a7843460052238b98c6f44963
[ "MIT" ]
null
null
null
dice_state = 0 # https://adventofcode.com/2021/day/21 if __name__ == '__main__': res = solve(2, 5) print(res)
20.022222
149
0.584906
dice_state = 0 # https://adventofcode.com/2021/day/21 def solve(p1, p2): sc1, sc2 = 0, 0 roll = 0 turn = 1 while sc1 < 1000 and sc2 < 1000: if turn == 1: p1, d = move(p1) sc1 += p1 turn = 2 else: p2, d = move(p2) sc2 += p2 turn = 1 roll += 3 print(f"Player ...
0
0
0
0
0
689
0
0
91
7eb89475feb9090a048453009a38fa835e21dcc4
5,254
py
Python
Simon/penny/guesser.py
uncharted-distil/simon
26e4e54e6de455bde8ee1a24634d060e1ec7babb
[ "MIT" ]
null
null
null
Simon/penny/guesser.py
uncharted-distil/simon
26e4e54e6de455bde8ee1a24634d060e1ec7babb
[ "MIT" ]
2
2021-01-27T14:57:26.000Z
2021-10-07T19:34:09.000Z
Simon/penny/guesser.py
uncharted-distil/simon
26e4e54e6de455bde8ee1a24634d060e1ec7babb
[ "MIT" ]
1
2021-03-18T19:13:05.000Z
2021-03-18T19:13:05.000Z
''' from .value_checks import (is_a_date, is_a_number, is_a_nothing, is_a_latitude, is_a_longitude, is_a_coord_pair, is_a_country, is_a_city, is_a_state, is_a_address, is_a_text, is_a_label, is_a_zip, is_a_street, is_a_phone, is_a_url, is_a_email, is_a_time, is_a_currency, is_a_percent) ''' # currently u...
28.554348
82
0.627141
from collections import Counter from .utils import to_unicode ''' from .value_checks import (is_a_date, is_a_number, is_a_nothing, is_a_latitude, is_a_longitude, is_a_coord_pair, is_a_country, is_a_city, is_a_state, is_a_address, is_a_text, is_a_label, is_a_zip, is_a_street, is_a_phone, is_a_url, is_a_ema...
0
0
0
0
0
4,529
0
26
113
167caa472eff4c5160a21abaa6c6538ab4eb084f
244
py
Python
Tree_Traversal/01_csTreeTraversalCategories.py
med-cab1/CSPT15_BST_GP
b526bd03cc9ff256963b1b7f48e40697a4558b4c
[ "MIT" ]
null
null
null
Tree_Traversal/01_csTreeTraversalCategories.py
med-cab1/CSPT15_BST_GP
b526bd03cc9ff256963b1b7f48e40697a4558b4c
[ "MIT" ]
null
null
null
Tree_Traversal/01_csTreeTraversalCategories.py
med-cab1/CSPT15_BST_GP
b526bd03cc9ff256963b1b7f48e40697a4558b4c
[ "MIT" ]
38
2020-12-02T02:04:13.000Z
2021-02-11T03:48:57.000Z
""" What are the two primary categories for tree traversals? A - 1- Depth-First 2- Breadth-First B - 1- Height-First 2- Width-First C - 1- Level-First 2- Branch-First D - 1- Leaf-First 2- Branch-First answer is : """
10.166667
56
0.618852
""" What are the two primary categories for tree traversals? A - 1- Depth-First 2- Breadth-First B - 1- Height-First 2- Width-First C - 1- Level-First 2- Branch-First D - 1- Leaf-First 2- Branch-First answer is : """
0
0
0
0
0
0
0
0
0
84ccc37d6e154935b315a0ef917ab237b5b2c86e
468
py
Python
leetcode/contests/biweekly-contest-3/2-1100. Find K-Length Substrings With No Repeated Characters.py
palash24/algorithms-and-data-structures
164be7d1a501a21af808673888964bbab36243a1
[ "MIT" ]
23
2018-11-06T03:54:00.000Z
2022-03-14T13:30:40.000Z
leetcode/contests/biweekly-contest-3/2-1100. Find K-Length Substrings With No Repeated Characters.py
palash24/algorithms-and-data-structures
164be7d1a501a21af808673888964bbab36243a1
[ "MIT" ]
null
null
null
leetcode/contests/biweekly-contest-3/2-1100. Find K-Length Substrings With No Repeated Characters.py
palash24/algorithms-and-data-structures
164be7d1a501a21af808673888964bbab36243a1
[ "MIT" ]
5
2019-05-24T16:56:45.000Z
2022-03-10T17:29:10.000Z
# 1100. Find K-Length Substrings With No Repeated Characters print(Solution().numKLenSubstrNoRepeats("havefunonleetcode", 5))
33.428571
64
0.570513
# 1100. Find K-Length Substrings With No Repeated Characters import collections class Solution: def numKLenSubstrNoRepeats(self, S: str, K: int) -> int: if K > len(S): return 0 ans = 0 for i in range(len(S)-K+1): cnt = collections.Counter(S[i:i+K]) if all(v =...
0
0
0
289
0
0
0
-3
44
865f1998b8248e73167722084a218b89ab01c1ce
25,385
py
Python
sdk/python/pulumi_google_native/appengine/v1/get_version.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
44
2021-04-18T23:00:48.000Z
2022-02-14T17:43:15.000Z
sdk/python/pulumi_google_native/appengine/v1/get_version.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
354
2021-04-16T16:48:39.000Z
2022-03-31T17:16:39.000Z
sdk/python/pulumi_google_native/appengine/v1/get_version.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
8
2021-04-24T17:46:51.000Z
2022-01-05T10:40:21.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import pulumi import pulumi.runtime from typing import Optional from ... import _utilities __all__ = [ 'GetVersionResult', 'AwaitableGetVersion...
46.577982
766
0.68312
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
0
20,419
0
1,870
0
0
0
35
114
6bd4c7083e65c9f822b460dc08b16a677df05fcf
7,863
py
Python
app.py
schuyler/odm360
cd33688db91443b5db3451d2800a465d9fef7931
[ "MIT" ]
null
null
null
app.py
schuyler/odm360
cd33688db91443b5db3451d2800a465d9fef7931
[ "MIT" ]
null
null
null
app.py
schuyler/odm360
cd33688db91443b5db3451d2800a465d9fef7931
[ "MIT" ]
null
null
null
# Server is setup here from flask import (Flask) from flask_bootstrap import Bootstrap import psycopg2 import logging from odm360.log import start_logger from odm360 import dbase from odm360.states import states db = "dbname=odm360 user=odm360 host=localhost password=zanzibar" conn = psycopg2.connect(db) cur = conn.c...
33.892241
165
0.638815
# Server is setup here from flask import ( Flask, render_template, redirect, request, jsonify, make_response, Response, ) from flask_bootstrap import Bootstrap import psycopg2 import logging from odm360.log import start_logger, stream_logger from odm360.camera360rig import do_request from o...
0
6,408
0
0
0
149
0
150
297
d21a6ff2453628d9674e8dd1561e0aef09c9335c
4,962
py
Python
model.py
hatsuame/LineRelifer
90e8592dfd8e758aa3b42ddb81771164f4573a60
[ "MIT" ]
23
2018-04-17T07:28:58.000Z
2022-01-26T15:34:34.000Z
model.py
hatsuame/LineRelifer
90e8592dfd8e758aa3b42ddb81771164f4573a60
[ "MIT" ]
null
null
null
model.py
hatsuame/LineRelifer
90e8592dfd8e758aa3b42ddb81771164f4573a60
[ "MIT" ]
1
2018-05-13T00:57:02.000Z
2018-05-13T00:57:02.000Z
SEED = 1 ITERATIONS = 10001 BATCH_SIZE = 8 IMG_SHAPE = (256, 256, 1) IMG_HEIGHT, IMG_WIDTH, IMG_CHAN = IMG_SHAPE if __name__ == "__main__": train()
27.566667
120
0.615276
import numpy as np import datetime from keras.models import Model from keras.layers import Input, Activation, Reshape, BatchNormalization, MaxPool2D, Conv2D, Add, Dropout, Flatten, Dense from keras.optimizers import Adam from keras.preprocessing.image import ImageDataGenerator from keras.applications import xception ...
0
0
0
0
0
4,368
0
164
270
ee608fa5b117d9394478055bcfa7e40cae18da3b
15,237
py
Python
main_lsdr_ol.py
xjtuygao/EPT
1fb39f0f8508dd5531a97671c3b7294c7d20c286
[ "MIT" ]
null
null
null
main_lsdr_ol.py
xjtuygao/EPT
1fb39f0f8508dd5531a97671c3b7294c7d20c286
[ "MIT" ]
null
null
null
main_lsdr_ol.py
xjtuygao/EPT
1fb39f0f8508dd5531a97671c3b7294c7d20c286
[ "MIT" ]
null
null
null
from __future__ import print_function # basic functions import argparse import os import random import math import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.switch_backend('agg') # torch functions import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudn...
36.539568
133
0.628208
from __future__ import print_function # basic functions import argparse import os import random import math import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.switch_backend('agg') # torch functions import torch import torch.nn as nn import torch.nn.parallel from torch.autograd import grad as ...
0
0
0
0
0
361
0
33
90
d49372b8a81c000e0e9cf63cfc844469840d8ddd
1,716
py
Python
problems/array/Solution1652.py
akalu/cs-problems-python
9b1bd8e3932be62135a38a77f955ded9a766b654
[ "MIT" ]
null
null
null
problems/array/Solution1652.py
akalu/cs-problems-python
9b1bd8e3932be62135a38a77f955ded9a766b654
[ "MIT" ]
null
null
null
problems/array/Solution1652.py
akalu/cs-problems-python
9b1bd8e3932be62135a38a77f955ded9a766b654
[ "MIT" ]
null
null
null
""" You have a bomb to defuse, and your time is running out! Your informer will provide you with a circular array code of length of n and a key k. To decrypt the code, you must replace every number. All the numbers are replaced simultaneously. If k > 0, replace the ith number with the sum of the next...
33
81
0.555361
""" You have a bomb to defuse, and your time is running out! Your informer will provide you with a circular array code of length of n and a key k. To decrypt the code, you must replace every number. All the numbers are replaced simultaneously. If k > 0, replace the ith number with the sum of the next...
0
0
0
727
0
0
0
2
45
4d41deba294d765948d6032e78b1d818612a5eab
4,190
py
Python
DBSCAN Clustering/Demo/DBSCAN_Clustering.py
aryasoni98/Statistics-and-Econometrics-for-Data-Science
6e1e67b49289a74522d65ea52b843801756c6c5f
[ "MIT" ]
null
null
null
DBSCAN Clustering/Demo/DBSCAN_Clustering.py
aryasoni98/Statistics-and-Econometrics-for-Data-Science
6e1e67b49289a74522d65ea52b843801756c6c5f
[ "MIT" ]
null
null
null
DBSCAN Clustering/Demo/DBSCAN_Clustering.py
aryasoni98/Statistics-and-Econometrics-for-Data-Science
6e1e67b49289a74522d65ea52b843801756c6c5f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # In[2]: df=pd.read_csv("./Dataset/Mall_Customers.csv") # In[3]: df.head() # In[4]: df.info() # In[5]: df.describe() # In[6]: df.rename(columns={'Annual Inco...
17.531381
448
0.63747
#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # In[2]: df=pd.read_csv("./Dataset/Mall_Customers.csv") # In[3]: df.head() # In[4]: df.info() # In[5]: df.describe() # In[6]: df.rename(columns={'Annual Inco...
0
0
0
0
0
0
0
6
23
fc977aa01da06ec285fac44c38b82017adce47e1
546
py
Python
acra_api/split.py
legalese/legalese-google-app
8bf34cf4a956c55a0551e056f0a24741dcf9ff26
[ "Apache-2.0" ]
8
2016-09-15T02:20:40.000Z
2021-05-19T04:16:34.000Z
acra_api/split.py
legalese/legalese-google-app
8bf34cf4a956c55a0551e056f0a24741dcf9ff26
[ "Apache-2.0" ]
4
2016-09-19T08:33:16.000Z
2016-09-30T22:16:53.000Z
acra_api/split.py
legalese/legalese-google-app
8bf34cf4a956c55a0551e056f0a24741dcf9ff26
[ "Apache-2.0" ]
1
2016-08-19T13:59:37.000Z
2016-08-19T13:59:37.000Z
import json f = open('/path/to/json', 'r') h = json.load(f) ''' for i in h["UEN_DATAGOV"]["BODY"][0]["DATA"]: if i["ENTITY_NAME"][0] == "LEGALESE PTE. LTD.": print i["ENTITY_NAME"][0] print i["UEN"][0] ''' # note that my parser prints the key values into a single-element array chunkSize = 4550 wi...
27.3
77
0.584249
import json import sys f = open('/path/to/json', 'r') h = json.load(f) ''' for i in h["UEN_DATAGOV"]["BODY"][0]["DATA"]: if i["ENTITY_NAME"][0] == "LEGALESE PTE. LTD.": print i["ENTITY_NAME"][0] print i["UEN"][0] ''' # note that my parser prints the key values into a single-element array chunkSiz...
0
0
0
0
0
0
0
-11
22
2e7e5e7e8237d6f391b0d45ec5d63cc57e8776fe
644
py
Python
imageSpider/pipelines.py
Maaaaaaaa12138/imageSpider
2142eb89f50950bdc6d17641a61a42d08fba3268
[ "MIT" ]
null
null
null
imageSpider/pipelines.py
Maaaaaaaa12138/imageSpider
2142eb89f50950bdc6d17641a61a42d08fba3268
[ "MIT" ]
9
2021-03-19T03:44:12.000Z
2022-03-12T00:30:38.000Z
imageSpider/pipelines.py
Maaaaaaaa12138/imageSpider
2142eb89f50950bdc6d17641a61a42d08fba3268
[ "MIT" ]
1
2021-04-30T02:29:45.000Z
2021-04-30T02:29:45.000Z
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
33.894737
73
0.698758
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html import scrapy from scrapy.pipelines.images import ImagesPipeline class ImagespiderPipeline(ImagesPipeline): def get...
0
0
0
362
0
0
0
21
68
a9bfd2c084ca7cadec1eda2c245ec0f618ba73f5
1,845
py
Python
api/server_inference.py
smolendawid/ubaar-competition
28de972d6beb13343c537fc030101be672a852a3
[ "Apache-2.0" ]
null
null
null
api/server_inference.py
smolendawid/ubaar-competition
28de972d6beb13343c537fc030101be672a852a3
[ "Apache-2.0" ]
null
null
null
api/server_inference.py
smolendawid/ubaar-competition
28de972d6beb13343c537fc030101be672a852a3
[ "Apache-2.0" ]
null
null
null
import os import pandas as pd from feature_extraction.path_utils import project_root import joblib raw_data = pd.read_csv(os.path.join(project_root(), 'data', 'raw', 'ubaar-competition', 'train.csv'), encoding="utf-8", index_col="ID") all_features_cols = pd.read_csv(os.path.join(project_root(), ...
38.4375
104
0.730081
import os import pandas as pd from feature_extraction.date_utils import date_features from feature_extraction.coords_features import coord_features from feature_extraction.other_features import raw_features, categorical_features from feature_extraction.path_utils import project_root import xgboost as xgb import joblib ...
0
0
0
0
0
844
0
133
134
c5623e5ee9db6463d65c55baf0653205703e7d4a
329
py
Python
view/routes.py
Yoshiinori/droid-multi
451cb361692efbe3999409f9d5f9ee2cd944c17d
[ "MIT" ]
1
2020-12-15T09:58:14.000Z
2020-12-15T09:58:14.000Z
view/routes.py
Yoshiinori/droid-multi
451cb361692efbe3999409f9d5f9ee2cd944c17d
[ "MIT" ]
null
null
null
view/routes.py
Yoshiinori/droid-multi
451cb361692efbe3999409f9d5f9ee2cd944c17d
[ "MIT" ]
null
null
null
from flask import Blueprint view = Blueprint('view', __name__, template_folder='templates') print('view working')
23.5
63
0.696049
from flask import Blueprint, render_template, session view = Blueprint('view', __name__, template_folder='templates') @view.route('/') def index(): username = 'hello' if 'username' in session: username = session['username'] return render_template('index.html', username=username) print('view ...
0
158
0
0
0
0
0
26
23
701bb5ae63a734bfbe9eb252e0d76238ac48381e
12,128
py
Python
csp/csp.py
mkbabb/csp-solver
b5e4aab74d62709f4804bec25b6d5488378f896d
[ "Unlicense" ]
null
null
null
csp/csp.py
mkbabb/csp-solver
b5e4aab74d62709f4804bec25b6d5488378f896d
[ "Unlicense" ]
null
null
null
csp/csp.py
mkbabb/csp-solver
b5e4aab74d62709f4804bec25b6d5488378f896d
[ "Unlicense" ]
null
null
null
V = TypeVar("V") D = TypeVar("D") Solution = Dict[V, D] Constraint = Callable[[Solution], bool] if __name__ == "__main__": kwargs = { "pruning_type": PruningType.AC3, "variable_ordering": VariableOrdering.FAIL_FIRST, "max_solutions": 100, } csps = [map_coloring(**kw...
30.938776
88
0.610818
import pprint import random from collections import defaultdict, deque from enum import Enum, auto from typing import * import numpy as np V = TypeVar("V") D = TypeVar("D") Solution = Dict[V, D] Constraint = Callable[[Solution], bool] class PruningType(Enum): FORWARD_CHECKING = auto() AC3 = auto() AC_F...
0
0
0
7,503
0
3,705
0
7
455
d739b85698982f3e86d8476bd9cf16f8fe06ea62
305
py
Python
VSR/Backend/Torch/Models/Contrib/ntire20/xiaozhong/__init__.py
Kadantte/VideoSuperResolution
4c86e49d81c7a9bea1fe0780d651afc126768df3
[ "MIT" ]
1,447
2018-06-04T08:44:07.000Z
2022-03-29T06:19:10.000Z
VSR/Backend/Torch/Models/Contrib/ntire20/xiaozhong/__init__.py
Kadantte/VideoSuperResolution
4c86e49d81c7a9bea1fe0780d651afc126768df3
[ "MIT" ]
96
2018-08-29T01:02:45.000Z
2022-01-12T06:00:01.000Z
VSR/Backend/Torch/Models/Contrib/ntire20/xiaozhong/__init__.py
Kadantte/VideoSuperResolution
4c86e49d81c7a9bea1fe0780d651afc126768df3
[ "MIT" ]
307
2018-06-26T13:35:54.000Z
2022-01-21T09:01:54.000Z
# Copyright (c) 2017-2020 Wenyi Tang. # Author: Wenyi Tang # Email: wenyitang@outlook.com # Update: 2020 - 5 - 28 import logging _logger = logging.getLogger("VSR.RWSR") _logger.info("LICENSE: RealSR is implemented by Xiaozhong Ji. " "@xiaozhongji https://github.com/jixiaozhong/RealSR")
30.5
66
0.701639
# Copyright (c) 2017-2020 Wenyi Tang. # Author: Wenyi Tang # Email: wenyitang@outlook.com # Update: 2020 - 5 - 28 import logging _logger = logging.getLogger("VSR.RWSR") _logger.info("LICENSE: RealSR is implemented by Xiaozhong Ji. " "@xiaozhongji https://github.com/jixiaozhong/RealSR")
0
0
0
0
0
0
0
0
0
b561ead315ebf2163401e97c2659a90145251c28
3,850
py
Python
snipy/plot_helpers.py
navdeeprana/snipy
55a5286a17d1c471d147e9ed7cbe06945c3eef02
[ "MIT" ]
null
null
null
snipy/plot_helpers.py
navdeeprana/snipy
55a5286a17d1c471d147e9ed7cbe06945c3eef02
[ "MIT" ]
null
null
null
snipy/plot_helpers.py
navdeeprana/snipy
55a5286a17d1c471d147e9ed7cbe06945c3eef02
[ "MIT" ]
null
null
null
import matplotlib from matplotlib import pyplot as plt def no_ticks(ax, axis="both"): """ Remove ticks and labels from one or both axis. ax : matplotlib ax object. axis : "both", "x", "y" """ try: for axi in ax: set(axi) except: set(ax) def cmap_colors(n_...
25.328947
76
0.599481
import numpy as np import matplotlib from matplotlib import pyplot as plt def no_ticks(ax, axis="both"): """ Remove ticks and labels from one or both axis. ax : matplotlib ax object. axis : "both", "x", "y" """ from numpy import ndarray def set(ax): if axis == "both" or axis == ...
0
0
0
0
0
1,611
0
17
286
d2c88e044e1de21a07e0cac103586cc5d21d6b70
1,411
py
Python
lang/Python/levenshtein-distance-3.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
lang/Python/levenshtein-distance-3.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
lang/Python/levenshtein-distance-3.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
print(( ld('kitten','kitten'), # 0 ld('kitten','sitten'), # 1 ld('kitten','sittes'), # 2 ld('kitten','sityteng'), # 3 ld('kitten','sittYing'), # 4 ld('rosettacode','raisethysword'), # 8 ld('kitten','kittenaaaaaaaaaaaaaaaaa'), # 17 ld('kittenaaaaaaaaaaaaaaaaa','kitten') # 17 )) print(( ...
32.813953
68
0.533664
def ld(a, b, mx=-1): def result(d): return d if mx < 0 else False if d > mx else True if a == b: return result(0) la, lb = len(a), len(b) if mx >= 0 and abs(la - lb) > mx: return result(mx+1) if la == 0: return result(lb) if lb == 0: return result(la) if lb > la: a, b, la, lb = b, a, lb, l...
0
0
0
0
0
725
0
0
22
997d71ff359b2b27a7cc8e63b3f0c00567fcdf52
1,179
py
Python
ML Artefact 2/main.py
amifsud02/Machine-Learning---Object-Detection
fbf8b67ca93f7a31e20e7b06602f70bae29dbc4a
[ "Unlicense" ]
null
null
null
ML Artefact 2/main.py
amifsud02/Machine-Learning---Object-Detection
fbf8b67ca93f7a31e20e7b06602f70bae29dbc4a
[ "Unlicense" ]
null
null
null
ML Artefact 2/main.py
amifsud02/Machine-Learning---Object-Detection
fbf8b67ca93f7a31e20e7b06602f70bae29dbc4a
[ "Unlicense" ]
null
null
null
import cv2 as cv faceCascade = cv.CascadeClassifier('haarcascade/haarcascade_frontalface_default.xml') #most accurate eyeCascade = cv.CascadeClassifier('haarcascade/haarcascade_eye.xml') video = cv.VideoCapture(0) while(True): ret, frame = video.read() gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY) f...
31.026316
100
0.578456
import cv2 as cv faceCascade = cv.CascadeClassifier('haarcascade/haarcascade_frontalface_default.xml') #most accurate eyeCascade = cv.CascadeClassifier('haarcascade/haarcascade_eye.xml') video = cv.VideoCapture(0) while(True): ret, frame = video.read() gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY) f...
0
0
0
0
0
0
0
0
0
9ba5e8ded5c859b527a1f9a92667c3dc77db3a2d
257
py
Python
lang/python/modelaapi/__init__.py
metaprov/modeldapi
ee05693832051dcd990ee4f061715d7ae0787340
[ "Apache-2.0" ]
5
2022-02-18T03:40:10.000Z
2022-03-01T16:11:24.000Z
lang/python/modelaapi/__init__.py
metaprov/modeldapi
ee05693832051dcd990ee4f061715d7ae0787340
[ "Apache-2.0" ]
1
2022-01-07T19:59:25.000Z
2022-02-04T01:21:14.000Z
lang/python/modelaapi/__init__.py
metaprov/modeldapi
ee05693832051dcd990ee4f061715d7ae0787340
[ "Apache-2.0" ]
1
2022-03-25T10:21:43.000Z
2022-03-25T10:21:43.000Z
########################################################################## ## Package Version ########################################################################## from .version import get_version __version__ = get_version(short=True)
51.4
74
0.346304
########################################################################## ## Package Version ########################################################################## from .version import get_version, __version_info__ __version__ = get_version(short=True)
0
0
0
0
0
0
0
18
0
98efbf34cf83a2d8fce0470b97f10ff4c12f2a66
359
py
Python
pyexplain/attach/examples/urls.py
LucasMagnum/pyexplain
ca7a91df8519f576c21d5ede4b4f779fabfd5cbe
[ "MIT" ]
6
2018-03-20T19:50:47.000Z
2021-11-21T12:59:01.000Z
pyexplain/attach/examples/urls.py
LucasMagnum/pyexplain
ca7a91df8519f576c21d5ede4b4f779fabfd5cbe
[ "MIT" ]
1
2015-10-30T22:01:28.000Z
2015-11-03T23:07:52.000Z
pyexplain/attach/examples/urls.py
LucasMagnum/pyexplain
ca7a91df8519f576c21d5ede4b4f779fabfd5cbe
[ "MIT" ]
1
2015-12-18T12:53:59.000Z
2015-12-18T12:53:59.000Z
# coding: utf-8 from . import views from django.conf.urls import url urlpatterns = [ url( r'^create/(?P<app_label>\w+)/(?P<model>\w+)/(?P<obj_id>\d+)/$', views.ExampleCreateView.as_view(), name='create' ), url( r'^update/(?P<pk>\d+)/$', views.ExampleUpdateView.as_...
17.95
71
0.532033
# coding: utf-8 from . import views from django.conf.urls import url urlpatterns = [ url( r'^create/(?P<app_label>\w+)/(?P<model>\w+)/(?P<obj_id>\d+)/$', views.ExampleCreateView.as_view(), name='create' ), url( r'^update/(?P<pk>\d+)/$', views.ExampleUpdateView.as_...
0
0
0
0
0
0
0
0
0
6a0f03ac34b998ef30737a7e0e14d6c3f86917db
2,090
py
Python
Classification/random_forest_classification.py
KacperKubara/SUAIS_Workshops
ab989150855d4612d801c759ae486e48176083b0
[ "MIT" ]
11
2019-02-04T18:14:49.000Z
2022-03-20T13:29:01.000Z
Classification/random_forest_classification.py
MohamedNabilFcih/Workshops-Material
f69b55bc49d0b76a22922a7450b755d94feefc78
[ "MIT" ]
2
2019-02-01T21:42:22.000Z
2019-03-18T17:11:04.000Z
Classification/random_forest_classification.py
MohamedNabilFcih/Workshops-Material
f69b55bc49d0b76a22922a7450b755d94feefc78
[ "MIT" ]
3
2019-02-04T18:17:33.000Z
2019-03-18T15:33:21.000Z
# Random forest classification with PCA import pandas as pd import matplotlib.pyplot as plt # Read Data from sklearn.datasets import load_iris dataset = load_iris() # Choose which features to use x = dataset["data"] # It has 4 features - with PCA we will reduce it to 3 for 3D visualisation y = dataset["target"] #...
34.262295
97
0.743541
# Random forest classification with PCA import pandas as pd import numpy as np import matplotlib.pyplot as plt # Read Data from sklearn.datasets import load_iris dataset = load_iris() # Choose which features to use x = dataset["data"] # It has 4 features - with PCA we will reduce it to 3 for 3D visualisation y =...
0
0
0
0
0
0
0
15
45
bb2a83c3c3acc7e93a8a2d765afb094b00927c42
2,439
py
Python
pypolybuilder/Bond.py
mssm-labmmol/pypolybuilder
0b6cc8d7c67492e5cbcbc6e6999d7546eb133190
[ "MIT" ]
16
2021-04-06T02:24:24.000Z
2022-02-04T16:32:22.000Z
pypolybuilder/Bond.py
mssm-labmmol/pypolybuilder
0b6cc8d7c67492e5cbcbc6e6999d7546eb133190
[ "MIT" ]
null
null
null
pypolybuilder/Bond.py
mssm-labmmol/pypolybuilder
0b6cc8d7c67492e5cbcbc6e6999d7546eb133190
[ "MIT" ]
2
2021-04-14T02:37:57.000Z
2022-01-05T18:12:21.000Z
""" Created on Dec 22, 2013 @author: root """
28.694118
115
0.558016
""" Created on Dec 22, 2013 @author: root """ import Utils from Utils import print_pypoly_warning class Bond(object): __a1 = None __a2 = None __func = None __param = None def __init__(self, a1, a2, func, param): self.__a1 = a1 self.__a2 = a2 self.__func = func ...
0
0
0
2,316
0
0
0
8
67
62d3bb59c1ffa044a17258ddf6d4ddd27e36797d
360
py
Python
pics/urls.py
wamakimaN/galeria
0088d0ef7dd23f019e015736535b0556c43c7cdd
[ "MIT" ]
null
null
null
pics/urls.py
wamakimaN/galeria
0088d0ef7dd23f019e015736535b0556c43c7cdd
[ "MIT" ]
3
2021-06-08T20:54:29.000Z
2021-09-08T01:38:37.000Z
pics/urls.py
wamakimaN/galeria
0088d0ef7dd23f019e015736535b0556c43c7cdd
[ "MIT" ]
null
null
null
from django.conf.urls import url from django.conf import settings from . import views from django.conf.urls.static import static urlpatterns = [ url(r'^$', views.home_page, name='homePage'), url(r'^category/', views.category, name='showCategory'), ] if settings.DEBUG: urlpatterns+= static(settings.MEDIA_U...
30
81
0.744444
from django.conf.urls import url from django.conf import settings from . import views from django.conf.urls.static import static urlpatterns = [ url(r'^$', views.home_page, name='homePage'), url(r'^category/', views.category, name='showCategory'), ] if settings.DEBUG: urlpatterns+= static(settings.MEDIA_U...
0
0
0
0
0
0
0
0
0
0fd5a34c6d5608f650b6d88cfa7fc54bb96e8c8e
1,215
py
Python
darkroom/models.py
jonnygovish/Darkroom
04e27e0adfe5ef95307be16f86f7bba6193b3dbc
[ "MIT" ]
1
2019-08-13T09:48:21.000Z
2019-08-13T09:48:21.000Z
darkroom/models.py
jonnygovish/Darkroom
04e27e0adfe5ef95307be16f86f7bba6193b3dbc
[ "MIT" ]
null
null
null
darkroom/models.py
jonnygovish/Darkroom
04e27e0adfe5ef95307be16f86f7bba6193b3dbc
[ "MIT" ]
null
null
null
# Create your models here.
21.696429
59
0.702881
from django.db import models # Create your models here. class User(models.Model): first_name = models.CharField(max_length = 30) last_name = models.CharField(max_length = 30) email = models.EmailField() def __str__(self): return self.first_name def save_user(self): self.save() class Meta: o...
0
226
0
863
0
0
0
7
90
fa94ba36f260a400c46a8d9e5a2aab74ead026c4
765
py
Python
screenpy/actions/dismiss_alert.py
perrygoy/screenpy
862c0d7e5ff9f1265e520ab383c04ddbd4d060eb
[ "MIT" ]
39
2019-03-22T15:18:23.000Z
2022-02-23T17:32:03.000Z
screenpy/actions/dismiss_alert.py
perrygoy/screenpy
862c0d7e5ff9f1265e520ab383c04ddbd4d060eb
[ "MIT" ]
63
2019-07-17T06:25:19.000Z
2022-01-13T07:03:53.000Z
screenpy/actions/dismiss_alert.py
bandophahita/screenpy
db0f3ef91a891b9d095016d83fa4b589620808ce
[ "MIT" ]
15
2019-07-09T11:02:56.000Z
2021-12-24T07:43:56.000Z
""" Dismiss a javascript alert. """
23.90625
65
0.647059
""" Dismiss a javascript alert. """ from screenpy.abilities import BrowseTheWeb from screenpy.actor import Actor from screenpy.pacing import aside, beat class DismissAlert: """Dismiss an alert. Abilities Required: |BrowseTheWeb| Examples:: the_actor.attempts_to(DismissAlert()) """ ...
0
298
0
289
0
0
0
51
90
98c3fe27d54c7d6930b7045994a0da5df8f4026e
326
py
Python
tests/test_git.py
joshuaellinger/corona19-data-pipeline
b0a3582d9cd3c765b682264c855258f7690d94d6
[ "Apache-2.0" ]
17
2020-03-27T15:30:08.000Z
2020-10-15T15:01:57.000Z
tests/test_git.py
joshuaellinger/corona19-data-pipeline
b0a3582d9cd3c765b682264c855258f7690d94d6
[ "Apache-2.0" ]
5
2020-03-15T15:41:10.000Z
2020-03-31T00:39:00.000Z
tests/test_git.py
joshuaellinger/corona19-data-pipeline
b0a3582d9cd3c765b682264c855258f7690d94d6
[ "Apache-2.0" ]
7
2020-03-20T21:17:54.000Z
2021-03-31T00:41:44.000Z
# # working file for testing git support . should be a unit test # from src import check_path check_path() if __name__ == "__main__": test_status()
14.173913
64
0.677914
# # working file for testing git support . should be a unit test # import sys import os from src import check_path check_path() from shared.util_git import pull, push, isbehind def test_status(): xdir = sys.path[0] x = isbehind(xdir) print(f"isbehind = {x}") if __name__ == "__main__": test_stat...
0
0
0
0
0
74
0
4
90
6fc76e198c3f990fa57f64dad73d15822e4435f1
395
py
Python
src/gaming_bot/utils/exceptions.py
Unknown15082/gaming-bot
d454094f152a92402b6fd2dae4c89f624c0d547d
[ "MIT" ]
null
null
null
src/gaming_bot/utils/exceptions.py
Unknown15082/gaming-bot
d454094f152a92402b6fd2dae4c89f624c0d547d
[ "MIT" ]
null
null
null
src/gaming_bot/utils/exceptions.py
Unknown15082/gaming-bot
d454094f152a92402b6fd2dae4c89f624c0d547d
[ "MIT" ]
null
null
null
""" Files for every custom exceptions. """
23.235294
77
0.637975
""" Files for every custom exceptions. """ class GameNotFoundError(Exception): """ Exception to raise when the required game is not found. """ def __init__(self, game_type: str, game_id: int) -> None: self.game_id = game_id self.game_type = game_type def __str__(self) -> str: ...
0
0
0
328
0
0
0
0
23
60b2af9de09831f509a1a5e05e9ee15b1eb3477c
2,014
py
Python
conrad/schema.py
hasan-haider/conrad
3e040b73a0cbec0ecee36c397c3bdedf9e439b54
[ "Apache-2.0" ]
244
2019-10-27T22:40:17.000Z
2022-01-11T13:04:50.000Z
conrad/schema.py
hasan-haider/conrad
3e040b73a0cbec0ecee36c397c3bdedf9e439b54
[ "Apache-2.0" ]
92
2019-10-27T23:01:34.000Z
2021-08-21T15:19:37.000Z
conrad/schema.py
hasan-haider/conrad
3e040b73a0cbec0ecee36c397c3bdedf9e439b54
[ "Apache-2.0" ]
71
2019-10-28T03:05:42.000Z
2022-02-02T13:34:32.000Z
# -*- coding: utf-8 -*- LATEST = "2" f1 = "events.json" v1 = { "name": {"type": "string", "minlength": 1, "required": True}, "url": {"type": "string", "minlength": 1, "required": True}, "city": {"type": "string", "minlength": 1, "required": True}, "state": {"type": "string", "required": True, "nullabl...
49.121951
86
0.5571
# -*- coding: utf-8 -*- LATEST = "2" f1 = "events.json" v1 = { "name": {"type": "string", "minlength": 1, "required": True}, "url": {"type": "string", "minlength": 1, "required": True}, "city": {"type": "string", "minlength": 1, "required": True}, "state": {"type": "string", "required": True, "nullabl...
0
0
0
0
0
0
0
0
0
cd645d24e4cef57ac2c139482e8bcfd3d50dadb6
21,686
py
Python
pysnmp-with-texts/HP-ICF-IP-LOCKDOWN-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/HP-ICF-IP-LOCKDOWN-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/HP-ICF-IP-LOCKDOWN-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module HP-ICF-IP-LOCKDOWN-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HP-ICF-IP-LOCKDOWN-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:34:15 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (d...
147.52381
2,186
0.776953
# # PySNMP MIB module HP-ICF-IP-LOCKDOWN-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HP-ICF-IP-LOCKDOWN-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:34:15 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (d...
0
0
0
0
0
0
0
0
0
dd86dbd4ef3a2a9346aac24f05e201323a786ef8
3,604
py
Python
vectorhub/encoders/audio/tfhub/yamnet.py
NanaAkwasiAbayieBoateng/vectorhub
265933521cf0a3113a47182a30b0037bf163584b
[ "Apache-2.0" ]
1
2020-11-04T16:02:39.000Z
2020-11-04T16:02:39.000Z
vectorhub/encoders/audio/tfhub/yamnet.py
NanaAkwasiAbayieBoateng/vectorhub
265933521cf0a3113a47182a30b0037bf163584b
[ "Apache-2.0" ]
null
null
null
vectorhub/encoders/audio/tfhub/yamnet.py
NanaAkwasiAbayieBoateng/vectorhub
265933521cf0a3113a47182a30b0037bf163584b
[ "Apache-2.0" ]
null
null
null
from ....models_dict import MODEL_REQUIREMENTS if is_all_dependency_installed(MODEL_REQUIREMENTS['encoders-audio-tfhub-yamnet']): from ....doc_utils import ModelDefinition from datetime import date YamnetModelDefinition = ModelDefinition( model_id="audio/yamnet", model_name="Yamnet", vector_length=1024, ...
55.446154
365
0.740844
from ....import_utils import * from ....models_dict import MODEL_REQUIREMENTS if is_all_dependency_installed(MODEL_REQUIREMENTS['encoders-audio-tfhub-yamnet']): import tensorflow as tf import tensorflow_hub as hub from ..base import BaseAudio2Vec from ....base import catch_vector_errors from ....doc_utils impo...
0
414
0
383
0
0
0
48
142
44d34fc0868e00425a9ff4a762b942d42d75e211
5,642
py
Python
tests/test_utils.py
Shopify/pyoozie
6dcbcb8249820dc40b5a9bbbc04b0370240fd706
[ "MIT" ]
9
2017-03-16T15:30:23.000Z
2019-08-07T03:35:59.000Z
tests/test_utils.py
Shopify/pyoozie
6dcbcb8249820dc40b5a9bbbc04b0370240fd706
[ "MIT" ]
43
2017-02-01T22:20:52.000Z
2020-08-10T08:48:20.000Z
tests/test_utils.py
Shopify/pyoozie
6dcbcb8249820dc40b5a9bbbc04b0370240fd706
[ "MIT" ]
5
2017-02-08T17:59:06.000Z
2020-11-12T11:29:08.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2017 "Shopify inc." All rights reserved. # Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. from __future__ import unicode_literals
36.4
111
0.64268
# -*- coding: utf-8 -*- # Copyright (c) 2017 "Shopify inc." All rights reserved. # Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. from __future__ import unicode_literals import xml.etree.ElementTree as et import pytest import six import tests.utils @pytest.fixture ...
24
578
0
0
0
4,660
0
-9
182
4c42e1dbecc75b75160171083b199f71c48c5b86
884
py
Python
perception/database/migrations/versions/506c8e35ba7c_create_openvas_vuln_table.py
asrozar/perception
e308489e30aaa3495092e3926799e43312ee6242
[ "MIT" ]
1
2017-08-07T11:05:52.000Z
2017-08-07T11:05:52.000Z
perception/database/migrations/versions/506c8e35ba7c_create_openvas_vuln_table.py
CriticalSecurity/python-perception
e308489e30aaa3495092e3926799e43312ee6242
[ "MIT" ]
null
null
null
perception/database/migrations/versions/506c8e35ba7c_create_openvas_vuln_table.py
CriticalSecurity/python-perception
e308489e30aaa3495092e3926799e43312ee6242
[ "MIT" ]
1
2016-10-10T00:36:29.000Z
2016-10-10T00:36:29.000Z
"""create openvas_vuln table Revision ID: 506c8e35ba7c Revises: 13b7c3d4c802 Create Date: 2017-07-21 12:19:35.711173 """ # revision identifiers, used by Alembic. revision = '506c8e35ba7c' down_revision = '13b7c3d4c802' branch_labels = None depends_on = None
26
92
0.699095
"""create openvas_vuln table Revision ID: 506c8e35ba7c Revises: 13b7c3d4c802 Create Date: 2017-07-21 12:19:35.711173 """ from sqlalchemy.dialects import postgresql from alembic import op import sqlalchemy as sa import datetime def _get_date(): return datetime.datetime.now() # revision identifiers, used by Alem...
0
0
0
0
0
445
0
18
157
b9e21cfd43d35755fc3138718fd40112f134835f
342
py
Python
src/admin_panel/migrations/0025_remove_tariff_services.py
Rey092/myhouse24_django
b2b31873006ec4917c2ed043350f2841745fadfb
[ "MIT" ]
null
null
null
src/admin_panel/migrations/0025_remove_tariff_services.py
Rey092/myhouse24_django
b2b31873006ec4917c2ed043350f2841745fadfb
[ "MIT" ]
null
null
null
src/admin_panel/migrations/0025_remove_tariff_services.py
Rey092/myhouse24_django
b2b31873006ec4917c2ed043350f2841745fadfb
[ "MIT" ]
null
null
null
# Generated by Django 3.2.4 on 2021-07-09 04:35
19
59
0.608187
# Generated by Django 3.2.4 on 2021-07-09 04:35 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("admin_panel", "0024_alter_service_is_removable"), ] operations = [ migrations.RemoveField( model_name="tariff", name="servic...
0
0
0
236
0
0
0
11
46
325519a74c6bb9dfb5936da32392fa70764b39b3
5,243
py
Python
pytorch_utils.py
The-Data-Team/SDMR
93bd04de108d5b3003e31217cb2da74ffcbfe0f3
[ "MIT" ]
11
2019-05-06T11:24:02.000Z
2020-06-16T07:31:40.000Z
pytorch_utils.py
The-Data-Team/SDMR
93bd04de108d5b3003e31217cb2da74ffcbfe0f3
[ "MIT" ]
null
null
null
pytorch_utils.py
The-Data-Team/SDMR
93bd04de108d5b3003e31217cb2da74ffcbfe0f3
[ "MIT" ]
6
2019-08-27T13:59:02.000Z
2021-06-14T19:26:00.000Z
import torch def flatten(x): ''' flatten high dimensional tensor x into an array :param x: :return: 1 dimensional tensor ''' dims = x.size()[1:] #remove the first dimension as it is batch dimension num_features = 1 for s in dims: num_features *= s return x.contiguous().view(-1, num_...
28.807692
108
0.668701
import torch import numpy as np import collections from itertools import repeat import random def _to_iterable(val, num): try: iter(val) return val except TypeError: return (val,) * num def is_cuda(x): return x.is_cuda def flatten(x): ''' flatten high dimensional tensor x...
0
0
0
0
338
2,774
0
-7
515
dfefa56726aa2b87bad8ce6780932d1ba636fefd
280
py
Python
ImageCapture.py
Laokashouji/UAV-Swarm-intelligence-system
909b62ab3e08ad1e1cbd986a267aff805dc61a8b
[ "MIT" ]
null
null
null
ImageCapture.py
Laokashouji/UAV-Swarm-intelligence-system
909b62ab3e08ad1e1cbd986a267aff805dc61a8b
[ "MIT" ]
null
null
null
ImageCapture.py
Laokashouji/UAV-Swarm-intelligence-system
909b62ab3e08ad1e1cbd986a267aff805dc61a8b
[ "MIT" ]
null
null
null
""" """ from djitellopy import tello import cv2 drone = tello.Tello() drone.connect() print(drone.get_battery()) drone.stream_on() while True: img = drone.get_frame_read().frame img = cv2.resize(img, (360, 240)) cv2.imshow("Image", img) cv2.waitKey(1)
15.555556
38
0.675
""" 无人机获取视频流 """ from djitellopy import tello import cv2 drone = tello.Tello() drone.connect() print(drone.get_battery()) drone.stream_on() while True: img = drone.get_frame_read().frame img = cv2.resize(img, (360, 240)) cv2.imshow("Image", img) cv2.waitKey(1)
24
0
0
0
0
0
0
0
0
548634e3e1141f27da15655d5ae090069126088d
1,242
py
Python
myDataset.py
huangzsdy/pytorch_basic_learning
7880bc3fcee1d38623d93fa2a36482ccde0e335a
[ "Apache-2.0" ]
null
null
null
myDataset.py
huangzsdy/pytorch_basic_learning
7880bc3fcee1d38623d93fa2a36482ccde0e335a
[ "Apache-2.0" ]
null
null
null
myDataset.py
huangzsdy/pytorch_basic_learning
7880bc3fcee1d38623d93fa2a36482ccde0e335a
[ "Apache-2.0" ]
null
null
null
import torch.utils.data as data
30.292683
107
0.609501
import os import torch import torch.utils.data as data from PIL import Image from multiprocessing.dummy import Pool def default_loader(path): return Image.open(path).convert('RGB') class myImageFolder(data.Dataset): def __init__(self, label_file, transform = None, target_transform=None, loader=default_loader)...
0
0
0
1,034
0
47
0
-4
134
60f92f4cd0400034e1f7ab9f01a48660f1647b61
1,901
py
Python
datasets/__init__.py
ZongwuYang/tf-imagenet
7ffdc3059df5e515d891c3722c7229fc72a99705
[ "Apache-2.0" ]
1
2018-08-29T13:17:42.000Z
2018-08-29T13:17:42.000Z
datasets/__init__.py
ZongwuYang/tf-imagenet
7ffdc3059df5e515d891c3722c7229fc72a99705
[ "Apache-2.0" ]
null
null
null
datasets/__init__.py
ZongwuYang/tf-imagenet
7ffdc3059df5e515d891c3722c7229fc72a99705
[ "Apache-2.0" ]
null
null
null
# ============================================================================== # Copyright 2018 Paul Balanca. 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 # # ht...
41.326087
86
0.649132
# ============================================================================== # Copyright 2018 Paul Balanca. 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 # # ht...
0
0
0
0
0
0
0
111
0
d08dd77259abac73bfe28cbfea1ac45a2aebdb36
4,901
py
Python
app/handler.py
aiji42/serverless-expect-fes-setlist-line-itaraction
323631f7d66bdd3a93c239ed8cb4e5984bb9f68f
[ "MIT" ]
null
null
null
app/handler.py
aiji42/serverless-expect-fes-setlist-line-itaraction
323631f7d66bdd3a93c239ed8cb4e5984bb9f68f
[ "MIT" ]
null
null
null
app/handler.py
aiji42/serverless-expect-fes-setlist-line-itaraction
323631f7d66bdd3a93c239ed8cb4e5984bb9f68f
[ "MIT" ]
null
null
null
import os import urllib.request, urllib.parse from linebot import (LineBotApi, WebhookHandler) import logging logger = logging.getLogger() logger.setLevel(logging.ERROR) line_bot_api = LineBotApi(os.environ["LINE_CHANNEL_ACCESS_TOKEN"]) handler = WebhookHandler(os.environ["LINE_CHANNEL_SECRET"])
35.773723
149
0.649459
import os import json import re import collections from bs4 import BeautifulSoup import urllib.request, urllib.parse, urllib.error from linebot import ( LineBotApi, WebhookHandler ) from linebot.models import ( MessageEvent, PostbackEvent, TextMessage, TextSendMessage, TemplateSendMessage, PostbackAction, B...
261
1,752
0
0
0
2,300
0
188
270
fd55ac6494fee1ff51dde69729bc9482441c4a60
1,730
py
Python
Chapter06/pyImage/inferance.py
PacktPublishing/Artificial-Intelligence-for-IoT-Cookbook
c2f522c2a1dbb78c99e05abc3c0e8706618f4353
[ "MIT" ]
19
2019-11-06T08:00:03.000Z
2022-01-01T20:02:40.000Z
Chapter06/pyImage/inferance.py
PacktPublishing/Artificial-Intelligence-for-IoT-Cookbook
c2f522c2a1dbb78c99e05abc3c0e8706618f4353
[ "MIT" ]
null
null
null
Chapter06/pyImage/inferance.py
PacktPublishing/Artificial-Intelligence-for-IoT-Cookbook
c2f522c2a1dbb78c99e05abc3c0e8706618f4353
[ "MIT" ]
9
2020-02-17T23:44:16.000Z
2022-02-03T15:26:46.000Z
import matplotlib.pyplot as plt import torch from torchvision import transforms test_transforms = transforms.Compose([transforms.Resize(224), transforms.ToTensor(), ]) device = torch.device("cuda" if tor...
29.827586
79
0.672254
import matplotlib.pyplot as plt import numpy as np import torch from torch import nn from torch import optim import torch.nn.functional as F from torchvision import datasets, transforms, models from PIL import Image from torch.autograd import Variable test_transforms = transforms.Compose([transforms.Resize(224), ...
0
0
0
0
0
719
0
40
181
544bde56520e6378977c7c97fdc55c0181fb31be
442
py
Python
DiscordEconomy/__init__.py
Nohet/DiscordEconomy
e721a6435bc0ffb40aee99062ff0addfa5d2ae89
[ "MIT" ]
null
null
null
DiscordEconomy/__init__.py
Nohet/DiscordEconomy
e721a6435bc0ffb40aee99062ff0addfa5d2ae89
[ "MIT" ]
null
null
null
DiscordEconomy/__init__.py
Nohet/DiscordEconomy
e721a6435bc0ffb40aee99062ff0addfa5d2ae89
[ "MIT" ]
2
2021-08-31T09:17:05.000Z
2021-10-05T17:09:35.000Z
__title__ = "DiscordEconomy" __summary__ = "Discord.py, other libs, and forks(pycord, nextcord etc.) extension to create economy easily." __uri__ = "https://github.com/Nohet/DiscordEconomy" __version__ = "1.3.2" __author__ = "Nohet" __email__ = "igorczupryniak503@gmail.com" __license__ = "MIT License" __copyri...
26
109
0.726244
from .economy import * __title__ = "DiscordEconomy" __summary__ = "Discord.py, other libs, and forks(pycord, nextcord etc.) extension to create economy easily." __uri__ = "https://github.com/Nohet/DiscordEconomy" __version__ = "1.3.2" __author__ = "Nohet" __email__ = "igorczupryniak503@gmail.com" __license__ =...
0
0
27
0
0
0
0
1
48
6a38b2346198a2320edefd7e658bec657962e280
1,498
py
Python
setup.py
pesser/splatting
1427d7c4204282d117403b35698d489e0324287f
[ "MIT" ]
3
2021-02-23T19:25:35.000Z
2021-05-31T12:53:53.000Z
setup.py
pesser/splatting
1427d7c4204282d117403b35698d489e0324287f
[ "MIT" ]
null
null
null
setup.py
pesser/splatting
1427d7c4204282d117403b35698d489e0324287f
[ "MIT" ]
1
2021-07-29T19:58:11.000Z
2021-07-29T19:58:11.000Z
import os, re if "CONDA_PREFIX" in os.environ: # fix compilation in conda env if "CUDA_HOME" not in os.environ and os.path.exists( os.path.join(os.environ["CONDA_PREFIX"], "bin/nvcc")): print("Detected CONDA_PREFIX containing nvcc but no CUDA_HOME, " "setting CUDA_HOME=${CONDA_...
31.87234
88
0.62016
import os, re if "CONDA_PREFIX" in os.environ: # fix compilation in conda env if "CUDA_HOME" not in os.environ and os.path.exists( os.path.join(os.environ["CONDA_PREFIX"], "bin/nvcc")): print("Detected CONDA_PREFIX containing nvcc but no CUDA_HOME, " "setting CUDA_HOME=${CONDA_...
0
0
0
0
0
0
0
-10
22
84068d8e94014d1e5063c9011f1b24662220bdf0
8,015
py
Python
src/main.py
gregbartell/mf83_solitaire_solver
3c02eb87c62bc9cde72bc3c5f4641648cc8fff2f
[ "Unlicense" ]
null
null
null
src/main.py
gregbartell/mf83_solitaire_solver
3c02eb87c62bc9cde72bc3c5f4641648cc8fff2f
[ "Unlicense" ]
null
null
null
src/main.py
gregbartell/mf83_solitaire_solver
3c02eb87c62bc9cde72bc3c5f4641648cc8fff2f
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 # NOTE: you will need to make sure that you have opencv installed for the confidence argument to work with pyautogui import pyautogui import subprocess import time from collections import namedtuple card_image_paths = ["../screenshots/" + card + ".png" for card in ["ace", "two", "three", "four"...
41.102564
146
0.617592
#!/usr/bin/env python3 # NOTE: you will need to make sure that you have opencv installed for the confidence argument to work with pyautogui import pyautogui import subprocess import sys import time from collections import Counter, namedtuple card_image_paths = ["../screenshots/" + card + ".png" for card in ["ace", "t...
0
0
0
0
0
1,473
0
-2
113
71ad251bc83a53dd9333972759d373f3e8ba9478
935
py
Python
Ch9/delUneededFiles.py
AdamPellot/AutomateTheBoringStuffProjects
d2f2456a04f6eade5cf19f771c7118a79f696eba
[ "MIT" ]
null
null
null
Ch9/delUneededFiles.py
AdamPellot/AutomateTheBoringStuffProjects
d2f2456a04f6eade5cf19f771c7118a79f696eba
[ "MIT" ]
null
null
null
Ch9/delUneededFiles.py
AdamPellot/AutomateTheBoringStuffProjects
d2f2456a04f6eade5cf19f771c7118a79f696eba
[ "MIT" ]
null
null
null
#! python3 # delUneededFiles.py - Walks through a folder tree and searches for # exceptionally large files or folderssay, ones # that have a file size of more than 100MB. Print # these files with their absolute path to the # screen. # A...
37.4
75
0.649198
#! python3 # delUneededFiles.py - Walks through a folder tree and searches for # exceptionally large files or folders—say, ones # that have a file size of more than 100MB. Print # these files with their absolute path to the # screen. # ...
3
0
0
0
0
0
0
-8
22
8d22c7b49d1335d8c7949dcc9045bffe088e92b9
5,474
py
Python
covidprognosis/data/nih_chest_xrays.py
OAfzal/CovidPrognosis
1b5b4d0d712b8fee94279df02a634b61d6d5a3a0
[ "MIT" ]
151
2021-01-13T19:50:19.000Z
2022-03-30T07:16:10.000Z
covidprognosis/data/nih_chest_xrays.py
OAfzal/CovidPrognosis
1b5b4d0d712b8fee94279df02a634b61d6d5a3a0
[ "MIT" ]
14
2021-01-29T15:11:07.000Z
2022-01-28T04:34:03.000Z
covidprognosis/data/nih_chest_xrays.py
OAfzal/CovidPrognosis
1b5b4d0d712b8fee94279df02a634b61d6d5a3a0
[ "MIT" ]
35
2021-01-15T21:21:50.000Z
2022-01-17T06:17:04.000Z
""" Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """
32.583333
87
0.555718
""" 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 typing import Callable, Dict, List, Optional, Union import numpy as np import pandas as pd from .base_dataset ...
0
415
0
4,696
0
0
0
27
157
5bc9a58f14f30a6659749e932a9202a8abe48337
2,920
py
Python
decode.py
BUTSpeechFIT/vq-aud
088492e5d02b6e5cb6126b27da869704cd2c9e2c
[ "MIT" ]
null
null
null
decode.py
BUTSpeechFIT/vq-aud
088492e5d02b6e5cb6126b27da869704cd2c9e2c
[ "MIT" ]
null
null
null
decode.py
BUTSpeechFIT/vq-aud
088492e5d02b6e5cb6126b27da869704cd2c9e2c
[ "MIT" ]
null
null
null
if __name__ == '__main__': main()
39.459459
102
0.594178
import os import sys import argparse import utils def load_from_dir(nnet_dir, device): import models model_classname = open(os.path.join(nnet_dir, 'nnet_kind.txt')).read().strip() model_kind = models.get_model(model_classname) model = model_kind.load_from_dir(nnet_dir, map_location=device) ...
0
0
0
0
0
2,768
0
-38
142
3efd05e2b16c6e2342e62db4c04766ab152fb9ba
608
py
Python
tests.py
goztrk/django-htk
c56bf112e5d627780d2f4288460eae5cce80fa9e
[ "MIT" ]
206
2015-10-15T07:05:08.000Z
2021-02-19T11:48:36.000Z
tests.py
goztrk/django-htk
c56bf112e5d627780d2f4288460eae5cce80fa9e
[ "MIT" ]
8
2017-10-16T10:18:31.000Z
2022-03-09T14:24:27.000Z
tests.py
goztrk/django-htk
c56bf112e5d627780d2f4288460eae5cce80fa9e
[ "MIT" ]
61
2015-10-15T08:12:44.000Z
2022-03-10T12:25:06.000Z
#################### # Finally, import tests from subdirectories last to prevent circular import
28.952381
75
0.689145
from htk.test_scaffold.models import TestScaffold from htk.test_scaffold.tests import BaseTestCase from htk.test_scaffold.tests import BaseWebTestCase from htk.constants import * class HtkWebViewsTestCase(BaseWebTestCase): def test_error_pages(self): view_names = ( 'error_403', 'er...
0
0
0
247
0
0
0
107
156
cc4364834405df74525f7feaf4acc5b014cc0b72
23,112
py
Python
sdk/python/pulumi_azure/appservice/app_service.py
suresh198526/pulumi-azure
bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/appservice/app_service.py
suresh198526/pulumi-azure
bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/appservice/app_service.py
suresh198526/pulumi-azure
bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import pulumi from .. import _utilities, _tables __all__ = ['AppService']
53.009174
242
0.677051
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilitie...
0
12,959
0
9,726
0
0
0
32
134
a983892c4684a61ec17c01c2092469fb87b0c735
5,733
py
Python
process/sample.py
AlbertiPot/nar
eb081f0e1ee16c2b1eb5e6e2afd41254cd7dce28
[ "BSD-3-Clause" ]
2
2022-02-08T06:45:41.000Z
2022-02-09T03:49:54.000Z
process/sample.py
AlbertiPot/nar
eb081f0e1ee16c2b1eb5e6e2afd41254cd7dce28
[ "BSD-3-Clause" ]
null
null
null
process/sample.py
AlbertiPot/nar
eb081f0e1ee16c2b1eb5e6e2afd41254cd7dce28
[ "BSD-3-Clause" ]
null
null
null
import torch
41.543478
168
0.6869
import torch import time import random import torch.utils.data import torch.nn.functional as F from dataset import NASBenchDataset, SplitSubet from sampler import ArchSampler from .train_utils import * def evaluate_sampled_batch(model, sampler : ArchSampler, tier_list, batch_statics_dict, dataset : NASBenchDataset, ...
0
0
0
0
0
5,507
0
35
179
25b4895e6bf5d57fb5261b42596c049b8a96134d
14,537
py
Python
example/example4/ExampleScript_DL.py
sanjayg0/PLoM
d1a090fc316c296a1e3ec46598886bb9a6206471
[ "MIT" ]
null
null
null
example/example4/ExampleScript_DL.py
sanjayg0/PLoM
d1a090fc316c296a1e3ec46598886bb9a6206471
[ "MIT" ]
null
null
null
example/example4/ExampleScript_DL.py
sanjayg0/PLoM
d1a090fc316c296a1e3ec46598886bb9a6206471
[ "MIT" ]
1
2022-01-27T17:15:24.000Z
2022-01-27T17:15:24.000Z
#!/usr/bin/env python # coding: utf-8 # ## Damage and Loss Assessment (12-story RC frame) # # This example continues the example2 to conduct damage and loss assessment using the PLoM model and compare the results against the results based on MSA # ### Run example2 import numpy as np import pandas as pd import matpl...
31.879386
426
0.675174
#!/usr/bin/env python # coding: utf-8 # ## Damage and Loss Assessment (12-story RC frame) # # This example continues the example2 to conduct damage and loss assessment using the PLoM model and compare the results against the results based on MSA # ### Run example2 import numpy as np import random import time from m...
0
0
0
0
0
0
0
-24
110
e74ee302a0d4f8e6bef549312e085aefbaf2a733
267
py
Python
juniper_official/Solutions/EX-KPIs-monitoring/diff-percentage.py
vvikramb/healthbot-rules
72bdad144bebb512e9ac32d607b5924d96225334
[ "Apache-2.0", "BSD-3-Clause" ]
43
2018-11-27T00:42:45.000Z
2022-02-24T01:19:39.000Z
juniper_official/Solutions/EX-KPIs-monitoring/diff-percentage.py
vvikramb/healthbot-rules
72bdad144bebb512e9ac32d607b5924d96225334
[ "Apache-2.0", "BSD-3-Clause" ]
266
2018-10-26T10:19:04.000Z
2022-03-16T04:38:29.000Z
juniper_official/Solutions/EX-KPIs-monitoring/diff-percentage.py
vvikramb/healthbot-rules
72bdad144bebb512e9ac32d607b5924d96225334
[ "Apache-2.0", "BSD-3-Clause" ]
99
2018-10-25T09:53:55.000Z
2021-12-07T09:51:59.000Z
from __future__ import division
29.666667
56
0.726592
from __future__ import division def diff_percentage(max_count, min_count, **kwargs): difference_count = int(max_count) - int(min_count) if difference_count == 0: return 0 variation = int(difference_count/int(min_count))*100 return variation
0
0
0
0
0
212
0
0
23
72308a06717bdd54ae6fb621a24be73315bf28a2
6,246
py
Python
pyinjective/proto/exchange/injective_auction_rpc_pb2_grpc.py
CtheSky/sdk-python
c1b1ae931f4970832466a004eb193027bdc1dea5
[ "Apache-2.0" ]
10
2021-09-07T08:03:52.000Z
2022-03-08T08:39:30.000Z
pyinjective/proto/exchange/injective_auction_rpc_pb2_grpc.py
CtheSky/sdk-python
c1b1ae931f4970832466a004eb193027bdc1dea5
[ "Apache-2.0" ]
39
2021-08-19T20:09:35.000Z
2022-03-22T19:51:59.000Z
pyinjective/proto/exchange/injective_auction_rpc_pb2_grpc.py
CtheSky/sdk-python
c1b1ae931f4970832466a004eb193027bdc1dea5
[ "Apache-2.0" ]
5
2021-11-02T16:23:48.000Z
2022-01-20T22:30:05.000Z
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" # This class is part of an EXPERIMENTAL API.
44.935252
123
0.694685
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from exchange import injective_auction_rpc_pb2 as exchange_dot_injective__auction__rpc__pb2 class InjectiveAuctionRPCStub(object): """InjectiveAuctionRPC d...
0
2,118
0
2,411
0
1,324
0
60
136
d0bcb99484e5e8980e30e635e29847cb661bcabd
1,707
py
Python
daycare.py
nanomosfet/startbootstrap-creative
7489efd2fa109bd69e7e5c8f248e44f4aff13cc6
[ "MIT" ]
null
null
null
daycare.py
nanomosfet/startbootstrap-creative
7489efd2fa109bd69e7e5c8f248e44f4aff13cc6
[ "MIT" ]
null
null
null
daycare.py
nanomosfet/startbootstrap-creative
7489efd2fa109bd69e7e5c8f248e44f4aff13cc6
[ "MIT" ]
null
null
null
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
29.431034
79
0.673697
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
0
0
0
500
0
0
0
45
192
f34a8e256c671951d588fb57c741d18eea4ce458
14,337
py
Python
Voicelab/toolkits/Voicelab/F1F2PlotNode.py
KorewaLidesu/VoiceLab
afae638b94fd6bb52d6269122636a6f125651f13
[ "MIT" ]
null
null
null
Voicelab/toolkits/Voicelab/F1F2PlotNode.py
KorewaLidesu/VoiceLab
afae638b94fd6bb52d6269122636a6f125651f13
[ "MIT" ]
null
null
null
Voicelab/toolkits/Voicelab/F1F2PlotNode.py
KorewaLidesu/VoiceLab
afae638b94fd6bb52d6269122636a6f125651f13
[ "MIT" ]
null
null
null
from parselmouth.praat import call import io import pandas as pd import matplotlib.cm as cm import matplotlib.transforms as transforms import numpy as np ################################################################################################### # F1F2PlotNode # WARIO pipeline node for estimating the vocal ...
36.57398
185
0.537281
from Voicelab.pipeline.Node import Node import parselmouth from parselmouth.praat import call from Voicelab.toolkits.Voicelab.VoicelabNode import VoicelabNode from Voicelab.toolkits.Voicelab.MeasureFormantNode import MeasureFormantNode from Voicelab.VoicelabWizard.VoicelabTab import VoicelabTab from Voicelab.VoicelabWi...
0
0
0
11,815
0
0
0
296
399
887dabde0da3f8b7a4658b2aec83eec101e1cad8
10,305
py
Python
pypiserver/backend.py
GeekMasherOrg/pypiserver
562dbbbfc5783aea160ef44f2c824860ab35a248
[ "MIT" ]
null
null
null
pypiserver/backend.py
GeekMasherOrg/pypiserver
562dbbbfc5783aea160ef44f2c824860ab35a248
[ "MIT" ]
null
null
null
pypiserver/backend.py
GeekMasherOrg/pypiserver
562dbbbfc5783aea160ef44f2c824860ab35a248
[ "MIT" ]
null
null
null
import hashlib import logging import os import typing as t from .core import PkgFile if t.TYPE_CHECKING: log = logging.getLogger(__name__) PathLike = t.Union[str, os.PathLike] def write_file(fh: t.BinaryIO, destination: PathLike) -> None: """write a byte stream into a destination file. Writes are chunked...
31.610429
80
0.635032
import abc import functools import hashlib import itertools import logging import os import typing as t from pathlib import Path from .cache import CacheManager, ENABLE_CACHING from .core import PkgFile from .pkg_helpers import ( normalize_pkgname, is_listed_path, guess_pkgname_and_version, ) if t.TYPE_CH...
0
2,001
0
5,011
1,031
236
0
118
631
50fedeeb0a8b0e4fab75f1a80ff905da32cd4052
1,056
py
Python
photobooth.py
roryj/photobomb
f75366404b2808be5a0ac2385a6c5a9d4f5c7851
[ "Apache-2.0" ]
null
null
null
photobooth.py
roryj/photobomb
f75366404b2808be5a0ac2385a6c5a9d4f5c7851
[ "Apache-2.0" ]
null
null
null
photobooth.py
roryj/photobomb
f75366404b2808be5a0ac2385a6c5a9d4f5c7851
[ "Apache-2.0" ]
null
null
null
if __name__ == "__main__": main()
24.55814
80
0.617424
import argparse from pathlib import Path from lib.photobooth import Photobooth, PhotoPrinter, RandomStaticPhoto def main(): parser = argparse.ArgumentParser(description="Some spooky ass photobombing") parser.add_argument( "--input-files", nargs="+", help="""the list of images to inclu...
0
0
0
0
0
879
0
46
90
505ed46d267856de4a0f5f290547d7e70da255b0
2,597
py
Python
graph_weather/models/layers/processor.py
openclimatefix/graph_weather
e00b75418d62181d213fede2925bb100b4091f57
[ "MIT" ]
6
2022-02-25T09:27:57.000Z
2022-03-28T22:26:56.000Z
graph_weather/models/layers/processor.py
openclimatefix/graph_weather
e00b75418d62181d213fede2925bb100b4091f57
[ "MIT" ]
11
2022-02-25T08:24:17.000Z
2022-03-30T18:31:16.000Z
graph_weather/models/layers/processor.py
openclimatefix/graph_weather
e00b75418d62181d213fede2925bb100b4091f57
[ "MIT" ]
null
null
null
"""Processor for the latent graph In the original paper the processor is described as The Processor iteratively processes the 256-channel latent feature data on the icosahedron grid using 9 rounds of message-passing GNNs. During each round, a node exchanges information with itself and its immediate neighbors. There a...
35.575342
100
0.659992
"""Processor for the latent graph In the original paper the processor is described as The Processor iteratively processes the 256-channel latent feature data on the icosahedron grid using 9 rounds of message-passing GNNs. During each round, a node exchanges information with itself and its immediate neighbors. There a...
0
0
0
2,105
0
0
0
40
68
db99d7b50bb22bb56bc201d9b14ecbfc6b6597a8
2,289
py
Python
scripts/commit_validation/commit_validation/validators/crc_validator.py
whywhywhyw/o3de
8e09f66799d4c8f188d45861d821e8656a554cb1
[ "Apache-2.0", "MIT" ]
11
2021-07-08T09:58:26.000Z
2022-03-17T17:59:26.000Z
scripts/commit_validation/commit_validation/validators/crc_validator.py
whywhywhyw/o3de
8e09f66799d4c8f188d45861d821e8656a554cb1
[ "Apache-2.0", "MIT" ]
29
2021-07-06T19:33:52.000Z
2022-03-22T10:27:49.000Z
scripts/commit_validation/commit_validation/validators/crc_validator.py
whywhywhyw/o3de
8e09f66799d4c8f188d45861d821e8656a554cb1
[ "Apache-2.0", "MIT" ]
4
2021-07-06T19:24:43.000Z
2022-03-31T12:42:27.000Z
# # Copyright (c) Contributors to the Open 3D Engine Project. # For complete copyright and license terms please see the LICENSE at the root of this distribution. # # SPDX-License-Identifier: Apache-2.0 OR MIT # # from typing import Type def get_validator() -> Type[CrcValidator]: """Returns the validator class for...
46.714286
137
0.602446
# # Copyright (c) Contributors to the Open 3D Engine Project. # For complete copyright and license terms please see the LICENSE at the root of this distribution. # # SPDX-License-Identifier: Apache-2.0 OR MIT # # import binascii import fnmatch import pathlib import re from typing import Type, List from commit_validat...
0
0
0
1,707
0
0
0
87
135
8dda0fa32095fbf8216f13fbda3a9ed036e7698a
371
py
Python
acmicpc/1076/1076.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
3
2019-03-09T05:19:23.000Z
2019-04-06T09:26:36.000Z
acmicpc/1076/1076.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
1
2020-02-23T10:38:04.000Z
2020-02-23T10:38:04.000Z
acmicpc/1076/1076.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
1
2019-05-22T13:47:53.000Z
2019-05-22T13:47:53.000Z
resistor = {'black':0, 'brown':1, 'red':2, 'orange':3, 'yellow':4, 'green': 5, 'blue':6, 'violet':7, 'grey':8, 'white':9} first = str(resistor[input()]) if first == 0: first = '' second = str(resistor[input()]) if second == 0: second = '' answer = int(first + second) third = 10**resistor[input()] if answer ==...
21.823529
121
0.571429
resistor = {'black':0, 'brown':1, 'red':2, 'orange':3, 'yellow':4, 'green': 5, 'blue':6, 'violet':7, 'grey':8, 'white':9} first = str(resistor[input()]) if first == 0: first = '' second = str(resistor[input()]) if second == 0: second = '' answer = int(first + second) third = 10**resistor[input()] if answer ==...
0
0
0
0
0
0
0
0
0
f61694dc7d853e928e491991d31a759f86ce1810
1,026
py
Python
Practice(Beginner)/FLOW014.py
8Bit1Byte/Codechef-Solutions
a79d64042da04e007c5101d3c784a843df01f852
[ "MIT" ]
2
2021-05-24T11:20:46.000Z
2021-06-18T12:21:43.000Z
Practice(Beginner)/FLOW014.py
8Bit1Byte/CodechefSolutions
a79d64042da04e007c5101d3c784a843df01f852
[ "MIT" ]
null
null
null
Practice(Beginner)/FLOW014.py
8Bit1Byte/CodechefSolutions
a79d64042da04e007c5101d3c784a843df01f852
[ "MIT" ]
null
null
null
''' Problem Name: Grade The Steel Problem Code: FLOW014 Problem Type: https://www.codechef.com/problems/school Problem Link: https://www.codechef.com/problems/FLOW014 Solution Link: https://www.codechef.com/viewsolution/46845982 ''' from sys import stdin if __name__ == '__main__': t = int(std...
28.5
73
0.576998
''' Problem Name: Grade The Steel Problem Code: FLOW014 Problem Type: https://www.codechef.com/problems/school Problem Link: https://www.codechef.com/problems/FLOW014 Solution Link: https://www.codechef.com/viewsolution/46845982 ''' from sys import stdin, stdout def main(t): curInx = t wh...
0
0
0
0
0
648
0
8
23
1448808aed17c2d8d7ba348ba21aff1e330f5e23
8,067
py
Python
test.py
1337235931/tensorflow-bee-yolov3_lastversion
daab74071a992bbb5c1e991b7618d8adef8321c3
[ "MIT" ]
1
2021-07-04T04:11:01.000Z
2021-07-04T04:11:01.000Z
test.py
1337235931/tensorflow-bee-yolov3_lastversion
daab74071a992bbb5c1e991b7618d8adef8321c3
[ "MIT" ]
null
null
null
test.py
1337235931/tensorflow-bee-yolov3_lastversion
daab74071a992bbb5c1e991b7618d8adef8321c3
[ "MIT" ]
null
null
null
#! /usr/bin/env python # coding=utf-8 import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import core.utils as utils return_elements = ["input/input_data:0", "pred_sbbox/concat_2:0", "pred_mbbox/concat_2:0", "pred_lbbox/concat_2:0"] pb_file = "./yolov3_bee.pb" dirpath = './VOC2007/JPEGImag...
41.369231
125
0.460022
#! /usr/bin/env python # coding=utf-8 import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import cv2 import numpy as np import core.utils as utils import tensorflow as tf import re from PIL import Image import xml.etree.ElementTree as ET from xml.etree import ElementTree # 导入ElementTree模块 return_elements = ["input/inpu...
900
0
0
0
0
7,148
0
1
215
1c4584ac1bc01ab917fbb00db92b230e45196a27
5,228
py
Python
export.py
OleksandrBlack/safecoinnodes
0021edc8e72e078fcd7bedb465292c96caeeb148
[ "MIT" ]
null
null
null
export.py
OleksandrBlack/safecoinnodes
0021edc8e72e078fcd7bedb465292c96caeeb148
[ "MIT" ]
null
null
null
export.py
OleksandrBlack/safecoinnodes
0021edc8e72e078fcd7bedb465292c96caeeb148
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # export.py - Exports enumerated data for reachable nodes into a JSON file. # # Copyright (c) Addy Yeow Chin Heng <ayeowch@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (th...
32.271605
79
0.655318
#!/usr/bin/env python # -*- coding: utf-8 -*- # # export.py - Exports enumerated data for reachable nodes into a JSON file. # # Copyright (c) Addy Yeow Chin Heng <ayeowch@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (th...
0
0
0
0
0
1,609
0
20
46
792a4f6c77e7eb1074ad85c3e990c257d8cd4247
3,305
py
Python
report.py
omelinb/Employees-report
74412bfe520a3bb6d771cba05ecf6077a9f9543f
[ "MIT" ]
null
null
null
report.py
omelinb/Employees-report
74412bfe520a3bb6d771cba05ecf6077a9f9543f
[ "MIT" ]
null
null
null
report.py
omelinb/Employees-report
74412bfe520a3bb6d771cba05ecf6077a9f9543f
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("datafile", type=str, help="name of file with employees data") parser.add_argument("-g", "--group_size", type=int, help="count of skills in skills group") args = parser.parse_args() ...
34.427083
115
0.544024
#!/usr/bin/python3 import os import csv import sys import argparse from statistics import median from collections import OrderedDict class Report: def __init__(self, datafile, group_size=3): self.datafile = datafile self.group_size = group_size def _calculate_medians(self, data): ...
0
0
0
2,739
0
0
0
-12
133
b6b09565814145d42a96ccc254c7b72460ee6fdd
4,396
py
Python
explorer/models/overview.py
AthenaExplorer/xm_s_explorer_v2
203f7b5d129552f5b7c977c4247d2060956f8add
[ "MIT" ]
null
null
null
explorer/models/overview.py
AthenaExplorer/xm_s_explorer_v2
203f7b5d129552f5b7c977c4247d2060956f8add
[ "MIT" ]
null
null
null
explorer/models/overview.py
AthenaExplorer/xm_s_explorer_v2
203f7b5d129552f5b7c977c4247d2060956f8add
[ "MIT" ]
1
2022-03-02T19:20:52.000Z
2022-03-02T19:20:52.000Z
import mongoengine.fields as fields
49.393258
83
0.710419
import mongoengine.fields as fields from base.db.mongo import MongoBaseModel, Decimal2Field class Overview(MongoBaseModel): power = Decimal2Field(help_text="有效算力", precision=0, default=0) raw_power = Decimal2Field(help_text="原值算力", precision=0, default=0) active_miner_count = fields.LongField(help_text="活...
585
0
0
4,037
0
0
0
34
91
42ed2a7474ede574416e5a194487875551b3ed30
1,035
py
Python
db.py
a13ph/text-to-notion-bot
0de684b64535658e514492cee14fb841837f8e88
[ "MIT" ]
1
2021-02-12T19:02:43.000Z
2021-02-12T19:02:43.000Z
db.py
a13ph/text-to-notion-bot
0de684b64535658e514492cee14fb841837f8e88
[ "MIT" ]
null
null
null
db.py
a13ph/text-to-notion-bot
0de684b64535658e514492cee14fb841837f8e88
[ "MIT" ]
null
null
null
import os from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker Base = declarative_base() engine = create_engine(os.environ['DATABASE_URL_NOTION']) DBSession = sessionmaker(bind=engine) session = DBSession() if not engine.dialect.has_ta...
27.236842
73
0.730435
import os from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String from sqlalchemy.orm import sessionmaker Base = declarative_base() engine = create_engine(os.environ['DATABASE_URL_NOTION']) DBSession = sessionmaker(bind=engine) sessio...
0
0
0
218
0
316
0
25
91
cca3c9716c20ebc6cc31ba13d055d6e2b921d401
1,574
py
Python
src/ros_drawsquare/scripts/draw.py
mynameisvinn/catkin_ws
d63eca698b91add14d18ae87d1bc884a36d460f6
[ "MIT" ]
null
null
null
src/ros_drawsquare/scripts/draw.py
mynameisvinn/catkin_ws
d63eca698b91add14d18ae87d1bc884a36d460f6
[ "MIT" ]
null
null
null
src/ros_drawsquare/scripts/draw.py
mynameisvinn/catkin_ws
d63eca698b91add14d18ae87d1bc884a36d460f6
[ "MIT" ]
null
null
null
#!/usr/bin/env python if __name__ == '__main__': DrawASquare()
30.862745
96
0.63723
#!/usr/bin/env python import rospy from geometry_msgs.msg import Twist from math import radians def DrawASquare(): # initiliaze a ros node called drawawquare rospy.init_node('drawasquare', anonymous=False) # What to do you ctrl + c rospy.on_shutdown(myshutdowncallback) # create a pub...
0
0
0
0
0
1,365
0
8
133
6005bb0f9590a149e8faf384eba0e724ce2ad5a3
5,714
py
Python
applications/volnet/export_volnet.py
shamanDevel/fV-SRN
966926ee678a0db0f1c67661537c4bb7eec0c56f
[ "MIT" ]
13
2021-12-06T05:08:09.000Z
2022-03-07T15:11:06.000Z
applications/volnet/export_volnet.py
shamanDevel/fV-SRN
966926ee678a0db0f1c67661537c4bb7eec0c56f
[ "MIT" ]
1
2022-02-07T10:07:44.000Z
2022-02-24T14:13:50.000Z
applications/volnet/export_volnet.py
shamanDevel/fV-SRN
966926ee678a0db0f1c67661537c4bb7eec0c56f
[ "MIT" ]
5
2021-12-13T07:02:23.000Z
2022-01-12T15:46:44.000Z
""" Exports the trained networks to the renderer """ import sys import os sys.path.insert(0, os.getcwd()) if __name__ == '__main__': __main()
41.405797
110
0.666608
""" Exports the trained networks to the renderer """ import sys import os sys.path.insert(0, os.getcwd()) import torch import h5py import argparse import io from typing import Union from collections import OrderedDict from tests.volnet.network import InputParametrization, OutputParametrization, SceneNetwork from dif...
2
0
0
4,198
0
1,027
0
70
269
9fb48fd2f1044fca482e3d8b3a6addb631e34497
4,776
py
Python
scripts/sort_concat_format_seqs.py
liberjul/Benniella_phylogenetics
532a2d3d6cbc5d480b4c98c5cb3b0bf927f4fdf9
[ "MIT" ]
null
null
null
scripts/sort_concat_format_seqs.py
liberjul/Benniella_phylogenetics
532a2d3d6cbc5d480b4c98c5cb3b0bf927f4fdf9
[ "MIT" ]
null
null
null
scripts/sort_concat_format_seqs.py
liberjul/Benniella_phylogenetics
532a2d3d6cbc5d480b4c98c5cb3b0bf927f4fdf9
[ "MIT" ]
null
null
null
#!/usr/bin/env python import glob, argparse parser = argparse.ArgumentParser() parser.add_argument("-i", "--input", type=str, help="input FASTA") parser.add_argument("-o", "--output", type=str, help="output files path and prefix") args = parser.parse_args() fastas = glob.glob(args.input) header_list = [] seq_dict = ...
32.489796
164
0.565536
#!/usr/bin/env python import glob, os, argparse def external_unknown(seq, char="N"): first_char_pos = len(seq) last_char_pos = -1 for i in range(len(seq)): if seq[i] != "-": first_char_pos = i break for i in range(len(seq)): if seq[len(seq) - i - 1] != "-": ...
0
0
0
0
0
692
0
4
46
67e8aad0e66283178743149022d323644a36b6e5
2,277
py
Python
tests/sql/test_sql_filters.py
rhideg/python-query-filter-builder
7b84fb28743990fab353c1776612f492702051d8
[ "MIT" ]
null
null
null
tests/sql/test_sql_filters.py
rhideg/python-query-filter-builder
7b84fb28743990fab353c1776612f492702051d8
[ "MIT" ]
null
null
null
tests/sql/test_sql_filters.py
rhideg/python-query-filter-builder
7b84fb28743990fab353c1776612f492702051d8
[ "MIT" ]
null
null
null
simple_obj = { "version": 0.1, "filters": [ { "col": "col1", "value": "asd", }, { "col": "col2", "value": "~asd", }, { "col": "col3", "value": "<42>=40" }, { "col": "col4"...
27.107143
133
0.444444
from query_filter_builder.sql.sql_filters import convert_to_sql_with_params simple_obj = { "version": 0.1, "filters": [ { "col": "col1", "value": "asd", }, { "col": "col2", "value": "~asd", }, { "col": "col3", ...
0
0
0
0
0
976
0
54
91
22ea549d48256651eb4b860338f98a6e12017b36
3,565
py
Python
Windows/main/StonePaperScissorv2.py
balaji303/stonepaperpi
7bf33c20109c43b5549520bda1d836898ee20991
[ "MIT" ]
null
null
null
Windows/main/StonePaperScissorv2.py
balaji303/stonepaperpi
7bf33c20109c43b5549520bda1d836898ee20991
[ "MIT" ]
null
null
null
Windows/main/StonePaperScissorv2.py
balaji303/stonepaperpi
7bf33c20109c43b5549520bda1d836898ee20991
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------ # StonePaperPi # Please review ReadMe for instructions on how to build and run the program # # (c) 2022 by Balaji # MIT License # paper # scissor # stone # pip install lobe # pip3 install --extra-index-url https://google-coral.github.io/py-repo...
27.635659
133
0.542777
# ------------------------------------------------------------------------ # StonePaperPi # Please review ReadMe for instructions on how to build and run the program # # (c) 2022 by Balaji # MIT License # paper # scissor # stone # pip install lobe # pip3 install --extra-index-url https://google-coral.github.io/py-repo...
0
0
0
0
0
1,664
0
0
67
3199fd64e0d3d64f127e0f1ee9ab4451565c3b8e
2,619
py
Python
xls/dslx/fuzzer/ast_generator_test.py
ted-xie/xls
ef48ade3403fffc6481ffd779e49aa7082ee268f
[ "Apache-2.0" ]
null
null
null
xls/dslx/fuzzer/ast_generator_test.py
ted-xie/xls
ef48ade3403fffc6481ffd779e49aa7082ee268f
[ "Apache-2.0" ]
null
null
null
xls/dslx/fuzzer/ast_generator_test.py
ted-xie/xls
ef48ade3403fffc6481ffd779e49aa7082ee268f
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
32.7375
79
0.714395
# Lint as: python3 # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
0
0
0
1,665
0
0
0
71
157
b3e094df207cc0e9ff1ec4a290ccecf33836b54d
541
py
Python
les9.py
DyadyaYasha/git_les
f818b6dbfb19a0e8b634dc58e13f0ba6fd6189d8
[ "Apache-2.0" ]
null
null
null
les9.py
DyadyaYasha/git_les
f818b6dbfb19a0e8b634dc58e13f0ba6fd6189d8
[ "Apache-2.0" ]
null
null
null
les9.py
DyadyaYasha/git_les
f818b6dbfb19a0e8b634dc58e13f0ba6fd6189d8
[ "Apache-2.0" ]
null
null
null
# try: # try n = int(input()) raise TypeError('- ') # except ValueError: # except .. print(' !!') except ImportError as e: # print(e) except (ImportError, TypeError) as a: # print(a) #
28.473684
88
0.7061
# Исключения class CustomError(Exception): pass try: # в блоке try пишется код который потенциально приводит к ошибке n = int(input()) import lalala raise TypeError('Что-то пошло не так') # выбрасывается исключение except ValueError: # except можно типизировать т.е. написать какие ...
448
0
0
17
0
0
0
-8
49
176f22bb031e1f2b7f913d2251d4102880bd9648
7,580
py
Python
autogalaxy/mock/fixtures.py
jonathanfrawley/PyAutoGalaxy
55fb44f22ce5490318378dc31596c887d0d2e29b
[ "MIT" ]
null
null
null
autogalaxy/mock/fixtures.py
jonathanfrawley/PyAutoGalaxy
55fb44f22ce5490318378dc31596c887d0d2e29b
[ "MIT" ]
null
null
null
autogalaxy/mock/fixtures.py
jonathanfrawley/PyAutoGalaxy
55fb44f22ce5490318378dc31596c887d0d2e29b
[ "MIT" ]
null
null
null
# # MODEL # # # PROFILES # # GALAXY # # Plane # # GALAXY DATA # # GALAXY FIT # # HYPER GALAXIES #
24.37299
89
0.692876
import autogalaxy as ag from autoarray.mock.fixtures import * from autofit.mock.mock_search import MockSamples, MockSearch from autogalaxy.plot.mat_wrap.lensing_include import Include1D, Include2D def make_masked_imaging_7x7(): imaging_7x7 = make_imaging_7x7() masked_imaging_7x7 = imaging_7x7.appl...
0
0
0
0
0
6,031
0
109
1,217
84bbaa3bcb2ae4673f501b9874dbb571586c1179
3,731
py
Python
gui/calculator.py
k2ev/PyAppCalc
e846450ddf3a30538d86d6cc0a6af254bb113ec4
[ "MIT" ]
null
null
null
gui/calculator.py
k2ev/PyAppCalc
e846450ddf3a30538d86d6cc0a6af254bb113ec4
[ "MIT" ]
null
null
null
gui/calculator.py
k2ev/PyAppCalc
e846450ddf3a30538d86d6cc0a6af254bb113ec4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'calculator.ui' # # Created by: PyQt5 UI code generator 5.12.1 # # WARNING! All changes made in this file will be lost!
46.6375
75
0.711873
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'calculator.ui' # # Created by: PyQt5 UI code generator 5.12.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): Main...
0
0
0
3,463
0
0
0
21
46
a3989f73ffd7742662d3774141602ff3f824fbff
9,218
py
Python
tests/pytests/functional/modules/test_archive.py
babs/salt
c536ea716d5308880b244e7980f4b659d86fc104
[ "Apache-2.0" ]
2
2017-12-01T19:20:49.000Z
2018-10-03T23:54:12.000Z
tests/pytests/functional/modules/test_archive.py
babs/salt
c536ea716d5308880b244e7980f4b659d86fc104
[ "Apache-2.0" ]
9
2021-03-31T20:25:25.000Z
2021-07-04T05:33:46.000Z
tests/pytests/functional/modules/test_archive.py
babs/salt
c536ea716d5308880b244e7980f4b659d86fc104
[ "Apache-2.0" ]
1
2019-12-17T13:37:16.000Z
2019-12-17T13:37:16.000Z
""" Tests for the archive state """ import pytest import salt.utils.files import salt.utils.path import salt.utils.platform try: HAS_ZIPFILE = True except ImportError: HAS_ZIPFILE = False pytestmark = [ pytest.mark.windows_whitelisted, ]
30.422442
88
0.644066
""" Tests for the archive state """ import os import pathlib import shutil import tempfile import textwrap import attr import pytest import salt.utils.files import salt.utils.path import salt.utils.platform import salt.utils.stringutils try: import zipfile # pylint: disable=unused-import HAS_ZIPFILE = True ...
35
8,366
0
0
0
58
0
-48
559
c5202aca1f24dea8e22296b5b65244b261dc1aa8
602
py
Python
datasources/migrations/0015_datasource_prov_exempt.py
tiferrei/PEDASI
b819aee93de99c00a1aa3eb9d32102b89f72459e
[ "MIT" ]
null
null
null
datasources/migrations/0015_datasource_prov_exempt.py
tiferrei/PEDASI
b819aee93de99c00a1aa3eb9d32102b89f72459e
[ "MIT" ]
18
2019-02-27T12:39:27.000Z
2021-03-24T16:32:47.000Z
datasources/migrations/0015_datasource_prov_exempt.py
Southampton-RSG/PEDASI-IoT
25a111ac7cf4b23fee50ad8eac6ea21564954859
[ "MIT" ]
1
2021-02-16T17:47:15.000Z
2021-02-16T17:47:15.000Z
# Generated by Django 2.0.8 on 2018-12-07 11:17
31.684211
252
0.679402
# Generated by Django 2.0.8 on 2018-12-07 11:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('datasources', '0014_access_control_levels'), ] operations = [ migrations.AddField( model_name='datasource', name='pr...
0
0
0
488
0
0
0
19
46
b8e6373ba1a7ed0ad82fa54546fabfc48fe2f040
1,305
py
Python
PublicWebServicesAPI_AND_servercommandScripts/removeTempCardsJob.py
jopdop30/PaperCutExamples
c2c913877bedf76a876a54957df2891a684d4a6d
[ "MIT" ]
59
2015-10-02T18:42:19.000Z
2022-01-01T09:37:26.000Z
PublicWebServicesAPI_AND_servercommandScripts/removeTempCardsJob.py
jopdop30/PaperCutExamples
c2c913877bedf76a876a54957df2891a684d4a6d
[ "MIT" ]
16
2016-06-16T06:42:49.000Z
2021-08-31T22:49:59.000Z
PublicWebServicesAPI_AND_servercommandScripts/removeTempCardsJob.py
jopdop30/PaperCutExamples
c2c913877bedf76a876a54957df2891a684d4a6d
[ "MIT" ]
20
2015-09-09T16:27:33.000Z
2020-11-12T18:17:36.000Z
#!/usr/bin/env python3 # If a user has staretd using a temp card this job will remove the card from the card field import xmlrpc.client host="http://localhost:9191/rpc/api/xmlrpc" # If not localhost then this address will need to be whitelisted in PaperCut auth="atoken" # Value defined in advanced config p...
39.545455
121
0.668199
#!/usr/bin/env python3 # If a user has staretd using a temp card this job will remove the card from the card field import xmlrpc.client import sys host="http://localhost:9191/rpc/api/xmlrpc" # If not localhost then this address will need to be whitelisted in PaperCut auth="atoken" # Value defined in advan...
0
0
0
0
0
0
0
-11
23
5ea593bfc335ba0a2d02fff745998199c998f1a9
4,598
py
Python
jorldy/core/agent/reinforce.py
Kyushik/JORLDY
6a24a2195e5e87ade157ee53f631af2221f0a188
[ "Apache-2.0" ]
300
2021-11-03T07:06:34.000Z
2022-03-24T02:23:56.000Z
jorldy/core/agent/reinforce.py
Kyushik/JORLDY
6a24a2195e5e87ade157ee53f631af2221f0a188
[ "Apache-2.0" ]
37
2021-11-04T04:31:07.000Z
2022-03-30T01:40:49.000Z
jorldy/core/agent/reinforce.py
Kyushik/JORLDY
6a24a2195e5e87ade157ee53f631af2221f0a188
[ "Apache-2.0" ]
45
2021-11-03T08:05:56.000Z
2022-03-24T08:35:05.000Z
import torch torch.backends.cudnn.benchmark = True
32.153846
103
0.580252
import torch torch.backends.cudnn.benchmark = True from torch.distributions import Normal import numpy as np import os from core.network import Network from core.optimizer import Optimizer from core.buffer import RolloutBuffer from .base import BaseAgent class REINFORCE(BaseAgent): """REINFORCE agent. Args...
0
551
0
3,766
0
0
0
50
178
aeefc963986483e3b1a99f4f2cecf30498baae66
1,999
py
Python
scripts/warm_ccd.py
MattBlack85/ekos_scripts
3023a7c23b041e5de812ccccfa683c5c2a0489bf
[ "MIT" ]
null
null
null
scripts/warm_ccd.py
MattBlack85/ekos_scripts
3023a7c23b041e5de812ccccfa683c5c2a0489bf
[ "MIT" ]
null
null
null
scripts/warm_ccd.py
MattBlack85/ekos_scripts
3023a7c23b041e5de812ccccfa683c5c2a0489bf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import re ccd_regex = re.compile('(.*)?CCD.*') temp = 20 if __name__ == '__main__': try: main() except KeyboardInterrupt: print('\nExiting the program, bye!')
28.971014
93
0.637819
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import re import time import dbus # NOQA: F801 from dbus.mainloop.glib import DBusGMainLoop ccd_regex = re.compile('(.*)?CCD.*') temp = 20 class NoDevicesError(Exception): pass def main(): # Create a session bus. bus = dbus.SessionBus(mainloop=DBusGMainL...
4
0
0
20
0
1,612
0
3
127
a88754f02bb2d279d4f7c630c3677937832f39b3
865
py
Python
im_tutorials/data/arxiv.py
datasciencecampus/im_tutorials
b234069f30e5a2d631a731d51e27b367c59a2d87
[ "MIT" ]
null
null
null
im_tutorials/data/arxiv.py
datasciencecampus/im_tutorials
b234069f30e5a2d631a731d51e27b367c59a2d87
[ "MIT" ]
null
null
null
im_tutorials/data/arxiv.py
datasciencecampus/im_tutorials
b234069f30e5a2d631a731d51e27b367c59a2d87
[ "MIT" ]
1
2021-04-10T21:27:52.000Z
2021-04-10T21:27:52.000Z
import smart_open import pandas as pd from im_tutorials.utilities import double_eval def arxiv_papers(year=2017): '''arxiv_papers Get arXiv papers csv for a single year and return as dataframe. Args: year (`int`): Year of the dataset. Returns: arxiv_df (`pd.DataFrame`): Parsed datafr...
28.833333
94
0.648555
import ast import smart_open import pandas as pd from im_tutorials.utilities import eval_cols, double_eval def arxiv_papers(year=2017): '''arxiv_papers Get arXiv papers csv for a single year and return as dataframe. Args: year (`int`): Year of the dataset. Returns: arxiv_df (`pd.Data...
0
0
0
0
0
0
0
0
22
39dcc2df49303065b07a216b393b463cf4229320
1,103
py
Python
src/huntsman/drp/utils.py
danjampro/huntsman-drp
9470c03b87991fbe09e194470f28e8b45785c206
[ "MIT" ]
null
null
null
src/huntsman/drp/utils.py
danjampro/huntsman-drp
9470c03b87991fbe09e194470f28e8b45785c206
[ "MIT" ]
null
null
null
src/huntsman/drp/utils.py
danjampro/huntsman-drp
9470c03b87991fbe09e194470f28e8b45785c206
[ "MIT" ]
null
null
null
"""Generic functions for huntsman-drp.""" from contextlib import suppress from datetime import datetime from dateutil.parser import parse as parse_date_dateutil def parse_date(object): """ Parse a date as a `datetime.datetime`. Args: object (Object): The object to parse. Returns: A `...
22.510204
73
0.642792
"""Generic functions for huntsman-drp.""" from contextlib import suppress from datetime import datetime from dateutil.parser import parse as parse_date_dateutil def parse_date(object): """ Parse a date as a `datetime.datetime`. Args: object (Object): The object to parse. Returns: A `...
0
0
0
0
0
0
0
0
0
b5b4a6a8d5c9cf256e50d530d5036e442285efdc
11,835
py
Python
src/mmgroup/structures/abstract_group.py
Martin-Seysen/mmgroup
6acd566f1079e7e27eec76352477fbba39eeb65f
[ "MIT" ]
14
2020-07-10T20:12:05.000Z
2022-03-10T13:46:59.000Z
src/mmgroup/structures/abstract_group.py
Martin-Seysen/mmgroup
6acd566f1079e7e27eec76352477fbba39eeb65f
[ "MIT" ]
1
2022-03-09T07:05:04.000Z
2022-03-18T20:17:11.000Z
src/mmgroup/structures/abstract_group.py
Martin-Seysen/mmgroup
6acd566f1079e7e27eec76352477fbba39eeb65f
[ "MIT" ]
1
2022-02-07T21:08:00.000Z
2022-02-07T21:08:00.000Z
from __future__ import absolute_import, division, print_function from __future__ import unicode_literals """Modelling an abstract group Yet to be documented """ #################################################################### #################################################################### ### Class Abs...
31.56
76
0.569497
from __future__ import absolute_import, division, print_function from __future__ import unicode_literals """Modelling an abstract group Yet to be documented """ import sys import re import warnings from copy import deepcopy from random import sample, randint from numbers import Integral, Number from mmgroup.struc...
0
0
0
10,702
0
0
0
69
231
6eb72eb6fee18f8f571f0475441b17185d9ffa60
6,497
py
Python
symanto_fsb/labels.py
symanto-research/few-shot-learning-label-tuning
bda3af4f9948879bb631541328c753c25e6a6cc0
[ "Apache-2.0" ]
6
2022-03-08T11:06:11.000Z
2022-03-31T06:44:45.000Z
symanto_fsb/labels.py
symanto-research/few-shot-learning-label-tuning
bda3af4f9948879bb631541328c753c25e6a6cc0
[ "Apache-2.0" ]
null
null
null
symanto_fsb/labels.py
symanto-research/few-shot-learning-label-tuning
bda3af4f9948879bb631541328c753c25e6a6cc0
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 The Symanto Research Team 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 or...
33.147959
98
0.507927
# Copyright 2022 The Symanto Research Team 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 or...
18
0
0
0
0
5,813
0
6
69