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
778019ef6d5bd09c9629d7b2553ea5c3626116e1
2,867
py
Python
Empzxy Projects/Data Science/Probability Simulations/Stocks and Shares Predcition Bot/main.py
Empzxy/Empzxy-2022-Projects-Overview
223fa3e2bf3a3dd39a72ebe2f4dfb08c180ebf48
[ "MIT" ]
null
null
null
Empzxy Projects/Data Science/Probability Simulations/Stocks and Shares Predcition Bot/main.py
Empzxy/Empzxy-2022-Projects-Overview
223fa3e2bf3a3dd39a72ebe2f4dfb08c180ebf48
[ "MIT" ]
null
null
null
Empzxy Projects/Data Science/Probability Simulations/Stocks and Shares Predcition Bot/main.py
Empzxy/Empzxy-2022-Projects-Overview
223fa3e2bf3a3dd39a72ebe2f4dfb08c180ebf48
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import pandas as pd import pandas_datareader as web import datetime as dt from sklearn.preprocessing import MinMaxScaler from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout, LSTM #loading data compa...
31.505495
92
0.732822
import numpy as np import matplotlib.pyplot as plt import pandas as pd import pandas_datareader as web import datetime as dt from sklearn.preprocessing import MinMaxScaler from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout, LSTM #loading data compa...
0
0
0
0
0
0
0
0
0
9f4476b20b290a64c50594da43f4376c01b504f5
2,297
py
Python
typeform/question_ids_colnames.py
rjcnrd/gender_inequality_covid-19
464b7326746577a8d1e942c6d6903864d242128c
[ "MIT" ]
1
2020-04-29T12:11:40.000Z
2020-04-29T12:11:40.000Z
typeform/question_ids_colnames.py
rjcnrd/domestic_violence_covid-19
7bbf3aa3a7303d629013198bba8dc9822313d113
[ "MIT" ]
2
2020-05-05T20:10:32.000Z
2020-05-15T14:27:39.000Z
typeform/question_ids_colnames.py
rjcnrd/domestic_violence_covid-19
7bbf3aa3a7303d629013198bba8dc9822313d113
[ "MIT" ]
null
null
null
#OVERVIEW OF ALL QUESTION IDS "id": "Xa2T0bcZ5VnY", "title": "Do you identify as a:", "id": "QUtA6k0gcrZf", "title": "How old are you? ", "id": "ZNZyNVwMtwID", "title": "How would you identify your ethnicity" "id": "azlKRkvdcc7O", "title": "Who are you in lockdown with" "id": "Vrzj2uv0i29C", "title": "Where are y...
22.742574
80
0.681759
#OVERVIEW OF ALL QUESTION IDS "id": "Xa2T0bcZ5VnY", "title": "Do you identify as a:", "id": "QUtA6k0gcrZf", "title": "How old are you? ", "id": "ZNZyNVwMtwID", "title": "How would you identify your ethnicity" "id": "azlKRkvdcc7O", "title": "Who are you in lockdown with" "id": "Vrzj2uv0i29C", "title": "Where are y...
0
0
0
0
0
0
0
0
0
b1d51c1c49740f2744512bd66b5e67179410cd29
2,800
py
Python
tensorflow_version/input_fn.py
DeepDarkOdyssey/NamedEntityRecognition
08785004e00f2010b488d041b0b76f8aa9dad59c
[ "MIT" ]
null
null
null
tensorflow_version/input_fn.py
DeepDarkOdyssey/NamedEntityRecognition
08785004e00f2010b488d041b0b76f8aa9dad59c
[ "MIT" ]
null
null
null
tensorflow_version/input_fn.py
DeepDarkOdyssey/NamedEntityRecognition
08785004e00f2010b488d041b0b76f8aa9dad59c
[ "MIT" ]
null
null
null
"""Create the input data pipeline using `tf.data`""" from collections import namedtuple BatchInput = namedtuple('BatchInput', ['iterator', 'word_ids', 'label_ids', 'sentence_lengths'])
50
117
0.658929
"""Create the input data pipeline using `tf.data`""" import tensorflow as tf import tensorflow.contrib as tc import os from collections import namedtuple BatchInput = namedtuple('BatchInput', ['iterator', 'word_ids', 'label_ids', 'sentence_lengths']) def build_dataset(config, mode, word_voca...
0
0
0
0
0
2,474
0
0
113
ac1330d14ab3e4a5b50a4a7d6d529fcf0f653df1
931
py
Python
src/api/utils.py
cuappdev/scoop-backend
4bfb2494598831e10bdeede2243061f7ddee1b43
[ "MIT" ]
null
null
null
src/api/utils.py
cuappdev/scoop-backend
4bfb2494598831e10bdeede2243061f7ddee1b43
[ "MIT" ]
2
2022-03-14T22:55:22.000Z
2022-03-21T18:13:55.000Z
src/api/utils.py
cuappdev/rideshare-backend
4bfb2494598831e10bdeede2243061f7ddee1b43
[ "MIT" ]
null
null
null
from rest_framework import status from rest_framework.response import Response def success_response(data=None, status=status.HTTP_200_OK): """Returns a response with `status` (200 default) and `data` if provided.""" if data is None: return Response(status=status) return Response(data, status=statu...
34.481481
111
0.706767
from rest_framework import status from rest_framework.response import Response def success_response(data=None, status=status.HTTP_200_OK): """Returns a response with `status` (200 default) and `data` if provided.""" if data is None: return Response(status=status) return Response(data, status=statu...
0
0
0
0
0
0
0
0
0
2e2ba9ddb217a3aa4a31310162450b4d6349892a
333
py
Python
rxnebm/proposer/retroxpert/copy_files.py
coleygroup/rxn-ebm
8480822d0d8ad74e46edf693ad1cdc787291f422
[ "MIT" ]
5
2021-12-18T23:03:41.000Z
2022-03-29T15:31:57.000Z
rxnebm/proposer/retroxpert/copy_files.py
coleygroup/rxn-ebm
8480822d0d8ad74e46edf693ad1cdc787291f422
[ "MIT" ]
null
null
null
rxnebm/proposer/retroxpert/copy_files.py
coleygroup/rxn-ebm
8480822d0d8ad74e46edf693ad1cdc787291f422
[ "MIT" ]
1
2021-12-18T23:03:42.000Z
2021-12-18T23:03:42.000Z
times = 10 with open('src-train-aug-err-old.txt') as f: srcs = f.readlines() with open('tgt-train-aug-err-old.txt') as f: tgts = f.readlines() with open('src-train-aug-err.txt', 'w') as f: for t in range(times): f.writelines(srcs) with open('tgt-train-aug-err.txt', 'w') as f: for t in range(times): f.writ...
18.5
45
0.651652
times = 10 with open('src-train-aug-err-old.txt') as f: srcs = f.readlines() with open('tgt-train-aug-err-old.txt') as f: tgts = f.readlines() with open('src-train-aug-err.txt', 'w') as f: for t in range(times): f.writelines(srcs) with open('tgt-train-aug-err.txt', 'w') as f: for t in range(times): f.writ...
0
0
0
0
0
0
0
0
0
b85a99b298abdf22116a3e6648b4373d299d9331
10,462
py
Python
Code_Python/ch9_2_2.py
anemptyarchive/PRML
58cbb35ae65d66b6faf436c70a6cbc9d54d4589f
[ "MIT" ]
null
null
null
Code_Python/ch9_2_2.py
anemptyarchive/PRML
58cbb35ae65d66b6faf436c70a6cbc9d54d4589f
[ "MIT" ]
null
null
null
Code_Python/ch9_2_2.py
anemptyarchive/PRML
58cbb35ae65d66b6faf436c70a6cbc9d54d4589f
[ "MIT" ]
null
null
null
# 9.2.2 EM #%% # 9.2.2 import numpy as np from scipy.stats import multivariate_normal # import matplotlib.pyplot as plt #%% ## # :() D = 2 # K = 3 # K mu_truth_kd = np.array( [[5.0, 35.0], [-20.0, -10.0], [30.0, -20.0]] ) # K sigma2_truth_kdd = np.array( [[[250.0, 65.0], [65.0, 270.0]], ...
25.642157
104
0.615943
# 9.2.2 多次元ガウス分布のEMアルゴリズム #%% # 9.2.2項で利用するライブラリ import numpy as np from scipy.stats import multivariate_normal # 多次元ガウス分布 import matplotlib.pyplot as plt #%% ## 真の分布の設定 # 次元数を設定:(固定) D = 2 # クラスタ数を指定 K = 3 # K個の真の平均を指定 mu_truth_kd = np.array( [[5.0, 35.0], [-20.0, -10.0], [30.0, -20.0]] ) # K個の...
2,958
0
0
0
0
1,389
0
0
22
38e85acf434355c526a550d3fb21fad143d4d44e
853
py
Python
scripts/test_tags.py
pman06/recipe-project
3f9c9c47cbbce49363e0770a4f333232fb2f59a7
[ "MIT" ]
null
null
null
scripts/test_tags.py
pman06/recipe-project
3f9c9c47cbbce49363e0770a4f333232fb2f59a7
[ "MIT" ]
null
null
null
scripts/test_tags.py
pman06/recipe-project
3f9c9c47cbbce49363e0770a4f333232fb2f59a7
[ "MIT" ]
null
null
null
import requests TAG_LIST_ENDPOINT = 'http://127.0.0.1:8000/api/recipe/tags/' TOKEN_ENDPOINT = 'http://127.0.0.1:8000/api/user/token/' def authenticate_user(payload): """First authenticate user""" res = requests.post(TOKEN_ENDPOINT, payload) return res.json()['token'] def create_tag(data, headers): ...
21.871795
70
0.675264
import requests TAG_LIST_ENDPOINT = 'http://127.0.0.1:8000/api/recipe/tags/' TOKEN_ENDPOINT = 'http://127.0.0.1:8000/api/user/token/' def authenticate_user(payload): """First authenticate user""" res = requests.post(TOKEN_ENDPOINT, payload) return res.json()['token'] def create_tag(data, headers): ...
0
0
0
0
0
0
0
0
0
e514a1bfa39f53b47ae133b8de275f70ca082339
2,595
py
Python
1._metis_models_and_data_2019-12-16b/METIS source code/Indicators/zones/kpis/Supply pie chart.py
tamas-borbath/METIS
cf3dc0f0f96ccb6ad72ddf15ba7e31ddc6339036
[ "CC-BY-4.0" ]
1
2021-12-07T09:05:48.000Z
2021-12-07T09:05:48.000Z
1._metis_models_and_data_2019-12-16b/METIS source code/Indicators/zones/kpis/Supply pie chart.py
tamas-borbath/METIS_data_and_scripts
cf3dc0f0f96ccb6ad72ddf15ba7e31ddc6339036
[ "CC-BY-4.0" ]
null
null
null
1._metis_models_and_data_2019-12-16b/METIS source code/Indicators/zones/kpis/Supply pie chart.py
tamas-borbath/METIS_data_and_scripts
cf3dc0f0f96ccb6ad72ddf15ba7e31ddc6339036
[ "CC-BY-4.0" ]
null
null
null
######################################################## # Copyright (c) 2015-2017 by European Commission. # # All Rights Reserved. # ######################################################## """ This view shows, for each energy, a pie chart of the different supply types in the con...
48.055556
164
0.761464
######################################################## # Copyright (c) 2015-2017 by European Commission. # # All Rights Reserved. # ######################################################## """ This view shows, for each energy, a pie chart of the different supply types in the con...
0
0
0
0
0
1,760
0
0
46
58809e44b64c5d1462587b932c1269391300b7d2
2,040
py
Python
blogapp/posts/routes.py
Carshy/blogApplication
a471cd8627510ebc2bd3ba213fe2dbe6e4eca60f
[ "bzip2-1.0.6" ]
null
null
null
blogapp/posts/routes.py
Carshy/blogApplication
a471cd8627510ebc2bd3ba213fe2dbe6e4eca60f
[ "bzip2-1.0.6" ]
null
null
null
blogapp/posts/routes.py
Carshy/blogApplication
a471cd8627510ebc2bd3ba213fe2dbe6e4eca60f
[ "bzip2-1.0.6" ]
null
null
null
from flask import Blueprint posts = Blueprint ('posts', __name__)
38.490566
103
0.673039
from flask import render_template, url_for, redirect, flash, request, abort, Blueprint from flask_login import current_user, login_required from blogapp import db from blogapp.models import Post from blogapp.posts.forms import PostForm posts = Blueprint ('posts', __name__) @posts.route ("/post/new", methods = ['GET',...
0
1,674
0
0
0
0
0
120
180
0e5f38a2e815ae2a4d1d0fd586989887041c2d73
5,285
py
Python
src/model/keywords.py
J-CITY/METADATA-EXTRACTOR
6bc01a7e4b74a3156c07efc2c80d5519c325dd53
[ "Apache-2.0" ]
null
null
null
src/model/keywords.py
J-CITY/METADATA-EXTRACTOR
6bc01a7e4b74a3156c07efc2c80d5519c325dd53
[ "Apache-2.0" ]
null
null
null
src/model/keywords.py
J-CITY/METADATA-EXTRACTOR
6bc01a7e4b74a3156c07efc2c80d5519c325dd53
[ "Apache-2.0" ]
null
null
null
import os, sys parentPath = os.path.abspath("..") if parentPath not in sys.path: sys.path.insert(0, parentPath) import nltk METRIC_DEGREE_DIV_FREQUENCY = 0 # d / f METRIC_DEGREE = 1 # d METRIC_FREQUENCY = 2 # f #txt = "" #with open('53out.txt', encoding='utf-8') as f: # for line in f: # txt += line # #...
34.096774
562
0.622517
import os, sys parentPath = os.path.abspath("..") if parentPath not in sys.path: sys.path.insert(0, parentPath) import string from collections import Counter, defaultdict from itertools import chain, groupby, product from config.dictionary import supportWords import nltk from enum import Enum from nltk.tokenize impor...
13
0
0
3,563
0
0
0
58
222
c0ad7051a52d055cb87e64227585bbbd9f1447a4
251
py
Python
v1/accounts/jwt_handler.py
akkord64/openeats-api
011465123b6e471fc6e4ec3d715d99bc2a8dcfcc
[ "MIT" ]
11
2018-03-04T18:03:30.000Z
2021-09-04T17:03:24.000Z
v1/accounts/jwt_handler.py
akkord64/openeats-api
011465123b6e471fc6e4ec3d715d99bc2a8dcfcc
[ "MIT" ]
42
2020-06-05T14:55:57.000Z
2021-07-14T05:58:09.000Z
v1/accounts/jwt_handler.py
akkord64/openeats-api
011465123b6e471fc6e4ec3d715d99bc2a8dcfcc
[ "MIT" ]
40
2018-06-22T18:58:19.000Z
2022-01-31T08:34:05.000Z
#!/usr/bin/env python # encoding: utf-8
20.916667
79
0.645418
#!/usr/bin/env python # encoding: utf-8 from .serializers import UserSerializer def handler(token, user=None, request=None): return { 'token': token, 'id': UserSerializer(user, context={'request': request}).data.get('id') }
0
0
0
0
0
146
0
18
46
d2b0a7fad4772a1783262d6d582bae1074a2d524
67
py
Python
open_cp/gui/tk/__init__.py
sumau/PredictCode
e2a2d5a8fa5d83f011c33e18d4ce6ac7e1429aa8
[ "Artistic-2.0" ]
18
2017-04-19T09:17:19.000Z
2021-05-24T08:53:28.000Z
open_cp/gui/tk/__init__.py
sumau/PredictCode
e2a2d5a8fa5d83f011c33e18d4ce6ac7e1429aa8
[ "Artistic-2.0" ]
8
2017-06-11T17:46:35.000Z
2021-06-07T10:49:10.000Z
open_cp/gui/tk/__init__.py
sumau/PredictCode
e2a2d5a8fa5d83f011c33e18d4ce6ac7e1429aa8
[ "Artistic-2.0" ]
10
2017-07-19T18:29:37.000Z
2020-11-12T22:06:45.000Z
import tkinter.ttk as ttk
16.75
25
0.776119
import tkinter as tk import tkinter.ttk as ttk from .util import *
0
0
0
0
0
0
0
-3
45
02fc7d3756c5a1a20f700d64cd48f08f01198c29
81
py
Python
main.py
HectorFranc/tweet-analysis
8c9b59826ad3ea1b61af66f56e593234eb0f0a79
[ "MIT" ]
null
null
null
main.py
HectorFranc/tweet-analysis
8c9b59826ad3ea1b61af66f56e593234eb0f0a79
[ "MIT" ]
null
null
null
main.py
HectorFranc/tweet-analysis
8c9b59826ad3ea1b61af66f56e593234eb0f0a79
[ "MIT" ]
null
null
null
from dotenv import load_dotenv load_dotenv() if __name__ == "__main__": pass
16.2
30
0.740741
from dotenv import load_dotenv load_dotenv() if __name__ == "__main__": pass
0
0
0
0
0
0
0
0
0
e435d396a139f60c30454563041d5e92e815a5bb
619
py
Python
esimport/utils.py
thorwhalen/esimport
ec96d894b50a87f704ad9a24563b6a6c505be911
[ "MIT" ]
1
2019-08-29T01:35:29.000Z
2019-08-29T01:35:29.000Z
esimport/utils.py
thorwhalen/esimport
ec96d894b50a87f704ad9a24563b6a6c505be911
[ "MIT" ]
null
null
null
esimport/utils.py
thorwhalen/esimport
ec96d894b50a87f704ad9a24563b6a6c505be911
[ "MIT" ]
null
null
null
def retrieve_file(filename): """ Opens a file and returns its contents as a string after encoding to UTF-8 :param filename: :return: """ with open(filename, 'rb') as f: original_contents = f.read() decoded_contents = original_contents.decode('utf-8-sig').encode('utf-8') re...
22.107143
76
0.670436
import sys def retrieve_file(filename): """ Opens a file and returns its contents as a string after encoding to UTF-8 :param filename: :return: """ with open(filename, 'rb') as f: original_contents = f.read() decoded_contents = original_contents.decode('utf-8-sig').encode('utf...
0
0
0
0
0
0
0
-11
22
d1062af00fbdda2f14ddd536cca6e078dea73aa3
3,754
py
Python
ummon/modules/linear.py
matherm/ummon3
08476d21ce17cc95180525d48202a1690dfc8a08
[ "BSD-3-Clause" ]
1
2022-02-10T06:47:13.000Z
2022-02-10T06:47:13.000Z
ummon/modules/linear.py
matherm/ummon3
08476d21ce17cc95180525d48202a1690dfc8a08
[ "BSD-3-Clause" ]
null
null
null
ummon/modules/linear.py
matherm/ummon3
08476d21ce17cc95180525d48202a1690dfc8a08
[ "BSD-3-Clause" ]
null
null
null
import torch.nn as nn __all__ = [ 'Linear' ]
32.929825
95
0.603356
import numpy as np import torch import torch.nn as nn __all__ = [ 'Linear' ] class Linear(nn.Linear): ''' Fully connected linear layer class:: line0 = Linear([n], num_neurons, init, bias) creates a fully connected linear layer with 'n' input neurons and 'num_neurons' output neurons...
0
904
0
2,746
0
0
0
-12
67
81010470e15f16dd6f24b190e28dabbb3e11fdfe
18,455
py
Python
sources/viewgui/form_new_device/ui_table_new_device_.py
Groomsha/lan-map
1c30819470f43f8521e98eb75c70da23939f8f06
[ "Apache-2.0" ]
null
null
null
sources/viewgui/form_new_device/ui_table_new_device_.py
Groomsha/lan-map
1c30819470f43f8521e98eb75c70da23939f8f06
[ "Apache-2.0" ]
null
null
null
sources/viewgui/form_new_device/ui_table_new_device_.py
Groomsha/lan-map
1c30819470f43f8521e98eb75c70da23939f8f06
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/mnt/c/Documents and Settings/icheberiak/Sources/Python/lan-map/viewgui/gui_windows/gui_form_new_device.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run ag...
62.138047
161
0.721268
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/mnt/c/Documents and Settings/icheberiak/Sources/Python/lan-map/viewgui/gui_windows/gui_form_new_device.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run ag...
0
0
0
17,766
0
0
0
15
23
f449c1849bc6a54d8bd1cc5fe22c571068387e52
9,947
py
Python
M5StackCore2AWS/WiFi_provisioning/utilities/AWS_IoT_registration_helper/registration_helper.py
DarkSector/ESP32
0af7f75e3e9e23ba9d6e2c22ef61e7f74c00a606
[ "MIT" ]
78
2020-12-16T01:04:28.000Z
2022-03-29T02:07:38.000Z
M5StackCore2AWS/WiFi_provisioning/utilities/AWS_IoT_registration_helper/registration_helper.py
DarkSector/ESP32
0af7f75e3e9e23ba9d6e2c22ef61e7f74c00a606
[ "MIT" ]
88
2020-12-19T02:39:12.000Z
2022-03-15T18:00:00.000Z
M5StackCore2AWS/WiFi_provisioning/utilities/AWS_IoT_registration_helper/registration_helper.py
DarkSector/ESP32
0af7f75e3e9e23ba9d6e2c22ef61e7f74c00a606
[ "MIT" ]
47
2020-12-18T16:55:10.000Z
2022-02-11T02:04:16.000Z
# AWS IoT EduKit Pre-Provisioned MCU Device Registration Helper # v1.1.0 # # Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in #...
44.806306
228
0.7359
# AWS IoT EduKit Pre-Provisioned MCU Device Registration Helper # v1.1.0 # # Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in #...
0
0
0
0
0
240
0
52
223
6525fa4778c34ac61425f701203c480566f6f072
1,849
py
Python
sdk/python/bouncerapi/bouncerapi_client.py
nmfta-repo/nmfta-bouncer
a178244dbf0b8a165aabc02a5d1ba05006f9ec22
[ "Apache-2.0" ]
1
2021-04-09T20:29:39.000Z
2021-04-09T20:29:39.000Z
sdk/python/bouncerapi/bouncerapi_client.py
nmfta-repo/nmfta-bouncer
a178244dbf0b8a165aabc02a5d1ba05006f9ec22
[ "Apache-2.0" ]
21
2019-02-28T14:23:11.000Z
2020-07-07T20:46:37.000Z
sdk/python/bouncerapi/bouncerapi_client.py
nmfta-repo/nmfta-bouncer
a178244dbf0b8a165aabc02a5d1ba05006f9ec22
[ "Apache-2.0" ]
2
2019-05-07T13:16:49.000Z
2020-06-23T13:49:01.000Z
# -*- coding: utf-8 -*- """ bouncerapi This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). """
31.87931
103
0.809086
# -*- coding: utf-8 -*- """ bouncerapi This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). """ from bouncerapi.decorators import lazy_property from bouncerapi.configuration import Configuration from bouncerapi.controllers.blacklist_controller import BlacklistController from bounce...
0
584
0
254
0
0
0
631
244
e956d86cb31ffa11c50885dab398eb8cb6cc3347
1,145
py
Python
src/osyris/io/units.py
nvaytet/osyris
7deb57d2e6e6635fd4f065a196466d1db02644fc
[ "BSD-3-Clause" ]
10
2019-08-28T18:18:31.000Z
2021-12-21T00:07:04.000Z
src/osyris/io/units.py
nvaytet/osyris
7deb57d2e6e6635fd4f065a196466d1db02644fc
[ "BSD-3-Clause" ]
20
2019-08-20T13:02:33.000Z
2022-01-22T00:38:17.000Z
src/osyris/io/units.py
nvaytet/osyris
7deb57d2e6e6635fd4f065a196466d1db02644fc
[ "BSD-3-Clause" ]
5
2020-12-07T23:36:50.000Z
2021-12-20T23:05:13.000Z
from .. import units
34.69697
78
0.527511
import numpy as np from .. import units def get_unit(string, ud, ul, ut): ramses_units = { "density": ud * (units.g / (units.cm**3)), "velocity": (ul / ut) * (units.cm / units.s), "part_velocity": (ul / ut) * (units.cm / units.s), "momentum": (ud * ul / ut) * (units.g / (units.cm**...
0
0
0
0
0
1,081
0
-3
45
017bcee435cacb4f38c650285e22560a2a3275a7
2,472
py
Python
processor/process.py
paulscottrobson/rca-16-bit-computer
fd185541dfd5e6a671626c27dc51a4cd6e633de8
[ "MIT" ]
null
null
null
processor/process.py
paulscottrobson/rca-16-bit-computer
fd185541dfd5e6a671626c27dc51a4cd6e633de8
[ "MIT" ]
null
null
null
processor/process.py
paulscottrobson/rca-16-bit-computer
fd185541dfd5e6a671626c27dc51a4cd6e633de8
[ "MIT" ]
null
null
null
# ******************************************************************************** # # Convert 18016.def to compileable code # # ******************************************************************************** import os, re target = "../emulator/generated/".replace("/",os.sep) # output directory. # # ...
33.405405
92
0.554207
# ******************************************************************************** # # Convert 18016.def to compileable code # # ******************************************************************************** import os,re def process(s,opcode): s = s.replace("@P",str(opcode & 7)) s = s.replace("@R","{0:X}".fo...
0
0
0
0
0
138
0
-1
23
65a9e4ef1fc4a6d9d1ff52bfbf798fa781259ff0
97
py
Python
app/scoring/__init__.py
ThembiNsele/ClimateMind-Backend
0e418000b2a0141a1e4a7c11dbe3564082a3f4bb
[ "MIT" ]
6
2020-08-20T10:49:59.000Z
2022-01-24T16:49:46.000Z
app/scoring/__init__.py
ThembiNsele/ClimateMind-Backend
0e418000b2a0141a1e4a7c11dbe3564082a3f4bb
[ "MIT" ]
95
2020-07-24T22:32:34.000Z
2022-03-05T15:01:16.000Z
app/scoring/__init__.py
ThembiNsele/ClimateMind-Backend
0e418000b2a0141a1e4a7c11dbe3564082a3f4bb
[ "MIT" ]
5
2020-07-30T17:29:09.000Z
2021-01-10T19:46:15.000Z
from flask import Blueprint bp = Blueprint("scoring", __name__)
16.166667
35
0.783505
from flask import Blueprint bp = Blueprint("scoring", __name__) from app.scoring import routes
0
0
0
0
0
0
0
9
23
f72b65b992c41b19e9209c007df907202066b8d1
2,817
py
Python
weatherScraper/spiders/weatherbot.py
aabedi/weatherScraper
069d07c19fbbba93aad5499cd1bb400accbcf644
[ "MIT" ]
null
null
null
weatherScraper/spiders/weatherbot.py
aabedi/weatherScraper
069d07c19fbbba93aad5499cd1bb400accbcf644
[ "MIT" ]
null
null
null
weatherScraper/spiders/weatherbot.py
aabedi/weatherScraper
069d07c19fbbba93aad5499cd1bb400accbcf644
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
48.568966
120
0.619453
# -*- coding: utf-8 -*- from weatherScraper.items import TempData from weatherScraper.items import InputData import scrapy class WeatherbotSpider(scrapy.Spider): name = 'weatherbot' allowed_domains = ['www.wunderground.com'] start_urls = ['http://www.wunderground.com/history/'] def __init__(self, cod...
0
0
0
2,670
0
0
0
33
89
5943ec98bd05e59e909c2bd9c0c1da92c858b244
1,138
py
Python
bin/notification.py
Wikia/athena_alerter
819d766d7f2495b9f297fdf6f268f5b58c8a920c
[ "MIT" ]
5
2019-02-05T12:37:27.000Z
2021-06-07T05:26:17.000Z
bin/notification.py
Wikia/athena_alerter
819d766d7f2495b9f297fdf6f268f5b58c8a920c
[ "MIT" ]
3
2019-04-22T16:53:07.000Z
2020-03-03T11:10:41.000Z
bin/notification.py
Wikia/athena_alerter
819d766d7f2495b9f297fdf6f268f5b58c8a920c
[ "MIT" ]
1
2020-03-03T11:54:34.000Z
2020-03-03T11:54:34.000Z
""" This file contains a lambda function reacting to query update sqs event and sending notifications for large queries Currently only slack notifications are supported """ import json import logging from typing import Sequence from . import settings from .model import UnknownEventException from .notificators.notifi...
30.756757
115
0.716169
""" This file contains a lambda function reacting to query update sqs event and sending notifications for large queries Currently only slack notifications are supported """ import json import logging from typing import Sequence from . import settings from .model import UnknownEventException from .notificators.notifi...
0
0
0
0
0
0
0
0
0
bc4a3d646ecf4ed8fabc6a0a371d7c57b58d6eb7
1,726
py
Python
enwiktprocessor.py
radomd92/botjagwar
1dc96600c40041057a9f9afde38c31ca34b8db38
[ "MIT" ]
7
2015-01-23T17:24:04.000Z
2022-01-12T16:54:24.000Z
enwiktprocessor.py
radomd92/botjagwar
1dc96600c40041057a9f9afde38c31ca34b8db38
[ "MIT" ]
18
2017-12-09T01:11:23.000Z
2021-09-22T13:26:24.000Z
enwiktprocessor.py
radomd92/botjagwar
1dc96600c40041057a9f9afde38c31ca34b8db38
[ "MIT" ]
1
2015-06-22T02:17:55.000Z
2015-06-22T02:17:55.000Z
import logging from api.entryprocessor.wiki.en import ENWiktionaryProcessor as ENWiktionaryProcessor from redis_wikicache import RedisSite """ Requires RedisSite and RedisPage wrappers. All data must have been imported there. see redis_wikicache.py for more details. """ logger = logging.getLogger('processor') enwikt...
25.382353
85
0.608922
import logging from api.entryprocessor.wiki.en import ENWiktionaryProcessor as ENWiktionaryProcessor from redis_wikicache import RedisPage, RedisSite """ Requires RedisSite and RedisPage wrappers. All data must have been imported there. see redis_wikicache.py for more details. """ logger = logging.getLogger('process...
2
0
0
0
0
1,249
0
11
46
a248842e6e5297de2c99311cff1ea6fe688a6cb9
277
py
Python
examples/__init__.py
chineseluo/nightwalker
c7e9fb40401d632241b501d9c90f2e33522db51b
[ "Apache-2.0" ]
1
2020-10-13T02:55:26.000Z
2020-10-13T02:55:26.000Z
examples/__init__.py
chineseluo/nightwalker
c7e9fb40401d632241b501d9c90f2e33522db51b
[ "Apache-2.0" ]
null
null
null
examples/__init__.py
chineseluo/nightwalker
c7e9fb40401d632241b501d9c90f2e33522db51b
[ "Apache-2.0" ]
null
null
null
#!/user/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------ @Project : nightwalker @Time : 2020/10/13 11:18 @Auth : luozhongwen @Email : luozw@inhand.com.cn @File : __init__.py @IDE : PyCharm ------------------------------------ """
19.785714
36
0.433213
#!/user/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------ @Project : nightwalker @Time : 2020/10/13 11:18 @Auth : luozhongwen @Email : luozw@inhand.com.cn @File : __init__.py @IDE : PyCharm ------------------------------------ """
0
0
0
0
0
0
0
0
0
eb7f3546dbed6986ad6023dbc26eff76342be96a
154
py
Python
envs/__init__.py
ege-k/nlp4nethack
8b8b45a2f0be09c5233b33a47f421906e9e4b561
[ "MIT" ]
3
2022-03-23T21:20:44.000Z
2022-03-29T06:25:55.000Z
envs/__init__.py
ege-k/nlp4nethack
8b8b45a2f0be09c5233b33a47f421906e9e4b561
[ "MIT" ]
null
null
null
envs/__init__.py
ege-k/nlp4nethack
8b8b45a2f0be09c5233b33a47f421906e9e4b561
[ "MIT" ]
2
2022-03-26T14:59:43.000Z
2022-03-29T06:26:07.000Z
from gym.envs.registration import register register('NetHackChallengeBatched-v0', entry_point='nle_batched_env.NetHackChallengeBatchedEnv')
30.8
69
0.792208
from gym.envs.registration import register register('NetHackChallengeBatched-v0', entry_point='nle_batched_env.NetHackChallengeBatchedEnv')
0
0
0
0
0
0
0
0
0
aba0b9305e4226ebcb30d20796bdd475044c1f7d
2,896
py
Python
common/util.py
hsjplus/word2vec-from-scratch
47285dccfd3b1fbf14f0d873b42b5b2b09111c0a
[ "MIT" ]
null
null
null
common/util.py
hsjplus/word2vec-from-scratch
47285dccfd3b1fbf14f0d873b42b5b2b09111c0a
[ "MIT" ]
null
null
null
common/util.py
hsjplus/word2vec-from-scratch
47285dccfd3b1fbf14f0d873b42b5b2b09111c0a
[ "MIT" ]
null
null
null
# The MIT License (MIT) # Copyright (c) 2018 Koki Saitoh # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modi...
32.909091
82
0.639157
# The MIT License (MIT) # Copyright (c) 2018 Koki Saitoh # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modi...
0
0
0
0
0
1,554
0
-3
115
f264c60a81c80b0c8e5939d8abe0501c1fc0e111
10,953
py
Python
game/pacman/src/formula/formula.py
GuillaumeFalourd/formulas-games
7530ef09cc85f30157e62b8761868c2a0eddb93d
[ "Apache-2.0" ]
10
2021-05-31T03:11:56.000Z
2021-07-13T11:45:18.000Z
game/pacman/src/formula/formula.py
ErosMLima/formulas-python
15f1f56630131a2d3202ca7a1f685c2708a4815b
[ "Apache-2.0" ]
1
2021-06-06T19:12:54.000Z
2021-06-06T19:12:54.000Z
game/pacman/src/formula/formula.py
ErosMLima/formulas-python
15f1f56630131a2d3202ca7a1f685c2708a4815b
[ "Apache-2.0" ]
1
2021-05-31T03:11:58.000Z
2021-05-31T03:11:58.000Z
#!/usr/bin/python3 import pygame black = (0,0,0) white = (255,255,255) blue = (0,0,255) green = (0,255,0) red = (255,0,0) purple = (255,0,255) yellow = (255,255,0) # Commands print("") print("\033[36m HOW TO PLAY?\033[0m") print("\033[32m Move Pacman using UP KEY , DOWN KEY , LEFT KEY and RIGHT KEY \033[0m") pri...
25.954976
117
0.590523
#!/usr/bin/python3 import pygame from classes.wall import Wall from classes.block import Block from classes.player import Player from classes.ghost import Ghost black = (0,0,0) white = (255,255,255) blue = (0,0,255) green = (0,255,0) red = (255,0,0) purple = (255,0,255) yellow = (255,255,0) # Commands print("") pri...
32
0
0
0
0
8,212
0
40
202
dfa4c610c6f676cd88da76a1e9c0eddbb6f8139f
183
py
Python
ABC/abc201-abc250/abc215/a/main.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
2
2020-06-12T09:54:23.000Z
2021-05-04T01:34:07.000Z
ABC/abc201-abc250/abc215/a/main.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
961
2020-06-23T07:26:22.000Z
2022-03-31T21:34:52.000Z
ABC/abc201-abc250/abc215/a/main.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- if __name__ == "__main__": main()
11.4375
26
0.42623
# -*- coding: utf-8 -*- def main(): s = input() t = "Hello,World!" if s == t: print("AC") else: print("WA") if __name__ == "__main__": main()
0
0
0
0
0
95
0
0
23
bd847eda5bbf7439c06cef9cf5e2e620af014ec9
2,240
py
Python
amplify/agent/containers/nginx/collectors/errorlog.py
digideskio/digidesk-amplified
547f899d6fd47dc726df28ee90bf3511f02bd6cf
[ "BSD-2-Clause" ]
null
null
null
amplify/agent/containers/nginx/collectors/errorlog.py
digideskio/digidesk-amplified
547f899d6fd47dc726df28ee90bf3511f02bd6cf
[ "BSD-2-Clause" ]
null
null
null
amplify/agent/containers/nginx/collectors/errorlog.py
digideskio/digidesk-amplified
547f899d6fd47dc726df28ee90bf3511f02bd6cf
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = "Mike Belov" __copyright__ = "Copyright (C) Nginx, Inc. All rights reserved." __credits__ = ["Mike Belov", "Andrei Belov", "Ivan Poluyanov", "Oleg Mamontov", "Andrew Alexeev", "Grant Hulegaard"] __license__ = "" __maintainer__ = "Mike Belov" __email__ = "dedm@nginx.com"
36.721311
116
0.633482
# -*- coding: utf-8 -*- from amplify.agent.containers.abstract import AbstractCollector from amplify.agent.context import context from amplify.agent.nginx.config.config import ERROR_LOG_LEVELS from amplify.agent.nginx.log.error import NginxErrorLogParser from amplify.agent.util.tail import FileTail __author__ = "Mike ...
0
0
0
1,631
0
0
0
166
133
5d4bd54a2a0da40e100001a0bb967fd2b68e9b2c
22,669
py
Python
holoviews/plotting/plotly/util.py
zertrin/holoviews
c38ece9ae3f346375dcda5945bbe57cef28f2213
[ "BSD-3-Clause" ]
null
null
null
holoviews/plotting/plotly/util.py
zertrin/holoviews
c38ece9ae3f346375dcda5945bbe57cef28f2213
[ "BSD-3-Clause" ]
null
null
null
holoviews/plotting/plotly/util.py
zertrin/holoviews
c38ece9ae3f346375dcda5945bbe57cef28f2213
[ "BSD-3-Clause" ]
null
null
null
import copy import re import numpy as np from plotly import colors from ..util import color_intervals, process_cmap # Constants # --------- # Trace types that are individually positioned with their own domain. # These are traces that don't overlay on top of each other in a shared subplot, # so they are positioned i...
33.435103
79
0.607967
import copy import re import numpy as np from plotly import colors from ..util import color_intervals, process_cmap # Constants # --------- # Trace types that are individually positioned with their own domain. # These are traces that don't overlay on top of each other in a shared subplot, # so they are positioned i...
0
0
0
0
0
409
0
0
81
27065cb010e16c1d6a83346b080f65fa05f9cae2
1,370
py
Python
examples/webhook/bin/wh.py
zoqaeski/wireguard-tools
25253fc0425c22a849f57e7c2b8b99464ff2e0b1
[ "MIT" ]
122
2020-06-08T15:02:26.000Z
2022-03-29T10:34:56.000Z
examples/webhook/bin/wh.py
zoqaeski/wireguard-tools
25253fc0425c22a849f57e7c2b8b99464ff2e0b1
[ "MIT" ]
2
2020-10-23T08:53:54.000Z
2021-12-08T14:30:25.000Z
examples/webhook/bin/wh.py
zoqaeski/wireguard-tools
25253fc0425c22a849f57e7c2b8b99464ff2e0b1
[ "MIT" ]
16
2020-07-11T20:06:07.000Z
2022-02-21T05:13:15.000Z
#!/usr/bin/env python3 # Author: Milos Buncic # Date: 2020/06/10 # Description: Generate main configuration file (hooks.json) for webhook service import json # Webhook working directory WH_DIR = '/etc/webhook' # Webhook configuration file WH_CONFIG = '{}/hooks.json'.format(WH_DIR) def writefile(filename, text): ""...
22.833333
118
0.652555
#!/usr/bin/env python3 # Author: Milos Buncic # Date: 2020/06/10 # Description: Generate main configuration file (hooks.json) for webhook service import os import sys import json # Webhook working directory WH_DIR = '/etc/webhook' # Webhook configuration file WH_CONFIG = '{}/hooks.json'.format(WH_DIR) def writefile...
0
0
0
0
0
532
0
-23
68
67f279a99d4e956aac0b1d7b4ce200edead6010c
330
py
Python
assets/Duplicates.py
securityhook/Discord-Recon
3386a423dd290c43de25c7c60572e9e43cda9557
[ "MIT" ]
30
2021-02-20T04:03:40.000Z
2022-03-17T20:42:31.000Z
assets/Duplicates.py
securityhook/Discord-Recon
3386a423dd290c43de25c7c60572e9e43cda9557
[ "MIT" ]
20
2021-02-21T04:02:06.000Z
2021-06-08T20:12:57.000Z
assets/Duplicates.py
securityhook/Discord-Recon
3386a423dd290c43de25c7c60572e9e43cda9557
[ "MIT" ]
11
2021-04-09T15:49:29.000Z
2022-03-20T21:20:54.000Z
# define globals subdomainsList = []
23.571429
50
0.681818
# define globals subdomainsList = [] def Duplicates(Subdomains): global subdomainsList Subdomains = Subdomains.split('\n') for singleSubdomain in Subdomains: if singleSubdomain not in subdomainsList: subdomainsList.append(singleSubdomain) else: pass return subd...
0
0
0
0
0
271
0
0
23
859285290a2f8ccd5125928f5c709170add2d5e6
315
py
Python
rcommander_web/scripts/rcommander_web_plain.py
gt-ros-pkg/rcommander-pr2
7c7408db30525b80a77dde34b4a8af68ec23d5a4
[ "BSD-3-Clause" ]
3
2015-03-18T10:20:13.000Z
2021-03-01T02:46:20.000Z
rcommander_web/scripts/rcommander_web_plain.py
gt-ros-pkg/rcommander-pr2
7c7408db30525b80a77dde34b4a8af68ec23d5a4
[ "BSD-3-Clause" ]
null
null
null
rcommander_web/scripts/rcommander_web_plain.py
gt-ros-pkg/rcommander-pr2
7c7408db30525b80a77dde34b4a8af68ec23d5a4
[ "BSD-3-Clause" ]
2
2016-08-03T21:50:59.000Z
2021-03-01T02:46:20.000Z
import roslib; roslib.load_manifest('rcommander_web') import rcommander_web.rcommander_auto_server as rcs import sys import rospy rospy.init_node('rcommander_web_test') path = sys.argv[1] robot = MyRobotClass() rcs.run(robot, path)
22.5
53
0.771429
import roslib; roslib.load_manifest('rcommander_web') import rcommander_web.rcommander_auto_server as rcs import sys import rospy class MyRobotClass: def __init__(self): self.some_resource = "hello" rospy.init_node('rcommander_web_test') path = sys.argv[1] robot = MyRobotClass() rcs.run(robot, path)
0
0
0
59
0
0
0
0
23
2d417794331f8b35053520f1f16c117cc036ce17
958
py
Python
cracking_the_coding_interview/robot.py
ac2sherry/AlgorithmTest
823a8be8707afb959dd3bb9246bf875d0ffad967
[ "MIT" ]
1
2018-12-21T01:15:57.000Z
2018-12-21T01:15:57.000Z
cracking_the_coding_interview/robot.py
Li-Aaron/AlgorithmTest
823a8be8707afb959dd3bb9246bf875d0ffad967
[ "MIT" ]
null
null
null
cracking_the_coding_interview/robot.py
Li-Aaron/AlgorithmTest
823a8be8707afb959dd3bb9246bf875d0ffad967
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- ''' XxY int[][] map(C++ vector >),map[i][j]1int x,int y(0,0)(x - 1,y - 1)Mod 1000000007xy50 ''' # test case m = [[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,0,1,1],[0,1,1,1],[1,1,1,1],[1,1,1,1]] x = 11 y = 4 res = 196 print(Robot().countWays(m, x, y) == ...
33.034483
163
0.503132
# -*- coding:utf-8 -*- ''' 有一个XxY的网格,一个机器人只能走格点且只能向右或向下走,要从左上角走到右下角。请设计一个算法,计算机器人有多少种走法。注意这次的网格中有些障碍点是不能走的。 给定一个int[][] map(C++ 中为vector >),表示网格图,若map[i][j]为1则说明该点不是障碍点,否则则为障碍。另外给定int x,int y,表示网格的大小。请返回机器人从(0,0)走到(x - 1,y - 1)的走法数,为了防止溢出,请将结果Mod 1000000007。保证x和y均小于等于50 ''' class Robot: def countWays(self, m,...
468
0
0
455
0
0
0
0
23
171b6e8669227374acb2881ffd655291d017fda9
8,112
py
Python
ms_deisotope/qc/graph_reduction.py
mstim/ms_deisotope
29f4f466e92e66b65a2d21eca714aa627caa21db
[ "Apache-2.0" ]
18
2017-09-01T12:26:12.000Z
2022-02-23T02:31:29.000Z
ms_deisotope/qc/graph_reduction.py
mstim/ms_deisotope
29f4f466e92e66b65a2d21eca714aa627caa21db
[ "Apache-2.0" ]
19
2017-03-12T20:40:36.000Z
2022-03-31T22:50:47.000Z
ms_deisotope/qc/graph_reduction.py
mstim/ms_deisotope
29f4f466e92e66b65a2d21eca714aa627caa21db
[ "Apache-2.0" ]
14
2016-05-06T02:25:30.000Z
2022-03-31T14:40:06.000Z
from ms_deisotope.spectrum_graph import (MassWrapper) from brainpy import SimpleComposition H2O = SimpleComposition({"H": 2, "O": 1}) NH3 = SimpleComposition({"H": 3, "N": 1}) default_losses = [MassWrapper("-H2O", -H2O.mass()), MassWrapper("-NH3", -NH3.mass())]
34.815451
101
0.608111
from ms_deisotope.peak_set import DeconvolutedPeakSet from ms_deisotope.spectrum_graph import (PathFinder, amino_acids, MassWrapper) from brainpy import SimpleComposition H2O = SimpleComposition({"H": 2, "O": 1}) NH3 = SimpleComposition({"H": 3, "N": 1}) default_losses = [MassWrapper("-H2O", -H2O.mass()), MassWrapp...
0
0
0
7,743
0
0
0
57
45
dbe9167763e9026b05b5a7a93c168bed47be85b7
329
py
Python
fitnesse/tasks.py
SecurityCodeRu/web-fitnesse
423288b4cc8cf1506285913558b3fcff9e7788fa
[ "Apache-2.0" ]
null
null
null
fitnesse/tasks.py
SecurityCodeRu/web-fitnesse
423288b4cc8cf1506285913558b3fcff9e7788fa
[ "Apache-2.0" ]
2
2015-05-21T11:39:55.000Z
2016-03-11T13:38:10.000Z
fitnesse/tasks.py
SecurityCodeRu/web-fitnesse
423288b4cc8cf1506285913558b3fcff9e7788fa
[ "Apache-2.0" ]
1
2015-05-21T11:33:50.000Z
2015-05-21T11:33:50.000Z
# -*- coding: utf-8 -*-
20.5625
48
0.772036
# -*- coding: utf-8 -*- from celery import shared_task from django.http import HttpResponse import fitnesse.import_data @shared_task def import_job_task(job_name): fitnesse.import_data.import_job(job_name) def import_job(request, job_name): import_job_task.apply_async(args=[job_name]) return HttpRespon...
0
68
0
0
0
92
0
30
113
0c52c42653a4681278a5cce8b6cf0ae4c14d1331
49
py
Python
bsamcli/__init__.py
bcelabs/bce-sam-cli
692fceabd3fe3efc6418202dc372d3b95acadf3c
[ "Apache-2.0" ]
3
2018-11-29T12:57:56.000Z
2021-02-24T11:58:58.000Z
bsamcli/__init__.py
bcelabs/bce-sam-cli
692fceabd3fe3efc6418202dc372d3b95acadf3c
[ "Apache-2.0" ]
null
null
null
bsamcli/__init__.py
bcelabs/bce-sam-cli
692fceabd3fe3efc6418202dc372d3b95acadf3c
[ "Apache-2.0" ]
2
2018-09-03T11:54:16.000Z
2021-02-05T03:32:17.000Z
""" BSAM CLI version """ __version__ = '0.7.12'
8.166667
22
0.591837
""" BSAM CLI version """ __version__ = '0.7.12'
0
0
0
0
0
0
0
0
0
c9be065d18c2c5911e6ebaeb74f95c60dde00049
1,867
py
Python
helper/slicable_set.py
theblacklion/diamond-framework
0996a517a6821d8903f5c378a85e9b1f3998109f
[ "MIT" ]
null
null
null
helper/slicable_set.py
theblacklion/diamond-framework
0996a517a6821d8903f5c378a85e9b1f3998109f
[ "MIT" ]
null
null
null
helper/slicable_set.py
theblacklion/diamond-framework
0996a517a6821d8903f5c378a85e9b1f3998109f
[ "MIT" ]
null
null
null
# Slicable Set. # # @author Oktay Acikalin <oktay.acikalin@gmail.com> # @copyright Oktay Acikalin # @license MIT (LICENSE.txt) # from diamond.decorators import time
31.644068
78
0.588109
# Slicable Set. # # @author Oktay Acikalin <oktay.acikalin@gmail.com> # @copyright Oktay Acikalin # @license MIT (LICENSE.txt) # from diamond.decorators import time class SlicableSet(set): # @time def __getitem__(self, index): ''' Returns an item of the ordered set. Please keep ...
0
0
0
1,672
0
0
0
0
23
d4d4f265f1d8b2c79a40895e200e8d6ec1efdebe
39
py
Python
config.py
nullaf/ScribeUp_Assignment_Backend
baeda12efe971f37b5a2b2b7b8f3d403993ed562
[ "MIT" ]
null
null
null
config.py
nullaf/ScribeUp_Assignment_Backend
baeda12efe971f37b5a2b2b7b8f3d403993ed562
[ "MIT" ]
null
null
null
config.py
nullaf/ScribeUp_Assignment_Backend
baeda12efe971f37b5a2b2b7b8f3d403993ed562
[ "MIT" ]
null
null
null
DEBUG = True FLASK_ENV = 'development'
13
25
0.74359
DEBUG = True FLASK_ENV = 'development'
0
0
0
0
0
0
0
0
0
3bfdb4af14b7e7cd303aaabe0d86a23e4e096ea6
344
py
Python
Alfabeto.py
uip-pc2/simulacion-dado-Alvaroh04
a42a945fabf71c9d0950a4403f9532f9a2e366cd
[ "MIT" ]
null
null
null
Alfabeto.py
uip-pc2/simulacion-dado-Alvaroh04
a42a945fabf71c9d0950a4403f9532f9a2e366cd
[ "MIT" ]
null
null
null
Alfabeto.py
uip-pc2/simulacion-dado-Alvaroh04
a42a945fabf71c9d0950a4403f9532f9a2e366cd
[ "MIT" ]
null
null
null
if __name__ == '__main__': letra = letras() try: for i in range(ord('M')): print(next(letra)) if i == 'M': break except Exception as e: print(e)
22.933333
42
0.383721
def letras(): for i in range(ord('A'), ord('M')+1): yield (chr(i)) if __name__ == '__main__': letra = letras() try: for i in range(ord('M')): print(next(letra)) if i == 'M': break except Exception as e:...
0
0
0
0
59
0
0
0
23
38c5d5137c314499b45d13a501ffb0168095284e
5,266
py
Python
make_representative_images.py
jehenninger/in_vitro_droplet_assay
99344b96fbb2ac73bd0b20334b9dfede4529c5e2
[ "MIT" ]
1
2020-07-22T17:29:33.000Z
2020-07-22T17:29:33.000Z
make_representative_images.py
jehenninger/in_vitro_droplet_assay
99344b96fbb2ac73bd0b20334b9dfede4529c5e2
[ "MIT" ]
null
null
null
make_representative_images.py
jehenninger/in_vitro_droplet_assay
99344b96fbb2ac73bd0b20334b9dfede4529c5e2
[ "MIT" ]
null
null
null
import sys import os import argparse import matplotlib matplotlib.use('Agg') # parse input parser = argparse.ArgumentParser() # path to metadata file with specific columns: # 1. file_path = path to each separate image file (even separated by channels) # 2. sample_name = name of sample that you want to be output ...
38.437956
138
0.680972
import sys import os import json from datetime import datetime import argparse import pandas as pd import numpy as np from skimage import io, filters, measure, color, exposure, morphology, feature, img_as_float, img_as_uint import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt from scipy.optimi...
0
0
0
0
0
3,734
0
95
223
41518b023218b2609d74203dbc40abbadcbe1894
329
py
Python
src/directory/migrations/0025_remove_author_genre.py
Aleksander-Protasevich/django_project
49d7b0f5e86d544f94340d8343995f6d4b70bbd8
[ "Apache-2.0" ]
null
null
null
src/directory/migrations/0025_remove_author_genre.py
Aleksander-Protasevich/django_project
49d7b0f5e86d544f94340d8343995f6d4b70bbd8
[ "Apache-2.0" ]
null
null
null
src/directory/migrations/0025_remove_author_genre.py
Aleksander-Protasevich/django_project
49d7b0f5e86d544f94340d8343995f6d4b70bbd8
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.5 on 2021-02-21 13:29
18.277778
49
0.592705
# Generated by Django 3.1.5 on 2021-02-21 13:29 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('directory', '0024_auto_20210214_2205'), ] operations = [ migrations.RemoveField( model_name='author', name='genre', ...
0
0
0
223
0
0
0
11
46
f956aea638114497d04311890486f3971149b4ae
600
py
Python
setup.py
ukch/jclib
e3e293024d225865bec5e704fca753e08c7fdf2e
[ "MIT" ]
null
null
null
setup.py
ukch/jclib
e3e293024d225865bec5e704fca753e08c7fdf2e
[ "MIT" ]
null
null
null
setup.py
ukch/jclib
e3e293024d225865bec5e704fca753e08c7fdf2e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import setuptools with open("README.rst", "r") as fh: long_description = fh.read() setuptools.setup( name="jclib", version="0.0.1", author="Joel Cross", author_email="joel@kazbak.co.uk", description="Reusable code", long_description=long_description, url="https:...
24
49
0.615
#!/usr/bin/env python3 import setuptools with open("README.rst", "r") as fh: long_description = fh.read() setuptools.setup( name="jclib", version="0.0.1", author="Joel Cross", author_email="joel@kazbak.co.uk", description="Reusable code", long_description=long_description, url="https:...
0
0
0
0
0
0
0
0
0
faf99e9ca3ebeccce61e5598e8d6dc4660763fa4
2,366
py
Python
imaging/startup-script.py
dmageeLANL/hip-fortran
6b459a1c0a941de26a24cb4540cbb44b0b93b7ed
[ "Apache-2.0" ]
9
2020-05-22T09:22:00.000Z
2021-09-13T02:44:53.000Z
imaging/startup-script.py
dmageeLANL/hip-fortran
6b459a1c0a941de26a24cb4540cbb44b0b93b7ed
[ "Apache-2.0" ]
1
2020-05-22T09:48:56.000Z
2020-05-22T09:48:56.000Z
imaging/startup-script.py
dmageeLANL/hip-fortran
6b459a1c0a941de26a24cb4540cbb44b0b93b7ed
[ "Apache-2.0" ]
2
2020-04-10T15:32:29.000Z
2021-06-14T16:58:39.000Z
#!/usr/bin/python # Copyright 2020 Fluid Numerics 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 ...
26.886364
143
0.670752
#!/usr/bin/python # Copyright 2020 Fluid Numerics 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 ...
0
0
0
0
0
1,452
0
0
92
b099886bb10ceb5c81e9fe37010b41a46c435c05
10,312
py
Python
lstchain/calib/camera/calibrator.py
calispac/cta-lstchain
83c7058a291c55f5841e984b99f22ac49e759d0f
[ "BSD-3-Clause" ]
null
null
null
lstchain/calib/camera/calibrator.py
calispac/cta-lstchain
83c7058a291c55f5841e984b99f22ac49e759d0f
[ "BSD-3-Clause" ]
null
null
null
lstchain/calib/camera/calibrator.py
calispac/cta-lstchain
83c7058a291c55f5841e984b99f22ac49e759d0f
[ "BSD-3-Clause" ]
1
2020-11-05T09:18:27.000Z
2020-11-05T09:18:27.000Z
import numpy as np import os from ctapipe.calib.camera.calibrator import integration_correction __all__ = ['LSTCameraCalibrator','get_charge_correction'] def get_charge_correction(window_width, window_shift): """ Obtain charge correction from the reference pulse shape, this function is will be not nece...
36.309859
125
0.62083
import numpy as np import os from ctapipe.core.traits import Unicode, List, Int, Bool from ctapipe.calib.camera import CameraCalibrator from ctapipe.calib.camera.calibrator import integration_correction from ctapipe.image.reducer import DataVolumeReducer from ctapipe.image.extractor import ImageExtractor from ctapipe.i...
0
0
0
7,874
0
0
0
262
199
79a1e8376d507b317b509336d08df4f82f090cd0
621
py
Python
src/user.py
RARM/homeless_registration
4b5b4ed88d9516afb0af556b38846ae091fce3c7
[ "MIT" ]
1
2020-08-02T02:26:50.000Z
2020-08-02T02:26:50.000Z
src/user.py
RARM/homeless_registration
4b5b4ed88d9516afb0af556b38846ae091fce3c7
[ "MIT" ]
null
null
null
src/user.py
RARM/homeless_registration
4b5b4ed88d9516afb0af556b38846ae091fce3c7
[ "MIT" ]
null
null
null
# Main userName = "Admin" passWord = "Admin" print("What is the username?") passWord = input() print("what is the password?") passWord = input() test = checkPassword(userName, passWord) if test == True: print("Login successful") else: print("Login not successful")
23.884615
41
0.624799
def checkPassword(userName, passWord): actualUsername = "Admin" actualPassword = "Admin" if userName == actualUsername: if passWord == actualPassword: checkPassword = True else: checkPassword = False else: checkPassword = False return c...
0
0
0
0
0
311
0
0
23
eb82cb6814f513d77e4bb2781b38dd0e8f229d28
250
py
Python
utils.py
dstarr1/compare_personality_models
244c1de231c9efa05307920733b62230cabdce7a
[ "MIT" ]
null
null
null
utils.py
dstarr1/compare_personality_models
244c1de231c9efa05307920733b62230cabdce7a
[ "MIT" ]
null
null
null
utils.py
dstarr1/compare_personality_models
244c1de231c9efa05307920733b62230cabdce7a
[ "MIT" ]
null
null
null
""" Shared utility functions. """ import json def read_local_config(config_fname): ''' Read configs from local, non-git commited json file. ''' with open(config_fname) as fp: local_config = json.load(fp) return local_config
19.230769
60
0.68
""" Shared utility functions. """ import json def read_local_config(config_fname): ''' Read configs from local, non-git commited json file. ''' with open(config_fname) as fp: local_config = json.load(fp) return local_config
0
0
0
0
0
0
0
0
0
0279f51715bc3008cd501168d7d22b7f712a10ea
48,830
py
Python
MCNPtools/material_collection.py
sellitforcache/MCNPtools
5192111910328bc2220d8fa421d5928d93305ced
[ "BSD-3-Clause" ]
5
2015-02-02T16:57:25.000Z
2021-11-09T00:50:33.000Z
MCNPtools/material_collection.py
sellitforcache/MCNPtools
5192111910328bc2220d8fa421d5928d93305ced
[ "BSD-3-Clause" ]
1
2018-03-23T09:54:57.000Z
2018-03-23T09:59:55.000Z
MCNPtools/material_collection.py
sellitforcache/MCNPtools
5192111910328bc2220d8fa421d5928d93305ced
[ "BSD-3-Clause" ]
4
2015-08-02T23:19:50.000Z
2020-09-30T22:16:01.000Z
from MCNPtools import calculate_materials # # Stainless Steel 316 # ss316=calculate_materials.mixture('SS316') ss316.mass_density=7.95 ss316.add_mixture( 'P' , 210.00, mode='mass') ss316.add_mixture( 'Mo' , 1990.00, mode='mass') ss316.add_mixture( 'Zn' , 12.00, mode='mass') ss316.add_mixture( 'Pb' , 40.0...
39.602595
116
0.687467
from MCNPtools import calculate_materials # # Stainless Steel 316 # ss316=calculate_materials.mixture('SS316') ss316.mass_density=7.95 ss316.add_mixture( 'P' , 210.00, mode='mass') ss316.add_mixture( 'Mo' , 1990.00, mode='mass') ss316.add_mixture( 'Zn' , 12.00, mode='mass') ss316.add_mixture( 'Pb' , 40.0...
0
0
0
0
0
0
0
0
0
411280651611a2916471de0473cfe5b2f47dcf1b
7,786
py
Python
engine.py
nicktgn/wakeword-benchmark
633502ba357bd210bd39132814306a5eb4e323f8
[ "Apache-2.0" ]
null
null
null
engine.py
nicktgn/wakeword-benchmark
633502ba357bd210bd39132814306a5eb4e323f8
[ "Apache-2.0" ]
null
null
null
engine.py
nicktgn/wakeword-benchmark
633502ba357bd210bd39132814306a5eb4e323f8
[ "Apache-2.0" ]
null
null
null
# # Copyright 2018 Picovoice 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 writ...
30.29572
116
0.652453
# # Copyright 2018 Picovoice 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 writ...
0
1,443
0
5,373
0
0
0
41
340
147606efd02c473d877d782fb47db716bf843174
10,404
py
Python
tests/unit/deferred.py
CCI-MOC/hil
8c6de2214ddf908c01549b117d5684ac52a93934
[ "ECL-2.0", "Apache-2.0" ]
23
2016-09-27T18:41:46.000Z
2021-12-20T15:06:32.000Z
tests/unit/deferred.py
CCI-MOC/hil
8c6de2214ddf908c01549b117d5684ac52a93934
[ "ECL-2.0", "Apache-2.0" ]
522
2016-06-22T21:19:26.000Z
2020-11-12T20:54:40.000Z
tests/unit/deferred.py
CCI-MOC/hil
8c6de2214ddf908c01549b117d5684ac52a93934
[ "ECL-2.0", "Apache-2.0" ]
30
2016-06-24T08:27:59.000Z
2018-08-20T17:34:45.000Z
'''Functional test for deferred.py''' import pytest import uuid from hil import config, deferred, model, api from hil.model import db from hil.test_common import fresh_database from flask import Flask from flask_sqlalchemy import SQLAlchemy fresh_database = pytest.fixture(fresh_database) DeferredTestSwitch = None ...
34.564784
79
0.627259
'''Functional test for deferred.py''' import pytest import tempfile import uuid from hil import config, deferred, model, api from hil.model import db, Switch from hil.errors import SwitchError from hil.test_common import config_testsuite, config_merge, \ fresh_database from flask import F...
0
4,487
0
148
0
0
0
78
159
b15a6bfe47eaa9078e2ec77dad64e9c9debea00d
472
py
Python
filebeat/tests/conftest.py
divyamamgai/integrations-extras
8c40a9cf870578687cc224ee91d3c70cd3a435a4
[ "BSD-3-Clause" ]
158
2016-06-02T16:25:31.000Z
2022-03-16T15:55:14.000Z
filebeat/tests/conftest.py
divyamamgai/integrations-extras
8c40a9cf870578687cc224ee91d3c70cd3a435a4
[ "BSD-3-Clause" ]
554
2016-03-15T17:39:12.000Z
2022-03-31T10:29:16.000Z
filebeat/tests/conftest.py
divyamamgai/integrations-extras
8c40a9cf870578687cc224ee91d3c70cd3a435a4
[ "BSD-3-Clause" ]
431
2016-05-13T15:33:13.000Z
2022-03-31T10:06:46.000Z
from .common import ENDPOINT, registry_file_path INSTANCE = { "stats_endpoint": ENDPOINT, "registry_file_path": registry_file_path("empty"), }
18.88
84
0.739407
import os import pytest from datadog_checks.dev.docker import docker_run from .common import DOCKER_DIR, ENDPOINT, URL, registry_file_path INSTANCE = { "stats_endpoint": ENDPOINT, "registry_file_path": registry_file_path("empty"), } @pytest.fixture(scope="session") def dd_environment(): with docker_r...
0
179
0
0
0
0
0
24
114
acffc257f4aec5a1b5c2f37f9921487fb330d660
1,228
py
Python
tests/pymcell4_positive/0185_model_deepcopy/model.py
mcellteam/mcell-tests
34d2d967b75d56edbae999bf0090641850f4f4fe
[ "MIT" ]
1
2021-08-13T20:40:54.000Z
2021-08-13T20:40:54.000Z
tests/pymcell4_positive/0185_model_deepcopy/model.py
mcellteam/mcell_tests
34d2d967b75d56edbae999bf0090641850f4f4fe
[ "MIT" ]
null
null
null
tests/pymcell4_positive/0185_model_deepcopy/model.py
mcellteam/mcell_tests
34d2d967b75d56edbae999bf0090641850f4f4fe
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import os import copy MCELL_PATH = os.environ.get('MCELL_PATH', '') if MCELL_PATH: sys.path.append(os.path.join(MCELL_PATH, 'lib')) else: print("Error: variable MCELL_PATH that is used to find the mcell library was not set.") sys.exit(1) import mcell as m if len(sys.arg...
21.172414
91
0.722313
#!/usr/bin/env python3 import sys import os import math import copy MCELL_PATH = os.environ.get('MCELL_PATH', '') if MCELL_PATH: sys.path.append(os.path.join(MCELL_PATH, 'lib')) else: print("Error: variable MCELL_PATH that is used to find the mcell library was not set.") sys.exit(1) import mcell as m fr...
0
0
0
0
0
0
0
-7
45
28e14f0ca9a3fb40edb82cf1613b51d9d5e3ae53
822
py
Python
d3dfacs_face_experiments.py
akashsengupta1997/FLAME_PyTorch
100e66c1c0621d0a3e0273ff9cc65e43e4f0ddbb
[ "MIT" ]
null
null
null
d3dfacs_face_experiments.py
akashsengupta1997/FLAME_PyTorch
100e66c1c0621d0a3e0273ff9cc65e43e4f0ddbb
[ "MIT" ]
null
null
null
d3dfacs_face_experiments.py
akashsengupta1997/FLAME_PyTorch
100e66c1c0621d0a3e0273ff9cc65e43e4f0ddbb
[ "MIT" ]
null
null
null
import matplotlib matplotlib.use('MACOSX') from metrics.full_face_vertex_deviation import compute_vertex_deviations_for_actor # d3dfacs_path = "/Users/Akash_Sengupta/Documents/Datasets/d3dfacs_alignments" # compute_vertex_deviations_for_all(d3dfacs_path) actor_path = "/Users/Akash_Sengupta/Documents/Datasets/d3dfacs...
39.142857
126
0.784672
import matplotlib matplotlib.use('MACOSX') import matplotlib.pyplot as plt import numpy as np from metrics.full_face_vertex_deviation import compute_vertex_deviations_over_sequence, compute_vertex_deviations_for_actor, \ compute_vertex_deviations_for_all # d3dfacs_path = "/Users/Akash_Sengupta/Documents/Datasets...
0
0
0
0
0
0
0
89
45
37f86d341ea75699493f0cdbf63996e250c6f548
9,218
py
Python
hyperparameter_tuning/rapids_bring_your_own/code/HPOConfig.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
1
2021-05-31T17:19:10.000Z
2021-05-31T17:19:10.000Z
hyperparameter_tuning/rapids_bring_your_own/code/HPOConfig.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
1
2019-07-01T23:54:20.000Z
2019-07-01T23:55:29.000Z
hyperparameter_tuning/rapids_bring_your_own/code/HPOConfig.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
2
2021-06-24T11:49:58.000Z
2021-06-24T11:54:01.000Z
# # Copyright (c) 2019-2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
39.393162
100
0.618464
# # Copyright (c) 2019-2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
0
0
8,469
0
0
0
-39
135
c1635c6228b2c2ba6ae51a07d323eaa758d5e8a8
7,673
py
Python
tests/test_memory.py
aserhiychuk/pyreinforce
62957dbc920d9909a22d0677d047e31173f511b4
[ "MIT" ]
11
2019-07-25T12:09:03.000Z
2020-02-13T18:23:14.000Z
tests/test_memory.py
aserhiychuk/pyreinforce
62957dbc920d9909a22d0677d047e31173f511b4
[ "MIT" ]
null
null
null
tests/test_memory.py
aserhiychuk/pyreinforce
62957dbc920d9909a22d0677d047e31173f511b4
[ "MIT" ]
null
null
null
import unittest import random _seed = 123 _random = random.Random() _random.seed(_seed) if __name__ == '__main__': unittest.main()
31.064777
91
0.592858
import unittest import random import numpy as np from pyreinforce.memory import Memory, EpisodicMemory _seed = 123 _random = random.Random() _random.seed(_seed) def _random_experience(s=None, a=None, r=None, s1=None, is_terminal=None): if s is None: s = _random.random() if a is None: a = ...
0
0
0
7,017
0
370
0
29
115
2cad7b548c1d1841de3c4cc718832b4dbd4cb823
6,344
py
Python
scrapers/inform.py
mcarans/hdx-scraper-covid-viz
8ae4617717a4265af996621e1b01b1845d3044bc
[ "MIT" ]
null
null
null
scrapers/inform.py
mcarans/hdx-scraper-covid-viz
8ae4617717a4265af996621e1b01b1845d3044bc
[ "MIT" ]
null
null
null
scrapers/inform.py
mcarans/hdx-scraper-covid-viz
8ae4617717a4265af996621e1b01b1845d3044bc
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger(__name__)
39.65
83
0.54319
import logging from dateutil.relativedelta import relativedelta from hdx.scraper.base_scraper import BaseScraper from hdx.utilities.dateparse import default_date, parse_date from hdx.utilities.dictandlist import dict_of_lists_add logger = logging.getLogger(__name__) class Inform(BaseScraper): def __init__(self,...
0
0
0
6,051
0
0
0
127
112
38ebd9c49496629e71b003c8cb880d21e14b1907
2,008
py
Python
examples/transformPDF_Imagenet.py
trikpachu/DDE
603369dd65861981424e55585e3aeae538f1d104
[ "MIT" ]
2
2021-07-08T09:30:31.000Z
2021-11-16T13:26:05.000Z
examples/transformPDF_Imagenet.py
trikpachu/DDE
603369dd65861981424e55585e3aeae538f1d104
[ "MIT" ]
null
null
null
examples/transformPDF_Imagenet.py
trikpachu/DDE
603369dd65861981424e55585e3aeae538f1d104
[ "MIT" ]
null
null
null
''' Generates and samples the PDF from the Imagenet dataset. Data is expected to be imagefiles in 8bit png format. The probability values at arbitrary points are interpolated from the surrounding values by linear interpolation. Dumps a list per sample in a directory, containing [samples] or [samples, grid_samples], w...
55.777778
242
0.76992
''' Generates and samples the PDF from the Imagenet dataset. Data is expected to be imagefiles in 8bit png format. The probability values at arbitrary points are interpolated from the surrounding values by linear interpolation. Dumps a list per sample in a directory, containing [samples] or [samples, grid_samples], w...
0
0
0
0
0
171
0
55
45
30ae1739e8c51c06b969dac12f01448a5c61f84e
4,915
py
Python
src/leftTicket/LeftTicketQuery.py
SeaYellow/12306_basic
2a25c90cdec6f7877f0364fb8f0126b9fbe05358
[ "Apache-2.0" ]
null
null
null
src/leftTicket/LeftTicketQuery.py
SeaYellow/12306_basic
2a25c90cdec6f7877f0364fb8f0126b9fbe05358
[ "Apache-2.0" ]
null
null
null
src/leftTicket/LeftTicketQuery.py
SeaYellow/12306_basic
2a25c90cdec6f7877f0364fb8f0126b9fbe05358
[ "Apache-2.0" ]
null
null
null
if __name__ == '__main__': trainDate = "2018-05-21" fromStation = "" toStation = "" ltq = LeftTicketQuery() staticonNameCode = ltq.queryStation() stationCodeName = dict((v, k) for k, v in staticonNameCode.items()) leftTicketUrl = ltq.makeLeftTicketUrl(trainDate, fromStation, toStation, st...
48.663366
221
0.544659
import re import requests import json class LeftTicketQuery: def queryStation(self): stationUrl = "https://kyfw.12306.cn/otn/resources/js/framework/station_name.js?station_version=1.8971" requests.packages.urllib3.disable_warnings() response = requests.get(stationUrl, verify=False) ...
423
0
0
3,543
0
0
0
-28
89
2ee0514dc3998889165a96a91604287c35963751
5,819
py
Python
deity.py
harlowja/Quietus
786f07271a70bbdaa1508750af1c43444bd9826d
[ "Apache-2.0" ]
null
null
null
deity.py
harlowja/Quietus
786f07271a70bbdaa1508750af1c43444bd9826d
[ "Apache-2.0" ]
null
null
null
deity.py
harlowja/Quietus
786f07271a70bbdaa1508750af1c43444bd9826d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015 Yahoo! Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
33.635838
79
0.533941
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015 Yahoo! Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
0
116
0
2,759
0
1,930
0
-67
296
973ff234f4f36e7ea57f61cee27c31e5ff172ace
764
py
Python
main.py
Alpxnz/ytdownloader
4ea80e3055be763faa8b2a1284268a8393f48710
[ "MIT" ]
3
2020-08-27T03:30:07.000Z
2020-08-27T06:24:14.000Z
main.py
Alpxnz/ytdownloader
4ea80e3055be763faa8b2a1284268a8393f48710
[ "MIT" ]
null
null
null
main.py
Alpxnz/ytdownloader
4ea80e3055be763faa8b2a1284268a8393f48710
[ "MIT" ]
null
null
null
import os directory = (os.getcwd() + '/Downloads') ydl_opts = {} try: main() except IndexError: print('No foi detectado nenhum URL!')
26.344828
106
0.585079
import youtube_dl import os import sys directory = (os.getcwd() + '/Downloads') ydl_opts = {} def main(): arg = sys.argv[1] try: os.chdir(directory) print(f'Foi detectado que a pasta {directory} já existe e o arquivo está sendo baixado:') with youtube_dl.YoutubeDL(yd...
10
0
0
0
0
546
0
-15
71
d2a75bd711ad427623bb91d72c41b15b9b44a5b6
4,371
py
Python
dialogflow/cloud-client/context_management.py
summersab/python-docs-samples
7c1e9685fe190f7789d8e1dbcfe8c01a20e3dc66
[ "Apache-2.0" ]
3
2021-01-24T23:42:57.000Z
2021-02-17T12:02:12.000Z
dialogflow/cloud-client/context_management.py
summersab/python-docs-samples
7c1e9685fe190f7789d8e1dbcfe8c01a20e3dc66
[ "Apache-2.0" ]
320
2020-11-08T21:02:43.000Z
2022-02-10T10:43:29.000Z
dialogflow/cloud-client/context_management.py
summersab/python-docs-samples
7c1e9685fe190f7789d8e1dbcfe8c01a20e3dc66
[ "Apache-2.0" ]
3
2019-02-11T16:16:11.000Z
2019-04-19T21:34:37.000Z
#!/usr/bin/env python # Copyright 2017 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...
32.619403
74
0.708991
#!/usr/bin/env python # Copyright 2017 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...
0
0
0
0
0
1,428
0
0
66
80d6de7b360aad2cea38b2d9c76d6376c1a7715f
586
py
Python
AutotestWebD/apps/demo/services/UserService.py
yangjourney/sosotest
2e88099a829749910ca325253c9b1a2e368d21a0
[ "MIT" ]
422
2019-08-18T05:04:20.000Z
2022-03-31T06:49:19.000Z
AutotestWebD/apps/demo/services/UserService.py
LinSongJian1985/sosotest
091863dee531b5726650bb63efd6f169267cbeb4
[ "MIT" ]
10
2019-10-24T09:55:38.000Z
2021-09-29T17:28:43.000Z
AutotestWebD/apps/demo/services/UserService.py
LinSongJian1985/sosotest
091863dee531b5726650bb63efd6f169267cbeb4
[ "MIT" ]
202
2019-08-18T05:04:27.000Z
2022-03-30T05:57:18.000Z
if __name__ == "__main__": print(UserService.getUsers()[0].loginname) print(UserService.getUserByLoginname(UserService.getUsers()[0].loginname))
29.3
78
0.71843
import apps.common.func.InitDjango from all_models.models import TbUser class UserService(object): @staticmethod def getUsers(): return TbUser.objects.all() @staticmethod def getUserByLoginname(loginname): return TbUser.objects.filter(loginname=loginname) @staticmethod def upd...
0
253
0
5
0
0
0
28
147
45387763832e9d086d8c80b77f40ec6b157dc300
310
py
Python
flowjs/tasks.py
nelsonmonteiro/django-flowjs
7f2c88df12a9e8f19bb7a3fa21a628d07849d61e
[ "MIT" ]
16
2015-01-02T16:41:17.000Z
2022-03-09T00:15:56.000Z
flowjs/tasks.py
nelsonmonteiro/django-flowjs
7f2c88df12a9e8f19bb7a3fa21a628d07849d61e
[ "MIT" ]
2
2015-10-03T18:00:20.000Z
2016-08-02T07:07:21.000Z
flowjs/tasks.py
nelsonmonteiro/django-flowjs
7f2c88df12a9e8f19bb7a3fa21a628d07849d61e
[ "MIT" ]
18
2015-01-07T14:46:19.000Z
2018-07-22T22:56:05.000Z
from __future__ import absolute_import
20.666667
38
0.780645
from __future__ import absolute_import from celery import shared_task @shared_task def join_chunks_task(flow_file): print('starting join task'), return flow_file._join_chunks() @shared_task def delete_chunks_task(flow_file): print('starting delete task'), return flow_file._delete_chunks()
0
192
0
0
0
0
0
9
68
a395fbf8aca6ace4b96e480c89ba346f108cc53d
1,499
py
Python
server/extensions.py
shepilov-vladislav/Flask-Restless-Restangular-with-JWT-auth
1559cefef0dfb376e4579b1beea6a47f55081eb3
[ "MIT" ]
34
2015-11-13T07:52:50.000Z
2017-09-02T07:38:35.000Z
server/extensions.py
shepilov-vladislav/Flask-Restless-Restangular-with-JWT-auth
1559cefef0dfb376e4579b1beea6a47f55081eb3
[ "MIT" ]
4
2015-11-11T07:14:51.000Z
2016-01-21T12:04:28.000Z
server/extensions.py
shepilov-vladislav/Flask-Restless-Restangular-with-JWT-auth
1559cefef0dfb376e4579b1beea6a47f55081eb3
[ "MIT" ]
7
2016-01-21T03:59:20.000Z
2019-06-12T13:42:58.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from flask.ext.mail import Mail mail = Mail() from flask.ext.cors import CORS cors = CORS() from flask.ext.security import Security, SQLAlchemyUserDatastore from .models import User, Role, db datastore = SQLAlchemyUserDatastore(db, User, Role) securi...
25.40678
90
0.731821
# -*- coding: utf-8 -*- from __future__ import absolute_import class CheckError(ValueError): pass from flask.ext.mail import Mail mail = Mail() from flask.ext.cors import CORS cors = CORS() from flask.ext.security import Security, SQLAlchemyUserDatastore from .models import User, Role, db datastore = SQLAlc...
0
892
0
17
0
0
0
32
159
b18449d77673343fa8fea3496c2943cef9aebaf3
5,753
py
Python
importers/wikidata.py
trompamusic/ce-import-muziekweb
3635c735e1a632fdefbb75b249f2f8dc0bb66b85
[ "Apache-2.0" ]
null
null
null
importers/wikidata.py
trompamusic/ce-import-muziekweb
3635c735e1a632fdefbb75b249f2f8dc0bb66b85
[ "Apache-2.0" ]
2
2021-01-26T10:20:50.000Z
2021-03-05T11:14:31.000Z
importers/wikidata.py
trompamusic/ce-import-muziekweb
3635c735e1a632fdefbb75b249f2f8dc0bb66b85
[ "Apache-2.0" ]
null
null
null
import requests from requests.adapters import HTTPAdapter s = requests.Session() adapter = HTTPAdapter(max_retries=5, pool_connections=100, pool_maxsize=100) s.mount("https://", adapter) def _get_normalized_query(data, query): """If you query with an _ in a query (e.g. from a wikipedia url, then wikipedia w...
30.120419
122
0.654094
from wikidata.client import Client from urllib.parse import urlparse import wikipedia import requests from requests.adapters import HTTPAdapter from .ceimport import cache s = requests.Session() adapter = HTTPAdapter(max_retries=5, pool_connections=100, pool_maxsize=100) s.mount("https://", adapter) class Wikipedi...
0
3,047
0
24
0
1,691
0
26
365
9a16bea049365af002632dcc4785b6f2d6ac6b83
705
py
Python
post-receive.py
hendiko/git-ring
5d4bcb47821e157f84d8644cea2bc5cd896d02d1
[ "MIT" ]
1
2015-05-25T01:25:49.000Z
2015-05-25T01:25:49.000Z
post-receive.py
hendiko/git-ring
5d4bcb47821e157f84d8644cea2bc5cd896d02d1
[ "MIT" ]
null
null
null
post-receive.py
hendiko/git-ring
5d4bcb47821e157f84d8644cea2bc5cd896d02d1
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf8 -*- # Created by Xavier Yin on 2015/2/28 from modules.conf import Config from modules import run_as_post_receive import os import sys CURRENT_FILE_PATH = os.path.abspath(__file__) CURRENT_WORK_DIR = os.path.dirname(CURRENT_FILE_PATH) GIT_DIR = os.path.dirname(CURRENT_WORK_DIR...
27.115385
62
0.716312
#!/usr/bin/env python # -*- coding: utf8 -*- # Created by Xavier Yin on 2015/2/28 from modules.conf import Config from modules import run_as_post_receive import os import sys CURRENT_FILE_PATH = os.path.abspath(__file__) CURRENT_WORK_DIR = os.path.dirname(CURRENT_FILE_PATH) GIT_DIR = os.path.dirname(CURRENT_WORK_DIR...
0
0
0
0
0
0
0
0
0
becff4b7e0d62c4248ab7817a89e6a89f43bcb24
1,457
py
Python
coordinated/rnn.py
phueb/Coordinated
623b5e416faceb04b870d0adc5d82023cad89df9
[ "MIT" ]
null
null
null
coordinated/rnn.py
phueb/Coordinated
623b5e416faceb04b870d0adc5d82023cad89df9
[ "MIT" ]
null
null
null
coordinated/rnn.py
phueb/Coordinated
623b5e416faceb04b870d0adc5d82023cad89df9
[ "MIT" ]
null
null
null
import torch.nn as nn
33.883721
109
0.578586
import torch import torch.nn as nn import numpy as np from coordinated import configs class RNN(nn.Module): def __init__(self, flavor, input_size): super().__init__() self.hidden_size = 2 self.input_size = input_size # define just rnn without output layer self.embed = tor...
0
0
0
1,347
0
0
0
-2
90
777407644678e27922087d95adb747afa8731523
2,180
py
Python
PyOpenGL-3.0.2/OpenGL/raw/GL/EXT/histogram.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
PyOpenGL-3.0.2/OpenGL/raw/GL/EXT/histogram.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
PyOpenGL-3.0.2/OpenGL/raw/GL/EXT/histogram.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
'''Autogenerated by get_gl_extensions script, do not edit!''' from OpenGL import platform as _p from OpenGL.GL import glget EXTENSION_NAME = 'GL_EXT_histogram' _p.unpack_constants( """GL_HISTOGRAM_EXT 0x8024 GL_PROXY_HISTOGRAM_EXT 0x8025 GL_HISTOGRAM_WIDTH_EXT 0x8026 GL_HISTOGRAM_FORMAT_EXT 0x8027 GL_HISTOGRAM_RED_SIZE...
36.333333
78
0.819266
'''Autogenerated by get_gl_extensions script, do not edit!''' from OpenGL import platform as _p, constants as _cs, arrays from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_EXT_histogram' def _f( function ): return _p.createFunction( function,_p.GL,'GL_EXT_histogram',False) _p.unpack_constants( """GL_HI...
0
921
0
0
0
69
0
18
264
534a3baa7e4ce7c1035274b38c8f580ee9d1c8e2
8,217
py
Python
lino_xl/lib/uploads/models.py
khchine5/xl
b1634937a9ce87af1e948eb712b934b11f221d9d
[ "BSD-2-Clause" ]
1
2018-01-12T14:09:48.000Z
2018-01-12T14:09:48.000Z
lino_xl/lib/uploads/models.py
khchine5/xl
b1634937a9ce87af1e948eb712b934b11f221d9d
[ "BSD-2-Clause" ]
1
2019-09-10T05:03:47.000Z
2019-09-10T05:03:47.000Z
lino_xl/lib/uploads/models.py
khchine5/xl
b1634937a9ce87af1e948eb712b934b11f221d9d
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: UTF-8 -*- # Copyright 2014-2018 Luc Saffre # License: BSD (see file COPYING for details) """ Database models for this plugin. """ from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from lino.api import dd # add = UploadAreas.add_item # add('10', _("Job...
28.630662
86
0.651576
# -*- coding: UTF-8 -*- # Copyright 2014-2018 Luc Saffre # License: BSD (see file COPYING for details) """ Database models for this plugin. """ from __future__ import unicode_literals from builtins import str from django.utils.translation import ugettext_lazy as _ from lino.api import dd from lino.modlib.upload...
0
1,922
0
4,772
0
0
0
144
386
87a392d1addd40507180fe095c4ce9d432f2c621
8,575
py
Python
api/server/swagger_server/data_access/minio_client.py
Tomcli/mlx
5da8a9f25efd242aed5590d257f322908e2f85cb
[ "Apache-2.0" ]
null
null
null
api/server/swagger_server/data_access/minio_client.py
Tomcli/mlx
5da8a9f25efd242aed5590d257f322908e2f85cb
[ "Apache-2.0" ]
null
null
null
api/server/swagger_server/data_access/minio_client.py
Tomcli/mlx
5da8a9f25efd242aed5590d257f322908e2f85cb
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 IBM Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
32.236842
116
0.676968
# Copyright 2021 IBM Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
0
0
0
0
0
6,750
0
88
542
9edd6bdca39fbf7054794863fb65cbb9d3a9690e
3,777
py
Python
exp/base.py
yifeng-lee/ctftools
bdc16188336b02644c06e8122fc2a5df4a0c795f
[ "MIT" ]
2
2020-09-04T08:14:24.000Z
2020-10-21T15:50:47.000Z
exp/base.py
yifeng-lee/ctftools
bdc16188336b02644c06e8122fc2a5df4a0c795f
[ "MIT" ]
null
null
null
exp/base.py
yifeng-lee/ctftools
bdc16188336b02644c06e8122fc2a5df4a0c795f
[ "MIT" ]
null
null
null
b16table = '0123456789ABCDEF' b32table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567' b58table = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' b64table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' b85table = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_...
21.338983
104
0.627482
import base64 import base58 import base91 b16table = '0123456789ABCDEF' b32table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567' b58table = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' b64table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' b85table = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZab...
0
0
0
0
0
3,016
0
-24
342
d5da00dde98161416f332b31943642ff37f0983a
40,810
py
Python
src/python/tests/appengine/handlers/cron/manage_vms_test.py
nopsledder/clusterfuzz
529963438d956e46ddddfb62debc6ed808be0083
[ "Apache-2.0" ]
null
null
null
src/python/tests/appengine/handlers/cron/manage_vms_test.py
nopsledder/clusterfuzz
529963438d956e46ddddfb62debc6ed808be0083
[ "Apache-2.0" ]
20
2020-07-28T19:01:56.000Z
2021-03-23T01:04:42.000Z
src/python/tests/appengine/handlers/cron/manage_vms_test.py
nopsledder/clusterfuzz
529963438d956e46ddddfb62debc6ed808be0083
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 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 agreed to in writing, ...
35.486957
80
0.56099
# Copyright 2019 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 agreed to in writing, ...
0
26,389
0
5,944
0
326
0
91
437
eb812cedd3d2cf92428bf06ee48e3365296b8ae1
3,028
py
Python
wotapy_old/util/terminal.py
VeloceWattwing/Will-of-the-Alpha-Python
1f94094646cd190c57b25bb58b2262cfa0657506
[ "Apache-2.0" ]
null
null
null
wotapy_old/util/terminal.py
VeloceWattwing/Will-of-the-Alpha-Python
1f94094646cd190c57b25bb58b2262cfa0657506
[ "Apache-2.0" ]
null
null
null
wotapy_old/util/terminal.py
VeloceWattwing/Will-of-the-Alpha-Python
1f94094646cd190c57b25bb58b2262cfa0657506
[ "Apache-2.0" ]
null
null
null
# https://github.com/jeongukjae/terminal-palette/blob/master/README.md from terminal_palette import Palette pal = Palette()
32.55914
125
0.558124
# https://github.com/jeongukjae/terminal-palette/blob/master/README.md from terminal_palette import Palette pal = Palette() class Symbol: """ # Symbol An object that encapsulates properties of a symbol with color and decorator. """ def __init__(self, char, fg='default', bg='default', *decos): ...
0
0
0
2,878
0
0
0
0
23
eb371c86768f5cecdb7af971b8d6acba4aa62d38
7,461
py
Python
im/we_chat.py
journeyOS/global_scripts
583dbc1876948b505321b07e7fcabef07ddb6c61
[ "Apache-2.0" ]
null
null
null
im/we_chat.py
journeyOS/global_scripts
583dbc1876948b505321b07e7fcabef07ddb6c61
[ "Apache-2.0" ]
null
null
null
im/we_chat.py
journeyOS/global_scripts
583dbc1876948b505321b07e7fcabef07ddb6c61
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # -*- encoding: utf-8 -*- # # Copyright (c) 2020 anqi.huang@outlook.com # # 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.apach...
33.013274
99
0.595363
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # -*- encoding: utf-8 -*- # # Copyright (c) 2020 anqi.huang@outlook.com # # 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.apach...
72
0
0
6,393
0
0
0
-40
177
3fe9ec84a073a56ba62c8f25638e6d889122d258
22,538
py
Python
test/test_AutoFitTableAppender.py
dolphindb/api_python3
caf1c6a38fe3dc0febf33ca5f299c2cdae0f139d
[ "Apache-2.0" ]
26
2020-08-09T06:02:41.000Z
2022-03-22T10:21:27.000Z
test/test_AutoFitTableAppender.py
dolphindb/api_python3
caf1c6a38fe3dc0febf33ca5f299c2cdae0f139d
[ "Apache-2.0" ]
8
2020-09-15T03:26:34.000Z
2022-03-23T10:44:33.000Z
test/test_AutoFitTableAppender.py
dolphindb/api_python3
caf1c6a38fe3dc0febf33ca5f299c2cdae0f139d
[ "Apache-2.0" ]
5
2020-09-22T16:15:50.000Z
2021-07-28T05:48:27.000Z
import unittest if __name__ == '__main__': unittest.main()
58.845953
342
0.598101
import unittest import dolphindb as ddb import numpy as np import pandas as pd from setup import HOST, PORT, WORK_DIR, DATA_DIR from numpy.testing import assert_array_equal, assert_array_almost_equal from pandas.testing import assert_series_equal from pandas.testing import assert_frame_equal class TestAutoF...
0
131
0
22,026
0
0
0
123
186
8d55fa2258b13c4e2ca9397666cf431f6627679b
2,474
py
Python
qtvscodestyle/examples/widget_gallery/__main__.py
Greatness7/QtVSCodeStyle
2654ca967c7ae5db3ce3fb46657ace9f1104f6b9
[ "MIT" ]
8
2021-10-04T00:21:25.000Z
2022-03-14T19:57:03.000Z
qtvscodestyle/examples/widget_gallery/__main__.py
Greatness7/QtVSCodeStyle
2654ca967c7ae5db3ce3fb46657ace9f1104f6b9
[ "MIT" ]
null
null
null
qtvscodestyle/examples/widget_gallery/__main__.py
Greatness7/QtVSCodeStyle
2654ca967c7ae5db3ce3fb46657ace9f1104f6b9
[ "MIT" ]
3
2021-11-15T23:58:33.000Z
2022-02-01T18:50:01.000Z
import sys import qtvscodestyle as qtvsc from qtvscodestyle.qtpy.QtCore import Qt from qtvscodestyle.qtpy.QtWidgets import QApplication if __name__ == "__main__": app = QApplication(sys.argv) # Fix the svg icon display becoming low quality in Qt5. # PyQt6 doesn't have attribute AA_UseHighDpiPixmaps. ...
39.903226
114
0.699272
import sys import qtvscodestyle as qtvsc from qtvscodestyle.examples.widget_gallery.ui.main_ui import UI from qtvscodestyle.qtpy.QtCore import Qt, Slot from qtvscodestyle.qtpy.QtWidgets import QApplication, QColorDialog, QFileDialog, QMainWindow class WidgetGallery(QMainWindow): def __init__(self) -> None: ...
0
693
0
1,015
0
0
0
88
45
758787683057bb9bb9cee1f533b04ef2a1eeb485
5,120
py
Python
German Gritsay/GameOfLife.py
droidroot1995/DAFE_Python_914
0de65a84ab7f4c8f24b83a5747f71f52d57ecc20
[ "Unlicense" ]
null
null
null
German Gritsay/GameOfLife.py
droidroot1995/DAFE_Python_914
0de65a84ab7f4c8f24b83a5747f71f52d57ecc20
[ "Unlicense" ]
7
2021-05-08T22:02:59.000Z
2021-05-13T22:44:27.000Z
German Gritsay/GameOfLife.py
droidroot1995/DAFE_Python_914
0de65a84ab7f4c8f24b83a5747f71f52d57ecc20
[ "Unlicense" ]
13
2021-02-13T07:32:10.000Z
2021-05-15T09:09:08.000Z
import sys from PyQt5.QtWidgets import QApplication if __name__ == '__main__': app = QApplication(sys.argv) ex = GameOfLife(70, 40, 15) sys.exit(app.exec_())
30.843373
122
0.544922
import sys import numpy as np from PyQt5.QtWidgets import QWidget, QApplication, QPushButton, QColorDialog, QInputDialog, QMenu from PyQt5.QtGui import QPainter, QColor, QPen, QBrush from PyQt5.QtCore import Qt, QTimer class GameOfLife(QWidget): def __init__(self, width=50, height=50, grid_step=10): supe...
0
0
0
4,753
0
0
0
101
89
27f3203f678e27b24c96e307afab05603ba86c48
3,313
py
Python
src/scs_host/sys/nmcli.py
south-coast-science/scs_host_rpi
a02afde3fd2e1f2b8c6dc08beef8c74039108a64
[ "MIT" ]
null
null
null
src/scs_host/sys/nmcli.py
south-coast-science/scs_host_rpi
a02afde3fd2e1f2b8c6dc08beef8c74039108a64
[ "MIT" ]
1
2020-07-13T14:54:08.000Z
2020-11-16T10:11:04.000Z
src/scs_host/sys/nmcli.py
south-coast-science/scs_host_rpi
a02afde3fd2e1f2b8c6dc08beef8c74039108a64
[ "MIT" ]
2
2017-11-07T16:59:02.000Z
2019-09-29T15:39:37.000Z
""" Created on 17 Jun 2019 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) eth0: connected to Wired connection 1 "TP-LINK USB 10/100/1000 LAN" ethernet (r8152), 98:DE:D0:04:9B:CC, hw, mtu 1500 ip4 default inet4 192.168.1.88/24 inet6 fe80::131d:325a:f7bd:e3e/64 wlan0: connected to TP-Li...
26.717742
118
0.421974
""" Created on 17 Jun 2019 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) eth0: connected to Wired connection 1 "TP-LINK USB 10/100/1000 LAN" ethernet (r8152), 98:DE:D0:04:9B:CC, hw, mtu 1500 ip4 default inet4 192.168.1.88/24 inet6 fe80::131d:325a:f7bd:e3e/64 wlan0: connected to TP-Li...
0
1,144
0
1,398
0
0
0
28
158
7de097ffd11765a81ba7bc974ba64fe724e3a01c
300
py
Python
ABC/abc151-abc200/abc186/b/main.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
2
2020-06-12T09:54:23.000Z
2021-05-04T01:34:07.000Z
ABC/abc151-abc200/abc186/b/main.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
961
2020-06-23T07:26:22.000Z
2022-03-31T21:34:52.000Z
ABC/abc151-abc200/abc186/b/main.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- if __name__ == "__main__": main()
15.789474
59
0.536667
# -*- coding: utf-8 -*- def main(): import numpy as np import sys input = sys.stdin.readline h, w = map(int, input().split()) a = [list(map(int, input().split())) for _ in range(h)] a = np.array(a) print(np.sum(a - np.min(a))) if __name__ == "__main__": main()
0
0
0
0
0
212
0
0
23
7453762c73d1406b11cdcd56d28535ea4684e96a
8,432
py
Python
biorxiv/exploratory_data_analysis/EDA_BioRxiv.py
danich1/annorxiver
8fab17e1c3ebce7b9e3fc54ea64585b37d9b3825
[ "CC0-1.0", "BSD-3-Clause" ]
4
2020-05-13T23:44:57.000Z
2021-07-04T23:51:46.000Z
biorxiv/exploratory_data_analysis/EDA_BioRxiv.py
danich1/annorxiver
8fab17e1c3ebce7b9e3fc54ea64585b37d9b3825
[ "CC0-1.0", "BSD-3-Clause" ]
23
2020-03-23T18:35:25.000Z
2021-09-21T21:14:20.000Z
biorxiv/exploratory_data_analysis/EDA_BioRxiv.py
danich1/annorxiver
8fab17e1c3ebce7b9e3fc54ea64585b37d9b3825
[ "CC0-1.0", "BSD-3-Clause" ]
3
2020-01-31T18:27:55.000Z
2020-05-29T20:26:22.000Z
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # formats: ipynb,py # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.9.1+dev # kernelspec: # display_name: Python [conda env:annorxiver] # language: python # nam...
31.699248
143
0.621798
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # formats: ipynb,py # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.9.1+dev # kernelspec: # display_name: Python [conda env:annorxiver] # language: python # nam...
6
0
0
0
0
1,115
0
0
23
6cd6e802a9b546a028d4eef5cca7c2304a7f8f8b
109
py
Python
BlogManage/urls.py
ahriknow/ahriknow
817b5670c964e01ffe19ed182ce0a7b42e17ce09
[ "MIT" ]
null
null
null
BlogManage/urls.py
ahriknow/ahriknow
817b5670c964e01ffe19ed182ce0a7b42e17ce09
[ "MIT" ]
3
2021-03-19T01:28:43.000Z
2021-04-08T19:57:19.000Z
BlogManage/urls.py
ahriknow/ahriknow
817b5670c964e01ffe19ed182ce0a7b42e17ce09
[ "MIT" ]
null
null
null
from django.urls import path, include urlpatterns = [ path('blog/', include('BlogManage.blog.urls')), ]
18.166667
51
0.688073
from django.urls import path, include urlpatterns = [ path('blog/', include('BlogManage.blog.urls')), ]
0
0
0
0
0
0
0
0
0
a13408b1c6abc4dec38f5d386628bb4e667406bc
435
py
Python
CodeQuest/2021/Prob08.py
wkaisertexas/hs-competitive-programming
ab1778c6348ac45ade172b83b6a8b06717c7071f
[ "MIT" ]
null
null
null
CodeQuest/2021/Prob08.py
wkaisertexas/hs-competitive-programming
ab1778c6348ac45ade172b83b6a8b06717c7071f
[ "MIT" ]
null
null
null
CodeQuest/2021/Prob08.py
wkaisertexas/hs-competitive-programming
ab1778c6348ac45ade172b83b6a8b06717c7071f
[ "MIT" ]
null
null
null
if __name__ == "__main__": main()
19.772727
63
0.455172
import math def main(): n = int(input()) for i in range(n): line = input() x, y = int(line.split(" ")[0]), int(line.split(" ")[1]) squared_sum = 0 for j in range(x): line = input() for k in line.split(" ")[:]: squared_sum += abs(int(k)) ...
0
0
0
0
0
359
0
-10
45
8611150a14c8b84b06b464494258744b1209aefb
5,617
py
Python
tests/ssg_test_suite/common.py
aghassemlouei/openscap-content
2de2d291cf2939552da56f1e7991bcd39252d0b3
[ "BSD-3-Clause" ]
1
2019-01-07T10:43:25.000Z
2019-01-07T10:43:25.000Z
tests/ssg_test_suite/common.py
aghassemlouei/openscap-content
2de2d291cf2939552da56f1e7991bcd39252d0b3
[ "BSD-3-Clause" ]
null
null
null
tests/ssg_test_suite/common.py
aghassemlouei/openscap-content
2de2d291cf2939552da56f1e7991bcd39252d0b3
[ "BSD-3-Clause" ]
null
null
null
from collections import namedtuple Scenario_run = namedtuple( "Scenario_run", ("rule_id", "script")) Scenario_conditions = namedtuple( "Scenario_conditions", ("backend", "scanning_mode", "remediated_by", "datastream")) IGNORE_KNOWN_HOSTS_OPTIONS = ( "-o", "StrictHostKeyChecking=no", "-o", "Us...
32.656977
90
0.651059
import logging import subprocess from collections import namedtuple import enum import functools from ssg.constants import MULTI_PLATFORM_MAPPING from ssg.constants import PRODUCT_TO_CPE_MAPPING from ssg.constants import FULL_NAME_TO_PRODUCT_MAPPING Scenario_run = namedtuple( "Scenario_run", ("rule_id", "scrip...
0
2,635
0
98
0
2,150
0
61
315
cbe0de53c73d80dfbd486500eec876da9eabba8f
7,005
py
Python
services/web/project/api_struc/models.py
JoelGotsch/Kantnprojekt_Backend
f681f8527def48f423762363d9b44521b6cbb444
[ "MIT" ]
null
null
null
services/web/project/api_struc/models.py
JoelGotsch/Kantnprojekt_Backend
f681f8527def48f423762363d9b44521b6cbb444
[ "MIT" ]
null
null
null
services/web/project/api_struc/models.py
JoelGotsch/Kantnprojekt_Backend
f681f8527def48f423762363d9b44521b6cbb444
[ "MIT" ]
null
null
null
# from flask import Flask from flask_marshmallow import Marshmallow # from app import db from flask_sqlalchemy import SQLAlchemy from ..misc import funcs as funcs ma = Marshmallow() db = SQLAlchemy() # as a challenge contains multiple exercises and an exercise can be part of many challenges, we have a many-to...
37.063492
197
0.621699
# from flask import Flask import random from marshmallow import Schema, fields, pre_load, validate from flask_marshmallow import Marshmallow from datetime import datetime # from app import db from flask_sqlalchemy import SQLAlchemy from ..misc import funcs as funcs ma = Marshmallow() db = SQLAlchemy() def default_u...
0
0
0
5,636
0
63
0
37
227
f9d2b5f6b32d3eca566e63fa5eadbbfec1046a70
3,923
py
Python
paleomix/common/logging.py
jfy133/paleomix
f7f687f6f69b2faedd247a1d289d28657710a8c2
[ "MIT" ]
null
null
null
paleomix/common/logging.py
jfy133/paleomix
f7f687f6f69b2faedd247a1d289d28657710a8c2
[ "MIT" ]
null
null
null
paleomix/common/logging.py
jfy133/paleomix
f7f687f6f69b2faedd247a1d289d28657710a8c2
[ "MIT" ]
null
null
null
#!/usr/bin/python # # Copyright (c) 2013 Mikkel Schubert <MikkelSch@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights #...
33.818966
79
0.682896
#!/usr/bin/python # # Copyright (c) 2013 Mikkel Schubert <MikkelSch@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights #...
0
0
0
910
174
720
0
-39
203
31d5c9ba5b08c65b7c9b5644b63dcdcfad2704cf
25,456
py
Python
csiread/core.py
yangece/csiread
ecbe81303530d5c3391a28701224b2e6554a6a4f
[ "MIT" ]
null
null
null
csiread/core.py
yangece/csiread
ecbe81303530d5c3391a28701224b2e6554a6a4f
[ "MIT" ]
null
null
null
csiread/core.py
yangece/csiread
ecbe81303530d5c3391a28701224b2e6554a6a4f
[ "MIT" ]
null
null
null
"""A fast channel state information parser for Intel, Atheros and Nexmon."""
39.223421
126
0.569885
"""A fast channel state information parser for Intel, Atheros and Nexmon.""" from . import _csiread class Intel(_csiread.Intel): """Parse CSI obtained using 'Linux 802.11n CSI Tool'. Args: file (str or None): CSI data file. If ``str``, ``read`` and ``readstp`` methods are allowed. If ``N...
29
0
0
25,224
0
0
0
1
138
28bb5987e7fcec36f5c70409e6ed522d851e118e
1,791
py
Python
tests/test_wavefront_coverage_path_planner.py
duken72/PythonRobotics
177f04618c4bbba40bea38cd57d642f7ab9e3725
[ "MIT" ]
15,431
2016-10-07T08:25:10.000Z
2022-03-31T22:06:02.000Z
tests/test_wavefront_coverage_path_planner.py
duken72/PythonRobotics
177f04618c4bbba40bea38cd57d642f7ab9e3725
[ "MIT" ]
486
2017-05-01T00:40:00.000Z
2022-03-23T06:57:42.000Z
tests/test_wavefront_coverage_path_planner.py
duken72/PythonRobotics
177f04618c4bbba40bea38cd57d642f7ab9e3725
[ "MIT" ]
4,978
2017-03-05T22:23:36.000Z
2022-03-31T12:42:17.000Z
import conftest # Add root path to sys.path from PathPlanning.WavefrontCPP import wavefront_coverage_path_planner wavefront_coverage_path_planner.do_animation = False if __name__ == '__main__': conftest.run_this_test(__file__)
27.984375
72
0.670017
import conftest # Add root path to sys.path import os import matplotlib.pyplot as plt from PathPlanning.WavefrontCPP import wavefront_coverage_path_planner wavefront_coverage_path_planner.do_animation = False def wavefront_cpp(img, start, goal): num_free = 0 for i in range(img.shape[0]): for j in ra...
0
0
0
0
0
1,418
0
-2
136
625937fe2103b5c073f4e090e7056a74d4bcb4f7
706
py
Python
modules/do_markdown.py
tbersez/Allmine
092fb1f5abcb4fd4e40b4a25386f05ecb2dea55b
[ "MIT" ]
5
2019-02-13T13:47:24.000Z
2019-04-27T18:27:03.000Z
modules/do_markdown.py
tbersez/Allmine
092fb1f5abcb4fd4e40b4a25386f05ecb2dea55b
[ "MIT" ]
null
null
null
modules/do_markdown.py
tbersez/Allmine
092fb1f5abcb4fd4e40b4a25386f05ecb2dea55b
[ "MIT" ]
null
null
null
# Markdown builder # # Starts the .R script for Markdown generation # # Inputs: # - Coverage_Track.tab # - regions.bed # - Non_synonymous_variants_summary.tab # # Output: # - Run_report.html # # Parameters: # None rule make_markdown : input: "Non_synonymous_variants_su...
22.0625
88
0.570822
# Markdown builder # # Starts the .R script for Markdown generation # # Inputs: # - Coverage_Track.tab # - regions.bed # - Non_synonymous_variants_summary.tab # # Output: # - Run_report.html # # Parameters: # None rule make_markdown : input: "Non_synonymous_variants_su...
0
0
0
0
0
0
0
0
0
5743ed10755166abc7d50e18945c871531dd1fe3
14,687
py
Python
db/setup_db.py
matteyeux/MyBookingServices
ce6ec906b3a58da16e1f066b9af290fb7e8b82d3
[ "MIT" ]
null
null
null
db/setup_db.py
matteyeux/MyBookingServices
ce6ec906b3a58da16e1f066b9af290fb7e8b82d3
[ "MIT" ]
3
2022-02-26T16:50:12.000Z
2022-02-26T16:50:12.000Z
db/setup_db.py
matteyeux/MyBookingServices
ce6ec906b3a58da16e1f066b9af290fb7e8b82d3
[ "MIT" ]
null
null
null
import datetime import hashlib import pandas as pd from faker import Faker from sqlalchemy import create_engine from sqlalchemy.exc import SQLAlchemyError from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship Base = declarative_base() username = "etna" password = "etna" host...
29.551308
83
0.636617
import datetime import enum import hashlib import pandas as pd from faker import Faker from sqlalchemy import BigInteger from sqlalchemy import Boolean from sqlalchemy import Column from sqlalchemy import create_engine from sqlalchemy import Date from sqlalchemy import DateTime from sqlalchemy import Float from sqlalc...
20
0
0
4,502
0
0
0
94
538
0bf55e7c458f0558d5da1712e4db0c6454406298
4,293
py
Python
gencode/__init__.py
zdebeer99/generate_software
d7c86e2b52263b22c185d2e62cbdcd5c847bac1c
[ "MIT" ]
null
null
null
gencode/__init__.py
zdebeer99/generate_software
d7c86e2b52263b22c185d2e62cbdcd5c847bac1c
[ "MIT" ]
null
null
null
gencode/__init__.py
zdebeer99/generate_software
d7c86e2b52263b22c185d2e62cbdcd5c847bac1c
[ "MIT" ]
null
null
null
import gencode.text_helpers as text_helpers # Config Loading # helper
29.204082
119
0.583508
from jinja2 import Environment, FileSystemLoader import jinja2_stringcase import stringcase import csv import openpyxl from gencode.internal import default import gencode.text_helpers as text_helpers import os # Config Loading class SourceConfig: def __init__(self) -> None: self.tables = [] self....
0
0
0
1,902
0
2,008
0
12
292
229583db6eaa0002ee095bd34e0eef377cd8d295
17,984
py
Python
src/stagedml/models/transformer/model.py
stagedml/stagedml
35c1b107cc92bb727bf2e7ccd4a1983f475d5938
[ "BSD-4-Clause" ]
7
2020-02-17T19:09:13.000Z
2021-06-19T10:16:21.000Z
src/stagedml/models/transformer/model.py
stagedml/stagedml
35c1b107cc92bb727bf2e7ccd4a1983f475d5938
[ "BSD-4-Clause" ]
null
null
null
src/stagedml/models/transformer/model.py
stagedml/stagedml
35c1b107cc92bb727bf2e7ccd4a1983f475d5938
[ "BSD-4-Clause" ]
null
null
null
import tensorflow as tf from stagedml.imports.tf import (Model, Adam) from stagedml.models.transformer.imports import (transformer_loss, LearningRateSchedule) from stagedml.models.transformer.metrics import Metrics def create_train_model(params:dict)->Model: """Creates transformer model for training.""" with tf...
38.675269
89
0.674766
import tensorflow as tf from stagedml.imports.tf import ( Model, Layer, Tensor, Adam, LayerNormalization ) from stagedml.models.transformer.imports import ( transformer_loss, get_padding_bias, get_padding, get_position_encoding, get_decoder_self_attention_bias, sequence_beam_search, EOS_ID, LearningRateSch...
0
0
0
15,297
0
351
0
405
204
b2df8932612771b9728e42834660038ccd3fb73e
1,484
py
Python
ros2action/ros2action/verb/show.py
ben-greenberg/ros2cli
e5c3821c02d985e638f2d4f57a21c8a5adb383f9
[ "Apache-2.0" ]
null
null
null
ros2action/ros2action/verb/show.py
ben-greenberg/ros2cli
e5c3821c02d985e638f2d4f57a21c8a5adb383f9
[ "Apache-2.0" ]
null
null
null
ros2action/ros2action/verb/show.py
ben-greenberg/ros2cli
e5c3821c02d985e638f2d4f57a21c8a5adb383f9
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Open Source Robotics Foundation, 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...
38.051282
80
0.701482
# Copyright 2019 Open Source Robotics Foundation, 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...
0
0
0
724
0
0
0
68
90
9a2edec99005ea85ea806d12f218d51b0c10b3ec
927
py
Python
protopy/vassal_engine/runner.py
MislavJaksic/Prototyping-Python
8934ae1a7df22ed4e39d24aa66a1bc97299aa56c
[ "MIT" ]
null
null
null
protopy/vassal_engine/runner.py
MislavJaksic/Prototyping-Python
8934ae1a7df22ed4e39d24aa66a1bc97299aa56c
[ "MIT" ]
null
null
null
protopy/vassal_engine/runner.py
MislavJaksic/Prototyping-Python
8934ae1a7df22ed4e39d24aa66a1bc97299aa56c
[ "MIT" ]
null
null
null
import sys def main(args): """main() will be run if you run this script directly""" parse_server_status( "protopy/vassal_engine/data/2021-03-vassal-players-month.txt", "server_status.csv", ) def run(): """Entry point for the runnable script.""" sys.exit(main(sys.argv[1:])) if ...
25.75
70
0.512406
import sys def parse_server_status(input_file, output_file): with open(input_file, "r") as input: with open(output_file, "w") as output: for line in input: line = line.strip() seperation_index = -1 while line[seperation_index] != "(": ...
0
0
0
0
0
522
0
0
23
18312d574b042035ee27bf81d1de244ef3e0daf3
695
py
Python
tools/stop_server.py
grtfou/dokuwiki-tools
0d88d2bdc891d3959c57882ebaa82182b9df2082
[ "MIT" ]
null
null
null
tools/stop_server.py
grtfou/dokuwiki-tools
0d88d2bdc891d3959c57882ebaa82182b9df2082
[ "MIT" ]
null
null
null
tools/stop_server.py
grtfou/dokuwiki-tools
0d88d2bdc891d3959c57882ebaa82182b9df2082
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @first_date 20140829 # @date # @version 0.0 # @brief stop dokuwiki Apache server import os import time import subprocess os.chdir(r'server') print("Stop Apache Server") p = subprocess.Popen(["ApacheKill.exe"]) ### Replace "ApacheKill.exe" ### # is_s...
21.71875
61
0.634532
#!/usr/bin/env python # -*- coding: utf-8 -*- # @first_date 20140829 # @date # @version 0.0 # @brief stop dokuwiki Apache server import os import time import signal import subprocess os.chdir(r'server') print("Stop Apache Server") p = subprocess.Popen(["ApacheKill.exe"]) ### Replace "ApacheKill.e...
0
0
0
0
0
0
0
-8
22
fb355aab17d2381e15a7630b0292aa78e5ec074d
240
py
Python
Contest/ABC166/e/main.py
mpses/AtCoder
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
[ "CC0-1.0" ]
null
null
null
Contest/ABC166/e/main.py
mpses/AtCoder
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
[ "CC0-1.0" ]
null
null
null
Contest/ABC166/e/main.py
mpses/AtCoder
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 n = int(input()) a = list(map(int, input().split())) l = [] r = [] for i, j in enumerate(a): l += [i + j] r += [i - j] c = 0 l = Counter(l) for r in r: c += l.get(r, 0) print(c)
14.117647
35
0.5125
#!/usr/bin/env python3 from collections import* n = int(input()) a = list(map(int, input().split())) l = [] r = [] for i, j in enumerate(a): l += [i + j] r += [i - j] c = 0 l = Counter(l) for r in r: c += l.get(r, 0) print(c)
0
0
0
0
0
0
0
3
22
0a7507e6491b5424e66421b091b2e0f50962ffc8
4,329
py
Python
model_innondations/pipeline/download-climateknowledgeportal.py
PayjPan/batch8_worldbank
e220136257a8ab848e850eee57dcb6a1af706073
[ "MIT" ]
null
null
null
model_innondations/pipeline/download-climateknowledgeportal.py
PayjPan/batch8_worldbank
e220136257a8ab848e850eee57dcb6a1af706073
[ "MIT" ]
null
null
null
model_innondations/pipeline/download-climateknowledgeportal.py
PayjPan/batch8_worldbank
e220136257a8ab848e850eee57dcb6a1af706073
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import pandas as pd import urllib.parse import logging #import asyncio import concurrent.futures ''' Script to download dataset from https://climateknowledgeportal.worldbank.org/api/data/get-download-data ''' DATASET_FOLDER = '../../datasets/' # Destination PATH = os.path.join(DATASET...
37.643478
123
0.687919
# -*- coding: utf-8 -*- import requests import os, sys import pandas as pd import urllib.parse import logging #import asyncio import concurrent.futures from pathlib import Path ''' Script to download dataset from https://climateknowledgeportal.worldbank.org/api/data/get-download-data ''' DATASET_FOLDER = '../../dataset...
0
0
0
0
0
744
0
2
67
fa8a23eda422107e69b00ba214a0681760f67b8d
2,552
py
Python
src/sentinel/azext_sentinel/vendored_sdks/security_insights/models/alert_rule_template_properties_base_py3.py
hpsan/azure-cli-extensions
be1589bb6dd23837796e088d28e65e873050171e
[ "MIT" ]
null
null
null
src/sentinel/azext_sentinel/vendored_sdks/security_insights/models/alert_rule_template_properties_base_py3.py
hpsan/azure-cli-extensions
be1589bb6dd23837796e088d28e65e873050171e
[ "MIT" ]
null
null
null
src/sentinel/azext_sentinel/vendored_sdks/security_insights/models/alert_rule_template_properties_base_py3.py
hpsan/azure-cli-extensions
be1589bb6dd23837796e088d28e65e873050171e
[ "MIT" ]
1
2020-07-16T23:49:49.000Z
2020-07-16T23:49:49.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # --------------------------------------------------------------------------
44.77193
184
0.675157
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from ...
0
0
0
2,174
0
0
0
17
46
366ff5d397b28d5e6fd3da95adba0a827ea78dbb
696
py
Python
python/learn/base/class/mix_class.py
qrsforever/workspace
53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f
[ "MIT" ]
2
2017-06-07T03:20:42.000Z
2020-01-07T09:14:26.000Z
python/learn/base/class/mix_class.py
qrsforever/workspace
53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f
[ "MIT" ]
null
null
null
python/learn/base/class/mix_class.py
qrsforever/workspace
53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- # CC1, CC1CC2 c = CC3() c.cc3_method() # result: # cc1_method # cc2_method
15.818182
36
0.550287
#!/usr/bin/python3 # -*- coding: utf-8 -*- class CC1(object): """Docstring for CC1. """ def __init__(self): """TODO: to be defined1. """ def cc1_method(self): print(" cc1_method ") # 这个类调用了CC1里面的方法, CC1与CC2并没有关系 class CC2(object): """Docstring for CC2. """ def __init__(self):...
51
0
0
486
0
0
0
0
68
e9a20cb7b1eecfaa9e4a0378ca0a31f210281a57
634
py
Python
src/rab/storage/__init__.py
JHibbard/rest-api-base
ba47a56e2f57fc184d4258ba9889e6c31979f36e
[ "MIT" ]
null
null
null
src/rab/storage/__init__.py
JHibbard/rest-api-base
ba47a56e2f57fc184d4258ba9889e6c31979f36e
[ "MIT" ]
null
null
null
src/rab/storage/__init__.py
JHibbard/rest-api-base
ba47a56e2f57fc184d4258ba9889e6c31979f36e
[ "MIT" ]
null
null
null
# External Libraries from sqlalchemy.ext.declarative import declarative_base Base = declarative_base()
30.190476
77
0.66877
# External Libraries from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker Base = declarative_base() def row2dict(row): return {c.name: str(getattr(row, c.name)) for c in row.__table__.columns} def init_db(uri): ...
0
0
0
0
0
388
0
49
90