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
5a1d316ed31d577c7df6547d9741c2b872bd048d
1,650
py
Python
pyseries/Pipelines/AnalyzeRest.py
ryscet/pySeries
3ab1e0a9dbdeaef34c6c6d1fed5b248203c84fea
[ "MIT" ]
1
2019-01-23T08:59:51.000Z
2019-01-23T08:59:51.000Z
pyseries/Pipelines/AnalyzeRest.py
ryscet/pySeries
3ab1e0a9dbdeaef34c6c6d1fed5b248203c84fea
[ "MIT" ]
null
null
null
pyseries/Pipelines/AnalyzeRest.py
ryscet/pySeries
3ab1e0a9dbdeaef34c6c6d1fed5b248203c84fea
[ "MIT" ]
3
2016-11-04T14:15:58.000Z
2016-11-10T22:31:10.000Z
# -*- coding: utf-8 -*- """ Created on Tue Jun 7 12:32:36 2016 @author: user """ import sys sys.path.insert(0, '/Users/user/Desktop/repo_for_pyseries/pyseries/')
40.243902
180
0.649697
# -*- coding: utf-8 -*- """ Created on Tue Jun 7 12:32:36 2016 @author: user """ import sys sys.path.insert(0, '/Users/user/Desktop/repo_for_pyseries/pyseries/') import pyseries.LoadingData as loading import pyseries.Preprocessing as prep import pyseries.Analysis as analysis def plot_rest(): # paths = [ '/Use...
0
0
0
0
0
1,347
0
48
90
e011322d4d992983b9251bbe8c19fce1714b74c3
692
py
Python
dags/run_testprofile.py
consag/docker-airflow
eab7ed7ca1162e284023c19a16d1832a958b8f06
[ "Apache-2.0" ]
3
2019-11-10T19:08:26.000Z
2021-05-15T17:56:19.000Z
dags/run_testprofile.py
consag/docker-airflow
eab7ed7ca1162e284023c19a16d1832a958b8f06
[ "Apache-2.0" ]
3
2020-10-28T13:14:43.000Z
2022-03-01T23:11:48.000Z
dags/run_testprofile.py
consag/docker-airflow
eab7ed7ca1162e284023c19a16d1832a958b8f06
[ "Apache-2.0" ]
null
null
null
""" Definition to run a test profile """ from datetime import datetime, timedelta from airflow import DAG from InformaticaPlugin import ExecuteProfile schedule_interval = None default_args = { 'owner': 'Jac. Beekers', 'depends_on_past': False, 'email': ['noone@nowhere.no'], 'email_on_failure': False...
20.969697
58
0.703757
""" Definition to run a test profile """ from datetime import datetime, timedelta from airflow import DAG from InformaticaPlugin import ExecuteProfile schedule_interval = None default_args = { 'owner': 'Jac. Beekers', 'depends_on_past': False, 'email': ['noone@nowhere.no'], 'email_on_failure': False...
0
0
0
0
0
0
0
0
0
2cdfd1fd6d51fdc5aac9bdc94e54b3c4f4ee9b9c
1,400
py
Python
run_attacker.py
hotpxl/low-rate-tcp-dos
25cf181080e4ff759edef438982b5e3d811797e7
[ "MIT" ]
3
2018-06-11T05:34:05.000Z
2020-11-06T05:23:34.000Z
run_attacker.py
hotpxl/low-rate-tcp-dos
25cf181080e4ff759edef438982b5e3d811797e7
[ "MIT" ]
1
2021-11-09T12:25:13.000Z
2021-11-09T12:25:13.000Z
run_attacker.py
hotpxl/low-rate-tcp-dos
25cf181080e4ff759edef438982b5e3d811797e7
[ "MIT" ]
4
2019-08-24T12:55:53.000Z
2022-03-07T12:03:33.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function if __name__ == '__main__': main()
27.45098
78
0.637857
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import socket import time import argparse def send_burst(sock, target, burst): start = time.time() payload = '0' * 128 while time.time() - s...
0
0
0
0
0
1,105
0
-36
134
79a351fc6df21077d7cfd1a4c97ce3e907c26e43
594
py
Python
waterspout_api/migrations/0030_auto_20210429_1758.py
Water-Systems-Management-UCM/Waterspout
78965f1e53b09f442e278dff72c290ceac22ed60
[ "MIT" ]
1
2020-09-10T20:43:24.000Z
2020-09-10T20:43:24.000Z
waterspout_api/migrations/0030_auto_20210429_1758.py
Water-Systems-Management-UCM/Waterspout
78965f1e53b09f442e278dff72c290ceac22ed60
[ "MIT" ]
72
2020-05-28T17:20:12.000Z
2022-03-28T14:11:40.000Z
waterspout_api/migrations/0030_auto_20210429_1758.py
Water-Systems-Management-UCM/Waterspout
78965f1e53b09f442e278dff72c290ceac22ed60
[ "MIT" ]
null
null
null
# Generated by Django 3.2 on 2021-04-30 00:58
28.285714
178
0.666667
# Generated by Django 3.2 on 2021-04-30 00:58 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('waterspout_api', '0029_auto_20210428_1715'), ] operations = [ migrations.AddField( model_name='mo...
0
0
0
449
0
0
0
30
68
5b3c122cbbdd9e1576c139b4ef78c5ac7723b41a
374
py
Python
bigO.py
prabhugs/scripts
113965717f96229d4c7f37bb324623ed80d45b02
[ "Apache-2.0", "MIT" ]
null
null
null
bigO.py
prabhugs/scripts
113965717f96229d4c7f37bb324623ed80d45b02
[ "Apache-2.0", "MIT" ]
null
null
null
bigO.py
prabhugs/scripts
113965717f96229d4c7f37bb324623ed80d45b02
[ "Apache-2.0", "MIT" ]
null
null
null
import timeit import random for i in range (10000, 100000, 20000): t = timeit.Timer("random.randrange(%d) in x"%i, "from __main__ import random, x") x = list(range(i)) list_time = t.timeit(number = 1000) x = {j:None for j in range(i)} dict_time = t.timeit(number = 1000) print "Counter: " + str(i) + " L...
26.714286
88
0.63369
import timeit import random for i in range (10000, 100000, 20000): t = timeit.Timer("random.randrange(%d) in x"%i, "from __main__ import random, x") x = list(range(i)) list_time = t.timeit(number = 1000) x = {j:None for j in range(i)} dict_time = t.timeit(number = 1000) print "Counter: " + str(i) + " L...
0
0
0
0
0
0
0
0
0
32d8bf0c0b9f39c301a1d44fd2f3eec542b96e62
3,436
py
Python
rl_coach/filters/action/attention_discretization.py
abcp4/coach
e0f1b9ecc884ffea71ba634986d478f4fc150d3e
[ "Apache-2.0" ]
3
2019-11-15T02:05:38.000Z
2020-10-10T17:15:40.000Z
rl_coach/filters/action/attention_discretization.py
gndctrl2mjrtm/coach-ray
ae6593bb33cf0ae3c5a4b3b351560dd6b47cd031
[ "Apache-2.0" ]
null
null
null
rl_coach/filters/action/attention_discretization.py
gndctrl2mjrtm/coach-ray
ae6593bb33cf0ae3c5a4b3b351560dd6b47cd031
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2017 Intel 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...
51.283582
129
0.700233
# # Copyright (c) 2017 Intel 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...
0
0
0
2,510
0
0
0
199
136
737094926aa531bdfd447a007d16b0aabbd3551b
493
py
Python
data/contacts.py
pvserge/python_traning
069148647f00b634e0817dc3a92c32f677cc5b1e
[ "Apache-2.0" ]
null
null
null
data/contacts.py
pvserge/python_traning
069148647f00b634e0817dc3a92c32f677cc5b1e
[ "Apache-2.0" ]
null
null
null
data/contacts.py
pvserge/python_traning
069148647f00b634e0817dc3a92c32f677cc5b1e
[ "Apache-2.0" ]
null
null
null
from model.contact import Contact testdata = [ Contact(firstname="", lastname="", address="", homephone="", mobilephone="", workphone="", secondaryphone="", email1="", email2="", email3=""), Contact(firstname="Ivan", lastname="Ivanov", address="SomeWhere St., 4", homephone="+111111111", ...
49.3
100
0.64503
from model.contact import Contact testdata = [ Contact(firstname="", lastname="", address="", homephone="", mobilephone="", workphone="", secondaryphone="", email1="", email2="", email3=""), Contact(firstname="Ivan", lastname="Ivanov", address="SomeWhere St., 4", homephone="+111111111", ...
0
0
0
0
0
0
0
0
0
c1ebc2221f962d846a59a8be181a9f42b3226060
9,665
py
Python
dvha/tools/roi_formatter.py
cutright/DVH-Analytics
a168cf67709b7a60d0d311a294801954421c1ad1
[ "Apache-2.0" ]
98
2017-09-04T14:15:57.000Z
2022-03-08T03:58:18.000Z
dvha/tools/roi_formatter.py
cutright/DVH-Analytics
a168cf67709b7a60d0d311a294801954421c1ad1
[ "Apache-2.0" ]
177
2017-06-01T14:25:15.000Z
2022-01-10T03:23:15.000Z
dvha/tools/roi_formatter.py
cutright/DVH-Analytics
a168cf67709b7a60d0d311a294801954421c1ad1
[ "Apache-2.0" ]
31
2017-10-16T00:17:00.000Z
2022-01-19T20:09:58.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # tools.roi_formatter.py """Formatting tools for roi data (dicompyler, Shapely, DVHA)""" # Copyright (c) 2016-2019 Dan Cutright # This file is part of DVH Analytics, released under a BSD license. # See the file LICENSE included with this distribution, also # availabl...
28.343109
101
0.602069
#!/usr/bin/env python # -*- coding: utf-8 -*- # tools.roi_formatter.py """Formatting tools for roi data (dicompyler, Shapely, DVHA)""" # Copyright (c) 2016-2019 Dan Cutright # This file is part of DVH Analytics, released under a BSD license. # See the file LICENSE included with this distribution, also # availabl...
0
0
0
0
0
0
0
0
0
a6bf2dc40a857d2d0d763bf8451db8cd4609c8d9
1,912
py
Python
scripts/summary/update_dailyrain.py
jamayfieldjr/iem
275b77a65f3b12e26e6cbdb230786b9c7d2b9c9a
[ "MIT" ]
1
2019-10-07T17:01:24.000Z
2019-10-07T17:01:24.000Z
scripts/summary/update_dailyrain.py
jamayfieldjr/iem
275b77a65f3b12e26e6cbdb230786b9c7d2b9c9a
[ "MIT" ]
null
null
null
scripts/summary/update_dailyrain.py
jamayfieldjr/iem
275b77a65f3b12e26e6cbdb230786b9c7d2b9c9a
[ "MIT" ]
null
null
null
"""Update the pday column Some care has to be made here such that trace values do not accumulate when there are actual measurable precip. Eventually, the DSM or other summary messages come and overwrite the trouble. Run from RUN_10MIN.sh """ from __future__ import print_function import datetime from pyiem.util impor...
31.344262
75
0.581067
"""Update the pday column Some care has to be made here such that trace values do not accumulate when there are actual measurable precip. Eventually, the DSM or other summary messages come and overwrite the trouble. Run from RUN_10MIN.sh """ from __future__ import print_function import datetime from pyiem.util impor...
0
0
0
0
0
0
0
0
0
cd35946b4f8f14bc78705923026cf0721aea5c3e
2,167
py
Python
raspisump/storage.py
bdevy/raspi-sump
78d0101808e54ea091a43f9142cdc7d8c31804b0
[ "MIT" ]
null
null
null
raspisump/storage.py
bdevy/raspi-sump
78d0101808e54ea091a43f9142cdc7d8c31804b0
[ "MIT" ]
null
null
null
raspisump/storage.py
bdevy/raspi-sump
78d0101808e54ea091a43f9142cdc7d8c31804b0
[ "MIT" ]
null
null
null
""" Module to send metrics to storage systems. """ # Raspi-sump, a sump pump monitoring system. # Al Audet # http://www.linuxnorth.org/raspi-sump/ # # All configuration changes should be done in raspisump.conf # MIT License -- http://www.linuxnorth.org/raspi-sump/license.html import configparser from raspisump import...
31.867647
208
0.666359
""" Module to send metrics to storage systems. """ # Raspi-sump, a sump pump monitoring system. # Al Audet # http://www.linuxnorth.org/raspi-sump/ # # All configuration changes should be done in raspisump.conf # MIT License -- http://www.linuxnorth.org/raspi-sump/license.html import configparser from raspisump import...
0
0
0
0
0
0
0
22
44
e38b043b0fb7653614770e3534ff8ef561469017
492
py
Python
userbot/plugins/idk.py
Declan57/SPARKZZZ
4fb9ae8581b96a7040700ff1dc7244cd19f08e40
[ "MIT" ]
1
2020-10-04T10:08:43.000Z
2020-10-04T10:08:43.000Z
userbot/plugins/idk.py
ranijithhub/SPARKZZZ
4fcbd15d7466b71261f8b437b0654d9e5cde1b55
[ "MIT" ]
null
null
null
userbot/plugins/idk.py
ranijithhub/SPARKZZZ
4fcbd15d7466b71261f8b437b0654d9e5cde1b55
[ "MIT" ]
null
null
null
# @ copyright SPARKZZZ """ idk """
16.4
73
0.609756
# @ copyright SPARKZZZ """ idk """ from telethon.tl.functions.channels import LeaveChannelRequest from userbot.utils import admin_cmd import time @sparkzzz.on(admin_cmd(pattern="idk", outgoing=True)) async def leave(e): if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"): await e....
12
304
0
0
0
0
0
45
90
e67c4a0edde062391c71173ff626aed5257e140d
22,830
py
Python
bmm/src/inference/resampling.py
safarzadeh-reza/bmm
7fbb0964c493c08243f0e1a627787d8d115259e6
[ "MIT" ]
1
2022-02-04T22:17:43.000Z
2022-02-04T22:17:43.000Z
bmm/src/inference/resampling.py
safarzadeh-reza/bmm
7fbb0964c493c08243f0e1a627787d8d115259e6
[ "MIT" ]
null
null
null
bmm/src/inference/resampling.py
safarzadeh-reza/bmm
7fbb0964c493c08243f0e1a627787d8d115259e6
[ "MIT" ]
null
null
null
######################################################################################################################## # Module: inference/resampling.py # Description: Resampling schemes for converting weighted particles (series of positions/edges/distances) to # unweighted. Notably multinomial resamplin...
47.169421
120
0.589882
######################################################################################################################## # Module: inference/resampling.py # Description: Resampling schemes for converting weighted particles (series of positions/edges/distances) to # unweighted. Notably multinomial resamplin...
0
0
0
0
0
0
0
0
0
eb1c8ab63d326f1a026329b6b62ed6cbcf180f73
9,503
py
Python
environment/entities/robots.py
RubenPants/RobotSimulator2D
334d7b9cab0edb22d4670cfaf39fbed76c351758
[ "MIT" ]
null
null
null
environment/entities/robots.py
RubenPants/RobotSimulator2D
334d7b9cab0edb22d4670cfaf39fbed76c351758
[ "MIT" ]
null
null
null
environment/entities/robots.py
RubenPants/RobotSimulator2D
334d7b9cab0edb22d4670cfaf39fbed76c351758
[ "MIT" ]
null
null
null
""" robots.py Robots used to manoeuvre around in the Game-environment. """ from configs.bot_config import BotConfig from environment.entities.sensors import AngularSensor, DeltaDistanceSensor, DistanceSensor, ProximitySensor def get_active_sensors(connections: set, total_input_size: int): """Get a set of all t...
42.424107
120
0.623172
""" robots.py Robots used to manoeuvre around in the Game-environment. """ from numpy import pi, sqrt from configs.bot_config import BotConfig from environment.entities.sensors import AngularSensor, DeltaDistanceSensor, DistanceSensor, ProximitySensor from utils.vec2d import angle_to_vec, Vec2d class MarXBot: "...
4
0
0
7,708
0
0
0
27
67
cad17cb72f8b94ede051dfc328eb14b0a91ca087
8,847
py
Python
vectorizer.py
my-master/HashingTfidfVectorizer
023626bfbebdc3d0118e98ae7c68bc1d252b5153
[ "Apache-2.0" ]
null
null
null
vectorizer.py
my-master/HashingTfidfVectorizer
023626bfbebdc3d0118e98ae7c68bc1d252b5153
[ "Apache-2.0" ]
null
null
null
vectorizer.py
my-master/HashingTfidfVectorizer
023626bfbebdc3d0118e98ae7c68bc1d252b5153
[ "Apache-2.0" ]
1
2020-07-14T02:05:46.000Z
2020-07-14T02:05:46.000Z
TOKENIZER = None # PATH='/media/olga/Data/projects/iPavlov/DeepPavlov/download/odqa/ruwiki_tfidf_matrix.npz' # vectorizer = HashingTfIdfVectorizer(None) # vectorizer.load(PATH) # vectorizer.save('/media/olga/Data/projects/iPavlov/DeepPavlov/download/odqa/ruwiki_tfidf_matrix_new.npz')
35.963415
107
0.603707
from collections import Counter from concurrent.futures import ProcessPoolExecutor import concurrent from typing import List, Any, Generator, Tuple, KeysView, ValuesView, Dict import scipy as sp from scipy import sparse import numpy as np from tokenizers.spacy_tokenizer import SpacyTokenizer from logger import logger...
0
1,904
0
6,287
0
0
0
122
245
5be11d200ef0da8a6834ed6c935dc23c40a76f33
1,003
py
Python
scripts/dateToTimestampe.py
Nicky5/Qnverter
2d0a13ea306b11df24c465a5b572b6b367e0f9a6
[ "MIT" ]
1
2021-10-01T07:57:57.000Z
2021-10-01T07:57:57.000Z
scripts/dateToTimestampe.py
Nicky5/Qnverter
2d0a13ea306b11df24c465a5b572b6b367e0f9a6
[ "MIT" ]
null
null
null
scripts/dateToTimestampe.py
Nicky5/Qnverter
2d0a13ea306b11df24c465a5b572b6b367e0f9a6
[ "MIT" ]
null
null
null
# data must be stored in JSON format # data: { "name": "date to timestampe", "author": "nicky", "icon": "numbers.png", "tags": "UNIX date timestamp", "description": "converts a date to a UNIX timestamp", "icon_link": "https://cdn-icons-png.flaticon.com/512/3402/3402135.png" } # data: # any import s...
28.657143
89
0.647059
# data must be stored in JSON format # data: { "name": "date to timestampe", "author": "nicky", "icon": "numbers.png", "tags": "UNIX date timestamp", "description": "converts a date to a UNIX timestamp", "icon_link": "https://cdn-icons-png.flaticon.com/512/3402/3402135.png" } # data: # any import s...
0
0
0
0
0
547
0
0
44
323a2607223bde5ef5dca297bd7f2c43b9dbeacd
1,260
py
Python
pdfParanoia.py
megamillions/PDF-Paranoia
e484a8710b67eb92c8611adf56ba299beda46779
[ "MIT" ]
null
null
null
pdfParanoia.py
megamillions/PDF-Paranoia
e484a8710b67eb92c8611adf56ba299beda46779
[ "MIT" ]
null
null
null
pdfParanoia.py
megamillions/PDF-Paranoia
e484a8710b67eb92c8611adf56ba299beda46779
[ "MIT" ]
null
null
null
#! python3 # pdfParanoia.py - Add password in command line # to every PDF in folder and subfolders. import PyPDF2, os, sys password = sys.argv[1] for foldername, subfolders, filenames in os.walk(os.getcwd()): # Find each PDF after walking through given directory. for filename in filenames: if (filename.endswith...
25.714286
62
0.704762
#! python3 # pdfParanoia.py - Add password in command line # to every PDF in folder and subfolders. import PyPDF2, os, sys password = sys.argv[1] for foldername, subfolders, filenames in os.walk(os.getcwd()): # Find each PDF after walking through given directory. for filename in filenames: if (filename.endswith...
0
0
0
0
0
0
0
0
0
b30a0bc15747dc6cf9f83e1e4d0e309d3e35ceca
1,339
py
Python
src/utils.py
srisadhan/speech_emotions
59888ce1bab173f9b3438d76e89a5240a547327e
[ "MIT" ]
3
2020-05-08T02:51:35.000Z
2021-08-19T16:28:04.000Z
src/utils.py
srisadhan/speech_emotions
59888ce1bab173f9b3438d76e89a5240a547327e
[ "MIT" ]
2
2021-03-19T12:01:43.000Z
2022-01-13T02:30:07.000Z
src/utils.py
srisadhan/speech_emotions
59888ce1bab173f9b3438d76e89a5240a547327e
[ "MIT" ]
1
2022-02-05T00:30:50.000Z
2022-02-05T00:30:50.000Z
import numpy as np _my_colors = np.array([ [0, 127, 70], [255, 0, 0], [255, 217, 38], [0, 135, 255], [165, 0, 165], [255, 167, 255], [97, 142, 151], [0, 255, 255], [255, 96, 38], [142, 76, 0], [33, 0, 127], [0, 0, 0], [183, 183, 183], [76, 255, 0]...
18.094595
57
0.475728
from contextlib import contextmanager import numpy as np _my_colors = np.array([ [0, 127, 70], [255, 0, 0], [255, 217, 38], [0, 135, 255], [165, 0, 165], [255, 167, 255], [97, 142, 151], [0, 255, 255], [255, 96, 38], [142, 76, 0], [33, 0, 127], [0, 0, 0], ...
0
516
0
353
0
0
0
16
98
9a9af4eb3e66d1c20306186cc8851519603fb6e3
73
py
Python
Exercise70.py
JBCFurtado/Rabiscos_Em_Python
a1a5be9391e1bbbb301b8a7776043f7ea77e24da
[ "MIT" ]
null
null
null
Exercise70.py
JBCFurtado/Rabiscos_Em_Python
a1a5be9391e1bbbb301b8a7776043f7ea77e24da
[ "MIT" ]
null
null
null
Exercise70.py
JBCFurtado/Rabiscos_Em_Python
a1a5be9391e1bbbb301b8a7776043f7ea77e24da
[ "MIT" ]
null
null
null
#Funo par print(par(4)) print(par(23))
12.166667
19
0.60274
#Função par def par(x): return (x%2==0) print(par(4)) print(par(23))
4
0
0
0
0
10
0
0
22
3b2866775530630c0d313eee7d895e64864b1fe2
8,779
py
Python
tests/test_axl.py
levensailor/ciscoaxl
f3a78ef39fba011c8bb0fdc6184a53d879e2d049
[ "MIT" ]
16
2019-04-18T17:16:48.000Z
2020-05-27T13:39:41.000Z
tests/test_axl.py
levensailor/ciscoaxl
f3a78ef39fba011c8bb0fdc6184a53d879e2d049
[ "MIT" ]
2
2020-03-16T14:26:46.000Z
2020-05-28T09:23:11.000Z
tests/test_axl.py
levensailor/ciscoaxl
f3a78ef39fba011c8bb0fdc6184a53d879e2d049
[ "MIT" ]
10
2019-09-29T16:21:11.000Z
2020-05-22T20:07:33.000Z
from ciscoaxl import axl from decouple import config cucm = config("CUCM_PUBLISHER") username = config("CUCM_AXL_USERNAME") password = config("CUCM_AXL_PASSWORD") version = config("CUCM_VERSION") ucm = axl(username=username, password=password, cucm=cucm, cucm_version=version) # TODO: add below methods for testing ...
29.759322
110
0.571363
from ciscoaxl import axl from decouple import config cucm = config("CUCM_PUBLISHER") username = config("CUCM_AXL_USERNAME") password = config("CUCM_AXL_PASSWORD") version = config("CUCM_VERSION") ucm = axl(username=username, password=password, cucm=cucm, cucm_version=version) class TestPhoneMethods: def test_ad...
0
0
0
2,301
0
0
0
0
23
976f0328ddc8dfa31cda29b390b282d8d72a585c
8,834
py
Python
plugins/modules/launchdarkly_environment.py
jhutchings1/ansible-launchdarkly-collection
2c21f589b0a889ddf4e0ad0a04f6b8c586585abd
[ "Apache-2.0" ]
null
null
null
plugins/modules/launchdarkly_environment.py
jhutchings1/ansible-launchdarkly-collection
2c21f589b0a889ddf4e0ad0a04f6b8c586585abd
[ "Apache-2.0" ]
null
null
null
plugins/modules/launchdarkly_environment.py
jhutchings1/ansible-launchdarkly-collection
2c21f589b0a889ddf4e0ad0a04f6b8c586585abd
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "0.1.0", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = r""" --- module: launchdarkly_environment short_description: Create Launchdarkly...
31.105634
147
0.644782
#!/usr/bin/python from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "0.1.0", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = r""" --- module: launchdarkly_environment short_description: Create Launchdarkly...
0
0
0
0
0
5,243
0
469
323
2c4ed8cd0460549ef49945e7afcd26e1a45cfa91
6,095
py
Python
lib/servers/script_scanner/experiment.py
clayton-ho/EGGs_Control
312f02488b47cf880c6e6600ce10856a871123df
[ "MIT" ]
2
2021-12-26T05:00:54.000Z
2021-12-30T17:15:49.000Z
lib/servers/script_scanner/experiment.py
clayton-ho/EGGs_Control
312f02488b47cf880c6e6600ce10856a871123df
[ "MIT" ]
null
null
null
lib/servers/script_scanner/experiment.py
clayton-ho/EGGs_Control
312f02488b47cf880c6e6600ce10856a871123df
[ "MIT" ]
null
null
null
""" Superclass of experiments and related classes. """
32.248677
90
0.604922
""" Superclass of experiments and related classes. """ import labrad import traceback from treedict import TreeDict class experiment_info(object): ''' Holds informaton about the experiment Attributes ---------- name: str parameters: TreeDict required_parameters: list ''' required_p...
0
47
0
5,881
0
0
0
-5
112
b21ccfa304e3d6a31f7dea0f62473f3a1cbd308a
176
py
Python
protonfixes/gamefixes/221040.py
Citiroller/protonfixes
6e0116bd1cd2172b6f0ff9905667bbc59595cdb7
[ "BSD-2-Clause" ]
213
2018-10-06T01:40:26.000Z
2022-03-16T16:17:37.000Z
protonfixes/gamefixes/221040.py
Citiroller/protonfixes
6e0116bd1cd2172b6f0ff9905667bbc59595cdb7
[ "BSD-2-Clause" ]
88
2018-10-06T17:38:56.000Z
2022-02-19T13:27:26.000Z
protonfixes/gamefixes/221040.py
Citiroller/protonfixes
6e0116bd1cd2172b6f0ff9905667bbc59595cdb7
[ "BSD-2-Clause" ]
67
2018-10-09T16:57:16.000Z
2022-03-14T13:06:25.000Z
""" Game fix for Resident Evil 6 / Biohazard 6 """ #pylint: disable=C0103 from protonfixes import util def main(): """ Uses wmp11 """ util.protontricks('wmp11')
14.666667
46
0.642045
""" Game fix for Resident Evil 6 / Biohazard 6 """ #pylint: disable=C0103 from protonfixes import util def main(): """ Uses wmp11 """ util.protontricks('wmp11')
0
0
0
0
0
0
0
0
0
4925d10f0d7ad8f43fe3da4a07dbc3d1690dff55
8,438
py
Python
FN/policy_gradient_continuous_agent.py
inamasa12/baby-steps-of-rl-ja
b596d9192f66b569ea7148d67537526eb2719581
[ "Apache-2.0" ]
null
null
null
FN/policy_gradient_continuous_agent.py
inamasa12/baby-steps-of-rl-ja
b596d9192f66b569ea7148d67537526eb2719581
[ "Apache-2.0" ]
7
2019-12-16T22:06:34.000Z
2022-02-10T00:20:07.000Z
FN/policy_gradient_continuous_agent.py
inamasa12/baby-steps-of-rl-ja
b596d9192f66b569ea7148d67537526eb2719581
[ "Apache-2.0" ]
null
null
null
import argparse if __name__ == "__main__": parser = argparse.ArgumentParser(description="PG Agent Pendulum-v0") parser.add_argument("--play", action="store_true", help="play with trained model") args = parser.parse_args() main(args.play)
37.336283
83
0.614956
import os import argparse import random import numpy as np from sklearn.preprocessing import StandardScaler from sklearn.externals import joblib import tensorflow as tf from tensorflow.python import keras as K import gym from fn_framework import FNAgent, Trainer, Observer class PolicyGradientContinuousAgent(FNAgent):...
0
366
0
6,928
0
486
0
59
313
4b500be8850a729d3d5a43f903492268f7cf40be
2,878
py
Python
Mar_9.py
keiraaaaa/Leetcode
90bf174f5613c79119aec58a1f0d1d2c1c3496bb
[ "MIT" ]
null
null
null
Mar_9.py
keiraaaaa/Leetcode
90bf174f5613c79119aec58a1f0d1d2c1c3496bb
[ "MIT" ]
null
null
null
Mar_9.py
keiraaaaa/Leetcode
90bf174f5613c79119aec58a1f0d1d2c1c3496bb
[ "MIT" ]
null
null
null
############################ # 226. Invert Binary Tree ############################ ''' # Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def invertTree(self, root): """ :type root:...
21.477612
88
0.51911
############################ # 226. Invert Binary Tree ############################ ''' # Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def invertTree(self, root): """ :type root:...
0
0
0
494
0
0
0
0
45
a74aba2b10db05b601e243b9d582ca00574868ab
317
py
Python
src/run_training.py
adsi7698/Optical-Character-Recognition
636d059d27c536517dd40f183665ba6ecb1fc618
[ "Unlicense" ]
null
null
null
src/run_training.py
adsi7698/Optical-Character-Recognition
636d059d27c536517dd40f183665ba6ecb1fc618
[ "Unlicense" ]
null
null
null
src/run_training.py
adsi7698/Optical-Character-Recognition
636d059d27c536517dd40f183665ba6ecb1fc618
[ "Unlicense" ]
null
null
null
import mnist_loader import network def run_train(): """ The network is trained by executing Network module """ training_data, validation_data, test_data = mnist_loader.load_data_wrapper() net = network.Network([784, 30, 10]) net.SGD(training_data, 30, 10, 3.0, test_data=test_data) network.save_object(net)
26.416667
77
0.757098
import mnist_loader import network def run_train(): """ The network is trained by executing Network module """ training_data, validation_data, test_data = mnist_loader.load_data_wrapper() net = network.Network([784, 30, 10]) net.SGD(training_data, 30, 10, 3.0, test_data=test_data) network.save_object(net)
0
0
0
0
0
0
0
0
0
628cb2ac0ce18b461212b99d623d4ef9a0b7ae3b
2,190
py
Python
benchmark/rclpy/publisher-stress-test.py
vincentrou/rclnodejs
afc4c355c3eeb8dc22bd796586fceef40b12c282
[ "Apache-2.0" ]
null
null
null
benchmark/rclpy/publisher-stress-test.py
vincentrou/rclnodejs
afc4c355c3eeb8dc22bd796586fceef40b12c282
[ "Apache-2.0" ]
null
null
null
benchmark/rclpy/publisher-stress-test.py
vincentrou/rclnodejs
afc4c355c3eeb8dc22bd796586fceef40b12c282
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2017 Intel Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
28.815789
105
0.715525
#!/usr/bin/env python3 # Copyright (c) 2017 Intel Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
0
0
0
0
0
1,375
0
14
134
63e88a62ce02074868f6424e1815bdf184db65ef
4,416
py
Python
Real-Time-Age-Calculation/main.py
swapnilgarg7/Face-X
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
[ "MIT" ]
5
2022-03-24T14:05:30.000Z
2022-03-28T17:26:49.000Z
Real-Time-Age-Calculation/main.py
swapnilgarg7/Face-X
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
[ "MIT" ]
null
null
null
Real-Time-Age-Calculation/main.py
swapnilgarg7/Face-X
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
[ "MIT" ]
null
null
null
import cv2 import argparse def highlightFace(net, frame, conf_threshold=0.7): ''' This function detects faces on the image using the 'net' passed (if any) and returns the detection output as well as the cordinates of the faces detected ''' frameOpencvDnn=frame.copy() #--------saving the image...
40.145455
155
0.64606
import cv2 import math import argparse def highlightFace(net, frame, conf_threshold=0.7): ''' This function detects faces on the image using the 'net' passed (if any) and returns the detection output as well as the cordinates of the faces detected ''' frameOpencvDnn=frame.copy() #--------savi...
0
0
0
0
0
0
0
-10
22
6fa9d4e801c303d15793ecf82029a5777f04f770
2,524
py
Python
pdfExtract/pdf_to_txt_pdfminer.py
bqsgwys/KARMA
4ddb42c06adaf9a6e9936d7f184f632f8ab43095
[ "MIT" ]
1
2019-08-29T01:01:07.000Z
2019-08-29T01:01:07.000Z
pdfExtract/pdf_to_txt_pdfminer.py
bqsgwys/KARMA
4ddb42c06adaf9a6e9936d7f184f632f8ab43095
[ "MIT" ]
null
null
null
pdfExtract/pdf_to_txt_pdfminer.py
bqsgwys/KARMA
4ddb42c06adaf9a6e9936d7f184f632f8ab43095
[ "MIT" ]
1
2019-08-24T01:46:48.000Z
2019-08-24T01:46:48.000Z
import sys import importlib importlib.reload(sys) from os import path """ / :param: prompt -> abs_path: check approriate path and store it in abs_path :return: string: abs_path """ """ pdftxt :param: name, name of every pdf file in the provided folder :return: none """ print ("\n") folder = check_path("Provide...
27.139785
80
0.670365
import sys import importlib importlib.reload(sys) from os import chdir, getcwd, listdir, path from time import strftime from pdfminer.pdfparser import PDFParser, PDFDocument from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer.converter import PDFPageAggregator from pdfminer.layout import...
693
0
0
0
0
1,179
0
231
180
430c4d44d80a53df56f3ebfd8461e9c29bdef797
4,305
py
Python
backend/swagger_server/tasks/invoke_webhook_.py
Lend88/libresign
9537f39a696fa5f3433052406329d77d528b6cf9
[ "MIT" ]
6
2019-01-29T05:58:37.000Z
2021-11-02T22:47:02.000Z
backend/swagger_server/tasks/invoke_webhook_.py
Lend88/libresign
9537f39a696fa5f3433052406329d77d528b6cf9
[ "MIT" ]
9
2020-09-09T04:53:01.000Z
2022-03-08T22:52:18.000Z
backend/swagger_server/tasks/invoke_webhook_.py
Lend88/libresign
9537f39a696fa5f3433052406329d77d528b6cf9
[ "MIT" ]
4
2019-01-29T07:38:55.000Z
2021-10-16T21:06:42.000Z
from .. import app
29.895833
89
0.568873
from uuid import UUID import json import logging import traceback import requests from requests.exceptions import ConnectionError as RequestsConnectionError, MissingSchema from sqlalchemy.orm.exc import NoResultFound from .. import app from ..db import Session from ..mappings import * from ..helpers import type_che...
0
2,580
0
0
0
1,333
0
80
292
89eff22d9d65a7bdcd163ee8887abcd24c0b0821
7,723
py
Python
test.py
babbu3682/MRI-Net
e3b6aeb44991bf45a4884a46af48a99ac656ac52
[ "MIT" ]
3
2021-10-04T11:00:23.000Z
2021-12-13T12:31:28.000Z
test.py
babbu3682/MRI-Net
e3b6aeb44991bf45a4884a46af48a99ac656ac52
[ "MIT" ]
null
null
null
test.py
babbu3682/MRI-Net
e3b6aeb44991bf45a4884a46af48a99ac656ac52
[ "MIT" ]
null
null
null
import os from pathlib import Path import argparse import numpy as np import torch import random # import functools # Fix random seeds for reproducibility random_seed = 42 torch.manual_seed(random_seed) torch.cuda.manual_seed(random_seed) torch.cuda.manual_seed_all(random_seed) torch.backends.cudnn.deterministic = ...
39.005051
193
0.67681
import os from pathlib import Path import argparse import datetime import numpy as np import time import torch import json import random # import functools import utils from create_model import create_model from create_datasets.prepare_datasets import build_test_dataset from engine import * from losses import Uptask_L...
0
0
0
0
0
6,571
0
46
246
9844f3d7b5b70879b5137b6245bf9d56fa63e87e
1,811
py
Python
jupyros/server_extension.py
ihuicatl/jupyter-ros
ea9c9e89f0ebf82108ac4d96897b2c64e6f74563
[ "BSD-3-Clause" ]
459
2019-02-18T16:02:24.000Z
2022-03-24T18:59:43.000Z
jupyros/server_extension.py
ihuicatl/jupyter-ros
ea9c9e89f0ebf82108ac4d96897b2c64e6f74563
[ "BSD-3-Clause" ]
54
2019-03-18T09:01:04.000Z
2021-11-29T17:45:00.000Z
jupyros/server_extension.py
ihuicatl/jupyter-ros
ea9c9e89f0ebf82108ac4d96897b2c64e6f74563
[ "BSD-3-Clause" ]
83
2019-04-08T05:53:28.000Z
2022-03-21T02:57:02.000Z
############################################################################# # Copyright (c) Wolf Vollprecht, QuantStack # # # # Distributed under the terms of the BSD 3-Clause License. # # ...
35.509804
90
0.530094
############################################################################# # Copyright (c) Wolf Vollprecht, QuantStack # # # # Distributed under the terms of the BSD 3-Clause License. # # ...
0
0
0
495
0
0
0
28
45
5c3582a85174999dc4797d1a0ff273dd42485222
12,360
py
Python
tests/test_solvers/test_quasisep/test_core.py
0x0L/tinygp
918c0bb8f7a0adbe9ca06df4667a3c15b9f92cec
[ "MIT" ]
null
null
null
tests/test_solvers/test_quasisep/test_core.py
0x0L/tinygp
918c0bb8f7a0adbe9ca06df4667a3c15b9f92cec
[ "MIT" ]
null
null
null
tests/test_solvers/test_quasisep/test_core.py
0x0L/tinygp
918c0bb8f7a0adbe9ca06df4667a3c15b9f92cec
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # mypy: ignore-errors
30.9
82
0.582524
# -*- coding: utf-8 -*- # mypy: ignore-errors from itertools import combinations import jax.numpy as jnp import numpy as np import pytest from tinygp.solvers.quasisep.core import ( DiagQSM, LowerTriQSM, SquareQSM, StrictLowerTriQSM, StrictUpperTriQSM, SymmQSM, ) @pytest.fixture(params=["ran...
0
5,266
0
0
0
6,420
0
131
481
2f2b4ab7abb6f6019210c464c87de68fa6200c4b
515
py
Python
tests/test_utils_data.py
ChasNelson1990/pyzoopla
d22ceb7f443016e0ce92436741fa3b27de3c53b3
[ "MIT" ]
1
2020-08-29T01:41:23.000Z
2020-08-29T01:41:23.000Z
tests/test_utils_data.py
ChasNelson1990/pyzoopla
d22ceb7f443016e0ce92436741fa3b27de3c53b3
[ "MIT" ]
4
2019-10-24T14:48:50.000Z
2021-06-17T13:57:27.000Z
tests/test_utils_data.py
ChasNelson1990/pyzoopla
d22ceb7f443016e0ce92436741fa3b27de3c53b3
[ "MIT" ]
2
2018-07-11T12:13:44.000Z
2022-03-24T11:14:26.000Z
html1 = """<li class="clearfix"> <span class="interface nearby_stations_schools_national_rail_station" title="London Bridge"></span> <span class="nearby_stations_schools_name" title="London Bridge">London Bridge</span> (0.4 miles) </li>""" html2 = """<li class="clearfix"> <span class="interface...
27.105263
99
0.691262
html1 = """<li class="clearfix"> <span class="interface nearby_stations_schools_national_rail_station" title="London Bridge"></span> <span class="nearby_stations_schools_name" title="London Bridge">London Bridge</span> (0.4 miles) </li>""" html2 = """<li class="clearfix"> <span class="interface...
0
0
0
0
0
0
0
0
0
5e50eed7b3d0b70953b710020a5579e69debd092
679
py
Python
NewYearChaos.py
vantonini/HackerRankCodes
657b782b0a678a8edd84194b1bd147a305c6f01c
[ "MIT" ]
null
null
null
NewYearChaos.py
vantonini/HackerRankCodes
657b782b0a678a8edd84194b1bd147a305c6f01c
[ "MIT" ]
null
null
null
NewYearChaos.py
vantonini/HackerRankCodes
657b782b0a678a8edd84194b1bd147a305c6f01c
[ "MIT" ]
null
null
null
# input = "5 1 2 3 7 8 6 4" input = "1 2 5 3 7 8 6 4" # input = "2 1 5 3 4" # input = "2 5 1 3 4" a = list(map(int, input.rstrip().split())) minimumBribes(a)
29.521739
120
0.572901
def minimumBribes(q): total_bribes = 0 for idx, num in enumerate(q): if (num - (idx + 1) > 2): print("Too chaotic") return # if there is a greater value between 2 positions before the original one (num-2) and its actual position (idx), # it means that this number ...
0
0
0
0
0
490
0
0
22
c5432aeb55cae2d4c190cdba30eb8b39542d26c3
4,615
py
Python
model.py
ZhiangChen/brown_dwarf_ML
49468d26e22cd074a074f6b610fbef46ed8f7637
[ "Apache-2.0" ]
null
null
null
model.py
ZhiangChen/brown_dwarf_ML
49468d26e22cd074a074f6b610fbef46ed8f7637
[ "Apache-2.0" ]
null
null
null
model.py
ZhiangChen/brown_dwarf_ML
49468d26e22cd074a074f6b610fbef46ed8f7637
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ model.py Zhiang Chen Nov 24, 2019 """ from __future__ import absolute_import, division, print_function, unicode_literals if __name__ == "__main__": inputs = 200 layers = [200, 20, 2] nn = FCL(inputs, layers)
32.5
128
0.593499
#!/usr/bin/env python """ model.py Zhiang Chen Nov 24, 2019 """ from __future__ import absolute_import, division, print_function, unicode_literals import tensorflow as tf import pandas as pd import matplotlib.pyplot as plt import os class FCL(object): def __init__(self, input_shape, layers, activation_function='r...
0
0
0
3,617
0
594
0
-2
157
e2a250769110d19e18e743613def45ae92f2aeb4
5,134
py
Python
src/lassl/blender.py
dumpmemory/lassl
dfe56f09cc2ade6c777ad8561b24f23d83a34188
[ "Apache-2.0" ]
null
null
null
src/lassl/blender.py
dumpmemory/lassl
dfe56f09cc2ade6c777ad8561b24f23d83a34188
[ "Apache-2.0" ]
null
null
null
src/lassl/blender.py
dumpmemory/lassl
dfe56f09cc2ade6c777ad8561b24f23d83a34188
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2021 TUNiB Inc. # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licens...
34.226667
110
0.643748
# coding=utf-8 # Copyright 2021 TUNiB Inc. # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licens...
0
1,436
0
2,782
0
0
0
83
179
6ac8f9deb19603ee381eb0ad85c0d881b1d0355a
7,168
py
Python
Simpler scripts/analysis.py
peter-santana/SkyBoT_Search
7f3cdff3876362041c42ed68e2ad29c17b04ecfe
[ "MIT" ]
null
null
null
Simpler scripts/analysis.py
peter-santana/SkyBoT_Search
7f3cdff3876362041c42ed68e2ad29c17b04ecfe
[ "MIT" ]
null
null
null
Simpler scripts/analysis.py
peter-santana/SkyBoT_Search
7f3cdff3876362041c42ed68e2ad29c17b04ecfe
[ "MIT" ]
null
null
null
#MBA and Asteroid Analysis #Comments are done so for magnitudes less than 18 (LCAM Project standards) import numpy as np file = open("Analysis.txt", "w") Asteroids = np.genfromtxt("Objects_test_asteroids.txt" , comments='#', delimiter = " | ",dtype=None,invalid_raise=False,usecols=(1), encoding=None) Class = np.g...
47.157895
148
0.730887
#MBA and Asteroid Analysis #Comments are done so for magnitudes less than 18 (LCAM Project standards) import numpy as np import sys file = open("Analysis.txt", "w") Asteroids = np.genfromtxt("Objects_test_asteroids.txt" , comments='#', delimiter = " | ",dtype=None,invalid_raise=False,usecols=(1), encoding=None) ...
0
0
0
0
0
0
0
-11
23
d6e16ba6d7b14d8de9db9ef7eb624534ece34bdb
798
py
Python
tcmi/__init__.py
BenjaminRegler/tcmi
7f79e0fc02e45db41da723b24234b5e7f71e9464
[ "Apache-2.0" ]
null
null
null
tcmi/__init__.py
BenjaminRegler/tcmi
7f79e0fc02e45db41da723b24234b5e7f71e9464
[ "Apache-2.0" ]
null
null
null
tcmi/__init__.py
BenjaminRegler/tcmi
7f79e0fc02e45db41da723b24234b5e7f71e9464
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ @package tcmi @copyright Copyright (c) 2018+ Fritz Haber Institute of the Max Planck Society, Benjamin Regler <regler@fhi-berlin.mpg.de> @license See LICENSE file for details. Licensed under the Apache License, Version 2.0 (the 'License'). You may not use this file excep...
36.272727
112
0.740602
# -*- coding: utf-8 -*- """ @package tcmi @copyright Copyright (c) 2018+ Fritz Haber Institute of the Max Planck Society, Benjamin Regler <regler@fhi-berlin.mpg.de> @license See LICENSE file for details. Licensed under the Apache License, Version 2.0 (the 'License'). You may not use this file excep...
0
0
0
0
0
0
0
0
0
f8f7c4c218545ffe2e2ff8b644c7180f6413d7fd
826
py
Python
ibis/pyspark/api.py
hjoo/ibis
72ece317337fb7d329337f20db930845a669ce85
[ "Apache-2.0" ]
null
null
null
ibis/pyspark/api.py
hjoo/ibis
72ece317337fb7d329337f20db930845a669ce85
[ "Apache-2.0" ]
null
null
null
ibis/pyspark/api.py
hjoo/ibis
72ece317337fb7d329337f20db930845a669ce85
[ "Apache-2.0" ]
null
null
null
from ibis.pyspark.client import PySparkClient def connect(session): """ Create a `SparkClient` for use with Ibis. Pipes **kwargs into SparkClient, which pipes them into SparkContext. See documentation for SparkContext: https://spark.apache.org/docs/latest/api/python/_modules/pyspark/context.html#Spark...
41.3
112
0.749395
from ibis.pyspark.client import PySparkClient from ibis.pyspark.compiler import dialect # noqa: F401 def connect(session): """ Create a `SparkClient` for use with Ibis. Pipes **kwargs into SparkClient, which pipes them into SparkContext. See documentation for SparkContext: https://spark.apache.org/do...
0
0
0
0
0
0
0
20
36
c007e80ddc590ed427db3211f4a5b62c64e9f8ca
69,317
py
Python
src/onelogin/api/client.py
chrono/onelogin-python-sdk
5f5ec6eb45058f85a3f9b7813e182265bb814db0
[ "MIT" ]
null
null
null
src/onelogin/api/client.py
chrono/onelogin-python-sdk
5f5ec6eb45058f85a3f9b7813e182265bb814db0
[ "MIT" ]
null
null
null
src/onelogin/api/client.py
chrono/onelogin-python-sdk
5f5ec6eb45058f85a3f9b7813e182265bb814db0
[ "MIT" ]
null
null
null
#!/usr/bin/python """ OneLoginClient class Copyright (c) 2017, OneLogin, Inc. All rights reserved. OneLoginClient class of the OneLogin's Python SDK. """
35.186294
167
0.59401
#!/usr/bin/python """ OneLoginClient class Copyright (c) 2017, OneLogin, Inc. All rights reserved. OneLoginClient class of the OneLogin's Python SDK. """ import datetime from dateutil import tz import requests from defusedxml.lxml import fromstring from onelogin.api.util.urlbuilder import UrlBuilder from onelogin...
0
0
0
68,009
0
0
0
618
531
045a0ba41bc8a0e9f7cdbe6646845212cfa944e3
475
py
Python
BOJ/divide_and_conquer_boj/z.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
BOJ/divide_and_conquer_boj/z.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
BOJ/divide_and_conquer_boj/z.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
# BOJ 1074 import sys si = sys.stdin.readline n, r, c = map(int, si().split()) print(divide(r, c, n))
21.590909
62
0.498947
# BOJ 1074 import sys si = sys.stdin.readline def divide(x, y, k): if k == 0: return 0 half = 1 << (k - 1) if x < half and y < half: return divide(x, y, half) elif x < half <= y: return half * half + divide(x, y - half, k - 1) elif x >= half > y: return 2 * half * ...
0
0
0
0
0
346
0
0
23
e3b9f04529c8e6e56ace4d3c6daa35b61dfc6444
564
py
Python
test/util/plot/util_plot_style.py
bomtuckle/pyrolite
c0af0ade14ff26b4e9fdd5a033b27e73df085c55
[ "BSD-3-Clause" ]
69
2019-02-25T00:17:53.000Z
2022-03-31T17:26:48.000Z
test/util/plot/util_plot_style.py
bomtuckle/pyrolite
c0af0ade14ff26b4e9fdd5a033b27e73df085c55
[ "BSD-3-Clause" ]
68
2018-07-20T09:01:01.000Z
2022-03-31T16:28:36.000Z
test/util/plot/util_plot_style.py
bomtuckle/pyrolite
c0af0ade14ff26b4e9fdd5a033b27e73df085c55
[ "BSD-3-Clause" ]
24
2018-10-02T04:32:10.000Z
2021-11-10T08:24:17.000Z
import unittest if __name__ == "__main__": unittest.main()
20.888889
65
0.606383
import unittest import matplotlib.lines from pyrolite.util.plot.style import ( marker_cycle, linekwargs, scatterkwargs, patchkwargs, _mpl_sp_kw_split, ) class TestMarkerCycle(unittest.TestCase): def test_iterable(self): mkrs = marker_cycle() for i in range(15): ...
0
0
0
300
0
0
0
119
73
5c741966de8e291cbbe99d7d83b47cca6486ae2d
1,153
py
Python
src/brokkr/outputs/binaryfile.py
project-mjolnir/brokkr
1785ca5e314f90f3f739ba9ff0d97749317b8a00
[ "MIT" ]
2
2022-01-14T21:20:06.000Z
2022-01-17T18:37:25.000Z
src/brokkr/outputs/binaryfile.py
CAM-Gerlach/brokkr
1785ca5e314f90f3f739ba9ff0d97749317b8a00
[ "MIT" ]
null
null
null
src/brokkr/outputs/binaryfile.py
CAM-Gerlach/brokkr
1785ca5e314f90f3f739ba9ff0d97749317b8a00
[ "MIT" ]
2
2020-08-24T16:11:22.000Z
2022-03-14T06:15:35.000Z
""" Data output to a binary file. """ # Local imports import brokkr.pipeline.baseoutput
30.342105
71
0.631396
""" Data output to a binary file. """ # Local imports import brokkr.pipeline.baseoutput import brokkr.pipeline.utils class BinaryFileOutput(brokkr.pipeline.baseoutput.FileOutputStep): def __init__( self, str_encoding="utf-8", extension="bin", skip_na=True, ...
0
0
0
1,011
0
0
0
7
45
e09cba69846083d33cc8386cd6e025bb40f65cb2
207
py
Python
tools/csv-to-array.py
Kyuchumimo/Pygame-80
4d04f0a16b80c7e747e30c3f86c15728f26f272a
[ "MIT" ]
4
2021-11-20T20:33:27.000Z
2022-03-17T16:22:29.000Z
tools/csv-to-array.py
Kyuchumimo/Pygame-80
4d04f0a16b80c7e747e30c3f86c15728f26f272a
[ "MIT" ]
null
null
null
tools/csv-to-array.py
Kyuchumimo/Pygame-80
4d04f0a16b80c7e747e30c3f86c15728f26f272a
[ "MIT" ]
null
null
null
#Tool by Ghast with some changes with open("path/file.csv", 'r') as file: txt = "".join(file.readlines()) print("([ " + "\n ".join(["[{}],".format(t) for t in txt.split("\n") if t])[:-1] + " ])")
34.5
95
0.521739
#Tool by Ghast with some changes with open("path/file.csv", 'r') as file: txt = "".join(file.readlines()) print("([ " + "\n ".join(["[{}],".format(t) for t in txt.split("\n") if t])[:-1] + " ])")
0
0
0
0
0
0
0
0
0
32263f0357794fece5edef46f06e76e7144b0b82
1,115
py
Python
third_party/WebKit/LayoutTests/http/tests/websocket/connection-throttling_wsh.py
google-ar/chromium
2441c86a5fd975f09a6c30cddb57dfb7fc239699
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
777
2017-08-29T15:15:32.000Z
2022-03-21T05:29:41.000Z
third_party/WebKit/LayoutTests/http/tests/websocket/connection-throttling_wsh.py
harrymarkovskiy/WebARonARCore
2441c86a5fd975f09a6c30cddb57dfb7fc239699
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
66
2017-08-30T18:31:18.000Z
2021-08-02T10:59:35.000Z
third_party/WebKit/LayoutTests/http/tests/websocket/connection-throttling_wsh.py
harrymarkovskiy/WebARonARCore
2441c86a5fd975f09a6c30cddb57dfb7fc239699
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
123
2017-08-30T01:19:34.000Z
2022-03-17T22:55:31.000Z
import time import threading lock = threading.Lock() connections = set() next_test_id = 0 def new_test(request): """Allocate a unique test id.""" global lock, next_test_id with lock: request.response = str(next_test_id) next_test_id += 1 def do_test(request, params): """Check that...
22.755102
71
0.64574
import cgi import time import threading lock = threading.Lock() connections = set() next_test_id = 0 def web_socket_do_extra_handshake(request): query_string = request.ws_resource.split('?', 1) if len(query_string) == 1: return params = cgi.parse_qs(query_string[1]) mode = params["mode"][0] ...
0
0
0
0
0
401
0
-11
68
fbfe3ba14600bf7b322652be7051c9351321f08e
963
py
Python
app/libs/configLib/opasIJPConfig.py
Psychoanalytic-Electronic-Publishing/openpubarchive
afd2a281ebacf8404791c11a21c06a0ae135f2a7
[ "Apache-2.0" ]
1
2019-04-01T14:45:33.000Z
2019-04-01T14:45:33.000Z
app/libs/configLib/opasIJPConfig.py
Psychoanalytic-Electronic-Publishing/openpubarchive
afd2a281ebacf8404791c11a21c06a0ae135f2a7
[ "Apache-2.0" ]
46
2019-05-14T14:16:15.000Z
2020-08-06T03:45:12.000Z
app/libs/configLib/opasIJPConfig.py
nrshapiro/openpubarchive
f6d3b7da6cd23e51b32e16e17ccb55b8511d32a6
[ "Apache-2.0" ]
1
2020-08-26T15:25:28.000Z
2020-08-26T15:25:28.000Z
#IJPOpen IssueTitles by issue number (used to sort IJPOpen by issuetitle) IJPOPENISSUES = { "Announcement": 1, "Annuals Report": 2, "Book Review Essay": 3, "Book Reviews": 4, "Book and Journal Reviews": 5, "Child and Adolescent Psychoanalysis": 6, "Clinical Communications": 7, "Correcti...
27.514286
73
0.632399
#IJPOpen IssueTitles by issue number (used to sort IJPOpen by issuetitle) IJPOPENISSUES = { "Announcement": 1, "Annuals Report": 2, "Book Review Essay": 3, "Book Reviews": 4, "Book and Journal Reviews": 5, "Child and Adolescent Psychoanalysis": 6, "Clinical Communications": 7, "Correcti...
0
0
0
0
0
0
0
0
0
77307f2c3b8902fab7545f46f61b0dedee3a1e6c
2,914
py
Python
test/test_bayesian_inference_methods.py
quizlet/abracadabra
eda599bd02f14b96efdc521f53132d93c9100ede
[ "MIT" ]
24
2020-06-12T16:12:32.000Z
2021-09-01T12:25:38.000Z
test/test_bayesian_inference_methods.py
quizlet/abracadabra
eda599bd02f14b96efdc521f53132d93c9100ede
[ "MIT" ]
20
2020-06-12T06:26:08.000Z
2022-03-12T00:57:51.000Z
test/test_bayesian_inference_methods.py
quizlet/abracadabra
eda599bd02f14b96efdc521f53132d93c9100ede
[ "MIT" ]
4
2020-06-14T12:14:11.000Z
2021-05-28T15:36:44.000Z
from abra.inference.bayesian import get_stan_model_code from abra.inference.bayesian.models.binary import beta_binomial, binomial, bernoulli from abra.inference.bayesian.models.continuous import gaussian, exp_student_t from abra.inference.bayesian.models.counts import gamma_poisson def test_binary_model_specs(): ...
35.975309
84
0.732327
import pytest from abra import Experiment, HypothesisTest from abra.inference.bayesian import get_stan_model_code from abra.inference.bayesian.models.binary import beta_binomial, binomial, bernoulli from abra.inference.bayesian.models.continuous import gaussian, exp_student_t from abra.inference.bayesian.models.counts ...
0
1,750
0
0
0
0
0
14
136
1bdd2d7e76e97d21b66c6c30889b982b92354d88
795
py
Python
itembase/core/urls/staffing_urls.py
wedwardbeck/ibase
5647fa5aff6c1bdc99b6c93884ff0d5aef17d85b
[ "MIT" ]
null
null
null
itembase/core/urls/staffing_urls.py
wedwardbeck/ibase
5647fa5aff6c1bdc99b6c93884ff0d5aef17d85b
[ "MIT" ]
9
2020-01-17T14:16:08.000Z
2020-02-18T15:07:40.000Z
itembase/core/urls/staffing_urls.py
wedwardbeck/ibase
5647fa5aff6c1bdc99b6c93884ff0d5aef17d85b
[ "MIT" ]
null
null
null
from django.urls import path from itembase.core.views.staffing_views import ProjectManagerListView, TeamLeadListView, TeamListView, TeamMemberCreateView, TeamMemberClientCreateView, TeamMemberDetailView, TeamMemberUpdateView app_name = "staff" urlpatterns = [ # Client URL Patterns path('', TeamListView.as_vi...
41.842105
104
0.727044
from django.urls import path from itembase.core.views.staffing_views import ProjectManagerListView, TeamLeadListView, TeamListView, \ TeamMemberCreateView, TeamMemberClientCreateView, TeamMemberDetailView, TeamMemberUpdateView app_name = "staff" urlpatterns = [ # Client URL Patterns path('', TeamListView...
0
0
0
0
0
0
0
6
0
310c7df1f0f9e5bde45ca6f11e217475a48685e6
1,457
py
Python
scripts/dcj/dcjall.py
metaflow/contests
5e9ffcb72c3e7da54b5e0818b1afa59f5778ffa2
[ "MIT" ]
1
2019-05-12T23:41:00.000Z
2019-05-12T23:41:00.000Z
scripts/dcj/dcjall.py
metaflow/contests
5e9ffcb72c3e7da54b5e0818b1afa59f5778ffa2
[ "MIT" ]
null
null
null
scripts/dcj/dcjall.py
metaflow/contests
5e9ffcb72c3e7da54b5e0818b1afa59f5778ffa2
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys import os import re import subprocess if len(sys.argv) < 3: print("provide problem name and number of nodes") exit(1) problemName = sys.argv[1] nodeCount = sys.argv[2] for file in os.listdir('.'): if not re.match(problemName + '.+\.h$', file): # print(file, "X") ...
36.425
92
0.540837
#!/usr/bin/python import sys import os import re import subprocess if len(sys.argv) < 3: print("provide problem name and number of nodes") exit(1) problemName = sys.argv[1] nodeCount = sys.argv[2] for file in os.listdir('.'): if not re.match(problemName + '.+\.h$', file): # print(file, "X") ...
0
0
0
0
0
0
0
0
0
9cb03cd0c43dd3a253e43ad59681fff4e0cf9e26
2,442
py
Python
app.py
asinghal17/projectnic
c403773fe8dee8fdc81d290a765b03c4a144fd28
[ "MIT" ]
null
null
null
app.py
asinghal17/projectnic
c403773fe8dee8fdc81d290a765b03c4a144fd28
[ "MIT" ]
null
null
null
app.py
asinghal17/projectnic
c403773fe8dee8fdc81d290a765b03c4a144fd28
[ "MIT" ]
null
null
null
import logging from flask import Flask from flask_cache import Cache from flask_compress import Compress chap = "1blZPkNxrw3ovfLvqD76eUzTuME34N2bl1fSTdaMjX2c" marq = "1wFK2aPJmXjAQAx3rT2vF7H-8NvveWQ7tuXdEoemhZ1M" board = "1JbaMwsPHbN3og_igSOJfJEzf2IJimAIqzrbf_ra6Pp0" osuexec = "1RVdYx88BnZ7IEWP1Kidk00-K80V96cCWOMCIrqf...
27.75
122
0.774775
import os import logging from flask import Flask,request,render_template from flask_cache import Cache from flask_compress import Compress from lib import gscrape from time import time chap = "1blZPkNxrw3ovfLvqD76eUzTuME34N2bl1fSTdaMjX2c" marq = "1wFK2aPJmXjAQAx3rT2vF7H-8NvveWQ7tuXdEoemhZ1M" board = "1JbaMwsPHbN3og_ig...
0
1,244
0
0
0
0
0
14
365
f020de87f729c05ecab0fa899e0fdc816f946705
1,873
py
Python
qa/L0_e2e/test_model.py
rapidsai/rapids-triton-template
df645ea6442b530de22b18e6adb115bb70e1c7d3
[ "Apache-2.0", "Unlicense" ]
null
null
null
qa/L0_e2e/test_model.py
rapidsai/rapids-triton-template
df645ea6442b530de22b18e6adb115bb70e1c7d3
[ "Apache-2.0", "Unlicense" ]
null
null
null
qa/L0_e2e/test_model.py
rapidsai/rapids-triton-template
df645ea6442b530de22b18e6adb115bb70e1c7d3
[ "Apache-2.0", "Unlicense" ]
null
null
null
# Copyright (c) 2021, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
31.216667
74
0.711692
# Copyright (c) 2021, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
0
763
0
0
0
8
0
24
181
6a5fce27d8838673500514161dace7dd34496f21
18,069
py
Python
test_decode.py
akpandeya/odisoft-test
3563fb8d3b83b2e6e7c1cd917474690b6dd109d4
[ "MIT" ]
null
null
null
test_decode.py
akpandeya/odisoft-test
3563fb8d3b83b2e6e7c1cd917474690b6dd109d4
[ "MIT" ]
null
null
null
test_decode.py
akpandeya/odisoft-test
3563fb8d3b83b2e6e7c1cd917474690b6dd109d4
[ "MIT" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
64.996403
200
0.630638
import unittest from decode import hex_to_dec, get_bool, hex_to_binary_int_string, hex_to_binary_string_list, invert_string, get_data_status from decode import format_hex, bin_to_dec, binary_to_on_off, get_digital_io_status, get_alarm, get_reverse from decode import get_battery, hex_to_float, make_decimal class TestSt...
0
0
0
17,648
0
0
0
225
89
ed133590646e67d6382481de06d6028b4e5853f5
1,348
py
Python
scripts/sendalert.py
Zagyarakushi/CHS
2f1f6f8842313a2419946c913b177ac6cac98476
[ "MIT" ]
null
null
null
scripts/sendalert.py
Zagyarakushi/CHS
2f1f6f8842313a2419946c913b177ac6cac98476
[ "MIT" ]
null
null
null
scripts/sendalert.py
Zagyarakushi/CHS
2f1f6f8842313a2419946c913b177ac6cac98476
[ "MIT" ]
null
null
null
import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.base import MIMEBase from email import encoders import os email = 'xxxx@xxxx.com' password = 'xxxx' send_to_emails = ['xxxx@xxxx.com', 'xxxx@xxxx.com'] # List of email addresses subject = 'xxxx' message =...
29.955556
85
0.642433
import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.base import MIMEBase from email import encoders import os email = 'xxxx@xxxx.com' password = 'xxxx' send_to_emails = ['xxxx@xxxx.com', 'xxxx@xxxx.com'] # List of email addresses subject = 'xxxx' message =...
0
0
0
0
0
0
0
0
0
7a391788a188542e9a1450ff50afc0f941cefabf
3,504
py
Python
face_manager/management/commands/deprecated/inception_features.py
benjaminlewis-1000/django_picasa
029e30786e1acb53d864ff185c1a26274084f739
[ "MIT" ]
null
null
null
face_manager/management/commands/deprecated/inception_features.py
benjaminlewis-1000/django_picasa
029e30786e1acb53d864ff185c1a26274084f739
[ "MIT" ]
22
2021-04-08T18:42:18.000Z
2022-03-12T00:12:02.000Z
face_manager/management/commands/deprecated/inception_features.py
benjaminlewis-1000/django_picasa
029e30786e1acb53d864ff185c1a26274084f739
[ "MIT" ]
null
null
null
#! /usr/bin/env python
29.694915
78
0.640411
#! /usr/bin/env python from django.core.management.base import BaseCommand from face_manager import models as face_models from facenet_pytorch import MTCNN, InceptionResnetV1 from filepopulator import models as file_models from io import BytesIO from PIL import Image, ExifTags import cv2 import matplotlib.pyplot as pl...
0
0
0
714
0
2,315
0
89
361
450c4a53241e0756f399c22190d4cb19584b9d9c
716
py
Python
fritzlog/management/commands/fritz_parse_captures.py
defgsus/fritztrack
a433f0c373cad992889c447b5283394cf321ff44
[ "MIT" ]
1
2020-09-16T14:44:36.000Z
2020-09-16T14:44:36.000Z
fritzlog/management/commands/fritz_parse_captures.py
defgsus/fritztrack
a433f0c373cad992889c447b5283394cf321ff44
[ "MIT" ]
null
null
null
fritzlog/management/commands/fritz_parse_captures.py
defgsus/fritztrack
a433f0c373cad992889c447b5283394cf321ff44
[ "MIT" ]
null
null
null
# encoding=utf-8 from __future__ import unicode_literals, print_function
27.538462
72
0.717877
# encoding=utf-8 from __future__ import unicode_literals, print_function import datetime from django.core.management.base import BaseCommand, CommandError from django.db import transaction from django.utils.translation import ugettext_lazy as _ class Command(BaseCommand): help = _('Parse all (new) capture files...
0
0
0
444
0
0
0
84
113
f0193054d36a0c6e8471e9bef2ea730de7f9933f
2,569
py
Python
models/fcos/model.py
AI-UI-GmbH/AI-Lab
68b87e44cf23d15a407c5e5895fea037a4ca2bb7
[ "MIT" ]
4
2020-11-28T14:54:15.000Z
2021-07-02T10:00:00.000Z
models/fcos/model.py
AI-UI-GmbH/AI-Lab
68b87e44cf23d15a407c5e5895fea037a4ca2bb7
[ "MIT" ]
1
2021-04-20T08:26:33.000Z
2021-04-20T09:26:34.000Z
models/fcos/model.py
AI-UI-GmbH/AI-Lab
68b87e44cf23d15a407c5e5895fea037a4ca2bb7
[ "MIT" ]
1
2021-03-08T07:43:03.000Z
2021-03-08T07:43:03.000Z
import tensorflow as tf import tensorflow.keras.layers as KL from utils import conv_block def FCOS(cfg, backbone=None, top_layer=None): """return FCOS as keras model Arguments: cfg: dict backbone: str or keras model top_layer: Returns: keras model of FCOS """ # ...
30.951807
113
0.65434
import tensorflow as tf import tensorflow.keras.layers as KL from utils import conv_block def FCOS(cfg, backbone=None, top_layer=None): """return FCOS as keras model Arguments: cfg: dict backbone: str or keras model top_layer: Returns: keras model of FCOS """ # ...
0
0
0
0
0
0
0
0
0
2133d7487ed2eafa972936d2c2ce5a9de7a8b771
1,135
py
Python
python_for_beginners/nested_loops_exs/cinema_tickets.py
deboradyankova/python_education
41c246ae50b4bf0f372f7b8b2de8d02391eaad7a
[ "MIT" ]
null
null
null
python_for_beginners/nested_loops_exs/cinema_tickets.py
deboradyankova/python_education
41c246ae50b4bf0f372f7b8b2de8d02391eaad7a
[ "MIT" ]
null
null
null
python_for_beginners/nested_loops_exs/cinema_tickets.py
deboradyankova/python_education
41c246ae50b4bf0f372f7b8b2de8d02391eaad7a
[ "MIT" ]
null
null
null
standard_tickets = 0 student_tickets = 0 kid_tickets = 0 finished = False while not finished: movie = input() seats = int(input()) capacity = seats while True: ticket = input() if ticket == 'Finish' or ticket == 'End': if ticket == 'Finish': ...
27.02381
76
0.547137
standard_tickets = 0 student_tickets = 0 kid_tickets = 0 finished = False while not finished: movie = input() seats = int(input()) capacity = seats while True: ticket = input() if ticket == 'Finish' or ticket == 'End': if ticket == 'Finish': ...
0
0
0
0
0
0
0
0
0
7d4e6842bd7e8d86d0c6e9897e04fb4946613393
10,955
py
Python
data_gateway/persistence.py
aerosense-ai/data-gateway
019b8e4a114e16d363a3167171a457cefdbf004f
[ "Apache-2.0" ]
null
null
null
data_gateway/persistence.py
aerosense-ai/data-gateway
019b8e4a114e16d363a3167171a457cefdbf004f
[ "Apache-2.0" ]
34
2021-12-20T14:51:57.000Z
2022-03-30T16:47:04.000Z
data_gateway/persistence.py
aerosense-ai/data-gateway
019b8e4a114e16d363a3167171a457cefdbf004f
[ "Apache-2.0" ]
null
null
null
import multiprocessing logger = multiprocessing.get_logger() DEFAULT_OUTPUT_DIRECTORY = "data_gateway"
35.453074
119
0.651848
import abc import copy import csv import json import multiprocessing import os import time from octue.cloud import storage from octue.cloud.storage.client import GoogleCloudStorageClient from octue.utils.persistence import calculate_disk_usage, get_oldest_file_in_directory logger = multiprocessing.get_logger() DEFA...
0
425
0
10,076
0
0
0
53
291
c3924ae4925dcec00bd3df99ed04d15b89201408
2,510
py
Python
quantumteleport.py
Ixss82/Tutorials
37c91ceee406e9b580f204105d531ccb789ad569
[ "MIT" ]
38
2019-11-10T05:02:58.000Z
2022-03-28T05:02:16.000Z
quantumteleport.py
Ixss82/Tutorials
37c91ceee406e9b580f204105d531ccb789ad569
[ "MIT" ]
null
null
null
quantumteleport.py
Ixss82/Tutorials
37c91ceee406e9b580f204105d531ccb789ad569
[ "MIT" ]
2
2020-04-22T18:28:18.000Z
2020-12-02T22:23:57.000Z
from qiskit import QuantumCircuit from qiskit import execute, Aer from qiskit.visualization import plot_histogram secret_unitary = "hz" # simple function that applies a series of unitary gates from a given string # Create the quantum circuit with 3 qubits and 3 classical bits qc = QuantumCircuit(3, 3) print("Original...
32.597403
115
0.707171
import qiskit as qk from qiskit import ClassicalRegister, QuantumRegister, QuantumCircuit from qiskit import execute, Aer from qiskit import IBMQ from qiskit.visualization import plot_histogram import matplotlib secret_unitary = "hz" # simple function that applies a series of unitary gates from a given string def appl...
0
0
0
0
0
559
0
32
88
79f6c05ef0b7790c4357518a615bf6eb5bb89528
4,257
py
Python
emp_uncertainty/dropout_rate/cifar_dropout.py
testingautomated-usi/repli-stvr2022-uncertainty
c4ef27721e9d3e2b44d328cc99b0e2616b99ef12
[ "MIT" ]
null
null
null
emp_uncertainty/dropout_rate/cifar_dropout.py
testingautomated-usi/repli-stvr2022-uncertainty
c4ef27721e9d3e2b44d328cc99b0e2616b99ef12
[ "MIT" ]
null
null
null
emp_uncertainty/dropout_rate/cifar_dropout.py
testingautomated-usi/repli-stvr2022-uncertainty
c4ef27721e9d3e2b44d328cc99b0e2616b99ef12
[ "MIT" ]
null
null
null
import uncertainty_wizard as uwiz from emp_uncertainty.case_studies.case_study import BASE_MODEL_SAVE_FOLDER, BASE_OUTPUTS_SAVE_FOLDER from emp_uncertainty.dropout_rate.utils import CpuOnlyContext MODEL_FOLDER = f"{BASE_MODEL_SAVE_FOLDER}/dropout-experiments/cifar" OUTPUTS_FOLDER = f"{BASE_OUTPUTS_SAVE_FOLDER}/dropou...
43.438776
113
0.690392
import os import numpy as np import tensorflow as tf import uncertainty_wizard as uwiz from emp_uncertainty.case_studies.case_study import BASE_MODEL_SAVE_FOLDER, BASE_OUTPUTS_SAVE_FOLDER from emp_uncertainty.case_studies.plain_classifiers import cifar10 from emp_uncertainty.dropout_rate.utils import rate_from_model_...
0
0
0
0
0
3,139
0
95
158
5bc582991a413b2ba07c5f19269a2c90a04f6184
16,873
py
Python
tests/integration/coordinator/plugins/clickhouse/conftest.py
aiven/astacus
2d64e1f33e01d50a41127f41d9da3d1ab0ce0387
[ "Apache-2.0" ]
19
2020-06-22T12:17:59.000Z
2022-02-18T00:12:17.000Z
tests/integration/coordinator/plugins/clickhouse/conftest.py
aiven/astacus
2d64e1f33e01d50a41127f41d9da3d1ab0ce0387
[ "Apache-2.0" ]
7
2020-06-24T05:16:20.000Z
2022-02-28T07:35:31.000Z
tests/integration/coordinator/plugins/clickhouse/conftest.py
aiven/astacus
2d64e1f33e01d50a41127f41d9da3d1ab0ce0387
[ "Apache-2.0" ]
2
2020-09-05T21:23:08.000Z
2022-02-17T15:02:37.000Z
""" Copyright (c) 2021 Aiven Ltd See LICENSE for details """ import logging import pytest logger = logging.getLogger(__name__) pytestmark = [pytest.mark.clickhouse] USER_CONFIG = """ <yandex> <users> <default> <password>secret</password> <access_management>true...
41.559113
125
0.635335
""" Copyright (c) 2021 Aiven Ltd See LICENSE for details """ from astacus.client import create_client_parsers from astacus.common.ipc import Plugin from astacus.common.rohmustorage import ( RohmuCompression, RohmuCompressionType, RohmuConfig, RohmuEncryptionKey, RohmuLocalStorageConfig, RohmuStorageType ) from asta...
0
7,905
720
174
0
5,907
0
638
879
7f19103a2d52aa9ea8d844c3bc21561c35e2e2aa
1,864
py
Python
test_ytreporty.py
understood/ytreporty
1042b27430fe333d34f75e42d9a2dadfc1b7b29d
[ "Apache-2.0" ]
1
2019-07-12T20:17:29.000Z
2019-07-12T20:17:29.000Z
test_ytreporty.py
understood/ytreporty
1042b27430fe333d34f75e42d9a2dadfc1b7b29d
[ "Apache-2.0" ]
null
null
null
test_ytreporty.py
understood/ytreporty
1042b27430fe333d34f75e42d9a2dadfc1b7b29d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8; mode: Python; -*- # # 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...
34.518519
83
0.703326
# -*- coding: utf-8; mode: Python; -*- # # 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...
0
873
0
162
0
0
0
57
185
6e7557daefdab3b40588aa64b3b93cd547792503
408
py
Python
While/exercicio4.py
JoaoFelipe-AlvesOliveira/LearningPython
ecc500956a99b9b6852cd6502f928bc0ebc34dff
[ "MIT" ]
null
null
null
While/exercicio4.py
JoaoFelipe-AlvesOliveira/LearningPython
ecc500956a99b9b6852cd6502f928bc0ebc34dff
[ "MIT" ]
null
null
null
While/exercicio4.py
JoaoFelipe-AlvesOliveira/LearningPython
ecc500956a99b9b6852cd6502f928bc0ebc34dff
[ "MIT" ]
null
null
null
base= int(input("Digite o numero base da potencia")) expoente= int(input("Digite o numero expoente da potencia")) if expoente <0: print("Erro: O expoente no pode ser negativo") else: contador= 0 resultado= 1 while contador < expoente: resultado=resultado*base contad...
22.666667
60
0.605392
base= int(input("Digite o numero base da potencia")) expoente= int(input("Digite o numero expoente da potencia")) if expoente <0: print("Erro: O expoente não pode ser negativo") else: contador= 0 resultado= 1 while contador < expoente: resultado=resultado*base conta...
4
0
0
0
0
0
0
0
0
c8ff6ac093ced02a80d7192f5ab3e61cca9ed1f2
5,949
py
Python
ldsnotes/content.py
contagon/ldsnotes
46840c17bf0451221d1ffeeb772a309c4166817f
[ "MIT" ]
3
2020-12-26T17:51:53.000Z
2021-05-26T17:25:13.000Z
ldsnotes/content.py
contagon/ldsnotes
46840c17bf0451221d1ffeeb772a309c4166817f
[ "MIT" ]
5
2020-12-23T05:36:59.000Z
2021-08-24T20:25:41.000Z
ldsnotes/content.py
contagon/ldsnotes
46840c17bf0451221d1ffeeb772a309c4166817f
[ "MIT" ]
null
null
null
import html.parser import re H = html.parser.HTMLParser() CONTENT = "https://www.churchofjesuschrist.org/content/api/v2" def clean_html(text): """Takes in html code and cleans it. Note that footnotes are replaced with # for word counting later. Parameters ----------- text : string ...
36.722222
330
0.547823
import requests import html.parser import re H = html.parser.HTMLParser() CONTENT = "https://www.churchofjesuschrist.org/content/api/v2" def clean_html(text): """Takes in html code and cleans it. Note that footnotes are replaced with # for word counting later. Parameters ----------- text : s...
3
3,025
0
1,845
0
0
0
-6
45
0aa0e34273f01fed93f0df641117d59fccf2986d
1,064
py
Python
__scraping__/tripadvisor.com - selenium/main-count-reviews-on-profile.py
furas/python-code
223d8245c6a2a058031f302feaffd9a4f900110e
[ "MIT" ]
2
2015-12-12T20:14:12.000Z
2016-08-13T00:42:10.000Z
__scraping__/tripadvisor.com - selenium/main-count-reviews-on-profile.py
furas/python-code
223d8245c6a2a058031f302feaffd9a4f900110e
[ "MIT" ]
null
null
null
__scraping__/tripadvisor.com - selenium/main-count-reviews-on-profile.py
furas/python-code
223d8245c6a2a058031f302feaffd9a4f900110e
[ "MIT" ]
null
null
null
# author: Bartlomiej "furas" Burek (https://blog.furas.pl) # date: 2022.04.11 from selenium import webdriver from selenium.webdriver.common.by import By #from webdriver_manager.chrome import ChromeDriverManager from webdriver_manager.firefox import GeckoDriverManager import time url = 'https://www.tripadvisor.com/Pro...
28
100
0.730263
# author: Bartlomiej "furas" Burek (https://blog.furas.pl) # date: 2022.04.11 from selenium import webdriver from selenium.webdriver.common.by import By #from webdriver_manager.chrome import ChromeDriverManager from webdriver_manager.firefox import GeckoDriverManager import time url = 'https://www.tripadvisor.com/Pro...
0
0
0
0
0
0
0
0
0
800a7703037b4069877c76209b967e9aa1656d1b
3,369
py
Python
collect/collect08Hmdb.py
glm729/mtdtag
0f2103342c6efd5175e2638f2ae762b837620e61
[ "BSD-4-Clause" ]
null
null
null
collect/collect08Hmdb.py
glm729/mtdtag
0f2103342c6efd5175e2638f2ae762b837620e61
[ "BSD-4-Clause" ]
6
2021-03-29T04:25:34.000Z
2021-06-04T03:48:44.000Z
collect/collect08Hmdb.py
glm729/mtdtag
0f2103342c6efd5175e2638f2ae762b837620e61
[ "BSD-4-Clause" ]
2
2021-06-18T19:42:09.000Z
2021-07-22T04:48:46.000Z
#!/usr/bin/env python3 # Required imports # ----------------------------------------------------------------------------- import json import os import functools as ft import multiprocessing as mp # Function definitions # ----------------------------------------------------------------------------- # Helper to r...
26.116279
79
0.570496
#!/usr/bin/env python3 # Required imports # ----------------------------------------------------------------------------- import json import os import functools as ft import multiprocessing as mp import xmltodict as xd # Function definitions # ----------------------------------------------------------------------...
0
0
0
0
0
1,237
0
1
132
52935524fdd04ab3aad5b99a96020fa25d8790c3
3,215
py
Python
tools/test_net.py
Willy0919/Evovling_Boxes
a8543227f9e715d67dde1ffe62ee6d0400cca517
[ "BSD-3-Clause" ]
74
2017-04-07T13:18:39.000Z
2021-05-20T01:35:31.000Z
tools/test_net.py
Willy0919/Evovling_Boxes
a8543227f9e715d67dde1ffe62ee6d0400cca517
[ "BSD-3-Clause" ]
10
2017-06-22T12:54:17.000Z
2021-06-28T11:28:11.000Z
tools/test_net.py
Willy0919/Evovling_Boxes
a8543227f9e715d67dde1ffe62ee6d0400cca517
[ "BSD-3-Clause" ]
26
2017-06-02T05:54:44.000Z
2021-03-12T07:53:54.000Z
#!/usr/bin/env python import _init_paths from evb.test import test_net from evb.config import cfg, cfg_from_file, cfg_from_list from datasets.factory import get_imdb import caffe import argparse import pprint import time, os, sys def parse_args(): """ Parse input arguments """ parser = argparse.Argumen...
36.954023
90
0.597823
#!/usr/bin/env python import _init_paths from evb.test import test_net from evb.config import cfg, cfg_from_file, cfg_from_list from datasets.factory import get_imdb import caffe import argparse import pprint import time, os, sys def parse_args(): """ Parse input arguments """ parser = argparse.Argumen...
0
0
0
0
0
0
0
0
0
d5e3ef78a8e17b443f7b34fba57aac0f36943332
2,575
py
Python
tests/test_main.py
rosetechnology/xdelta3-python
04490025f5e00baf25de8e515f0dc808343e7134
[ "Apache-2.0" ]
null
null
null
tests/test_main.py
rosetechnology/xdelta3-python
04490025f5e00baf25de8e515f0dc808343e7134
[ "Apache-2.0" ]
null
null
null
tests/test_main.py
rosetechnology/xdelta3-python
04490025f5e00baf25de8e515f0dc808343e7134
[ "Apache-2.0" ]
null
null
null
value_one = b'this is a short string to test with. It is suitable for delta encoding.' value_two = b'this is a different short string to test with. It is suitable for delta encoding.' expected_delta = b'\xd6\xc3\xc4\x00\x00\x01G\x00\x14Q\x00\t\x04\x02different\x1a\n\x13>\x00\t'
31.790123
101
0.706408
import base64 import os import string from pathlib import Path import pytest import xdelta3 value_one = b'this is a short string to test with. It is suitable for delta encoding.' value_two = b'this is a different short string to test with. It is suitable for delta encoding.' expected_delta = b'\xd6\xc3\xc4\x00\x00\x...
0
0
0
0
0
2,009
0
-40
318
730f3a31c992e0bbccbfb4197f86e892800856ab
646
py
Python
libra/client.py
GiuseppeVadrucci/Libra
a12c8b4ab2e13e4a59e7bf6d7431e271c1dc03e8
[ "Apache-2.0" ]
2
2018-06-02T20:18:23.000Z
2018-06-02T20:18:27.000Z
libra/client.py
GiuseppeVadrucci/Libra
a12c8b4ab2e13e4a59e7bf6d7431e271c1dc03e8
[ "Apache-2.0" ]
null
null
null
libra/client.py
GiuseppeVadrucci/Libra
a12c8b4ab2e13e4a59e7bf6d7431e271c1dc03e8
[ "Apache-2.0" ]
null
null
null
# Echo client program # This is a simple test client PORT = 80 # The same port as used by the server
24.846154
82
0.586687
# Echo client program # This is a simple test client import socket import sys PORT = 80 # The same port as used by the server def connect(HOST): s = None for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res try: s ...
0
0
0
0
0
486
0
-19
66
aba99a8940a29f8ffdafe077123930a5ec07bdd0
4,894
py
Python
GearC/contact.py
cfernandesFEUP/Gear-Calculation
c15249c23f97e1168e3316ad5e27ed747758353a
[ "Unlicense" ]
3
2020-09-01T13:19:10.000Z
2021-12-13T13:59:00.000Z
GearC/contact.py
cfernandesFEUP/Gear-Calculation
c15249c23f97e1168e3316ad5e27ed747758353a
[ "Unlicense" ]
null
null
null
GearC/contact.py
cfernandesFEUP/Gear-Calculation
c15249c23f97e1168e3316ad5e27ed747758353a
[ "Unlicense" ]
null
null
null
## GEAR FORCES AND POWER LOSS ################################################# ## LINES OF CONTACT ########################################################### ## HERTZIAN CONTACT ###########################################################
44.899083
115
0.525337
import numpy as np ## GEAR FORCES AND POWER LOSS ################################################# def forces(torque, omega, rb, rl, alpha_tw, betab, Req, Ra, xl, miu, lxi, mu, b): Pin = np.outer(omega[0],torque[0]) fbt = 1000*torque[0]/rb[0] ft = 1000*torque[0]/rl[0] fr = fbt*np.sin(alpha_tw) fbn =...
0
0
0
0
0
4,570
0
-3
88
3561331788fba2f2c36c81638f93dfa9bf0167f9
3,252
py
Python
High-Rated-Games-on-Google-Playstore--EDA-&-Data-Preprocessing/code.py
DSOCT18/ga-learner-dsmp-repo
a5c4b13b84115a66190c344def3b30bb926a3ca5
[ "MIT" ]
null
null
null
High-Rated-Games-on-Google-Playstore--EDA-&-Data-Preprocessing/code.py
DSOCT18/ga-learner-dsmp-repo
a5c4b13b84115a66190c344def3b30bb926a3ca5
[ "MIT" ]
null
null
null
High-Rated-Games-on-Google-Playstore--EDA-&-Data-Preprocessing/code.py
DSOCT18/ga-learner-dsmp-repo
a5c4b13b84115a66190c344def3b30bb926a3ca5
[ "MIT" ]
null
null
null
# -------------- #Importing header files import pandas as pd import matplotlib.pyplot as plt import seaborn as sns data=pd.read_csv(path) #Code starts here data['Rating'].plot.hist() plt.show() data=data[data['Rating']<=5] data['Rating'].plot.hist() plt.show() #Code ends here # -------------- # code starts here to...
25.809524
144
0.713407
# -------------- #Importing header files import pandas as pd import matplotlib.pyplot as plt import seaborn as sns data=pd.read_csv(path) #Code starts here data['Rating'].plot.hist() plt.show() data=data[data['Rating']<=5] data['Rating'].plot.hist() plt.show() #Code ends here # -------------- # code starts here to...
0
0
0
0
0
0
0
14
0
1835788957303e86c385fcde03b31b03a12f7f19
2,535
py
Python
sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/117_kube_update_rootca_tables.py
albailey/config
40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9
[ "Apache-2.0" ]
10
2020-02-07T18:57:44.000Z
2021-09-11T10:29:34.000Z
sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/117_kube_update_rootca_tables.py
albailey/config
40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9
[ "Apache-2.0" ]
1
2021-01-14T12:01:55.000Z
2021-01-14T12:01:55.000Z
sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/117_kube_update_rootca_tables.py
albailey/config
40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9
[ "Apache-2.0" ]
10
2020-10-13T08:37:46.000Z
2022-02-09T00:21:25.000Z
# # Copyright (c) 2020 Intel Corporation, Inc. # # SPDX-License-Identifier: Apache-2.0 # from sqlalchemy import Column from sqlalchemy import DateTime from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import String from sqlalchemy import Table from sqlalch...
28.806818
74
0.650099
# # Copyright (c) 2020 Intel Corporation, Inc. # # SPDX-License-Identifier: Apache-2.0 # from sqlalchemy import Column from sqlalchemy import DateTime from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import String from sqlalchemy import Table from sqlalch...
0
0
0
0
0
227
0
0
23
fa1bb1adaf4391a9941c8819871b1a56b1b55821
6,157
py
Python
src/explanation/Global/SurrogateModelExplanation.py
MauroLuzzatto/algorithmic-explanations
4a362ae9576cc68ecf4b61dd6bad2105ff62bf57
[ "Apache-2.0" ]
null
null
null
src/explanation/Global/SurrogateModelExplanation.py
MauroLuzzatto/algorithmic-explanations
4a362ae9576cc68ecf4b61dd6bad2105ff62bf57
[ "Apache-2.0" ]
null
null
null
src/explanation/Global/SurrogateModelExplanation.py
MauroLuzzatto/algorithmic-explanations
4a362ae9576cc68ecf4b61dd6bad2105ff62bf57
[ "Apache-2.0" ]
null
null
null
""" Created on Tue Nov 24 21:41:40 2020 @author: mauro """ import pandas as pd if __name__ == "__main__": from sklearn.datasets import load_diabetes from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import train_test_split diabetes = load_diabetes() X_train, X_va...
30.939698
212
0.621407
""" Created on Tue Nov 24 21:41:40 2020 @author: mauro """ import os from typing import Dict import graphviz import pandas as pd from sklearn.tree import DecisionTreeRegressor from explanation.ExplanationBase import ExplanationBase from explanation.Global.SurrogatePlot import SurrogatePlot from explanation.Global.Su...
0
0
0
4,966
0
0
0
117
179
382a66090cbc637de5dba15c667706de81f23deb
6,184
py
Python
tools/fileinfo/features/hashes/test.py
stepanek-m/retdec-regression-tests
12b834b14ede2826fec451368fa8192ab00ddadf
[ "MIT" ]
null
null
null
tools/fileinfo/features/hashes/test.py
stepanek-m/retdec-regression-tests
12b834b14ede2826fec451368fa8192ab00ddadf
[ "MIT" ]
null
null
null
tools/fileinfo/features/hashes/test.py
stepanek-m/retdec-regression-tests
12b834b14ede2826fec451368fa8192ab00ddadf
[ "MIT" ]
null
null
null
# https://github.com/avast-tl/retdec/issues/246 # Test for ordinals that are translated by YARA/pefile LUT. # https://github.com/avast-tl/retdec/issues/246 # Test for ordinals that are NOT translated by YARA/pefile LUT. # https://github.com/avast-tl/retdec/issues/121 # Test export hashes for PE format # https://g...
44.489209
157
0.717497
from regression_tests import * class TestAllHashes(Test): settings = TestSettings( tool='fileinfo', input='input.ex', args='--verbose --json' ) def test_correctly_analyzes_input_file(self): assert self.fileinfo.succeeded self.assertEqual(self.fileinfo.output['impor...
0
0
0
5,463
0
0
0
9
200
1fa5faf6bbace23e616e3ce02efd35eb93ca8bca
5,750
py
Python
strange_case/support/jinja.py
colinta/StrangeCase
822634d986020bc35d49f5355ec4823690372cd5
[ "BSD-2-Clause-FreeBSD" ]
10
2015-11-05T01:38:29.000Z
2021-06-09T06:35:27.000Z
strange_case/support/jinja.py
colinta/StrangeCase
822634d986020bc35d49f5355ec4823690372cd5
[ "BSD-2-Clause-FreeBSD" ]
9
2019-07-17T15:21:43.000Z
2021-09-08T01:08:00.000Z
strange_case/support/jinja.py
colinta/StrangeCase
822634d986020bc35d49f5355ec4823690372cd5
[ "BSD-2-Clause-FreeBSD" ]
2
2016-06-01T01:51:22.000Z
2017-03-16T00:11:39.000Z
""" Jinja support adds the following abilities: 1. Adds a ``YamlFrontMatterLoader``, which searchs the beginning of the file for YAML between two lines of an equal number of three or more dashes. These lines are stripped off before rendering. 2. Jinja has nice support for displaying errors, but the YAML front m...
38.333333
107
0.654957
""" Jinja support adds the following abilities: 1. Adds a ``YamlFrontMatterLoader``, which searchs the beginning of the file for YAML between two lines of an equal number of three or more dashes. These lines are stripped off before rendering. 2. Jinja has nice support for displaying errors, but the YAML front m...
0
1,468
0
2,653
0
0
0
41
158
47d85faea5c883a5e1d6fa08edc7df5a87431f15
975
py
Python
plots/histogram_by_vars.py
carolmb/viewing-profiles-of-scientific-articles
6a9248ea0dc458488b7f1556f358692529d2faf6
[ "Unlicense" ]
null
null
null
plots/histogram_by_vars.py
carolmb/viewing-profiles-of-scientific-articles
6a9248ea0dc458488b7f1556f358692529d2faf6
[ "Unlicense" ]
null
null
null
plots/histogram_by_vars.py
carolmb/viewing-profiles-of-scientific-articles
6a9248ea0dc458488b7f1556f358692529d2faf6
[ "Unlicense" ]
null
null
null
import matplotlib.pyplot as plt from read_file import select_original_breakpoints from collections import defaultdict if __name__ == '__main__': N = 5 slopes, intervals = select_original_breakpoints(N, 'segm/segmented_curves_filtered.txt') slopes_hist = defaultdict(lambda: []) intervals_hist = defaul...
30.46875
92
0.630769
import matplotlib.pyplot as plt from read_file import select_original_breakpoints from collections import defaultdict if __name__ == '__main__': N = 5 slopes, intervals = select_original_breakpoints(N, 'segm/segmented_curves_filtered.txt') slopes_hist = defaultdict(lambda: []) intervals_hist = defaul...
0
0
0
0
0
0
0
0
0
4718604bd73bed2d3cac8b729d35b99f89e7762c
1,127
py
Python
helper.py
ai-xiaotong/face-benchmark
4a4a336be6df72699120d6f0a4b7160904375cb0
[ "MIT" ]
1
2020-04-20T02:19:54.000Z
2020-04-20T02:19:54.000Z
helper.py
ai-xiaotong/face-benchmark
4a4a336be6df72699120d6f0a4b7160904375cb0
[ "MIT" ]
null
null
null
helper.py
ai-xiaotong/face-benchmark
4a4a336be6df72699120d6f0a4b7160904375cb0
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*-
29.657895
77
0.580302
# -*- coding:utf-8 -*- import base64 import numpy as np def b64encode_image(path): with open(path, 'rb') as f: return base64.b64encode(f.read()) def roc(gts, scores, start=0.10, stop=0.60, step=0.001): FARs, TARs, THs = [], [], [] for TH in np.arange(start, stop, step): # FA, FN, TA, TN ...
0
0
0
0
0
1,000
0
-11
113
df701f2d105b1708eb401f9c85266218d6c91b8a
3,082
py
Python
myprodigy/filters.py
acdh-oeaw/nerdpool
fd03148797e13fb815164da5a6f9a8f27a873cbd
[ "MIT" ]
null
null
null
myprodigy/filters.py
acdh-oeaw/nerdpool
fd03148797e13fb815164da5a6f9a8f27a873cbd
[ "MIT" ]
3
2021-03-30T09:41:55.000Z
2021-06-10T07:52:29.000Z
myprodigy/filters.py
acdh-oeaw/nerdpool
fd03148797e13fb815164da5a6f9a8f27a873cbd
[ "MIT" ]
null
null
null
# generated by appcreator
30.514851
74
0.623621
# generated by appcreator import django_filters from django import forms from dal import autocomplete from vocabs.filters import generous_concept_filter from vocabs.models import SkosConcept from .models import ( NerDataSet, NerSample, Dataset, Example, ProdigyServer) class NerDataSetListFilter(...
0
0
0
2,721
0
0
0
131
203
996e98649bd1c0fcdd10a1cf00a85529b17d2699
8,683
py
Python
quantus/helpers/asserts.py
sebastian-lapuschkin/Quantus
c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f
[ "MIT" ]
null
null
null
quantus/helpers/asserts.py
sebastian-lapuschkin/Quantus
c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f
[ "MIT" ]
null
null
null
quantus/helpers/asserts.py
sebastian-lapuschkin/Quantus
c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f
[ "MIT" ]
null
null
null
import numpy as np from typing import Tuple def assert_model_predictions_deviations( y_pred: float, y_pred_perturb: float, threshold: float = 0.01 ): """Check that model predictions does not deviate more than a given threshold.""" if abs(y_pred - y_pred_perturb) > threshold: return True else:...
37.266094
116
0.636186
import numpy as np from typing import Callable, Tuple, Union def attributes_check(metric): # https://towardsdatascience.com/5-ways-to-control-attributes-in-python-an-example-led-guide-2f5c9b8b1fb0 attr = metric.__dict__ if "perturb_func" in attr: if not callable(attr["perturb_func"]): ...
0
0
0
0
0
2,050
0
17
138
3fc3e9f3b2734409dcca83f3085ff6d769cb2068
932
py
Python
tupianpaqu.py
smithgoo/python3Learn
d0c066c10887db3942ca285b86ce464463998aad
[ "MIT" ]
1
2019-05-30T08:08:34.000Z
2019-05-30T08:08:34.000Z
tupianpaqu.py
smithgoo/python3Learn
d0c066c10887db3942ca285b86ce464463998aad
[ "MIT" ]
null
null
null
tupianpaqu.py
smithgoo/python3Learn
d0c066c10887db3942ca285b86ce464463998aad
[ "MIT" ]
null
null
null
import re import urllib headers ={"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1","Referer": "http://fanyi.baidu.com/translate?aldtype=16047&query=&keyfrom=baidu&smartresult=dict&lang=auto2zh"} url ='http://www.mei...
24.526316
273
0.671674
import requests import re import urllib from lxml import etree from bs4 import BeautifulSoup headers ={"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1","Referer": "http://fanyi.baidu.com/translate?aldtype=16047&quer...
0
0
0
0
0
0
0
4
66
73ce7ef8ed248550dfab3bc0f0a69940c43f962b
1,083
py
Python
cuenca/resources/sessions.py
andreshndz/cuenca-python
ca9f0f078584f1458e71baeb4cd15fcc55b40397
[ "MIT" ]
null
null
null
cuenca/resources/sessions.py
andreshndz/cuenca-python
ca9f0f078584f1458e71baeb4cd15fcc55b40397
[ "MIT" ]
null
null
null
cuenca/resources/sessions.py
andreshndz/cuenca-python
ca9f0f078584f1458e71baeb4cd15fcc55b40397
[ "MIT" ]
null
null
null
from .. import http
25.785714
74
0.660203
import datetime as dt from typing import ClassVar, Optional, cast from cuenca_validations.types import SessionRequest, SessionType from pydantic import AnyUrl from pydantic.dataclasses import dataclass from .. import http from .base import Creatable, Queryable, Retrievable @dataclass class Session(Creatable, Retrie...
0
783
0
0
0
0
0
122
156
8269437bef9cc43ad86c3a68364cb0485afec37e
7,132
py
Python
statsd_rabbitmq/utils.py
fake-name/statsd-rabbitmq
2d6193862551085654f4e6a3b600e5dd6f86d37c
[ "Apache-2.0" ]
null
null
null
statsd_rabbitmq/utils.py
fake-name/statsd-rabbitmq
2d6193862551085654f4e6a3b600e5dd6f86d37c
[ "Apache-2.0" ]
null
null
null
statsd_rabbitmq/utils.py
fake-name/statsd-rabbitmq
2d6193862551085654f4e6a3b600e5dd6f86d37c
[ "Apache-2.0" ]
null
null
null
# -*- coding: iso-8859-15 -*- # Copyright (c) 2014 The New York Times Company # # 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 re...
31.982063
119
0.581884
# -*- coding: iso-8859-15 -*- # Copyright (c) 2014 The New York Times Company # # 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 re...
0
398
0
3,063
0
0
0
0
137
400eaf28ca8f72e61fb7e5a13a81f9035fb62aca
3,051
py
Python
candidate_matching/benchmarks/CML/main.py
jimzhu/OpenCTR-benchmarks
e8e723cd7a0ef5ddd40e735b85ce7669955a3a99
[ "Apache-2.0" ]
59
2021-10-31T13:59:37.000Z
2022-03-31T12:05:55.000Z
candidate_matching/benchmarks/CML/main.py
jimzhu/OpenCTR-benchmarks
e8e723cd7a0ef5ddd40e735b85ce7669955a3a99
[ "Apache-2.0" ]
5
2021-12-06T12:11:21.000Z
2022-03-18T06:21:13.000Z
candidate_matching/benchmarks/CML/main.py
jimzhu/OpenCTR-benchmarks
e8e723cd7a0ef5ddd40e735b85ce7669955a3a99
[ "Apache-2.0" ]
17
2021-10-21T10:44:09.000Z
2022-03-24T11:35:09.000Z
import sys sys.path.append("../../external/CollMetric/") import numpy as np import tensorflow as tf import os from datetime import datetime from sampler import WarpSampler from CML_utils import Monitor, parse_args, dataset_to_uimatrix from CML import CML, optimize if __name__ == '__main__': args = parse_args() ...
44.867647
116
0.639135
import sys sys.path.append("../../external/CollMetric/") import numpy as np import tensorflow as tf import os from datetime import datetime from sampler import WarpSampler from CML_utils import Evaluator, Monitor, parse_args, dataset_to_uimatrix from CML import CML, optimize if __name__ == '__main__': args = pars...
0
0
0
0
0
0
0
11
0
04747478c722ad5dd0a34299f99bd45a70b0f364
404
py
Python
Barras.py
ByronEncinas/Aprendo-Python
4ab3fa6593ec75ce52139235014b53ff1c77f775
[ "CC0-1.0" ]
null
null
null
Barras.py
ByronEncinas/Aprendo-Python
4ab3fa6593ec75ce52139235014b53ff1c77f775
[ "CC0-1.0" ]
null
null
null
Barras.py
ByronEncinas/Aprendo-Python
4ab3fa6593ec75ce52139235014b53ff1c77f775
[ "CC0-1.0" ]
null
null
null
import matplotlib.pyplot as plt x = [1,2,3] y = [1,2,1] yerrormin = [0.1,0.5,0.9] yerrormax = [0.2,0.4,0.6] xerror = 0.5 yerror = [yerrormin, yerrormax] plt.plot(x,y,'o') plt.errorbar(x,y,yerr=yerror, xerr=xerror, fmt='o', ecolor='black',elinewidth=2, capsize=5,capthick=2, barsabove=False, errorevery=1, lolims=False...
25.25
216
0.670792
import matplotlib.pyplot as plt x = [1,2,3] y = [1,2,1] yerrormin = [0.1,0.5,0.9] yerrormax = [0.2,0.4,0.6] xerror = 0.5 yerror = [yerrormin, yerrormax] plt.plot(x,y,'o') plt.errorbar(x,y,yerr=yerror, xerr=xerror, fmt='o', ecolor='black',elinewidth=2, capsize=5,capthick=2, barsabove=False, errorevery=1, lolims=False...
0
0
0
0
0
0
0
0
0
6ecb57ef2a041c906a4a4705f0dce689c201b5c0
973
py
Python
examples/capture_average.py
shiqi1994/EasyPySpin
4b44745dfbf06a9790f166137de03a95a1ff7f62
[ "MIT" ]
47
2019-12-03T14:01:16.000Z
2022-03-19T13:07:09.000Z
examples/capture_average.py
shiqi1994/EasyPySpin
4b44745dfbf06a9790f166137de03a95a1ff7f62
[ "MIT" ]
6
2020-03-31T07:28:49.000Z
2021-10-06T00:14:40.000Z
examples/capture_average.py
shiqi1994/EasyPySpin
4b44745dfbf06a9790f166137de03a95a1ff7f62
[ "MIT" ]
10
2020-04-29T08:58:55.000Z
2022-03-17T10:48:33.000Z
""" Example of capturing the average image width VideoCaptureEX class. The averaged image can reduce random noise. """ if __name__ == "__main__": main()
23.731707
66
0.567318
""" Example of capturing the average image width VideoCaptureEX class. The averaged image can reduce random noise. """ import EasyPySpin import cv2 def main(): cap = EasyPySpin.VideoCaptureEX(0) cap.average_num = 3 print("Press key to change average number") print("k : average_num += 1") print("j...
0
0
0
0
0
761
0
-15
67
49bd0217dfbd28b4282b652b446ae18299b6f397
2,036
py
Python
ovn_octavia_provider/common/utils.py
wpexia/ovn-octavia-provider
e9bf916b928005ee232a637e5e49d829cc84f074
[ "Apache-2.0" ]
5
2020-02-24T13:25:50.000Z
2021-11-20T11:33:02.000Z
ovn_octavia_provider/common/utils.py
openstack/ovn-octavia-provider
f257fc1a2411c22c07b6cf5b53fc86e5c8449b69
[ "Apache-2.0" ]
null
null
null
ovn_octavia_provider/common/utils.py
openstack/ovn-octavia-provider
f257fc1a2411c22c07b6cf5b53fc86e5c8449b69
[ "Apache-2.0" ]
1
2021-11-29T14:18:33.000Z
2021-11-29T14:18:33.000Z
# 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, software # d...
39.153846
79
0.680747
# 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, software # d...
0
0
0
0
0
754
0
28
69
38fb100fd5469fdaa8ba317319958d95e5d35297
220
py
Python
09_07_pr_03.py
Madhav2204/Python-vs-code
6b845573f6e9f77cccf8f67913ad4de05da6593c
[ "Apache-2.0" ]
null
null
null
09_07_pr_03.py
Madhav2204/Python-vs-code
6b845573f6e9f77cccf8f67913ad4de05da6593c
[ "Apache-2.0" ]
null
null
null
09_07_pr_03.py
Madhav2204/Python-vs-code
6b845573f6e9f77cccf8f67913ad4de05da6593c
[ "Apache-2.0" ]
null
null
null
for i in range(2, 21): with open(f"tables/Multiplication_table_of_{i}.txt", 'w') as f: for j in range(1, 11): f.write(f"{i}X{j}={i*j}") if j!=10: f.write('\n')
27.5
68
0.45
for i in range(2, 21): with open(f"tables/Multiplication_table_of_{i}.txt", 'w') as f: for j in range(1, 11): f.write(f"{i}X{j}={i*j}") if j!=10: f.write('\n')
0
0
0
0
0
0
0
0
0
7b0cad841a7189c7e9e46e0d48da08f50ba54688
3,675
py
Python
agent/ip_traffic.py
irtlab/netmon
e85d342dd6b228db61cfffb20425f7e10f7f4d11
[ "MIT" ]
null
null
null
agent/ip_traffic.py
irtlab/netmon
e85d342dd6b228db61cfffb20425f7e10f7f4d11
[ "MIT" ]
2
2021-10-10T18:53:56.000Z
2021-10-10T18:57:55.000Z
agent/ip_traffic.py
irtlab/netmon
e85d342dd6b228db61cfffb20425f7e10f7f4d11
[ "MIT" ]
null
null
null
""" Module Name: ip_traffic.py Description: Module provides functionality to monitor IP traffic. Authors: Columbia University, the Internet Real-Time Lab (IRT Lab). 2018-2019. """ import random from scapy.all import sniff from datetime import datetime def run_ip_traffic_monitor(db_connection, net_interf...
31.956522
138
0.690884
""" Module Name: ip_traffic.py Description: Module provides functionality to monitor IP traffic. Authors: Columbia University, the Internet Real-Time Lab (IRT Lab). 2018-2019. """ import random import db import utils from scapy.all import sniff from datetime import datetime def run_ip_traffic_monitor(d...
0
0
0
0
0
1,380
0
-21
69
45506584e6b50e487886121cf454285748787970
8,378
py
Python
iota_dust_manager/__init__.py
F-Node-Karlsruhe/iota-dust-manager
b84d89583536bd2e7408d7963468c29a02a36351
[ "MIT" ]
null
null
null
iota_dust_manager/__init__.py
F-Node-Karlsruhe/iota-dust-manager
b84d89583536bd2e7408d7963468c29a02a36351
[ "MIT" ]
null
null
null
iota_dust_manager/__init__.py
F-Node-Karlsruhe/iota-dust-manager
b84d89583536bd2e7408d7963468c29a02a36351
[ "MIT" ]
null
null
null
""" iota-dust-manager A thread safe, stateless python package that manages your receiving dust address. """ __version__ = "0.1.5" __author__ = 'F-Node-Karlsruhe' IOTA_DUST = 1_000_000 IOTA_PER_DUST_TRANSACTION = 100_000
33.782258
128
0.602769
""" iota-dust-manager A thread safe, stateless python package that manages your receiving dust address. """ __version__ = "0.1.5" __author__ = 'F-Node-Karlsruhe' import iota_client import threading IOTA_DUST = 1_000_000 IOTA_PER_DUST_TRANSACTION = 100_000 class DustManager: """Create a DustManager. :par...
0
0
0
8,092
0
0
0
-8
68
891266c2049e537dbf28b17dc4743d6e9dcd1619
63
py
Python
problem/10000~19999/16204/16204.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-19T16:37:44.000Z
2019-04-19T16:37:44.000Z
problem/10000~19999/16204/16204.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-20T11:42:44.000Z
2019-04-20T11:42:44.000Z
problem/10000~19999/16204/16204.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
3
2019-04-19T16:37:47.000Z
2021-10-25T00:45:00.000Z
n,m,k=map(int,input().split()) a=min(m,k)+min(n-m,n-k) print(a)
21
30
0.603175
n,m,k=map(int,input().split()) a=min(m,k)+min(n-m,n-k) print(a)
0
0
0
0
0
0
0
0
0
e3d1fbc0b4b3c9b4f0fa5d33b7fa14433aaefb99
28
py
Python
reports/__init__.py
OdooTestNet/School-Mangement
3c613a2ecdb88965d847acd294e70a875f5af5e2
[ "Unlicense" ]
null
null
null
reports/__init__.py
OdooTestNet/School-Mangement
3c613a2ecdb88965d847acd294e70a875f5af5e2
[ "Unlicense" ]
null
null
null
reports/__init__.py
OdooTestNet/School-Mangement
3c613a2ecdb88965d847acd294e70a875f5af5e2
[ "Unlicense" ]
null
null
null
# from.import invoice_report
28
28
0.857143
# from.import invoice_report
0
0
0
0
0
0
0
0
0
94a5bb68f3af932c62cbeb6c6ef25fd7ad126819
3,956
py
Python
edapy/utils.py
Arc-rendezvous/edapy
a6d4b61dd97d320586afbc4fc51ed4ad112b453b
[ "Apache-2.0" ]
1
2021-06-16T04:12:27.000Z
2021-06-16T04:12:27.000Z
edapy/utils.py
Arc-rendezvous/edapy
a6d4b61dd97d320586afbc4fc51ed4ad112b453b
[ "Apache-2.0" ]
null
null
null
edapy/utils.py
Arc-rendezvous/edapy
a6d4b61dd97d320586afbc4fc51ed4ad112b453b
[ "Apache-2.0" ]
null
null
null
import numpy as np import pandas as pd def lookup_date(s): """ This is an extremely fast approach to datetime parsing. For large data, the same dates are often repeated. Rather than re-parse these, we store all unique dates, parse them, and use a lookup to convert all dates. Example: df['dat...
28.257143
81
0.471436
import numpy as np import pandas as pd def batch(l, b=1, n=None): """ Create batch from iterable. Parameters ---------- l : list list to create batches from b : int, optional, [default = 1] batch size n : int, optional, [default = None] if None: len(batches[-1]) < ...
0
0
0
0
1,288
1,503
0
0
69
258f55403b2af51184eef7df2d5ca098459ebf9d
15,020
py
Python
gluonnlp/data/stream.py
indhub/gluon-nlp
15b1acfa3e126805b742770a73141b4ebdec0c10
[ "Apache-2.0" ]
null
null
null
gluonnlp/data/stream.py
indhub/gluon-nlp
15b1acfa3e126805b742770a73141b4ebdec0c10
[ "Apache-2.0" ]
null
null
null
gluonnlp/data/stream.py
indhub/gluon-nlp
15b1acfa3e126805b742770a73141b4ebdec0c10
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License...
42.191011
100
0.621505
# coding: utf-8 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License...
0
0
0
13,609
0
0
0
25
272
f338190f82c8bacc5a16386a0b00eed7292b055a
1,686
py
Python
services_portal_site/middleware.py
cedadev/ceda-services-portal
5c9637a598018f73fce05640e596b5ece3250382
[ "BSD-3-Clause" ]
null
null
null
services_portal_site/middleware.py
cedadev/ceda-services-portal
5c9637a598018f73fce05640e596b5ece3250382
[ "BSD-3-Clause" ]
38
2021-01-21T14:36:09.000Z
2022-03-21T12:38:44.000Z
services_portal_site/middleware.py
cedadev/ceda-services-portal
5c9637a598018f73fce05640e596b5ece3250382
[ "BSD-3-Clause" ]
null
null
null
''' Created on Oct 11, 2017 @author: William Tucker ''' import logging logger = logging.getLogger(__name__)
27.193548
79
0.596679
''' Created on Oct 11, 2017 @author: William Tucker ''' import logging from django.conf import settings from django.contrib.auth import logout, login, get_user_model logger = logging.getLogger(__name__) class LoginMiddleware(): """ Middleware that checks for a valid login in the request and logs the ...
0
0
0
1,454
0
0
0
51
68
eb6bd83eb366077f5703c83ef5e921b864665245
252
py
Python
model/case/__init__.py
waaaaaaz/TestRelay2
220d85fb0f53e468c5216336147609d5337cfb1c
[ "MIT" ]
null
null
null
model/case/__init__.py
waaaaaaz/TestRelay2
220d85fb0f53e468c5216336147609d5337cfb1c
[ "MIT" ]
1
2021-06-02T02:40:03.000Z
2021-06-02T02:40:03.000Z
model/case/__init__.py
waaaaaaz/TestRelay2
220d85fb0f53e468c5216336147609d5337cfb1c
[ "MIT" ]
null
null
null
# coding: utf-8
42
60
0.865079
# coding: utf-8 from sqkb_api_testing.model.case.http_case import HttpCase from sqkb_api_testing.model.case.mysql_case import MySQLCase from sqkb_api_testing.model.case.rpc_case import RPCCase from sqkb_api_testing.model.case.wait_case import WaitCase
0
0
0
0
0
0
0
148
89
3d752da8179f9983b0c606bd89594a3cf8544e1c
4,610
py
Python
ctt-server/plugins/jmeter.py
pjakovits/radon-ctt
8c73e05a83ef66bd6e9dba6608d2bee089df7e86
[ "Apache-2.0" ]
null
null
null
ctt-server/plugins/jmeter.py
pjakovits/radon-ctt
8c73e05a83ef66bd6e9dba6608d2bee089df7e86
[ "Apache-2.0" ]
null
null
null
ctt-server/plugins/jmeter.py
pjakovits/radon-ctt
8c73e05a83ef66bd6e9dba6608d2bee089df7e86
[ "Apache-2.0" ]
null
null
null
name = 'JMeter' plugin_name = 'jmeter' plugin_type = 'radon.policies.testing.JMeterLoadTest' """ 'SimpleJMeterLoadTest': { 'type': 'radon.policies.testing.JMeterLoadTest', 'properties': { 'jmx_file': 'sockshop.jmx', 'hostname': 'localhost', 'port': 8080, 'ti_blueprint': 'radon....
41.531532
119
0.680043
import os import requests import shutil import tempfile from zipfile import ZipFile, ZIP_DEFLATED from flask import current_app name = 'JMeter' plugin_name = 'jmeter' plugin_type = 'radon.policies.testing.JMeterLoadTest' """ 'SimpleJMeterLoadTest': { 'type': 'radon.policies.testing.JMeterLoadTest', 'properti...
0
0
0
0
0
3,942
0
-4
202
dfe5fdb549f6913a6b90b0e9c398de0445d239a1
2,418
py
Python
built_ins/xml_bins.py
chainren/python-learn
5e48e96c4bb212806b9ae0954fdb368abdcf9ba3
[ "Apache-2.0" ]
null
null
null
built_ins/xml_bins.py
chainren/python-learn
5e48e96c4bb212806b9ae0954fdb368abdcf9ba3
[ "Apache-2.0" ]
16
2020-02-12T03:09:30.000Z
2022-03-12T00:08:59.000Z
built_ins/xml_bins.py
chainren/python-learn
5e48e96c4bb212806b9ae0954fdb368abdcf9ba3
[ "Apache-2.0" ]
null
null
null
# -- coding: utf-8 -- # xml dom sax from xml.parsers.expat import ParserCreate xml = r'''<?xml version="1.0"?> <ol> <li><a href="/python">Python</a></li> <li><a href="/ruby">Ruby</a></li> </ol> ''' handler = DefaultSaxHandler() parser = ParserCreate() parser.StartElementHandler = handler.start_element parse...
23.475728
134
0.607527
# -- coding: utf-8 -- # xml解析 dom sax from xml.parsers.expat import ParserCreate from urllib import request class DefaultSaxHandler(object): def start_element(self, name, attrs): print('sax:start_element:%s, attrs:%s' %(name, attrs)) def end_element(self, name): print('sax:end_element:%s' % ...
102
0
0
1,643
0
0
0
5
91
879fbfb71879d697b60e7abf15683720ef573ef0
3,213
py
Python
src/hypertrace/agent/instrumentation/instrumentation_definitions.py
hypertrace/pythonagent
283e18c61807f4ae653d147be9ff1424b0b0a6eb
[ "Apache-2.0" ]
4
2021-05-19T16:16:26.000Z
2022-01-16T04:48:43.000Z
src/hypertrace/agent/instrumentation/instrumentation_definitions.py
hypertrace/pythonagent
283e18c61807f4ae653d147be9ff1424b0b0a6eb
[ "Apache-2.0" ]
48
2021-04-27T07:25:48.000Z
2021-08-30T21:27:27.000Z
src/hypertrace/agent/instrumentation/instrumentation_definitions.py
hypertrace/pythonagent
283e18c61807f4ae653d147be9ff1424b0b0a6eb
[ "Apache-2.0" ]
null
null
null
'''this module acts as a driver for instrumentation definitions + application''' import logging FLASK_KEY = 'flask' DJANGO_KEY = 'django' GRPC_SERVER_KEY = 'grpc:server' GRPC_CLIENT_KEY = 'grpc:client' POSTGRESQL_KEY = 'postgresql' MYSQL_KEY = 'mysql' REQUESTS_KEY = 'requests' AIOHTTP_CLIENT_KEY = 'aiohttp:client' SU...
43.418919
119
0.746343
'''this module acts as a driver for instrumentation definitions + application''' import logging FLASK_KEY = 'flask' DJANGO_KEY = 'django' GRPC_SERVER_KEY = 'grpc:server' GRPC_CLIENT_KEY = 'grpc:client' POSTGRESQL_KEY = 'postgresql' MYSQL_KEY = 'mysql' REQUESTS_KEY = 'requests' AIOHTTP_CLIENT_KEY = 'aiohttp:client' SU...
0
0
0
0
0
0
0
0
0
f4593a136b97d74fec18e88bcca01b09dbeef96e
4,370
py
Python
opaal/opaal/distributed/termination_detection.py
sen-uni-kn/tartar
5148f8737ab39c09aa0ca4907b1af7c44cf8b8a0
[ "MIT" ]
null
null
null
opaal/opaal/distributed/termination_detection.py
sen-uni-kn/tartar
5148f8737ab39c09aa0ca4907b1af7c44cf8b8a0
[ "MIT" ]
null
null
null
opaal/opaal/distributed/termination_detection.py
sen-uni-kn/tartar
5148f8737ab39c09aa0ca4907b1af7c44cf8b8a0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2010 Mads Chr. Olesen <mchro@cs.aau.dk> #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3, as published #by the Free Software Foundation. # #This program is distributed in the ...
38.672566
127
0.670023
# -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2010 Mads Chr. Olesen <mchro@cs.aau.dk> #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3, as published #by the Free Software Foundation. # #This program is distributed in the ...
0
0
0
3,417
0
0
0
-4
68
525113a09e66f512f8fe22c9ef30a7225bfb764d
2,144
py
Python
alarmClock/windows/newAlarm.py
Eric-The-Read/alarmClock
70623cac3f13de48c5eeeb8ed6264ad3a8d49f4e
[ "MIT" ]
null
null
null
alarmClock/windows/newAlarm.py
Eric-The-Read/alarmClock
70623cac3f13de48c5eeeb8ed6264ad3a8d49f4e
[ "MIT" ]
null
null
null
alarmClock/windows/newAlarm.py
Eric-The-Read/alarmClock
70623cac3f13de48c5eeeb8ed6264ad3a8d49f4e
[ "MIT" ]
null
null
null
import PySimpleGUI as sg from alarmClock.clock import Clock from alarmClock.settings import dayList, hourList, minuteList, periodList, clocks def newAlarm(): '''Opens window to create a new alarm, and select days in which alarm plays.''' layout = [ [ sg.Combo(hourList, size=(3, 1), key="-H...
42.039216
134
0.507463
import PySimpleGUI as sg from alarmClock.clock import Clock from alarmClock.settings import dayList, hourList, minuteList, periodList, clocks def newAlarm(): '''Opens window to create a new alarm, and select days in which alarm plays.''' layout = [ [ sg.Combo(hourList, size=(3, 1), key="-H...
0
0
0
0
0
0
0
0
0