hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
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
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
f6499d720ab4c629a6fba5fd2379ec8997d2d78e
4,619
py
Python
Money/settings.py
Firexd2/control-money
c72626f057c39766f8d750fc96e5f7accf1f5810
[ "MIT" ]
null
null
null
Money/settings.py
Firexd2/control-money
c72626f057c39766f8d750fc96e5f7accf1f5810
[ "MIT" ]
null
null
null
Money/settings.py
Firexd2/control-money
c72626f057c39766f8d750fc96e5f7accf1f5810
[ "MIT" ]
null
null
null
""" Django settings for Money project. Generated by 'django-admin startproject' using Django 2.0. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os # Bui...
25.103261
91
0.662481
3546611bac5e92c85400508a5a081b7e2f3bf398
370
py
Python
src/chip8_dasm/__main__.py
jeffnyman/chip8-dasm
62e824ed686989db1bb4d350f9676f7c89aa30ca
[ "MIT" ]
null
null
null
src/chip8_dasm/__main__.py
jeffnyman/chip8-dasm
62e824ed686989db1bb4d350f9676f7c89aa30ca
[ "MIT" ]
null
null
null
src/chip8_dasm/__main__.py
jeffnyman/chip8-dasm
62e824ed686989db1bb4d350f9676f7c89aa30ca
[ "MIT" ]
null
null
null
"""Entry point module for the disassembler.""" import sys from chip8_dasm.cli import main if sys.version_info < (3, 7): sys.stderr.write("\nc8dasm requires Python 3.7 or later.\n") sys.stderr.write( "Your current version is: " f"{sys.version_info.major}.{sys.version_info.minor}\n" ) s...
21.764706
64
0.648649
4f7f4d9d8bdbd1b7b7a6bd30cac09368e2d738fa
2,000
py
Python
stanCode_Projects/my_photoshop/best_photoshop_award.py
yschang306/sc-projects
a57cc5dd0fce80b286820324997234a0391f23c4
[ "MIT" ]
null
null
null
stanCode_Projects/my_photoshop/best_photoshop_award.py
yschang306/sc-projects
a57cc5dd0fce80b286820324997234a0391f23c4
[ "MIT" ]
null
null
null
stanCode_Projects/my_photoshop/best_photoshop_award.py
yschang306/sc-projects
a57cc5dd0fce80b286820324997234a0391f23c4
[ "MIT" ]
null
null
null
""" File: best_photoshop_award.py ---------------------------------- This file creates a photoshopped image that is going to compete for the Best Photoshop Award for SC001. Please put all the images you will use in the image_contest folder and make sure to choose the right folder when loading your images. """ from simp...
33.333333
96
0.6215
b63de76a1c780def81f3293cc1ebf0f46269bcd7
924
py
Python
venv/Scripts/rst2xetex.py
ishatserka/MachineLearningAndDataAnalysisCoursera
e82e772df2f4aec162cb34ac6127df10d14a625a
[ "MIT" ]
null
null
null
venv/Scripts/rst2xetex.py
ishatserka/MachineLearningAndDataAnalysisCoursera
e82e772df2f4aec162cb34ac6127df10d14a625a
[ "MIT" ]
null
null
null
venv/Scripts/rst2xetex.py
ishatserka/MachineLearningAndDataAnalysisCoursera
e82e772df2f4aec162cb34ac6127df10d14a625a
[ "MIT" ]
null
null
null
#!E:\git\MachineLearningAndDataAnalysisCoursera\venv\Scripts\python.exe # $Id: rst2xetex.py 7847 2015-03-17 17:30:47Z milde $ # Author: Guenter Milde # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing Lua/XeLaTeX code. """ try: import local...
33
77
0.683983
20311c74b645de57d4ea2e0c55e7076c9e01e76e
5,673
py
Python
configs/faster_rcnn_vgg16_citypersons.py
LiGangszu/PedestrianDetection-HGPD
3874e331c8afe4cc20fc49de7ebdbe77db277c98
[ "Apache-2.0" ]
9
2021-04-02T12:21:38.000Z
2021-08-19T07:55:19.000Z
configs/faster_rcnn_vgg16_citypersons.py
LiGangszu/PedestrianDetection-HGPD
3874e331c8afe4cc20fc49de7ebdbe77db277c98
[ "Apache-2.0" ]
1
2021-05-02T18:34:06.000Z
2021-05-12T04:04:57.000Z
configs/faster_rcnn_vgg16_citypersons.py
LiGangszu/PedestrianDetection-HGPD
3874e331c8afe4cc20fc49de7ebdbe77db277c98
[ "Apache-2.0" ]
2
2021-04-28T09:27:45.000Z
2021-06-07T12:02:01.000Z
# model settings model = dict( type='FasterRCNN', pretrained='modelzoo://vgg16', backbone=dict( type='VGG', depth=16, frozen_stages=1), neck=None, rpn_head=dict( type='RPNHead', in_channels=512, feat_channels=512, anchor_scales=[4., 5.4, 7.2, 9...
30.664865
94
0.588049
6c62469480b6486abced8fc11f590d4da0dea4dc
11,919
py
Python
dort-core/timelord/timelord_state.py
Dortchain/dort-blockchian
14f16e321a60f9d70f849f58e4e9964fa337a084
[ "Apache-2.0" ]
1
2021-09-05T18:21:09.000Z
2021-09-05T18:21:09.000Z
dort-core/timelord/timelord_state.py
Dortchain/dort-blockchian
14f16e321a60f9d70f849f58e4e9964fa337a084
[ "Apache-2.0" ]
1
2021-07-11T03:04:25.000Z
2021-07-11T03:04:25.000Z
dort-core/timelord/timelord_state.py
Dortchain/dort-blockchian
14f16e321a60f9d70f849f58e4e9964fa337a084
[ "Apache-2.0" ]
null
null
null
import logging from typing import List, Optional, Tuple, Union from Dort.consensus.constants import ConsensusConstants from Dort.protocols import timelord_protocol from Dort.timelord.iters_from_block import iters_from_block from Dort.timelord.types import Chain, StateType from Dort.types.blockchain_format.classgroup i...
49.870293
119
0.675392
a901e0dde19197f94d5722556a76067cf9908c67
1,421
py
Python
src/bilbyui/migrations/0011_auto_20200720_0109.py
gravitationalwavedc/gwcloud_bilby
f5074fe60ff2a3cfa6a7e8d3e97c9573a6152563
[ "MIT" ]
1
2020-10-26T02:35:26.000Z
2020-10-26T02:35:26.000Z
src/bilbyui/migrations/0011_auto_20200720_0109.py
gravitationalwavedc/gwcloud_bilby
f5074fe60ff2a3cfa6a7e8d3e97c9573a6152563
[ "MIT" ]
31
2020-05-04T05:57:45.000Z
2022-02-23T04:35:35.000Z
src/bilbyui/migrations/0011_auto_20200720_0109.py
gravitationalwavedc/gwcloud_bilby
f5074fe60ff2a3cfa6a7e8d3e97c9573a6152563
[ "MIT" ]
null
null
null
# Generated by Django 2.2.13 on 2020-07-20 01:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bilbyui', '0010_merge_20200514_0412'), ] operations = [ migrations.CreateModel( name='Label', fields=[ ...
35.525
307
0.567206
0f753e5773ae086a5c9c602d85703d4741acc2db
161
py
Python
Parte1/Cap2/name_1.py
fabianoflorentino/python-CursoIntensivoDePython
822288cc4b382936dde1bc647e3f8c2b925ced70
[ "Apache-2.0" ]
null
null
null
Parte1/Cap2/name_1.py
fabianoflorentino/python-CursoIntensivoDePython
822288cc4b382936dde1bc647e3f8c2b925ced70
[ "Apache-2.0" ]
null
null
null
Parte1/Cap2/name_1.py
fabianoflorentino/python-CursoIntensivoDePython
822288cc4b382936dde1bc647e3f8c2b925ced70
[ "Apache-2.0" ]
1
2020-02-05T13:07:08.000Z
2020-02-05T13:07:08.000Z
first_name = "Fabiano" last_name = "Florentino" full_name = first_name + " " + last_name print(f'{full_name}\n') print(f"Hello ," + full_name.title() + "!\n" )
23
46
0.658385
78e402f5d35fec4a7ff734ae2b0c04c93f5731be
127
py
Python
mne/io/egi/__init__.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
3
2021-01-04T08:45:56.000Z
2021-05-19T12:25:59.000Z
mne/io/egi/__init__.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
28
2020-05-07T00:58:34.000Z
2020-08-29T23:02:17.000Z
mne/io/egi/__init__.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
3
2019-01-28T13:48:00.000Z
2019-07-10T16:02:11.000Z
"""EGI module for conversion to FIF.""" # Author: Denis A. Engemann <denis.engemann@gmail.com> from .egi import read_raw_egi
21.166667
54
0.732283
d437d3eab6dd2df32e315d45b98d335ef236052c
5,521
py
Python
src/fine_tune/fine_tune.py
KennethEnevoldsen/snp-compression
0cccecd25bc301530b814e6e10958d5a8ea836e7
[ "BSD-3-Clause" ]
null
null
null
src/fine_tune/fine_tune.py
KennethEnevoldsen/snp-compression
0cccecd25bc301530b814e6e10958d5a8ea836e7
[ "BSD-3-Clause" ]
null
null
null
src/fine_tune/fine_tune.py
KennethEnevoldsen/snp-compression
0cccecd25bc301530b814e6e10958d5a8ea836e7
[ "BSD-3-Clause" ]
null
null
null
""" Fine-tune pre-trained networks on new data samples """ import os import sys from pathlib import Path import xarray as xr import pandas as pd import numpy as np import dask.array as da from pytorch_lightning import Trainer from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint from pytorch_lightnin...
30.843575
87
0.670712
e8f7534a95f4dfcd0fdcf6432713ba180cd9afa2
496
py
Python
ecom/store/migrations/0002_auto_20200904_1603.py
shamsher4499/website
f81d0564f88059e5c55f8a1194913572c61a7247
[ "MIT" ]
null
null
null
ecom/store/migrations/0002_auto_20200904_1603.py
shamsher4499/website
f81d0564f88059e5c55f8a1194913572c61a7247
[ "MIT" ]
null
null
null
ecom/store/migrations/0002_auto_20200904_1603.py
shamsher4499/website
f81d0564f88059e5c55f8a1194913572c61a7247
[ "MIT" ]
null
null
null
# Generated by Django 3.0.5 on 2020-09-04 10:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('store', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='customer', name='mobile', ), ...
21.565217
61
0.568548
ddc42284046a4a368378654bea45b9521e80faab
598
py
Python
scripts/server.py
3coins/jupyterlab-plugin-playground
152dbda0f0285fc7ebe62b4366b66962845e3f8c
[ "BSD-3-Clause" ]
16
2020-01-13T14:38:37.000Z
2020-10-14T10:49:23.000Z
scripts/server.py
3coins/jupyterlab-plugin-playground
152dbda0f0285fc7ebe62b4366b66962845e3f8c
[ "BSD-3-Clause" ]
16
2021-10-12T04:53:17.000Z
2022-03-24T14:26:54.000Z
scripts/server.py
3coins/jupyterlab-plugin-playground
152dbda0f0285fc7ebe62b4366b66962845e3f8c
[ "BSD-3-Clause" ]
4
2021-10-12T04:43:06.000Z
2022-02-27T01:18:45.000Z
#!/usr/bin/env python3 # encoding: utf-8 """Use instead of `python3 -m http.server` when you need CORS""" from http.server import HTTPServer, SimpleHTTPRequestHandler class CORSRequestHandler(SimpleHTTPRequestHandler): def end_headers(self): self.send_header('Access-Control-Allow-Origin', '*') sel...
37.375
80
0.730769
1c944ae05929ddf6e8b8a6a177a32dda3945fe48
505
py
Python
final_project_face_recognition/cli.py
dlwoalsgg/final_project_face_recognition
beea03d89755a96ab51f96938ec037783cff5a75
[ "MIT" ]
null
null
null
final_project_face_recognition/cli.py
dlwoalsgg/final_project_face_recognition
beea03d89755a96ab51f96938ec037783cff5a75
[ "MIT" ]
null
null
null
final_project_face_recognition/cli.py
dlwoalsgg/final_project_face_recognition
beea03d89755a96ab51f96938ec037783cff5a75
[ "MIT" ]
null
null
null
"""Console script for final_project_face_recognition.""" import argparse import sys def main(): """Console script for final_project_face_recognition.""" parser = argparse.ArgumentParser() parser.add_argument('_', nargs='*') args = parser.parse_args() print("Arguments: " + str(args._)) print("...
25.25
60
0.685149
02f67060e18b78a9fb790fb994cd9b99d5c341bc
26
py
Python
text-classification/bert-sentiment-sst5/bert_sentiment/__init__.py
ripplesaround/ETDI_NL
4b77444d8ef5dee1f020e4d30e6cfc24fb5945c9
[ "MIT" ]
49
2019-10-10T16:12:49.000Z
2022-01-16T07:11:18.000Z
text-classification/bert-sentiment-sst5/bert_sentiment/__init__.py
ripplesaround/ETDI_NL
4b77444d8ef5dee1f020e4d30e6cfc24fb5945c9
[ "MIT" ]
4
2019-11-25T09:27:46.000Z
2020-07-04T02:10:42.000Z
text-classification/bert-sentiment-sst5/bert_sentiment/__init__.py
ripplesaround/ETDI_NL
4b77444d8ef5dee1f020e4d30e6cfc24fb5945c9
[ "MIT" ]
10
2019-10-11T05:46:12.000Z
2021-04-13T06:30:04.000Z
from . import data, train
13
25
0.730769
a6f93c67083535fae60fa08b58f1ee1b17abea5b
21,649
py
Python
tunobase/core/migrations/0008_auto__chg_field_htmlbanner_rich_content__chg_field_contentmodel_rich_c.py
unomena/tunobase-core
fd24e378c87407131805fa56ade8669fceec8dfa
[ "BSD-3-Clause" ]
null
null
null
tunobase/core/migrations/0008_auto__chg_field_htmlbanner_rich_content__chg_field_contentmodel_rich_c.py
unomena/tunobase-core
fd24e378c87407131805fa56ade8669fceec8dfa
[ "BSD-3-Clause" ]
null
null
null
tunobase/core/migrations/0008_auto__chg_field_htmlbanner_rich_content__chg_field_contentmodel_rich_c.py
unomena/tunobase-core
fd24e378c87407131805fa56ade8669fceec8dfa
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'HTMLBanner.rich_content' db.alter_column(u'core_htmlba...
90.204167
204
0.57259
1d854fdb8a3195e78af32c128df8b5f30612e1a1
69,670
py
Python
libtiff/libtiff_ctypes.py
sephalon/pylibtiff
7dad04e1e8ff67cb06c605ee1e746d48ac6d88eb
[ "BSD-3-Clause" ]
null
null
null
libtiff/libtiff_ctypes.py
sephalon/pylibtiff
7dad04e1e8ff67cb06c605ee1e746d48ac6d88eb
[ "BSD-3-Clause" ]
null
null
null
libtiff/libtiff_ctypes.py
sephalon/pylibtiff
7dad04e1e8ff67cb06c605ee1e746d48ac6d88eb
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ Ctypes based wrapper to libtiff library. See TIFF.__doc__ for usage information. Homepage: http://pylibtiff.googlecode.com/ """ __author__ = 'Pearu Peterson' __date__ = 'April 2009' __license__ = 'BSD' __version__ = '0.3-svn' __all__ = ['libtiff', 'TIFF'] import os import sys import numpy ...
41.519666
278
0.621114
f13866ba88e199cf6d962c4ed0b31db9a7287d2f
398
py
Python
_src/Chapter15/code/indices_management.py
paullewallencom/elasticsearch-978-1-7899-5650-4
f6072e71777b1dcbcbf66f19e1c0cba58d9c6884
[ "Apache-2.0" ]
43
2019-11-14T15:22:04.000Z
2022-03-10T06:35:58.000Z
_src/Chapter15/code/indices_management.py
paullewallencom/elasticsearch-978-1-7899-5650-4
f6072e71777b1dcbcbf66f19e1c0cba58d9c6884
[ "Apache-2.0" ]
4
2020-05-16T07:47:06.000Z
2021-12-09T21:28:40.000Z
_src/Chapter15/code/indices_management.py
paullewallencom/elasticsearch-978-1-7899-5650-4
f6072e71777b1dcbcbf66f19e1c0cba58d9c6884
[ "Apache-2.0" ]
32
2020-01-10T06:56:46.000Z
2022-02-10T06:45:39.000Z
import elasticsearch es = elasticsearch.Elasticsearch() index_name = "my_index" if es.indices.exists(index_name): es.indices.delete(index_name) es.indices.create(index_name) es.cluster.health(wait_for_status="yellow") es.indices.close(index_name) es.indices.open(index_name) es.cluster.health(wait_for_status...
16.583333
43
0.791457
27093cd1fe1614e462e5f180133fd101e286f8a7
450
py
Python
zeus/brewery/serializers.py
sdivakarrajesh/Zeus
7a6ddd3d0375f3a2f131f6fa46539faafbd73766
[ "MIT" ]
null
null
null
zeus/brewery/serializers.py
sdivakarrajesh/Zeus
7a6ddd3d0375f3a2f131f6fa46539faafbd73766
[ "MIT" ]
5
2021-03-19T01:10:37.000Z
2021-09-22T18:47:10.000Z
zeus/brewery/serializers.py
sdivakarrajesh/Zeus
7a6ddd3d0375f3a2f131f6fa46539faafbd73766
[ "MIT" ]
null
null
null
from .models import * from rest_framework import serializers from django.conf import settings import os class DrinkSerializer(serializers.ModelSerializer): drink_type = serializers.SerializerMethodField() class Meta: model = Drink fields = ("name", "image", "drink_type") def get_drink_typ...
25
68
0.693333
08924e01b8fcf8cbe7e1c20fade26199a7e2d75e
267
py
Python
thesaurus/__main__.py
Leoberti/thesaurus
07de6d9d29e71a565c84cc49a248d4e3ca8f4426
[ "Unlicense" ]
null
null
null
thesaurus/__main__.py
Leoberti/thesaurus
07de6d9d29e71a565c84cc49a248d4e3ca8f4426
[ "Unlicense" ]
null
null
null
thesaurus/__main__.py
Leoberti/thesaurus
07de6d9d29e71a565c84cc49a248d4e3ca8f4426
[ "Unlicense" ]
null
null
null
import click from flask.cli import FlaskGroup from . import create_app_wsgi @click.group(cls=FlaskGroup, create_app=create_app_wsgi) def main(): """Management script for the thesaurus application.""" if __name__ == "__main__": # pragma: no cover main()
19.071429
58
0.734082
ef74e6764d9ebdf35a72bd62304208aacc79e122
2,218
py
Python
scripts/MSVD/generate_res_feature.py
WingsBrokenAngel/general-professional-learning-model
c4b892033b814b99c36f1f33b36df787f715ff14
[ "MIT" ]
39
2020-01-03T09:46:53.000Z
2022-01-26T14:00:31.000Z
scripts/MSVD/generate_res_feature.py
WingsBrokenAngel/general-professional-learning-model
c4b892033b814b99c36f1f33b36df787f715ff14
[ "MIT" ]
7
2020-02-21T09:21:56.000Z
2020-10-13T05:59:15.000Z
scripts/MSVD/generate_res_feature.py
WingsBrokenAngel/general-professional-learning-model
c4b892033b814b99c36f1f33b36df787f715ff14
[ "MIT" ]
13
2020-01-21T07:54:17.000Z
2021-11-27T10:02:34.000Z
# -*- encoding: utf-8 -*- """这是用来产生MSVD特征的脚本""" import cv2 import numpy as np import tensorflow as tf import tensornets as nets from tensornets.utils import load_img import math import scipy.io as sio import time import random import itertools import os from pprint import pprint import pickle batch_size = 32 seg_size...
29.573333
75
0.674482
9a8660a77b479da3ad672997e5f4777f984705bf
5,801
py
Python
ls_improved/lsi_itemloader.py
conao3/ls-Improved
9917565e8817989159241974942e90731d772379
[ "MIT" ]
null
null
null
ls_improved/lsi_itemloader.py
conao3/ls-Improved
9917565e8817989159241974942e90731d772379
[ "MIT" ]
null
null
null
ls_improved/lsi_itemloader.py
conao3/ls-Improved
9917565e8817989159241974942e90731d772379
[ "MIT" ]
null
null
null
import os from glob import glob import unicodedata from .config import Config class LsiItemLoader(): def __init__(self): """ Item Loader Return ------ children : List[children_d, children_f] children_d : List[items] item : Dict ...
30.531579
145
0.495432
1c81394291b2921d09f79943fc56a17d437b2291
2,849
py
Python
stubs.min/Autodesk/Revit/DB/__init___parts/TableCellCombinedParameterData.py
denfromufa/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2017-07-07T11:15:45.000Z
2017-07-07T11:15:45.000Z
stubs.min/Autodesk/Revit/DB/__init___parts/TableCellCombinedParameterData.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/Autodesk/Revit/DB/__init___parts/TableCellCombinedParameterData.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class TableCellCombinedParameterData(object,IDisposable): """ The TableCellCombinedParameterData stores the data for combined parameters """ @staticmethod def Create(): """ Create() -> TableCellCombinedParameterData construct a TableCellCombinedParameterData """ pass def Dispose(self): ...
33.517647
215
0.725869
6a7c07b0513c322c4652ba9b39b2156434a1d823
2,098
py
Python
instabot/web_elements.py
jakerobinson19/instabot
a5a2d23cc3791d79a2cfeb469144eb92c24e402c
[ "MIT" ]
1
2020-03-03T03:54:56.000Z
2020-03-03T03:54:56.000Z
instabot/web_elements.py
jakerobinson19/instabot
a5a2d23cc3791d79a2cfeb469144eb92c24e402c
[ "MIT" ]
null
null
null
instabot/web_elements.py
jakerobinson19/instabot
a5a2d23cc3791d79a2cfeb469144eb92c24e402c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- xpath = {} xpath['get_count'] = { 'followers':'span', 'following':'span' } xpath['get_pic'] = { 'all_shown': "//div[@class='v1Nh3 kIKUG _bz0w']", 'recent': '//*[@id="react-root"]/section/main/article/div[2]/div/div[1]/div[1]/a', 'top': '//*...
28.739726
94
0.541945
813339bad6c9725a111fc36ce3244245df4b96d7
9,796
py
Python
custom_components/alarmdotcom/config_flow.py
mjmicks/alarmdotcom
150042457fcace0a5cd0c2bf7cc7dd510d58ee29
[ "MIT" ]
1
2022-01-23T15:04:47.000Z
2022-01-23T15:04:47.000Z
custom_components/alarmdotcom/config_flow.py
mjmicks/alarmdotcom
150042457fcace0a5cd0c2bf7cc7dd510d58ee29
[ "MIT" ]
null
null
null
custom_components/alarmdotcom/config_flow.py
mjmicks/alarmdotcom
150042457fcace0a5cd0c2bf7cc7dd510d58ee29
[ "MIT" ]
null
null
null
"""Config flow to configure Alarmdotcom.""" from __future__ import annotations import logging from typing import Any from homeassistant import config_entries from homeassistant.const import CONF_CODE, CONF_PASSWORD, CONF_USERNAME from homeassistant.data_entry_flow import FlowResult import voluptuous as vol from pyal...
34.737589
138
0.595243
d4eec8b3bc4d21596016961a11facbed29e7ec29
41,424
py
Python
hydrus/client/db/ClientDBTagSearch.py
sttollgrin/hydrus
dab05074dacdbd1f9574c4afa6b35bf31f1ee36b
[ "WTFPL" ]
1
2021-05-16T16:06:48.000Z
2021-05-16T16:06:48.000Z
hydrus/client/db/ClientDBTagSearch.py
sttollgrin/hydrus
dab05074dacdbd1f9574c4afa6b35bf31f1ee36b
[ "WTFPL" ]
5
2021-03-31T05:48:17.000Z
2021-04-30T05:51:34.000Z
hydrus/client/db/ClientDBTagSearch.py
sttollgrin/hydrus
dab05074dacdbd1f9574c4afa6b35bf31f1ee36b
[ "WTFPL" ]
2
2021-03-28T23:17:50.000Z
2021-05-16T15:46:52.000Z
import itertools import sqlite3 import typing from hydrus.core import HydrusConstants as HC from hydrus.core import HydrusData from hydrus.core import HydrusDB from hydrus.core import HydrusDBBase from hydrus.core import HydrusGlobals as HG from hydrus.client import ClientConstants as CC from hydrus.client import Cli...
44.686084
227
0.584154
6724e8ff585887f32ee6b583ec5e235afe9fa7bc
8,396
py
Python
plugins/IngestAPI/DairycompDataIngest/dc_event_import.py
OscarTHZhang/docker-airflow
d1e70b3084b1d80cefac6c42111a9a69df42c66a
[ "Apache-2.0" ]
null
null
null
plugins/IngestAPI/DairycompDataIngest/dc_event_import.py
OscarTHZhang/docker-airflow
d1e70b3084b1d80cefac6c42111a9a69df42c66a
[ "Apache-2.0" ]
null
null
null
plugins/IngestAPI/DairycompDataIngest/dc_event_import.py
OscarTHZhang/docker-airflow
d1e70b3084b1d80cefac6c42111a9a69df42c66a
[ "Apache-2.0" ]
null
null
null
import logging from sqlalchemy.sql import text from IngestAPI.DairycompDataIngest import dc_file_fix import ntpath __author__ = "Steven Wangen, Oscar Zhang" __version__ = "1.0.2" __email__ = "srwangen@wisc.edu, tzhang383@wisc.edu" __status__ = "Development" logger = logging.getLogger(__name__) def import_events(fi...
38.87037
147
0.621963
d7391b070e7543ba75601a531d534f0e1e7562c1
2,404
py
Python
tasks/dm_math.py
RobertCsordas/modules
efdb8790b074862581e035c9ab5bf889440a8023
[ "BSD-3-Clause" ]
22
2020-10-19T07:40:01.000Z
2022-03-24T15:26:34.000Z
tasks/dm_math.py
xdever/modules
efdb8790b074862581e035c9ab5bf889440a8023
[ "BSD-3-Clause" ]
6
2020-10-19T23:57:23.000Z
2022-03-12T00:51:58.000Z
tasks/dm_math.py
xdever/modules
efdb8790b074862581e035c9ab5bf889440a8023
[ "BSD-3-Clause" ]
5
2020-11-30T00:17:34.000Z
2021-06-26T11:43:24.000Z
import dataset import torch from .transformer_task import TransformerTask from .task import TaskDataset class DeepmindMathTask(TransformerTask): TRAIN_NUM_WORKERS = 2 def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def create_datasets(self): self.batch_dim = 1 ...
51.148936
118
0.574043
ffeca635f0b2d8e8f11612e4bb4b0ac9c4a262d0
197
py
Python
output/models/ms_data/datatypes/facets/unsigned_int/unsigned_int_min_exclusive003_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/datatypes/facets/unsigned_int/unsigned_int_min_exclusive003_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/datatypes/facets/unsigned_int/unsigned_int_min_exclusive003_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.ms_data.datatypes.facets.unsigned_int.unsigned_int_min_exclusive003_xsd.unsigned_int_min_exclusive003 import ( FooType, Test, ) __all__ = [ "FooType", "Test", ]
19.7
129
0.746193
0eb1db0937ef83d93608896477a6a1c5fecdfc1e
532
py
Python
openpeerpower/components/vacuum/group.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
1
2021-07-08T20:09:55.000Z
2021-07-08T20:09:55.000Z
openpeerpower/components/vacuum/group.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
47
2021-02-21T23:43:07.000Z
2022-03-31T06:07:10.000Z
openpeerpower/components/vacuum/group.py
OpenPeerPower/core
f673dfac9f2d0c48fa30af37b0a99df9dd6640ee
[ "Apache-2.0" ]
null
null
null
"""Describe group states.""" from openpeerpower.components.group import GroupIntegrationRegistry from openpeerpower.const import STATE_OFF, STATE_ON from openpeerpower.core import OpenPeerPower, callback from . import STATE_CLEANING, STATE_ERROR, STATE_RETURNING @callback def async_describe_on_off_states( opp:...
28
75
0.783835
c3937c011e1dac24f1eed970208502c445acd859
909
py
Python
dvcli/user/collection.py
gdcc/dvcli
25aabb31db631208411d3cdfefcabe13201bbe9a
[ "Apache-2.0" ]
2
2020-02-08T12:59:31.000Z
2020-02-10T15:22:29.000Z
dvcli/user/collection.py
GlobalDataverseCommunityConsortium/dvcli
25aabb31db631208411d3cdfefcabe13201bbe9a
[ "Apache-2.0" ]
4
2020-02-08T13:13:01.000Z
2020-07-22T20:17:46.000Z
dvcli/user/collection.py
GlobalDataverseCommunityConsortium/dvcli
25aabb31db631208411d3cdfefcabe13201bbe9a
[ "Apache-2.0" ]
null
null
null
""" (C) Copyright 2020 Forschungszentrum Jülich GmbH and others. 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 agre...
29.322581
82
0.738174
eb3e9bc3f8ecdd090c604f7835ef22c6fc7f51a2
15,288
py
Python
pysnmp/MITEL-IPFILTER-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/MITEL-IPFILTER-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/MITEL-IPFILTER-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 MITEL-IPFILTER-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MITEL-IPFILTER-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:03:00 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, ...
148.427184
2,440
0.774071
efac6895df5f5ea061849d967bc2d2504d107024
26,639
py
Python
integration-test/1686-building-merging.py
roman-ianivskyy/vector-datasource
3d59c0d9856d6bc2a78c4a9273b4e850c2e41d92
[ "MIT" ]
null
null
null
integration-test/1686-building-merging.py
roman-ianivskyy/vector-datasource
3d59c0d9856d6bc2a78c4a9273b4e850c2e41d92
[ "MIT" ]
null
null
null
integration-test/1686-building-merging.py
roman-ianivskyy/vector-datasource
3d59c0d9856d6bc2a78c4a9273b4e850c2e41d92
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- from . import FixtureTest class BuildingMergingTest(FixtureTest): def test_sao_paulo(self): import dsl from shapely.wkt import loads as wkt_loads z, x, y = (15, 12132, 18590) self.generate_fixtures( # https://www.openstreetmap.org/way/520091...
53.707661
78
0.548144
a78297b560a02053438755f40c2d20db6330014b
1,803
py
Python
ulfs/logging.py
asappresearch/neural-ilm
fd7e09960525391f4084a5753429deabd7ff00aa
[ "MIT" ]
null
null
null
ulfs/logging.py
asappresearch/neural-ilm
fd7e09960525391f4084a5753429deabd7ff00aa
[ "MIT" ]
null
null
null
ulfs/logging.py
asappresearch/neural-ilm
fd7e09960525391f4084a5753429deabd7ff00aa
[ "MIT" ]
2
2021-02-25T04:42:14.000Z
2021-02-25T04:43:06.000Z
# import yaml import json from os import path import os from os.path import join import time import datetime class Logger(object): def __init__(self, flush_every_seconds=10): self.flush_every_seconds = flush_every_seconds def add_to_parser(self, parser): parser.add_argument('--logfile', type=...
32.781818
90
0.570715
4198da385be81d5f23bcd4f31b02ad7d3d5c51f7
1,082
py
Python
app/utils.py
blasferna/pyrucsql
e52c880e85c3011143f9817d5246c121e1aa163e
[ "MIT" ]
null
null
null
app/utils.py
blasferna/pyrucsql
e52c880e85c3011143f9817d5246c121e1aa163e
[ "MIT" ]
null
null
null
app/utils.py
blasferna/pyrucsql
e52c880e85c3011143f9817d5246c121e1aa163e
[ "MIT" ]
1
2022-02-19T10:17:53.000Z
2022-02-19T10:17:53.000Z
import base64 import json import typing from datetime import datetime, timedelta from Crypto.Cipher import AES from Crypto.Util import Padding from starlette.responses import Response class PrettyJSONResponse(Response): media_type = "application/json" def render(self, content: typing.Any) -> bytes: ...
28.473684
75
0.670055
fa568f84ff57b6e4e717b5e0f4e9b238cdc46008
1,835
py
Python
lib/core/api2object/alliance.py
mrcrgl/gge-storage
a8471624c1a865d4f7eeb00415bd4cd2a91ea310
[ "MIT" ]
null
null
null
lib/core/api2object/alliance.py
mrcrgl/gge-storage
a8471624c1a865d4f7eeb00415bd4cd2a91ea310
[ "MIT" ]
1
2015-04-09T15:58:19.000Z
2015-04-14T06:37:02.000Z
lib/core/api2object/alliance.py
mrcrgl/gge-storage
a8471624c1a865d4f7eeb00415bd4cd2a91ea310
[ "MIT" ]
null
null
null
__author__ = 'mriegel' from gge_proxy_manager.models import Alliance from lib.cache import cache from lib.core import DATA_IMPORT_LOCK_TIME import logging logger = logging.getLogger(__name__) def import_alliance(oi, kingdom): response = import_alliance_(oi, kingdom) logger.info("Import alliance AID=%r respo...
38.229167
122
0.562943
3a6eb6f27a617933c0e21c09911bd4cbde8c56a8
4,823
py
Python
sdk/python/pulumi_azure_native/media/v20180330preview/get_media_service.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/media/v20180330preview/get_media_service.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/media/v20180330preview/get_media_service.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
33.262069
144
0.639851
58b2dc1642b0017215122130d99314646d099e13
528
py
Python
16/demo16.3.py
BillZong/CorePythonProgrammingDemos
c97b6f2c1533a3eeaf35d2de39902b95e969a411
[ "MIT" ]
null
null
null
16/demo16.3.py
BillZong/CorePythonProgrammingDemos
c97b6f2c1533a3eeaf35d2de39902b95e969a411
[ "MIT" ]
null
null
null
16/demo16.3.py
BillZong/CorePythonProgrammingDemos
c97b6f2c1533a3eeaf35d2de39902b95e969a411
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: UTF-8 """Demo 16.3 for chapter 16.""" # UDP 时间戳服务器 (tsUserv.py) # 创建一个能接收客户的消息,在消息前加一个时间戳后返回的 UDP 服务器。 from socket import * from time import ctime HOST = '' PORT = 21567 BUFSIZE = 1024 ADDR = (HOST, PORT) udpSerSock = socket(AF_INET, SOCK_DGRAM) udpSerSock.bind(ADDR) while True: ...
19.555556
56
0.681818
14446a7a776b052aa273ece7f0f9463e8b6f6ab2
6,548
py
Python
tests/_common.py
Ouranosinc/clisops
d78c127e07503877ae87c40e3548146fb06258ff
[ "BSD-3-Clause" ]
null
null
null
tests/_common.py
Ouranosinc/clisops
d78c127e07503877ae87c40e3548146fb06258ff
[ "BSD-3-Clause" ]
null
null
null
tests/_common.py
Ouranosinc/clisops
d78c127e07503877ae87c40e3548146fb06258ff
[ "BSD-3-Clause" ]
null
null
null
import os import tempfile from pathlib import Path import pytest from jinja2 import Template from clisops.utils import get_file ROOCS_CFG = Path(tempfile.gettempdir(), "roocs.ini").as_posix() TESTS_HOME = Path(__file__).parent.absolute().as_posix() DEFAULT_CMIP5_ARCHIVE_BASE = Path( TESTS_HOME, "mini-esgf-data/t...
35.016043
175
0.747862
8331d0b89e96a09363f63e6c68d3f165ff908c8c
1,096
py
Python
scriptlib/scriptjson.py
Orbtial/scriptlib
9c3d1754da1eb875ecd89a6b6213457b9aa221d6
[ "MIT" ]
null
null
null
scriptlib/scriptjson.py
Orbtial/scriptlib
9c3d1754da1eb875ecd89a6b6213457b9aa221d6
[ "MIT" ]
null
null
null
scriptlib/scriptjson.py
Orbtial/scriptlib
9c3d1754da1eb875ecd89a6b6213457b9aa221d6
[ "MIT" ]
null
null
null
''' ScriptJSON Json Manager for the scriptlib package Developed by Orbtial ''' #Custom Imports from . import scriptfile #Standard Imports import json def loadJson(ptpdir, path, filename): """ Returns a dictionary based on data from the specified .json file :param ptpdir: String generated from initPTPDIR(). :pa...
32.235294
97
0.771898
39d5fb8abacc9acf414d333ae1fd9ba3f1382bab
3,827
py
Python
getTweets.py
feiyue33/Mapping-Amman
1c2cf9d7534f3a89978fd6512928407b5a7fe99d
[ "MIT" ]
null
null
null
getTweets.py
feiyue33/Mapping-Amman
1c2cf9d7534f3a89978fd6512928407b5a7fe99d
[ "MIT" ]
null
null
null
getTweets.py
feiyue33/Mapping-Amman
1c2cf9d7534f3a89978fd6512928407b5a7fe99d
[ "MIT" ]
null
null
null
import urllib.request import json import dml import prov.model import datetime import uuid class getTweets(dml.Algorithm): contributor = 'gaotian_xli33' reads = [] writes = ['emmaliu_gaotian_xli33_yuyangl.tweets'] @staticmethod def execute(trial=False): '''Retrieve some data sets (not usi...
43.488636
152
0.651685
93fa920e562b7de8e742c1cb13c9e473ab7495c5
2,018
py
Python
drfs/tests/test_path.py
datarevenue-berlin/drfs
d44274b0ae6e1b802b7763b5088825a83cc12fa6
[ "MIT" ]
2
2021-07-29T10:38:30.000Z
2021-09-08T11:48:39.000Z
drfs/tests/test_path.py
datarevenue-berlin/drfs
d44274b0ae6e1b802b7763b5088825a83cc12fa6
[ "MIT" ]
2
2020-10-07T07:47:31.000Z
2021-11-15T17:52:33.000Z
drfs/tests/test_path.py
datarevenue-berlin/drfs
d44274b0ae6e1b802b7763b5088825a83cc12fa6
[ "MIT" ]
null
null
null
import pytest from drfs import config from drfs.path import DRPath def test_is_wildcard(): assert not DRPath("/home").is_wildcard assert DRPath("/home/*").is_wildcard assert DRPath("/home/*/yo").is_wildcard assert DRPath("/home/**/yo").is_wildcard assert DRPath("/home/*.csv").is_wildcard ass...
31.53125
85
0.666006
d04798128a64fc8698b465a22c59b90386253d21
768
py
Python
main.py
clean-code-craft-tcq-2/well-named-in-py-kumarSudhirTCQ
20df82c9d9234477fceeef744c6ce8e573e33234
[ "MIT" ]
null
null
null
main.py
clean-code-craft-tcq-2/well-named-in-py-kumarSudhirTCQ
20df82c9d9234477fceeef744c6ce8e573e33234
[ "MIT" ]
null
null
null
main.py
clean-code-craft-tcq-2/well-named-in-py-kumarSudhirTCQ
20df82c9d9234477fceeef744c6ce8e573e33234
[ "MIT" ]
null
null
null
from color_coding import* from color_manual import* def test_number_to_pair(pair_number, expected_major_color, expected_minor_color): major_color, minor_color = get_color_from_pair_number(pair_number) assert(major_color == expected_major_color) assert(minor_color == expected_minor_color) def test_pair_to_numbe...
34.909091
81
0.783854
fe7cadf3f131c76bfc6dc1020df91f4b39068968
472
py
Python
google/exceptions.py
rohitkhatri/google-python-sdk
6e0348bc5a519bf686bf674a3e9677a3cf81d4c5
[ "MIT" ]
2
2019-02-25T02:04:13.000Z
2019-04-05T20:22:30.000Z
google/exceptions.py
rohitkhatri/google-python-sdk
6e0348bc5a519bf686bf674a3e9677a3cf81d4c5
[ "MIT" ]
null
null
null
google/exceptions.py
rohitkhatri/google-python-sdk
6e0348bc5a519bf686bf674a3e9677a3cf81d4c5
[ "MIT" ]
null
null
null
class GoogleException(Exception): def __init__(self, code, message, response): self.status_code = code self.error_type = message self.message = message self.response = response self.get_error_type() def get_error_type(self): json_response = self.response.json() ...
33.714286
75
0.646186
a264a841682b8a4db6c2324d739e1b97fc112142
3,746
py
Python
solstice/tagger/editors/shaderseditor.py
tpoveda/solstice
ccccc376cebd6701d038fdd6ebaabc33ebdf259f
[ "MIT" ]
null
null
null
solstice/tagger/editors/shaderseditor.py
tpoveda/solstice
ccccc376cebd6701d038fdd6ebaabc33ebdf259f
[ "MIT" ]
null
null
null
solstice/tagger/editors/shaderseditor.py
tpoveda/solstice
ccccc376cebd6701d038fdd6ebaabc33ebdf259f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Module that contains implementation for shaders editor """ from __future__ import print_function, division, absolute_import __author__ = "Tomas Poveda" __license__ = "MIT" __maintainer__ = "Tomas Poveda" __email__ = "tpovedatd@gmail.com" from functools import partia...
33.446429
107
0.647624
b9a622558061edefae590bc0f10f599097c720a3
574
py
Python
swingers/conf/project_template/project_name/urls.py
jawaidm/pbs
87f5c535c976d6a5eccbfbbf2073589b6e366d04
[ "Apache-2.0" ]
null
null
null
swingers/conf/project_template/project_name/urls.py
jawaidm/pbs
87f5c535c976d6a5eccbfbbf2073589b6e366d04
[ "Apache-2.0" ]
12
2019-10-22T23:16:38.000Z
2022-03-11T23:17:45.000Z
swingers/conf/project_template/project_name/urls.py
jawaidm/pbs
87f5c535c976d6a5eccbfbbf2073589b6e366d04
[ "Apache-2.0" ]
5
2019-12-19T06:18:42.000Z
2022-01-07T01:16:18.000Z
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'dec_template.views.home', name='home'), # url(r'^dec_template/', include('dec_template.foo....
31.888889
71
0.686411
5c9156f6108cb32aa76810a1431e34f5fbb1e4eb
11,855
py
Python
TP_01/ejercicio_2/ejercicio_2.py
AgustinNormand/recuperacion-de-informacion
511ff6a83a929621792ee684aa5a55bcad512c9d
[ "MIT" ]
null
null
null
TP_01/ejercicio_2/ejercicio_2.py
AgustinNormand/recuperacion-de-informacion
511ff6a83a929621792ee684aa5a55bcad512c9d
[ "MIT" ]
null
null
null
TP_01/ejercicio_2/ejercicio_2.py
AgustinNormand/recuperacion-de-informacion
511ff6a83a929621792ee684aa5a55bcad512c9d
[ "MIT" ]
null
null
null
import sys import pathlib import re import matplotlib.pyplot as plt class Collection: def __init__(self, dirpath): self.dirpath = dirpath self.corpus_path = pathlib.Path(dirpath) self.documents = [] self.process_documents() def process_documents(self): for file_path in self.corpus_path.iterdir(): self...
34.066092
147
0.691016
d49c2099bae1165e755512fd2ea8f950a153e09f
8,321
py
Python
salt/modules/splunk.py
casselt/salt
d8a2ef4e0cd544656489d23d161928879b1fc1c0
[ "Apache-2.0" ]
12
2015-01-21T00:18:25.000Z
2021-07-11T07:35:26.000Z
salt/modules/splunk.py
casselt/salt
d8a2ef4e0cd544656489d23d161928879b1fc1c0
[ "Apache-2.0" ]
86
2017-01-27T11:54:46.000Z
2020-05-20T06:25:26.000Z
salt/modules/splunk.py
casselt/salt
d8a2ef4e0cd544656489d23d161928879b1fc1c0
[ "Apache-2.0" ]
12
2015-01-05T09:50:42.000Z
2019-08-19T01:43:40.000Z
# -*- coding: utf-8 -*- ''' Module for interop with the Splunk API .. versionadded:: 2016.3.0. :depends: - splunk-sdk python module :configuration: Configure this module by specifying the name of a configuration profile in the minion config, minion pillar, or master config. The module will use the 'splunk'...
25.446483
108
0.60786
de01366d32b9936f9c798b4b557febdabffd0293
1,300
py
Python
cirq/google/engine/env_config_test.py
matpompili/Cirq
b9ce387a7fc1f571b3d6e903c46543c3578677cb
[ "Apache-2.0" ]
1
2021-02-16T13:14:16.000Z
2021-02-16T13:14:16.000Z
cirq/google/engine/env_config_test.py
matpompili/Cirq
b9ce387a7fc1f571b3d6e903c46543c3578677cb
[ "Apache-2.0" ]
null
null
null
cirq/google/engine/env_config_test.py
matpompili/Cirq
b9ce387a7fc1f571b3d6e903c46543c3578677cb
[ "Apache-2.0" ]
1
2020-03-12T07:06:14.000Z
2020-03-12T07:06:14.000Z
# Copyright 2018 The Cirq Developers # # 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 ...
35.135135
75
0.709231
2140d289dc09681671315a500262f9ed2ddc6e47
1,668
py
Python
gisutils/tests/test_validate.py
phobson/gisutils
260a1f32bcd057239b3bc4fefb878487a362cb6c
[ "BSD-3-Clause" ]
null
null
null
gisutils/tests/test_validate.py
phobson/gisutils
260a1f32bcd057239b3bc4fefb878487a362cb6c
[ "BSD-3-Clause" ]
null
null
null
gisutils/tests/test_validate.py
phobson/gisutils
260a1f32bcd057239b3bc4fefb878487a362cb6c
[ "BSD-3-Clause" ]
null
null
null
import numpy from matplotlib import pyplot import pytest import numpy.testing as nptest from gisutils import validate from .helpers import raises @pytest.mark.parametrize(('value', 'expected'), [ (1, numpy.array([1])), (1., numpy.array([1.])), (None, numpy.array([None])), ('test', numpy.array(['test...
26.903226
75
0.649281
6bffbcc3e542e2ad96f183e4f2e5472fda60e846
845
py
Python
coex/utils_coex.py
ibaiGorordo/ONNX-CoEx-Stereo-Depth-estimation
ac6890a9369bea47e49dda0c7f016a438859f346
[ "MIT" ]
5
2021-09-08T07:24:34.000Z
2022-01-10T05:34:57.000Z
coex/utils_coex.py
ibaiGorordo/ONNX-CoEx-Stereo-Depth-estimation
ac6890a9369bea47e49dda0c7f016a438859f346
[ "MIT" ]
null
null
null
coex/utils_coex.py
ibaiGorordo/ONNX-CoEx-Stereo-Depth-estimation
ac6890a9369bea47e49dda0c7f016a438859f346
[ "MIT" ]
1
2021-09-09T00:13:22.000Z
2021-09-09T00:13:22.000Z
import numpy as np import cv2 import urllib from dataclasses import dataclass @dataclass class CameraConfig: baseline: float f: float def load_img(url): req = urllib.request.urlopen(url) arr = np.asarray(bytearray(req.read()), dtype=np.uint8) return cv2.imdecode(arr, -1) # 'Load it as it is' def draw_disp...
25.606061
115
0.768047
4f7c13dc49790317f3f92b75f56e127a8ac7c39d
9,260
py
Python
LatLongUTMconversion.py
blockchainhelppro/Segwit-Development-
e4dfe990a69a2a1fcdd902b82121c2ecb1aa332d
[ "MIT" ]
null
null
null
LatLongUTMconversion.py
blockchainhelppro/Segwit-Development-
e4dfe990a69a2a1fcdd902b82121c2ecb1aa332d
[ "MIT" ]
null
null
null
LatLongUTMconversion.py
blockchainhelppro/Segwit-Development-
e4dfe990a69a2a1fcdd902b82121c2ecb1aa332d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # this file is from http://pygps.org/ # Lat Long - UTM, UTM - Lat Long conversions from math import pi, sin, cos, tan, sqrt # LatLong- UTM conversion..h # definitions for lat/long to UTM and UTM to lat/lng conversions # include <string.h> _deg2rad = pi / 180.0 _rad2deg = 180.0 / pi _Equatoria...
37.489879
120
0.574622
e4c04f2661d913d886fe31bc70cae1f861fb0e34
794
py
Python
apps/backend/healthz/tasks.py
ZhuoZhuoCrayon/bk-nodeman
76cb71fcc971c2a0c2be161fcbd6b019d4a7a8ab
[ "MIT" ]
31
2021-07-28T13:06:11.000Z
2022-03-10T12:16:44.000Z
apps/backend/healthz/tasks.py
ZhuoZhuoCrayon/bk-nodeman
76cb71fcc971c2a0c2be161fcbd6b019d4a7a8ab
[ "MIT" ]
483
2021-07-29T03:17:44.000Z
2022-03-31T13:03:04.000Z
apps/backend/healthz/tasks.py
ZhuoZhuoCrayon/bk-nodeman
76cb71fcc971c2a0c2be161fcbd6b019d4a7a8ab
[ "MIT" ]
29
2021-07-28T13:06:21.000Z
2022-03-25T06:18:18.000Z
# coding: utf-8 """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-节点管理(BlueKing-BK-NODEMAN) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the...
44.111111
115
0.787154
a8dff34d18ab5e9f66696012156fb71ebb9dddb3
1,870
py
Python
packages/mbed-greentea/setup.py
vmedcy/mbed-os-tools
5d63e5a2914f79511e98d41adc5ffd6e3c935173
[ "Apache-2.0" ]
null
null
null
packages/mbed-greentea/setup.py
vmedcy/mbed-os-tools
5d63e5a2914f79511e98d41adc5ffd6e3c935173
[ "Apache-2.0" ]
null
null
null
packages/mbed-greentea/setup.py
vmedcy/mbed-os-tools
5d63e5a2914f79511e98d41adc5ffd6e3c935173
[ "Apache-2.0" ]
null
null
null
""" This module defines the attributes of the PyPI package for the mbed SDK test suite """ """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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...
30.655738
159
0.714439
f06f8d1ebb98b0c0e9d0d21bda3dafe24ead857a
16,872
py
Python
dionaeaSqliteToJson.py
eval2A/dionaeaToJSON
b900163b29c23aecd253091f332f06a6332655a6
[ "MIT" ]
1
2021-12-25T17:13:39.000Z
2021-12-25T17:13:39.000Z
dionaeaSqliteToJson.py
eval2A/dionaeaToJSON
b900163b29c23aecd253091f332f06a6332655a6
[ "MIT" ]
null
null
null
dionaeaSqliteToJson.py
eval2A/dionaeaToJSON
b900163b29c23aecd253091f332f06a6332655a6
[ "MIT" ]
5
2018-12-06T15:21:46.000Z
2021-03-25T01:36:05.000Z
#!/usr/bin/python3 # Version: 1.2 # Source: https://github.com/eval2A/dionaeaToJSON # Scripted for Dionaea 0.6.0, but should also work for Dionaea 0.8.0 # Description: # Converts the SQLite database produced by Dionaea to a JSON format suitable for the ELK stack. # The JSON log files includes details about connection...
38.965358
187
0.534732
bbf821e10ca8a4474985ec24322442aa758cb969
11,327
py
Python
taskapp/views.py
Fa67/djing
6e84640d7294be9f2f17f73e796713e93e43bb68
[ "Unlicense" ]
1
2020-12-05T01:55:56.000Z
2020-12-05T01:55:56.000Z
taskapp/views.py
Fa67/djing
6e84640d7294be9f2f17f73e796713e93e43bb68
[ "Unlicense" ]
null
null
null
taskapp/views.py
Fa67/djing
6e84640d7294be9f2f17f73e796713e93e43bb68
[ "Unlicense" ]
2
2020-03-07T12:00:17.000Z
2020-12-05T01:56:01.000Z
from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.db.models import Count from django.shortcuts import redirect, get_object_or_404, resolve_url from django.contrib import messages from django.utils.decorators import method_decorator from django.view...
35.396875
118
0.675113
50244908106988bd41f1fca40f8c1d89a9a55908
432
py
Python
functions/distance-fare.py
Aditya0804-dot/python-class-11
cfb118d01cc1872153ceffa562fcd042b87235e3
[ "MIT" ]
null
null
null
functions/distance-fare.py
Aditya0804-dot/python-class-11
cfb118d01cc1872153ceffa562fcd042b87235e3
[ "MIT" ]
null
null
null
functions/distance-fare.py
Aditya0804-dot/python-class-11
cfb118d01cc1872153ceffa562fcd042b87235e3
[ "MIT" ]
null
null
null
def AssignFare(c,a,d): if d<500: t_fare=(a*200)+(c*(200/2)) elif (d<1000) and (d>=500): t_fare=(a*300)+(c*(300/2)) else: t_fare=(a*500)+(c*(500/2)) return t_fare child=int(input("enter the number of children: ")) adult=int(input("enter the number of adults: ")) distan...
28.8
55
0.611111
04ab027db40cb6ff050d1ed98b062acbe8907b98
9,310
py
Python
rootfs/usr/lib/python3/dist-packages/serial/loopback_connection.py
kappaIO-Dev/kappaIO-sdk-armhf-crosscompile
66fc5fc21e6235f7a3be72a7ccac68e2224b7fb2
[ "MIT" ]
null
null
null
rootfs/usr/lib/python3/dist-packages/serial/loopback_connection.py
kappaIO-Dev/kappaIO-sdk-armhf-crosscompile
66fc5fc21e6235f7a3be72a7ccac68e2224b7fb2
[ "MIT" ]
1
2018-04-15T22:59:15.000Z
2018-04-15T22:59:15.000Z
rootfs/usr/lib/python3/dist-packages/serial/loopback_connection.py
kappaIO-Dev/kappaIO-sdk-armhf-crosscompile
66fc5fc21e6235f7a3be72a7ccac68e2224b7fb2
[ "MIT" ]
null
null
null
#! python # # Python Serial Port Extension for Win32, Linux, BSD, Jython # see __init__.py # # This module implements a loop back connection receiving itself what it sent. # # The purpose of this module is.. well... You can run the unit tests with it. # and it was so easy to implement ;-) # # (C) 2001-2009 Chris Liecht...
35.670498
106
0.5971
0ed89f71bdb3aee1b0f569051800853bdf89b8ba
6,977
py
Python
reports/old_scripts/191015_APAM_dPCA_eg.py
Mateo-Lopez-Espejo/context_probe_analysis
55461057fd01f00124aa46682b335313af9cc0f8
[ "RSA-MD" ]
null
null
null
reports/old_scripts/191015_APAM_dPCA_eg.py
Mateo-Lopez-Espejo/context_probe_analysis
55461057fd01f00124aa46682b335313af9cc0f8
[ "RSA-MD" ]
null
null
null
reports/old_scripts/191015_APAM_dPCA_eg.py
Mateo-Lopez-Espejo/context_probe_analysis
55461057fd01f00124aa46682b335313af9cc0f8
[ "RSA-MD" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np import src.visualization.fancy_plots from src.data.load import load from src.metrics.reliability import signal_reliability from src.data import dPCA as cdPCA from src.visualization import fancy_plots as cplt """ plots an example dPCA analysis with varianc...
42.542683
124
0.55339
6b9a0636a7474ac0101b23cae37daa1dccb3c3da
1,105
py
Python
neuralnet/fine-tuning_transfer-learning/src/mylib/validation_utils.py
hsmtknj/ml
ad8e050cd754e5a1c73ed5df3bc223a1f6dc4148
[ "MIT" ]
null
null
null
neuralnet/fine-tuning_transfer-learning/src/mylib/validation_utils.py
hsmtknj/ml
ad8e050cd754e5a1c73ed5df3bc223a1f6dc4148
[ "MIT" ]
null
null
null
neuralnet/fine-tuning_transfer-learning/src/mylib/validation_utils.py
hsmtknj/ml
ad8e050cd754e5a1c73ed5df3bc223a1f6dc4148
[ "MIT" ]
null
null
null
""" Validate functions of utils.py """ # register src directory path to PYTHONPATH import sys from os import path, pardir current_dir = path.abspath(path.dirname(__file__)) parent_dir = path.abspath(path.join(current_dir, pardir)) parent_parent_dir = path.abspath(path.join(parent_dir, pardir)) sys.path.append(parent_d...
29.864865
78
0.652489
6e5c90a9ad0ef07d5efd9c39f2eabb2ea135a891
910
py
Python
mmdet/models/detectors/__init__.py
Hanawh/CondInst_mmdetection
16c718f7d17de96d7def85102394beee67cda4b4
[ "Apache-2.0" ]
16
2020-08-04T04:44:16.000Z
2022-03-31T11:51:37.000Z
mmdet/models/detectors/__init__.py
Hanawh/CondInst_mmdetection
16c718f7d17de96d7def85102394beee67cda4b4
[ "Apache-2.0" ]
null
null
null
mmdet/models/detectors/__init__.py
Hanawh/CondInst_mmdetection
16c718f7d17de96d7def85102394beee67cda4b4
[ "Apache-2.0" ]
null
null
null
from .atss import ATSS from .base import BaseDetector from .cascade_rcnn import CascadeRCNN from .double_head_rcnn import DoubleHeadRCNN from .fast_rcnn import FastRCNN from .faster_rcnn import FasterRCNN from .fcos import FCOS from .fovea import FOVEA from .grid_rcnn import GridRCNN from .htc import HybridTaskCascade ...
35
77
0.796703
3b3f07bc9b879e0ba12c2a15856300a36dc714b8
5,592
py
Python
agent.py
glennmatlin/cwcf
7ecfce1e017584ad717a59c39e1ede0b04a40def
[ "MIT" ]
null
null
null
agent.py
glennmatlin/cwcf
7ecfce1e017584ad717a59c39e1ede0b04a40def
[ "MIT" ]
null
null
null
agent.py
glennmatlin/cwcf
7ecfce1e017584ad717a59c39e1ede0b04a40def
[ "MIT" ]
null
null
null
import numpy as np import scipy.special from config import config all_agents = np.arange(config.AGENTS) class Agent: def __init__(self, env, pool, brain): self.env = env self.pool = pool self.brain = brain self.epsilon = config.EPSILON_START self.idx = np.zeros(config.A...
32.701754
103
0.528612
b0deed4e9a8d05e2f062faa6b7748cde73153722
5,755
py
Python
pypyr/steps/tar.py
FooBarQuaxx/pypyr
ebe56b2200a53e2f38c78bbb42d466bb1556c37c
[ "Apache-2.0" ]
null
null
null
pypyr/steps/tar.py
FooBarQuaxx/pypyr
ebe56b2200a53e2f38c78bbb42d466bb1556c37c
[ "Apache-2.0" ]
null
null
null
pypyr/steps/tar.py
FooBarQuaxx/pypyr
ebe56b2200a53e2f38c78bbb42d466bb1556c37c
[ "Apache-2.0" ]
null
null
null
"""Archive and extract tars.""" import logging import tarfile from pypyr.errors import KeyNotInContextError # logger means the log level will be set correctly logger = logging.getLogger(__name__) def run_step(context): """Archive and/or extract tars with or without compression. Args: context: dictio...
32.331461
79
0.608341
755691b57647e1365065175864a44dc0f61c0a2a
1,341
py
Python
test/same-target-name-different-directory/gyptest-all.py
chlorm-forks/gyp
a8921fcaab1a18c8cf7e4ab09ceb940e336918ec
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
test/same-target-name-different-directory/gyptest-all.py
chlorm-forks/gyp
a8921fcaab1a18c8cf7e4ab09ceb940e336918ec
[ "BSD-3-Clause" ]
1,432
2017-06-21T04:08:48.000Z
2020-08-25T16:21:15.000Z
test/same-target-name-different-directory/gyptest-all.py
chlorm-forks/gyp
a8921fcaab1a18c8cf7e4ab09ceb940e336918ec
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Test cases when multiple targets in different directories have the same name. """ import TestGyp test = TestGyp.TestGyp(formats=['ninj...
31.928571
77
0.750186
7c6d469537588d8899553ccac2a749bce92d5219
4,942
py
Python
doc/source/enforcer.py
spielkind/python-otcextensions
47ba917df2d85db6cb347f2038fd7f79a8a806b7
[ "Apache-2.0" ]
null
null
null
doc/source/enforcer.py
spielkind/python-otcextensions
47ba917df2d85db6cb347f2038fd7f79a8a806b7
[ "Apache-2.0" ]
null
null
null
doc/source/enforcer.py
spielkind/python-otcextensions
47ba917df2d85db6cb347f2038fd7f79a8a806b7
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
35.811594
78
0.669365
a7d91d0432248cbf541553a4cc466e0a78449c25
8,708
py
Python
test/functional/p2p_invalid_messages.py
KaSt/emircoin
5d05003dfde81eb6cacc8505f55b2e6b816e698a
[ "MIT" ]
null
null
null
test/functional/p2p_invalid_messages.py
KaSt/emircoin
5d05003dfde81eb6cacc8505f55b2e6b816e698a
[ "MIT" ]
null
null
null
test/functional/p2p_invalid_messages.py
KaSt/emircoin
5d05003dfde81eb6cacc8505f55b2e6b816e698a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test node responses to invalid network messages.""" import asyncio import os import struct from test_f...
38.702222
133
0.62345
a27414a98d0b52f624db10d35525a10442601628
849
py
Python
imagepy/menus/Process/repair_plg.py
Pad0y/imagepy
23f41b64ade02f94b566b0d23a4b6459c1a1578d
[ "BSD-4-Clause" ]
null
null
null
imagepy/menus/Process/repair_plg.py
Pad0y/imagepy
23f41b64ade02f94b566b0d23a4b6459c1a1578d
[ "BSD-4-Clause" ]
null
null
null
imagepy/menus/Process/repair_plg.py
Pad0y/imagepy
23f41b64ade02f94b566b0d23a4b6459c1a1578d
[ "BSD-4-Clause" ]
null
null
null
from sciapp.action import Filter import numpy as np import scipy.ndimage as ndimg from imagepy.ipyalg import distance_transform_edt class Plugin(Filter): title = "Fragment Repair" note = ["all", "req_roi", "auto_msk", "auto_snap", "preview"] para = {"mode": "nearest"} view = [(list, "mode", ["nearest"...
33.96
74
0.570082
205434d7361cf11e0d43c2c733e89c65b92b8bce
493
py
Python
curseword.py
janakhpon/LearnPyDacity
b096f9a50496a0c01353bf953209e766de312187
[ "MIT" ]
null
null
null
curseword.py
janakhpon/LearnPyDacity
b096f9a50496a0c01353bf953209e766de312187
[ "MIT" ]
null
null
null
curseword.py
janakhpon/LearnPyDacity
b096f9a50496a0c01353bf953209e766de312187
[ "MIT" ]
null
null
null
import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) http = urllib3.PoolManager() def read_text(): quotes = open("./Folder/curse.txt") contents = quotes.read() print(contents) quotes.close() check_profanity(contents) def check_profanity(txt_data): connection = htt...
25.947368
107
0.730223
7b14ba7ecbefa8a6f25b475a2dec2367309e43a6
31,441
py
Python
generate.py
rjlohan/cfn-tf-custom-types
7bd19adc2459814b5eaa181b2645fafc57c1fc95
[ "MIT" ]
null
null
null
generate.py
rjlohan/cfn-tf-custom-types
7bd19adc2459814b5eaa181b2645fafc57c1fc95
[ "MIT" ]
null
null
null
generate.py
rjlohan/cfn-tf-custom-types
7bd19adc2459814b5eaa181b2645fafc57c1fc95
[ "MIT" ]
null
null
null
import requests import subprocess import os import pprint import json import re import tempfile import time import sys, traceback import multiprocessing from pathlib import Path PROVIDERS_MAP = { 'random': ['Random','Random'], 'digitalocean': ['DigitalOcean','DigitalOcean'], 'oci': ['OCI','Oracle Cloud In...
44.408192
288
0.506504
eda983b601ef06407ed87f117e7446a27fba9b63
4,795
py
Python
lib/googlecloudsdk/core/survey/survey_check.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/core/survey/survey_check.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
11
2020-02-29T02:51:12.000Z
2022-03-30T23:20:08.000Z
lib/googlecloudsdk/core/survey/survey_check.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
1
2020-07-24T18:47:35.000Z
2020-07-24T18:47:35.000Z
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC. 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 requir...
31.546053
80
0.717205
e0469bc76358acfccd5b6aa237235c395e7369d4
1,804
py
Python
emily/emily_modules/yes_no_parser.py
ngmcfarland/emily
381847feb8b3746bd80100dfe4ad396d8946630b
[ "Apache-2.0" ]
3
2017-03-25T01:08:37.000Z
2018-06-28T18:06:07.000Z
emily/emily_modules/yes_no_parser.py
ngmcfarland/emily
381847feb8b3746bd80100dfe4ad396d8946630b
[ "Apache-2.0" ]
null
null
null
emily/emily_modules/yes_no_parser.py
ngmcfarland/emily
381847feb8b3746bd80100dfe4ad396d8946630b
[ "Apache-2.0" ]
null
null
null
from fuzzywuzzy import fuzz from . import utils import string import json import sys import re import os curdir = os.path.dirname(os.path.realpath(__file__)) with open(os.path.join(curdir, 'data/yesno.json')) as json_yesno_data: yesno_data = json.load(json_yesno_data) with open(os.path.join(curdir, 'data/verb.jso...
39.217391
102
0.566519
d2d3d2061ace346c129d7e77c840d691c21c4ed4
2,655
py
Python
pasee/storage_interface.py
FGuillet/pasee
c4918444ae20971deb3a0581f88ef5366284ad91
[ "MIT" ]
1
2019-07-22T12:15:26.000Z
2019-07-22T12:15:26.000Z
pasee/storage_interface.py
FGuillet/pasee
c4918444ae20971deb3a0581f88ef5366284ad91
[ "MIT" ]
4
2019-11-26T14:22:25.000Z
2021-07-05T13:49:14.000Z
pasee/storage_interface.py
FGuillet/pasee
c4918444ae20971deb3a0581f88ef5366284ad91
[ "MIT" ]
1
2021-04-12T13:35:42.000Z
2021-04-12T13:35:42.000Z
"""Abstract class representing Storage backend """ from abc import abstractmethod from typing import AsyncContextManager, List, Any class StorageBackend(AsyncContextManager): # pylint: disable=inherit-non-class # (see https://github.com/PyCQA/pylint/issues/2472) """Abstract class for representing an Storag...
29.5
87
0.645198
06d405fac459e547b41dcc3de802f054a1742eba
7,940
py
Python
autofaiss/external/build.py
Evaia/autofaiss
ad164b7be30ddf9ce45ab616d31cb4365fe7f5ab
[ "Apache-2.0" ]
null
null
null
autofaiss/external/build.py
Evaia/autofaiss
ad164b7be30ddf9ce45ab616d31cb4365fe7f5ab
[ "Apache-2.0" ]
null
null
null
autofaiss/external/build.py
Evaia/autofaiss
ad164b7be30ddf9ce45ab616d31cb4365fe7f5ab
[ "Apache-2.0" ]
null
null
null
""" gather functions necessary to build an index """ import re from typing import Optional, Tuple, Union import faiss from autofaiss.external.metadata import IndexMetadata from autofaiss.datasets.readers.local_iterators import read_embeddings_local, read_shapes_local from autofaiss.datasets.readers.remote_iterators i...
35.605381
119
0.704282
266ed3d1e405b5c6721c25b7d331d531b3d4504a
1,756
py
Python
fuzzinator/ui/cli/cli_listener.py
elecro/fuzzinator
2ed30127c364d50af960ad9f5cecbbae5cde2381
[ "BSD-3-Clause" ]
null
null
null
fuzzinator/ui/cli/cli_listener.py
elecro/fuzzinator
2ed30127c364d50af960ad9f5cecbbae5cde2381
[ "BSD-3-Clause" ]
null
null
null
fuzzinator/ui/cli/cli_listener.py
elecro/fuzzinator
2ed30127c364d50af960ad9f5cecbbae5cde2381
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2016-2018 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. import logging from ...listener import EventListener logger = lo...
35.12
120
0.674829
b07aa09ca9ae20f01a6257b7d73108e5e9675625
9,704
py
Python
docs/conf.py
mvanlonden/graphql-core-next
4b5d4823ff629421c09a5a303e970d973cee6f5c
[ "MIT" ]
null
null
null
docs/conf.py
mvanlonden/graphql-core-next
4b5d4823ff629421c09a5a303e970d973cee6f5c
[ "MIT" ]
null
null
null
docs/conf.py
mvanlonden/graphql-core-next
4b5d4823ff629421c09a5a303e970d973cee6f5c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # GraphQL-core 3 documentation build configuration file, created by # sphinx-quickstart on Thu Jun 21 16:28:30 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
29.053892
80
0.703112
1af59b3f611f6b5018e087886a57d7e9ba0f0c28
1,165
py
Python
test/test_authenticate_api.py
go-vela/sdk-python
ca4425995bee43cb517e78fcd6702fec6f758222
[ "Apache-2.0" ]
1
2020-11-18T13:31:05.000Z
2020-11-18T13:31:05.000Z
test/test_authenticate_api.py
go-vela/sdk-python
ca4425995bee43cb517e78fcd6702fec6f758222
[ "Apache-2.0" ]
57
2020-04-30T19:02:47.000Z
2022-03-28T07:39:58.000Z
test/test_authenticate_api.py
go-vela/sdk-python
304b2c8645dc6332fd69398c8c849a3961619c29
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright (c) 2021 Target Brands, Inc. All rights reserved. """ Vela server API for the Vela server # noqa: E501 OpenAPI spec version: 0.6.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import ...
17.651515
68
0.619742
7adece2ecf5e7cf45303e03594c677cb3ab800df
681
py
Python
tests/cmip6_zarr/test_retry.py
jonseddon/cmip6-object-store
cc045d482b2ae1aadef2108267590a0bdf7713d7
[ "BSD-3-Clause" ]
3
2020-11-13T16:59:39.000Z
2021-03-16T20:39:47.000Z
tests/cmip6_zarr/test_retry.py
jonseddon/cmip6-object-store
cc045d482b2ae1aadef2108267590a0bdf7713d7
[ "BSD-3-Clause" ]
71
2020-09-11T10:46:43.000Z
2022-02-11T20:57:13.000Z
tests/cmip6_zarr/test_retry.py
jonseddon/cmip6-object-store
cc045d482b2ae1aadef2108267590a0bdf7713d7
[ "BSD-3-Clause" ]
3
2021-02-17T17:10:57.000Z
2021-05-26T10:40:47.000Z
import datetime from retry import retry ZERO_OR_ONE = 1 COUNTER = 0 def now(): return datetime.datetime.now() def get_next(): global ZERO_OR_ONE if ZERO_OR_ONE == 0: ZERO_OR_ONE = 1 else: ZERO_OR_ONE = 0 return ZERO_OR_ONE @retry(delay=1) def test_retry_until_seconds_is_div_...
16.609756
60
0.66373
9ef8b055dff237d044e4e602b23f6b1ff6fce982
210
py
Python
2017/day-17/part2.py
amochtar/adventofcode
292e7f00a1e19d2149d00246b0a77fedfcd3bd08
[ "MIT" ]
1
2019-12-27T22:36:30.000Z
2019-12-27T22:36:30.000Z
2017/day-17/part2.py
amochtar/adventofcode
292e7f00a1e19d2149d00246b0a77fedfcd3bd08
[ "MIT" ]
null
null
null
2017/day-17/part2.py
amochtar/adventofcode
292e7f00a1e19d2149d00246b0a77fedfcd3bd08
[ "MIT" ]
null
null
null
def solve(inp): pos = 0 val_after_0 = 0 for i in range(1, 50000001): pos = (pos+inp) % i + 1 if pos == 1: val_after_0 = i print("Part 2:", val_after_0) solve(386)
16.153846
33
0.5
efdcae0f7a94f4fe2e118ca9a0be7a7102c17bc2
15,317
py
Python
plaso/engine/knowledge_base.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
1
2020-12-04T10:26:34.000Z
2020-12-04T10:26:34.000Z
plaso/engine/knowledge_base.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
null
null
null
plaso/engine/knowledge_base.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """The artifact knowledge base object. The knowledge base is filled by user provided input and the pre-processing phase. It is intended to provide successive phases, like the parsing and analysis phases, with essential information like the timezone and codepage of the source data. """ from __f...
31.778008
79
0.713913
53b5a0fcf250efcac42449e630e22f079e1f8e6c
10,979
py
Python
rlberry/agents/kernel_based/rs_ucbvi.py
akrouriad/rlberry
dde4e2cbafca05fdef1df07646bb6368059eeadf
[ "MIT" ]
null
null
null
rlberry/agents/kernel_based/rs_ucbvi.py
akrouriad/rlberry
dde4e2cbafca05fdef1df07646bb6368059eeadf
[ "MIT" ]
null
null
null
rlberry/agents/kernel_based/rs_ucbvi.py
akrouriad/rlberry
dde4e2cbafca05fdef1df07646bb6368059eeadf
[ "MIT" ]
null
null
null
import logging from rlberry.agents.agent import AgentWithSimplePolicy import numpy as np import gym.spaces as spaces from rlberry.agents.dynprog.utils import backward_induction from rlberry.agents.dynprog.utils import backward_induction_in_place from rlberry.agents.kernel_based.common import map_to_representative log...
34.309375
87
0.595318
0e82cc244879797c52bb0b164ce89073cbf90895
4,463
py
Python
tests/test_app.py
kushal-kumaran/xlwings
36ea1ba91ecb1c37d36d87dfa7ed987c06bca142
[ "BSD-3-Clause" ]
null
null
null
tests/test_app.py
kushal-kumaran/xlwings
36ea1ba91ecb1c37d36d87dfa7ed987c06bca142
[ "BSD-3-Clause" ]
null
null
null
tests/test_app.py
kushal-kumaran/xlwings
36ea1ba91ecb1c37d36d87dfa7ed987c06bca142
[ "BSD-3-Clause" ]
null
null
null
import os import sys import time import unittest import xlwings as xw from xlwings.tests.common import TestBase, this_dir, SPEC class TestApps(TestBase): def test_active(self): self.assertTrue(xw.apps.active in [self.app1, self.app2]) def test_len(self): n_original = len(xw.apps) app...
29.95302
111
0.615953
653650045623ca0b568bc213b10750d42c887ec3
141,177
py
Python
QUANTAXIS/QAUtil/QADate_trade.py
lkaiser/QUANTAXIS
8703d241f8f11fbab89a75b79495b2f9ff036812
[ "MIT" ]
null
null
null
QUANTAXIS/QAUtil/QADate_trade.py
lkaiser/QUANTAXIS
8703d241f8f11fbab89a75b79495b2f9ff036812
[ "MIT" ]
1
2019-01-23T04:46:52.000Z
2019-01-23T04:46:52.000Z
QUANTAXIS/QAUtil/QADate_trade.py
lkaiser/QUANTAXIS
8703d241f8f11fbab89a75b79495b2f9ff036812
[ "MIT" ]
null
null
null
# coding:utf-8 # # The MIT License (MIT) # # Copyright (c) 2016-2018 yutiansut/QUANTAXIS # # 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 th...
18.466579
80
0.451922
f0156f170be155e4079edf22910bfa3a0bcb131c
13,758
py
Python
output_report.py
Lumpkins/output_report
f4b190c468765dcc058af13966b43f031122add6
[ "MIT" ]
null
null
null
output_report.py
Lumpkins/output_report
f4b190c468765dcc058af13966b43f031122add6
[ "MIT" ]
null
null
null
output_report.py
Lumpkins/output_report
f4b190c468765dcc058af13966b43f031122add6
[ "MIT" ]
null
null
null
import sys import os import matplotlib.pyplot as plt import docx from docx.enum.text import WD_ALIGN_PARAGRAPH from plot_params import ePlot_type import pandas as pd import pdb class OutputReport(): def __init__(self,**kwargs): self.loc=kwargs.get("loc",r"C:\test.docx") self.d...
30.505543
195
0.533799
cc21eeee315ae0036bbef771643a4e54b8891dff
7,818
py
Python
core/manager/mysqlManager.py
umknow/python
6fc4ad43bf0886c49b807c203ca485a15056c97c
[ "BSD-2-Clause" ]
null
null
null
core/manager/mysqlManager.py
umknow/python
6fc4ad43bf0886c49b807c203ca485a15056c97c
[ "BSD-2-Clause" ]
null
null
null
core/manager/mysqlManager.py
umknow/python
6fc4ad43bf0886c49b807c203ca485a15056c97c
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # @Date: 2019-04-25 # @Author:zoubiao import decimal from collections import OrderedDict import pymysql import sqlalchemy from DBUtils.PooledDB import PooledDB from sqlalchemy import create_engine, and_ from sqlalchemy.orm import scoped_session, sessionmaker from contextlib import contextmanage...
27.723404
164
0.578153
54b319b9ea76f3df6bf7324d4ec02fa2c9ebf55b
2,734
py
Python
oswin_tempest_plugin/tests/scenario/test_secure_boot.py
openstack/oswin-tempest-plugin
59e6a14d01dda304c7d11fda1d35198f25799d6c
[ "Apache-2.0" ]
6
2017-10-31T10:40:24.000Z
2019-01-28T22:08:15.000Z
oswin_tempest_plugin/tests/scenario/test_secure_boot.py
openstack/oswin-tempest-plugin
59e6a14d01dda304c7d11fda1d35198f25799d6c
[ "Apache-2.0" ]
null
null
null
oswin_tempest_plugin/tests/scenario/test_secure_boot.py
openstack/oswin-tempest-plugin
59e6a14d01dda304c7d11fda1d35198f25799d6c
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Cloudbase Solutions SRL # 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 r...
38.507042
78
0.701902
02b098da092b8cd3d04cdaea8fbe63208ad18529
556
py
Python
test_plus/runner.py
kadamsagar039/python-sonar
3f73425c85d3a98bd4ce321e2f5fb33a36be1150
[ "BSD-3-Clause" ]
530
2015-05-23T18:25:39.000Z
2022-03-20T14:30:10.000Z
test_plus/runner.py
kadamsagar039/python-sonar
3f73425c85d3a98bd4ce321e2f5fb33a36be1150
[ "BSD-3-Clause" ]
144
2015-05-27T04:09:15.000Z
2021-11-24T15:32:08.000Z
test_plus/runner.py
kadamsagar039/python-sonar
3f73425c85d3a98bd4ce321e2f5fb33a36be1150
[ "BSD-3-Clause" ]
62
2015-05-27T02:47:19.000Z
2022-02-11T21:01:36.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from django.test.runner import DiscoverRunner as DefaultRunner class NoLoggingRunner(DefaultRunner): def run_tests(self, test_labels, extra_tests=None, **kwargs): # Disable logging below CRITICAL while running the tests ...
32.705882
66
0.607914
4cf73f99fd48da88c83e8f5affe9c2c1e159c370
140,794
py
Python
tensorflow/python/ops/array_ops.py
yxd886/tensorflow
2eebcc63a6cd3aad483bf7c1cb25df2b8780ef67
[ "Apache-2.0" ]
1
2019-03-28T19:21:24.000Z
2019-03-28T19:21:24.000Z
tensorflow/python/ops/array_ops.py
yxd886/tensorflow
2eebcc63a6cd3aad483bf7c1cb25df2b8780ef67
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/array_ops.py
yxd886/tensorflow
2eebcc63a6cd3aad483bf7c1cb25df2b8780ef67
[ "Apache-2.0" ]
null
null
null
# 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...
35.734518
129
0.638522
50d6f5e87bd50fa2b707b764a883ebbca48f0362
17,616
py
Python
pydisney/m3u8_formater.py
andrewzhong1122/DSNP-dl
2587aae1c772c40bc4a17e1e6396ab8886091a3d
[ "MIT" ]
28
2022-01-02T03:39:18.000Z
2022-03-27T13:49:18.000Z
pydisney/m3u8_formater.py
Machtergreifung/DISNEY-4K-SCRIPT
337490793b475ee04a4b9eb12c2bd3917415219a
[ "MIT" ]
1
2022-01-24T03:23:13.000Z
2022-01-24T03:23:13.000Z
pydisney/m3u8_formater.py
Machtergreifung/DISNEY-4K-SCRIPT
337490793b475ee04a4b9eb12c2bd3917415219a
[ "MIT" ]
58
2022-01-02T01:45:30.000Z
2022-03-15T06:47:57.000Z
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- from __future__ import absolute_import import binascii import copy import os import random import re import time from datetime import datetime from datetime import timedelta from cryptography.hazmat.backends import default_backen...
37.322034
149
0.499092
f46b76f1cdb494ea867c5507021cea82625b4d59
2,084
py
Python
__init__.py
krisgesling/webpage-homescreen-skill
d428057472675e48a00c3ed51e0793dfb2c68a59
[ "Apache-2.0" ]
null
null
null
__init__.py
krisgesling/webpage-homescreen-skill
d428057472675e48a00c3ed51e0793dfb2c68a59
[ "Apache-2.0" ]
1
2021-08-23T03:58:26.000Z
2021-08-23T03:58:26.000Z
__init__.py
krisgesling/webpage-homescreen-skill
d428057472675e48a00c3ed51e0793dfb2c68a59
[ "Apache-2.0" ]
null
null
null
from mycroft import MycroftSkill, intent_handler from mycroft.skills import resting_screen_handler MARK_II = "mycroft_mark_2" class WebpageHomescreen(MycroftSkill): def __init__(self): MycroftSkill.__init__(self) self.is_active = False self.platform = self.config_core["enclosure"].get("p...
33.612903
80
0.661708
1fed9ea41382cb67ee406a378acdf7b118da45de
1,281
py
Python
parameters/migrations/0001_initial.py
sgleisner/django-project-template
1ec8ef798fa0d203fe9d875481a3063c678ed7d6
[ "MIT" ]
null
null
null
parameters/migrations/0001_initial.py
sgleisner/django-project-template
1ec8ef798fa0d203fe9d875481a3063c678ed7d6
[ "MIT" ]
11
2020-06-06T00:50:21.000Z
2022-02-26T19:41:44.000Z
parameters/migrations/0001_initial.py
sgleisner/django-project-template
1ec8ef798fa0d203fe9d875481a3063c678ed7d6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-05-19 15:32 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Param...
40.03125
181
0.595628
7fa18d953d102adf17d7fd9af64135427aeee659
2,778
py
Python
summarize.py
DataEngineeringLabs/arrow-string-view
fca2b503ce9a47980b8292b744170fd0aeebece6
[ "Apache-2.0" ]
1
2021-12-16T10:22:31.000Z
2021-12-16T10:22:31.000Z
summarize.py
DataEngineeringLabs/arrow-string-view
fca2b503ce9a47980b8292b744170fd0aeebece6
[ "Apache-2.0" ]
null
null
null
summarize.py
DataEngineeringLabs/arrow-string-view
fca2b503ce9a47980b8292b744170fd0aeebece6
[ "Apache-2.0" ]
null
null
null
import json import os import matplotlib.pyplot as plt import matplotlib.ticker as mtick def set_size(width, fraction=1): """Set figure dimensions to avoid scaling in LaTeX. Parameters ---------- width: float Document textwidth or columnwidth in pts fraction: float, optional ...
25.027027
91
0.568035
f9bc91ae19acc26cf504f1ca0a240059dd8b5177
6,146
py
Python
geo/db/query.py
hariharshankar/pygeo
f87b5f117dd35e8c6491d1c627cc795e416df6f9
[ "MIT" ]
1
2017-09-03T14:39:26.000Z
2017-09-03T14:39:26.000Z
geo/db/query.py
hariharshankar/pygeo
f87b5f117dd35e8c6491d1c627cc795e416df6f9
[ "MIT" ]
null
null
null
geo/db/query.py
hariharshankar/pygeo
f87b5f117dd35e8c6491d1c627cc795e416df6f9
[ "MIT" ]
null
null
null
""" Builds and executes all select sql statements. """ class Select(object): """ Builds and executes all select sql statements. """ def __init__(self, db): """ Query the database. :param db: a valid database connection. """ self.db_conn = db.session sel...
34.723164
85
0.451839
146531d67c6e9d495fe86d3581e87f653d84ebb5
528
py
Python
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/new-a-28530
99733ac3680dc5e99f6eb92eb039747ca24e5e32
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/new-a-28530
99733ac3680dc5e99f6eb92eb039747ca24e5e32
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/new-a-28530
99733ac3680dc5e99f6eb92eb039747ca24e5e32
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "new-a-28530.botics.co" site_params = { "name": "new a", } if custom_domain: site_params["domain"] = custom_domain Site.objects.update_or_create(defau...
20.307692
61
0.647727
a5d24bc4fb5f31d987e24d58206e316b1597636e
2,565
py
Python
src/satosa/util.py
misi/SATOSA
04907b44dbe93eea2f46026e7b6923435accba5a
[ "Apache-2.0" ]
1
2019-07-10T14:07:51.000Z
2019-07-10T14:07:51.000Z
src/satosa/util.py
misi/SATOSA
04907b44dbe93eea2f46026e7b6923435accba5a
[ "Apache-2.0" ]
1
2019-01-09T17:48:06.000Z
2019-01-09T17:48:06.000Z
src/satosa/util.py
misi/SATOSA
04907b44dbe93eea2f46026e7b6923435accba5a
[ "Apache-2.0" ]
1
2019-10-03T15:50:09.000Z
2019-10-03T15:50:09.000Z
""" Python package file for util functions. """ import hashlib import logging import random import string from satosa.logging_util import satosa_logging logger = logging.getLogger(__name__) def hash_data(salt, value, hash_alg=None): """ Hashes a value together with a salt with the given hash algorithm. ...
27.287234
75
0.592982
6e228b20c491dbf5945054e0f280789575e6f9d1
1,621
py
Python
tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py
BenRKarl/gapic-generator-python
e4f92bd988a5b955ede88a9a10163010aae825f1
[ "Apache-2.0" ]
86
2018-09-28T11:46:15.000Z
2022-03-27T19:25:09.000Z
tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py
BenRKarl/gapic-generator-python
e4f92bd988a5b955ede88a9a10163010aae825f1
[ "Apache-2.0" ]
1,054
2018-04-19T18:35:05.000Z
2022-03-30T14:12:38.000Z
tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py
BenRKarl/gapic-generator-python
e4f92bd988a5b955ede88a9a10163010aae825f1
[ "Apache-2.0" ]
47
2018-04-26T22:08:56.000Z
2022-03-22T22:18:00.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
31.173077
85
0.744602
bee9f1975f35bb755414cd958647be199bd62d7a
5,084
py
Python
ocd_backend/utils/misc.py
openstate/open-wob-api
cafddece6078e68f0db58ec18b083598247ade8f
[ "CC-BY-4.0" ]
6
2017-08-16T13:14:42.000Z
2021-11-23T00:41:20.000Z
ocd_backend/utils/misc.py
openstate/open-wob-api
cafddece6078e68f0db58ec18b083598247ade8f
[ "CC-BY-4.0" ]
21
2017-11-06T17:05:08.000Z
2022-03-11T23:18:12.000Z
ocd_backend/utils/misc.py
openstate/open-wob-api
cafddece6078e68f0db58ec18b083598247ade8f
[ "CC-BY-4.0" ]
2
2017-12-27T13:12:23.000Z
2019-08-08T07:17:52.000Z
import datetime import json import re import glob import translitcodec from elasticsearch.helpers import scan, bulk def reindex(client, source_index, target_index, target_client=None, chunk_size=500, scroll='5m', transformation_callable=None): """ Reindex all documents from one index to another, potentially ...
31.190184
127
0.616837
4a9f6722aea144ba7b014bcb537c921c43205c87
1,993
py
Python
ixtlilton_tools/_private_tools/exceptions.py
uibcdf/Ixtlilton
1f7e8afe9ca6a2c25646bab0bf1770fe75c8aa5e
[ "MIT" ]
null
null
null
ixtlilton_tools/_private_tools/exceptions.py
uibcdf/Ixtlilton
1f7e8afe9ca6a2c25646bab0bf1770fe75c8aa5e
[ "MIT" ]
13
2017-08-01T22:31:24.000Z
2021-12-17T18:56:22.000Z
ixtlilton_tools/_private_tools/exceptions.py
uibcdf/Ixtlilton
1f7e8afe9ca6a2c25646bab0bf1770fe75c8aa5e
[ "MIT" ]
null
null
null
class BadCallError(ValueError): def __init__(self, message=None): if message is None: message = 'Wrong way of invoking this method. Check the online documentation for more information: http://www.uibcdf.org/MolSysMT' super().__init__(message) class NotImplementedError(NotImplementedErro...
36.236364
142
0.644757
d8d77294762ed00878626bef699bf28a5a0e122e
505
py
Python
server/scripts/encontrar_investigacoes.py
danilopcarlotti/scdf
cb89216f6a07da94f765d101390a521861063c76
[ "MIT" ]
3
2019-11-28T22:58:50.000Z
2020-08-20T12:23:38.000Z
server/scripts/encontrar_investigacoes.py
danilopcarlotti/scdf
cb89216f6a07da94f765d101390a521861063c76
[ "MIT" ]
null
null
null
server/scripts/encontrar_investigacoes.py
danilopcarlotti/scdf
cb89216f6a07da94f765d101390a521861063c76
[ "MIT" ]
1
2019-03-21T20:13:51.000Z
2019-03-21T20:13:51.000Z
import os import sys from dotenv import load_dotenv, find_dotenv from pymongo import MongoClient from pathlib import Path PATH_ROOT = Path().absolute().parent.parent sys.path.append(str(PATH_ROOT)) load_dotenv(find_dotenv()) mongo_url = os.getenv("mongo_url") def investigacoes_usuario(id_responsavel): myclient ...
28.055556
86
0.770297
60ce605d1df042d5296c4bf0fdde71ac70a50978
256
py
Python
Day1/day1.2.py
akashvacher/AdventOfCode2021
8d1429c0cc33cf67f84097b38fb01f02e69c1717
[ "MIT" ]
null
null
null
Day1/day1.2.py
akashvacher/AdventOfCode2021
8d1429c0cc33cf67f84097b38fb01f02e69c1717
[ "MIT" ]
null
null
null
Day1/day1.2.py
akashvacher/AdventOfCode2021
8d1429c0cc33cf67f84097b38fb01f02e69c1717
[ "MIT" ]
null
null
null
def part2(): count = 0 numbers = [] for line in open("in.txt").read().splitlines(): numbers.append(int(line)) if len(numbers) >= 4: if numbers[-1] > numbers[-4]: count += 1 print(count) part2()
19.692308
51
0.488281
5dcc1bea08b638c1ed29d74dbe8c218e35035b78
8,261
py
Python
realtime_hand_3d/segmentation/criterion.py
NeelayS/realtime_hand
219c772b9b7df60c390edac7da23f9cdddebca4d
[ "MIT" ]
null
null
null
realtime_hand_3d/segmentation/criterion.py
NeelayS/realtime_hand
219c772b9b7df60c390edac7da23f9cdddebca4d
[ "MIT" ]
null
null
null
realtime_hand_3d/segmentation/criterion.py
NeelayS/realtime_hand
219c772b9b7df60c390edac7da23f9cdddebca4d
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from ..utils import Registry SEG_CRITERION_REGISTRY = Registry("CRITERION") @SEG_CRITERION_REGISTRY.register() class OhemCrossEntropy2dTensor(nn.Module): def __init__( self, ignore_label, reduction="elementwise_mean", ...
30.596296
83
0.584554
27631e790ce112e044b6b4353ec3732cac0152db
13,735
py
Python
senlin-7.0.0/senlin/tests/unit/db/test_cluster_policy_api.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
null
null
null
senlin-7.0.0/senlin/tests/unit/db/test_cluster_policy_api.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
senlin-7.0.0/senlin/tests/unit/db/test_cluster_policy_api.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
41.74772
78
0.568839