hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
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
125
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
125
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.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
1ed1ad90bbb7f458daba222ac3b8b2de75201045
3,271
py
Python
plotta/__init__.py
gzuidhof/plotta-python
61ec22c11c24e599486aedbeabb4d13ca62c6918
[ "MIT" ]
null
null
null
plotta/__init__.py
gzuidhof/plotta-python
61ec22c11c24e599486aedbeabb4d13ca62c6918
[ "MIT" ]
null
null
null
plotta/__init__.py
gzuidhof/plotta-python
61ec22c11c24e599486aedbeabb4d13ca62c6918
[ "MIT" ]
null
null
null
import unirest import time import socket import uuid HOSTNAME = 'localhost' PORT = 3000 PLOTTA_ENABLED = True # API endpoint wrappers
31.757282
109
0.636197
import unirest import time import socket import uuid HOSTNAME = 'localhost' PORT = 3000 PLOTTA_ENABLED = True # API endpoint wrappers def job_new(job_id, name, node): payload = {'job_id': job_id, 'name': name, 'node': node} url = "http://{0}:{1}/api/job/new".format(HOSTNAME, PORT) return sync_request(url,...
2,732
-15
418
257430f2566bf7abcdadbc27fbcfb4ceab9cd18c
1,051
py
Python
Train_and_Test_Notebooks/tests/IoU.py
parshwa1999/Map-Segmentation
0c45c887fb2363125771bccafc27a953ad05ce5a
[ "MIT" ]
5
2020-03-23T18:43:00.000Z
2021-12-14T09:52:12.000Z
Train_and_Test_Notebooks/tests/IoU.py
parshwa1999/Map-Segmentation
0c45c887fb2363125771bccafc27a953ad05ce5a
[ "MIT" ]
null
null
null
Train_and_Test_Notebooks/tests/IoU.py
parshwa1999/Map-Segmentation
0c45c887fb2363125771bccafc27a953ad05ce5a
[ "MIT" ]
1
2020-09-08T12:34:39.000Z
2020-09-08T12:34:39.000Z
import cv2 import numpy as np total = 0 for i in range(29): original = cv2.imread(str(i) + "GroundTruth.png", 0) predicted = cv2.imread(str(i) + "Prediction_Threshold.png", 0) #print(np.shape(original)) original = original.flatten() predicted = predicted.flatten() original = (original>127) ...
25.634146
99
0.573739
import cv2 import numpy as np total = 0 for i in range(29): original = cv2.imread(str(i) + "GroundTruth.png", 0) predicted = cv2.imread(str(i) + "Prediction_Threshold.png", 0) #print(np.shape(original)) original = original.flatten() predicted = predicted.flatten() original = (original>127) ...
0
0
0
294464d47e73dcdf833d00d706cd3d6297463a47
1,488
py
Python
Block.py
LiorArmon/Python-Hackathon
075056d8476c6144b2eaa826ff623cf828385c73
[ "Apache-2.0" ]
null
null
null
Block.py
LiorArmon/Python-Hackathon
075056d8476c6144b2eaa826ff623cf828385c73
[ "Apache-2.0" ]
null
null
null
Block.py
LiorArmon/Python-Hackathon
075056d8476c6144b2eaa826ff623cf828385c73
[ "Apache-2.0" ]
2
2018-06-26T08:40:17.000Z
2018-06-27T06:17:55.000Z
import psychopy.core import psychopy.event import psychopy.visual import pandas as pd import numpy as np import psychopy.gui import psychopy.sound import os import yaml import json from pathlib import Path import random from Trial import Trial
29.76
119
0.597446
import psychopy.core import psychopy.event import psychopy.visual import pandas as pd import numpy as np import psychopy.gui import psychopy.sound import os import yaml import json from pathlib import Path import random from Trial import Trial class Block: def __init__(self, stim_list, df, params, win, cue): ...
1,147
-9
107
e1d5805eabcda488c36ca76271466031cb90112e
17,757
py
Python
rak811/cli.py
hrnciar/pyrak811
e62be1c7524224105984531abc8b9bda02a61e26
[ "Apache-2.0" ]
45
2019-04-23T03:36:07.000Z
2022-03-23T06:05:46.000Z
rak811/cli.py
hrnciar/pyrak811
e62be1c7524224105984531abc8b9bda02a61e26
[ "Apache-2.0" ]
24
2019-05-21T17:18:31.000Z
2022-03-01T11:18:22.000Z
rak811/cli.py
hrnciar/pyrak811
e62be1c7524224105984531abc8b9bda02a61e26
[ "Apache-2.0" ]
25
2019-03-11T14:25:26.000Z
2022-03-04T15:05:28.000Z
"""RAK811 CLI interface. Provides a command line interface for the RAK811 module (Firmware V2.0). Copyright 2019, 2021 Philippe Vanhaesendonck 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 ...
25.772134
79
0.587599
"""RAK811 CLI interface. Provides a command line interface for the RAK811 module (Firmware V2.0). Copyright 2019, 2021 Philippe Vanhaesendonck 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 ...
941
0
54
a54e466881c321eed881e10830f98325604d6d17
16,728
py
Python
code-postprocessing/cocopp/testbedsettings.py
asmaatamna/coco
4b1497a0e6d4de4a0dd75e03779d6c5349fa21ae
[ "BSD-3-Clause" ]
2
2021-02-15T17:09:24.000Z
2021-12-28T09:23:01.000Z
code-postprocessing/cocopp/testbedsettings.py
patsp/coco
4b1497a0e6d4de4a0dd75e03779d6c5349fa21ae
[ "BSD-3-Clause" ]
null
null
null
code-postprocessing/cocopp/testbedsettings.py
patsp/coco
4b1497a0e6d4de4a0dd75e03779d6c5349fa21ae
[ "BSD-3-Clause" ]
null
null
null
import os import numpy as np import warnings from . import genericsettings scenario_rlbased = 'rlbased' scenario_fixed = 'fixed' scenario_biobjfixed = 'biobjfixed' scenario_biobjrlbased = 'biobjrlbased' scenario_biobjextfixed = 'biobjextfixed' all_scenarios = [scenario_rlbased, scenario_fixed, scenar...
45.830137
175
0.663857
import os import numpy as np import warnings from . import genericsettings scenario_rlbased = 'rlbased' scenario_fixed = 'fixed' scenario_biobjfixed = 'biobjfixed' scenario_biobjrlbased = 'biobjrlbased' scenario_biobjextfixed = 'biobjextfixed' all_scenarios = [scenario_rlbased, scenario_fixed, scenar...
5,994
0
269
d05bdb90e6a92f83d84b67e331d6c3e5b11a35e9
11,679
py
Python
gdal2tile-mapslicer/mapslicer/pp/ppserver.py
13903596952/gdal2tiles
5bfb8373da4776cab57e0cc58e7422fcedbe2315
[ "Apache-2.0" ]
44
2015-03-20T23:12:34.000Z
2022-01-09T16:00:19.000Z
mapslicer/pp/ppserver.py
himaps/mapslicer
1c60a2d4d3c0296424b2421e09001fcf32075c6e
[ "BSD-3-Clause" ]
12
2015-02-16T20:41:25.000Z
2021-05-01T05:21:34.000Z
mapslicer/pp/ppserver.py
kalxas/maptiler
1c60a2d4d3c0296424b2421e09001fcf32075c6e
[ "BSD-3-Clause" ]
20
2015-02-16T20:25:50.000Z
2021-11-02T12:11:11.000Z
#!/usr/bin/env python # Parallel Python Software: http://www.parallelpython.com # Copyright (c) 2005-2009, Vitalii Vanovschi # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of...
34.553254
79
0.587379
#!/usr/bin/env python # Parallel Python Software: http://www.parallelpython.com # Copyright (c) 2005-2009, Vitalii Vanovschi # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of...
988
0
27
f2d2f5392bab021e4b228788a197e370981a420f
66
py
Python
data/__init__.py
gjghks/SAS
d7624f02eb9658e10a2e66380c4b25f006a95e51
[ "MIT" ]
1
2022-03-23T03:31:26.000Z
2022-03-23T03:31:26.000Z
data/__init__.py
gjghks/SAS
d7624f02eb9658e10a2e66380c4b25f006a95e51
[ "MIT" ]
null
null
null
data/__init__.py
gjghks/SAS
d7624f02eb9658e10a2e66380c4b25f006a95e51
[ "MIT" ]
null
null
null
from .config import * import torch import cv2 import numpy as np
11
21
0.772727
from .config import * import torch import cv2 import numpy as np
0
0
0
fc66478b7ed6885d2b1e726b852435e4ae36da7a
1,496
py
Python
speakers/views.py
cornend/church_site
8d61a4fa3fcbdc88b6cd95fb81d23994756a1128
[ "MIT" ]
null
null
null
speakers/views.py
cornend/church_site
8d61a4fa3fcbdc88b6cd95fb81d23994756a1128
[ "MIT" ]
44
2020-05-13T20:15:26.000Z
2022-03-04T02:58:58.000Z
speakers/views.py
cornend/church_site
8d61a4fa3fcbdc88b6cd95fb81d23994756a1128
[ "MIT" ]
4
2020-06-05T17:59:52.000Z
2021-02-06T19:09:43.000Z
from django.contrib.auth.mixins import PermissionRequiredMixin from django.urls import reverse_lazy from django.views.generic.edit import FormMixin from church_site.views import AdminListView, BaseCreateView, BaseUpdateView from .forms import SpeakerCreateForm from .models import Speaker
36.487805
75
0.772727
from django.contrib.auth.mixins import PermissionRequiredMixin from django.urls import reverse_lazy from django.views.generic.edit import FormMixin from church_site.views import AdminListView, BaseCreateView, BaseUpdateView from .forms import SpeakerCreateForm from .models import Speaker class SpeakersAdminListView...
0
1,129
69
bf87e4023cb1c5cc6c8cb40d4677fb819d5cc6e4
470
py
Python
dist/py/relay.py
microsoft/jacdac
2c6548b7e55ac34141e5152c664ca268e873cf09
[ "CC-BY-4.0", "MIT" ]
31
2020-07-24T14:49:32.000Z
2022-03-20T12:20:56.000Z
dist/py/relay.py
microsoft/jacdac
2c6548b7e55ac34141e5152c664ca268e873cf09
[ "CC-BY-4.0", "MIT" ]
747
2020-07-31T22:05:45.000Z
2022-03-31T23:27:35.000Z
dist/py/relay.py
microsoft/jacdac
2c6548b7e55ac34141e5152c664ca268e873cf09
[ "CC-BY-4.0", "MIT" ]
17
2020-07-31T10:49:01.000Z
2022-03-15T03:21:43.000Z
# Autogenerated file for Relay # Add missing from ... import const _JD_SERVICE_CLASS_RELAY = const(0x183fe656) _JD_RELAY_VARIANT_ELECTROMECHANICAL = const(0x1) _JD_RELAY_VARIANT_SOLID_STATE = const(0x2) _JD_RELAY_VARIANT_REED = const(0x3) _JD_RELAY_REG_CLOSED = const(JD_REG_INTENSITY) _JD_RELAY_REG_VARIANT = const(JD_R...
42.727273
50
0.851064
# Autogenerated file for Relay # Add missing from ... import const _JD_SERVICE_CLASS_RELAY = const(0x183fe656) _JD_RELAY_VARIANT_ELECTROMECHANICAL = const(0x1) _JD_RELAY_VARIANT_SOLID_STATE = const(0x2) _JD_RELAY_VARIANT_REED = const(0x3) _JD_RELAY_REG_CLOSED = const(JD_REG_INTENSITY) _JD_RELAY_REG_VARIANT = const(JD_R...
0
0
0
9edf97789321d9901bac7d3458335d78de943376
3,806
py
Python
config.py
stummyhurt/auto-emby-accounts
f6ee172ffa704a4eb23b41bef25be2136b3cf5bc
[ "MIT" ]
4
2020-07-13T16:57:41.000Z
2020-12-05T16:18:57.000Z
config.py
seansusmilch/auto-emby-accounts
f6ee172ffa704a4eb23b41bef25be2136b3cf5bc
[ "MIT" ]
1
2020-05-14T03:01:30.000Z
2020-05-14T03:01:30.000Z
config.py
seansusmilch/auto-emby-accounts
f6ee172ffa704a4eb23b41bef25be2136b3cf5bc
[ "MIT" ]
2
2021-09-17T05:32:13.000Z
2022-02-14T13:46:40.000Z
# Different Logging Levels # 4: DEBUG # 3: INFO # 2: WARNING # 1: ERROR # 0: CRITICAL log_level = 3 # When set true, if the script finds a user that already exists, # the script will attempt to change the policy of that user, # and add the emby connect account to that user. overwrite = False # The...
46.987654
159
0.53547
# Different Logging Levels # 4: DEBUG # 3: INFO # 2: WARNING # 1: ERROR # 0: CRITICAL log_level = 3 # When set true, if the script finds a user that already exists, # the script will attempt to change the policy of that user, # and add the emby connect account to that user. overwrite = False # The...
0
0
0
6fcba304f8d15443f18e2e1f65d3e399bd0853b4
2,565
py
Python
benchmarks/code_cifar10/sdt.py
PSSF23/SPDT
2e369a3aa5735994c3c5efd485ed19a1e9f1e8ad
[ "MIT" ]
3
2020-10-02T18:36:17.000Z
2020-10-13T00:43:13.000Z
benchmarks/code_cifar10/sdt.py
PSSF23/SPDT
2e369a3aa5735994c3c5efd485ed19a1e9f1e8ad
[ "MIT" ]
8
2020-10-02T18:40:51.000Z
2021-10-01T17:40:54.000Z
benchmarks/code_cifar10/sdt.py
PSSF23/SPDT
2e369a3aa5735994c3c5efd485ed19a1e9f1e8ad
[ "MIT" ]
null
null
null
""" Author: Haoyin Xu """ import time import numpy as np import torchvision.datasets as datasets from numpy.random import permutation from sklearn.tree import DecisionTreeClassifier def write_result(filename, acc_ls): """Writes results to specified text file""" output = open(filename, "w") for acc in acc_...
26.443299
88
0.661988
""" Author: Haoyin Xu """ import time import numpy as np import torchvision.datasets as datasets from numpy.random import permutation from sklearn.tree import DecisionTreeClassifier def write_result(filename, acc_ls): """Writes results to specified text file""" output = open(filename, "w") for acc in acc_...
0
0
0
60bd8b8f9eae67891fa4c30429ba3e25b2bb87c3
3,503
py
Python
src/train_cnn.py
JiJingYu/Sensor-Specific-Hyperspectral-Image-Feature-Learning
de0ddec567fb8b47b37cffc6215c51533ac35a56
[ "Apache-2.0" ]
1
2017-08-14T03:21:00.000Z
2017-08-14T03:21:00.000Z
src/train_cnn.py
JiJingYu/Sensor-Specific-Hyperspectral-Image-Feature-Learning
de0ddec567fb8b47b37cffc6215c51533ac35a56
[ "Apache-2.0" ]
null
null
null
src/train_cnn.py
JiJingYu/Sensor-Specific-Hyperspectral-Image-Feature-Learning
de0ddec567fb8b47b37cffc6215c51533ac35a56
[ "Apache-2.0" ]
1
2021-02-16T00:04:52.000Z
2021-02-16T00:04:52.000Z
import os import sys import h5py import argparse import net.proto_file as proto_file import subprocess import numpy as np import scipy.io as sio import data_analysis.find_caffe as find_caffe import Config.ExpConfigInfo as Config caffe_root = find_caffe.caffe_root if __name__ == '__main__': parser = argparse...
43.246914
118
0.640879
import os import sys import h5py import argparse import net.proto_file as proto_file import subprocess import numpy as np import scipy.io as sio import data_analysis.find_caffe as find_caffe import Config.ExpConfigInfo as Config caffe_root = find_caffe.caffe_root def train_aviris_10_times(label_unique, args): f...
2,051
0
92
03d5517469cf562a344fb431f9038f8db0ca08af
3,360
py
Python
merge.py
arvin-chou/livechat
13da09d4007439dea2011dbaad5f3ee4a2ca72e8
[ "MIT" ]
null
null
null
merge.py
arvin-chou/livechat
13da09d4007439dea2011dbaad5f3ee4a2ca72e8
[ "MIT" ]
4
2021-09-08T21:31:38.000Z
2022-03-29T22:39:21.000Z
merge.py
arvin-chou/livechat
13da09d4007439dea2011dbaad5f3ee4a2ca72e8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import io import json import os import glob import requests import urllib.parse import sys import time from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument("-p", "--path", help="log path", dest="p", default="app/static/line") parser.add_argument("-i", "-...
32.307692
124
0.56756
# -*- coding: utf-8 -*- import io import json import os import glob import requests import urllib.parse import sys import time from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument("-p", "--path", help="log path", dest="p", default="app/static/line") parser.add_argument("-i", "-...
2,271
0
23
345a93ce42a9e0745a244e0f859478711fe136ec
2,310
py
Python
csgostash_scraper/modules/objects/_utils.py
Quentium-s-Forks/csgostash-scraper
cb75128215e208e49a29c54c142da1da6386f55a
[ "MIT" ]
6
2020-05-10T12:46:57.000Z
2022-03-25T17:14:54.000Z
csgostash_scraper/modules/objects/_utils.py
Quentium-s-Forks/csgostash-scraper
cb75128215e208e49a29c54c142da1da6386f55a
[ "MIT" ]
1
2021-03-21T16:52:05.000Z
2021-03-21T16:52:05.000Z
csgostash_scraper/modules/objects/_utils.py
Quentium-s-Forks/csgostash-scraper
cb75128215e208e49a29c54c142da1da6386f55a
[ "MIT" ]
4
2021-03-12T00:17:37.000Z
2021-07-16T15:27:37.000Z
# -*- coding: utf-8 -*- """ MIT License Copyright (c) 2020 supr3me Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, ...
30
85
0.651082
# -*- coding: utf-8 -*- """ MIT License Copyright (c) 2020 supr3me Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, ...
109
1,020
25
8d9b430957d44a00d42d86da9d135e189d354a83
189
py
Python
15_euler.py
f0ti/euler
c939f80f6fe806297c60cc6763dc1dc5daa86328
[ "MIT" ]
1
2021-07-31T12:50:38.000Z
2021-07-31T12:50:38.000Z
15_euler.py
f0ti/euler
c939f80f6fe806297c60cc6763dc1dc5daa86328
[ "MIT" ]
null
null
null
15_euler.py
f0ti/euler
c939f80f6fe806297c60cc6763dc1dc5daa86328
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import math # Binomial coeff 4ever print(int(find_bin_coeff(40, 20)))
18.9
66
0.730159
#!/usr/bin/env python3 import math # Binomial coeff 4ever def find_bin_coeff(n, k): return math.factorial(n)/(math.factorial(k)*math.factorial(n-k)) print(int(find_bin_coeff(40, 20)))
71
0
23
4006594bb13d96bcc673addd0398f1af7ae36a69
12,700
py
Python
fizz_buzz.py
Danielli-Itai/TfFizzBuzz
b5962dcf1ad0f111041bb890df515abd6a2fce7a
[ "Unlicense" ]
null
null
null
fizz_buzz.py
Danielli-Itai/TfFizzBuzz
b5962dcf1ad0f111041bb890df515abd6a2fce7a
[ "Unlicense" ]
null
null
null
fizz_buzz.py
Danielli-Itai/TfFizzBuzz
b5962dcf1ad0f111041bb890df515abd6a2fce7a
[ "Unlicense" ]
null
null
null
# Fizz Buzz in Tensorflow! # Our goal is to produce fizzbuzz for the numbers 1 to 100. # So it would be unfair to include these in our training data. # Accordingly, the training data corresponds to the numbers 101 to (2 ** NUM_DIGITS - 1). # see http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/ from PyBaseGUI.Mpl...
38.957055
153
0.669528
# Fizz Buzz in Tensorflow! # Our goal is to produce fizzbuzz for the numbers 1 to 100. # So it would be unfair to include these in our training data. # Accordingly, the training data corresponds to the numbers 101 to (2 ** NUM_DIGITS - 1). # see http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/ from PyBaseGUI.Mpl...
6,168
0
445
70ddf0689650d8dd4714c839a174e7639e9072f0
11,815
py
Python
lib/coginvasion/hood/TownLoader.py
theclashingfritz/Cog-Invasion-Online-Dump
2561abbacb3e2e288e06f3f04b935b5ed589c8f8
[ "Apache-2.0" ]
1
2020-03-12T16:44:10.000Z
2020-03-12T16:44:10.000Z
lib/coginvasion/hood/TownLoader.py
theclashingfritz/Cog-Invasion-Online-Dump
2561abbacb3e2e288e06f3f04b935b5ed589c8f8
[ "Apache-2.0" ]
null
null
null
lib/coginvasion/hood/TownLoader.py
theclashingfritz/Cog-Invasion-Online-Dump
2561abbacb3e2e288e06f3f04b935b5ed589c8f8
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.2.4 # Python bytecode 2.7 (62211) # Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] # Embedded file name: lib.coginvasion.hood.TownLoader from panda3d.core import * from direct.directnotify.DirectNotifyGlobal import directNotify from direct.f...
41.167247
296
0.650529
# uncompyle6 version 3.2.4 # Python bytecode 2.7 (62211) # Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] # Embedded file name: lib.coginvasion.hood.TownLoader from panda3d.core import * from direct.directnotify.DirectNotifyGlobal import directNotify from direct.f...
10,363
815
23
43f11f15a49bd36c2028ac01e96f9ab77af58c94
3,221
py
Python
tests/workflow_tests/test_storage.py
acidburn0zzz/cloudify-manager
ee2224c52347f7461a95976179ab61aee74a49dd
[ "Apache-2.0" ]
1
2015-11-03T14:27:11.000Z
2015-11-03T14:27:11.000Z
tests/workflow_tests/test_storage.py
acidburn0zzz/cloudify-manager
ee2224c52347f7461a95976179ab61aee74a49dd
[ "Apache-2.0" ]
2
2021-03-20T05:33:19.000Z
2021-03-26T00:38:21.000Z
tests/workflow_tests/test_storage.py
acidburn0zzz/cloudify-manager
ee2224c52347f7461a95976179ab61aee74a49dd
[ "Apache-2.0" ]
1
2019-10-29T06:15:31.000Z
2019-10-29T06:15:31.000Z
######## # Copyright (c) 2013 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
42.381579
79
0.65104
######## # Copyright (c) 2013 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
1,766
530
23
389e5efd7c99483e7fd901d833239fb54e7e8122
356
py
Python
tests/keras/legacy/conftest.py
raveendezoysa/American-Sign-Language-to-Text-Based-Translator
0e0d3bea9912c87c51f00728742dc67cd85b7e66
[ "MIT" ]
1
2019-10-03T09:54:57.000Z
2019-10-03T09:54:57.000Z
tests/keras/legacy/conftest.py
raveendezoysa/American-Sign-Language-to-Text-Based-Translator
0e0d3bea9912c87c51f00728742dc67cd85b7e66
[ "MIT" ]
null
null
null
tests/keras/legacy/conftest.py
raveendezoysa/American-Sign-Language-to-Text-Based-Translator
0e0d3bea9912c87c51f00728742dc67cd85b7e66
[ "MIT" ]
null
null
null
import warnings import pytest @pytest.fixture(autouse=True) def clear_session_after_test(): """This wrapper runs for all the tests in the legacy directory (recursively). """ with warnings.catch_warnings(): warnings.filterwarnings('ignore', message=r'(.+) Keras 2 ', ...
27.384615
81
0.643258
import warnings import pytest @pytest.fixture(autouse=True) def clear_session_after_test(): """This wrapper runs for all the tests in the legacy directory (recursively). """ with warnings.catch_warnings(): warnings.filterwarnings('ignore', message=r'(.+) Keras 2 ', ...
0
0
0
f9d3414f8f4fa8562edec0a0c9d4ef0efad6a5c4
1,092
py
Python
tests/test_utils.py
takeshiD/urdf2dh
76d9c4ce6d388ef4bd7325be60b704ea955dad7d
[ "MIT" ]
1
2021-11-03T06:59:50.000Z
2021-11-03T06:59:50.000Z
tests/test_utils.py
takeshiD/urdf2dh
76d9c4ce6d388ef4bd7325be60b704ea955dad7d
[ "MIT" ]
1
2021-10-19T12:40:15.000Z
2021-10-19T12:40:15.000Z
tests/test_utils.py
takeshiD/urdf2dh
76d9c4ce6d388ef4bd7325be60b704ea955dad7d
[ "MIT" ]
null
null
null
import pytest from tik.utils import _RotX, _RotY, _RotZ, Rot, Trans, homogeneous_transform import numpy as np ATOL = 1.e-8 @pytest.mark.parametrize(('theta', 'expected'), [ (0, np.eye(4)), (2*np.pi, np.eye(4)), ]) @pytest.mark.parametrize(('roll','pitch','yaw','expected'), [ (0, 0, 0, np.eye(4)), (2*n...
34.125
76
0.668498
import pytest from tik.utils import _RotX, _RotY, _RotZ, Rot, Trans, homogeneous_transform import numpy as np ATOL = 1.e-8 @pytest.mark.parametrize(('theta', 'expected'), [ (0, np.eye(4)), (2*np.pi, np.eye(4)), ]) def test_RotXYZ(theta, expected): assert np.allclose(_RotX(theta), expected, atol=ATOL) a...
448
0
88
cdc8d0d7da85ef3d2e6f802fc54b3d3064614620
2,165
py
Python
v2.5.7/otp/ai/passlib/ifc.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
4
2019-07-01T15:46:43.000Z
2021-07-23T16:26:48.000Z
v2.5.7/otp/ai/passlib/ifc.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
1
2019-06-29T03:40:05.000Z
2021-06-13T01:15:16.000Z
v2.5.7/otp/ai/passlib/ifc.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
4
2019-07-28T21:18:46.000Z
2021-02-25T06:37:25.000Z
import logging log = logging.getLogger(__name__) import sys from otp.ai.passlib.utils.decor import deprecated_method __all__ = [ 'PasswordHash'] from abc import ABCMeta, abstractmethod, abstractproperty @recreate_with_metaclass(ABCMeta)
27.0625
78
0.685912
import logging log = logging.getLogger(__name__) import sys from otp.ai.passlib.utils.decor import deprecated_method __all__ = [ 'PasswordHash'] def recreate_with_metaclass(meta): def builder(cls): if meta is type(cls): return cls return meta(cls.__name__, cls.__bases__, cls.__dict__....
971
885
68
10ed78e18b80f9e2fa0a506db866dc06d61ab8c5
37
py
Python
nodetasks/__init__.py
michalStarski/node-tasks
9f9ec0d3a2488babd7c32cb04e47e120ca88d119
[ "MIT" ]
3
2020-10-29T21:13:51.000Z
2020-11-05T08:53:48.000Z
nodetasks/__init__.py
michalStarski/node-tasks
9f9ec0d3a2488babd7c32cb04e47e120ca88d119
[ "MIT" ]
null
null
null
nodetasks/__init__.py
michalStarski/node-tasks
9f9ec0d3a2488babd7c32cb04e47e120ca88d119
[ "MIT" ]
null
null
null
from nodetasks.nodetasks import main
18.5
36
0.864865
from nodetasks.nodetasks import main
0
0
0
90c7e36f7d5ca62d1e26ad3ae288e6ece67a2e02
592
py
Python
tests/saversion.py
edupo/py-mongosql
27d2d125e862106077addec0376b07b13894439d
[ "MIT" ]
36
2015-02-25T20:30:34.000Z
2022-02-13T08:38:24.000Z
tests/saversion.py
edupo/py-mongosql
27d2d125e862106077addec0376b07b13894439d
[ "MIT" ]
8
2017-06-14T03:21:42.000Z
2022-02-09T11:56:00.000Z
tests/saversion.py
edupo/py-mongosql
27d2d125e862106077addec0376b07b13894439d
[ "MIT" ]
10
2015-10-21T09:22:37.000Z
2022-02-09T11:33:32.000Z
from distutils.version import LooseVersion from mongosql import SA_VERSION, SA_12, SA_13 def SA_VERSION_IN(min_version, max_version): """ Check that SqlAlchemy version lies within a range This is slow; only use in unit-tests! """ return LooseVersion(min_version) <= LooseVersion(SA_VERSION) <= LooseV...
26.909091
93
0.72973
from distutils.version import LooseVersion from mongosql import SA_VERSION, SA_12, SA_13 def SA_VERSION_IN(min_version, max_version): """ Check that SqlAlchemy version lies within a range This is slow; only use in unit-tests! """ return LooseVersion(min_version) <= LooseVersion(SA_VERSION) <= LooseV...
0
0
0
78a25d57287b85842e5ab7905e861a14d92d55e6
1,347
py
Python
cn/opencv/color/color_three.py
Jasonandy/Python-X
2f02b9a17bd5495dd1f8746b191f11ec2d7bccbe
[ "Apache-2.0" ]
null
null
null
cn/opencv/color/color_three.py
Jasonandy/Python-X
2f02b9a17bd5495dd1f8746b191f11ec2d7bccbe
[ "Apache-2.0" ]
null
null
null
cn/opencv/color/color_three.py
Jasonandy/Python-X
2f02b9a17bd5495dd1f8746b191f11ec2d7bccbe
[ "Apache-2.0" ]
2
2019-06-18T05:53:26.000Z
2019-06-19T03:26:02.000Z
import numpy as np import cv2 red_lower = np.array([0,43,46]) red_upper = np.array([10,255,255]) blue_lower = np.array([100,43,46]) blue_upper = np.array([124,255,255]) cap = cv2.VideoCapture(0) cap.set(3,320) cap.set(4,240) while 1: ret,frame = cap.read() frame = cv2.GaussianBlur(frame,(5,5),0) hsv = cv2...
30.613636
88
0.651076
import numpy as np import cv2 red_lower = np.array([0,43,46]) red_upper = np.array([10,255,255]) blue_lower = np.array([100,43,46]) blue_upper = np.array([124,255,255]) cap = cv2.VideoCapture(0) cap.set(3,320) cap.set(4,240) def ChestRed(): hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) mask = cv2.inRange(hsv, ...
557
0
44
cd43012772e2d2ca2aed819c9c52c439b40a78aa
4,595
py
Python
snapflow/testing/utils.py
icedevml/snapflow
329dae3f8eaa70d3a26d38a505faeb45d8eecb57
[ "BSD-3-Clause" ]
null
null
null
snapflow/testing/utils.py
icedevml/snapflow
329dae3f8eaa70d3a26d38a505faeb45d8eecb57
[ "BSD-3-Clause" ]
null
null
null
snapflow/testing/utils.py
icedevml/snapflow
329dae3f8eaa70d3a26d38a505faeb45d8eecb57
[ "BSD-3-Clause" ]
null
null
null
from __future__ import annotations import tempfile from contextlib import contextmanager from dataclasses import dataclass from typing import Any, Dict, Iterator, List, Optional from commonmodel.base import Schema, SchemaLike from dcp.data_format.handler import get_handler_for_name, infer_schema_for_name from dcp.dat...
34.548872
82
0.661371
from __future__ import annotations import tempfile from contextlib import contextmanager from dataclasses import dataclass from typing import Any, Dict, Iterator, List, Optional from commonmodel.base import Schema, SchemaLike from dcp.data_format.handler import get_handler_for_name, infer_schema_for_name from dcp.dat...
3,467
147
90
d1be535622b9fc051067542af0f42d2347da64bf
110
py
Python
tests.py
mraarif/sample-checks-repo
cf26ec73fabf4231d74e0bcb85d80f26eeb2407c
[ "MIT" ]
null
null
null
tests.py
mraarif/sample-checks-repo
cf26ec73fabf4231d74e0bcb85d80f26eeb2407c
[ "MIT" ]
null
null
null
tests.py
mraarif/sample-checks-repo
cf26ec73fabf4231d74e0bcb85d80f26eeb2407c
[ "MIT" ]
null
null
null
import pytest
15.714286
52
0.7
import pytest def test_divide_by_zero(): with pytest.raises(ZeroDivisionError) as e_info: 1 / 0
72
0
23
4e8e763886d62307b0f52e2c95d2165e30ba591c
26,851
py
Python
pysnmp-with-texts/CISCO-SME-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/CISCO-SME-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/CISCO-SME-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-SME-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-SME-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:12:18 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 201...
139.124352
2,458
0.783732
# # PySNMP MIB module CISCO-SME-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-SME-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:12:18 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 201...
0
1,413
68
2bd219b3e013b14aa017a9137cadf5e8dcaa45fe
2,035
py
Python
racketinterpreter/predefined/_symbol.py
ZibingZhang/racket-interpreter
20402401ddcbfead0cc028fe214834ef7720b9db
[ "MIT" ]
2
2020-06-09T01:43:15.000Z
2020-06-25T23:25:45.000Z
racketinterpreter/predefined/_symbol.py
ZibingZhang/racket-interpreter
20402401ddcbfead0cc028fe214834ef7720b9db
[ "MIT" ]
1
2021-02-02T23:46:55.000Z
2021-02-02T23:46:55.000Z
racketinterpreter/predefined/_symbol.py
ZibingZhang/racket-interpreter
20402401ddcbfead0cc028fe214834ef7720b9db
[ "MIT" ]
null
null
null
from __future__ import annotations import typing as tp from racketinterpreter.classes import data as d from racketinterpreter.classes import errors as err from racketinterpreter.predefined._base import BuiltInProc if tp.TYPE_CHECKING: from racketinterpreter.classes import ast from racketinterpreter.processes i...
29.071429
91
0.649631
from __future__ import annotations import typing as tp from racketinterpreter.classes import data as d from racketinterpreter.classes import errors as err from racketinterpreter.predefined._base import BuiltInProc if tp.TYPE_CHECKING: from racketinterpreter.classes import ast from racketinterpreter.processes i...
1,435
190
69
0beb3064917d4ce5e383fda2668249da2e12bccb
1,836
py
Python
tests/api/endpoints/test_shared_folders.py
Xandersoft/seahub
f75f238b3e0a907e8a8003f419e367fa36e992e7
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
tests/api/endpoints/test_shared_folders.py
Xandersoft/seahub
f75f238b3e0a907e8a8003f419e367fa36e992e7
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
tests/api/endpoints/test_shared_folders.py
Xandersoft/seahub
f75f238b3e0a907e8a8003f419e367fa36e992e7
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
import os import json from django.core.urlresolvers import reverse from seaserv import seafile_api from seahub.test_utils import BaseTestCase
30.098361
59
0.646514
import os import json from django.core.urlresolvers import reverse from seaserv import seafile_api from seahub.test_utils import BaseTestCase class SharedFoldersTest(BaseTestCase): def create_virtual_repo(self): name = os.path.basename(self.folder.rstrip('/')) sub_repo_id = seafile_api.create_...
1,462
17
212
51eea1c1e038fc63b707ac70d1a882e36370b93e
1,155
py
Python
src/solution_794b24be.py
MoizSM/ARC
f04b696f32a02db682271187f16ab8b1ffa1cfeb
[ "Apache-2.0" ]
null
null
null
src/solution_794b24be.py
MoizSM/ARC
f04b696f32a02db682271187f16ab8b1ffa1cfeb
[ "Apache-2.0" ]
null
null
null
src/solution_794b24be.py
MoizSM/ARC
f04b696f32a02db682271187f16ab8b1ffa1cfeb
[ "Apache-2.0" ]
null
null
null
import sys import json import numpy as np solve()
36.09375
132
0.499567
import sys import json import numpy as np def solve(): #Function that contains the logic to solve the task with open(sys.argv[1] , 'r') as f: data = json.load(f) #Parsing the JSON file. var = ['train' , 'test'] #Running for all the training and testing inputs for z in var: for n in ran...
1,073
0
23
a351715bd030ece07ed0ad9c9e6f3fe8b928150c
878
py
Python
ampa/cole/migrations/0008_alumne_to_many.py
jordiprats/django-ampa
b8e9d6076c32caa8bdc11094362ddccb12d95f8c
[ "Apache-2.0" ]
null
null
null
ampa/cole/migrations/0008_alumne_to_many.py
jordiprats/django-ampa
b8e9d6076c32caa8bdc11094362ddccb12d95f8c
[ "Apache-2.0" ]
null
null
null
ampa/cole/migrations/0008_alumne_to_many.py
jordiprats/django-ampa
b8e9d6076c32caa8bdc11094362ddccb12d95f8c
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0.5 on 2020-11-28 14:53 from django.db import migrations, models import django.db.models.deletion
29.266667
127
0.634396
# Generated by Django 3.0.5 on 2020-11-28 14:53 from django.db import migrations, models import django.db.models.deletion def forward(apps, schema_editor): Alumne = apps.get_model("cole", "Alumne") for alumne in Alumne.objects.all(): alumne.classes.add(alumne.classe) class Migration(migrations.Migrat...
140
569
46
675972611121cc8492248031549e729032aa875e
1,230
py
Python
tests/test_nullable.py
leafant/jsonmodels
12dae38b9fa1d9960cf3bd4e63299bbdd31f8648
[ "BSD-3-Clause" ]
null
null
null
tests/test_nullable.py
leafant/jsonmodels
12dae38b9fa1d9960cf3bd4e63299bbdd31f8648
[ "BSD-3-Clause" ]
null
null
null
tests/test_nullable.py
leafant/jsonmodels
12dae38b9fa1d9960cf3bd4e63299bbdd31f8648
[ "BSD-3-Clause" ]
null
null
null
from jsonmodels_qdyk.fields import StringField, ListField, EmbeddedField from jsonmodels_qdyk.models import Base
24.117647
72
0.565041
from jsonmodels_qdyk.fields import StringField, ListField, EmbeddedField from jsonmodels_qdyk.models import Base class Nullable(Base): field = StringField(nullable=True) class NullableListField(Base): field = ListField([str], nullable=True) class NullableEmbedded(Base): field = EmbeddedField(Nullable,...
822
151
138
bf4380d0dc7511bd18cb8a9b7d036c28f6afddd5
1,216
py
Python
model/dataset/dataset.py
qiaofengsheng/Pytorch-Image-Classifier-Collection
b95a07451c6c169639af9a4f6f5e074055570828
[ "MulanPSL-1.0" ]
3
2022-01-29T07:25:40.000Z
2022-03-06T15:20:39.000Z
model/dataset/dataset.py
qiaofengsheng/Pytorch-Image-Classifier-Collection
b95a07451c6c169639af9a4f6f5e074055570828
[ "MulanPSL-1.0" ]
null
null
null
model/dataset/dataset.py
qiaofengsheng/Pytorch-Image-Classifier-Collection
b95a07451c6c169639af9a4f6f5e074055570828
[ "MulanPSL-1.0" ]
1
2022-03-06T18:01:19.000Z
2022-03-06T18:01:19.000Z
''' _*_coding:utf-8 _*_ @Time :2022/1/28 19:00 @Author : qiaofengsheng @File :dataset.py @Software :PyCharm ''' import os from PIL import Image from torch.utils.data import * from model.utils import utils from torchvision import transforms
29.658537
73
0.625822
''' _*_coding:utf-8 _*_ @Time :2022/1/28 19:00 @Author : qiaofengsheng @File :dataset.py @Software :PyCharm ''' import os from PIL import Image from torch.utils.data import * from model.utils import utils from torchvision import transforms class ClassDataset(Dataset): def __init__(self, data_di...
846
7
103
6a180c5cf411a93f02d065b8ae966d15b9e68f1e
1,017
py
Python
shp2json.py
DSAdv/Sentinel3-LST-data
921e05a34b0f77ed03b4c9e310845db0f0a8c353
[ "Apache-2.0" ]
null
null
null
shp2json.py
DSAdv/Sentinel3-LST-data
921e05a34b0f77ed03b4c9e310845db0f0a8c353
[ "Apache-2.0" ]
null
null
null
shp2json.py
DSAdv/Sentinel3-LST-data
921e05a34b0f77ed03b4c9e310845db0f0a8c353
[ "Apache-2.0" ]
1
2019-03-21T09:15:56.000Z
2019-03-21T09:15:56.000Z
import glob import shapefile
23.651163
75
0.675516
import glob import shapefile def to_geojson(path_to_shp: str): filename = find_shapefile(path_to_shp) reader = shapefile.Reader(filename, encoding='latin-1') buffer = create_buffer(reader) return { 'type': 'FeatureCollection', 'features': buffer, } def find_shapefile(path_to_shp...
892
0
92
3aa72ac8757e08fce59031b12faa36a550dc500e
1,388
py
Python
compute_nads.py
gortizji/linearized-networks
3c271fb0a6c6bdffa9c1aabd8497f8803b725731
[ "MIT" ]
6
2021-11-15T07:09:21.000Z
2022-01-26T10:12:07.000Z
compute_nads.py
gortizji/linearized-networks
3c271fb0a6c6bdffa9c1aabd8497f8803b725731
[ "MIT" ]
1
2021-12-21T19:54:12.000Z
2022-03-31T10:54:41.000Z
compute_nads.py
gortizji/linearized-networks
3c271fb0a6c6bdffa9c1aabd8497f8803b725731
[ "MIT" ]
1
2021-12-21T03:33:20.000Z
2021-12-21T03:33:20.000Z
import os import hydra import jax import jax.numpy as jnp from flax.serialization import to_state_dict from omegaconf import DictConfig, OmegaConf from models.jax import get_model from neural_kernels.nads import mixed_derivative_nad_decomposition from utils.misc import get_apply_fn @hydra.main(config_path="config/c...
28.326531
90
0.729107
import os import hydra import jax import jax.numpy as jnp from flax.serialization import to_state_dict from omegaconf import DictConfig, OmegaConf from models.jax import get_model from neural_kernels.nads import mixed_derivative_nad_decomposition from utils.misc import get_apply_fn @hydra.main(config_path="config/c...
970
0
22
266c07ac3778a39595008765fdd1e0e74d3100ef
329
py
Python
tests/test_rep_intensity.py
JoFrhwld/python-acoustic-similarity
50f71835532010b2fedf14b0ca3a52d88a9ab380
[ "MIT" ]
5
2018-01-15T22:06:20.000Z
2022-02-21T07:02:40.000Z
tests/test_rep_intensity.py
JoFrhwld/python-acoustic-similarity
50f71835532010b2fedf14b0ca3a52d88a9ab380
[ "MIT" ]
null
null
null
tests/test_rep_intensity.py
JoFrhwld/python-acoustic-similarity
50f71835532010b2fedf14b0ca3a52d88a9ab380
[ "MIT" ]
2
2019-11-28T17:06:27.000Z
2019-12-05T22:57:28.000Z
import pytest from acousticsim.representations.intensity import Intensity from numpy.testing import assert_array_almost_equal @pytest.mark.xfail
19.352941
59
0.738602
import pytest from acousticsim.representations.intensity import Intensity from numpy.testing import assert_array_almost_equal @pytest.mark.xfail def test_intensity(base_filenames): for f in base_filenames: wavpath = f+'.wav' intensity = Intensity(wavpath, time_step = 0.01) intensity.pr...
155
0
22
96a037cf665d372ee897e3e0fead1ed297bca97f
2,678
py
Python
youtube_video_scraper.py
minimaxir/youtube-video-scraper
a5332f070f4dd27ef54d86b4aef718b9073692aa
[ "MIT" ]
19
2021-05-20T18:47:34.000Z
2022-01-10T11:52:03.000Z
youtube_video_scraper.py
minimaxir/youtube-video-scraper
a5332f070f4dd27ef54d86b4aef718b9073692aa
[ "MIT" ]
null
null
null
youtube_video_scraper.py
minimaxir/youtube-video-scraper
a5332f070f4dd27ef54d86b4aef718b9073692aa
[ "MIT" ]
2
2021-10-09T18:44:55.000Z
2022-01-31T17:56:48.000Z
import yaml import csv import os from tqdm import tqdm import requests import time with open("config.yml", "r", encoding="utf-8") as f: config = yaml.safe_load(f) API_KEY = config["API_KEY"] CHANNELS_API_URL = "https://www.googleapis.com/youtube/v3/channels" PLAYLIST_API_URL = "https://www.googleapis.com/youtub...
30.431818
84
0.605302
import yaml import csv import os from tqdm import tqdm import requests import time def process_video(video_snippet): temp_dict = {} temp_dict["video_id"] = video_snippet["resourceId"]["videoId"] temp_dict["title"] = video_snippet["title"] temp_dict["video_published_at"] = video_snippet["publishedAt"] ...
234
0
23
55b870505b10ac77428895ab5e3f4926336db9c8
8,089
py
Python
python/hyperon/__init__.py
trueagi-io/hyperon-experimental
50c2f136fb992880a2ecb104e279bbf9b31c53f1
[ "MIT" ]
6
2021-09-23T13:45:52.000Z
2022-03-16T16:01:18.000Z
python/hyperon/__init__.py
trueagi-io/hyperon-experimental
50c2f136fb992880a2ecb104e279bbf9b31c53f1
[ "MIT" ]
1
2022-03-25T10:46:20.000Z
2022-03-25T10:59:49.000Z
python/hyperon/__init__.py
trueagi-io/hyperon-experimental
50c2f136fb992880a2ecb104e279bbf9b31c53f1
[ "MIT" ]
1
2021-09-22T10:42:58.000Z
2021-09-22T10:42:58.000Z
import hyperonpy as hp from hyperonpy import AtomKind, init_logger
28.283217
93
0.657436
import hyperonpy as hp from hyperonpy import AtomKind, init_logger class Atom: def __init__(self, catom): self.catom = catom def __del__(self): #import sys; sys.stderr.write("Atom._del_(" + str(self) + ")\n"); sys.stderr.flush() hp.atom_free(self.catom) def __eq__(self, other): ...
5,624
791
1,605
a7ae004d197716589d3b70fcaee6b224af5dd3b6
231
py
Python
workSpace/esp32neopixeltest.py
khutson/macequilt
a4a090ddf296fcea763825fda4243bc84b4d5f0d
[ "MIT" ]
null
null
null
workSpace/esp32neopixeltest.py
khutson/macequilt
a4a090ddf296fcea763825fda4243bc84b4d5f0d
[ "MIT" ]
null
null
null
workSpace/esp32neopixeltest.py
khutson/macequilt
a4a090ddf296fcea763825fda4243bc84b4d5f0d
[ "MIT" ]
null
null
null
from neopixel import NeoPixel import machine import time np = NeoPixel(machine.Pin(4),1) for r in range(255): for g in range(255): for b in range(255): np[0]=((r,g,b)) np.write() time.sleep_ms(10)
15.4
31
0.606061
from neopixel import NeoPixel import machine import time np = NeoPixel(machine.Pin(4),1) for r in range(255): for g in range(255): for b in range(255): np[0]=((r,g,b)) np.write() time.sleep_ms(10)
0
0
0
d895d2119c18fb0dbae41dc21f1ac8211c55d97f
3,016
py
Python
wbia_pie_v2/models/efficientnet.py
dylanirion/wbia-plugin-pie-v2
8ae37c2ad218e5e888bb1aea039f1b04a3fe9d8d
[ "Apache-2.0" ]
null
null
null
wbia_pie_v2/models/efficientnet.py
dylanirion/wbia-plugin-pie-v2
8ae37c2ad218e5e888bb1aea039f1b04a3fe9d8d
[ "Apache-2.0" ]
null
null
null
wbia_pie_v2/models/efficientnet.py
dylanirion/wbia-plugin-pie-v2
8ae37c2ad218e5e888bb1aea039f1b04a3fe9d8d
[ "Apache-2.0" ]
1
2021-04-05T23:46:11.000Z
2021-04-05T23:46:11.000Z
# -*- coding: utf-8 -*- # Written by Olga Moskvyak (olga.moskvyak@hdr.qut.edu.au) import logging import torch.nn as nn from torchvision import models as torchmodels # NOQA from efficientnet_pytorch import EfficientNet logger = logging.getLogger(__name__) NAME_EMBEDDING_SIZE = { 'efficientnet-b0': 1280, 'ef...
28.72381
99
0.618037
# -*- coding: utf-8 -*- # Written by Olga Moskvyak (olga.moskvyak@hdr.qut.edu.au) import logging import torch.nn as nn from torchvision import models as torchmodels # NOQA from efficientnet_pytorch import EfficientNet logger = logging.getLogger(__name__) NAME_EMBEDDING_SIZE = { 'efficientnet-b0': 1280, 'ef...
1,179
0
104
fa72870226cae55f6adc9d6ec167b5fc30470890
761
py
Python
algorithm/raw_sum.py
hibikisan2018/learn_python
b0f9c82e1823782a59019882cae3523fbf533aa0
[ "BSD-2-Clause" ]
1
2019-05-04T05:23:46.000Z
2019-05-04T05:23:46.000Z
algorithm/raw_sum.py
hibikisan2018/learn_python
b0f9c82e1823782a59019882cae3523fbf533aa0
[ "BSD-2-Clause" ]
null
null
null
algorithm/raw_sum.py
hibikisan2018/learn_python
b0f9c82e1823782a59019882cae3523fbf533aa0
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Refer to "https://hibiki-press.tech/algorithm/sum_2darray/698" @author: hibikisan """ import random if __name__ == '__main__': dim = (5, 3) # the dimension of original data array data = [] for i in range(dim[0]): data.append([random.randi...
21.742857
67
0.546649
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Refer to "https://hibiki-press.tech/algorithm/sum_2darray/698" @author: hibikisan """ import random def raw_sum(data): for i in data: sum_ = 0 for j in range(len(i)): sum_ += i[j] i.append(sum_) return data if __n...
134
0
23
720b3fa099cbb9647fd56a21b9f9b7329207da00
4,499
py
Python
kmerexpr/plotting.py
bob-carpenter/kmers
769217d2b1af9e118f79ad211940efcc8e2672d1
[ "BSD-3-Clause" ]
1
2021-12-07T14:16:40.000Z
2021-12-07T14:16:40.000Z
kmerexpr/plotting.py
bob-carpenter/kmers
769217d2b1af9e118f79ad211940efcc8e2672d1
[ "BSD-3-Clause" ]
null
null
null
kmerexpr/plotting.py
bob-carpenter/kmers
769217d2b1af9e118f79ad211940efcc8e2672d1
[ "BSD-3-Clause" ]
null
null
null
import matplotlib.pyplot as plt import os import numpy as np
42.046729
128
0.608802
import matplotlib.pyplot as plt import os import numpy as np def plot_scatter(title,xaxis,yaxis, horizontal = False): plt.scatter(xaxis,yaxis , s=0.7, alpha=0.4 ) #theta_opt if horizontal: title = title + "-psi-minus-scatter" plt.plot([0,np.max(xaxis)], [0,0], '--') plt.ylabel(r"$ \ps...
4,345
0
92
a7f57df51d5609d8d6a099be39d77ff18d29c83c
20,228
py
Python
src/moca_modules/moca_log.py
el-ideal-ideas/MocaUsersAPI
8acc17d14ad1e3c57142b24a812a1806c44180a5
[ "MIT" ]
6
2020-04-12T08:43:27.000Z
2020-06-03T07:03:19.000Z
src/moca_modules/moca_log.py
el-ideal-ideas/MocaUsersAPI
8acc17d14ad1e3c57142b24a812a1806c44180a5
[ "MIT" ]
null
null
null
src/moca_modules/moca_log.py
el-ideal-ideas/MocaUsersAPI
8acc17d14ad1e3c57142b24a812a1806c44180a5
[ "MIT" ]
1
2020-06-26T18:12:47.000Z
2020-06-26T18:12:47.000Z
# Ω* #             ■          ■■■■■   #             ■         ■■   ■■  #             ■        ■■     ■  #             ■        ■■        #   ■■■■■     ■        ■■■       #  ■■   ■■    ■         ■■■      # ■■     ■■   ■          ■■■■    # ■■     ■■   ■            ■■■■  # ■■■■■■■■■   ■              ■■■ ...
36.121429
115
0.562636
# Ω* #             ■          ■■■■■   #             ■         ■■   ■■  #             ■        ■■     ■  #             ■        ■■        #   ■■■■■     ■        ■■■       #  ■■   ■■    ■         ■■■      # ■■     ■■   ■          ■■■■    # ■■     ■■   ■            ■■■■  # ■■■■■■■■■   ■              ■■■ ...
1,629
0
526
4b507bf64e3654ff7c0698713e9656acd7b4e1f7
334
py
Python
code_test.py
twhughes/Finite-Difference-Frequency-Domain
e97739a40860305259ee7f53a052174a2697df0d
[ "MIT" ]
1
2019-11-10T05:17:39.000Z
2019-11-10T05:17:39.000Z
code_test.py
twhughes/Finite-Difference-Frequency-Domain
e97739a40860305259ee7f53a052174a2697df0d
[ "MIT" ]
null
null
null
code_test.py
twhughes/Finite-Difference-Frequency-Domain
e97739a40860305259ee7f53a052174a2697df0d
[ "MIT" ]
null
null
null
from NN import NN import numpy as np import matplotlib.pylab as plt layer_sizes = [2,4,1] activations = ['relu','sigmoid'] N = NN(layer_sizes,activations) #print(N.biases[4].shape) input = np.array([[1,2,3],[3,5,4]]) N.forward_prop(input) N.back_prop(np.array([[1,2,3]])) N.derivative_check(m=6,verbose=False) N.updat...
18.555556
37
0.706587
from NN import NN import numpy as np import matplotlib.pylab as plt layer_sizes = [2,4,1] activations = ['relu','sigmoid'] N = NN(layer_sizes,activations) #print(N.biases[4].shape) input = np.array([[1,2,3],[3,5,4]]) N.forward_prop(input) N.back_prop(np.array([[1,2,3]])) N.derivative_check(m=6,verbose=False) N.updat...
0
0
0
5c9099258ebfac3b326d362040bc65799a6dc51a
447
py
Python
src/classes/structures/__init__.py
ogoes/compiler-improvement
dbed16b88ed43630480daf6fffda69805d9cb807
[ "MIT" ]
null
null
null
src/classes/structures/__init__.py
ogoes/compiler-improvement
dbed16b88ed43630480daf6fffda69805d9cb807
[ "MIT" ]
null
null
null
src/classes/structures/__init__.py
ogoes/compiler-improvement
dbed16b88ed43630480daf6fffda69805d9cb807
[ "MIT" ]
null
null
null
from classes.structures.Atribuicao import Atribuicao from classes.structures.Cabecalho import Cabecalho from classes.structures.Escreva import Escreva from classes.structures.Indice import Indice from classes.structures.InicializacaoDeVariaveis import InicializacaoDeVariaveis from classes.structures.Leia import Leia fr...
44.7
80
0.879195
from classes.structures.Atribuicao import Atribuicao from classes.structures.Cabecalho import Cabecalho from classes.structures.Escreva import Escreva from classes.structures.Indice import Indice from classes.structures.InicializacaoDeVariaveis import InicializacaoDeVariaveis from classes.structures.Leia import Leia fr...
0
0
0
e369600bb8c77456462727ac300a097d3fd556bc
25,316
py
Python
atlas/lib/idds/atlas/workflow/atlaspandawork.py
wguanicedew/iDDS
ff3e8eadda3c7a7f8c87f0e68e06dbe02b7278e5
[ "Apache-2.0" ]
null
null
null
atlas/lib/idds/atlas/workflow/atlaspandawork.py
wguanicedew/iDDS
ff3e8eadda3c7a7f8c87f0e68e06dbe02b7278e5
[ "Apache-2.0" ]
null
null
null
atlas/lib/idds/atlas/workflow/atlaspandawork.py
wguanicedew/iDDS
ff3e8eadda3c7a7f8c87f0e68e06dbe02b7278e5
[ "Apache-2.0" ]
1
2020-05-27T13:04:38.000Z
2020-05-27T13:04:38.000Z
#!/usr/bin/env 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.0OA # # Authors: # - Wen Guan, <wen.guan@cern.ch>, 2020 - 2021 try: impor...
49.252918
1,843
0.60918
#!/usr/bin/env 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.0OA # # Authors: # - Wen Guan, <wen.guan@cern.ch>, 2020 - 2021 try: impor...
12,409
11,997
72
bfe5be08375a6dd3c112ad918030bbe369fe8e25
8,340
py
Python
file_parser.py
bcbogdan/lisa-parser
08b636ef1d5ebafc076da11c84e92765cbc381bf
[ "Apache-2.0" ]
null
null
null
file_parser.py
bcbogdan/lisa-parser
08b636ef1d5ebafc076da11c84e92765cbc381bf
[ "Apache-2.0" ]
null
null
null
file_parser.py
bcbogdan/lisa-parser
08b636ef1d5ebafc076da11c84e92765cbc381bf
[ "Apache-2.0" ]
null
null
null
""" Linux on Hyper-V and Azure Test Code, ver. 1.0.0 Copyright (c) Microsoft 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/LICEN...
34.320988
83
0.556715
""" Linux on Hyper-V and Azure Test Code, ver. 1.0.0 Copyright (c) Microsoft 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/LICEN...
212
0
53
b06c6d5d0112f1268854aa1a8670da026490b05f
12,363
py
Python
adaptive/interface/adaptive/ttypes.py
scwolof/adaptive
9f7475400aa0469778cb60d5ce9c95d9ca359174
[ "MIT" ]
null
null
null
adaptive/interface/adaptive/ttypes.py
scwolof/adaptive
9f7475400aa0469778cb60d5ce9c95d9ca359174
[ "MIT" ]
null
null
null
adaptive/interface/adaptive/ttypes.py
scwolof/adaptive
9f7475400aa0469778cb60d5ce9c95d9ca359174
[ "MIT" ]
null
null
null
# # Autogenerated by Thrift Compiler (0.11.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive impo...
33.871233
134
0.568632
# # Autogenerated by Thrift Compiler (0.11.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive impo...
9,438
0
756
d52704885e710e3feeb3ec02460d3b66440f0656
3,416
py
Python
dataset-tf.py
harrywang/chinese-calligraphy-dataset
92c9cf3cba044f00812639fdd7d8b5b1e98d6b2a
[ "Apache-2.0" ]
10
2020-12-14T05:08:03.000Z
2022-03-24T13:55:10.000Z
dataset-tf.py
harrywang/chinese-calligraphy-dataset
92c9cf3cba044f00812639fdd7d8b5b1e98d6b2a
[ "Apache-2.0" ]
null
null
null
dataset-tf.py
harrywang/chinese-calligraphy-dataset
92c9cf3cba044f00812639fdd7d8b5b1e98d6b2a
[ "Apache-2.0" ]
3
2020-10-05T12:54:59.000Z
2022-03-22T03:58:01.000Z
import tensorflow as tf import os import pathlib import numpy as np if __name__ == '__main__': import matplotlib.pyplot as plt batch_size = 8 sample_batch_num = 4 dataset = CalligraphyDataset(data_dir='./data/chinese-calligraphy-dataset/', character_csv='./data/label_ch...
34.16
113
0.604508
import tensorflow as tf import os import pathlib import numpy as np class CalligraphyDataset: def _process_path(self, file_path): # read images from file # and then convert RGB to grayscale # for the images only have black and white img = tf.io.read_file(file_path) img = ...
2,177
4
103
d8862b356539452c39a1b4172bc9c903c6711dfb
1,675
py
Python
interactive.py
ilSommo/rate-severity-of-toxic-comments
c0c28475c4d83eeeea72012df6911fc10ba0edbf
[ "MIT" ]
1
2022-02-25T18:37:02.000Z
2022-02-25T18:37:02.000Z
interactive.py
ilSommo/rate-severity-of-toxic-comments
c0c28475c4d83eeeea72012df6911fc10ba0edbf
[ "MIT" ]
null
null
null
interactive.py
ilSommo/rate-severity-of-toxic-comments
c0c28475c4d83eeeea72012df6911fc10ba0edbf
[ "MIT" ]
null
null
null
__version__ = '1.0.0-rc.1' __author__ = 'Lorenzo Menghini, Martino Pulici, Alessandro Stockman, Luca Zucchini' import argparse import pandas as pd import torch from rate_severity_of_toxic_comments.model import create_model from rate_severity_of_toxic_comments.utilities import parse_config, process_config DEFAULT_...
27.916667
83
0.644776
__version__ = '1.0.0-rc.1' __author__ = 'Lorenzo Menghini, Martino Pulici, Alessandro Stockman, Luca Zucchini' import argparse import pandas as pd import torch from rate_severity_of_toxic_comments.model import create_model from rate_severity_of_toxic_comments.utilities import parse_config, process_config DEFAULT_...
0
0
0
87e8c794bd6b41de02e02249cde7d720c0a22080
3,945
py
Python
cre.py
flowirtz/common-requirement-enumeration
c89b7bad18e7a62e247e7250100ef834fbfe1456
[ "CC0-1.0" ]
null
null
null
cre.py
flowirtz/common-requirement-enumeration
c89b7bad18e7a62e247e7250100ef834fbfe1456
[ "CC0-1.0" ]
null
null
null
cre.py
flowirtz/common-requirement-enumeration
c89b7bad18e7a62e247e7250100ef834fbfe1456
[ "CC0-1.0" ]
null
null
null
import argparse import os import sys import unittest from typing import List import click # type: ignore import coverage # type: ignore from flask_migrate import Migrate # type: ignore from application import create_app, sqla # type: ignore from application.cmd import cre_main # Hacky solutions to make this both...
31.814516
127
0.65019
import argparse import os import sys import unittest from typing import List import click # type: ignore import coverage # type: ignore from flask_migrate import Migrate # type: ignore from application import create_app, sqla # type: ignore from application.cmd import cre_main # Hacky solutions to make this both...
3,071
0
45
4721e0326315f8d91204ee9ea647d2bb2acb85af
4,419
py
Python
src/virtual_de1soc.py
weiernt/virtual-de1soc
e3405a18fbb9c07c98463a98aaacb8afe26716ea
[ "Python-2.0", "OLDAP-2.3", "OLDAP-2.8" ]
7
2020-05-05T05:52:49.000Z
2021-05-17T12:36:55.000Z
src/virtual_de1soc.py
weiernt/virtual-de1soc
e3405a18fbb9c07c98463a98aaacb8afe26716ea
[ "Python-2.0", "OLDAP-2.3", "OLDAP-2.8" ]
22
2020-05-27T08:34:57.000Z
2021-05-03T14:59:07.000Z
src/virtual_de1soc.py
weiernt/virtual-de1soc
e3405a18fbb9c07c98463a98aaacb8afe26716ea
[ "Python-2.0", "OLDAP-2.3", "OLDAP-2.8" ]
1
2021-05-04T01:04:40.000Z
2021-05-04T01:04:40.000Z
import fpga import modelsim import config_manager import ascii_ui import os import time import pathlib import keyboard screenIO = ascii_ui.ScreenIO() screenIO.renderMessage("Config loading...") configuration = initialise(screenIO) run_lib(screenIO, configuration) run_compile(screenIO, configuration) run_simulat...
28.326923
104
0.719167
import fpga import modelsim import config_manager import ascii_ui import os import time import pathlib import keyboard def get_key_stroke(): keyevents = keyboard.stop_recording() keyboard.start_recording() keylist = [] for event in keyevents: if event.event_type == "down": if event.name not in keylist: k...
3,955
0
115
99d2314f7f503b983874f71b34cfeda2a9a10fd6
1,950
py
Python
dns_sprockets_lib/validators/rrsig_orphan.py
roeckelein/sprocket
8e7f9acf4d330d7b1005ba7a2ae8b644571f11fb
[ "Apache-2.0" ]
7
2015-09-11T04:08:12.000Z
2021-01-04T21:47:30.000Z
dns_sprockets_lib/validators/rrsig_orphan.py
roeckelein/sprocket
8e7f9acf4d330d7b1005ba7a2ae8b644571f11fb
[ "Apache-2.0" ]
null
null
null
dns_sprockets_lib/validators/rrsig_orphan.py
roeckelein/sprocket
8e7f9acf4d330d7b1005ba7a2ae8b644571f11fb
[ "Apache-2.0" ]
null
null
null
''' rrsig_orphan - Record test: RrsigOrphan .. Copyright (c) 2015 Neustar, Inc. All rights reserved. .. See COPYRIGHT.txt for full notice. See LICENSE.txt for terms and conditions. ''' import time import dns.rdtypes.ANY.RRSIG import dns.dnssec import dns_sprockets_lib.validators as validators class RrsigOrphan(...
30
92
0.608718
''' rrsig_orphan - Record test: RrsigOrphan .. Copyright (c) 2015 Neustar, Inc. All rights reserved. .. See COPYRIGHT.txt for full notice. See LICENSE.txt for terms and conditions. ''' import time import dns.rdtypes.ANY.RRSIG import dns.dnssec import dns_sprockets_lib.validators as validators class RrsigOrphan(...
1,191
0
54
5dda3f762efc780660deff671bbc1e43e11522fd
9,395
py
Python
django/seasight_forecasting/utils.py
rascundampelcuf/seasight-forecasting
d530f9c0be42d8a0f48830940c6b500bdfba3150
[ "CC-BY-4.0" ]
null
null
null
django/seasight_forecasting/utils.py
rascundampelcuf/seasight-forecasting
d530f9c0be42d8a0f48830940c6b500bdfba3150
[ "CC-BY-4.0" ]
9
2021-04-08T21:58:38.000Z
2022-02-10T14:35:42.000Z
django/seasight_forecasting/utils.py
rascundampelcuf/seasight-forecasting
d530f9c0be42d8a0f48830940c6b500bdfba3150
[ "CC-BY-4.0" ]
3
2020-08-16T18:56:32.000Z
2021-08-14T17:54:01.000Z
import itertools import os from seasight_forecasting import global_vars from threading import Thread from time import sleep, time
39.64135
224
0.579244
import itertools import os from seasight_forecasting import global_vars from threading import Thread from time import sleep, time def blankKML(id): string = "\"echo '<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?> \n" + \ "<kml xmlns=\\\"http://www.opengis.net/kml/2.2\\\"" + \ " xmlns:gx=\\\"ht...
8,666
0
598
36536755edb2e6bd4a2e3ce5501ab142294d5898
5,100
py
Python
ModulemdTranslationHelpers/cli.py
sgallagher/ModulemdTranslationHelpers
a8fc0d786b4afa646ac3e017b719bdcce496522a
[ "MIT" ]
null
null
null
ModulemdTranslationHelpers/cli.py
sgallagher/ModulemdTranslationHelpers
a8fc0d786b4afa646ac3e017b719bdcce496522a
[ "MIT" ]
null
null
null
ModulemdTranslationHelpers/cli.py
sgallagher/ModulemdTranslationHelpers
a8fc0d786b4afa646ac3e017b719bdcce496522a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # This file is part of ModulemdTranslationHelpers # Copyright (C) 2018 Stephen Gallagher # # Fedora-License-Identifier: MIT # SPDX-2.0-License-Identifier: MIT # SPDX-3.0-License-Identifier: MIT # # This program is free software. # For more information on the license, see COPYING. # For more info...
36.428571
78
0.546078
# -*- coding: utf-8 -*- # This file is part of ModulemdTranslationHelpers # Copyright (C) 2018 Stephen Gallagher # # Fedora-License-Identifier: MIT # SPDX-2.0-License-Identifier: MIT # SPDX-3.0-License-Identifier: MIT # # This program is free software. # For more information on the license, see COPYING. # For more info...
0
0
0
16891a91672520f3f4e34f0fed1c6dff57615f3a
444
py
Python
cert_tool/database.py
never00rei/cert_tool
07928bfdf59627b0f3cbc55d3cccc756c29dbec5
[ "MIT" ]
null
null
null
cert_tool/database.py
never00rei/cert_tool
07928bfdf59627b0f3cbc55d3cccc756c29dbec5
[ "MIT" ]
null
null
null
cert_tool/database.py
never00rei/cert_tool
07928bfdf59627b0f3cbc55d3cccc756c29dbec5
[ "MIT" ]
null
null
null
import datetime from sqlalchemy import Column, Integer, Text, Table, DateTime from sqlalchemy.orm import relationship, backref from sqlalchemy.ext.declarative import declarative_base base = declarative_base() certs = Table( "ssl_certificates", base.metadata, Column("cert_id", Integer, primary_key=True, nu...
27.75
65
0.763514
import datetime from sqlalchemy import Column, Integer, Text, Table, DateTime from sqlalchemy.orm import relationship, backref from sqlalchemy.ext.declarative import declarative_base base = declarative_base() certs = Table( "ssl_certificates", base.metadata, Column("cert_id", Integer, primary_key=True, nu...
0
0
0
57b96e2ecbc98aec697e4e1fb2cefa03fd7166db
8,552
py
Python
Autorigger/scripts/dataNodeManager.py
danOrzc/HeavyDutyVehicle
3954314a8ec8101003a8691aeced408c83981bc6
[ "MIT" ]
null
null
null
Autorigger/scripts/dataNodeManager.py
danOrzc/HeavyDutyVehicle
3954314a8ec8101003a8691aeced408c83981bc6
[ "MIT" ]
null
null
null
Autorigger/scripts/dataNodeManager.py
danOrzc/HeavyDutyVehicle
3954314a8ec8101003a8691aeced408c83981bc6
[ "MIT" ]
null
null
null
"""Rigging data storing. This script has functions that allows maya to save the rigging tool process results inside an empty network node that doesn't have transform info. It is in charge of creating the node and the attributes to store the data. It can also query the data or delete the attributes. We are using this...
37.182609
128
0.684986
"""Rigging data storing. This script has functions that allows maya to save the rigging tool process results inside an empty network node that doesn't have transform info. It is in charge of creating the node and the attributes to store the data. It can also query the data or delete the attributes. We are using this...
0
0
0
bdc72d2e2682ca17e97115fa3e5b4f56f301576d
1,921
py
Python
aries_cloudagent/protocols/revocation_notification/v1_0/handlers/tests/test_revoke_handler.py
kuraakhilesh8230/aries-cloudagent-python
ee384d1330f6a50ff45a507392ce54f92900f23a
[ "Apache-2.0" ]
4
2019-07-01T13:12:50.000Z
2019-07-02T20:01:37.000Z
aries_cloudagent/protocols/revocation_notification/v1_0/handlers/tests/test_revoke_handler.py
kuraakhilesh8230/aries-cloudagent-python
ee384d1330f6a50ff45a507392ce54f92900f23a
[ "Apache-2.0" ]
51
2021-01-12T05:50:50.000Z
2022-03-25T06:03:13.000Z
aries_cloudagent/protocols/revocation_notification/v1_0/handlers/tests/test_revoke_handler.py
kuraakhilesh8230/aries-cloudagent-python
ee384d1330f6a50ff45a507392ce54f92900f23a
[ "Apache-2.0" ]
12
2019-06-24T22:17:44.000Z
2019-07-02T19:49:31.000Z
"""Test RevokeHandler.""" import pytest from ......config.settings import Settings from ......core.event_bus import EventBus, MockEventBus from ......core.in_memory import InMemoryProfile from ......core.profile import Profile from ......messaging.request_context import RequestContext from ......messaging.responder i...
27.84058
78
0.756897
"""Test RevokeHandler.""" import pytest from ......config.settings import Settings from ......core.event_bus import EventBus, MockEventBus from ......core.in_memory import InMemoryProfile from ......core.profile import Profile from ......messaging.request_context import RequestContext from ......messaging.responder i...
1,195
0
154
ecf2055ea110bcb9f0572f57c0cfa8cc49cbc007
11,805
py
Python
synthesis/write_java.py
jajajaqlt/nsg
1873f2b5e10441110c3c69940ceb4650f9684ac0
[ "Apache-2.0" ]
10
2021-11-02T18:30:38.000Z
2022-03-21T06:31:33.000Z
synthesis/write_java.py
rohanmukh/nag
f2c4b8e60a97c58a6a1c549cc8b4753ebfe8a5e3
[ "Apache-2.0" ]
2
2021-11-05T18:40:42.000Z
2022-03-30T04:33:08.000Z
synthesis/write_java.py
rohanmukh/nag
f2c4b8e60a97c58a6a1c549cc8b4753ebfe8a5e3
[ "Apache-2.0" ]
2
2021-11-03T19:14:06.000Z
2021-11-03T23:47:09.000Z
# Copyright 2017 Rice University # # 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 writin...
41.421053
129
0.567302
# Copyright 2017 Rice University # # 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 writin...
10,287
-4
481
577ff58d5cf3dd48a3b5025de081d36df0453fc8
1,636
py
Python
venv/Lib/site-packages/statsmodels/tools/tests/test_sequences.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
6,931
2015-01-01T11:41:55.000Z
2022-03-31T17:03:24.000Z
venv/Lib/site-packages/statsmodels/tools/tests/test_sequences.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
6,137
2015-01-01T00:33:45.000Z
2022-03-31T22:53:17.000Z
venv/Lib/site-packages/statsmodels/tools/tests/test_sequences.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
2,608
2015-01-02T21:32:31.000Z
2022-03-31T07:38:30.000Z
import numpy as np import numpy.testing as npt from statsmodels.tools import sequences
35.565217
83
0.616748
import numpy as np import numpy.testing as npt from statsmodels.tools import sequences def test_discrepancy(): space_0 = [[0.1, 0.5], [0.2, 0.4], [0.3, 0.3], [0.4, 0.2], [0.5, 0.1]] space_1 = [[1, 3], [2, 6], [3, 2], [4, 5], [5, 1], [6, 4]] space_2 = [[1, 5], [2, 4], [3, 3], [4, 2], [5, 1], [6, 6]] c...
1,453
0
92
01c8ffb32ae80f7960704c7b88ed605914b4e037
3,805
py
Python
finsky/protos/book_doc_details_pb2.py
mmcloughlin/finsky
f21ccdbebf86e55a542c658b6972cb1f3fb5f119
[ "MIT" ]
59
2015-07-11T18:53:59.000Z
2021-09-08T03:16:17.000Z
finsky/protos/book_doc_details_pb2.py
mmcloughlin/finsky
f21ccdbebf86e55a542c658b6972cb1f3fb5f119
[ "MIT" ]
10
2015-07-01T08:09:29.000Z
2021-12-06T01:23:00.000Z
finsky/protos/book_doc_details_pb2.py
mmcloughlin/finsky
f21ccdbebf86e55a542c658b6972cb1f3fb5f119
[ "MIT" ]
14
2015-08-15T22:04:02.000Z
2021-03-03T09:14:39.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: book_doc_details.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection ...
38.05
369
0.750066
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: book_doc_details.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection ...
0
0
0
8b3e705ea470405e32c4419d8579f4b5bcce600d
4,095
py
Python
examples/wallstreetbets-analytics/aggregates/aggregate.py
admariner/beneath
a6aa2c220e4a646be792379528ae673f4bef440b
[ "MIT" ]
65
2021-04-27T13:13:09.000Z
2022-01-24T00:26:06.000Z
examples/wallstreetbets-analytics/aggregates/aggregate.py
admariner/beneath
a6aa2c220e4a646be792379528ae673f4bef440b
[ "MIT" ]
22
2021-10-06T10:30:40.000Z
2021-12-10T11:36:55.000Z
examples/wallstreetbets-analytics/aggregates/aggregate.py
admariner/beneath
a6aa2c220e4a646be792379528ae673f4bef440b
[ "MIT" ]
4
2021-04-24T15:29:51.000Z
2022-03-30T16:20:12.000Z
import asyncio import beneath from datetime import datetime, timedelta from config import BLACKLIST asyncio.run(main())
44.032258
172
0.689621
import asyncio import beneath from datetime import datetime, timedelta from config import BLACKLIST async def main(): client = beneath.Client() await client.start() # TABLE 1: indexed by symbol table = await client.find_table( "examples/wallstreetbets-analytics/stock-metrics-24h-by-symbol" ...
3,948
0
23
9e76014eb85bcda4f6997a33f3f39af789aa84ff
2,866
py
Python
tests/test_send_commands.py
lig/ansq
ef734e143a2f982f92616611b1c7b2d7f0c4cc92
[ "MIT" ]
14
2020-05-22T22:54:04.000Z
2022-02-16T12:15:45.000Z
tests/test_send_commands.py
Ivashkaization/ansq
f89d0ad29fa067ab0169fdee2910aff58b65c790
[ "MIT" ]
31
2020-05-28T12:10:45.000Z
2022-03-31T04:39:48.000Z
tests/test_send_commands.py
Ivashkaization/ansq
f89d0ad29fa067ab0169fdee2910aff58b65c790
[ "MIT" ]
7
2020-05-28T10:40:03.000Z
2022-03-28T19:54:02.000Z
import asyncio from time import sleep, time import pytest from ansq import open_connection from ansq.tcp.connection import NSQConnection from ansq.tcp.exceptions import ConnectionClosedError @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.ma...
24.084034
81
0.7097
import asyncio from time import sleep, time import pytest from ansq import open_connection from ansq.tcp.connection import NSQConnection from ansq.tcp.exceptions import ConnectionClosedError @pytest.mark.asyncio async def test_command_pub(): nsq = await open_connection() assert nsq.status.is_connected ...
2,313
0
176
f7b882e2ba7b43a7c88aa4eb623d02e8e8a6b467
476
py
Python
Python/EXERCICIOS/FOR/CRV054 - FOR.py
ccpn1988/Python
94c84aa6f3ef9d05d64c3d87212dfd67694f4544
[ "MIT" ]
null
null
null
Python/EXERCICIOS/FOR/CRV054 - FOR.py
ccpn1988/Python
94c84aa6f3ef9d05d64c3d87212dfd67694f4544
[ "MIT" ]
null
null
null
Python/EXERCICIOS/FOR/CRV054 - FOR.py
ccpn1988/Python
94c84aa6f3ef9d05d64c3d87212dfd67694f4544
[ "MIT" ]
null
null
null
# 054 - LER ANO DE NASCIMENTO DE 07 PESSOAS E MOSTRAR QUANTAS PESSOAS SÂO MAIORES DE IDADE. from datetime import date atual = date.today().year tmaior = 0 tmenor = 0 for pessoa in range(1, 8): nasc = int(input(f'Em que ano {pessoa}° a pessoa nasceu? ')) idade = atual - nasc if idade >= 21: tmaior +...
29.75
91
0.668067
# 054 - LER ANO DE NASCIMENTO DE 07 PESSOAS E MOSTRAR QUANTAS PESSOAS SÂO MAIORES DE IDADE. from datetime import date atual = date.today().year tmaior = 0 tmenor = 0 for pessoa in range(1, 8): nasc = int(input(f'Em que ano {pessoa}° a pessoa nasceu? ')) idade = atual - nasc if idade >= 21: tmaior +...
0
0
0
0da64122a0a753645e96c62f0e39c3e1eb7eb001
956
py
Python
app/api/permissions.py
sashis/eduquate
9157d59d428e8bbd272d14f8b09c07c957dacdb7
[ "MIT" ]
null
null
null
app/api/permissions.py
sashis/eduquate
9157d59d428e8bbd272d14f8b09c07c957dacdb7
[ "MIT" ]
null
null
null
app/api/permissions.py
sashis/eduquate
9157d59d428e8bbd272d14f8b09c07c957dacdb7
[ "MIT" ]
null
null
null
from functools import reduce from rest_framework.permissions import BasePermission, SAFE_METHODS
28.969697
86
0.680962
from functools import reduce from rest_framework.permissions import BasePermission, SAFE_METHODS class IsObjectOwner(BasePermission): def has_object_permission(self, request, view, obj): assert hasattr(view, 'owner_field'), ( f"{view.__class__.__name__} class has no 'owner_field' attribute d...
646
34
175
35eed1f3fa046377e6452e930c53cfaad4133e33
755
py
Python
sera/commands/install.py
bretth/sera
507976b9ace58bdf4c8055dbfcf2fc10840eacb2
[ "Apache-2.0" ]
null
null
null
sera/commands/install.py
bretth/sera
507976b9ace58bdf4c8055dbfcf2fc10840eacb2
[ "Apache-2.0" ]
12
2016-10-04T20:19:45.000Z
2017-01-31T03:59:57.000Z
sera/commands/install.py
bretth/sera
507976b9ace58bdf4c8055dbfcf2fc10840eacb2
[ "Apache-2.0" ]
null
null
null
import shutil import click from .main import main from ..settings import service_template @main.group("install") def install(): """Install a configuration or service""" @install.command() @click.pass_context @click.option('--path', '-p', help="Path to installed file") def sera(ctx, path): """Locally insta...
25.166667
60
0.660927
import shutil import click from .main import main from ..settings import service_template @main.group("install") def install(): """Install a configuration or service""" @install.command() @click.pass_context @click.option('--path', '-p', help="Path to installed file") def sera(ctx, path): """Locally insta...
0
0
0
a6172a57ec332dc717fbcf4654e3a076ea850e06
760
py
Python
app/settings.py
zhenyit/mask_detection
c381e262118ee06a5f6c3d48ce885972ccde217e
[ "MIT" ]
1
2021-02-21T12:07:04.000Z
2021-02-21T12:07:04.000Z
app/settings.py
zhenyit/mask_detection
c381e262118ee06a5f6c3d48ce885972ccde217e
[ "MIT" ]
null
null
null
app/settings.py
zhenyit/mask_detection
c381e262118ee06a5f6c3d48ce885972ccde217e
[ "MIT" ]
null
null
null
import os from datetime import timedelta from dotenv import load_dotenv load_dotenv() SECRET_KEY = os.urandom(32) # SQLite Database Config APP_PATH = os.path.dirname(os.path.abspath(__file__)) SQLALCHEMY_DATABASE_URI = 'sqlite:///' + APP_PATH + '/models/sqlite.db' SQLALCHEMY_TRACK_MODIFICATIONS = True # setting up...
25.333333
71
0.738158
import os from datetime import timedelta from dotenv import load_dotenv load_dotenv() SECRET_KEY = os.urandom(32) # SQLite Database Config APP_PATH = os.path.dirname(os.path.abspath(__file__)) SQLALCHEMY_DATABASE_URI = 'sqlite:///' + APP_PATH + '/models/sqlite.db' SQLALCHEMY_TRACK_MODIFICATIONS = True # setting up...
0
0
0
98f192a8bc04e0f17848096cd40ed569b3cb8d09
7,430
py
Python
TokenScraper/CoinMarketCap Dev API/coincap_ERC-20_DevAPI.py
SamIlic/Web-Scraping
fae1e0b000adda18abff44e4c60fbad77e872314
[ "MIT" ]
1
2022-02-22T12:15:28.000Z
2022-02-22T12:15:28.000Z
TokenScraper/CoinMarketCap Dev API/coincap_ERC-20_DevAPI.py
SamIlic/Web-Scraping
fae1e0b000adda18abff44e4c60fbad77e872314
[ "MIT" ]
null
null
null
TokenScraper/CoinMarketCap Dev API/coincap_ERC-20_DevAPI.py
SamIlic/Web-Scraping
fae1e0b000adda18abff44e4c60fbad77e872314
[ "MIT" ]
1
2022-02-22T12:15:30.000Z
2022-02-22T12:15:30.000Z
""" # NOTE (for Sam): Run on "QSTrader" Conda Virtual Enviroment > "source activate QSTrader" > Run via "python coincap_ERC-20_ranker.py" Summary of script 1) Open Top ERC-20 file & create a DataFrame with the info 2) Get ID's for all ERC-20 tokens using Global API 3) Use Ticker(Specific Currency)...
34.55814
142
0.664065
""" # NOTE (for Sam): Run on "QSTrader" Conda Virtual Enviroment > "source activate QSTrader" > Run via "python coincap_ERC-20_ranker.py" Summary of script 1) Open Top ERC-20 file & create a DataFrame with the info 2) Get ID's for all ERC-20 tokens using Global API 3) Use Ticker(Specific Currency)...
0
0
0
95785ab1ca666f93525815ee3dd8bb11851fa2b1
862
py
Python
bot.py
DreamBNC/Python-Service-Bot
2625e471e332de7a99f1933f82437c54ec97af97
[ "MIT" ]
1
2016-08-09T21:29:52.000Z
2016-08-09T21:29:52.000Z
bot.py
DreamBNC/Python-Service-Bot
2625e471e332de7a99f1933f82437c54ec97af97
[ "MIT" ]
null
null
null
bot.py
DreamBNC/Python-Service-Bot
2625e471e332de7a99f1933f82437c54ec97af97
[ "MIT" ]
null
null
null
# WIP # DreamBNC Bot 2 # (c) DreamBNC # Loading essential libraries (needed for connecting to IRC) import zirc, ssl print("DreamBNC Service Bot") print("(c) 2016 DreamBNC dev team.") print("Initalizing.") # setting variables bncprovider = DreamBNC bncweb = dreambnc.xyz server1 = Mushroom print("Initalized; connectin...
24.628571
62
0.726218
# WIP # DreamBNC Bot 2 # (c) DreamBNC # Loading essential libraries (needed for connecting to IRC) import zirc, ssl print("DreamBNC Service Bot") print("(c) 2016 DreamBNC dev team.") print("Initalizing.") # setting variables bncprovider = DreamBNC bncweb = dreambnc.xyz server1 = Mushroom print("Initalized; connectin...
-2
87
22
3ae785bd76a0b7c709a9fbc4fef0f36252efeff6
765
py
Python
sus/tests/test_engines.py
ResupinePuma/SUS
f1035482d9a911e472385fe724fc4583c2c67ffd
[ "MIT" ]
1
2022-02-20T17:50:43.000Z
2022-02-20T17:50:43.000Z
sus/tests/test_engines.py
ResupinePuma/SUS
f1035482d9a911e472385fe724fc4583c2c67ffd
[ "MIT" ]
null
null
null
sus/tests/test_engines.py
ResupinePuma/SUS
f1035482d9a911e472385fe724fc4583c2c67ffd
[ "MIT" ]
null
null
null
from sus.engines import telegram, reddit, rss import vcr import unittest
36.428571
135
0.679739
from sus.engines import telegram, reddit, rss import vcr import unittest class EngineTests(unittest.TestCase): @vcr.use_cassette('./sus/tests/cassettes/telegram.yaml') def test_telegram(self): self.assertGreater(len(telegram.scrab({"url": "https://t.me/s/durov", "time_limit_hours": 24*31*6})), 0) ...
381
272
23
ff3ee4e0aa72c96a6b61185f57659ec9f099df4c
3,401
py
Python
Quantize/Quantizers_test.py
stevenygd/TensorQuant-Experiment
f084b57c22a3c2d4fa49d77b56a35e9017149789
[ "Apache-2.0" ]
null
null
null
Quantize/Quantizers_test.py
stevenygd/TensorQuant-Experiment
f084b57c22a3c2d4fa49d77b56a35e9017149789
[ "Apache-2.0" ]
null
null
null
Quantize/Quantizers_test.py
stevenygd/TensorQuant-Experiment
f084b57c22a3c2d4fa49d77b56a35e9017149789
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf import numpy as np import Quantizers import math import time import struct from tensorflow.python.ops import standard_ops from tensorflow.python.ops import nn hex_lambda = lambda x : hex(struct.unpack('<I', struct.pack('<f', x))[0]) toHex = np.vectorize(hex_lambda) input_width = input_height...
29.068376
104
0.707439
import tensorflow as tf import numpy as np import Quantizers import math import time import struct from tensorflow.python.ops import standard_ops from tensorflow.python.ops import nn hex_lambda = lambda x : hex(struct.unpack('<I', struct.pack('<f', x))[0]) toHex = np.vectorize(hex_lambda) input_width = input_height...
393
0
92
298728a2e15813871cd0299700345ed04b777f24
3,044
py
Python
airflow/sensors/hive_partition_sensor.py
suensummit/airflow
37a342d0e96a91ce2d34085e225a4e86f54c4e21
[ "Apache-2.0" ]
3
2019-10-03T21:38:59.000Z
2019-10-04T00:39:03.000Z
airflow/sensors/hive_partition_sensor.py
suensummit/airflow
37a342d0e96a91ce2d34085e225a4e86f54c4e21
[ "Apache-2.0" ]
20
2017-04-18T19:47:46.000Z
2020-01-13T04:19:24.000Z
airflow/sensors/hive_partition_sensor.py
suensummit/airflow
37a342d0e96a91ce2d34085e225a4e86f54c4e21
[ "Apache-2.0" ]
5
2017-06-19T19:55:47.000Z
2020-10-10T00:49:20.000Z
# -*- 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 #...
40.052632
91
0.669842
# -*- 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 #...
1,045
0
53
56975f404ec591ff536aa967cda09455639f1f89
7,627
py
Python
app/controllers/admin/routes.py
BCStudentSoftwareDevTeam/celts
b14f3aea8fb3777d9e04feafbbb0f23f02ad5cf5
[ "BSD-3-Clause" ]
null
null
null
app/controllers/admin/routes.py
BCStudentSoftwareDevTeam/celts
b14f3aea8fb3777d9e04feafbbb0f23f02ad5cf5
[ "BSD-3-Clause" ]
147
2021-06-11T18:27:53.000Z
2022-03-22T18:50:35.000Z
app/controllers/admin/routes.py
BCStudentSoftwareDevTeam/celts
b14f3aea8fb3777d9e04feafbbb0f23f02ad5cf5
[ "BSD-3-Clause" ]
2
2021-09-16T18:46:21.000Z
2021-11-10T19:10:17.000Z
from flask import request, render_template, url_for, g, Flask, redirect, flash, abort, json, jsonify, session from peewee import DoesNotExist from playhouse.shortcuts import model_to_dict, dict_to_model import json from datetime import datetime from dateutil import parser from app import app from app.models.program im...
38.715736
133
0.687164
from flask import request, render_template, url_for, g, Flask, redirect, flash, abort, json, jsonify, session from peewee import DoesNotExist from playhouse.shortcuts import model_to_dict, dict_to_model import json from datetime import datetime from dateutil import parser from app import app from app.models.program im...
4,611
0
176
a04c386a7755577c38e7b1543dff12ea31edb648
2,259
py
Python
abrir_cam.py
kbueso/Python
a18a23bbf6ba3f214c2ed751a20348fe415c6dbe
[ "MIT" ]
null
null
null
abrir_cam.py
kbueso/Python
a18a23bbf6ba3f214c2ed751a20348fe415c6dbe
[ "MIT" ]
null
null
null
abrir_cam.py
kbueso/Python
a18a23bbf6ba3f214c2ed751a20348fe415c6dbe
[ "MIT" ]
null
null
null
import cv2 as cv import functions import os cam = cv.VideoCapture(0) #Iniciando WebCam file_name = "haarcascade_frontalface_alt2.xml" classifier = cv.CascadeClassifier(f"{cv.haarcascades}{os.sep}{file_name}") #Modelo para reconhecer faces dataframe = functions.load_dataframe() #Cargando dataframe com las imagenes par...
35.296875
132
0.654714
import cv2 as cv import functions import os cam = cv.VideoCapture(0) #Iniciando WebCam file_name = "haarcascade_frontalface_alt2.xml" classifier = cv.CascadeClassifier(f"{cv.haarcascades}{os.sep}{file_name}") #Modelo para reconhecer faces dataframe = functions.load_dataframe() #Cargando dataframe com las imagenes par...
0
0
0
d2a0ec8516b7c6d8905c9cf4d37d838a8a61333c
1,911
py
Python
app/images.py
jkpawlowski96/Web-scraper
5b6db52198b10e6de619a4db7e5a1ba652e98c45
[ "MIT" ]
1
2021-05-16T16:30:37.000Z
2021-05-16T16:30:37.000Z
app/images.py
jkpawlowski96/Web-scraper
5b6db52198b10e6de619a4db7e5a1ba652e98c45
[ "MIT" ]
null
null
null
app/images.py
jkpawlowski96/Web-scraper
5b6db52198b10e6de619a4db7e5a1ba652e98c45
[ "MIT" ]
null
null
null
from PIL import Image import urllib.request as request import requests from io import BytesIO, StringIO from bs4 import BeautifulSoup import numpy as np def get_images_links(address): """ Scrap website from images links :param address: website address example: https://www.youtube.com/ :return: images ...
24.818182
92
0.644689
from PIL import Image import urllib.request as request import requests from io import BytesIO, StringIO from bs4 import BeautifulSoup import numpy as np def get_images_links(address): """ Scrap website from images links :param address: website address example: https://www.youtube.com/ :return: images ...
0
0
0
436633cf53bf232151db89075191af639502c428
1,770
py
Python
ck/connection/http.py
hczhcz/PyCK
6a635c0bd911bef413400ae348e38ea5e85c4e6b
[ "MIT" ]
3
2020-03-19T10:10:20.000Z
2020-12-26T10:53:37.000Z
ck/connection/http.py
hczhcz/PyCK
6a635c0bd911bef413400ae348e38ea5e85c4e6b
[ "MIT" ]
null
null
null
ck/connection/http.py
hczhcz/PyCK
6a635c0bd911bef413400ae348e38ea5e85c4e6b
[ "MIT" ]
3
2020-11-05T02:42:38.000Z
2021-03-24T06:39:41.000Z
import http.client import threading import typing
23.918919
74
0.567232
import http.client import threading import typing def run_http( host: str, port: int, path: str, headers: typing.Dict[str, str], gen_stdin: typing.Generator[bytes, None, None], gen_stdout: typing.Generator[None, bytes, None], gen_stderr: typing.Generator[None, b...
1,696
0
23
976023701895aae99b62d02a4f829bb4c063b92c
7,200
py
Python
model/dsc.py
Mhaiyang/iccv
04a8ee52c2323d7ff5cdf03c0be1466e8180d2eb
[ "MIT" ]
2
2019-01-10T03:44:03.000Z
2019-05-24T08:50:14.000Z
model/dsc.py
Mhaiyang/iccv
04a8ee52c2323d7ff5cdf03c0be1466e8180d2eb
[ "MIT" ]
null
null
null
model/dsc.py
Mhaiyang/iccv
04a8ee52c2323d7ff5cdf03c0be1466e8180d2eb
[ "MIT" ]
null
null
null
""" @Time : 2019-1-9 04:41 @Author : TaylorMei @Email : mhy845879017@gmail.com @Project : iccv @File : dsc.py @Function: """ import torch import torch.nn.functional as F from torch import nn from backbone.resnext.resnext101_regular import ResNeXt101 # Module Function # Module Class ...
38.709677
114
0.650833
""" @Time : 2019-1-9 04:41 @Author : TaylorMei @Email : mhy845879017@gmail.com @Project : iccv @File : dsc.py @Function: """ import torch import torch.nn.functional as F from torch import nn from backbone.resnext.resnext101_regular import ResNeXt101 # Module Function # Module Class clas...
6,545
17
302
e2b1f43d3ecbc2dea164169f5ea8f19cfc51fd32
756
py
Python
utils/discriminators/DiscriminatorGAN.py
ynakaDream/Deep-Learning-GANs
2e00405079c131245f4dd23eb494a27a2b12598d
[ "MIT" ]
4
2019-01-14T04:38:51.000Z
2020-02-13T20:38:10.000Z
utils/discriminators/DiscriminatorGAN.py
ynakaDream/Deep-Learning-GANs
2e00405079c131245f4dd23eb494a27a2b12598d
[ "MIT" ]
null
null
null
utils/discriminators/DiscriminatorGAN.py
ynakaDream/Deep-Learning-GANs
2e00405079c131245f4dd23eb494a27a2b12598d
[ "MIT" ]
null
null
null
import torch.nn as nn import torch.nn.functional as F
31.5
57
0.596561
import torch.nn as nn import torch.nn.functional as F class DiscriminatorGAN(nn.Module): def __init__(self, input, output): super().__init__() self.fc1 = nn.Linear(input, 128) self.fc2 = nn.Linear(128, 256) self.fc3 = nn.Linear(256, 512) self.fc4 = nn.Linear(512, 1024) ...
612
13
76
3dffd45d760d1e054befe2d05fa6f64fc356cc1e
41
py
Python
thread-renderer/src/generating/__init__.py
FToovvr/adnmb-quests-tools
eb3c594cb94ff803edde4705ab67e8de060c7efb
[ "MIT" ]
null
null
null
thread-renderer/src/generating/__init__.py
FToovvr/adnmb-quests-tools
eb3c594cb94ff803edde4705ab67e8de060c7efb
[ "MIT" ]
null
null
null
thread-renderer/src/generating/__init__.py
FToovvr/adnmb-quests-tools
eb3c594cb94ff803edde4705ab67e8de060c7efb
[ "MIT" ]
null
null
null
from .generating import OutputsGenerator
20.5
40
0.878049
from .generating import OutputsGenerator
0
0
0
e1e1b6141776eb67390f56f962e945f8ae672af2
735
py
Python
NitrotypePy/api/access.py
RangerEmerald/NitrotypePy
b68e9ce8918708778def249c2f57ffc49926d805
[ "MIT" ]
1
2022-02-02T03:06:58.000Z
2022-02-02T03:06:58.000Z
NitrotypePy/api/access.py
RangerEmerald/NitrotypePy
b68e9ce8918708778def249c2f57ffc49926d805
[ "MIT" ]
null
null
null
NitrotypePy/api/access.py
RangerEmerald/NitrotypePy
b68e9ce8918708778def249c2f57ffc49926d805
[ "MIT" ]
null
null
null
try: import cloudscraper except ModuleNotFoundError: raise ModuleNotFoundError("Unable to load cloudscraper") def access(endpoint=""): """The function used to access the entirety of nitrotype. Endpoint -------- https://www.nitrotype.com/{endpoint} endpoint : str The end url t...
21.617647
71
0.619048
try: import cloudscraper except ModuleNotFoundError: raise ModuleNotFoundError("Unable to load cloudscraper") def access(endpoint=""): """The function used to access the entirety of nitrotype. Endpoint -------- https://www.nitrotype.com/{endpoint} endpoint : str The end url t...
0
0
0
6de67a6f2629812232468239d97bf3449d0dd06f
953
py
Python
example/backend/migrations/0006_auto_20211122_0910.py
martimarkov/django-ajax-datatable
d132504a199cb2afe2cfd74a2e6d5d5f2969c4a4
[ "MIT" ]
1
2021-11-19T13:36:30.000Z
2021-11-19T13:36:30.000Z
example/backend/migrations/0006_auto_20211122_0910.py
martimarkov/django-ajax-datatable
d132504a199cb2afe2cfd74a2e6d5d5f2969c4a4
[ "MIT" ]
null
null
null
example/backend/migrations/0006_auto_20211122_0910.py
martimarkov/django-ajax-datatable
d132504a199cb2afe2cfd74a2e6d5d5f2969c4a4
[ "MIT" ]
null
null
null
# Generated by Django 3.0.8 on 2021-11-22 09:10 from django.db import migrations, models
30.741935
127
0.559286
# Generated by Django 3.0.8 on 2021-11-22 09:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('backend', '0005_auto_20210606_0651'), ] operations = [ migrations.CreateModel( name='Tag2', fields=[ ...
0
839
23
93f832cdbf2242b47ab3b0ac7e517856e501a723
16,675
py
Python
ChecklistPanel.py
bopopescu/Lauecollect
60ae2b05ea8596ba0decf426e37aeaca0bc8b6be
[ "MIT" ]
null
null
null
ChecklistPanel.py
bopopescu/Lauecollect
60ae2b05ea8596ba0decf426e37aeaca0bc8b6be
[ "MIT" ]
1
2019-10-22T21:28:31.000Z
2019-10-22T21:39:12.000Z
ChecklistPanel.py
bopopescu/Lauecollect
60ae2b05ea8596ba0decf426e37aeaca0bc8b6be
[ "MIT" ]
2
2019-06-06T15:06:46.000Z
2020-07-20T02:03:22.000Z
#!/usr/bin/env python """Controls when data collection is suspended, in case the X-ray beam is down Friedrich Schotte, Date created: 2017-02-24 Date last modified: 2018-03-15 """ __version__ = "1.2.9" # logging from checklist import checklist import wx, wx3_compatibility from EditableControls import TextCtrl,Combo...
36.487965
86
0.610735
#!/usr/bin/env python """Controls when data collection is suspended, in case the X-ray beam is down Friedrich Schotte, Date created: 2017-02-24 Date last modified: 2018-03-15 """ __version__ = "1.2.9" # logging from checklist import checklist import wx, wx3_compatibility from EditableControls import TextCtrl,Combo...
7,469
8,329
69
60ac941679c0f11de1c3686002d8acf273e59fd2
21,830
py
Python
PrevendoCustomerChurnEmOperadorasDeTelecom.py
luizfmello01/Projeto04_PrevendoCustomerChurnEmOperadorasDeTelecom
ac0119a9cd07ee9cea7e20247cb0b571b801d937
[ "MIT" ]
null
null
null
PrevendoCustomerChurnEmOperadorasDeTelecom.py
luizfmello01/Projeto04_PrevendoCustomerChurnEmOperadorasDeTelecom
ac0119a9cd07ee9cea7e20247cb0b571b801d937
[ "MIT" ]
null
null
null
PrevendoCustomerChurnEmOperadorasDeTelecom.py
luizfmello01/Projeto04_PrevendoCustomerChurnEmOperadorasDeTelecom
ac0119a9cd07ee9cea7e20247cb0b571b801d937
[ "MIT" ]
null
null
null
# Bibliotecas import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import numpy as np from scipy.stats import shapiro from scipy.stats import chi2 from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import StandardScaler from sklearn.feature_selection import...
28.498695
436
0.736051
# Bibliotecas import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import numpy as np from scipy.stats import shapiro from scipy.stats import chi2 from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import StandardScaler from sklearn.feature_selection import...
2,449
0
112
b54cc2f8011e885fcaf35b074d8ab57d62f80215
178
py
Python
extheano/__init__.py
koheimiya/extheano
ea099a6395ca8772660b2c715fb26cde12738181
[ "MIT" ]
2
2016-06-13T13:58:23.000Z
2017-04-05T05:19:56.000Z
extheano/__init__.py
koheimiya/extheano
ea099a6395ca8772660b2c715fb26cde12738181
[ "MIT" ]
null
null
null
extheano/__init__.py
koheimiya/extheano
ea099a6395ca8772660b2c715fb26cde12738181
[ "MIT" ]
null
null
null
__all__ = [] from .nodebuffer import NodeBuffer, NodeDescriptor, BufferSet from .nodebuffer import Scanner as _Scanner scan = _Scanner.scan from .jit import JITCompiler as jit
22.25
61
0.797753
__all__ = [] from .nodebuffer import NodeBuffer, NodeDescriptor, BufferSet from .nodebuffer import Scanner as _Scanner scan = _Scanner.scan from .jit import JITCompiler as jit
0
0
0
56c2047b0a57c8dc94ee7191641a00a00c0de033
5,344
py
Python
scripts/generative/gvae_exp.py
choderalab/pinot
413a349ab42912d8a668a645effde8e70ba608a6
[ "MIT" ]
13
2020-03-23T21:53:06.000Z
2021-09-28T19:29:35.000Z
scripts/generative/gvae_exp.py
choderalab/pinot
413a349ab42912d8a668a645effde8e70ba608a6
[ "MIT" ]
89
2020-03-27T21:18:55.000Z
2021-04-02T19:36:50.000Z
scripts/generative/gvae_exp.py
choderalab/pinot
413a349ab42912d8a668a645effde8e70ba608a6
[ "MIT" ]
2
2020-04-25T03:23:40.000Z
2021-02-19T18:35:27.000Z
from __future__ import division from __future__ import print_function import argparse parser = argparse.ArgumentParser() parser.add_argument('--epochs', type=int, default=100, help='Number of epochs to train.') parser.add_argument('--split',nargs='+', type=float, default=[0.9, 0.1, 0.], help="train, test, validation ...
38.724638
158
0.690868
from __future__ import division from __future__ import print_function import argparse parser = argparse.ArgumentParser() parser.add_argument('--epochs', type=int, default=100, help='Number of epochs to train.') parser.add_argument('--split',nargs='+', type=float, default=[0.9, 0.1, 0.], help="train, test, validation ...
3,722
0
138
8622ecd45a8d63e35951cef4e1bacd406e0af713
69,136
py
Python
kuber/latest/authorization_v1.py
datalayer-externals/kuber
4d577950ce7d1be2b882fbe66827dc3d7e67b350
[ "MIT" ]
1
2019-06-11T04:57:34.000Z
2019-06-11T04:57:34.000Z
kuber/latest/authorization_v1.py
datalayer-externals/kuber
4d577950ce7d1be2b882fbe66827dc3d7e67b350
[ "MIT" ]
1
2019-05-05T22:08:13.000Z
2019-05-06T11:43:32.000Z
kuber/latest/authorization_v1.py
datalayer-externals/kuber
4d577950ce7d1be2b882fbe66827dc3d7e67b350
[ "MIT" ]
2
2021-05-08T14:47:56.000Z
2021-10-15T21:47:04.000Z
import typing # noqa: F401 from kubernetes import client # noqa: F401 from kuber import kube_api as _kube_api # noqa: F401 from kuber import definitions as _kuber_definitions # noqa: F401 from kuber import _types # noqa: F401 from kuber.latest.meta_v1 import ListMeta # noqa: F401 from kuber.latest.meta_v1 impor...
32.321646
88
0.592007
import typing # noqa: F401 from kubernetes import client # noqa: F401 from kuber import kube_api as _kube_api # noqa: F401 from kuber import definitions as _kuber_definitions # noqa: F401 from kuber import _types # noqa: F401 from kuber.latest.meta_v1 import ListMeta # noqa: F401 from kuber.latest.meta_v1 impor...
1,202
0
702
8ad10cf34c4403953a74288a3efa2108f1669f41
4,360
py
Python
safe_transaction_service/history/tests/test_index_service.py
becoswap-dev/safe-transaction-service
bf2d3060874ee6f4d7883f15780cfa6456d9d9cf
[ "MIT" ]
67
2019-08-16T16:26:42.000Z
2022-03-21T20:32:43.000Z
safe_transaction_service/history/tests/test_index_service.py
becoswap-dev/safe-transaction-service
bf2d3060874ee6f4d7883f15780cfa6456d9d9cf
[ "MIT" ]
550
2019-07-11T12:09:06.000Z
2022-03-31T16:32:00.000Z
safe_transaction_service/history/tests/test_index_service.py
becoswap-dev/safe-transaction-service
bf2d3060874ee6f4d7883f15780cfa6456d9d9cf
[ "MIT" ]
83
2019-12-06T11:22:32.000Z
2022-03-30T10:09:22.000Z
from django.test import TestCase from eth_account import Account from web3 import Web3 from gnosis.eth.tests.ethereum_test_case import EthereumTestCaseMixin from ..models import EthereumTx, MultisigTransaction, SafeStatus from ..services.index_service import ( EthereumBlockHashMismatch, IndexService, Ind...
42.745098
110
0.718119
from django.test import TestCase from eth_account import Account from web3 import Web3 from gnosis.eth.tests.ethereum_test_case import EthereumTestCaseMixin from ..models import EthereumTx, MultisigTransaction, SafeStatus from ..services.index_service import ( EthereumBlockHashMismatch, IndexService, Ind...
3,758
35
103
d77f9868884df422417b5e97e91ff3e08b0c1013
37,960
py
Python
tests/tests_bian.py
devashah1992/bianPython
e0b92b092c23c07d09446abf5f5d765e0bfe1c4e
[ "MIT" ]
null
null
null
tests/tests_bian.py
devashah1992/bianPython
e0b92b092c23c07d09446abf5f5d765e0bfe1c4e
[ "MIT" ]
null
null
null
tests/tests_bian.py
devashah1992/bianPython
e0b92b092c23c07d09446abf5f5d765e0bfe1c4e
[ "MIT" ]
null
null
null
from __future__ import print_function from faker import Faker from flask import Flask, request from requests.auth import * from flask_restful import Api import json from nose.tools import eq_ from halo_flask.exceptions import ApiError from halo_flask.flask.utilx import status from halo_bian.bian.abs_bian_srv import Ab...
47.688442
217
0.653056
from __future__ import print_function from faker import Faker from flask import Flask, request from requests.auth import * from flask_restful import Api import json from nose.tools import eq_ from halo_flask.exceptions import ApiError from halo_flask.flask.utilx import status from halo_bian.bian.abs_bian_srv import Ab...
33,436
968
2,340
76ea23e2c20a282da1d09a527396d6354b723e6a
14,852
py
Python
tripleo_common/image/builder/buildah.py
openstack/tripleo-common
7e8942329a453142155763851a3b19251bbe662b
[ "Apache-2.0" ]
52
2015-04-17T12:06:09.000Z
2021-11-23T09:46:30.000Z
tripleo_common/image/builder/buildah.py
openstack/tripleo-common
7e8942329a453142155763851a3b19251bbe662b
[ "Apache-2.0" ]
null
null
null
tripleo_common/image/builder/buildah.py
openstack/tripleo-common
7e8942329a453142155763851a3b19251bbe662b
[ "Apache-2.0" ]
47
2015-10-09T15:22:38.000Z
2021-04-22T04:35:57.000Z
# Copyright 2019 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
38.677083
78
0.588406
# Copyright 2019 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
0
0
0
2510f4d75121878a4de9bf307f8d87dc38d3a446
4,976
py
Python
deep_phospho/proteomics_utils/gen_dp_lib.py
weizhenFrank/DeepPhospho
e720b867528d92f9a1a5ec840484989af2b8eb63
[ "MIT" ]
2
2021-11-25T01:06:18.000Z
2021-12-22T06:34:53.000Z
deep_phospho/proteomics_utils/gen_dp_lib.py
weizhenFrank/DeepPhospho
e720b867528d92f9a1a5ec840484989af2b8eb63
[ "MIT" ]
null
null
null
deep_phospho/proteomics_utils/gen_dp_lib.py
weizhenFrank/DeepPhospho
e720b867528d92f9a1a5ec840484989af2b8eb63
[ "MIT" ]
1
2021-04-26T03:00:48.000Z
2021-04-26T03:00:48.000Z
import os import re import json import pandas as pd from deep_phospho import proteomics_utils as prot_utils from deep_phospho.proteomics_utils.post_analysis import spectronaut as SN def generate_spec_lib( data_name, output_folder, pred_ion_path, pred_rt_path, min_frag_inten=5...
37.69697
122
0.668006
import os import re import json import pandas as pd from deep_phospho import proteomics_utils as prot_utils from deep_phospho.proteomics_utils.post_analysis import spectronaut as SN def generate_spec_lib( data_name, output_folder, pred_ion_path, pred_rt_path, min_frag_inten=5...
1,410
0
23
0371c9c42945a8e4ea127cc077ce2715110eed65
3,428
py
Python
old_src/showcontrol.py
cscashby/pi-showcontrol
2cc9b2b34ec8eeebede7609535b3c1e937b700cb
[ "MIT" ]
3
2017-05-07T18:13:09.000Z
2017-08-25T09:35:26.000Z
old_src/showcontrol.py
cscashby/pi-showcontrol
2cc9b2b34ec8eeebede7609535b3c1e937b700cb
[ "MIT" ]
6
2017-05-07T11:36:45.000Z
2017-07-31T15:30:20.000Z
old_src/showcontrol.py
cscashby/pi-showcontrol
2cc9b2b34ec8eeebede7609535b3c1e937b700cb
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import time import signal import sys import os import threading import json import Adafruit_CharLCD as LCD import imp from pythonosc import osc_message_builder from pythonosc import udp_client from pythonosc import dispatcher from pythonosc import osc_server from config import * from lcd import * g...
30.607143
97
0.703326
#!/usr/bin/python3 import time import signal import sys import os import threading import json import Adafruit_CharLCD as LCD import imp from pythonosc import osc_message_builder from pythonosc import udp_client from pythonosc import dispatcher from pythonosc import osc_server from config import * from lcd import * g...
2,666
0
161
49e20921b4c92a181e06cb3bc780c2e8dc4816fd
7,648
py
Python
easytransfer/model_zoo/modeling_utils.py
mczhuge/Kaleido-BERT
50579660fb8dc1e250c7cc40e0f10294c54532e3
[ "MIT" ]
109
2021-04-14T04:15:53.000Z
2022-03-24T05:24:43.000Z
easytransfer/model_zoo/modeling_utils.py
NoLoPhe/Kaleido-BERT
1b14073e3ad3490c50bbd1e7e94846830671b332
[ "MIT" ]
12
2021-04-18T13:21:07.000Z
2022-01-27T09:42:51.000Z
easytransfer/model_zoo/modeling_utils.py
NoLoPhe/Kaleido-BERT
1b14073e3ad3490c50bbd1e7e94846830671b332
[ "MIT" ]
12
2021-04-25T08:40:09.000Z
2022-03-24T08:56:29.000Z
# coding=utf-8 # Copyright (c) 2019 Alibaba PAI team. # # 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 ...
37.674877
116
0.63363
# coding=utf-8 # Copyright (c) 2019 Alibaba PAI team. # # 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 ...
5,993
705
69
b9dc0df31309f5eb24cb2c055d9194cf73ff1aa4
13,013
py
Python
test/test_reward_estimation.py
BaiLiping/BLPtensorforce
01bc0b7130a497c9dfff9caa2fd5df919ffe7552
[ "Apache-2.0" ]
1
2021-12-25T16:54:16.000Z
2021-12-25T16:54:16.000Z
test/test_reward_estimation.py
BaiLiping/BLPtensorforce
01bc0b7130a497c9dfff9caa2fd5df919ffe7552
[ "Apache-2.0" ]
null
null
null
test/test_reward_estimation.py
BaiLiping/BLPtensorforce
01bc0b7130a497c9dfff9caa2fd5df919ffe7552
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Tensorforce Team. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
47.148551
98
0.64474
# Copyright 2020 Tensorforce Team. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
10,890
1,354
23
b60c408e7d5e29894ac397aff64595f1fd2bf711
2,254
py
Python
examples/11_bottles_of_beer/bottles.py
ktruong2004/be434-fall-2021
cad03aa7ce033fa3c813daf48dd9216976e1874b
[ "MIT" ]
null
null
null
examples/11_bottles_of_beer/bottles.py
ktruong2004/be434-fall-2021
cad03aa7ce033fa3c813daf48dd9216976e1874b
[ "MIT" ]
null
null
null
examples/11_bottles_of_beer/bottles.py
ktruong2004/be434-fall-2021
cad03aa7ce033fa3c813daf48dd9216976e1874b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Author : ktruong <ktruong@localhost> Date : 2021-10-25 Purpose: Rock the Casbah """ import argparse import sys # -------------------------------------------------- def get_args(): """Get command-line arguments""" parser = argparse.ArgumentParser( description='Rock the Cas...
26.517647
73
0.484028
#!/usr/bin/env python3 """ Author : ktruong <ktruong@localhost> Date : 2021-10-25 Purpose: Rock the Casbah """ import argparse import sys # -------------------------------------------------- def get_args(): """Get command-line arguments""" parser = argparse.ArgumentParser( description='Rock the Cas...
0
0
0
2e4db69ceefb49cf3e32158d2f245c9d399c644d
10,038
py
Python
app/vsm.py
Informationretrieval2016/furnito_webapp
e2a58918ebde33f9d7c52ed33445f6409d5da4d5
[ "Apache-2.0" ]
null
null
null
app/vsm.py
Informationretrieval2016/furnito_webapp
e2a58918ebde33f9d7c52ed33445f6409d5da4d5
[ "Apache-2.0" ]
null
null
null
app/vsm.py
Informationretrieval2016/furnito_webapp
e2a58918ebde33f9d7c52ed33445f6409d5da4d5
[ "Apache-2.0" ]
null
null
null
import string from invert_index import Invert_Index import config import json import numpy as np import pandas as pd import math from file_reader import File_Reader from file_writer import File_Writer
40.152
114
0.608687
import string from invert_index import Invert_Index import config import json import numpy as np import pandas as pd import math from file_reader import File_Reader from file_writer import File_Writer class VSM: def __init__(self): self.ii = Invert_Index() self.fr = File_Reader() self.fw = ...
296
9,518
23
5bf5d720c8028c2aa7e3bdee89a1800fa00452a8
2,081
py
Python
navegador.py
paulofv/tp-cliente-servidor
8b5d05ae888c983b5a39233a16fc93f3070e497f
[ "BSD-2-Clause" ]
null
null
null
navegador.py
paulofv/tp-cliente-servidor
8b5d05ae888c983b5a39233a16fc93f3070e497f
[ "BSD-2-Clause" ]
null
null
null
navegador.py
paulofv/tp-cliente-servidor
8b5d05ae888c983b5a39233a16fc93f3070e497f
[ "BSD-2-Clause" ]
null
null
null
#coding: utf-8 import sys import socket import os PORT = 80 #porta padrão caso usuário não especifique if len(sys.argv) == 1: # Verifica se o usuario passou pelo menos o parametro obrigatorio print "Nao foi informado a url no paramentro!\n" sys.exit() if len(sys.argv) == 3: # Verifica se o usuario es...
23.382022
101
0.662662
#coding: utf-8 import sys import socket import os PORT = 80 #porta padrão caso usuário não especifique if len(sys.argv) == 1: # Verifica se o usuario passou pelo menos o parametro obrigatorio print "Nao foi informado a url no paramentro!\n" sys.exit() if len(sys.argv) == 3: # Verifica se o usuario es...
0
0
0
ed35599c92749feb364e4b561ea3e5b68d3d86c6
456
py
Python
day6/height.py
dikshaa1702/ml
c35f279b8fa7544517ca713c2c1e55f08270d4c3
[ "Apache-2.0" ]
1
2019-06-13T13:52:09.000Z
2019-06-13T13:52:09.000Z
day6/height.py
dikshaa1702/ml
c35f279b8fa7544517ca713c2c1e55f08270d4c3
[ "Apache-2.0" ]
null
null
null
day6/height.py
dikshaa1702/ml
c35f279b8fa7544517ca713c2c1e55f08270d4c3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon May 13 11:22:01 2019 @author: DiPu """ from functools import reduce people =[{'name': 'Mary', 'height': 160}, {'name': 'Isla', 'height': 80}, {'name': 'Sam'}] b=(list(filter(lambda x: True if 'height' in x else False,people))) g=list(map(lambda x:x['height...
30.4
72
0.609649
# -*- coding: utf-8 -*- """ Created on Mon May 13 11:22:01 2019 @author: DiPu """ from functools import reduce people =[{'name': 'Mary', 'height': 160}, {'name': 'Isla', 'height': 80}, {'name': 'Sam'}] b=(list(filter(lambda x: True if 'height' in x else False,people))) g=list(map(lambda x:x['height...
0
0
0
b9cf41cc30e8da1d9edf096602212846e3958cd2
3,858
py
Python
alan/abstract/questions.py
DotSlashCommunity/alan-server
1a933e4a6b40656cc2413d55a72b498d610f1bd7
[ "MIT" ]
null
null
null
alan/abstract/questions.py
DotSlashCommunity/alan-server
1a933e4a6b40656cc2413d55a72b498d610f1bd7
[ "MIT" ]
null
null
null
alan/abstract/questions.py
DotSlashCommunity/alan-server
1a933e4a6b40656cc2413d55a72b498d610f1bd7
[ "MIT" ]
null
null
null
# @author ksdme # abstracts methods on question model from random import shuffle from alan.db.models import ReplyModel def getQuestion(qno, qmodel): """ read a question from the given qmodel """ try: return qmodel.get(qmodel.id == qno) except qmodel.DoesNotExist: return None def getOffset(using, cycle=2...
20.305263
85
0.681441
# @author ksdme # abstracts methods on question model from random import shuffle from alan.db.models import ReplyModel def getQuestion(qno, qmodel): """ read a question from the given qmodel """ try: return qmodel.get(qmodel.id == qno) except qmodel.DoesNotExist: return None def getOffset(using, cycle=2...
0
0
0
6347be9abf7d48e5ad4f3a89677d852d3403a2d3
753
py
Python
coh2stats/weeklystats/routes.py
ZEDGR/coh2stats
0d6f0f0ca62a57c0644072727d90451f4e3b7a0e
[ "MIT" ]
1
2017-10-15T09:24:20.000Z
2017-10-15T09:24:20.000Z
coh2stats/weeklystats/routes.py
ZEDGR/coh2stats
0d6f0f0ca62a57c0644072727d90451f4e3b7a0e
[ "MIT" ]
1
2021-06-02T00:58:27.000Z
2021-06-02T00:58:27.000Z
coh2stats/weeklystats/routes.py
ZEDGR/coh2stats
0d6f0f0ca62a57c0644072727d90451f4e3b7a0e
[ "MIT" ]
null
null
null
from flask import render_template, Blueprint from coh2stats.weeklystats.utils import get_players_stats from coh2stats.weeklystats.utils import get_teams_stats from coh2stats import dao import os stats = Blueprint('stats', __name__) @stats.route('/weeklystats/1v1/latest') @stats.route('/weeklystats/teams/latest')
31.375
67
0.802125
from flask import render_template, Blueprint from coh2stats.weeklystats.utils import get_players_stats from coh2stats.weeklystats.utils import get_teams_stats from coh2stats import dao import os stats = Blueprint('stats', __name__) @stats.route('/weeklystats/1v1/latest') def weeklystats_1v1(): current_results, p...
390
0
44
321d4d6311b8ff4c4a7b730f362f0523b1db2c8c
1,722
py
Python
5.py
mjenrungrot/AdventOfCode2020
ad2607fe6c4418327a97b863146f7a5af3361afe
[ "MIT" ]
null
null
null
5.py
mjenrungrot/AdventOfCode2020
ad2607fe6c4418327a97b863146f7a5af3361afe
[ "MIT" ]
null
null
null
5.py
mjenrungrot/AdventOfCode2020
ad2607fe6c4418327a97b863146f7a5af3361afe
[ "MIT" ]
null
null
null
import sys if __name__ == '__main__': if len(sys.argv) == 2 and sys.argv[1] == 'extra': extra() else: main()
24.253521
79
0.47619
import sys def extra(): fp = open("5.input") lines = list(map(lambda x: (x.strip()[:7], x.strip()[7:]), fp.readlines())) occupied = set() max_seat_id = -1 for _, line in enumerate(lines): seat = line[0] seat = list(map(lambda ch: int(ch == 'B'), seat)) base = 64 ro...
1,539
0
46