hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
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
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
058a7c137ede0bf5c3a55a3ce41c3dfb2936df30
2,079
py
Python
src/views/list.py
AllForJan/prizma-backend
fe866e74fa01e900cc7eab624bb5716a4bae056d
[ "MIT" ]
2
2018-04-08T22:18:11.000Z
2018-04-26T08:12:46.000Z
src/views/list.py
AllForJan/prizma-backend
fe866e74fa01e900cc7eab624bb5716a4bae056d
[ "MIT" ]
null
null
null
src/views/list.py
AllForJan/prizma-backend
fe866e74fa01e900cc7eab624bb5716a4bae056d
[ "MIT" ]
2
2018-04-08T22:18:13.000Z
2018-04-08T22:18:18.000Z
from elasticsearch import Elasticsearch from flask import request, jsonify from flask_restful import Resource from db.manager import get_conn import settings conn = get_conn() def append_range_filter(f, key, _from, to): d = {} if _from or to: d['range'] = {} d['range'][key] = {} if _fro...
25.353659
89
0.457431
1,636
0.786917
0
0
0
0
0
0
328
0.157768
058ba31e5a3c9cecbd73c880b21c4ea42a75e1cf
3,056
py
Python
tests/test_cli.py
SlawekNowy/vpk
3c9e175f48d8d56b5995387bcaa2c16ec62f9688
[ "MIT" ]
116
2015-08-29T23:24:28.000Z
2022-03-04T19:35:52.000Z
tests/test_cli.py
SlawekNowy/vpk
3c9e175f48d8d56b5995387bcaa2c16ec62f9688
[ "MIT" ]
27
2015-07-30T16:44:17.000Z
2021-12-25T19:00:44.000Z
tests/test_cli.py
SlawekNowy/vpk
3c9e175f48d8d56b5995387bcaa2c16ec62f9688
[ "MIT" ]
21
2015-08-03T23:57:25.000Z
2021-12-21T10:29:59.000Z
import sys import unittest from contextlib import contextmanager try: from io import StringIO except ImportError: from StringIO import StringIO from vpk import cli @contextmanager def capture_stdout(): new_out = StringIO() old_out = sys.stdout try: sys.stdout = new_out yield sys....
35.534884
105
0.634162
2,684
0.878272
176
0.057592
192
0.062827
0
0
505
0.165249
058c253ae43e29116887b045dfd233f62ef4ccf0
218
py
Python
cpab/cpaNd/model/__init__.py
freifeld/cpabDiffeo
22df6cdbd7111b9ae3e7f1c0e31ff85e92d281a6
[ "MIT" ]
17
2016-03-16T21:35:36.000Z
2021-11-11T04:16:21.000Z
cpab/cpaNd/model/__init__.py
freifeld/cpabDiffeo
22df6cdbd7111b9ae3e7f1c0e31ff85e92d281a6
[ "MIT" ]
null
null
null
cpab/cpaNd/model/__init__.py
freifeld/cpabDiffeo
22df6cdbd7111b9ae3e7f1c0e31ff85e92d281a6
[ "MIT" ]
4
2016-08-12T23:02:09.000Z
2019-03-14T18:20:36.000Z
from _LogLikelihood import LogLikelihood from _LogPrior import LogPrior #from _ScaleDependentLogLikelihoodGaussian import ScaleDependentLogLikelihoodGaussian from _ScaleDependentLogPrior import ScaleDependentLogPrior
36.333333
85
0.917431
0
0
0
0
0
0
0
0
85
0.389908
058c66b876771cc78eea5a8cc9478dd196dd972b
1,768
py
Python
authentic/authentic.settings.py
GuillaumeGautierLA/publik
5ef6c19e9b91bf066717b4bc9df2540f4c2e1bc2
[ "MIT" ]
null
null
null
authentic/authentic.settings.py
GuillaumeGautierLA/publik
5ef6c19e9b91bf066717b4bc9df2540f4c2e1bc2
[ "MIT" ]
13
2019-12-21T09:48:42.000Z
2020-07-01T19:12:28.000Z
authentic/authentic.settings.py
GuillaumeGautierLA/publik
5ef6c19e9b91bf066717b4bc9df2540f4c2e1bc2
[ "MIT" ]
4
2020-01-06T16:00:00.000Z
2021-01-08T14:46:29.000Z
# To pass env vars to Python scripts run by Publik in services which remove custom env vars: # https://unix.stackexchange.com/questions/44370/how-to-make-unix-service-see-environment-variables # So we hardcode the values in the file below when the container starts import sys sys.path.insert(0, "/home") from pyenv impor...
26.38806
99
0.750566
0
0
0
0
0
0
0
0
963
0.544683
058f090a9e7707433a3105b87e3e591439fed2ac
8,377
py
Python
code/train/train_model.py
96jhwei/Genetic-U-Net
25116f01afcf8ed4386cd0fc258da15e1c982cb5
[ "MIT" ]
14
2021-09-09T11:22:17.000Z
2022-03-14T10:06:36.000Z
code/train/train_model.py
96jhwei/Genetic-U-Net
25116f01afcf8ed4386cd0fc258da15e1c982cb5
[ "MIT" ]
1
2021-11-24T10:30:36.000Z
2021-11-24T10:30:36.000Z
code/train/train_model.py
96jhwei/Genetic-U-Net
25116f01afcf8ed4386cd0fc258da15e1c982cb5
[ "MIT" ]
5
2021-11-02T09:29:49.000Z
2022-03-25T09:44:25.000Z
import numpy from torch.utils.data import DataLoader from tqdm import tqdm from loss.FocalLoss import FocalLossForSigmoid import torch from metrics.calculate_metrics import calculate_metrics import shutil from metrics.average_meter import AverageMeter import torch.multiprocessing from torch.nn.utils.clip_gra...
45.037634
133
0.493613
0
0
0
0
0
0
0
0
771
0.092038
059016200f557d7398f34c3a96008e7fee9686c3
961
py
Python
dataset/check_for_duplicates.py
mathildor/TF-SegNet
dff209c8174b5e8fa77b4c2644298f6903a09445
[ "MIT" ]
98
2017-11-06T15:55:22.000Z
2022-03-22T11:29:47.000Z
dataset/check_for_duplicates.py
yingz9/TF-SegNet
dff209c8174b5e8fa77b4c2644298f6903a09445
[ "MIT" ]
8
2017-11-15T06:05:41.000Z
2019-06-19T06:53:03.000Z
dataset/check_for_duplicates.py
yingz9/TF-SegNet
dff209c8174b5e8fa77b4c2644298f6903a09445
[ "MIT" ]
34
2017-11-06T03:05:54.000Z
2022-01-25T16:00:09.000Z
import os from PIL import Image import numpy from PIL import ImageChops """ TESTED: No duplicates in: - within validation images first part (stopped because of training - took to much time) """ image_path="../../IR_images/combined_dataset/val_images/images" # image_path="../../IR_images/combined_data...
26.694444
95
0.648283
0
0
0
0
0
0
0
0
427
0.444329
059038232d1c85e48c2eed487377d93d1ad944f4
1,983
py
Python
_posts/import.py
suepeng/suepeng.github.io
844e0063e0604a77886aad5eaea588c4df2792a9
[ "MIT" ]
null
null
null
_posts/import.py
suepeng/suepeng.github.io
844e0063e0604a77886aad5eaea588c4df2792a9
[ "MIT" ]
null
null
null
_posts/import.py
suepeng/suepeng.github.io
844e0063e0604a77886aad5eaea588c4df2792a9
[ "MIT" ]
null
null
null
import os, glob from dateutil import parser from bs4 import BeautifulSoup ext = lambda line, cap: line.replace("\s", "").replace(cap, "").strip() def write_post(doc): meta = { 'title' : ext(doc[0], "TITLE:"), 'date' : parser.parse(ext(doc[2], "DATE:")).strftime("%Y-%m-%d"), 'tag' : ext...
31.983871
86
0.474534
0
0
0
0
0
0
0
0
639
0.322239
0594a8c465e7b18e9888443f247ba1cf8ff7c9cf
702
py
Python
layers/reshape.py
WJGiles/Dorknet
1582937e843b1a911334291c25ea415fb56e5ccc
[ "MIT" ]
null
null
null
layers/reshape.py
WJGiles/Dorknet
1582937e843b1a911334291c25ea415fb56e5ccc
[ "MIT" ]
null
null
null
layers/reshape.py
WJGiles/Dorknet
1582937e843b1a911334291c25ea415fb56e5ccc
[ "MIT" ]
1
2020-07-27T17:03:22.000Z
2020-07-27T17:03:22.000Z
import numpy as np from .layer import Layer class ReshapeLayer: def __init__(self, layer_name, input_shape, output_shape): super.__init__(layer_name) self.input_shape = input_shape self.output_shape = output_shape def __repr__(self): s = "ReshapeLayer(input_shape={}, output_sha...
33.428571
85
0.564103
657
0.935897
0
0
0
0
0
0
47
0.066952
059744913f1e643dc9fe5a6332d2aff7847d00ed
3,342
py
Python
Project/checking_test2.py
mihdenis85/psycho_test
51bbe82043427d48e80ff36197815212c5c2a14c
[ "MIT" ]
null
null
null
Project/checking_test2.py
mihdenis85/psycho_test
51bbe82043427d48e80ff36197815212c5c2a14c
[ "MIT" ]
null
null
null
Project/checking_test2.py
mihdenis85/psycho_test
51bbe82043427d48e80ff36197815212c5c2a14c
[ "MIT" ]
null
null
null
def specialization(a, spec, jobs): if a>=0 and a<=2: return(spec + ': интерес к данной профессиональной сфере не выражен') elif a>=3 and a<=6: return(spec + ': профессиональная направленность и интерес выражены в средней степени. ' + 'Возможно вам будут интересны такие профессии будущего, как ' + j...
27.85
339
0.578995
0
0
0
0
0
0
0
0
2,515
0.561008
05975def902880bc29f1fd9e4b623039913f810f
4,003
py
Python
src/upload/upload.py
alliance-genome/agr_ferret
e2ccef16308b1a8a6f1b2a3dde6e29e0530da721
[ "MIT" ]
2
2020-07-22T14:25:00.000Z
2021-09-20T18:29:08.000Z
src/upload/upload.py
alliance-genome/agr_ferret
e2ccef16308b1a8a6f1b2a3dde6e29e0530da721
[ "MIT" ]
6
2019-09-24T14:09:42.000Z
2021-06-07T15:27:55.000Z
src/upload/upload.py
alliance-genome/agr_ferret
e2ccef16308b1a8a6f1b2a3dde6e29e0530da721
[ "MIT" ]
3
2020-12-19T08:57:51.000Z
2020-12-19T08:58:09.000Z
# Functions for use in downloading files. import logging, os, requests, json, hashlib, urllib from requests_toolbelt.utils import dump from retry import retry logger = logging.getLogger(__name__) def create_md5(worker, filename, save_path): # Generate md5 logger.info('{}: Generating md5 hash for {}.'.format...
51.320513
131
0.673995
0
0
0
0
2,621
0.654759
0
0
1,186
0.296278
0597da213baf4860aef1103fe9f6eaf312ad6be5
9,246
py
Python
Klipps/convert.py
rafalkaron/KindleClippingsBeautifier
10d79da2a073f8867041a2520d7a234937237243
[ "MIT" ]
1
2020-05-25T11:30:54.000Z
2020-05-25T11:30:54.000Z
Klipps/convert.py
rafalkaron/KindleClippingsBeautifier
10d79da2a073f8867041a2520d7a234937237243
[ "MIT" ]
null
null
null
Klipps/convert.py
rafalkaron/KindleClippingsBeautifier
10d79da2a073f8867041a2520d7a234937237243
[ "MIT" ]
null
null
null
# coding: utf-8 import re import datetime from .feed import read_file __author__ = "Rafał Karoń <rafalkaron@gmail.com>" def clipps_str_to_html_str(clipps_str): """Return a string that contains the converted \"Kindle Clippings.txt file\" to HTML.""" # ADD ELEMENTS (SVG favicon encoded with: https://yoksel.gith...
72.234375
4,532
0.701709
0
0
0
0
0
0
0
0
7,915
0.855676
05983c5f355ffca2350a3a76badc57638f8db8e8
1,308
py
Python
rlpy/Domains/__init__.py
okkhoy/rlpy
af25d2011fff1d61cb7c5cc8992549808f0c6103
[ "BSD-3-Clause" ]
265
2015-01-21T08:11:12.000Z
2021-12-21T08:06:21.000Z
rlpy/Domains/__init__.py
okkhoy/rlpy
af25d2011fff1d61cb7c5cc8992549808f0c6103
[ "BSD-3-Clause" ]
22
2015-03-26T17:41:43.000Z
2019-12-19T08:47:36.000Z
rlpy/Domains/__init__.py
okkhoy/rlpy
af25d2011fff1d61cb7c5cc8992549808f0c6103
[ "BSD-3-Clause" ]
85
2015-02-18T00:25:15.000Z
2021-11-15T11:10:00.000Z
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import #from Domain import Domain from future import standard_library standard_library.install_aliases() from .HelicopterHover import HelicopterHover, HelicopterHoverExtended fro...
40.875
73
0.786697
0
0
0
0
0
0
0
0
26
0.019878
0598570bbddd550266f613922fec2e9624969d88
365
py
Python
mercury_engine_data_structures/adapters/enum_adapter.py
Antidote/mercury-engine-data-structures
d8e8ba1eacaa37f4fc76b78bb208ffc2cde61f64
[ "MIT" ]
2
2021-06-18T16:47:00.000Z
2021-07-06T22:36:32.000Z
mercury_engine_data_structures/adapters/enum_adapter.py
Antidote/mercury-engine-data-structures
d8e8ba1eacaa37f4fc76b78bb208ffc2cde61f64
[ "MIT" ]
1
2021-10-01T20:26:01.000Z
2021-10-01T20:26:01.000Z
mercury_engine_data_structures/adapters/enum_adapter.py
Antidote/mercury-engine-data-structures
d8e8ba1eacaa37f4fc76b78bb208ffc2cde61f64
[ "MIT" ]
5
2021-08-23T17:01:01.000Z
2021-11-20T03:57:14.000Z
from construct import Adapter, Int32ub, Enum class EnumAdapter(Adapter): def __init__(self, enum_class, subcon=Int32ub): super().__init__(Enum(subcon, enum_class)) self._enum_class = enum_class def _decode(self, obj, context, path): return self._enum_class[obj] def _encode(self, ...
26.071429
51
0.682192
317
0.868493
0
0
0
0
0
0
0
0
05995048419b1dbd1bd29b14c238cf37023f8b47
2,740
py
Python
lib/strider/virt/vagrantbox.py
jcftang/strider
432a68eb1303541b6d955bd6ecf7439d1f9b0d48
[ "Apache-2.0" ]
16
2016-02-10T13:06:50.000Z
2021-02-28T06:21:16.000Z
lib/strider/virt/vagrantbox.py
jcftang/strider
432a68eb1303541b6d955bd6ecf7439d1f9b0d48
[ "Apache-2.0" ]
4
2016-02-20T16:33:40.000Z
2016-05-28T10:46:06.000Z
lib/strider/virt/vagrantbox.py
jcftang/strider
432a68eb1303541b6d955bd6ecf7439d1f9b0d48
[ "Apache-2.0" ]
1
2016-09-01T11:06:56.000Z
2016-09-01T11:06:56.000Z
import vagrant import os from subprocess import CalledProcessError from strider.common.instance_data import InstanceData, SshData import strider.common.logger class Vagrantbox(object): def __init__(self, name=None, ssh=None, basebox=None, bake_na...
31.860465
75
0.550365
2,578
0.940876
0
0
0
0
0
0
414
0.151095
552672dd092eb5fb84094dd67c6ad2cf6eb3df04
4,739
py
Python
python/aces/lutFormats/tests/UnitTestsLutFormats.py
aforsythe/clf
47ba8bee31bd13e4f23632c7b0a38293be31c019
[ "AMPAS" ]
43
2015-07-09T23:13:41.000Z
2022-02-04T15:45:42.000Z
python/aces/lutFormats/tests/UnitTestsLutFormats.py
aforsythe/clf
47ba8bee31bd13e4f23632c7b0a38293be31c019
[ "AMPAS" ]
1
2019-09-18T14:30:39.000Z
2019-09-18T14:30:39.000Z
python/aces/lutFormats/tests/UnitTestsLutFormats.py
aforsythe/clf
47ba8bee31bd13e4f23632c7b0a38293be31c019
[ "AMPAS" ]
9
2015-07-10T15:26:55.000Z
2020-08-20T11:52:47.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ The Academy / ASC Common LUT Format Sample Implementations are provided by the Academy under the following terms and conditions: Copyright © 2015 Academy of Motion Picture Arts and Sciences ("A.M.P.A.S."). Portions contributed by others as indicated. All rights reserv...
40.853448
84
0.779067
0
0
0
0
0
0
0
0
3,502
0.738819
552683d69b93369ce9f2b67f499349c272254782
10,177
py
Python
edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/templates/product/Hazard_CFW_MultiPil.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
null
null
null
edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/templates/product/Hazard_CFW_MultiPil.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
null
null
null
edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/templates/product/Hazard_CFW_MultiPil.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
1
2021-10-30T00:03:05.000Z
2021-10-30T00:03:05.000Z
## # This software was developed and / or modified by Raytheon Company, # pursuant to Contract DG133W-05-CQ-1067 with the US Government. # # U.S. EXPORT CONTROLLED TECHNICAL DATA # This software product contains export-restricted data whose # export/transfer/disclosure is restricted by U.S. law. Dissemination # to non...
40.384921
105
0.584455
9,120
0.896138
0
0
0
0
0
0
5,482
0.538666
552924a7e504599cbe9d1cfc08f6a123e6773a8c
880
py
Python
setup.py
hubmapconsortium/python-sdk
17eaec434f1f65190a6e53d0055fe382841222de
[ "MIT" ]
null
null
null
setup.py
hubmapconsortium/python-sdk
17eaec434f1f65190a6e53d0055fe382841222de
[ "MIT" ]
8
2021-11-09T13:35:48.000Z
2022-03-04T15:56:52.000Z
setup.py
hubmapconsortium/python-sdk
17eaec434f1f65190a6e53d0055fe382841222de
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() setup( name="hubmap-sdk", version="1.0.1", author="Hubmap", author_email="api-developers@hubmapconsortium.org", description="Python Client Libary to use HuBMAP web services", long_de...
25.142857
66
0.606818
0
0
0
0
0
0
0
0
377
0.428409
5529bf458e89cd64db669da48d12a440dd5e7310
14,095
py
Python
tests/grammar/test_data_type.py
Daniihh/sqlpyparser
aad1d613c02d4f8fa6b833c060a683cf7e194b1c
[ "MIT" ]
28
2016-02-13T10:20:21.000Z
2022-03-10T02:41:58.000Z
tests/grammar/test_data_type.py
Daniihh/sqlpyparser
aad1d613c02d4f8fa6b833c060a683cf7e194b1c
[ "MIT" ]
22
2016-02-15T15:55:09.000Z
2017-09-12T13:49:17.000Z
tests/grammar/test_data_type.py
Daniihh/sqlpyparser
aad1d613c02d4f8fa6b833c060a683cf7e194b1c
[ "MIT" ]
16
2016-02-15T16:41:23.000Z
2021-05-18T04:51:52.000Z
# -*- encoding:utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import unittest import pyparsing from mysqlparse.grammar.data_type import data_type_syntax class DataTypeSyntaxTest(unittest.TestCase): def test_bit(self): self.assertEquals(data_type_syntax.par...
40.386819
122
0.57602
13,890
0.985456
0
0
0
0
0
0
2,574
0.182618
5529c5dbc7514236bc8611211cfb848e2618a841
2,615
py
Python
bayarea_urbansim/data_regeneration/export_to_h5.py
ual/DOE-repo-deliverable
4bafdd9a702a9a6466dd32ae62f440644d735d3c
[ "BSD-3-Clause" ]
null
null
null
bayarea_urbansim/data_regeneration/export_to_h5.py
ual/DOE-repo-deliverable
4bafdd9a702a9a6466dd32ae62f440644d735d3c
[ "BSD-3-Clause" ]
null
null
null
bayarea_urbansim/data_regeneration/export_to_h5.py
ual/DOE-repo-deliverable
4bafdd9a702a9a6466dd32ae62f440644d735d3c
[ "BSD-3-Clause" ]
null
null
null
import pandas as pd from spandex import TableLoader import pandas.io.sql as sql loader = TableLoader() def db_to_df(query): """Executes SQL query and returns DataFrame.""" conn = loader.database._connection return sql.read_frame(query, conn) ## Export to HDF5- get path to output file h5_path = loader.ge...
39.029851
97
0.757553
0
0
0
0
0
0
0
0
838
0.320459
552b355ab9a4608d3f4dc4d7df2c3b24e79e210d
7,060
py
Python
minder_utils/visualisation/feature_engineering.py
alexcapstick/minder_utils
3bb9380b7796b5dd5b995ce1839ea6a94321021d
[ "MIT" ]
null
null
null
minder_utils/visualisation/feature_engineering.py
alexcapstick/minder_utils
3bb9380b7796b5dd5b995ce1839ea6a94321021d
[ "MIT" ]
null
null
null
minder_utils/visualisation/feature_engineering.py
alexcapstick/minder_utils
3bb9380b7796b5dd5b995ce1839ea6a94321021d
[ "MIT" ]
1
2022-03-16T11:10:43.000Z
2022-03-16T11:10:43.000Z
import matplotlib.pyplot as plt import matplotlib.dates as mdates import seaborn as sns import pandas as pd from minder_utils.formatting.label import label_by_week, label_dataframe from minder_utils.feature_engineering import Feature_engineer from minder_utils.feature_engineering.calculation import * from minder_utils....
28.699187
125
0.657507
0
0
0
0
734
0.103966
0
0
1,264
0.179037
552c410668701cd1585658195d593e1b5751e350
442
py
Python
code-everyday-challenge/n159_cyclically_rotate.py
ved93/deliberate-practice-challenges
2fccdbb9d2baaa16f888055c081a8d04804c0045
[ "MIT" ]
null
null
null
code-everyday-challenge/n159_cyclically_rotate.py
ved93/deliberate-practice-challenges
2fccdbb9d2baaa16f888055c081a8d04804c0045
[ "MIT" ]
null
null
null
code-everyday-challenge/n159_cyclically_rotate.py
ved93/deliberate-practice-challenges
2fccdbb9d2baaa16f888055c081a8d04804c0045
[ "MIT" ]
null
null
null
# https://practice.geeksforgeeks.org/problems/cyclically-rotate-an-array-by-one2614/1 # Given an array, rotate the array by one position in clock-wise direction. # Input: # N = 5 # A[] = {1, 2, 3, 4, 5} # Output: # 5 1 2 3 4 def rotate_cycle(a): n = len(a) tmp = a[-1] for i in range(1,n): a[-i] ...
17.68
85
0.567873
0
0
0
0
0
0
0
0
228
0.515837
552d7c8af23d30920337cc95fa4d7065705c0c5f
10,800
py
Python
adamw_optimizer.py
pwldj/Bio_XLNet_CRF
536053e9d74abdb2ee56000a8a779ffc1c0dd0fc
[ "Apache-2.0" ]
null
null
null
adamw_optimizer.py
pwldj/Bio_XLNet_CRF
536053e9d74abdb2ee56000a8a779ffc1c0dd0fc
[ "Apache-2.0" ]
2
2022-03-07T07:27:13.000Z
2022-03-07T07:27:15.000Z
adamw_optimizer.py
pwldj/MTL-BioNER
3fb336f517346daeec6a716fa6a657a421754bdb
[ "Apache-2.0" ]
1
2021-05-05T08:42:53.000Z
2021-05-05T08:42:53.000Z
# Copyright 2015 The TensorFlow Authors. 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 applica...
44.444444
85
0.64463
9,604
0.889259
0
0
0
0
0
0
1,890
0.175
552db8b8886012305a174d08f78e6a22fd0ea206
38
py
Python
tests/test_e2e.py
sasakalaba/drone-strike
92e1aa9a79347f2fdc336529b584206aa20e72d3
[ "Unlicense" ]
null
null
null
tests/test_e2e.py
sasakalaba/drone-strike
92e1aa9a79347f2fdc336529b584206aa20e72d3
[ "Unlicense" ]
null
null
null
tests/test_e2e.py
sasakalaba/drone-strike
92e1aa9a79347f2fdc336529b584206aa20e72d3
[ "Unlicense" ]
null
null
null
from .base import BaseTestCase pass
7.6
30
0.789474
0
0
0
0
0
0
0
0
0
0
552fdd4ea7856ad8f238ffba4056d7b666e1d19e
1,559
py
Python
backend/breach/helpers/injector.py
Cancelll/rupture
cd87481717b39de2654659b7ff436500e28a0600
[ "MIT" ]
184
2016-03-31T04:19:42.000Z
2021-11-26T21:37:12.000Z
backend/breach/helpers/injector.py
Cancelll/rupture
cd87481717b39de2654659b7ff436500e28a0600
[ "MIT" ]
212
2016-03-31T04:32:06.000Z
2017-02-26T09:34:47.000Z
backend/breach/helpers/injector.py
Cancelll/rupture
cd87481717b39de2654659b7ff436500e28a0600
[ "MIT" ]
38
2016-03-31T09:09:44.000Z
2021-11-26T21:37:13.000Z
from backend.settings import BASE_DIR import os import subprocess import stat rupture_dir = os.path.abspath(os.path.join(BASE_DIR, os.pardir)) client_dir = os.path.join(rupture_dir, 'client') def inject(victim): _create_client(victim) _create_injection(victim) _run_injection(victim) def _create_clien...
25.557377
84
0.645285
0
0
0
0
0
0
0
0
88
0.056446
5530fb74fc5655f0d169fed9774ccb03f4699d79
952
py
Python
wagtail_client/utils.py
girleffect/core-integration-demo
c37a0d5183d16bec6245a41e12dd90691ffa7138
[ "BSD-3-Clause" ]
null
null
null
wagtail_client/utils.py
girleffect/core-integration-demo
c37a0d5183d16bec6245a41e12dd90691ffa7138
[ "BSD-3-Clause" ]
19
2018-02-06T08:56:24.000Z
2018-09-11T08:05:24.000Z
wagtail_client/utils.py
girleffect/core-integration-demo
c37a0d5183d16bec6245a41e12dd90691ffa7138
[ "BSD-3-Clause" ]
2
2018-05-25T09:44:03.000Z
2021-08-18T12:07:47.000Z
from urllib.parse import urlencode from django.conf import settings from django.contrib.sites.shortcuts import get_current_site def provider_logout_url(request): """ This function is used to construct a logout URL that can be used to log the user out of the Identity Provider (Authentication Service). ...
34
91
0.722689
0
0
0
0
0
0
0
0
423
0.444328
553261313f73826b4fd76c66eae4be0cde9803af
978
py
Python
connectToProteusFromMongo.py
erentts/Ignite-Greenhouse
328730399328936332b5c6f3f8dcd18bf56369b9
[ "MIT" ]
4
2021-02-22T21:19:28.000Z
2021-05-03T14:19:18.000Z
connectToProteusFromMongo.py
erentts/Ignite-Greenhouse
328730399328936332b5c6f3f8dcd18bf56369b9
[ "MIT" ]
null
null
null
connectToProteusFromMongo.py
erentts/Ignite-Greenhouse
328730399328936332b5c6f3f8dcd18bf56369b9
[ "MIT" ]
null
null
null
import pymongo import dns import serial from pymongo import MongoClient import struct cluster = MongoClient("") serialPort = serial.Serial(port= "COM1", baudrate=9600 ,bytesize =8 , timeout =None, parity='N',stopbits=1) db=cluster["<greenHouse>"] collection = db["greenhouses"] while serialPort.readline(): resul...
31.548387
145
0.702454
0
0
0
0
0
0
0
0
261
0.266871
55333cbb250a399b054018a193b9449274e24d7c
837
py
Python
website_sale_cache/__manifest__.py
factorlibre/website-addons
9a0c7a238e2b6030d57f7a08d48816b4f2431524
[ "MIT" ]
1
2020-03-01T03:04:21.000Z
2020-03-01T03:04:21.000Z
website_sale_cache/__manifest__.py
factorlibre/website-addons
9a0c7a238e2b6030d57f7a08d48816b4f2431524
[ "MIT" ]
null
null
null
website_sale_cache/__manifest__.py
factorlibre/website-addons
9a0c7a238e2b6030d57f7a08d48816b4f2431524
[ "MIT" ]
3
2019-07-29T20:23:16.000Z
2021-01-07T20:51:24.000Z
# Copyright 2017 Artyom Losev # Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr> # License MIT (https://opensource.org/licenses/MIT). { "name": """E-commerce Category Cache""", "summary": """Use this module to greatly accelerate the loading of a page with a large number of produ...
41.85
123
0.658303
0
0
0
0
0
0
0
0
692
0.826762
5537fd0769af5384988d439a528247d706c25d2b
848
py
Python
lumin/utils/mod_ver.py
choisant/lumin
c039136eb096e8f3800f13925f9325b99cf7e76b
[ "Apache-2.0" ]
43
2019-02-11T16:16:42.000Z
2021-12-13T15:35:20.000Z
lumin/utils/mod_ver.py
choisant/lumin
c039136eb096e8f3800f13925f9325b99cf7e76b
[ "Apache-2.0" ]
48
2020-05-21T02:40:50.000Z
2021-08-10T11:07:08.000Z
lumin/utils/mod_ver.py
choisant/lumin
c039136eb096e8f3800f13925f9325b99cf7e76b
[ "Apache-2.0" ]
14
2019-05-02T15:09:41.000Z
2022-01-12T21:13:34.000Z
import pkg_resources __all__ = [] def check_pdpbox(): try: ver = pkg_resources.get_distribution("pdpbox").version assert ver >= '0.2.0+13.g73c6966', f'''You have version {ver} of pdpbox. Use of this function requires pdpbox>=0.2.0+13.g73c6966, which is not currently ...
56.533333
160
0.602594
0
0
0
0
0
0
0
0
623
0.73467
553885dd25affc404a552785fdb6d4e6392000ff
18,526
py
Python
pysac/mhs_atmosphere/mhs_model/flux_tubes.py
SolarDrew/pysac
9fd86dd03966b7e7f90653a47a2ccca7964c83bc
[ "BSD-2-Clause" ]
null
null
null
pysac/mhs_atmosphere/mhs_model/flux_tubes.py
SolarDrew/pysac
9fd86dd03966b7e7f90653a47a2ccca7964c83bc
[ "BSD-2-Clause" ]
null
null
null
pysac/mhs_atmosphere/mhs_model/flux_tubes.py
SolarDrew/pysac
9fd86dd03966b7e7f90653a47a2ccca7964c83bc
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Dec 11 11:37:39 2014 @author: sm1fg Construct the magnetic network and generate the adjustments to the non-magnetic atmosphere for mhs equilibrium. """ import os import warnings import numpy as np import astropy.units as u from scipy.interpolate import RectBivaria...
40.986726
83
0.45428
0
0
0
0
0
0
0
0
5,243
0.283008
5539d275ebd36d43b5d44642306d4d9d488a83a3
961
py
Python
s3_file_uploads/serializers.py
dabapps/django-s3-file-uploads
17ed6b4e02bd43bc925af987ff5bf971a82da434
[ "BSD-3-Clause" ]
5
2019-05-27T03:51:30.000Z
2021-03-19T11:24:09.000Z
s3_file_uploads/serializers.py
dabapps/django-s3-file-uploads
17ed6b4e02bd43bc925af987ff5bf971a82da434
[ "BSD-3-Clause" ]
7
2019-12-04T22:38:13.000Z
2021-06-10T17:50:06.000Z
s3_file_uploads/serializers.py
dabapps/django-s3-file-uploads
17ed6b4e02bd43bc925af987ff5bf971a82da434
[ "BSD-3-Clause" ]
null
null
null
from rest_framework import serializers from s3_file_uploads.constants import ACCESS_CONTROL_TYPES, PRIVATE from s3_file_uploads.models import UploadedFile class UploadedFileSerializer(serializers.ModelSerializer): file_name = serializers.CharField(source='file.name', read_only=True) file = serializers.URLFie...
27.457143
80
0.597294
801
0.833507
0
0
0
0
0
0
160
0.166493
553a35ee3c9965503e444537543d6f056c2747c7
1,873
py
Python
vbts_webadmin/views/subscribers.py
pcarivbts/vbts-webadmin
0616eca6492daa3ebc26b442e8dbebda7ac06d51
[ "BSD-3-Clause" ]
null
null
null
vbts_webadmin/views/subscribers.py
pcarivbts/vbts-webadmin
0616eca6492daa3ebc26b442e8dbebda7ac06d51
[ "BSD-3-Clause" ]
3
2020-06-05T18:34:16.000Z
2021-06-10T20:31:18.000Z
vbts_webadmin/views/subscribers.py
pcarivbts/vbts-webadmin
0616eca6492daa3ebc26b442e8dbebda7ac06d51
[ "BSD-3-Clause" ]
2
2018-07-04T00:54:50.000Z
2022-01-28T16:52:10.000Z
""" Copyright (c) 2015-present, Philippine-California Advanced Research Institutes- The Village Base Station Project (PCARI-VBTS). All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. """ from django.contrib import messages ...
33.446429
79
0.705286
0
0
0
0
1,134
0.605446
0
0
416
0.222104
553df305accc95bd90095dbb25295bf9604e38ba
268
py
Python
Aula 05/[Exercicio 01] .py
IsaacPSilva/LetsCode
64396ee9fd0ad395598c74c3727a614261e5dd50
[ "MIT" ]
null
null
null
Aula 05/[Exercicio 01] .py
IsaacPSilva/LetsCode
64396ee9fd0ad395598c74c3727a614261e5dd50
[ "MIT" ]
null
null
null
Aula 05/[Exercicio 01] .py
IsaacPSilva/LetsCode
64396ee9fd0ad395598c74c3727a614261e5dd50
[ "MIT" ]
null
null
null
'''1. Faça um programa que pede para o usuário digitar uma palavra e imprima cada letra em uma linha.''' #Informando frase a ser verificada frase = input('Digite uma palavra: ') #Convertendo frase em palavras, e imprimindo depois for letra in frase: print(letra)
29.777778
68
0.75
0
0
0
0
0
0
0
0
213
0.788889
553e5975ce3bca9dd2037d832b61d89b76e372a6
16,307
py
Python
examples/vq_rnn_fruit_joint/vq_fruit_joint.py
kastnerkyle/tfbldr
58ad1437d500924acd15d1c6eec4a864f57e9c7c
[ "BSD-3-Clause" ]
4
2018-05-15T22:35:00.000Z
2019-02-22T01:40:49.000Z
examples/vq_rnn_fruit_joint/vq_fruit_joint.py
kastnerkyle/tfbldr
58ad1437d500924acd15d1c6eec4a864f57e9c7c
[ "BSD-3-Clause" ]
null
null
null
examples/vq_rnn_fruit_joint/vq_fruit_joint.py
kastnerkyle/tfbldr
58ad1437d500924acd15d1c6eec4a864f57e9c7c
[ "BSD-3-Clause" ]
2
2018-06-09T15:08:44.000Z
2018-11-20T10:13:48.000Z
from tfbldr.nodes import Conv2d from tfbldr.nodes import ConvTranspose2d from tfbldr.nodes import VqEmbedding from tfbldr.nodes import BatchNorm2d from tfbldr.nodes import Linear from tfbldr.nodes import ReLU from tfbldr.nodes import Sigmoid from tfbldr.nodes import Tanh from tfbldr.nodes import OneHot from tfbldr.node...
38.189696
124
0.592506
0
0
0
0
0
0
0
0
1,584
0.097136
553eb4733f79df133de3656ed4a77eb050d859d2
311
py
Python
scripts/poorscrum/poorscrum_tools.py
r09491/poorscrum
cdbbc0db03fde842f546093f46e70d03a105bbbd
[ "MIT" ]
null
null
null
scripts/poorscrum/poorscrum_tools.py
r09491/poorscrum
cdbbc0db03fde842f546093f46e70d03a105bbbd
[ "MIT" ]
7
2021-03-18T22:37:46.000Z
2022-03-11T23:41:39.000Z
scripts/poorscrum/poorscrum_tools.py
r09491/poorscrum
cdbbc0db03fde842f546093f46e70d03a105bbbd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- def fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n-1) + fibonacci(n-2) def story_points(start): for i in range(10): result = fibonacci(i) if result >= start: break return result
17.277778
46
0.508039
0
0
0
0
0
0
0
0
23
0.073955
554005d26d7a3413df01a385a87bf09337208562
6,162
py
Python
cata/teachers/ensembles/both_rotation_ensemble.py
seblee97/student_teacher_catastrophic
9baaaf2850025ba9cf33d61c42386bc4c3b2dad2
[ "MIT" ]
2
2021-09-13T01:44:09.000Z
2021-12-11T11:56:49.000Z
cata/teachers/ensembles/both_rotation_ensemble.py
seblee97/student_teacher_catastrophic
9baaaf2850025ba9cf33d61c42386bc4c3b2dad2
[ "MIT" ]
8
2020-11-13T18:37:30.000Z
2022-02-15T15:11:51.000Z
cata/teachers/ensembles/both_rotation_ensemble.py
seblee97/student_teacher_catastrophic
9baaaf2850025ba9cf33d61c42386bc4c3b2dad2
[ "MIT" ]
null
null
null
from typing import List from typing import Union import numpy as np import torch from cata.teachers.ensembles import base_teacher_ensemble from cata.utils import custom_functions class BothRotationTeacherEnsemble(base_teacher_ensemble.BaseTeacherEnsemble): """Teacher ensemble (primarily for mean-field limit regi...
35.413793
89
0.636806
5,979
0.970302
0
0
0
0
0
0
1,159
0.188088
5542014f27e11156c75907e597b9852418147144
7,176
py
Python
scripts/admin/admin.py
starmarek/organize-me
710e7acd86e887b7e4379fde18e1f375846ea59e
[ "MIT" ]
null
null
null
scripts/admin/admin.py
starmarek/organize-me
710e7acd86e887b7e4379fde18e1f375846ea59e
[ "MIT" ]
null
null
null
scripts/admin/admin.py
starmarek/organize-me
710e7acd86e887b7e4379fde18e1f375846ea59e
[ "MIT" ]
null
null
null
import json import logging import os import shlex import subprocess from pathlib import Path from types import SimpleNamespace import coloredlogs import fire from .adminFiles import ( DockerComposeFile, DotenvFile, GitlabCIFile, JsonFile, PackageJsonFile, Pipfile, RuntimeTxtFile, YarnR...
32.324324
148
0.67879
4,030
0.561594
0
0
0
0
0
0
1,708
0.238016
5542f0b7bef41dfe29c0868984e349d2a0c056ea
300
py
Python
F_Machine_learning/2_Unsupervised-Learning/solutions/ex2_3.py
sylvain2002/CBM101
4d9dc4264ce81cc2af58ceaff96fd0ed7a570af5
[ "MIT" ]
7
2019-07-03T07:41:55.000Z
2022-02-06T20:25:37.000Z
F_Machine_learning/2_Unsupervised-Learning/solutions/ex2_3.py
sylvain2002/CBM101
4d9dc4264ce81cc2af58ceaff96fd0ed7a570af5
[ "MIT" ]
9
2019-03-14T15:15:09.000Z
2019-08-01T14:18:21.000Z
F_Machine_learning/2_Unsupervised-Learning/solutions/ex2_3.py
sylvain2002/CBM101
4d9dc4264ce81cc2af58ceaff96fd0ed7a570af5
[ "MIT" ]
11
2019-03-12T10:43:11.000Z
2021-10-05T12:15:00.000Z
a = 'ARRYR' b = 'ARSYS' levenshtein(a,b) # ANSWER a) # It quantifies the number of single-letter changes to morph one into the other # # ANSWER b) # We could encode the 'price' of changing between particular amino acids # thereby acknowledging that some substitutions are more or less costly/likely
27.272727
79
0.756667
0
0
0
0
0
0
0
0
266
0.886667
5543d0392b1a991c4c0bc9b77494d93272ec2802
743
py
Python
tests/components/pages/ts.py
T4rk1n/dazzler
69c49422dc19c910445ab265b1d3481041de8f43
[ "MIT" ]
15
2019-12-19T11:57:30.000Z
2021-11-15T23:34:41.000Z
tests/components/pages/ts.py
T4rk1n/dazzler
69c49422dc19c910445ab265b1d3481041de8f43
[ "MIT" ]
196
2019-09-21T15:10:14.000Z
2022-03-31T11:07:48.000Z
tests/components/pages/ts.py
T4rk1n/dazzler
69c49422dc19c910445ab265b1d3481041de8f43
[ "MIT" ]
7
2019-10-30T19:38:15.000Z
2021-12-01T04:54:16.000Z
from dazzler.system import Page from dazzler.components import core from tests.components import ts_components as tsc page = Page( __name__, core.Container([ tsc.TypedComponent( 'override', children=core.Container('foobar'), num=2, text='foobar', ...
27.518519
64
0.51144
0
0
0
0
0
0
0
0
138
0.185734
55454283c60ef0107317118c446ed4395d8f58a5
4,464
py
Python
src/gistsgetter/app.py
pmfrank/gistsgetter
a19f59604ebf1cb13c641d25c4461b4347bba58a
[ "MIT" ]
null
null
null
src/gistsgetter/app.py
pmfrank/gistsgetter
a19f59604ebf1cb13c641d25c4461b4347bba58a
[ "MIT" ]
null
null
null
src/gistsgetter/app.py
pmfrank/gistsgetter
a19f59604ebf1cb13c641d25c4461b4347bba58a
[ "MIT" ]
null
null
null
""" An application dedicated to creating, editing, and deleting Gists in GitHub """ from __future__ import absolute_import import toga import pyperclip from toga.style import Pack from toga.style.pack import COLUMN, ROW from .common.Search import search from functools import partial class GistsGetter(toga.App): d...
38.817391
132
0.622536
4,140
0.927419
0
0
0
0
0
0
827
0.18526
5549b2fc2c6d6a256c772a1fa6b1cb0ba16583fe
7,401
py
Python
src/qcar/src/qcar/q_essential.py
bchampp/scylla
6ec27877cc03c200a874cd0eb25a36c866471250
[ "MIT" ]
null
null
null
src/qcar/src/qcar/q_essential.py
bchampp/scylla
6ec27877cc03c200a874cd0eb25a36c866471250
[ "MIT" ]
null
null
null
src/qcar/src/qcar/q_essential.py
bchampp/scylla
6ec27877cc03c200a874cd0eb25a36c866471250
[ "MIT" ]
null
null
null
from quanser.hardware import HIL, HILError, PWMMode from quanser.multimedia import Video3D, VideoCapture, Video3DStreamType, MediaError, ImageFormat, ImageDataType from quanser.devices import RPLIDAR, RangingMeasurements, RangingMeasurementMode, DeviceError, RangingDistance from .q_misc import Utilities import numpy as...
37.190955
211
0.740576
6,952
0.939333
0
0
0
0
0
0
2,384
0.322119
554a7b61e03b3173856a7a579bde9d2c36a7f575
1,689
py
Python
ex071.py
cristianoandrad/ExerciciosPythonCursoEmVideo
362603436b71c8ef8386d7a9ab3c5fed0b8d63f7
[ "MIT" ]
null
null
null
ex071.py
cristianoandrad/ExerciciosPythonCursoEmVideo
362603436b71c8ef8386d7a9ab3c5fed0b8d63f7
[ "MIT" ]
null
null
null
ex071.py
cristianoandrad/ExerciciosPythonCursoEmVideo
362603436b71c8ef8386d7a9ab3c5fed0b8d63f7
[ "MIT" ]
null
null
null
'''Crie um programa que simule o funcionamento de um caixa eletrônico. No início, pergunte ao usuário qual será o valor a ser sacado (número inteiro) e o programa vai informar quantas cédulas de cada valor serão entregues. OBS: considere que o caixa possui cédulas de R$50, R$20, R$10 e R$1.''' '''print('--' * 15) pri...
27.241935
227
0.587922
0
0
0
0
0
0
0
0
1,297
0.762941
554c5ff1d984eee7cf69842945a06a7b43f122ff
919
py
Python
common.py
hoostus/prime-harvesting
6606b94ea7859fbf217dbea4ace856e3fa4d154e
[ "BlueOak-1.0.0", "Apache-2.0" ]
23
2016-09-07T06:13:37.000Z
2022-02-17T23:49:03.000Z
common.py
hoostus/prime-harvesting
6606b94ea7859fbf217dbea4ace856e3fa4d154e
[ "BlueOak-1.0.0", "Apache-2.0" ]
null
null
null
common.py
hoostus/prime-harvesting
6606b94ea7859fbf217dbea4ace856e3fa4d154e
[ "BlueOak-1.0.0", "Apache-2.0" ]
12
2016-06-30T17:27:39.000Z
2021-12-12T07:54:27.000Z
import itertools import math import simulate import harvesting import plot from decimal import setcontext, ExtendedContext # Don't raise exception when we divide by zero #setcontext(ExtendedContext) #getcontext().prec = 5 def compare_prime_vs_rebalancing(series, years=30, title=''): (r1, r2) = itertools.tee(serie...
31.689655
93
0.677911
0
0
0
0
0
0
0
0
156
0.16975
554e5d74e0feb6600546ab4240369b860c3f874d
492
py
Python
g/appengine/py/standard/simple-blog/app/helpers/hasher.py
chhschou/sandpit
d4a6760905b45b90455f10a5b50af3c5f743e445
[ "MIT" ]
null
null
null
g/appengine/py/standard/simple-blog/app/helpers/hasher.py
chhschou/sandpit
d4a6760905b45b90455f10a5b50af3c5f743e445
[ "MIT" ]
null
null
null
g/appengine/py/standard/simple-blog/app/helpers/hasher.py
chhschou/sandpit
d4a6760905b45b90455f10a5b50af3c5f743e445
[ "MIT" ]
null
null
null
import random import string import hashlib def make_salt(): return ''.join(random.choice(string.letters) for x in xrange(5)) # Implement the function valid_pw() that returns True if a user's password # matches its hash. You will need to modify make_pw_hash. def make_pw_hash_with_salt(name, pw, salt): h = h...
23.428571
74
0.707317
0
0
0
0
0
0
0
0
140
0.284553
554ef62e12daf1b4dd0a910c08086098d9a39602
769
py
Python
tests/hdx/scraper/test_utils.py
mcarans/hdx-python-scraper
ce17c672591979d4601bd125a38b86ea81a9f3c4
[ "MIT" ]
null
null
null
tests/hdx/scraper/test_utils.py
mcarans/hdx-python-scraper
ce17c672591979d4601bd125a38b86ea81a9f3c4
[ "MIT" ]
null
null
null
tests/hdx/scraper/test_utils.py
mcarans/hdx-python-scraper
ce17c672591979d4601bd125a38b86ea81a9f3c4
[ "MIT" ]
null
null
null
from datetime import datetime from hdx.data.dataset import Dataset from hdx.scraper.utilities import ( get_isodate_from_dataset_date, string_params_to_dict, ) class TestUtils: def test_string_params_to_dict(self): result = string_params_to_dict("a: 123, b: 345") assert result == {"a": "1...
29.576923
86
0.629389
597
0.776333
0
0
0
0
0
0
141
0.183355
554fb560fa2735d2073c8f53fb708577f43575e0
3,796
py
Python
store/models.py
Dokeey/Buy-Sell
9d70eb8649d79962657cc4be896e437908de537b
[ "MIT" ]
7
2019-03-25T14:43:41.000Z
2021-09-16T01:44:41.000Z
store/models.py
Dokeey/Buy-Sell
9d70eb8649d79962657cc4be896e437908de537b
[ "MIT" ]
80
2019-03-25T09:25:00.000Z
2020-02-09T01:01:09.000Z
store/models.py
Dokeey/Buy-Sell
9d70eb8649d79962657cc4be896e437908de537b
[ "MIT" ]
4
2019-03-25T13:58:07.000Z
2021-11-26T09:12:32.000Z
from random import randrange from django.conf import settings from django.contrib.contenttypes.fields import GenericRelation from django.db import models from hitcount.models import HitCountMixin, HitCount from imagekit.models import ProcessedImageField from pilkit.processors import ResizeToFill from django_cleanup im...
36.5
133
0.692308
3,321
0.824888
0
0
0
0
0
0
592
0.147044
554fefef5722dcfd6c785e2d4dadd682981a85f8
1,361
py
Python
auth-api/app.py
dlavery/auth
9f37b4be2eeda2446b7d3abd44c7b45918486e0b
[ "MIT" ]
null
null
null
auth-api/app.py
dlavery/auth
9f37b4be2eeda2446b7d3abd44c7b45918486e0b
[ "MIT" ]
null
null
null
auth-api/app.py
dlavery/auth
9f37b4be2eeda2446b7d3abd44c7b45918486e0b
[ "MIT" ]
null
null
null
import configparser import logging from flask import Flask from flask_pymongo import PyMongo from Crypto.PublicKey import RSA # Value mapping LOG_LEVELS = {'INFO': logging.INFO, 'DEBUG': logging.DEBUG, 'WARN': logging.DEBUG, 'ERROR': logging.ERROR} # Create application app = Flask(__name__) # Read external config co...
32.404762
106
0.740632
0
0
0
0
0
0
0
0
465
0.341661
5555b6c3e07de5a90e04d4e0ebe99f3c40e0594c
1,587
py
Python
experts/siamdw.py
songheony/AAA-journal
4306fac0afe567269b8d2f1cbef2a1c398fdde82
[ "MIT" ]
9
2020-07-07T09:03:07.000Z
2021-04-22T03:38:49.000Z
experts/siamdw.py
songheony/AAA-journal
4306fac0afe567269b8d2f1cbef2a1c398fdde82
[ "MIT" ]
null
null
null
experts/siamdw.py
songheony/AAA-journal
4306fac0afe567269b8d2f1cbef2a1c398fdde82
[ "MIT" ]
1
2021-07-31T19:26:52.000Z
2021-07-31T19:26:52.000Z
import sys import numpy as np import cv2 from easydict import EasyDict as edict from base_tracker import BaseTracker import path_config sys.path.append("external/SiamDW/lib") from tracker.siamrpn import SiamRPN import models.models as models from utils.utils import load_pretrain class SiamDW(BaseTracker): def __...
34.5
85
0.628859
1,303
0.821046
0
0
0
0
0
0
84
0.05293
555695e92a72c35957e937841df7b620e7484601
3,346
py
Python
serpent/machine_learning/reinforcement_learning/rainbow_dqn/dqn.py
DylanSpicker/SerpentAI
c48c4b072e0d1084a52eac569ad1c7fa02ac7348
[ "MIT" ]
null
null
null
serpent/machine_learning/reinforcement_learning/rainbow_dqn/dqn.py
DylanSpicker/SerpentAI
c48c4b072e0d1084a52eac569ad1c7fa02ac7348
[ "MIT" ]
null
null
null
serpent/machine_learning/reinforcement_learning/rainbow_dqn/dqn.py
DylanSpicker/SerpentAI
c48c4b072e0d1084a52eac569ad1c7fa02ac7348
[ "MIT" ]
null
null
null
import math import torch class DQN(torch.nn.Module): def __init__(self, action_space, history=4, hidden_size=512, noisy_std=0.1, quantile=True): super().__init__() self.atoms = 200 if quantile else 51 self.action_space = action_space self.quantile = quantile self.conv1 =...
35.978495
162
0.661686
3,315
0.990735
0
0
0
0
0
0
34
0.010161
55572056018bf803954acf22ae96913928e3246d
1,479
py
Python
src/modules/base/url_helper.py
yakii9/artificial-programmer
a6c1a5a47155ee4d24be729a0fa8c86ca40f85d1
[ "MIT" ]
1
2018-10-21T22:46:27.000Z
2018-10-21T22:46:27.000Z
src/modules/base/url_helper.py
yakii9/artificial-programmer
a6c1a5a47155ee4d24be729a0fa8c86ca40f85d1
[ "MIT" ]
1
2018-10-29T04:34:13.000Z
2018-11-01T14:32:23.000Z
src/modules/base/url_helper.py
yakii9/artificial-programmer
a6c1a5a47155ee4d24be729a0fa8c86ca40f85d1
[ "MIT" ]
1
2018-10-21T22:46:48.000Z
2018-10-21T22:46:48.000Z
import urllib.request from html.parser import HTMLParser from urllib import parse from modules.base.handle_timeout import timeout class ElementsFinder(HTMLParser): def __init__(self, base_url, page_url): super().__init__() self.base_url = base_url self.page_url = page_url self.lin...
25.067797
98
0.577417
1,343
0.908046
0
0
382
0.258283
0
0
153
0.103448
5557b931f8213b68a545c1e272d7bfa56dc0f55f
7,460
py
Python
trainer/trainer.py
iprapas/dl-continuous-deployment
bcee578a8ae3aa74e4ede00d125cb456f6a3010e
[ "MIT" ]
null
null
null
trainer/trainer.py
iprapas/dl-continuous-deployment
bcee578a8ae3aa74e4ede00d125cb456f6a3010e
[ "MIT" ]
null
null
null
trainer/trainer.py
iprapas/dl-continuous-deployment
bcee578a8ae3aa74e4ede00d125cb456f6a3010e
[ "MIT" ]
null
null
null
import numpy as np import torch from torchvision.utils import make_grid from base import BaseTrainer from utils import inf_loop, MetricTracker, confusion_matrix_image import copy import sys import time from model.metric import Accuracy, TopkAccuracy def get_top_k(x, ratio): """it will sample the top 1-ratio of th...
38.061224
112
0.604826
6,541
0.87681
0
0
0
0
0
0
1,727
0.231501
555ab459155bc7618fd3e853eed5270201c2705f
341
py
Python
eoa.py
LDNN97/evolutionary-optimization-algorithm
5819ab759ecc1fee94a03e407c97f2ab7bd0f862
[ "MIT" ]
21
2019-03-12T14:48:36.000Z
2022-03-08T12:55:30.000Z
eoa.py
LDNN97/Evolutionary-Optimization-Algorithms
5819ab759ecc1fee94a03e407c97f2ab7bd0f862
[ "MIT" ]
null
null
null
eoa.py
LDNN97/Evolutionary-Optimization-Algorithms
5819ab759ecc1fee94a03e407c97f2ab7bd0f862
[ "MIT" ]
5
2021-02-17T08:33:39.000Z
2022-01-23T11:44:16.000Z
from prob.problems import * from opti.de import DE from opti.cmaes import CMAES from opti.cmaes_origin import CMAESO from opti.cmaes_maes import CMAESM from opti.cmaes_large import CMAESL # beta from opti.cmaes_bipop import CMAESB if __name__ == "__main__": TaskProb = Sphere(50, -50, 50) Task = DE(TaskProb, ...
21.3125
36
0.747801
0
0
0
0
0
0
0
0
16
0.046921
555da31cec0240cea59e597af6f6196956ec03f6
574
py
Python
tests/test_common.py
shikanon/BaiduMapAPI
36c41bd99e523fa231e7d654f0ba504349b2a7ad
[ "MIT" ]
7
2019-03-07T04:38:44.000Z
2021-04-23T02:43:10.000Z
tests/test_common.py
shikanon/BaiduMapAPI
36c41bd99e523fa231e7d654f0ba504349b2a7ad
[ "MIT" ]
2
2020-03-24T16:47:11.000Z
2020-12-03T08:52:31.000Z
tests/test_common.py
shikanon/BaiduMapAPI
36c41bd99e523fa231e7d654f0ba504349b2a7ad
[ "MIT" ]
1
2019-10-22T07:21:58.000Z
2019-10-22T07:21:58.000Z
from BaiduMapAPI.common import convertCoord, expandUp import pytest def test_convertCoord(): coord = convertCoord("12.32323,56.23422") assert coord == "12.32323,56.23422" coord = convertCoord((12.32323,56.23422)) assert coord == "12.32323,56.23422" def test_expandUp(): test_dict = {"a" : "A", "b":...
41
90
0.606272
0
0
0
0
0
0
0
0
182
0.317073
555e8fe1a5ae17b4fbc51d4ad0090a37d1dc68ba
3,520
py
Python
pycba/utils.py
mayermelhem/pycba
8f6a0da12629bac2ad1c6c8e113357f96931ef17
[ "Apache-2.0" ]
10
2022-02-07T01:16:02.000Z
2022-03-12T07:56:43.000Z
pycba/utils.py
mayermelhem/pycba
8f6a0da12629bac2ad1c6c8e113357f96931ef17
[ "Apache-2.0" ]
5
2022-02-08T07:42:53.000Z
2022-03-31T21:33:42.000Z
pycba/utils.py
mayermelhem/pycba
8f6a0da12629bac2ad1c6c8e113357f96931ef17
[ "Apache-2.0" ]
1
2022-02-12T04:33:38.000Z
2022-02-12T04:33:38.000Z
""" PyCBA - Utility functions for interacting with PyCBA """ import re import numpy as np from typing import Tuple def parse_beam_string( beam_string: str, ) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]: """ This function parses a beam descriptor string and returns CBA input vectors. The ...
34.174757
86
0.605682
0
0
0
0
0
0
0
0
2,326
0.660795
555f6946d9a27cac92dae44e27d4220ecfaf6269
10,363
py
Python
models/dcase2020_fuss_baseline/evaluate_lib.py
marciopuga/sound-separation
0b23ae22123b041b9538295f32a92151cb77bff9
[ "Apache-2.0" ]
412
2020-03-03T05:55:53.000Z
2022-03-29T20:49:11.000Z
models/dcase2020_fuss_baseline/evaluate_lib.py
marciopuga/sound-separation
0b23ae22123b041b9538295f32a92151cb77bff9
[ "Apache-2.0" ]
12
2020-04-09T17:47:01.000Z
2022-03-22T06:07:04.000Z
models/dcase2020_fuss_baseline/evaluate_lib.py
marciopuga/sound-separation
0b23ae22123b041b9538295f32a92151cb77bff9
[ "Apache-2.0" ]
89
2020-03-06T08:26:44.000Z
2022-03-31T11:36:23.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
41.618474
80
0.666795
0
0
0
0
0
0
0
0
2,872
0.27714
5560d79a769a8dcd00036d30ac155bdbbb8657ae
422
py
Python
homeassistant/components/system_bridge/const.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
11
2018-02-16T15:35:47.000Z
2020-01-14T15:20:00.000Z
homeassistant/components/system_bridge/const.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
87
2020-07-06T22:22:54.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/system_bridge/const.py
Vaarlion/core
f3de8b9f28de01abf72c0f5bb0b457eb1841f201
[ "Apache-2.0" ]
11
2020-12-16T13:48:14.000Z
2022-02-01T00:28:05.000Z
"""Constants for the System Bridge integration.""" import asyncio from aiohttp.client_exceptions import ( ClientConnectionError, ClientConnectorError, ClientResponseError, ) from systembridge.exceptions import BridgeException DOMAIN = "system_bridge" BRIDGE_CONNECTION_ERRORS = ( asyncio.TimeoutError,...
21.1
51
0.779621
0
0
0
0
0
0
0
0
65
0.154028
55652d01d18ec68adf27b069baae8bf7ed3db2f4
1,705
py
Python
python/domain/compliance/model/measure.py
ICTU/document-as-code
e65fddb94513e7c2f54f248b4ce69e9e10ce42f5
[ "Apache-2.0" ]
2
2021-01-09T17:00:51.000Z
2021-02-19T09:35:26.000Z
python/domain/compliance/model/measure.py
ICTU/document-as-code
e65fddb94513e7c2f54f248b4ce69e9e10ce42f5
[ "Apache-2.0" ]
null
null
null
python/domain/compliance/model/measure.py
ICTU/document-as-code
e65fddb94513e7c2f54f248b4ce69e9e10ce42f5
[ "Apache-2.0" ]
1
2020-02-24T15:50:05.000Z
2020-02-24T15:50:05.000Z
""" BIO measure - defines and describes a measure for BIO compliance """ from domain.base import Base class Measure(Base): """ Measures that help to in BIO compliance. """ _explain = None _not_applicable = None def __init__(self, identifier, description, identifiers, url=None, done=False): ...
26.640625
112
0.652199
1,596
0.93607
0
0
909
0.533138
0
0
362
0.212317
556657f3480d4123e6f0535b01c6ed2f5345122d
615
py
Python
week_06/readibility.py
fentybit/cs50
a6089e8ba47d0a8990cac3e0b5b28c5f2ba9f9c3
[ "CNRI-Python" ]
null
null
null
week_06/readibility.py
fentybit/cs50
a6089e8ba47d0a8990cac3e0b5b28c5f2ba9f9c3
[ "CNRI-Python" ]
null
null
null
week_06/readibility.py
fentybit/cs50
a6089e8ba47d0a8990cac3e0b5b28c5f2ba9f9c3
[ "CNRI-Python" ]
null
null
null
from cs50 import get_string text = get_string("Text: ") text_length = len(text) letters = 0 sentences = 0 words = 1 for i in range(text_length): if text[i].isalpha(): letters += 1 for i in range(text_length): if ord(text[i]) == 46 or ord(text[i]) == 33 or ord(text[i]) == 63: sentences += 1 f...
20.5
70
0.588618
0
0
0
0
0
0
0
0
51
0.082927
5567063c93ec8ddf93486996ed882ce5ca8b8b9d
206
py
Python
fauxblog/admin.py
nickobrad/faux
cecb03e97a176149606dc88373d1844fc1f6b23c
[ "MIT" ]
null
null
null
fauxblog/admin.py
nickobrad/faux
cecb03e97a176149606dc88373d1844fc1f6b23c
[ "MIT" ]
null
null
null
fauxblog/admin.py
nickobrad/faux
cecb03e97a176149606dc88373d1844fc1f6b23c
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Category, ImagePost, Location # Register your models here. admin.site.register(ImagePost) admin.site.register(Category) admin.site.register(Location)
20.6
49
0.81068
0
0
0
0
0
0
0
0
28
0.135922
556731a35682ef9f34de75b049e18d73969d3bfa
1,574
py
Python
lib/Vector.py
aldahick/dotter.py
c3e783801f36403476087b5638a93e5fd5959bbe
[ "MIT" ]
null
null
null
lib/Vector.py
aldahick/dotter.py
c3e783801f36403476087b5638a93e5fd5959bbe
[ "MIT" ]
null
null
null
lib/Vector.py
aldahick/dotter.py
c3e783801f36403476087b5638a93e5fd5959bbe
[ "MIT" ]
null
null
null
import math from random import randint # pylint: disable=I0011,invalid-name class Vector(object): def __init__(self, x, y=None): self.x = x if y is None: self.y = x else: self.y = y def get_distance(self, other): distance = self.get_distance_components(o...
26.677966
71
0.559085
1,496
0.950445
0
0
320
0.203304
0
0
46
0.029225
55686a8be609e908e7580542f40aa36255c8c155
12,532
py
Python
functions.py
flyingmat/pyfactorizer
6e607408bc21d04b09ecabfc6a579ad4058965f5
[ "MIT" ]
null
null
null
functions.py
flyingmat/pyfactorizer
6e607408bc21d04b09ecabfc6a579ad4058965f5
[ "MIT" ]
null
null
null
functions.py
flyingmat/pyfactorizer
6e607408bc21d04b09ecabfc6a579ad4058965f5
[ "MIT" ]
null
null
null
from math import floor remove_spaces = lambda inlst: [i for i in inlst if i != ' '] def sf2i(inp): if float(inp).is_integer(): return str(int(inp)) else: return str(inp) def fix_signs(inlst): i = 0 while i < len(inlst): if inlst[i] in '+-': # first sign is detected ...
39.040498
151
0.514682
1,265
0.100942
770
0.061443
0
0
0
0
1,829
0.145946
556a5954e27e88a1963c24a16323e7c269ae5148
2,556
py
Python
pystratis/api/balances/tests/test_balances.py
madrazzl3/pystratis
8b78552e753ae1d12f2afb39e9a322a270fbb7b3
[ "MIT" ]
null
null
null
pystratis/api/balances/tests/test_balances.py
madrazzl3/pystratis
8b78552e753ae1d12f2afb39e9a322a270fbb7b3
[ "MIT" ]
null
null
null
pystratis/api/balances/tests/test_balances.py
madrazzl3/pystratis
8b78552e753ae1d12f2afb39e9a322a270fbb7b3
[ "MIT" ]
null
null
null
import pytest from pytest_mock import MockerFixture from pystratis.api.balances import Balances from pystratis.core.types import Address from pystratis.core.networks import CirrusMain def test_all_strax_endpoints_implemented(strax_swagger_json): paths = [key.lower() for key in strax_swagger_json['paths']] for...
38.727273
96
0.736307
0
0
0
0
1,302
0.50939
0
0
166
0.064945
556d8216ffbaa6f7a0d0816c6b1ba9baa984c1a1
381
py
Python
Problems/14.py
Maurya232Abhishek/Python-repository-for-basics
3dcec5c529a0847df07c9dcc1424675754ce6376
[ "MIT" ]
2
2021-07-14T11:01:58.000Z
2021-07-14T11:02:01.000Z
Problems/14.py
Maurya232Abhishek/Python-repository-for-basics
3dcec5c529a0847df07c9dcc1424675754ce6376
[ "MIT" ]
null
null
null
Problems/14.py
Maurya232Abhishek/Python-repository-for-basics
3dcec5c529a0847df07c9dcc1424675754ce6376
[ "MIT" ]
null
null
null
def isPerCube(n): x = n**(1/3) x= x+0.5 x = int(x) if x**3==n: return True return False """ x = 2 while True: y = n / (x * x) if (x == y): print(x) if x == int(x): return True else: return False ...
19.05
28
0.351706
0
0
0
0
0
0
0
0
245
0.643045
556e3ec9c1d73a0070074ad45f8de00d47c96b09
179
py
Python
year1/python/week2/q9_squareroots.py
OthmanEmpire/university
3405e1463e82ca2e6f7deef05c3b1ba0ab9c1278
[ "MIT" ]
1
2016-05-21T17:23:50.000Z
2016-05-21T17:23:50.000Z
year1/python/week2/q9_squareroots.py
OthmanEmpire/university_code
3405e1463e82ca2e6f7deef05c3b1ba0ab9c1278
[ "MIT" ]
null
null
null
year1/python/week2/q9_squareroots.py
OthmanEmpire/university_code
3405e1463e82ca2e6f7deef05c3b1ba0ab9c1278
[ "MIT" ]
null
null
null
## This program prints out the first 10 square roots that are even ## for x in range(1,10): y = (2*x)**2 # If n^2 is even hence n must be even as well print(y)
29.833333
72
0.603352
0
0
0
0
0
0
0
0
114
0.636872
556f083296f917021fc8c5ac171cde72ce1bed3a
1,690
py
Python
backend/health/health_check.py
threefoldtech/zeroCI
851def4cbaebba681641ecb24c731de56277d6ed
[ "Apache-2.0" ]
null
null
null
backend/health/health_check.py
threefoldtech/zeroCI
851def4cbaebba681641ecb24c731de56277d6ed
[ "Apache-2.0" ]
52
2019-11-14T09:39:04.000Z
2021-03-16T10:15:55.000Z
backend/health/health_check.py
AhmedHanafy725/0-CI
ce73044eea2c15bcbb161a1d6f23e75e4f8d53a0
[ "Apache-2.0" ]
1
2019-10-30T09:51:25.000Z
2019-10-30T09:51:25.000Z
import sys sys.path.append("/sandbox/code/github/threefoldtech/zeroCI/backend") from redis import Redis from health_recover import Recover from utils.utils import Utils recover = Recover() class Health(Utils): def get_process_pid(self, name): cmd = f"ps -aux | grep -v grep | grep '{name}' | awk '{{pri...
25.606061
76
0.562722
1,334
0.789349
0
0
0
0
0
0
410
0.242604
5570f5a350941f5510b456b02cd8353c974ae345
13,284
py
Python
vesper/command/recording_importer.py
RichardLitt/Vesper
5360844f42a06942e7684121c650b08cf8616285
[ "MIT" ]
null
null
null
vesper/command/recording_importer.py
RichardLitt/Vesper
5360844f42a06942e7684121c650b08cf8616285
[ "MIT" ]
null
null
null
vesper/command/recording_importer.py
RichardLitt/Vesper
5360844f42a06942e7684121c650b08cf8616285
[ "MIT" ]
null
null
null
"""Module containing class `RecordingImporter`.""" from pathlib import Path import itertools import logging import os from django.db import transaction from vesper.command.command import CommandExecutionError from vesper.django.app.models import ( DeviceConnection, Job, Recording, RecordingChannel, RecordingFil...
32.479218
77
0.564664
10,033
0.755269
0
0
0
0
0
0
2,400
0.180668
557658851f4a3ae8f5f44ddef879cff02f03ad5f
1,096
py
Python
l10n_ar_ux/models/res_company.py
odoo-mastercore/odoo-argentina
58cdfe8610bae42f69ddb9d652a28eb3245f6a04
[ "MIT" ]
1
2021-01-25T15:57:58.000Z
2021-01-25T15:57:58.000Z
l10n_ar_ux/models/res_company.py
odoo-mastercore/odoo-argentina
58cdfe8610bae42f69ddb9d652a28eb3245f6a04
[ "MIT" ]
null
null
null
l10n_ar_ux/models/res_company.py
odoo-mastercore/odoo-argentina
58cdfe8610bae42f69ddb9d652a28eb3245f6a04
[ "MIT" ]
2
2020-10-17T16:36:02.000Z
2021-01-24T10:20:05.000Z
############################################################################## # For copyright and license notices, see __manifest__.py file in module root # directory ############################################################################## from odoo import fields, models class ResCompany(models.Model): _i...
39.142857
81
0.620438
815
0.742935
0
0
0
0
0
0
606
0.552416
5576c4dbc04cfe8f5be4007143719bb7a25f5574
2,033
py
Python
Quotebot/utils.py
musawakiliML/Whatsapp-Bots
29fe6c645010ddedac1424b22c842b3e61511644
[ "MIT" ]
null
null
null
Quotebot/utils.py
musawakiliML/Whatsapp-Bots
29fe6c645010ddedac1424b22c842b3e61511644
[ "MIT" ]
null
null
null
Quotebot/utils.py
musawakiliML/Whatsapp-Bots
29fe6c645010ddedac1424b22c842b3e61511644
[ "MIT" ]
null
null
null
import requests def random_quote(type=''): '''A function to get random quotes''' if type == "today": response_quote = requests.get("https://zenquotes.io/api/today/ff5e73b15a05ca51951b758bd7943ce803d71772") if response_quote.status_code == 200: quote_data = response_quote.json() ...
31.765625
113
0.624693
0
0
0
0
0
0
0
0
662
0.325627
557a41cb5f2fe81007b03e1796d482334c493ead
3,401
py
Python
src/day16.py
dcbriccetti/advent-of-code-2021-python
65958fb256234cf882714d3c3306cdbf60bcc0ae
[ "Unlicense" ]
4
2021-12-10T22:47:56.000Z
2021-12-26T21:35:58.000Z
src/day16.py
dcbriccetti/advent-of-code-2021-python
65958fb256234cf882714d3c3306cdbf60bcc0ae
[ "Unlicense" ]
null
null
null
src/day16.py
dcbriccetti/advent-of-code-2021-python
65958fb256234cf882714d3c3306cdbf60bcc0ae
[ "Unlicense" ]
null
null
null
from math import prod from pathlib import Path class BitStream: 'Deliver integers from a stream of bits created from a hexadecimal string' bit_str: str pos: int def __init__(self, hex_nibbles_str: str) -> None: def binary_nibble_str(hex_nibble_str: str) -> str: 'Convert, for examp...
36.180851
100
0.586004
3,182
0.934508
0
0
0
0
0
0
623
0.182966
557ac6c635a14924685b462c2a901a11408e15a1
6,328
py
Python
Santander-spyder.py
Herikc2/Santander-Customer-Satisfaction
c868538ab06c252b2f9e51bac384b0f6e48efd70
[ "MIT" ]
null
null
null
Santander-spyder.py
Herikc2/Santander-Customer-Satisfaction
c868538ab06c252b2f9e51bac384b0f6e48efd70
[ "MIT" ]
null
null
null
Santander-spyder.py
Herikc2/Santander-Customer-Satisfaction
c868538ab06c252b2f9e51bac384b0f6e48efd70
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Mar 3 17:13:15 2021 Database: https://www.kaggle.com/c/santander-customer-satisfaction @author: Herikc Brecher """ # Import from libraries from sklearn.model_selection import KFold from sklearn.model_selection import cross_val_score from sklearn.model_selection i...
30.423077
140
0.733881
0
0
0
0
0
0
0
0
1,798
0.283955
557b0f82fa2e590f23c344cfc48bb3aef2ee423d
4,502
py
Python
Memorization Tool/task/tool.py
soukalli/jetbrain-accademy
fc486d439b4b54a58956e1186eb69c56b85f85f1
[ "MIT" ]
null
null
null
Memorization Tool/task/tool.py
soukalli/jetbrain-accademy
fc486d439b4b54a58956e1186eb69c56b85f85f1
[ "MIT" ]
null
null
null
Memorization Tool/task/tool.py
soukalli/jetbrain-accademy
fc486d439b4b54a58956e1186eb69c56b85f85f1
[ "MIT" ]
null
null
null
# write your code here from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, String, Integer from sqlalchemy.orm import sessionmaker engine = create_engine('sqlite:///flashcard.db?check_same_thread=False') Base = declarative_base() Session = sessio...
28.675159
72
0.589294
194
0.043092
0
0
0
0
0
0
803
0.178365
557b20fb22a3ac884a03a5ffa7db1db58d06ea7c
9,862
py
Python
src/compass/utils/geo_metadata.py
vbrancat/COMPASS
285412ac2fc474e789e255dae16eba4485017c07
[ "Apache-2.0" ]
11
2021-11-24T07:24:11.000Z
2022-03-23T16:40:13.000Z
src/compass/utils/geo_metadata.py
vbrancat/COMPASS
285412ac2fc474e789e255dae16eba4485017c07
[ "Apache-2.0" ]
6
2021-12-15T16:45:58.000Z
2022-03-24T23:36:16.000Z
src/compass/utils/geo_metadata.py
LiangJYu/COMPASS
459f5d6cf05c2b7c9013f0d862bfef22af280fa6
[ "Apache-2.0" ]
4
2021-12-07T19:45:26.000Z
2022-02-28T23:05:37.000Z
from dataclasses import dataclass from datetime import datetime import json from types import SimpleNamespace import isce3 from isce3.core import LUT2d, Poly1d, Orbit from isce3.product import GeoGridParameters import numpy as np from ruamel.yaml import YAML from shapely.geometry import Point, Polygon from compass.ut...
37.930769
95
0.58548
8,219
0.833401
0
0
8,243
0.835835
0
0
2,373
0.240621
557c04366bccd072c61ed9301e5aeee3a5f38113
142
py
Python
app.py
WIZ7ZY/flask-app
b59b0b84543c4f0faf40c57b4753a3c324edc2d8
[ "MIT" ]
null
null
null
app.py
WIZ7ZY/flask-app
b59b0b84543c4f0faf40c57b4753a3c324edc2d8
[ "MIT" ]
null
null
null
app.py
WIZ7ZY/flask-app
b59b0b84543c4f0faf40c57b4753a3c324edc2d8
[ "MIT" ]
null
null
null
from web import create_app import ntplib if __name__ == '__main__': app = create_app(debug=False) app.run(host='0.0.0.0', port=5000)
20.285714
38
0.690141
0
0
0
0
0
0
0
0
19
0.133803
557fbf2a8059c9beebbcd0bd1552ded759c8e7f0
2,227
py
Python
tests/test_db.py
andreasgrv/methinks
5c65fdb84e35b8082ee35963431a352e06f4af44
[ "BSD-3-Clause" ]
null
null
null
tests/test_db.py
andreasgrv/methinks
5c65fdb84e35b8082ee35963431a352e06f4af44
[ "BSD-3-Clause" ]
null
null
null
tests/test_db.py
andreasgrv/methinks
5c65fdb84e35b8082ee35963431a352e06f4af44
[ "BSD-3-Clause" ]
null
null
null
import datetime from methinks.db import Entry import pytest from server.app import create_app from server.app import db as _db from sqlalchemy import event from sqlalchemy.orm import sessionmaker @pytest.fixture(scope="session") def app(request): """ Returns session-wide application. """ return create...
26.831325
93
0.64661
0
0
1,133
0.508756
1,502
0.67445
0
0
637
0.286035
55813ead580a9fd9024544a5265e546eab6feb28
3,339
py
Python
mysite/mysite/settings.py
prnake/search_engine_demo
57122052f63bbd054e0ca84d3c6832e6ecb00ec8
[ "MIT" ]
3
2020-08-08T04:44:29.000Z
2020-09-10T07:38:11.000Z
mysite/mysite/settings.py
prnake/search_engine_demo
57122052f63bbd054e0ca84d3c6832e6ecb00ec8
[ "MIT" ]
null
null
null
mysite/mysite/settings.py
prnake/search_engine_demo
57122052f63bbd054e0ca84d3c6832e6ecb00ec8
[ "MIT" ]
null
null
null
import os import environ env = environ.Env( # set casting, default value DEBUG=(bool, False) ) # reading .env file environ.Env.read_env() # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development s...
24.91791
91
0.692123
0
0
0
0
0
0
0
0
2,133
0.638814
5581ae54a36323a4a46f3383645e34f4c26755e1
2,891
py
Python
bin/simple_log_server.py
kr0nt4b/ctrl_my_home
fd86b479d78f94aaa5d6cc92f0f49399aaef0733
[ "Apache-2.0" ]
null
null
null
bin/simple_log_server.py
kr0nt4b/ctrl_my_home
fd86b479d78f94aaa5d6cc92f0f49399aaef0733
[ "Apache-2.0" ]
null
null
null
bin/simple_log_server.py
kr0nt4b/ctrl_my_home
fd86b479d78f94aaa5d6cc92f0f49399aaef0733
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python2 """ Simple socket server using threads """ import socket import sys from thread import * import os import logging HOST = '' # Symbolic name meaning all available interfaces PORT = 9998 # Arbitrary non-privileged port LOG_FORMAT = '%(asctime)-15s %(message)s' SMART_LOG = '/var/log/smart/smart...
28.91
95
0.590107
2,113
0.730889
0
0
0
0
0
0
911
0.315116
5581eb881f3ca5ddfe7fd5be0a7447ea5b604281
1,348
py
Python
utils/calc_drh.py
leogoesger/func-flow
c81f73998df9b02c04c19a6beae463121d5a8898
[ "MIT" ]
11
2018-04-14T00:34:34.000Z
2021-05-04T17:23:50.000Z
utils/calc_drh.py
Yesicaleon/func-flow
c81f73998df9b02c04c19a6beae463121d5a8898
[ "MIT" ]
15
2019-04-02T03:35:22.000Z
2022-02-12T13:17:11.000Z
utils/calc_drh.py
Yesicaleon/func-flow
c81f73998df9b02c04c19a6beae463121d5a8898
[ "MIT" ]
9
2018-12-01T19:46:11.000Z
2022-03-31T17:18:15.000Z
import numpy as np from utils.helpers import * percentiles = [10, 25, 50, 75, 90] percentile_keys = ["ten", "twenty_five", "fifty", "seventy_five", "ninty"] def calc_drh(flow_matrix): """Dimensionless Hydrograph Plotter""" average_annual_flow = calculate_average_each_column(flow_matrix) number_of_rows = ...
39.647059
116
0.647626
0
0
0
0
0
0
0
0
153
0.113501
55837f3526a4635ce717d7aeac4df126359ab0fc
78
py
Python
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/nn.py
SauravMaheshkar/cookiecutter-kaggle-cv-starter
fb7b8b84daa039034d53398f64e5adfaeead6445
[ "MIT" ]
null
null
null
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/nn.py
SauravMaheshkar/cookiecutter-kaggle-cv-starter
fb7b8b84daa039034d53398f64e5adfaeead6445
[ "MIT" ]
null
null
null
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/nn.py
SauravMaheshkar/cookiecutter-kaggle-cv-starter
fb7b8b84daa039034d53398f64e5adfaeead6445
[ "MIT" ]
null
null
null
import torch.nn as nn __all__ = ["Model"] class Model(nn.Module): pass
9.75
23
0.653846
32
0.410256
0
0
0
0
0
0
7
0.089744
5583a4b67ff425c68e23ee2615524b5aa7a257d1
591
py
Python
meiduo1/apps/meiduo_admin/views/user_group.py
woobrain/nginx-uwsgi-web
5b3ca1fba8205c2c0a2b91d951f812f1c30e12ae
[ "MIT" ]
null
null
null
meiduo1/apps/meiduo_admin/views/user_group.py
woobrain/nginx-uwsgi-web
5b3ca1fba8205c2c0a2b91d951f812f1c30e12ae
[ "MIT" ]
2
2021-05-28T19:45:17.000Z
2021-11-02T15:49:34.000Z
meiduo1/apps/meiduo_admin/views/user_group.py
woobrain/nginx-uwsgi-web
5b3ca1fba8205c2c0a2b91d951f812f1c30e12ae
[ "MIT" ]
null
null
null
from django.contrib.auth.models import Group, Permission from rest_framework.response import Response from rest_framework.viewsets import ModelViewSet from .statistical import UserPagination from apps.meiduo_admin.serializer.user_group import UserGroupSerializer, GroupPerSerializer class UserGroupView(ModelViewSet): ...
32.833333
91
0.788494
306
0.517766
0
0
0
0
0
0
0
0
558514d3c5a79e30120fc03aa990f786ff898ee6
355
py
Python
server/soman/announcements/urls.py
bilgorajskim/soman
0d65d632c39a72f51b43fae71f4b00efc7b286c1
[ "MIT" ]
null
null
null
server/soman/announcements/urls.py
bilgorajskim/soman
0d65d632c39a72f51b43fae71f4b00efc7b286c1
[ "MIT" ]
null
null
null
server/soman/announcements/urls.py
bilgorajskim/soman
0d65d632c39a72f51b43fae71f4b00efc7b286c1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.conf.urls import url, include from rest_framework import routers, serializers, viewsets from . import views router = routers.DefaultRouter() router.register(r'announcements', views.AnnouncementViewSet) urlpatterns = [ url...
27.307692
60
0.769014
0
0
0
0
0
0
0
0
47
0.132394
55860760bf8930847b1a7c03d8b03442f460fce6
414
py
Python
backend/app/db/__init__.py
MaxKochanov/stock-news
42776196604e91cd673c94c9f7dea71343791bd1
[ "MIT" ]
null
null
null
backend/app/db/__init__.py
MaxKochanov/stock-news
42776196604e91cd673c94c9f7dea71343791bd1
[ "MIT" ]
null
null
null
backend/app/db/__init__.py
MaxKochanov/stock-news
42776196604e91cd673c94c9f7dea71343791bd1
[ "MIT" ]
null
null
null
from app.db.wrappers import ClickHouse DBS = {} async def init_databases(config): """ Usage example DBS["clickhouse"] = await ClickHouse.init_async(config["clickhouse"]) DBS["mysql"] = await MySQL.init_async(config["mysql"]) """ pass async def shutdown_databases(): """ await ClickHo...
19.714286
73
0.654589
0
0
0
0
0
0
359
0.86715
267
0.644928
5588a3d3733f037d283e357aa48613bd11e602e8
1,108
py
Python
ravendb/tests/jvm_migrated_tests/client/executor/test_request_executor.py
ravendb/RavenDB-Python-Client
6286b459b501e755fe8e8591a48acf8616605ccd
[ "MIT" ]
8
2016-10-08T17:45:44.000Z
2018-05-29T12:16:43.000Z
ravendb/tests/jvm_migrated_tests/client/executor/test_request_executor.py
ravendb/RavenDB-Python-Client
6286b459b501e755fe8e8591a48acf8616605ccd
[ "MIT" ]
5
2017-02-12T15:50:53.000Z
2017-09-18T12:25:01.000Z
ravendb/tests/jvm_migrated_tests/client/executor/test_request_executor.py
ravendb/RavenDB-Python-Client
6286b459b501e755fe8e8591a48acf8616605ccd
[ "MIT" ]
8
2016-07-03T07:59:12.000Z
2017-09-18T11:22:23.000Z
from ravendb.documents.conventions.document_conventions import DocumentConventions from ravendb.exceptions.exceptions import DatabaseDoesNotExistException from ravendb.http.request_executor import RequestExecutor from ravendb.http.server_node import ServerNode from ravendb.http.topology import UpdateTopologyParameters ...
44.32
99
0.773466
740
0.66787
0
0
0
0
0
0
21
0.018953
558930319f7b3b786028343bb2be22080c9650c4
14,091
py
Python
src/icaltool/icaltool.py
randomchars42/icaltool
acf482f08bb4eb7bc000c0b2591c6d76ec8fcaac
[ "Unlicense" ]
null
null
null
src/icaltool/icaltool.py
randomchars42/icaltool
acf482f08bb4eb7bc000c0b2591c6d76ec8fcaac
[ "Unlicense" ]
null
null
null
src/icaltool/icaltool.py
randomchars42/icaltool
acf482f08bb4eb7bc000c0b2591c6d76ec8fcaac
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 import csv import logging import logging.config import re import argparse import json import sys from .log import log from . import datatypes logger = logging.getLogger(__name__) default_column_mapping = { 'DTSTART': 0, 'DTEND': 1, 'DTSTAMP': 2, 'UID': 3, 'CREATED': 4, ...
33.630072
83
0.544461
9,545
0.677383
0
0
0
0
0
0
4,596
0.326166
55895bd32cc5eee1e655399e93c373ec1fa66d6b
1,462
py
Python
install_R_packages.py
mohaEs/PyVisualField
64c7303c77500c923300536dd717f2e6c0262323
[ "MIT" ]
null
null
null
install_R_packages.py
mohaEs/PyVisualField
64c7303c77500c923300536dd717f2e6c0262323
[ "MIT" ]
null
null
null
install_R_packages.py
mohaEs/PyVisualField
64c7303c77500c923300536dd717f2e6c0262323
[ "MIT" ]
1
2022-01-04T19:33:06.000Z
2022-01-04T19:33:06.000Z
# -*- coding: utf-8 -*- """ Created on Mon Oct 11 18:00:28 2021 @author: Mohammad Eslami """ try: import rpy2 print('===> rpy2 version: ', rpy2.__version__) from rpy2.robjects.packages import importr # import rpy2's package module import rpy2.robjects.packages as rpackages # R vector of ...
27.584906
75
0.699042
0
0
0
0
0
0
0
0
832
0.569083
5589cd912e691b17322bc09642b9a8ec0453acc9
8,949
py
Python
usaspending_api/financial_activities/migrations/0005_auto_20161004_1547.py
toolness/usaspending-api
ed9a396e20a52749f01f43494763903cc371f9c2
[ "CC0-1.0" ]
1
2021-06-17T05:09:00.000Z
2021-06-17T05:09:00.000Z
usaspending_api/financial_activities/migrations/0005_auto_20161004_1547.py
toolness/usaspending-api
ed9a396e20a52749f01f43494763903cc371f9c2
[ "CC0-1.0" ]
null
null
null
usaspending_api/financial_activities/migrations/0005_auto_20161004_1547.py
toolness/usaspending-api
ed9a396e20a52749f01f43494763903cc371f9c2
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-04 19:47 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('financial_activities', '0004_merge_20160928_1603'), ] operations = [ migrations.Ren...
46.853403
84
0.703766
8,799
0.983238
0
0
0
0
0
0
4,774
0.533467
558acc49675640913785e7f0a2b6dca8cde8835f
2,654
py
Python
tests/unit/utils/test_io_utils.py
briannemsick/barrage
f86bd0723abc0ab94b0b8f2ca3ffa5e3b7541455
[ "MIT" ]
16
2019-06-21T22:45:59.000Z
2020-08-20T22:26:22.000Z
tests/unit/utils/test_io_utils.py
briannemsick/barrage
f86bd0723abc0ab94b0b8f2ca3ffa5e3b7541455
[ "MIT" ]
15
2019-06-21T23:09:59.000Z
2020-05-07T03:02:33.000Z
tests/unit/utils/test_io_utils.py
briannemsick/barrage
f86bd0723abc0ab94b0b8f2ca3ffa5e3b7541455
[ "MIT" ]
6
2019-06-22T15:27:39.000Z
2020-07-06T02:18:55.000Z
import json import os import pickle import numpy as np import pandas as pd import pytest from barrage.utils import io_utils @pytest.fixture() def sample_dict(): return {"unit": "test"} def test_save_json(artifact_path, sample_dict): filename = "unit_test.json" io_utils.save_json(sample_dict, filename,...
31.223529
78
0.715901
0
0
0
0
64
0.024115
0
0
237
0.089299
558cbd4a7ce3e41aaed8e2b86ecb2cf3f058fd07
20,998
py
Python
script.py
kenneth2001/Virus
e7d0b650d9d7a4eaab9bd87b3695b791e1f105b1
[ "MIT" ]
null
null
null
script.py
kenneth2001/Virus
e7d0b650d9d7a4eaab9bd87b3695b791e1f105b1
[ "MIT" ]
null
null
null
script.py
kenneth2001/Virus
e7d0b650d9d7a4eaab9bd87b3695b791e1f105b1
[ "MIT" ]
null
null
null
import asyncio import requests from bs4 import BeautifulSoup from datetime import date, datetime import discord import numpy as np from urllib.error import HTTPError import yt_dlp as youtube_dl from discord.ext import commands import os from pytz import timezone from yt_dlp.utils import DownloadError, ExtractorError fr...
37.563506
194
0.595247
0
0
0
0
15,558
0.738396
16,501
0.783151
6,691
0.317561
558d879413f6f88e3c45e2ca06534a675e1043f9
480
py
Python
solutions/1281-subtract-the-product-and-sum-of-digits-of-an-integer.py
lk-hang/leetcode
4c8735463bdcb9f48666e03a39eb03ee9f625cec
[ "MIT" ]
null
null
null
solutions/1281-subtract-the-product-and-sum-of-digits-of-an-integer.py
lk-hang/leetcode
4c8735463bdcb9f48666e03a39eb03ee9f625cec
[ "MIT" ]
null
null
null
solutions/1281-subtract-the-product-and-sum-of-digits-of-an-integer.py
lk-hang/leetcode
4c8735463bdcb9f48666e03a39eb03ee9f625cec
[ "MIT" ]
null
null
null
""" Given an integer number n, return the difference between the product of its digits and the sum of its digits. """ class Solution: def subtractProductAndSum(self, n: int) -> int: if n < 10: return 0 running_prod = 1 running_sum = 0 while n > 0: re...
25.263158
109
0.522917
352
0.733333
0
0
0
0
0
0
117
0.24375
558e58ba058923b58851710da67bc2d4ad87a57f
1,031
py
Python
VideoIndexerDemo/VideoIndexer/application.py
microsoft/ai4accessibility
4c13d006f285e31f01d1bc71a55c20e9234713a5
[ "MIT" ]
2
2021-07-11T06:03:43.000Z
2021-10-09T23:37:21.000Z
VideoIndexerDemo/VideoIndexer/application.py
microsoft/ai4accessibility
4c13d006f285e31f01d1bc71a55c20e9234713a5
[ "MIT" ]
6
2021-09-08T03:07:13.000Z
2022-03-12T00:57:07.000Z
VideoIndexerDemo/VideoIndexer/application.py
microsoft/ai4accessibility
4c13d006f285e31f01d1bc71a55c20e9234713a5
[ "MIT" ]
3
2021-02-14T18:51:31.000Z
2021-02-14T18:51:41.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from dotenv import load_dotenv load_dotenv() import os import json import requests from concurrent.futures import ThreadPoolExecutor from flask import Flask, flash, request, redirect, url_for, session from video_captioning.main import upload_vid...
29.457143
83
0.747818
0
0
0
0
508
0.492726
0
0
185
0.179437
559154d893c3d43225a58bc587edd3aa01dea828
5,154
py
Python
code/tests/unit/api/test_enrich.py
CiscoSecurity/tr-05-serverless-cybercrime-tracker
28fcfaa220025c9e8523633a4a9a04f319656756
[ "MIT" ]
3
2020-04-28T08:53:14.000Z
2020-12-17T14:25:32.000Z
code/tests/unit/api/test_enrich.py
CiscoSecurity/tr-05-serverless-cybercrime-tracker
28fcfaa220025c9e8523633a4a9a04f319656756
[ "MIT" ]
2
2020-03-06T15:00:22.000Z
2020-06-26T11:21:52.000Z
code/tests/unit/api/test_enrich.py
CiscoSecurity/tr-05-serverless-cybercrime-tracker
28fcfaa220025c9e8523633a4a9a04f319656756
[ "MIT" ]
null
null
null
from http import HTTPStatus from requests.exceptions import SSLError from pytest import fixture from unittest import mock from tests.unit.mock_for_tests import ( CYBERCRIME_RESPONSE_MOCK, EXPECTED_DELIBERATE_RESPONSE, EXPECTED_OBSERVE_RESPONSE, EXPECTED_RESPONSE_500_ERROR, EXPECTED_RESPONSE_404_ER...
29.451429
76
0.695188
0
0
191
0.037059
607
0.117773
0
0
579
0.11234
55915bb2fe7f5c79e7cd44acfd89dd079dc66443
2,658
py
Python
Python/Euler 01 - 10.py
jiegillet/project-euler
3b530e11af00e9d9eccb7aa41ed8018ee6d7b472
[ "MIT" ]
null
null
null
Python/Euler 01 - 10.py
jiegillet/project-euler
3b530e11af00e9d9eccb7aa41ed8018ee6d7b472
[ "MIT" ]
null
null
null
Python/Euler 01 - 10.py
jiegillet/project-euler
3b530e11af00e9d9eccb7aa41ed8018ee6d7b472
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ untitled.py Created by Jérémie on 2013-10-26. Copyright (c) 2013 __MyCompanyName__. All rights reserved. """ """ # Problem 1 lim=1000 s=0 for i in range(lim): if i%3==0 or i%5==0: s+=i print s print sum([x for x in range(1000) if x % 3== 0 or x % 5== 0]) """ """ # Probl...
25.557692
1,009
0.748683
0
0
0
0
0
0
0
0
2,470
0.928571
5593fe3d21ad82b5382d08854df0a8f99eec0ed9
1,900
py
Python
src/ensae_teaching_cs/tests/american_cities.py
Jerome-maker/ensae_teaching_cs
43ea044361ee60c00c85aea354a7b25c21c0fd07
[ "MIT" ]
73
2015-05-12T13:12:11.000Z
2021-12-21T11:44:29.000Z
src/ensae_teaching_cs/tests/american_cities.py
Jerome-maker/ensae_teaching_cs
43ea044361ee60c00c85aea354a7b25c21c0fd07
[ "MIT" ]
90
2015-06-23T11:11:35.000Z
2021-03-31T22:09:15.000Z
src/ensae_teaching_cs/tests/american_cities.py
Jerome-maker/ensae_teaching_cs
43ea044361ee60c00c85aea354a7b25c21c0fd07
[ "MIT" ]
65
2015-01-13T08:23:55.000Z
2022-02-11T22:42:07.000Z
""" @file @brief Function to test others functionalities """ import os import pandas from pyquickhelper.loghelper import fLOG from ..faq.faq_matplotlib import graph_cities from ..special import tsp_kruskal_algorithm, distance_haversine def american_cities(df_or_filename, nb_cities=-1, img=None, fLOG=fLOG): """ ...
29.6875
91
0.596316
0
0
0
0
0
0
0
0
479
0.252105
55948a0d8acfcbe1f96f58b36c1bb83505bd04f6
175
py
Python
first_task.py
yashika0607/Task1_python
4a867227f48f0c8ed9ad418fb412550eef3a7571
[ "Apache-2.0" ]
null
null
null
first_task.py
yashika0607/Task1_python
4a867227f48f0c8ed9ad418fb412550eef3a7571
[ "Apache-2.0" ]
null
null
null
first_task.py
yashika0607/Task1_python
4a867227f48f0c8ed9ad418fb412550eef3a7571
[ "Apache-2.0" ]
null
null
null
#task 1 r=float(input("Enter the radius of the circle?\n")) pi=3.143 area=pi*r*r print("Area of the circle is ",area) #task 2 x=input("Enter the file name\n") print(x+".py")
17.5
51
0.674286
0
0
0
0
0
0
0
0
101
0.577143
5594b24c92581e7c3ba26f490dea8b770f2cf8fd
2,049
py
Python
tools/ntp_spoofer.py
dschoonwinkel/pypacker
58c833f40207db746b0b2995ca3835a533e0258e
[ "BSD-3-Clause" ]
null
null
null
tools/ntp_spoofer.py
dschoonwinkel/pypacker
58c833f40207db746b0b2995ca3835a533e0258e
[ "BSD-3-Clause" ]
null
null
null
tools/ntp_spoofer.py
dschoonwinkel/pypacker
58c833f40207db746b0b2995ca3835a533e0258e
[ "BSD-3-Clause" ]
null
null
null
"""Simple NTP spoofing tool.""" from pypacker.layer12.ethernet import Ethernet from pypacker.layer3 import ip from pypacker.layer4.udp import UDP from pypacker.layer567 import ntp from pypacker import psocket # interface to listen on IFACE = "wlan0" # source address which commits a NTP request and we send a wrong ans...
32.52381
91
0.736945
0
0
0
0
0
0
0
0
1,061
0.517814
5594c3feafec578628223eff5ebd91b66138d3a5
7,524
py
Python
motsfinder/exprs/test_basics.py
daniel-dpk/distorted-motsfinder-public
8c2eec174c755c55b26b568243e58c2956a35257
[ "MIT" ]
4
2019-08-26T09:50:26.000Z
2022-03-02T16:11:17.000Z
motsfinder/exprs/test_basics.py
daniel-dpk/distorted-motsfinder-public
8c2eec174c755c55b26b568243e58c2956a35257
[ "MIT" ]
5
2021-03-31T19:55:34.000Z
2021-04-01T08:29:53.000Z
motsfinder/exprs/test_basics.py
daniel-dpk/distorted-motsfinder-public
8c2eec174c755c55b26b568243e58c2956a35257
[ "MIT" ]
1
2019-09-18T14:15:33.000Z
2019-09-18T14:15:33.000Z
#!/usr/bin/env python3 from __future__ import print_function from builtins import range, map import unittest import sys import pickle import numpy as np from mpmath import mp from testutils import DpkTestCase from .numexpr import NumericExpression from .numexpr import isclose from .basics import OffsetExpression, D...
34.356164
91
0.591042
6,885
0.915072
0
0
0
0
0
0
351
0.046651
559516145d3a91e65f7eba170cf38f3e8329840b
468
py
Python
python/Data Structures and Algorithms in Python Book/oop/fibonacciprogression.py
gauravssnl/Data-Structures-and-Algorithms
1c335c72ce514d4f95090241bbd6edf01a1141a8
[ "MIT" ]
7
2020-05-10T09:57:23.000Z
2021-03-27T11:55:07.000Z
python/Data Structures and Algorithms in Python Book/oop/fibonacciprogression.py
gauravssnl/Data-Structures-and-Algorithms
1c335c72ce514d4f95090241bbd6edf01a1141a8
[ "MIT" ]
null
null
null
python/Data Structures and Algorithms in Python Book/oop/fibonacciprogression.py
gauravssnl/Data-Structures-and-Algorithms
1c335c72ce514d4f95090241bbd6edf01a1141a8
[ "MIT" ]
3
2021-03-27T03:42:57.000Z
2021-08-09T12:03:41.000Z
from progression import Progression class FibonacciProgression(Progression): def __init__(self, first=0, second=1): super().__init__(start=first) self._previous = second - first def _advance(self): self._previous, self._current = self._current, self._previous + self._current ...
29.25
85
0.713675
281
0.600427
0
0
0
0
0
0
10
0.021368
55966e42aa982766be05f8a6dbd86f8df5f992eb
18,587
py
Python
openamundsen/modules/snow/multilayermodel.py
openamundsen/openamundsen
2ac09eb34b0c72c84c421a0dac08d114a05b7b1c
[ "MIT" ]
3
2021-05-28T06:46:36.000Z
2021-06-14T13:39:25.000Z
openamundsen/modules/snow/multilayermodel.py
openamundsen/openamundsen
2ac09eb34b0c72c84c421a0dac08d114a05b7b1c
[ "MIT" ]
22
2021-04-28T12:31:58.000Z
2022-03-09T18:29:12.000Z
openamundsen/modules/snow/multilayermodel.py
openamundsen/openamundsen
2ac09eb34b0c72c84c421a0dac08d114a05b7b1c
[ "MIT" ]
1
2021-06-01T12:48:54.000Z
2021-06-01T12:48:54.000Z
import numpy as np from numba import njit, prange from openamundsen import constants, constants as c, heatconduction from openamundsen.snowmodel import SnowModel from . import snow class MultilayerSnowModel(SnowModel): def __init__(self, model): self.model = model s = model.state.snow num...
30.470492
161
0.559907
5,494
0.295424
0
0
12,904
0.693875
0
0
6,343
0.341077
5596e16fb509c3accc1b616f5872b39869a62e82
2,746
py
Python
scripts/custom_task_manager.py
operaun/dotfiles
6e91206427199a9f6a9ac7397a886ac2f26eade0
[ "MIT" ]
1
2016-10-06T12:31:04.000Z
2016-10-06T12:31:04.000Z
scripts/custom_task_manager.py
operaun/dotfiles
6e91206427199a9f6a9ac7397a886ac2f26eade0
[ "MIT" ]
null
null
null
scripts/custom_task_manager.py
operaun/dotfiles
6e91206427199a9f6a9ac7397a886ac2f26eade0
[ "MIT" ]
null
null
null
# scripts/custom_task_manager.py import os import subprocess from abc import ABCMeta, abstractmethod from pretty_printer import * class CustomTaskManager(object): def __init__(self): self.tasks = list() def printMessages(self): for task in self.tasks: task.printHelpMessage() de...
31.204545
99
0.659505
2,600
0.946832
0
0
130
0.047342
0
0
875
0.318645
5598265430fb84db260c24576996f2ee0f789ef1
27
py
Python
exercises/acronym/acronym.py
RJTK/python
f9678d629735f75354bbd543eb7f10220a498dae
[ "MIT" ]
1
2021-05-15T19:59:04.000Z
2021-05-15T19:59:04.000Z
exercises/acronym/acronym.py
RJTK/python
f9678d629735f75354bbd543eb7f10220a498dae
[ "MIT" ]
null
null
null
exercises/acronym/acronym.py
RJTK/python
f9678d629735f75354bbd543eb7f10220a498dae
[ "MIT" ]
2
2018-03-03T08:32:12.000Z
2019-08-22T11:55:53.000Z
def abbreviate(): pass
9
17
0.62963
0
0
0
0
0
0
0
0
0
0
5598bbdfc235215336c94064608a0db8ff763655
3,961
py
Python
bpmn/urls.py
VSSantana/SFDjango-BPMN
e5a3fb8da9282fd88f72a85a4b34d89d38391e36
[ "MIT" ]
1
2021-09-21T00:02:10.000Z
2021-09-21T00:02:10.000Z
bpmn/urls.py
VSSantana/SFDjango-BPMN
e5a3fb8da9282fd88f72a85a4b34d89d38391e36
[ "MIT" ]
5
2021-09-22T13:54:06.000Z
2021-09-22T14:05:56.000Z
bpmn/urls.py
marcelobbfonseca/SFDjango-BPMN
50565763414f52d9e84004494cf550c6fe2358fa
[ "MIT" ]
1
2021-09-18T01:22:25.000Z
2021-09-18T01:22:25.000Z
from django.urls import path from django.contrib.auth.views import LoginView from .views.activity_view import * from .views.activity_type_view import * from .views.event_view import * from .views.flow_view import * from .views.lane_view import * from .views.pool_view import * from .views.process_type_view import * from...
73.351852
127
0.757637
0
0
0
0
0
0
0
0
1,835
0.463267
5598fc6baf6adbca126912ba31690ef9d92c7c11
2,106
py
Python
utils/boilerplate/test_gorilla.py
cfginn/sap-simulation-package
73314e5380cec5c61a9fe5ff5fbafa25b9e2beac
[ "MIT" ]
null
null
null
utils/boilerplate/test_gorilla.py
cfginn/sap-simulation-package
73314e5380cec5c61a9fe5ff5fbafa25b9e2beac
[ "MIT" ]
null
null
null
utils/boilerplate/test_gorilla.py
cfginn/sap-simulation-package
73314e5380cec5c61a9fe5ff5fbafa25b9e2beac
[ "MIT" ]
null
null
null
import unittest from pysapets.gorilla import Gorilla from pysapets.animal import Animal import pysapets.constants as constants from unittest.mock import patch from io import StringIO from copy import deepcopy class GorillaTest(unittest.TestCase): def setUp(self): self.gorilla = Gorilla() self.friends = [se...
31.432836
96
0.74359
1,878
0.891738
0
0
0
0
0
0
526
0.249763