hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
6922e426eb7e0a43941568b54e7d7c58eb218987
2,534
py
Python
binloginfo_gtid_util.py
Jaricho/binlogsqlbygtid
42e4f2e013d6c96497170498eb337fd9e9b77ff9
[ "MIT" ]
4
2018-11-15T15:18:26.000Z
2020-06-02T08:41:39.000Z
binloginfo_gtid_util.py
Jaricho/binlogsqlbygtid
42e4f2e013d6c96497170498eb337fd9e9b77ff9
[ "MIT" ]
null
null
null
binloginfo_gtid_util.py
Jaricho/binlogsqlbygtid
42e4f2e013d6c96497170498eb337fd9e9b77ff9
[ "MIT" ]
null
null
null
#!/usr/bin/env python #-*- encoding: utf8 -*- import argparse def parse_args(): """parse args for binloginfo gtid""" parser = argparse.ArgumentParser(description='Get MySQL Binlog info by GTID', add_help=False) connect_params = parser.add_argument_group('connect params') connect_params.add_argument('-...
42.233333
137
0.695343
#!/usr/bin/env python #-*- encoding: utf8 -*- import sys import argparse import getpass import paramiko def parse_args(): """parse args for binloginfo gtid""" parser = argparse.ArgumentParser(description='Get MySQL Binlog info by GTID', add_help=False) connect_params = parser.add_argument_group('connect ...
0
0
0
0
0
1,058
0
-24
113
594ee4e0f099e0aefb17624069ac221da89a4436
745
py
Python
TestHowToUse/test_adaboost.py
GavrilovMike/EnsembleLearning
6badedf2b6e9f2d3b01c11246c32916864ad3848
[ "MIT" ]
null
null
null
TestHowToUse/test_adaboost.py
GavrilovMike/EnsembleLearning
6badedf2b6e9f2d3b01c11246c32916864ad3848
[ "MIT" ]
null
null
null
TestHowToUse/test_adaboost.py
GavrilovMike/EnsembleLearning
6badedf2b6e9f2d3b01c11246c32916864ad3848
[ "MIT" ]
null
null
null
from sklearn.ensemble import AdaBoostClassifier from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn import metrics iris = datasets.load_iris() X = iris.data y = iris.target print('data: ', X, '\n') print('target: ', y, '\n') X_train, X_test, y_train, y_test = train_test_sp...
24.833333
72
0.700671
from sklearn.ensemble import AdaBoostClassifier from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn import metrics iris = datasets.load_iris() X = iris.data y = iris.target print('data: ', X, '\n') print('target: ', y, '\n') X_train, X_test, y_train, y_test = train_test_sp...
0
0
0
0
0
0
0
0
0
c3179b26a02163dd6a53946bedf2fe278876095c
3,578
py
Python
analyzer/predictor/predict.py
daejeonpython/meerkats
260d3159091738ec317734e3b948533b1c8bc901
[ "Apache-2.0" ]
9
2021-08-04T14:41:32.000Z
2021-09-15T12:51:41.000Z
analyzer/predictor/predict.py
daejeonpython/meerkats
260d3159091738ec317734e3b948533b1c8bc901
[ "Apache-2.0" ]
20
2021-08-08T05:56:51.000Z
2021-09-08T23:44:51.000Z
analyzer/predictor/predict.py
daejeonpython/meerkats
260d3159091738ec317734e3b948533b1c8bc901
[ "Apache-2.0" ]
9
2021-08-08T12:17:33.000Z
2021-09-01T13:30:34.000Z
import argparse if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--test_data', type=str, help='path to the test data') parser.add_argument('--weight', type=str, help='path to the weight file') parser.add_argument('--pred_csv', type=str, help='p...
35.78
162
0.639743
import argparse import easydict import numpy as np import pandas as pd from datetime import timedelta import torch from utils.preprocessor import csv_to_pd from utils.plots import plot_inference_result from models.transformer import transformer def inference(opt): device = 'cuda' if torch.cuda.is_available(...
0
0
0
0
0
2,830
0
53
223
3ce05fc89a78ad0c93a512d8a79fcedee2637c7b
907
py
Python
server/processes/migrations/0016_userprofile.py
CloudReactor/task_manager
464ca74371064fabb9a21b1f5bacba30360932ab
[ "Fair" ]
null
null
null
server/processes/migrations/0016_userprofile.py
CloudReactor/task_manager
464ca74371064fabb9a21b1f5bacba30360932ab
[ "Fair" ]
6
2021-11-01T01:35:40.000Z
2022-02-11T03:33:06.000Z
server/processes/migrations/0016_userprofile.py
CloudReactor/task_manager
464ca74371064fabb9a21b1f5bacba30360932ab
[ "Fair" ]
null
null
null
# Generated by Django 2.2.2 on 2019-07-08 11:12
34.884615
174
0.646086
# Generated by Django 2.2.2 on 2019-07-08 11:12 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import processes.models.user_profile class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH...
0
0
0
681
0
0
0
56
119
202d07dd67d5ec6d47336c76e943bec62bce4e72
476
py
Python
tests/test_grammar.py
manfred-kaiser/sifter
897ea92d5fa2ec8ee5af359ea04a8d28aec6a568
[ "BSD-2-Clause" ]
1
2021-03-02T10:53:15.000Z
2021-03-02T10:53:15.000Z
tests/test_grammar.py
manfred-kaiser/sifter
897ea92d5fa2ec8ee5af359ea04a8d28aec6a568
[ "BSD-2-Clause" ]
12
2020-10-10T16:36:22.000Z
2020-10-10T16:48:56.000Z
tests/test_grammar.py
manfred-kaiser/sifter
897ea92d5fa2ec8ee5af359ea04a8d28aec6a568
[ "BSD-2-Clause" ]
2
2020-12-16T14:07:01.000Z
2021-03-24T08:58:33.000Z
# type: ignore
23.8
65
0.758403
# type: ignore import pytest from sifter.extensions import ExtensionRegistry from sifter.grammar.state import EvaluationState def test_grammar(): ExtensionRegistry.register_extension('ext1') ExtensionRegistry.register_extension('ext2') state = EvaluationState() state.require_extension('ext1') ...
0
0
0
0
0
324
0
45
91
3a593d9632ff7fb9449bbbaf9d591d2c73861774
2,606
py
Python
memory_test/cg_monitor.py
yncxcw/charon
0eaa3f02c75bacf293ccf8c546bbcd7e053c690f
[ "Apache-2.0" ]
null
null
null
memory_test/cg_monitor.py
yncxcw/charon
0eaa3f02c75bacf293ccf8c546bbcd7e053c690f
[ "Apache-2.0" ]
null
null
null
memory_test/cg_monitor.py
yncxcw/charon
0eaa3f02c75bacf293ccf8c546bbcd7e053c690f
[ "Apache-2.0" ]
null
null
null
#!/bin/python import time metrics={} if __name__=="__main__": #metrics["/sys/fs/cgroup/memory/memory.failcnt"] =[] #metrics["/sys/fs/cgroup/memory/memory.kmem.failcnt"] =[] #metrics["/sys/fs/cgroup/memory/memory.kmem.limit_in_bytes"] =[] #metrics["/sys/fs/cgroup/memor...
32.575
87
0.526094
#!/bin/python import os import time import pickle import matplotlib.pyplot as pl metrics={} def read_metrics(path): if os.path.exists(path) is False: return if ("stat" in path) or ("proc" in path): fopen=open(path,"r") #print path for line in fopen.readlines(): #pr...
0
0
0
0
0
1,067
0
-11
119
9321cc388a627b9af1e3f41fce3a3129d936484e
3,750
py
Python
tests.py
WissamAntoun/farasapy
31aeddb0225a509e0d77c73cfb15aedec9457064
[ "MIT" ]
63
2020-05-16T12:33:08.000Z
2022-03-25T15:49:31.000Z
tests.py
WissamAntoun/farasapy
31aeddb0225a509e0d77c73cfb15aedec9457064
[ "MIT" ]
17
2020-05-19T02:00:06.000Z
2022-01-04T02:01:38.000Z
tests.py
WissamAntoun/farasapy
31aeddb0225a509e0d77c73cfb15aedec9457064
[ "MIT" ]
17
2020-05-27T06:56:39.000Z
2022-03-01T13:10:27.000Z
from farasa.pos import FarasaPOSTagger from farasa.ner import FarasaNamedEntityRecognizer from farasa.diacratizer import FarasaDiacritizer from farasa.segmenter import FarasaSegmenter from farasa.stemmer import FarasaStemmer # https://r12a.github.io/scripts/tutorial/summaries/arabic sample = """ 422 ...
39.473684
289
0.6384
from farasa.pos import FarasaPOSTagger from farasa.ner import FarasaNamedEntityRecognizer from farasa.diacratizer import FarasaDiacritizer from farasa.segmenter import FarasaSegmenter from farasa.stemmer import FarasaStemmer # https://r12a.github.io/scripts/tutorial/summaries/arabic sample = """ يُشار إلى أن اللغة ال...
450
0
0
0
0
0
0
0
0
071e13d2c80683531a954abdd35bb510e4916bf4
3,828
py
Python
torch_geometric/utils/random.py
LingxiaoShawn/pytorch_geometric
50b7bfc4a59b5b6f7ec547ff862985f3b2e22798
[ "MIT" ]
1
2022-02-21T13:23:19.000Z
2022-02-21T13:23:19.000Z
torch_geometric/utils/random.py
LingxiaoShawn/pytorch_geometric
50b7bfc4a59b5b6f7ec547ff862985f3b2e22798
[ "MIT" ]
null
null
null
torch_geometric/utils/random.py
LingxiaoShawn/pytorch_geometric
50b7bfc4a59b5b6f7ec547ff862985f3b2e22798
[ "MIT" ]
null
null
null
import numpy as np import torch from torch_geometric.utils import remove_self_loops, to_undirected def erdos_renyi_graph(num_nodes, edge_prob, directed=False): r"""Returns the :obj:`edge_index` of a random Erdos-Renyi graph. Args: num_nodes (int): The number of nodes. edge_prob (float): Prob...
34.486486
79
0.648903
import numpy as np import torch from torch_geometric.utils import remove_self_loops, to_undirected def erdos_renyi_graph(num_nodes, edge_prob, directed=False): r"""Returns the :obj:`edge_index` of a random Erdos-Renyi graph. Args: num_nodes (int): The number of nodes. edge_prob (float): Prob...
0
0
0
0
0
0
0
0
0
6be0c8fc946490711d8d65f229ce7d1049923203
2,505
py
Python
bonjour_suzanne/__init__.py
nangtani/ba_bonjour_suzanne
903b4fbb017fe78ef886f7590978670a125baedb
[ "MIT" ]
1
2020-07-02T06:08:55.000Z
2020-07-02T06:08:55.000Z
bonjour_suzanne/__init__.py
nangtani/ba_bonjour_suzanne
903b4fbb017fe78ef886f7590978670a125baedb
[ "MIT" ]
null
null
null
bonjour_suzanne/__init__.py
nangtani/ba_bonjour_suzanne
903b4fbb017fe78ef886f7590978670a125baedb
[ "MIT" ]
null
null
null
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
28.793103
80
0.662675
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
0
57
0
515
0
822
0
-11
137
e0626edae52006ef9d4732a7bf2aee3e1174c00b
11,522
py
Python
tests/examples/voting/test_ballot.py
lrettig/viper
4abdd2b59b58fe87ca0aee05c792a6e0363b5358
[ "MIT" ]
1
2018-07-26T00:56:30.000Z
2018-07-26T00:56:30.000Z
tests/examples/voting/test_ballot.py
DustinWehr/viper
d904b9de12282fe65a57cf005e17f8269e05e9bf
[ "MIT" ]
null
null
null
tests/examples/voting/test_ballot.py
DustinWehr/viper
d904b9de12282fe65a57cf005e17f8269e05e9bf
[ "MIT" ]
2
2018-04-06T02:55:43.000Z
2018-07-26T00:56:36.000Z
import unittest from ethereum.tools import tester import ethereum.utils as utils import ethereum.abi as abi def assert_tx_failed(ballot_tester, function_to_test, exception = tester.TransactionFailed): """ Ensure that transaction fails, reverting state (to prevent gas exhaustion) """ initial_state = ballot_tes...
48.822034
173
0.646763
import unittest from ethereum.tools import tester import ethereum.utils as utils import ethereum.abi as abi def assert_tx_failed(ballot_tester, function_to_test, exception = tester.TransactionFailed): """ Ensure that transaction fails, reverting state (to prevent gas exhaustion) """ initial_state = ballot_tes...
0
0
0
11,012
0
0
0
0
23
4d5eb66b1d104cc40eca6bcc2c4139da85bdc3e4
3,773
py
Python
src/EPS/BatteryLoop.py
MelbourneSpaceProgram/ground-station-v2
1ec30aed84096ced23bf6e751b21432344dce5fb
[ "MIT" ]
null
null
null
src/EPS/BatteryLoop.py
MelbourneSpaceProgram/ground-station-v2
1ec30aed84096ced23bf6e751b21432344dce5fb
[ "MIT" ]
null
null
null
src/EPS/BatteryLoop.py
MelbourneSpaceProgram/ground-station-v2
1ec30aed84096ced23bf6e751b21432344dce5fb
[ "MIT" ]
2
2021-12-28T13:07:04.000Z
2021-12-28T13:48:32.000Z
import board import busio from BatCurvInterp import BatCurvInterp import RPi.GPIO as GPIO import adafruit_ads1x15.ads1115 as ADS from adafruit_ads1x15.analog_in import AnalogIn # Create the I2C bus i2c = busio.I2C(board.SCL, board.SDA) # Create the ADS object ads = ADS.ADS1115(i2c) # Create a differential channel o...
30.92623
130
0.710575
from os import read import time import board import busio from BatCurvInterp import BatCurvInterp import numpy as np import RPi.GPIO as GPIO import subprocess import adafruit_ads1x15.ads1115 as ADS from adafruit_ads1x15.analog_in import AnalogIn # Create the I2C bus i2c = busio.I2C(board.SCL, board.SDA) # Create the...
0
0
0
0
0
1,565
0
-19
220
abab08d5b43611f056f82c79c6e94318db2770ba
989
py
Python
tests/test_tags.py
elifesciences/elife-crossref-xml-generation
1cd7b3981d9c78032d2d0ffb68b651de40a8d622
[ "MIT" ]
3
2018-03-01T01:14:14.000Z
2021-01-19T13:04:42.000Z
tests/test_tags.py
elifesciences/elife-crossref-xml-generation
1cd7b3981d9c78032d2d0ffb68b651de40a8d622
[ "MIT" ]
88
2017-07-20T00:13:47.000Z
2021-11-29T04:58:01.000Z
tests/test_tags.py
elifesciences/elife-crossref-xml-generation
1cd7b3981d9c78032d2d0ffb68b651de40a8d622
[ "MIT" ]
4
2017-06-28T22:22:20.000Z
2021-02-17T23:06:39.000Z
import unittest if __name__ == "__main__": unittest.main()
30.90625
96
0.589484
import unittest from xml.etree import ElementTree from xml.etree.ElementTree import Element from elifecrossref import tags class TestAddCleanTag(unittest.TestCase): def test_add_clean_tag(self): """test add_clean_tag to check edge cases""" root = Element("root") # add the element t...
0
0
0
793
0
0
0
41
89
d6a94175af421ae3e83ba70b83536078b98aa481
3,081
py
Python
cogs/customjoinleave.py
rageyboiii/test-boy
089309d279fc21aca28b8a68725a52f1170edd29
[ "CC0-1.0" ]
null
null
null
cogs/customjoinleave.py
rageyboiii/test-boy
089309d279fc21aca28b8a68725a52f1170edd29
[ "CC0-1.0" ]
null
null
null
cogs/customjoinleave.py
rageyboiii/test-boy
089309d279fc21aca28b8a68725a52f1170edd29
[ "CC0-1.0" ]
null
null
null
# import asyncio # from discord_slash import cog_ext,SlashContext
41.635135
145
0.667965
# import asyncio import json import typing from nextcord.ext import commands from functions import embed # from discord_slash import cog_ext,SlashContext class CustomJoinLeave(commands.Cog): def cog_check(self, ctx): if ctx.guild is None: raise commands.NoPrivateMessage("This command ca...
0
1,906
0
925
0
31
0
0
145
efe13c4eb5dbe33b9b6c2631e7735a34a810ce1a
827
py
Python
bazaar/templatetags/bazaar_management.py
meghabhoj/NEWBAZAAR
cb1405dcb2c8b4812ddf724d5a3c07b2f77c1b34
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
bazaar/templatetags/bazaar_management.py
meghabhoj/NEWBAZAAR
cb1405dcb2c8b4812ddf724d5a3c07b2f77c1b34
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
bazaar/templatetags/bazaar_management.py
meghabhoj/NEWBAZAAR
cb1405dcb2c8b4812ddf724d5a3c07b2f77c1b34
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
from __future__ import unicode_literals from django import template register = template.Library()
29.535714
105
0.853688
from __future__ import unicode_literals from django import template from ..listings.stores import stores_loader register = template.Library() @register.assignment_tag def store_publishing_template(store_slug): return stores_loader.get_store_strategy(store_slug).get_store_publishing_template() @register.assig...
0
586
0
0
0
0
0
22
115
2ed2335f4f46372e3b2935046ce174f72a0f0710
2,588
py
Python
src/modelldcatnotordf/licensedocument.py
Informasjonsforvaltning/modelldcatnotordf
995129ff9f6fb95f9a9d875b27f3aa14bac9b7f1
[ "Apache-2.0" ]
1
2020-11-29T18:36:21.000Z
2020-11-29T18:36:21.000Z
src/modelldcatnotordf/licensedocument.py
Informasjonsforvaltning/modelldcatnotordf
995129ff9f6fb95f9a9d875b27f3aa14bac9b7f1
[ "Apache-2.0" ]
142
2020-10-07T08:52:55.000Z
2021-11-18T15:09:31.000Z
src/modelldcatnotordf/licensedocument.py
Informasjonsforvaltning/modelldcatnotordf
995129ff9f6fb95f9a9d875b27f3aa14bac9b7f1
[ "Apache-2.0" ]
null
null
null
"""Module for mapping a LicenseDocument to rdf. This module contains methods for mapping to rdf according to the modelldcat-ap-no specification._ Refer to sub-class for typical usage examples. """ from __future__ import annotations from rdflib import Namespace DCT = Namespace("http://purl.org/dc/terms/")
27.531915
87
0.610124
"""Module for mapping a LicenseDocument to rdf. This module contains methods for mapping to rdf according to the modelldcat-ap-no specification._ Refer to sub-class for typical usage examples. """ from __future__ import annotations from typing import List, Optional, Union from concepttordf import Concept from datac...
0
286
0
1,805
0
0
0
73
113
9fa3128ce6abf0460533d006c662672a4dadfa35
1,422
py
Python
webgeocalc/decorator.py
BaptisteCecconi/python-webgeocalc
be3ed33ae7d509766d90fc61bc0dd557ad635e87
[ "MIT" ]
6
2019-01-30T00:21:11.000Z
2021-11-26T15:18:00.000Z
webgeocalc/decorator.py
BaptisteCecconi/python-webgeocalc
be3ed33ae7d509766d90fc61bc0dd557ad635e87
[ "MIT" ]
8
2019-09-19T14:09:22.000Z
2022-02-16T13:10:48.000Z
webgeocalc/decorator.py
BaptisteCecconi/python-webgeocalc
be3ed33ae7d509766d90fc61bc0dd557ad635e87
[ "MIT" ]
5
2019-10-18T07:47:11.000Z
2022-02-04T21:36:00.000Z
"""Webgeocalc decorators.""" from .errors import CalculationInvalidAttr from .vars import VALID_PARAMETERS def parameter(_func=None, *, only=None): """Parameter decorator setter with a validation check. Can be used in the following forms: - @parameter - @parameter() - @parameter(only='VALID_PAR...
25.854545
80
0.608298
"""Webgeocalc decorators.""" from .errors import CalculationInvalidAttr from .vars import VALID_PARAMETERS def parameter(_func=None, *, only=None): """Parameter decorator setter with a validation check. Can be used in the following forms: - @parameter - @parameter() - @parameter(only='VALID_PAR...
0
0
0
0
0
0
0
0
0
8ddfd070c87d8f3ed22f6b74cd3d3c82f46ef281
17,061
py
Python
src/nlp_service/controllers/nlp_controller.py
arekmano/JusticeAI
a996a8903f7d05d5b5c275a1a394d0f55664f299
[ "MIT" ]
1
2020-06-11T21:35:14.000Z
2020-06-11T21:35:14.000Z
src/nlp_service/controllers/nlp_controller.py
mihaiqc/JusticeAI
311a080112b17cfb50b445df1a803c6a320c5405
[ "MIT" ]
1
2017-09-24T22:54:09.000Z
2017-09-24T22:54:09.000Z
src/nlp_service/controllers/nlp_controller.py
mihaiqc/JusticeAI
311a080112b17cfb50b445df1a803c6a320c5405
[ "MIT" ]
null
null
null
import json from flask import jsonify, abort, make_response from nlp_service.rasa.intent_threshold import IntentThreshold from nlp_service.services import fact_service, report_service from rasa.rasa_classifier import RasaClassifier from services import ml_service from services.response_strings import Responses from ...
41.012019
124
0.715667
import json from flask import jsonify, abort, make_response from nlp_service.rasa.intent_threshold import IntentThreshold from nlp_service.services import fact_service, report_service from postgresql_db.models import * from rasa.rasa_classifier import RasaClassifier from services import ml_service from services.respo...
0
0
0
0
0
0
0
13
22
17d666d4d108b6a08d8ff7dc4dc0530861cd3675
269
py
Python
examples/customlib.py
joamatab/simphony
bfe20c656d19aa18d79b4c8dbccdc0b70daebe80
[ "MIT" ]
1
2020-10-07T17:16:18.000Z
2020-10-07T17:16:18.000Z
examples/customlib.py
joamatab/simphony
bfe20c656d19aa18d79b4c8dbccdc0b70daebe80
[ "MIT" ]
null
null
null
examples/customlib.py
joamatab/simphony
bfe20c656d19aa18d79b4c8dbccdc0b70daebe80
[ "MIT" ]
2
2020-11-24T22:49:32.000Z
2020-12-01T13:17:35.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright Simphony Project Contributors # Licensed under the terms of the MIT License # (see simphony/__init__.py for details) """ Coming Soon: A tutorial/best-practice-guide on creating your own model library. """
24.454545
79
0.72119
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright © Simphony Project Contributors # Licensed under the terms of the MIT License # (see simphony/__init__.py for details) """ Coming Soon: A tutorial/best-practice-guide on creating your own model library. """
2
0
0
0
0
0
0
0
0
11a5a80baf7b22be1302dfca61ff3b96fdcea9e4
9,027
py
Python
DCS311 Artificial Intelligence/Decision Tree/decision_tree.py
Lan-Jing/Courses
540db9499b8725ca5b82a2c4e7a3da09f73c0efa
[ "MIT" ]
1
2021-12-17T23:09:00.000Z
2021-12-17T23:09:00.000Z
DCS311 Artificial Intelligence/Decision Tree/decision_tree.py
Lan-Jing/Courses
540db9499b8725ca5b82a2c4e7a3da09f73c0efa
[ "MIT" ]
null
null
null
DCS311 Artificial Intelligence/Decision Tree/decision_tree.py
Lan-Jing/Courses
540db9499b8725ca5b82a2c4e7a3da09f73c0efa
[ "MIT" ]
1
2021-08-03T23:42:06.000Z
2021-08-03T23:42:06.000Z
# main body of the decision tree: # establish the tree, decision making modeDict = { "ID3" : 0, "C4.5" : 1, "CART" : 2 } # definition to nodes on decision trees # entropy function # Gini index # pruning threshold minSize = 150 # check if the end of recursion is reached # returns: end signal, majorLabe...
38.25
146
0.615819
# main body of the decision tree: # establish the tree, decision making import math as mt modeDict = { "ID3" : 0, "C4.5" : 1, "CART" : 2 } # definition to nodes on decision trees class dt_node: def __init__(self): # define the attribute used in this node self.currentAttribute = -1 ...
0
0
0
224
0
8,078
0
-4
225
bfa2dd9111f188a2f2a8a05eb87afe218a24fe68
1,134
py
Python
util/taskservice.py
Tas-Kit/tastore
81524aa143683d2e661dd68b5a341f2a20c519c9
[ "Apache-2.0" ]
null
null
null
util/taskservice.py
Tas-Kit/tastore
81524aa143683d2e661dd68b5a341f2a20c519c9
[ "Apache-2.0" ]
null
null
null
util/taskservice.py
Tas-Kit/tastore
81524aa143683d2e661dd68b5a341f2a20c519c9
[ "Apache-2.0" ]
null
null
null
from settings import TASKSERVICE_HOST, TASKSERVICE_PORT, TASKSERVICE_VERSION base_url = 'http://{0}:{1}/api/{2}/taskservice/'.format(TASKSERVICE_HOST, TASKSERVICE_PORT, TASKSERVICE_VERSION)
26.372093
112
0.643739
import requests from flask import abort from settings import TASKSERVICE_HOST, TASKSERVICE_PORT, TASKSERVICE_VERSION base_url = 'http://{0}:{1}/api/{2}/taskservice/'.format(TASKSERVICE_HOST, TASKSERVICE_PORT, TASKSERVICE_VERSION) def handler(func): def wrapper(*args, **kwargs): resp = func(*args, **kwar...
0
528
0
0
0
254
0
-4
159
ff54023f89e5f4dbd50e752589c000910ac54769
36,603
py
Python
stencilflow/kernel_chain_graph.py
spcl/stencilflow
28bb88e7f4251f29aecc266663bc780023ed2549
[ "BSD-3-Clause" ]
12
2020-06-05T09:27:41.000Z
2021-11-22T04:29:55.000Z
stencilflow/kernel_chain_graph.py
spcl/stencilflow
28bb88e7f4251f29aecc266663bc780023ed2549
[ "BSD-3-Clause" ]
1
2021-09-11T14:42:50.000Z
2021-09-15T12:33:34.000Z
stencilflow/kernel_chain_graph.py
spcl/stencilflow
28bb88e7f4251f29aecc266663bc780023ed2549
[ "BSD-3-Clause" ]
5
2020-09-29T11:35:32.000Z
2021-09-26T03:31:25.000Z
#!/usr/bin/env python3 """ The KernelChainGraph class represents the whole pipelined data flow graph consisting of input nodes (real data input arrays, kernel nodes and output nodes (storing the result of the computation). """ __author__ = "Andreas Kuster (kustera@ethz.ch)" __copyright__ = "BSD 3-Clause License" imp...
44.801714
121
0.507172
#!/usr/bin/env python3 """ The KernelChainGraph class represents the whole pipelined data flow graph consisting of input nodes (real data input arrays, kernel nodes and output nodes (storing the result of the computation). """ __author__ = "Andreas Kuster (kustera@ethz.ch)" __copyright__ = "BSD 3-Clause License" imp...
0
355
0
33,701
0
0
0
63
245
819ea9e5c354704201f9e56d25918ec341c8012a
3,877
py
Python
tests/_test_phc3d.py
benvial/gyptis
3f197fe33d0a0bac72be05a474baff4e450af0ab
[ "MIT" ]
null
null
null
tests/_test_phc3d.py
benvial/gyptis
3f197fe33d0a0bac72be05a474baff4e450af0ab
[ "MIT" ]
null
null
null
tests/_test_phc3d.py
benvial/gyptis
3f197fe33d0a0bac72be05a474baff4e450af0ab
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Benjamin Vial # License: MIT from gyptis import dolfin dolfin.set_log_level(10) dolfin.parameters["form_compiler"]["quadrature_degree"] = 5 dolfin.parameters["ghost_mode"] = "shared_facet" a = 1 v = (a, 0, 0), (0, a, 0), (0, 0, a) # v = (a,0, 0), (0, a,0), (1.2...
24.537975
73
0.585246
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Benjamin Vial # License: MIT import pytest from gyptis import dolfin from gyptis.phc3d import * from gyptis.plot import * dolfin.set_log_level(10) dolfin.parameters["form_compiler"]["quadrature_degree"] = 5 dolfin.parameters["ghost_mode"] = "shared_facet" a = ...
0
0
0
0
0
0
0
1
67
6634a73cfb1dcff8d197c0402a0e1a2b2c3d9e52
902
py
Python
ultros_site/tasks/config.py
tsao-chi/Site
e3fc4574101b8cdacb2a28e54495da5376dd5396
[ "MIT", "Artistic-2.0", "BSD-3-Clause" ]
2
2017-06-25T20:57:40.000Z
2017-11-27T15:13:35.000Z
ultros_site/tasks/config.py
tsao-chi/Site
e3fc4574101b8cdacb2a28e54495da5376dd5396
[ "MIT", "Artistic-2.0", "BSD-3-Clause" ]
5
2017-06-23T12:05:57.000Z
2021-06-30T05:46:44.000Z
ultros_site/tasks/config.py
tsao-chi/Site
e3fc4574101b8cdacb2a28e54495da5376dd5396
[ "MIT", "Artistic-2.0", "BSD-3-Clause" ]
3
2018-01-08T04:57:12.000Z
2020-01-22T08:03:56.000Z
# coding=utf-8 from celery.schedules import crontab __author__ = "Gareth Coles" broker = "amqp://guest:guest@glowstone-rabbitmq:5672/glowstone" backend = "redis://glowstone-site-redis:6379/0" include = [ "ultros_site.tasks.builds", "ultros_site.tasks.common", "ultros_site.tasks.discord", "ultros_sit...
22.55
63
0.615299
# coding=utf-8 from celery.schedules import crontab __author__ = "Gareth Coles" broker = "amqp://guest:guest@glowstone-rabbitmq:5672/glowstone" backend = "redis://glowstone-site-redis:6379/0" include = [ "ultros_site.tasks.builds", "ultros_site.tasks.common", "ultros_site.tasks.discord", "ultros_sit...
0
0
0
0
0
0
0
0
0
f702a1d2e380b80b1174c5cef1e503b3d1000993
13,542
py
Python
etender_service.py
Bodyan37/robot_tests.broker.etender
be35364965d886312e0b6d803f985f2cfc981a94
[ "Apache-2.0" ]
null
null
null
etender_service.py
Bodyan37/robot_tests.broker.etender
be35364965d886312e0b6d803f985f2cfc981a94
[ "Apache-2.0" ]
null
null
null
etender_service.py
Bodyan37/robot_tests.broker.etender
be35364965d886312e0b6d803f985f2cfc981a94
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 - from pytz import timezone import os TZ = timezone(os.environ['TZ'] if 'TZ' in os.environ else 'Europe/Kiev')
35.920424
119
0.645326
# -*- coding: utf-8 - from iso8601 import parse_date from datetime import datetime, date, time, timedelta import dateutil.parser from pytz import timezone import os from decimal import Decimal import re TZ = timezone(os.environ['TZ'] if 'TZ' in os.environ else 'Europe/Kiev') def get_all_etender_dates(initial_tender...
3,811
0
0
0
0
10,409
0
35
1,031
3de78997db21d0c24f3744804d86756832c9c783
810
py
Python
GUI/07 - Scale.py
PedroHAlvesS/Exercicios-Python-Curso-em-video
7ab187d65ddada252450b048608dc4898e5c67c8
[ "MIT" ]
null
null
null
GUI/07 - Scale.py
PedroHAlvesS/Exercicios-Python-Curso-em-video
7ab187d65ddada252450b048608dc4898e5c67c8
[ "MIT" ]
null
null
null
GUI/07 - Scale.py
PedroHAlvesS/Exercicios-Python-Curso-em-video
7ab187d65ddada252450b048608dc4898e5c67c8
[ "MIT" ]
null
null
null
# Escala de temperatura window = Tk() """ hot_imagem=PhotoImage(file="Imagens/hot.png") hot_Label = Label(image=hot_imagem) hot_Label.pack() """ scale = Scale(window, from_=100, to=0, # de 100 pra 0 length=300, #orient=HORIZONTAL, Deixa na horizontal font=...
19.285714
54
0.582716
# Escala de temperatura from tkinter import * def submit(): print(f"Temperatura é {scale.get()}") window = Tk() """ hot_imagem=PhotoImage(file="Imagens/hot.png") hot_Label = Label(image=hot_imagem) hot_Label.pack() """ scale = Scale(window, from_=100, to=0, # de 100 pra 0 length=...
2
0
0
0
0
33
0
0
45
d33d5112406910b2d531a0fd84df2158b8a3ea10
1,552
py
Python
tools/c3s/c3s_retrieve.py
bgruening/galaxy-tools
c4a5672398bc878dd2bc0bf4f3a26f59b3f6395c
[ "MIT" ]
7
2019-04-18T21:19:37.000Z
2022-03-31T17:11:13.000Z
tools/c3s/c3s_retrieve.py
bgruening/galaxy-tools
c4a5672398bc878dd2bc0bf4f3a26f59b3f6395c
[ "MIT" ]
52
2019-03-15T10:39:53.000Z
2022-03-26T09:04:25.000Z
tools/c3s/c3s_retrieve.py
bgruening/galaxy-tools
c4a5672398bc878dd2bc0bf4f3a26f59b3f6395c
[ "MIT" ]
3
2019-04-18T22:02:52.000Z
2022-03-30T17:09:24.000Z
import argparse import ast from os import environ, path import cdsapi parser = argparse.ArgumentParser() parser.add_argument("-i", "--request", type=str, help="input API request") parser.add_argument("-o", "--output", type=str, help="output API request") args = parser.parse_args() if path.isfile(args.request): f...
25.442623
85
0.570232
import argparse import ast from os import environ, path import cdsapi parser = argparse.ArgumentParser() parser.add_argument("-i", "--request", type=str, help="input API request") parser.add_argument("-o", "--output", type=str, help="output API request") args = parser.parse_args() if path.isfile(args.request): f...
0
0
0
0
0
0
0
0
0
2f7747bf534938b6981dbe5c1477fca8faf1dd80
827
py
Python
Q042-v5.py
Linchin/python_leetcode_git
3d08ab04bbdbd2ce268f33c501fbb149662872c7
[ "MIT" ]
null
null
null
Q042-v5.py
Linchin/python_leetcode_git
3d08ab04bbdbd2ce268f33c501fbb149662872c7
[ "MIT" ]
null
null
null
Q042-v5.py
Linchin/python_leetcode_git
3d08ab04bbdbd2ce268f33c501fbb149662872c7
[ "MIT" ]
null
null
null
""" Q042 Trapping Rain Water Hard 09/29/2021 :stack:two pointer:array: DP: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. """ a = [4,2,3] a2 = [0,1,0,2,1,0,1,3,2,1,2,1] a3 = [3,2,1,3] sol = Solution() print(sol...
20.170732
83
0.558646
""" Q042 Trapping Rain Water Hard 09/29/2021 :stack:two pointer:array: DP: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. """ from typing import List class Solution: def trap(self, height: List[int]) -> int...
0
0
0
444
0
0
0
2
46
8a44c013d0f612fd057d367623fc4ae198c9e0ba
8,162
py
Python
utils/evaluator.py
Gaelic-Algorithmic-Research-Group/Gaelic-Text_normaliser
5777fab5aa96968aedb7efdf320b4ca45b63ae4b
[ "Apache-2.0" ]
2
2022-02-14T19:36:14.000Z
2022-02-22T03:48:52.000Z
utils/evaluator.py
Gaelic-Algorithmic-Research-Group/Gaelic-Text_normaliser
5777fab5aa96968aedb7efdf320b4ca45b63ae4b
[ "Apache-2.0" ]
null
null
null
utils/evaluator.py
Gaelic-Algorithmic-Research-Group/Gaelic-Text_normaliser
5777fab5aa96968aedb7efdf320b4ca45b63ae4b
[ "Apache-2.0" ]
null
null
null
import re false_neg = re.compile(r'{\+.+\+}') false_pos = re.compile(r'\[-.+-\]') double_space = re.compile(' ') if __name__ == '__main__': args = get_args() evaluate(args)
27.761905
103
0.572164
import re, subprocess as sub, argparse import sys false_neg = re.compile(r'{\+.+\+}') false_pos = re.compile(r'\[-.+-\]') def get_args(): p = argparse.ArgumentParser() p.add_argument('before', help="Source Document") p.add_argument('gold', help="Manually Annotated Document") p.add_argument('norm', hel...
0
0
0
1,285
0
6,257
0
18
413
d2e142a42618682fc4852ee84d6aa0de53bbe025
80
py
Python
Knight-Rank/DAY-9/182B.py
rohansaini886/Peer-Programming-Hub-CP-Winter_Camp
d27fb6aa7e726e6d2cb95270c9e644d38d64dd1c
[ "MIT" ]
2
2021-12-09T18:07:46.000Z
2022-01-26T16:51:18.000Z
Knight-Rank/DAY-9/182B.py
rohansaini886/Peer-Programming-Hub-CP-Winter_Camp
d27fb6aa7e726e6d2cb95270c9e644d38d64dd1c
[ "MIT" ]
null
null
null
Knight-Rank/DAY-9/182B.py
rohansaini886/Peer-Programming-Hub-CP-Winter_Camp
d27fb6aa7e726e6d2cb95270c9e644d38d64dd1c
[ "MIT" ]
null
null
null
d=int(input()) s=int(input()) print((s-1)*d-sum(map(int,input().split()[:-1])))
20
49
0.575
d=int(input()) s=int(input()) print((s-1)*d-sum(map(int,input().split()[:-1])))
0
0
0
0
0
0
0
0
0
a3e90cbcaf5b666a2b2eda42a60d2cee6a7b85fc
16,418
py
Python
tests/contrib/funsor/test_infer_discrete.py
futurewarning/pyro
005032f10099188fea86f63b6baa46a27867983f
[ "Apache-2.0" ]
null
null
null
tests/contrib/funsor/test_infer_discrete.py
futurewarning/pyro
005032f10099188fea86f63b6baa46a27867983f
[ "Apache-2.0" ]
null
null
null
tests/contrib/funsor/test_infer_discrete.py
futurewarning/pyro
005032f10099188fea86f63b6baa46a27867983f
[ "Apache-2.0" ]
null
null
null
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import logging import os import pytest # put all funsor-related imports here, so test collection works without funsor try: import funsor import pyro.contrib.funsor funsor.set_backend("torch") except ImportError: pytes...
41.14787
109
0.599769
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import logging import os import pyroapi import pytest import torch from pyro.infer.autoguide import AutoNormal from tests.common import assert_equal # put all funsor-related imports here, so test collection works without funsor try:...
0
13,870
0
0
0
1,611
0
62
372
4ef70c6839f1c9e635415e8fda379cd4db34370b
681
py
Python
vespawatch/migrations/0047_managementaction_product.py
JWCook/vespa-watch
7b5fe7dfd3e897d99fd91c479346c89efd890d23
[ "MIT" ]
3
2019-01-17T09:22:13.000Z
2020-06-05T03:46:45.000Z
vespawatch/migrations/0047_managementaction_product.py
JWCook/vespa-watch
7b5fe7dfd3e897d99fd91c479346c89efd890d23
[ "MIT" ]
406
2018-06-13T18:36:53.000Z
2022-03-22T16:41:50.000Z
vespawatch/migrations/0047_managementaction_product.py
JWCook/vespa-watch
7b5fe7dfd3e897d99fd91c479346c89efd890d23
[ "MIT" ]
8
2019-02-12T10:05:08.000Z
2020-10-01T05:39:13.000Z
# Generated by Django 2.2.24 on 2021-08-23 12:49
35.842105
326
0.58884
# Generated by Django 2.2.24 on 2021-08-23 12:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('vespawatch', '0046_populate_action_problems'), ] operations = [ migrations.AddField( model_name='managementaction', ...
0
0
0
566
0
0
0
19
46
104bc194b8eeb93cc149af1a48360cc4fe4db08e
8,230
py
Python
bluebottle/payments_docdata/migrations/0001_initial.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
10
2015-05-28T18:26:40.000Z
2021-09-06T10:07:03.000Z
bluebottle/payments_docdata/migrations/0001_initial.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
762
2015-01-15T10:00:59.000Z
2022-03-31T15:35:14.000Z
bluebottle/payments_docdata/migrations/0001_initial.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
9
2015-02-20T13:19:30.000Z
2022-03-08T14:09:17.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-05-23 13:25 from __future__ import unicode_literals
68.583333
202
0.621993
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-05-23 13:25 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('payments', '0001_initial'), ] o...
0
0
0
8,019
0
0
0
30
68
ed9653823850989ee0c05e00279a6407e1afd989
4,670
py
Python
profiles_api/views.py
pkdhirasaria/profiles-rest-api
47729a3dfa41203001cf2eada519e64611db8101
[ "MIT" ]
null
null
null
profiles_api/views.py
pkdhirasaria/profiles-rest-api
47729a3dfa41203001cf2eada519e64611db8101
[ "MIT" ]
null
null
null
profiles_api/views.py
pkdhirasaria/profiles-rest-api
47729a3dfa41203001cf2eada519e64611db8101
[ "MIT" ]
null
null
null
# class HelloAPIViews(APIView): # """Test APIView""" # # serializer_class = serializers.HelloSerializer # def get(self,request,format=None): # """Returns a list of APIView Features""" # # an_apiview = [ # 'Uses HTTP methods as function (get,post,put,patch,put,delete)', # ...
33.357143
78
0.640257
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework import viewsets from rest_framework.authentication import TokenAuthentication from rest_framework import filters from rest_framework.authtoken.views import ObtainAuthToken from res...
0
0
0
1,056
0
0
0
257
334
ef1870810b1c0aea0018f08f9e6ea60a988caae5
113
py
Python
music/__model/integer/audio/g/shp/gs6.py
jedhsu/music
dea68c4a82296cd4910e786f533b2cbf861377c3
[ "MIT" ]
null
null
null
music/__model/integer/audio/g/shp/gs6.py
jedhsu/music
dea68c4a82296cd4910e786f533b2cbf861377c3
[ "MIT" ]
null
null
null
music/__model/integer/audio/g/shp/gs6.py
jedhsu/music
dea68c4a82296cd4910e786f533b2cbf861377c3
[ "MIT" ]
null
null
null
""" *G - Level 6* """ __all__ = ["Gs6"]
7.0625
27
0.486726
""" *G♯ - Level 6* """ from ..._pitch import Pitch __all__ = ["Gs6"] class Gs6( Pitch, ): pass
3
0
0
12
0
0
0
6
46
a756cceab9622e9b18071bc173e83e024392099f
2,879
py
Python
omega_miya/utils/Omega_plugin_utils/cooldown.py
58563528/omega-miya
9dc822e8f768ac58dccfe7e3e03a29a2cf8766db
[ "MIT" ]
null
null
null
omega_miya/utils/Omega_plugin_utils/cooldown.py
58563528/omega-miya
9dc822e8f768ac58dccfe7e3e03a29a2cf8766db
[ "MIT" ]
null
null
null
omega_miya/utils/Omega_plugin_utils/cooldown.py
58563528/omega-miya
9dc822e8f768ac58dccfe7e3e03a29a2cf8766db
[ "MIT" ]
null
null
null
__all__ = [ 'PluginCoolDown' ]
37.881579
120
0.64189
import datetime from omega_miya.utils.Omega_Base import DBCoolDownEvent, Result from dataclasses import dataclass, field @dataclass class PluginCoolDown: type: str cool_down_time: int global_type: str = field(default='global', init=False) plugin_type: str = field(default='plugin', init=False) grou...
0
2,697
0
0
0
0
0
55
89
117c6053ce3312952ae4263e9f77cc320dcf649b
4,947
py
Python
Task5/main.py
KKowalewski24/TPD
dedd702158b1af11057c58bc4e1f6b97f5e35ab5
[ "MIT" ]
null
null
null
Task5/main.py
KKowalewski24/TPD
dedd702158b1af11057c58bc4e1f6b97f5e35ab5
[ "MIT" ]
null
null
null
Task5/main.py
KKowalewski24/TPD
dedd702158b1af11057c58bc4e1f6b97f5e35ab5
[ "MIT" ]
null
null
null
""" python main.py -e 1000 1 1 10 5 -e 1000 2 1 10 5 -e 1000 4 1 10 5 -e 1000 8 1 10 5 -e 1000 0 0 10 5 python main.py -e 1000 1 1 6 5 -e 1000 2 1 6 5 -e 1000 4 1 6 5 -e 1000 8 1 6 5 -e 1000 0 0 6 5 python main.py -e 1000 1 1 2 5 -e 1000 2 1 2 5 -e 1000 4 1 2 5 -e 1000 8 1 2 5 -e 1000 0 0 2 5 """ # MAIN ------------...
32.98
99
0.5943
import subprocess import sys from argparse import ArgumentParser, Namespace from random import expovariate from typing import Set import matplotlib.pyplot as plt import numpy as np from sklearn.linear_model import SGDRegressor from module.Task import Task """ python main.py -e 1000 1 1 10 5 -e 1000 2 1 10 5 -e 1000 ...
0
0
0
0
0
3,683
0
58
381
ccadf7f8d09ce8ef6980516288c125215877b6db
1,116
py
Python
cw_sum_of_triangular_numbers.py
yiyinghsieh/python-algorithms-data-structures
26879343d3d83ca431946f8a92def2bc8672f807
[ "BSD-2-Clause" ]
null
null
null
cw_sum_of_triangular_numbers.py
yiyinghsieh/python-algorithms-data-structures
26879343d3d83ca431946f8a92def2bc8672f807
[ "BSD-2-Clause" ]
null
null
null
cw_sum_of_triangular_numbers.py
yiyinghsieh/python-algorithms-data-structures
26879343d3d83ca431946f8a92def2bc8672f807
[ "BSD-2-Clause" ]
null
null
null
"""Codewars: Sum of Triangular Numbers 7 kyu URL: https://www.codewars.com/kata/580878d5d27b84b64c000b51/train/python Your task is to return the sum of Triangular Numbers up-to-and-including the nth Triangular Number. Triangular Number: "any of the series of numbers (1, 3, 6, 10, 15, etc.) obtained by continued sum...
22.77551
75
0.655914
"""Codewars: Sum of Triangular Numbers 7 kyu URL: https://www.codewars.com/kata/580878d5d27b84b64c000b51/train/python Your task is to return the sum of Triangular Numbers up-to-and-including the nth Triangular Number. Triangular Number: "any of the series of numbers (1, 3, 6, 10, 15, etc.) obtained by continued sum...
0
0
0
0
0
440
0
0
46
393a45423c7c1a78ee4f1fb7b421b833479ec8a3
12,421
py
Python
train_skeleton.py
QY-H00/hand_pose
1301e7cab3ef7da1998f1c0efd21eceaac0901f8
[ "MIT" ]
null
null
null
train_skeleton.py
QY-H00/hand_pose
1301e7cab3ef7da1998f1c0efd21eceaac0901f8
[ "MIT" ]
null
null
null
train_skeleton.py
QY-H00/hand_pose
1301e7cab3ef7da1998f1c0efd21eceaac0901f8
[ "MIT" ]
null
null
null
import argparse import time import os import os.path as osp os.environ["CUDA_VISIBLE_DEVICES"] = '7' import torch import torch.nn as nn import torch.utils.data import torch.backends.cudnn as cudnn import torch.optim from datetime import datetime from tensorboardX import SummaryWriter from progress.bar import Bar fro...
28.29385
96
0.576604
import argparse import time import os import os.path as osp os.environ["CUDA_VISIBLE_DEVICES"] = '7' import torch import torch.nn as nn import torch.utils.data import torch.backends.cudnn as cudnn import torch.optim from datetime import datetime from tensorboardX import SummaryWriter from progress.bar import Bar fro...
0
0
0
0
0
1,110
0
6
45
5718cdb8509e19de7de93a3549b4358c4b0bc6b7
2,055
py
Python
lessons/02_spacetime/working/traffic.py
PaulM5406/numerical-mooc
8d58349b5bf6f543514d2c17311df2c1282ba297
[ "CC-BY-3.0" ]
null
null
null
lessons/02_spacetime/working/traffic.py
PaulM5406/numerical-mooc
8d58349b5bf6f543514d2c17311df2c1282ba297
[ "CC-BY-3.0" ]
null
null
null
lessons/02_spacetime/working/traffic.py
PaulM5406/numerical-mooc
8d58349b5bf6f543514d2c17311df2c1282ba297
[ "CC-BY-3.0" ]
null
null
null
import numpy import sympy from matplotlib import pyplot from sympy.utilities.lambdify import lambdify # Set the font family and size to use for Matplotlib figures. pyplot.rcParams['font.family'] = 'serif' pyplot.rcParams['font.size'] = 16 sympy.init_printing() # Set parameters. # Vmax = 80 Vmax = 136 nx = 51 # numb...
26.688312
67
0.633577
import numpy import sympy from matplotlib import pyplot from sympy.utilities.lambdify import lambdify # Set the font family and size to use for Matplotlib figures. pyplot.rcParams['font.family'] = 'serif' pyplot.rcParams['font.size'] = 16 sympy.init_printing() # Set parameters. # Vmax = 80 Vmax = 136 nx = 51 # numb...
0
0
0
0
0
24
0
0
23
c723774b9e34620c7464628e41825149a3d9f3c6
1,626
py
Python
nodejsshell.py
fbl4kd43m0n/nodejs-security
ca89888e48f8ceb0308d9d3186fb8d03568a7565
[ "MIT" ]
null
null
null
nodejsshell.py
fbl4kd43m0n/nodejs-security
ca89888e48f8ceb0308d9d3186fb8d03568a7565
[ "MIT" ]
null
null
null
nodejsshell.py
fbl4kd43m0n/nodejs-security
ca89888e48f8ceb0308d9d3186fb8d03568a7565
[ "MIT" ]
null
null
null
#!/usr/bin/python # Generator for encoded NodeJS reverse shells # Based on the NodeJS reverse shell by Evilpacket # https://github.com/evilpacket/node-shells/blob/master/node_revshell.js # Onelineified and suchlike by infodox (and felicity, who sat on the keyboard) # Insecurety Research (2013) - insecurety.net im...
30.679245
135
0.608856
#!/usr/bin/python # Generator for encoded NodeJS reverse shells # Based on the NodeJS reverse shell by Evilpacket # https://github.com/evilpacket/node-shells/blob/master/node_revshell.js # Onelineified and suchlike by infodox (and felicity, who sat on the keyboard) # Insecurety Research (2013) - insecurety.net im...
0
0
0
0
0
0
0
0
0
3a0f7f0971fa83a4e34f0145247fc82fe4efe7d9
1,212
py
Python
gui/helpers/data_provider.py
intdata-bsc/idact-gui
68df38dd231b5bd6ce45fd5e6f6450b9951efc50
[ "MIT" ]
3
2019-06-11T19:15:45.000Z
2020-05-16T17:07:43.000Z
gui/helpers/data_provider.py
intdata-bsc/idact-gui
68df38dd231b5bd6ce45fd5e6f6450b9951efc50
[ "MIT" ]
21
2019-06-24T19:47:41.000Z
2020-02-22T14:39:46.000Z
gui/helpers/data_provider.py
intdata-bsc/idact-gui
68df38dd231b5bd6ce45fd5e6f6450b9951efc50
[ "MIT" ]
1
2019-08-20T20:20:20.000Z
2019-08-20T20:20:20.000Z
""" One of the helpers for the gui application. Similar modules: class:`.NativeArgsSaver`, :class:`.ParameterSaver`, :class:`.UiLoader`, :class:`.Worker`, :class:`.ConfigurationProvider` """
33.666667
87
0.693069
""" One of the helpers for the gui application. Similar modules: class:`.NativeArgsSaver`, :class:`.ParameterSaver`, :class:`.UiLoader`, :class:`.Worker`, :class:`.ConfigurationProvider` """ from PyQt5.QtCore import pyqtSignal, QObject from idact.core.environment import load_environment from idact.detail.envir...
0
0
0
813
0
0
0
109
89
ad6c10ef812322299f8532e252342418d6104542
1,009
py
Python
dataBookViz.py
QuantumXYZ/robot-owl-learns
23447e625cfc3a3254bcefe846a5ebade0ac2316
[ "MIT" ]
null
null
null
dataBookViz.py
QuantumXYZ/robot-owl-learns
23447e625cfc3a3254bcefe846a5ebade0ac2316
[ "MIT" ]
null
null
null
dataBookViz.py
QuantumXYZ/robot-owl-learns
23447e625cfc3a3254bcefe846a5ebade0ac2316
[ "MIT" ]
null
null
null
''' =================================================================================== dataBookViz.py Author: Donnette Bowler copyright: copyright Donnette Bowler 2016. All rights reserved. No part of this document may be reproduced or distributed. ================================================...
24.02381
127
0.500496
''' =================================================================================== dataBookViz.py Author: Donnette Bowler copyright: copyright ©Donnette Bowler 2016. All rights reserved. No part of this document may be reproduced or distributed. ===============================================...
2
0
0
0
0
313
0
-7
111
67735456da08bb163099ebadcc0751b367fd1c39
8,454
py
Python
markups/markdown.py
Hrissimir/pymarkups
4ece8169063f8acfb8557c6a0f4d929af0f434e9
[ "BSD-3-Clause" ]
null
null
null
markups/markdown.py
Hrissimir/pymarkups
4ece8169063f8acfb8557c6a0f4d929af0f434e9
[ "BSD-3-Clause" ]
7
2021-01-23T19:43:50.000Z
2022-01-09T16:31:19.000Z
markups/markdown.py
Deteriorator/pymarkups
61cd722d9b124ea732a43a66ca679b4b15f8c990
[ "BSD-3-Clause" ]
null
null
null
# vim: ts=8:sts=8:sw=8:noexpandtab # This file is part of python-markups module # License: 3-clause BSD, see LICENSE file # Copyright: (C) Dmitry Shachnev, 2012-2021 import re import markups.common as common try: import yaml except ImportError: yaml = None MATHJAX2_CONFIG = \ '''<script type="text/x-mathjax-config...
33.816
101
0.711024
# vim: ts=8:sts=8:sw=8:noexpandtab # This file is part of python-markups module # License: 3-clause BSD, see LICENSE file # Copyright: (C) Dmitry Shachnev, 2012-2021 import importlib import os import re import warnings import markups.common as common from markups.abstract import AbstractMarkup, ConvertedMarkup try: ...
0
241
0
6,489
0
0
0
16
135
fbe5bf60acff900a4dff7845f5fc406f8fe8f88e
4,807
py
Python
motion_primitives_py/motion_primitives_py/examples/generate_lattices_of_decreasing_d.py
ljarin/dispersion_motion_planning
1c16c95b70915e58e407c1a45aa4065877fbb3de
[ "BSD-3-Clause" ]
1
2022-03-04T12:03:26.000Z
2022-03-04T12:03:26.000Z
motion_primitives_py/motion_primitives_py/examples/generate_lattices_of_decreasing_d.py
ljarin/dispersion_motion_planning
1c16c95b70915e58e407c1a45aa4065877fbb3de
[ "BSD-3-Clause" ]
null
null
null
motion_primitives_py/motion_primitives_py/examples/generate_lattices_of_decreasing_d.py
ljarin/dispersion_motion_planning
1c16c95b70915e58e407c1a45aa4065877fbb3de
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python3 import matplotlib import numpy as np from copy import deepcopy import matplotlib.animation as animation import matplotlib.pyplot as plt import argparse import rospkg """ Run the dispersion algorithm, and save the lattices at a specified set of desired dispersions (all starting from the same dense s...
36.142857
205
0.691908
#!/usr/bin/python3 import matplotlib import numpy as np from copy import deepcopy import matplotlib.animation as animation from motion_primitives_py import * import matplotlib.pyplot as plt import argparse import rospkg """ Run the dispersion algorithm, and save the lattices at a specified set of desired dispersions ...
0
0
0
0
0
719
0
13
68
36a9bdef6bd9fed855e8752d62188568aa4269ff
5,886
py
Python
lipsum3/reader.py
reservoirdog/lipsum3
e2bea832025378e5e8d14745c5e3eba3595387f4
[ "MIT" ]
null
null
null
lipsum3/reader.py
reservoirdog/lipsum3
e2bea832025378e5e8d14745c5e3eba3595387f4
[ "MIT" ]
null
null
null
lipsum3/reader.py
reservoirdog/lipsum3
e2bea832025378e5e8d14745c5e3eba3595387f4
[ "MIT" ]
null
null
null
import os
29.727273
112
0.538566
import pkg_resources import os import os.path from io import open from .utils import Utils class Reader: def __init__(self, filename=None, resource=None, encoding="UTF-8"): """ :param filename: If desired, a source text file can be used to generate words. :type filename: str :par...
0
0
0
5,770
0
0
0
-7
112
3e8e0e90cf6ec246b49003496cb0f557d0565c6e
62
py
Python
src/utils/__init__.py
vollov/flask-angularjs
d9fc044e71d7459885af0bda984b59a6406b055d
[ "MIT" ]
null
null
null
src/utils/__init__.py
vollov/flask-angularjs
d9fc044e71d7459885af0bda984b59a6406b055d
[ "MIT" ]
null
null
null
src/utils/__init__.py
vollov/flask-angularjs
d9fc044e71d7459885af0bda984b59a6406b055d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # utility package for logging, config
20.666667
37
0.645161
# -*- coding: utf-8 -*- # utility package for logging, config
0
0
0
0
0
0
0
0
0
df0dc113550cb72e1f50be20c2c0d6f9c21ce5d5
513
py
Python
Python/Basico/desafio-2.py
Srwell/Repositorio_GIT
0093dd86d49cf69635ac4162462cc7ccd48172f8
[ "MIT" ]
1
2021-04-09T15:13:28.000Z
2021-04-09T15:13:28.000Z
Python/Basico/desafio-2.py
Srwell/Repositorio_GIT
0093dd86d49cf69635ac4162462cc7ccd48172f8
[ "MIT" ]
null
null
null
Python/Basico/desafio-2.py
Srwell/Repositorio_GIT
0093dd86d49cf69635ac4162462cc7ccd48172f8
[ "MIT" ]
2
2021-04-09T15:13:31.000Z
2021-05-24T18:43:58.000Z
""" Faa um programa que ao inserir um nmero, mostre na tela a quantidade de numeros primos possiveis at chegar no mesmo. """ print('Quantidade de numeros primos possiveis') y = int(input('Digite o numero final: ')) cont2 = 0 for a in range(1, y+1): cont = 0 for x in range(1, a+1): resto = a % x ...
28.5
120
0.596491
""" Faça um programa que ao inserir um número, mostre na tela a quantidade de numeros primos possiveis até chegar no mesmo. """ print('Quantidade de numeros primos possiveis') y = int(input('Digite o numero final: ')) cont2 = 0 for a in range(1, y+1): cont = 0 for x in range(1, a+1): resto = a % x ...
8
0
0
0
0
0
0
0
0
7e35cc9ec61b784532984fa0eb016c9bd6445590
25,564
py
Python
year_2017/day_04.py
Alex-Diez/python-advent-of-code
d53f13a1b960559da64a2e87746000c78775d584
[ "MIT" ]
null
null
null
year_2017/day_04.py
Alex-Diez/python-advent-of-code
d53f13a1b960559da64a2e87746000c78775d584
[ "MIT" ]
null
null
null
year_2017/day_04.py
Alex-Diez/python-advent-of-code
d53f13a1b960559da64a2e87746000c78775d584
[ "MIT" ]
null
null
null
task_input = """kvvfl kvvfl olud wjqsqa olud frc slhm rdfm yxb rsobyt rdfm pib wzfr xyoakcu zoapeze rtdxt rikc jyeps wdyo hawr xyoakcu hawr ismtq qwoi kzt ktgzoc gnxblp dzfayil ftfx asscba ionxi dzfayil qwoi dzuhys kfekxe nvdhdtj hzusdy xzhehgc dhtvdnj oxwlvef gxg qahl aaipx tkmckn hcsuhy jsudcmy kcefhpn kiasaj ...
44
90
0.820998
import unittest def contains_duplicates(phrases): phrases_list = phrases.split(' ') phrases_set = set() for phrase in phrases_list: if phrase in phrases_set: return True else: phrases_set.add(phrase) return len(phrases_set) == 1 def has_anagrams(phrases): ...
0
0
0
1,221
0
850
0
-6
137
bd7d52f264c3a8d65f60f668df98b02f77b5bf6a
1,625
py
Python
sourcetracker/tests/test_util.py
kant/sourcetracker2
05da62a1d617702ff67949ffec3c1f14ef360854
[ "BSD-3-Clause" ]
40
2016-03-23T21:18:39.000Z
2022-02-17T09:16:00.000Z
sourcetracker/tests/test_util.py
kant/sourcetracker2
05da62a1d617702ff67949ffec3c1f14ef360854
[ "BSD-3-Clause" ]
126
2016-03-22T21:17:43.000Z
2022-02-17T09:51:37.000Z
sourcetracker/tests/test_util.py
kant/sourcetracker2
05da62a1d617702ff67949ffec3c1f14ef360854
[ "BSD-3-Clause" ]
38
2016-03-22T00:10:31.000Z
2022-03-24T08:36:09.000Z
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright (c) 2016--, Biota Technology. # www.biota.com # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ---------------------...
31.25
79
0.556923
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright (c) 2016--, Biota Technology. # www.biota.com # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ---------------------...
0
0
0
953
0
0
0
46
183
a7c99cf73cadf7577f632f8220c7e64fa0698fed
1,866
py
Python
main.py
aftersomemath/l2race
d8ea8e7cef98020ad7e8d9cc37b504558d2c2d8f
[ "MIT" ]
null
null
null
main.py
aftersomemath/l2race
d8ea8e7cef98020ad7e8d9cc37b504558d2c2d8f
[ "MIT" ]
null
null
null
main.py
aftersomemath/l2race
d8ea8e7cef98020ad7e8d9cc37b504558d2c2d8f
[ "MIT" ]
null
null
null
import sys sys.path.insert(0, './commonroad-vehicle-models/PYTHON/') from src.client import define_game from src.l2race_utils import my_logger logger=my_logger(__name__) # main class for clients that run a car on the l2race track. if __name__ == '__main__': ''' Here is place for your code to specify wha...
31.1
101
0.648982
import sys sys.path.insert(0, './commonroad-vehicle-models/PYTHON/') import importlib from src.globals import AUTODRIVE_MODULE, AUTODRIVE_CLASS, CAR_MODEL_MODULE, CAR_MODEL_CLASS from src.client import define_game from src.l2race_utils import my_logger logger=my_logger(__name__) # main class for clients that run a c...
0
0
0
0
0
0
0
66
45
45e97ebe9039dd875b58f698a1dacad4ab00a9fe
451
py
Python
Module-03-Getting-Deeper-02/Example03_Multiple_Inheritance/example01_a_skeleton.py
CodingGearsCourses/Python-OO-Programming-Fundamentals
5516c935aefae98dcd20a77ea98b41865d44675c
[ "MIT" ]
1
2021-07-20T16:42:59.000Z
2021-07-20T16:42:59.000Z
Module-03-Getting-Deeper-02/Example03_Multiple_Inheritance/example01_a_skeleton.py
CodingGearsCourses/Python-OO-Programming-Fundamentals
5516c935aefae98dcd20a77ea98b41865d44675c
[ "MIT" ]
null
null
null
Module-03-Getting-Deeper-02/Example03_Multiple_Inheritance/example01_a_skeleton.py
CodingGearsCourses/Python-OO-Programming-Fundamentals
5516c935aefae98dcd20a77ea98b41865d44675c
[ "MIT" ]
1
2021-06-19T13:30:47.000Z
2021-06-19T13:30:47.000Z
# https://www.globaletraining.com/ # Simple Inheritance if __name__ == '__main__': main()
16.703704
53
0.654102
# https://www.globaletraining.com/ # Simple Inheritance class ParentClass1: pass class ChildClass1(ParentClass1): pass def main(): obj1 = ChildClass1() print(isinstance(obj1, ChildClass1)) print(isinstance(obj1, ParentClass1)) # Method Resolution Order (MRO) print("Method Resolution O...
0
0
0
27
0
256
0
0
69
b813c742e40d555bbd143eecbc5c7085fdb549d6
1,300
py
Python
scripts/test_paraview_plot2.py
gianthk/recon_utils
626c0125bc81d6096bba4fef643e32ed07c68607
[ "MIT" ]
null
null
null
scripts/test_paraview_plot2.py
gianthk/recon_utils
626c0125bc81d6096bba4fef643e32ed07c68607
[ "MIT" ]
null
null
null
scripts/test_paraview_plot2.py
gianthk/recon_utils
626c0125bc81d6096bba4fef643e32ed07c68607
[ "MIT" ]
null
null
null
#!/usr/bin/pvpython #read a vtp data = LegacyVTKReader(FileNames="/home/gianthk/PycharmProjects/CT2FE/test_data/steel_foam/B_matrix_tetraFE_Nlgeom.10.vtk") # Show(data) slice = Slice(Input=data) slice.SliceType = 'Plane' slice.SliceOffsetValues = [0.0] slice.SliceType.Origin = [2., 2., 1.4] slice.SliceType.Normal ...
20.967742
123
0.693846
#!/usr/bin/pvpython from paraview.simple import * import time #read a vtp data = LegacyVTKReader(FileNames="/home/gianthk/PycharmProjects/CT2FE/test_data/steel_foam/B_matrix_tetraFE_Nlgeom.10.vtk") # Show(data) slice = Slice(Input=data) slice.SliceType = 'Plane' slice.SliceOffsetValues = [0.0] slice.SliceType.Origi...
0
0
0
0
0
0
0
-2
44
716a22c4dc82945e1f8044d170938dc58fac9a27
779
py
Python
fastapi_auth/fastapi_util/setup/initialize.py
dmontagu/fastapi-auth
d0e86774f66bd43e80376de19bdf034eb228dc07
[ "MIT" ]
87
2019-12-18T05:43:25.000Z
2022-03-30T20:04:11.000Z
fastapi_auth/fastapi_util/setup/initialize.py
dmontagu/fastapi-auth
d0e86774f66bd43e80376de19bdf034eb228dc07
[ "MIT" ]
2
2020-08-07T05:17:18.000Z
2021-09-14T03:20:04.000Z
fastapi_auth/fastapi_util/setup/initialize.py
dmontagu/fastapi-auth
d0e86774f66bd43e80376de19bdf034eb228dc07
[ "MIT" ]
7
2020-03-08T17:14:33.000Z
2022-01-01T21:38:47.000Z
import sqlalchemy as sa from fastapi import FastAPI from fastapi_auth.fastapi_util.orm.base import Base from fastapi_auth.fastapi_util.setup.setup_database import setup_database, setup_database_metadata from fastapi_auth.fastapi_util.util.session import get_engine def get_configured_metadata(_app: FastAPI) -> sa.Me...
32.458333
104
0.784339
import sqlalchemy as sa from fastapi import FastAPI from fastapi_auth.fastapi_util.orm.base import Base from fastapi_auth.fastapi_util.setup.setup_database import setup_database, setup_database_metadata from fastapi_auth.fastapi_util.util.session import get_engine def initialize_database(engine: sa.engine.Engine) ->...
0
0
0
0
0
64
0
0
23
b7188666d001ffd1bd939bd2b985be150317eb6e
28,909
py
Python
Library/firebase_admin/auth.py
TrojanCrypto/Dashboard
3af795980c7aa90505afae684297e43366cb6ee5
[ "MIT" ]
null
null
null
Library/firebase_admin/auth.py
TrojanCrypto/Dashboard
3af795980c7aa90505afae684297e43366cb6ee5
[ "MIT" ]
null
null
null
Library/firebase_admin/auth.py
TrojanCrypto/Dashboard
3af795980c7aa90505afae684297e43366cb6ee5
[ "MIT" ]
null
null
null
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36.001245
99
0.641945
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
0
5,442
0
11,901
0
212
0
0
368
0cc87516fc824f6e651f2ec5849cf2e484e6cf5b
635
py
Python
14/part_02.py
euribates/advent_of_code_2018
133fac9b01cf46edf9ec8c6ad9cef785d6858c70
[ "MIT" ]
null
null
null
14/part_02.py
euribates/advent_of_code_2018
133fac9b01cf46edf9ec8c6ad9cef785d6858c70
[ "MIT" ]
null
null
null
14/part_02.py
euribates/advent_of_code_2018
133fac9b01cf46edf9ec8c6ad9cef785d6858c70
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 assert find_seq('51589') == 9 assert find_seq('92510') == 18 assert find_seq('59414') == 2018 assert find_seq('01245') == 5 solution = find_seq('681901') print('Solution of part 2 is {}'.format(solution))
24.423077
54
0.640945
#!/usr/bin/env python3 from tools import Recipes from tools import is_sublist def find_seq(sample): target = [int(c) for c in sample] r = Recipes() index = is_sublist(target, list(r.last_items)) while index is -1: r.next() index = is_sublist(target, list(r.last_items)) # print('r',...
0
0
0
0
0
325
0
11
68
53c975a8b948c26b9c9b981dde81f61f13558150
2,219
py
Python
shop/templatetags/shop_search_tags.py
triggerfast/django-shop
57f97291dbb389d833fc3e99da54cb888d3b006e
[ "BSD-3-Clause" ]
1
2020-04-20T05:24:24.000Z
2020-04-20T05:24:24.000Z
shop/templatetags/shop_search_tags.py
triggerfast/django-shop
57f97291dbb389d833fc3e99da54cb888d3b006e
[ "BSD-3-Clause" ]
null
null
null
shop/templatetags/shop_search_tags.py
triggerfast/django-shop
57f97291dbb389d833fc3e99da54cb888d3b006e
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import template register = template.Library() register.tag('render_placeholder', RenderPlaceholder)
35.222222
96
0.684993
# -*- coding: utf-8 -*- from __future__ import unicode_literals from cms.plugin_rendering import ContentRenderer from cms.models.placeholdermodel import Placeholder from cms.templatetags.cms_tags import RenderPlaceholder as DefaultRenderPlaceholder from django import template from django.contrib.auth.models import Ano...
0
0
0
1,580
0
0
0
236
223
7a3b9ee92d719e91a34e1d996cd11b371230d60c
7,013
py
Python
pyannote/audio/utils/preview.py
hadware/pyannote-audio
dff09d364a019dff78cafb5d52c8490ab3d937df
[ "MIT" ]
1
2022-02-23T08:46:10.000Z
2022-02-23T08:46:10.000Z
pyannote/audio/utils/preview.py
hadware/pyannote-audio
dff09d364a019dff78cafb5d52c8490ab3d937df
[ "MIT" ]
null
null
null
pyannote/audio/utils/preview.py
hadware/pyannote-audio
dff09d364a019dff78cafb5d52c8490ab3d937df
[ "MIT" ]
null
null
null
try: from IPython.display import Audio as IPythonAudio from IPython.display import Video as IPythonVideo IPYTHON_INSTALLED = True except ImportError: IPYTHON_INSTALLED = False import tempfile import warnings from pathlib import Path import matplotlib.pyplot as plt import numpy as np try: from mo...
30.491304
102
0.651219
try: from IPython.display import Audio as IPythonAudio from IPython.display import Video as IPythonVideo IPYTHON_INSTALLED = True except ImportError: IPYTHON_INSTALLED = False import tempfile import warnings from pathlib import Path import matplotlib.pyplot as plt import numpy as np try: from mo...
0
0
0
0
0
1,575
0
83
80
bb2bc226b2c9bcee8befc379c27954d4b25f9c89
5,428
py
Python
src/reactive/storage.py
erik78se/layer-nextcloud
d2d72d7b1694b0a3ab7c19c3f68046d444164c4b
[ "Apache-2.0" ]
2
2020-06-02T23:32:54.000Z
2020-07-12T01:05:55.000Z
src/reactive/storage.py
erik78se/layer-nextcloud
d2d72d7b1694b0a3ab7c19c3f68046d444164c4b
[ "Apache-2.0" ]
8
2019-09-28T15:05:24.000Z
2020-04-15T11:07:40.000Z
src/reactive/storage.py
erik78se/layer-nextcloud
d2d72d7b1694b0a3ab7c19c3f68046d444164c4b
[ "Apache-2.0" ]
2
2020-08-01T12:28:37.000Z
2020-10-20T19:43:52.000Z
data_mount_key = "nextcloud.storage.data.mount"
31.017143
108
0.688651
import os import shutil import subprocess import time from charms.reactive import ( when_all, when, when_not, set_flag, set_state, when_none, when_any, hook, clear_flag ) from charms import reactive, apt from charmhelpers.core import ( hookenv, host, unitdata ) from charmhelpers.core.hoo...
0
4,542
0
0
0
299
0
244
291
1df677ff792ab6145e72f5fdb291f70e5b514356
1,010
py
Python
external/netdef_models/netdef_slim/evolutions/main.py
zhuhu00/MOTSFusion_modify
190224a7c3fbded69fedf9645a0ebbf08227fb6d
[ "MIT" ]
null
null
null
external/netdef_models/netdef_slim/evolutions/main.py
zhuhu00/MOTSFusion_modify
190224a7c3fbded69fedf9645a0ebbf08227fb6d
[ "MIT" ]
null
null
null
external/netdef_models/netdef_slim/evolutions/main.py
zhuhu00/MOTSFusion_modify
190224a7c3fbded69fedf9645a0ebbf08227fb6d
[ "MIT" ]
null
null
null
import netdef_slim as nd from netdef_slim.core.register import register_function nd.evo = None _evolution_manager = nd.EvolutionManager() nd.evo_manager = _evolution_manager register_function('add_evo', _evolution_manager.add_evolution) register_function('evo_names', _evolution_manager.evolution_names) register_func...
24.047619
69
0.733663
import netdef_slim as nd from netdef_slim.core.register import register_function nd.evo = None _evolution_manager = nd.EvolutionManager() nd.evo_manager = _evolution_manager register_function('add_evo', _evolution_manager.add_evolution) register_function('evo_names', _evolution_manager.evolution_names) register_func...
0
0
0
0
0
425
0
0
46
e3f7fd13b418db5a131195f18fa6ac48ec314513
821
py
Python
test/test_similarity_weighted_averaging.py
iskandr/matrix-completion
36374f84b14a0e870049815bd0b2bc4792d697a1
[ "Apache-2.0" ]
840
2016-01-06T09:30:45.000Z
2022-03-24T19:57:03.000Z
test/test_similarity_weighted_averaging.py
iskandr/matrix-completion
36374f84b14a0e870049815bd0b2bc4792d697a1
[ "Apache-2.0" ]
103
2015-11-13T21:29:58.000Z
2021-10-21T16:59:42.000Z
test/test_similarity_weighted_averaging.py
iskandr/matrix-completion
36374f84b14a0e870049815bd0b2bc4792d697a1
[ "Apache-2.0" ]
143
2015-11-13T21:28:42.000Z
2022-02-28T05:43:38.000Z
if __name__ == "__main__": test_similarity_weighted_column_averaging()
27.366667
74
0.651644
import numpy as np from nose.tools import eq_ from fancyimpute import SimilarityWeightedAveraging def test_similarity_weighted_column_averaging(): X = np.array([ [0.1, 0.9, 0.2], [0.8, 0.1, 0.01], [0.95, 0.2, 0.3], [0.14, 0.85, 0.3], ]) X_incomplete = X.copy() X_incomp...
0
0
0
0
0
622
0
32
90
42d8b061caf87009d65213c23a01d76a61cf0c88
5,135
py
Python
maze_traversal/csbw2.py
CoinQuest-Alpha/CoinQuest
d10e8decc502fb86664dbeba3810206dcc0141b6
[ "MIT" ]
null
null
null
maze_traversal/csbw2.py
CoinQuest-Alpha/CoinQuest
d10e8decc502fb86664dbeba3810206dcc0141b6
[ "MIT" ]
3
2021-03-10T09:22:41.000Z
2022-02-27T00:24:26.000Z
maze_traversal/csbw2.py
CoinQuest-Alpha/CoinQuest
d10e8decc502fb86664dbeba3810206dcc0141b6
[ "MIT" ]
null
null
null
import time import requests from collections import defaultdict s = Stack() visited = set() reverse = {'n': 's', 's': 'n', 'e': 'w', 'w': 'e'} graph = defaultdict(dict) next_move = '' last_room = '' mining_room = 259 keep_moving = True at_well = False room_information = requests.get(url='https://lambda-treasure-hu...
43.516949
162
0.570399
import time import json import requests from collections import defaultdict import hashlib class Stack(): def __init__(self): self.stack = [] def push(self, value): self.stack.append(value) def pop(self): if self.size() > 0: return self.stack.pop() else: ...
0
0
0
327
0
164
0
-17
90
7fd1770f681116b82d02272c9435a175e96ffa89
617
py
Python
web_flask/8-cities_by_states.py
ToqYang/AirBnB_clone_v4
b6e76166e779363e8906d1bd2a232e6eed96fde7
[ "MIT" ]
null
null
null
web_flask/8-cities_by_states.py
ToqYang/AirBnB_clone_v4
b6e76166e779363e8906d1bd2a232e6eed96fde7
[ "MIT" ]
null
null
null
web_flask/8-cities_by_states.py
ToqYang/AirBnB_clone_v4
b6e76166e779363e8906d1bd2a232e6eed96fde7
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """ Sript that starts a Flask web application """ from flask import Flask app = Flask(__name__) if __name__ == '__main__': app.run(host='0.0.0.0', port=5000)
20.566667
68
0.682334
#!/usr/bin/python3 """ Sript that starts a Flask web application """ from flask import Flask, render_template from models import storage import os app = Flask(__name__) @app.teardown_appcontext def handle_teardown(self): """ method to handle teardown """ storage.close() @app.route('/cities_b...
0
328
0
0
0
0
0
10
90
67e9d53639a3e6fbfda31cbc084474bba6d24624
650
py
Python
aoc_solver/terminal/registry.py
tcollier/aoc_solver
de63dbebd323d8a46deeab1f7fc45d20f70cfdae
[ "MIT" ]
2
2021-12-14T18:13:16.000Z
2021-12-14T18:42:45.000Z
aoc_solver/terminal/registry.py
tcollier/aoc_solver
de63dbebd323d8a46deeab1f7fc45d20f70cfdae
[ "MIT" ]
null
null
null
aoc_solver/terminal/registry.py
tcollier/aoc_solver
de63dbebd323d8a46deeab1f7fc45d20f70cfdae
[ "MIT" ]
null
null
null
from typing import Any, Callable, Dict from aoc_solver.types import StringableIterator HandlerFunc = Callable[[Any, Dict], StringableIterator]
21.666667
55
0.686154
from typing import Any, Callable, Dict, Iterator from aoc_solver.types import StringableIterator HandlerFunc = Callable[[Any, Dict], StringableIterator] class HandlerRegistry: _handlers = {} @classmethod def register(cls, event: str, func: HandlerFunc): cls._handlers[event] = func @classme...
0
212
0
101
0
134
0
10
46
cb404fbd695f1909ad88b932885e05bd8ddb1693
186,173
py
Python
faker/providers/horse/data.py
HorseTechInnovation/faker
7bc5385b45dc1c94b29ef520ae939f3196cc4769
[ "MIT" ]
null
null
null
faker/providers/horse/data.py
HorseTechInnovation/faker
7bc5385b45dc1c94b29ef520ae939f3196cc4769
[ "MIT" ]
null
null
null
faker/providers/horse/data.py
HorseTechInnovation/faker
7bc5385b45dc1c94b29ef520ae939f3196cc4769
[ "MIT" ]
null
null
null
HORSE_HANDLES = [ "Ace", "Adagio", "Adios", "Admiral", "Akela", "Alamo", "Albert", "Alfie", "Allegro", "Alto", "Amethyst", "Amigo", "Amulet", "Angel", "Angelo", "Apache", "Apollo", "Apple", "Archie", "Archimedes", "Arion", "Arizona", "Armand", "Arod", "Artax", "Ash", "Atlanta", "Austin", "Badger", "Bagel", "Baloo", "Ba...
29.692663
235
0.679459
HORSE_HANDLES = [ "Ace", "Adagio", "Adios", "Admiral", "Akela", "Alamo", "Albert", "Alfie", "Allegro", "Alto", "Amethyst", "Amigo", "Amulet", "Angel", "Angelo", "Apache", "Apollo", "Apple", "Archie", "Archimedes", "Arion", "Arizona", "Armand", "Arod", "Artax", "Ash", "Atlanta", "Austin", "Badger", "Bagel", "Baloo", "Ba...
108
0
0
0
0
0
0
0
0
b0a98019333d6becc749d90492c0d75fa7f1ea23
1,259
py
Python
PYSTUDY/middleware/redislib.py
shi-cong/review
c8da7128ea18ecaa5849f2066d321e70d6f97f70
[ "Apache-2.0" ]
8
2017-10-22T00:24:42.000Z
2017-11-24T01:23:52.000Z
PYSTUDY/middleware/redislib.py
shi-cong/review
c8da7128ea18ecaa5849f2066d321e70d6f97f70
[ "Apache-2.0" ]
2
2017-10-12T22:04:25.000Z
2017-10-12T23:43:48.000Z
PYSTUDY/middleware/redislib.py
shi-cong/review
c8da7128ea18ecaa5849f2066d321e70d6f97f70
[ "Apache-2.0" ]
null
null
null
""" redis """
26.229167
69
0.576648
""" redis模块封装 """ import redis class RedisPool(object): """redis连接池封装""" def __init__(self, host, port): """创建连接""" pool = redis.ConnectionPool(host=host, port=port) self.client = redis.Redis(connection_pool=pool) def set(self, name, value, ex=None, px=None, nx=False, xx=False): ...
531
0
0
1,031
0
0
0
-9
45
ae433a2534cf47f9bca68cdb8fe2939f00041290
2,446
py
Python
zero/core/controllers/display.py
jsa4000/OpenGL-Python
62055ba0c16f54507b7ba709d6691b2e9c7bc152
[ "Apache-2.0" ]
null
null
null
zero/core/controllers/display.py
jsa4000/OpenGL-Python
62055ba0c16f54507b7ba709d6691b2e9c7bc152
[ "Apache-2.0" ]
null
null
null
zero/core/controllers/display.py
jsa4000/OpenGL-Python
62055ba0c16f54507b7ba709d6691b2e9c7bc152
[ "Apache-2.0" ]
1
2021-10-08T06:12:11.000Z
2021-10-08T06:12:11.000Z
__all__ = ['DisplayController', 'Display']
25.216495
68
0.560098
from collections import OrderedDict as dict from ..base.utils import * from ..base import Defaults, DBase from .constants import * __all__ = ['DisplayController', 'Display'] class DisplayController(list): """ Display Controller Class This class will store all the displays created. Also it will ...
0
0
0
2,201
0
0
0
43
146
137010ea6897b3e483229b19dd27bbebd2376903
3,563
py
Python
workbench/workers/mem_meta.py
Ayub-Khan/workbench
710232756dd717f734253315e3d0b33c9628dafb
[ "MIT" ]
61
2015-01-04T01:23:49.000Z
2021-06-22T14:41:10.000Z
workbench/workers/mem_meta.py
Ayub-Khan/workbench
710232756dd717f734253315e3d0b33c9628dafb
[ "MIT" ]
3
2015-01-02T23:26:59.000Z
2015-01-03T19:28:36.000Z
workbench/workers/mem_meta.py
Ayub-Khan/workbench
710232756dd717f734253315e3d0b33c9628dafb
[ "MIT" ]
17
2015-08-25T23:57:22.000Z
2020-05-30T02:36:05.000Z
''' Memory Image Meta worker. This worker utilizes the Rekall Memory Forensic Framework. See Google Github: http://github.com/google/rekall All credit for good stuff goes to them, all credit for bad stuff goes to us. :) Note: In general this code is crazy, because Rekall has it's own type system ...
36.731959
125
0.624474
''' Memory Image Meta worker. This worker utilizes the Rekall Memory Forensic Framework. See Google Github: http://github.com/google/rekall All credit for good stuff goes to them, all credit for bad stuff goes to us. :) Note: In general this code is crazy, because Rekall has it's own type system ...
0
1,329
0
1,498
0
0
0
-4
177
c7eb054826386692381259ba1f3463885daa0e96
5,557
py
Python
labels/cifar10_glove_generation.py
kingabzpro/label_representations
bfd11c5769c9253cb761889347a51a08d0a2e2ad
[ "MIT" ]
18
2021-05-05T04:53:02.000Z
2022-03-09T21:44:37.000Z
labels/cifar10_glove_generation.py
kingabzpro/label_representations
bfd11c5769c9253cb761889347a51a08d0a2e2ad
[ "MIT" ]
null
null
null
labels/cifar10_glove_generation.py
kingabzpro/label_representations
bfd11c5769c9253cb761889347a51a08d0a2e2ad
[ "MIT" ]
7
2021-06-10T18:56:17.000Z
2022-03-24T16:39:16.000Z
import numpy as np from skimage.measure import shannon_entropy cifar10_names = [ "airplane", "automobile", "bird", "cat", "deer", "dog", "frog", "horse", "ship", "truck", ] cifar10_labels = [] cifar10_labels.append([1.2977, -0.29922, 0.66154, -0.20133, -0.02502, 0.28644,...
129.232558
498
0.639734
import numpy as np from skimage.measure import shannon_entropy cifar10_names = [ "airplane", "automobile", "bird", "cat", "deer", "dog", "frog", "horse", "ship", "truck", ] cifar10_labels = [] cifar10_labels.append([1.2977, -0.29922, 0.66154, -0.20133, -0.02502, 0.28644,...
0
0
0
0
0
0
0
0
0
f6b2dfc976600d72d036bc71e6116424d06bfaa4
6,026
py
Python
ewb_api_integration/ewb_api_integration/gsp/adaequare.py
Latteys/ewb_api_integration
14a2cb5e3320ebe8487c2f7db63152679dd63f28
[ "MIT" ]
4
2021-02-11T08:31:46.000Z
2022-02-05T00:37:28.000Z
ewb_api_integration/ewb_api_integration/gsp/adaequare.py
Latteys/ewb_api_integration
14a2cb5e3320ebe8487c2f7db63152679dd63f28
[ "MIT" ]
2
2020-10-16T03:45:18.000Z
2021-06-13T08:27:28.000Z
ewb_api_integration/ewb_api_integration/gsp/adaequare.py
mohsinalimat/ewb_api_integration
14a2cb5e3320ebe8487c2f7db63152679dd63f28
[ "MIT" ]
6
2021-02-11T08:31:46.000Z
2022-02-16T03:43:29.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020, Aerele Technologies Private Limited and contributors # For license information, please see license.txt from __future__ import unicode_literals url_dict = {'base_url': 'https://gsp.adaequare.com', 'authenticate_url': '/gsp/authenticate?grant_type=token', 'staging_gen...
39.12987
152
0.7461
# -*- coding: utf-8 -*- # Copyright (c) 2020, Aerele Technologies Private Limited and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from erpnext.regional.india.utils import generate_ewb_json from requests ...
0
0
0
0
0
4,642
0
166
336
8a3556c0df220b0e2e2fb6fa287bf309dc1b1081
2,761
py
Python
Symmetric_Key_Cryptography/caesar_cipher.py
datta-agni/Basic-Cryptography
c4b1b9b4470a6a1debf0df6815a6458fe931ed16
[ "MIT" ]
null
null
null
Symmetric_Key_Cryptography/caesar_cipher.py
datta-agni/Basic-Cryptography
c4b1b9b4470a6a1debf0df6815a6458fe931ed16
[ "MIT" ]
null
null
null
Symmetric_Key_Cryptography/caesar_cipher.py
datta-agni/Basic-Cryptography
c4b1b9b4470a6a1debf0df6815a6458fe931ed16
[ "MIT" ]
1
2021-06-16T20:00:48.000Z
2021-06-16T20:00:48.000Z
if __name__ == "__main__": main()
31.375
78
0.593263
from string import ascii_letters from typing import Dict, Optional def encrypt(input_string: str, key: int, alphabet: Optional[str] = None) -> str: # Set default alphabet to lower and upper case english chars alpha = alphabet or ascii_letters # The final result string result =...
0
0
0
0
0
2,558
0
23
136
0af250514d4002a492abcc3cef90bb884de11244
9,123
py
Python
programs/curie.py
yamamon75/PmagPy
fa5b189800a239683fc17c6b312cdfdd839a46c3
[ "BSD-3-Clause" ]
2
2020-07-05T01:11:33.000Z
2020-07-05T01:11:39.000Z
programs/curie.py
yamamon75/PmagPy
fa5b189800a239683fc17c6b312cdfdd839a46c3
[ "BSD-3-Clause" ]
null
null
null
programs/curie.py
yamamon75/PmagPy
fa5b189800a239683fc17c6b312cdfdd839a46c3
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python from __future__ import division from __future__ import print_function from builtins import input from builtins import str from builtins import range from past.utils import old_div import sys import numpy import matplotlib if matplotlib.get_backend() != "TKAgg": matplotlib.use("TKAgg") import pma...
31.787456
135
0.60046
#!/usr/bin/env python from __future__ import division from __future__ import print_function from builtins import input from builtins import str from builtins import range from past.utils import old_div import sys import numpy import matplotlib if matplotlib.get_backend() != "TKAgg": matplotlib.use("TKAgg") from pyla...
0
0
0
0
0
0
0
-2
23
67d32a4ecc5256de815f76e57f3752d686680eea
6,367
py
Python
ltr/train_settings/SBDT/default-res18.py
CASIA-IVA-Lab/DCFST
ca881ba3aae1ce00e4a7a6db01d99e5f6efff68b
[ "Apache-2.0" ]
22
2020-07-22T13:58:36.000Z
2021-12-01T01:48:44.000Z
ltr/train_settings/SBDT/default-res18.py
CASIA-IVA-Lab/DCFST
ca881ba3aae1ce00e4a7a6db01d99e5f6efff68b
[ "Apache-2.0" ]
3
2020-08-03T02:23:47.000Z
2021-04-09T01:21:58.000Z
ltr/train_settings/SBDT/default-res18.py
CASIA-IVA-Lab/DCFST
ca881ba3aae1ce00e4a7a6db01d99e5f6efff68b
[ "Apache-2.0" ]
4
2020-09-26T00:01:51.000Z
2021-08-05T09:58:30.000Z
import torch.nn as nn import torch.optim as optim
60.066038
156
0.614889
import torch.nn as nn import torch.optim as optim import torchvision.transforms from ltr import actors from ltr.trainers import LTRTrainer from ltr.dataset import Lasot, TrackingNet, Got10k from ltr.data import processing, sampler, LTRLoader import ltr.data.transforms as dltransforms import ltr.models.SBDT.network as ...
0
0
0
0
0
6,012
0
127
178
8de5d4f4d90c82ba89d54592b55ff8e4ada20840
65,264
py
Python
api/tests/test_views.py
jbrownrs/issue-376-GDS-link
e8cce1b79f46b98a7d24b2da5eca48430fd904a3
[ "MIT" ]
5
2019-01-07T17:22:34.000Z
2020-10-08T15:03:12.000Z
api/tests/test_views.py
jbrownrs/issue-376-GDS-link
e8cce1b79f46b98a7d24b2da5eca48430fd904a3
[ "MIT" ]
203
2017-12-14T09:51:56.000Z
2018-08-28T14:04:08.000Z
api/tests/test_views.py
jbrownrs/issue-376-GDS-link
e8cce1b79f46b98a7d24b2da5eca48430fd904a3
[ "MIT" ]
5
2018-10-22T11:36:01.000Z
2020-07-20T05:47:49.000Z
from .. import views DELIVERY_VIDEO_FIXTURE = { 'key': 'mock1', 'title': 'Mock 1', 'description': 'Description for mock 1', 'date': 1234567, 'duration': 54, 'sms_acl': 'acl:WORLD:', 'sms_media_id': 'media:1234:', 'sources': [ { 'type': 'video/mp4', 'wi...
42.379221
99
0.667137
import datetime from unittest import mock from dateutil import parser as dateparser from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser from django.http import QueryDict from django.test import TestCase from django.urls import reverse from rest_framework.authtoken.models...
0
0
0
63,835
0
0
0
265
611
37d21a39858725ccaa282e49990717b7fadab35d
381
py
Python
setup.py
pubnub/curses-client
2cd28a89ad9a1b6a6bae4639cc518e6f4066be2c
[ "MIT" ]
null
null
null
setup.py
pubnub/curses-client
2cd28a89ad9a1b6a6bae4639cc518e6f4066be2c
[ "MIT" ]
null
null
null
setup.py
pubnub/curses-client
2cd28a89ad9a1b6a6bae4639cc518e6f4066be2c
[ "MIT" ]
3
2018-03-16T20:33:50.000Z
2021-01-13T11:46:17.000Z
#!/usr/bin/env python from distutils.core import setup setup( name='pubnub_curses', version='1.5.2', description='PubNub Curses Terminal Client', long_description=open('README.rst').read(), license=open('LICENSE').read(), author='Dan Ristic', author_email='danr@pubnub.com', url='http://pubnub.com', ...
23.8125
46
0.698163
#!/usr/bin/env python from distutils.core import setup setup( name='pubnub_curses', version='1.5.2', description='PubNub Curses Terminal Client', long_description=open('README.rst').read(), license=open('LICENSE').read(), author='Dan Ristic', author_email='danr@pubnub.com', url='http://pubnub.com', ...
0
0
0
0
0
0
0
0
0
d9f18d89040e4fea09112e80aa760cee98cf577b
665
py
Python
homeassistant/config/custom_components/hacs/validate/topics.py
yuvalabou/homeassistant
e25885db33d2144455928d07d7e9b044278ba291
[ "Unlicense" ]
18
2016-08-10T01:02:27.000Z
2017-10-26T04:19:49.000Z
homeassistant/config/custom_components/hacs/validate/topics.py
yuvalabou/homeassistant
e25885db33d2144455928d07d7e9b044278ba291
[ "Unlicense" ]
6
2019-03-02T10:13:15.000Z
2019-03-02T14:00:40.000Z
homeassistant/config/custom_components/hacs/validate/topics.py
yuvalabou/homeassistant
e25885db33d2144455928d07d7e9b044278ba291
[ "Unlicense" ]
4
2017-04-20T19:41:21.000Z
2017-05-16T17:10:05.000Z
from __future__ import annotations
30.227273
75
0.73985
from __future__ import annotations from ..repositories.base import HacsRepository from .base import ActionValidationBase, ValidationException async def async_setup_validator(repository: HacsRepository) -> Validator: """Set up this validator.""" return Validator(repository=repository) class Validator(Action...
0
0
298
176
0
0
0
63
91
10fddbdb41106e3dded334fbbf88eeaa38cc1e7b
6,069
py
Python
day5/day5.py
BroderickCarlin/AdventOfCode
52d12d16f3d291a51984e6d85dbe97e604abc005
[ "MIT" ]
null
null
null
day5/day5.py
BroderickCarlin/AdventOfCode
52d12d16f3d291a51984e6d85dbe97e604abc005
[ "MIT" ]
null
null
null
day5/day5.py
BroderickCarlin/AdventOfCode
52d12d16f3d291a51984e6d85dbe97e604abc005
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- jumps = [1, 1, 1, 1, 0, 0, 0, -4, -1, 0, -3, -4, 0, -9, -3, 2, -14, 0, -17, -12, -15, -7, 0, -7, -12, -3, -17, -11, -24, -10, -16, -15, -28, -13, -28, -15, -28, -29, -20, 0, -10, -30, -13, -24, -34, -42, -25, -36, -38, -35, -23, -11, -4, -16, -15, -10, -31, 0, -16, -21, -50...
155.615385
5,626
0.468281
#!/usr/bin/env python # -*- coding: utf-8 -*- jumps = [1, 1, 1, 1, 0, 0, 0, -4, -1, 0, -3, -4, 0, -9, -3, 2, -14, 0, -17, -12, -15, -7, 0, -7, -12, -3, -17, -11, -24, -10, -16, -15, -28, -13, -28, -15, -28, -29, -20, 0, -10, -30, -13, -24, -34, -42, -25, -36, -38, -35, -23, -11, -4, -16, -15, -10, -31, 0, -16, -21, -50...
0
0
0
0
0
247
0
0
46
c5531a85d6f9fbc4a7621aa3d3a83a19b060aff6
511
py
Python
src/3_examples/Model View Controller/MVC.py
MilovanTomasevic/Python-Design-Patterns
2a30e24e062bc623e390f8ced9c228c3ff038e54
[ "MIT" ]
2
2020-12-01T21:06:29.000Z
2022-01-11T12:40:06.000Z
src/3_examples/Model View Controller/MVC.py
MilovanTomasevic/Python-Design-Patterns
2a30e24e062bc623e390f8ced9c228c3ff038e54
[ "MIT" ]
null
null
null
src/3_examples/Model View Controller/MVC.py
MilovanTomasevic/Python-Design-Patterns
2a30e24e062bc623e390f8ced9c228c3ff038e54
[ "MIT" ]
1
2022-01-11T12:39:51.000Z
2022-01-11T12:39:51.000Z
controller = Controller() controller.present()
19.653846
53
0.596869
class Model: def db_data(self): print('Model called for data.') data = 'Model Data.' return data class View: def render(self, data): print('Rendering model on view :' , data) class Controller: def __init__(self): self.model = Model() self.view = View() ...
0
0
0
392
0
0
0
0
68
747e63588a2f8ed0a78e2d35779e24f86e5bc879
3,101
py
Python
kelvin_rgb/__init__.py
esemeniuc/kelvin2rgb
abd34afec694bdcd46a28285912fa9543cd568b7
[ "MIT" ]
null
null
null
kelvin_rgb/__init__.py
esemeniuc/kelvin2rgb
abd34afec694bdcd46a28285912fa9543cd568b7
[ "MIT" ]
1
2020-07-20T19:54:32.000Z
2020-07-20T19:54:32.000Z
kelvin_rgb/__init__.py
esemeniuc/kelvin2rgb
abd34afec694bdcd46a28285912fa9543cd568b7
[ "MIT" ]
null
null
null
# Neil Bartlett # neilbartlett.com # 2015-01-22 # # Copyright [2015] [Neil Bartlett] for Javascript source # Copyright Eric Semeniuc # # Color Temperature is the color due to black body radiation at a given # temperature. The temperature is given in Kelvin. The concept is widely used # in photography and in tools...
33.706522
104
0.636246
import math from typing import Tuple # Neil Bartlett # neilbartlett.com # 2015-01-22 # # Copyright [2015] [Neil Bartlett] for Javascript source # Copyright Eric Semeniuc # # Color Temperature is the color due to black body radiation at a given # temperature. The temperature is given in Kelvin. The concept is wide...
0
0
0
0
0
1,850
0
-7
112
449595d8794480de910f592b25f0e2ca85a8d186
2,928
py
Python
ingenico/connect/sdk/domain/payment/definitions/card_recurrence_details.py
festicket/connect-sdk-python3
c399c6443789dd978f319c89e1ebd387c812a77b
[ "MIT" ]
12
2016-09-26T21:46:31.000Z
2020-12-23T18:44:54.000Z
ingenico/connect/sdk/domain/payment/definitions/card_recurrence_details.py
festicket/connect-sdk-python3
c399c6443789dd978f319c89e1ebd387c812a77b
[ "MIT" ]
3
2020-05-02T16:53:02.000Z
2020-06-02T12:49:51.000Z
ingenico/connect/sdk/domain/payment/definitions/card_recurrence_details.py
festicket/connect-sdk-python3
c399c6443789dd978f319c89e1ebd387c812a77b
[ "MIT" ]
11
2017-07-16T00:55:28.000Z
2021-09-24T17:00:49.000Z
# -*- coding: utf-8 -*- # # This class was auto-generated from the API references found at # https://epayments-api.developer-ingenico.com/s2sapi/v1/ #
38.025974
296
0.695355
# -*- coding: utf-8 -*- # # This class was auto-generated from the API references found at # https://epayments-api.developer-ingenico.com/s2sapi/v1/ # from ingenico.connect.sdk.data_object import DataObject class CardRecurrenceDetails(DataObject): __end_date = None __min_frequency = None __recurring_paym...
0
1,439
0
1,258
0
0
0
34
45
29c1054e88c7bea75b0a9baf500c3d7287067886
4,876
py
Python
api/tests/factories.py
cds-snc/scan-websites
89986a65aa5b77aa5619ec01eb173952641db52c
[ "MIT" ]
5
2021-07-30T17:19:20.000Z
2022-03-27T06:24:53.000Z
api/tests/factories.py
cds-snc/scan-websites
89986a65aa5b77aa5619ec01eb173952641db52c
[ "MIT" ]
175
2021-07-25T20:39:00.000Z
2022-03-29T17:17:18.000Z
api/tests/factories.py
cds-snc/scan-websites
89986a65aa5b77aa5619ec01eb173952641db52c
[ "MIT" ]
null
null
null
# When adding new factories ensure you add the factory to the conftest session fixture so that they can be linked to the test db session
28.51462
136
0.715956
import factory from models.A11yReport import A11yReport from models.A11yViolation import A11yViolation from models.Organisation import Organisation from models.SecurityReport import SecurityReport from models.SecurityViolation import SecurityViolation from models.Scan import Scan from models.ScanIgnore import ScanIgno...
0
0
0
4,004
0
0
0
206
517
6509e5cca202dceede7d3b75d283777a3bfbdb69
9,114
py
Python
Functions/BetaDistribution.py
RichardScottOZ/bluecap
9d06de2fbdb60080d448287099d8b5621fb642d2
[ "Apache-2.0" ]
5
2020-03-20T04:03:42.000Z
2021-12-16T20:21:39.000Z
Functions/BetaDistribution.py
RichardScottOZ/bluecap
9d06de2fbdb60080d448287099d8b5621fb642d2
[ "Apache-2.0" ]
1
2022-01-20T04:15:19.000Z
2022-01-20T04:15:19.000Z
Functions/BetaDistribution.py
RichardScottOZ/bluecap
9d06de2fbdb60080d448287099d8b5621fb642d2
[ "Apache-2.0" ]
3
2020-06-17T07:44:45.000Z
2022-01-13T22:46:06.000Z
""" Copyright (C) 2019-2021, Monash University, Geoscience Australia Copyright (C) 2018, Stuart Walsh Bluecap is released under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licen...
30.790541
120
0.61828
""" Copyright (C) 2019-2021, Monash University, Geoscience Australia Copyright (C) 2018, Stuart Walsh Bluecap is released under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licen...
0
1,923
0
4,004
0
2,083
0
24
228
d604d29781e05be85201d6f738a63e76c3de6f31
3,926
py
Python
python/usdExport/SuperTools/UsdMaterialBake/Editor.py
UTS-AnimalLogicAcademy/KatanaUsdPlugins
80bd6dae4971f15a417e7e3ac927a1fe66d4f989
[ "Apache-2.0" ]
1
2020-09-25T03:27:52.000Z
2020-09-25T03:27:52.000Z
python/usdExport/SuperTools/UsdMaterialBake/Editor.py
autodesk-forks/KatanaUsdPlugins
b2bd51de983ddf63d74b68438615cf4a410ea0a3
[ "Apache-2.0" ]
null
null
null
python/usdExport/SuperTools/UsdMaterialBake/Editor.py
autodesk-forks/KatanaUsdPlugins
b2bd51de983ddf63d74b68438615cf4a410ea0a3
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 The Foundry Visionmongers Ltd. # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced...
41.326316
78
0.714977
# Copyright (c) 2020 The Foundry Visionmongers Ltd. # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced...
0
0
0
2,480
0
0
0
30
135
b7b7ff25bbd85eb4106db94ce15eb8dc6a6e946a
357
py
Python
tools/CalendarReader.py
wzf92/rqalpha
63a328f10d0488a4b06cd13773e506d4ee96628b
[ "Apache-2.0" ]
null
null
null
tools/CalendarReader.py
wzf92/rqalpha
63a328f10d0488a4b06cd13773e506d4ee96628b
[ "Apache-2.0" ]
null
null
null
tools/CalendarReader.py
wzf92/rqalpha
63a328f10d0488a4b06cd13773e506d4ee96628b
[ "Apache-2.0" ]
null
null
null
if __name__ == "__main__": cr = CalendarReader() data = cr.read("/Users/zhifeng/.rqalpha/bundle/trading_dates.npy") print(data)
22.3125
90
0.677871
import numpy as np import pandas class CalendarReader: def __init__(self): pass def read(self, filename): return pandas.to_datetime([str(d) for d in np.load(filename, allow_pickle=False)]) if __name__ == "__main__": cr = CalendarReader() data = cr.read("/Users/zhifeng/.rqalpha/bundl...
0
0
0
159
0
0
0
-11
67
f02701f1b17553c6556563c093c85cb069741022
9,345
py
Python
exactTables.py
statmike/exactTables
676ccc42c951b77a123b04fb1385401e18c5b713
[ "Apache-2.0" ]
null
null
null
exactTables.py
statmike/exactTables
676ccc42c951b77a123b04fb1385401e18c5b713
[ "Apache-2.0" ]
null
null
null
exactTables.py
statmike/exactTables
676ccc42c951b77a123b04fb1385401e18c5b713
[ "Apache-2.0" ]
null
null
null
import math # used in threader and checker functions for math.comb import time # used for timing information # input values N = 100 # how many ratings C = 5 # categories 1 to 5 inczero = False # include 0 category - True or False - like allowing missing values as these will not be evaluted in target target = 4.91 #...
43.064516
194
0.656501
import math # used in threader and checker functions for math.comb import time # used for timing information import numpy as np # used for array math in loop from multiprocessing import Pool # used to run thread values in thread_list asych from multiprocessing import cpu_count # used to detect the machines core count (...
0
0
0
0
0
6,269
0
24
351
656059f84874dcd7fb2afe2e207af78969675112
1,366
py
Python
tests/test_utils.py
lcsgrlch/oap
b1e2e15118d5b73edf5d1848ccbc207921ecbf91
[ "MIT" ]
null
null
null
tests/test_utils.py
lcsgrlch/oap
b1e2e15118d5b73edf5d1848ccbc207921ecbf91
[ "MIT" ]
null
null
null
tests/test_utils.py
lcsgrlch/oap
b1e2e15118d5b73edf5d1848ccbc207921ecbf91
[ "MIT" ]
null
null
null
""" Testing all methods from oap.utils """
25.773585
90
0.721816
""" Testing all methods from oap.utils """ import unittest import oap from tests.data import ( array01_barycenter_coordinates, array01_original, array01_adjust01, array01_adjust02, array01_toclip01, array01_move_x01, array01_move_x02, array01_move_y01, array01_move_y02 ) class Te...
0
0
0
1,032
0
0
0
199
91
7939a7cd79739fedfc45102ada7ff03c23a420cd
2,903
py
Python
modron/tests/test_dice.py
WardLT/play-by-post-helper
26df681f2a28510f88e552be628910e4e5fe57bb
[ "MIT" ]
null
null
null
modron/tests/test_dice.py
WardLT/play-by-post-helper
26df681f2a28510f88e552be628910e4e5fe57bb
[ "MIT" ]
13
2020-04-08T02:56:58.000Z
2020-10-04T21:52:43.000Z
modron/tests/test_dice.py
WardLT/play-by-post-helper
26df681f2a28510f88e552be628910e4e5fe57bb
[ "MIT" ]
null
null
null
from modron.dice import roll_die from math import isclose from random import seed seed(1) _default_rolls = 2 * 10 ** 6 def _measure_probability(sides: int, target_val: int, n_trials: int = _default_rolls, **kwargs) -> float: """Measure the probability of a certain dice roll Args: sides (int): Number...
31.901099
105
0.686876
from modron.dice import roll_die, DiceRoll from math import isclose from random import seed seed(1) _default_rolls = 2 * 10 ** 6 def _measure_probability(sides: int, target_val: int, n_trials: int = _default_rolls, **kwargs) -> float: """Measure the probability of a certain dice roll Args: sides (in...
0
0
0
0
0
1,678
0
10
138
5e42f987f62aab6694cde27bc2ef80bf9e34e021
159
py
Python
{{cookiecutter.project_slug}}/app/models/__init__.py
andredias/cookiecutter-fastapi
b5df6f80908d924e51a02fba34d1a01ccf4fc265
[ "MIT" ]
8
2021-06-12T10:11:03.000Z
2022-03-23T13:27:23.000Z
{{cookiecutter.project_slug}}/app/models/__init__.py
andredias/cookiecutter-fastapi
b5df6f80908d924e51a02fba34d1a01ccf4fc265
[ "MIT" ]
12
2021-06-08T22:58:30.000Z
2022-02-22T15:43:10.000Z
{{cookiecutter.project_slug}}/app/models/__init__.py
andredias/cookiecutter-fastapi
b5df6f80908d924e51a02fba34d1a01ccf4fc265
[ "MIT" ]
2
2021-08-10T22:55:49.000Z
2021-08-10T23:05:29.000Z
from sqlalchemy import MetaData metadata = MetaData() MAX_ID = 2 ** 31
13.25
31
0.72327
from secrets import randbelow from sqlalchemy import MetaData metadata = MetaData() MAX_ID = 2 ** 31 def random_id() -> int: return randbelow(MAX_ID)
0
0
0
0
0
31
0
8
45
b966fb7a40ac93e296900d5e82ea2e5dbff195f1
1,489
py
Python
inviteExportmail/inviteexportmail/controllers/manage/exportdatamailjm.py
tongpa/InviteExportmail
a95ba5262c15beb0771f759c66baa80ddff78cc5
[ "Apache-2.0" ]
null
null
null
inviteExportmail/inviteexportmail/controllers/manage/exportdatamailjm.py
tongpa/InviteExportmail
a95ba5262c15beb0771f759c66baa80ddff78cc5
[ "Apache-2.0" ]
null
null
null
inviteExportmail/inviteexportmail/controllers/manage/exportdatamailjm.py
tongpa/InviteExportmail
a95ba5262c15beb0771f759c66baa80ddff78cc5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Main Controller""" __all__ = ['ExportDataMailJMController']
31.020833
110
0.697112
# -*- coding: utf-8 -*- """Main Controller""" from tg import expose, flash, require, url, lurl from tg import request, redirect, tmpl_context from tg.i18n import ugettext as _, lazy_ugettext as l_ from tg.exceptions import HTTPFound from tg import predicates from inviteexportmail import model from inviteexportmail.con...
0
615
0
153
0
0
0
339
289
9c7db7c87ce260b918f7a0ef095c20f6bb965f58
60,113
py
Python
tensorflow_federated/python/core/impl/type_utils.py
federated-learning-experiments/federated
ba258f53ff28574375cc5e5a8a80da1a2cd57290
[ "Apache-2.0" ]
null
null
null
tensorflow_federated/python/core/impl/type_utils.py
federated-learning-experiments/federated
ba258f53ff28574375cc5e5a8a80da1a2cd57290
[ "Apache-2.0" ]
null
null
null
tensorflow_federated/python/core/impl/type_utils.py
federated-learning-experiments/federated
ba258f53ff28574375cc5e5a8a80da1a2cd57290
[ "Apache-2.0" ]
1
2020-04-12T08:08:43.000Z
2020-04-12T08:08:43.000Z
# Lint as: python3 # Copyright 2018, The TensorFlow Federated Authors. # # 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 ...
41.371645
94
0.722423
# Lint as: python3 # Copyright 2018, The TensorFlow Federated Authors. # # 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 ...
0
0
0
706
0
2,524
0
0
346
a5e5661004d10d54d5fcadba7a7691983c693e0b
7,509
py
Python
utils/harviz.py
nberth/DeepConcolic
baece182b34a50fbc781993b1d46bb293976ca9a
[ "BSD-3-Clause" ]
102
2018-05-10T05:46:47.000Z
2022-01-31T12:40:22.000Z
utils/harviz.py
eriksali/DeepConcolic
baece182b34a50fbc781993b1d46bb293976ca9a
[ "BSD-3-Clause" ]
19
2018-07-29T12:45:21.000Z
2022-03-16T13:09:00.000Z
utils/harviz.py
eriksali/DeepConcolic
baece182b34a50fbc781993b1d46bb293976ca9a
[ "BSD-3-Clause" ]
43
2018-05-02T15:09:20.000Z
2022-02-02T10:36:30.000Z
#!/usr/bin/env python3 from deepconcolic.datasets import load_by_name from deepconcolic import scripting from deepconcolic import plotting from deepconcolic.plotting import subplots, show from deepconcolic.utils_io import OutputDir, os, sys from deepconcolic.utils_funcs import as_numpy, np import argparse # see https:...
40.809783
81
0.604608
#!/usr/bin/env python3 from deepconcolic.datasets import load_by_name from deepconcolic import scripting from deepconcolic import plotting from deepconcolic.plotting import plt, subplots, show from deepconcolic.utils_io import OutputDir, os, sys from deepconcolic.utils_funcs import as_numpy, np import argparse # see h...
0
0
0
0
0
627
0
5
49
82a626d209e028febf045873298d5bd0690b55f0
576
py
Python
Data Structure/Stack/Stack Using Array/SolutionByAmit.py
AmitKarnam/Programmers-Community
0927fef9133a540acfa479038877133a39ff6cec
[ "MIT" ]
null
null
null
Data Structure/Stack/Stack Using Array/SolutionByAmit.py
AmitKarnam/Programmers-Community
0927fef9133a540acfa479038877133a39ff6cec
[ "MIT" ]
null
null
null
Data Structure/Stack/Stack Using Array/SolutionByAmit.py
AmitKarnam/Programmers-Community
0927fef9133a540acfa479038877133a39ff6cec
[ "MIT" ]
null
null
null
stack = [] top = -1 if __name__ == '__main__': push(10) push(20) push(30) push(40) push(50) print(stack) print("After a pop operation:") pop() print(stack) # Sample Output # [10, 20, 30, 40, 50] # After a pop operation: # [10, 20, 30, 40]
13.714286
35
0.529514
stack = [] top = -1 def is_empty(): if top == -1: return True return False def push(x): global top top += 1 stack.append(x) return def pop(): global top if is_empty(): print('Stack Underflow.') else: stack.remove(stack[top]) top -= 1 return if...
0
0
0
0
0
227
0
0
69
31b35d18d5d6215a624123bb18c4d2c7fcb23d6f
1,309
py
Python
upconvert/parser/t/altium_t.py
EasyPCB/schematic-file-converter
0d575171e2aa19a35ca15d5e39c716287d885ec4
[ "Apache-2.0" ]
1
2020-09-05T03:41:18.000Z
2020-09-05T03:41:18.000Z
upconvert/parser/t/altium_t.py
EasyPCB/schematic-file-converter
0d575171e2aa19a35ca15d5e39c716287d885ec4
[ "Apache-2.0" ]
null
null
null
upconvert/parser/t/altium_t.py
EasyPCB/schematic-file-converter
0d575171e2aa19a35ca15d5e39c716287d885ec4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # encoding: utf-8 #pylint: disable=R0904 """ The altium parser test class """ # upconvert.py - A universal hardware design file format converter using # Format: upverter.com/resources/open-json-format/ # Development: github.com/upverter/schematic-file-converter # # Copyright 2011 Upverter, Inc...
29.75
74
0.704354
#!/usr/bin/python # encoding: utf-8 #pylint: disable=R0904 """ The altium parser test class """ # upconvert.py - A universal hardware design file format converter using # Format: upverter.com/resources/open-json-format/ # Development: github.com/upverter/schematic-file-converter # # Copyright 2011 Upverter, Inc...
0
0
0
358
0
0
0
15
68
cbc2e626b3a20e5d4d749d538793077ca3249a8d
240
py
Python
h/streamer/__init__.py
project-star/h
fd1decafdce981b681ef3bd59e001b1284498dae
[ "MIT" ]
1
2017-06-16T14:01:28.000Z
2017-06-16T14:01:28.000Z
h/streamer/__init__.py
project-star/h
fd1decafdce981b681ef3bd59e001b1284498dae
[ "MIT" ]
null
null
null
h/streamer/__init__.py
project-star/h
fd1decafdce981b681ef3bd59e001b1284498dae
[ "MIT" ]
1
2020-02-16T08:04:56.000Z
2020-02-16T08:04:56.000Z
# -*- coding: utf-8 -*-
24
62
0.6125
# -*- coding: utf-8 -*- def includeme(config): config.include('h.streamer.views') config.add_route('ws', 'ws') config.add_subscriber('h.streamer.streamer.start', 'pyramid.events.ApplicationCreated')
0
0
0
0
0
192
0
0
23
a373717eef9d69b1204aefaa239064978b7564c1
1,075
py
Python
eduu/database/admins.py
MikeOwino/EduuRobot
24cbdce466ae3dd45d26796df866a94198d0feec
[ "MIT" ]
null
null
null
eduu/database/admins.py
MikeOwino/EduuRobot
24cbdce466ae3dd45d26796df866a94198d0feec
[ "MIT" ]
6
2022-01-04T12:40:41.000Z
2022-03-10T04:57:30.000Z
eduu/database/admins.py
MikeOwino/EduuRobot
24cbdce466ae3dd45d26796df866a94198d0feec
[ "MIT" ]
null
null
null
# SPDX-License-Identifier: MIT # Copyright (c) 2018-2022 Amano Team from .core import database conn = database.get_conn()
26.219512
81
0.672558
# SPDX-License-Identifier: MIT # Copyright (c) 2018-2022 Amano Team from typing import Optional from .core import database conn = database.get_conn() async def check_if_del_service(chat_id: int) -> bool: cursor = await conn.execute( "SELECT delservicemsgs FROM groups WHERE chat_id = ?", (chat_id,) ...
0
0
826
0
0
0
0
6
115
11fe87ec13a212a34924414120cdbd9752ecbaf9
9,761
py
Python
main.py
lucadenhez/coffeeshop
b0d60938e7c053ec3941728ecfb09c5d02eb8b30
[ "MIT" ]
null
null
null
main.py
lucadenhez/coffeeshop
b0d60938e7c053ec3941728ecfb09c5d02eb8b30
[ "MIT" ]
null
null
null
main.py
lucadenhez/coffeeshop
b0d60938e7c053ec3941728ecfb09c5d02eb8b30
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # For MacOS systems only. Cannot run on a Windows machine. from colorama import init, Fore init(True) title = ''' ...
40.334711
158
0.45354
# -*- coding: utf-8 -*- # For MacOS systems only. Cannot run on a Windows machine. from colorama import init, Fore from datetime import datetime from sys import exit from os import system import subprocess import json from requests import get init(True) title = ''' ██ ██ ██ ...
408
8,132
0
341
0
0
0
-4
155
4f3a057be4cd194dc3818399167434581902c8db
4,598
py
Python
tests/test_handler.py
tehdragonfly/gopher_server
9ba1c6cd961bdbad2a87f61e66fe81d9486883b0
[ "MIT" ]
null
null
null
tests/test_handler.py
tehdragonfly/gopher_server
9ba1c6cd961bdbad2a87f61e66fe81d9486883b0
[ "MIT" ]
null
null
null
tests/test_handler.py
tehdragonfly/gopher_server
9ba1c6cd961bdbad2a87f61e66fe81d9486883b0
[ "MIT" ]
null
null
null
import os.path BASE_PATH = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "examples/data/")
37.688525
105
0.726838
import os.path import pytest from gopher_server.handlers import DirectoryHandler, NotFound, PatternHandler, Request from gopher_server.menu import Menu, MenuItem BASE_PATH = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "examples/data/") @pytest.fixture def directory_handler() -> Direct...
0
4,017
0
0
0
0
0
81
366
5060123bb75d499b33a1cbedba2cabc85936d6bd
47,021
py
Python
dc17/forms.py
lamby/dc17.dc.o
83cc79ad6f627b8c203fe62b7fcc9ff7abd84ee4
[ "0BSD" ]
null
null
null
dc17/forms.py
lamby/dc17.dc.o
83cc79ad6f627b8c203fe62b7fcc9ff7abd84ee4
[ "0BSD" ]
null
null
null
dc17/forms.py
lamby/dc17.dc.o
83cc79ad6f627b8c203fe62b7fcc9ff7abd84ee4
[ "0BSD" ]
null
null
null
FOOD_LINK = ( '<a href="https://wiki.debconf.org/wiki/DebConf17/Catering" ' 'target="blank">More information</a>') ACCOM_LINK = ( '<a href="https://wiki.debconf.org/wiki/DebConf17/Accomodation" ' 'target="blank">More information</a>') BURSARIES_LINK = ( '<a href="/about/bursaries/" target="blank">...
35.195359
79
0.518024
import datetime import re from django import forms from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django_countries import Countries from django_countries.fields import LazyTypedChoiceField from django_countries.widgets import CountrySelectWidget from crispy_forms.helper i...
0
2,246
0
39,915
0
67
0
248
544
f2bdf4f3266ef767c9015d9bb8a27d3781855c04
174
py
Python
tests/basics/enumerate.py
bygreencn/micropython
3f759b71c63f5e01df18a6e204c50f78d1b6a20b
[ "MIT" ]
1
2019-05-07T15:01:19.000Z
2019-05-07T15:01:19.000Z
tests/basics/enumerate.py
bygreencn/micropython
3f759b71c63f5e01df18a6e204c50f78d1b6a20b
[ "MIT" ]
null
null
null
tests/basics/enumerate.py
bygreencn/micropython
3f759b71c63f5e01df18a6e204c50f78d1b6a20b
[ "MIT" ]
null
null
null
print(list(enumerate([]))) print(list(enumerate([1, 2, 3]))) print(list(enumerate([1, 2, 3], 5))) print(list(enumerate([1, 2, 3], -5))) print(list(enumerate(range(10000))))
24.857143
37
0.637931
print(list(enumerate([]))) print(list(enumerate([1, 2, 3]))) print(list(enumerate([1, 2, 3], 5))) print(list(enumerate([1, 2, 3], -5))) print(list(enumerate(range(10000))))
0
0
0
0
0
0
0
0
0
8b5e13334f691095687b8e3fae81ee9dec40472b
7,434
py
Python
src/monitor/metric.py
sunprinceS/MetaASR-CrossAccent
43f45c2f121c1e47d3a088f03db5acc31d04f15a
[ "MIT" ]
9
2020-07-02T09:08:08.000Z
2021-05-12T16:14:54.000Z
src/monitor/metric.py
sunprinceS/End-to-end-Transformer-ASR-Pytorch
d09629d82e76de28f686509913abaf3fc8b05f91
[ "MIT" ]
null
null
null
src/monitor/metric.py
sunprinceS/End-to-end-Transformer-ASR-Pytorch
d09629d82e76de28f686509913abaf3fc8b05f91
[ "MIT" ]
1
2021-07-12T02:13:35.000Z
2021-07-12T02:13:35.000Z
import src.monitor.logger as logger # def cal_cer(preds, ys): # pred = torch.argmax(preds, dim=-1) # batch_size = pred.size(0) # cer = 0.0 # for h,y in zip(pred, ys): # hh = h.tolist() # hh = [x[0] for x in groupby(hh)] # hh = [x for x in hh if x != 0] # remove ...
34.258065
109
0.583266
import torch import numpy as np import editdistance import sentencepiece as spmlib import src.monitor.logger as logger from src.marcos import BLANK_SYMBOL, IGNORE_ID from itertools import groupby class Metric: def __init__(self, model_path, id2units, sos_id, eos_id, ignore_id=None): self.spm = spmlib.Sent...
0
0
0
4,734
0
707
0
28
178
45e6952f7b58209b63d080646133f75989a1e4ad
341
py
Python
Day 1/part_2_test.py
kosayoda/-r-adventofcode-2018
a8d1e0e858f1076a692b76aee15bab4798e10aad
[ "MIT" ]
null
null
null
Day 1/part_2_test.py
kosayoda/-r-adventofcode-2018
a8d1e0e858f1076a692b76aee15bab4798e10aad
[ "MIT" ]
null
null
null
Day 1/part_2_test.py
kosayoda/-r-adventofcode-2018
a8d1e0e858f1076a692b76aee15bab4798e10aad
[ "MIT" ]
null
null
null
import pytest from part_2 import retrieve_repeat 1_test = [+1, -1] 2_test = [+3, +3, +4, -2, -4] 3_test = [-6, +3, +8, +5, -6] 4_test = [+7, +7, -2, -7, -4]
22.733333
40
0.621701
import pytest from part_2 import retrieve_repeat 1_test = [+1, -1] 2_test = [+3, +3, +4, -2, -4] 3_test = [-6, +3, +8, +5, -6] 4_test = [+7, +7, -2, -7, -4] def test_answer(): assert retrieve_repeat(1_test) == 0 assert retrieve_repeat(2_test) == 10 assert retrieve_repeat(3_test) == 5 assert retrieve_...
0
0
0
0
0
159
0
0
23