hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
853fb99d2164e2dd9446025b29e70b1c84a7ae1c
4,664
py
Python
payments/views.py
oversabiproject/ghostrr
0bf49537ddf0436d08d705b29bffbd49b66e7c65
[ "MIT" ]
null
null
null
payments/views.py
oversabiproject/ghostrr
0bf49537ddf0436d08d705b29bffbd49b66e7c65
[ "MIT" ]
null
null
null
payments/views.py
oversabiproject/ghostrr
0bf49537ddf0436d08d705b29bffbd49b66e7c65
[ "MIT" ]
null
null
null
# payments/views.py import stripe import json from django.conf import settings # new from django.contrib.sites.shortcuts import get_current_site from django.http.response import JsonResponse, HttpResponse from django.views.decorators.csrf import csrf_exempt # new from django.views.generic.base import TemplateView fro...
37.918699
198
0.649014
# payments/views.py import stripe import json from django.conf import settings # new from django.contrib.sites.shortcuts import get_current_site from django.http.response import JsonResponse, HttpResponse from django.views.decorators.csrf import csrf_exempt # new from django.views.generic.base import TemplateView fro...
3,201
925
135
75c93999fa4977b8c68eb27d0e640428e6ca5a1c
3,082
py
Python
main.py
th0mas-w/Wordle
5ace04bd009da55ae7d43eed3bc13a1893609e4d
[ "MIT" ]
null
null
null
main.py
th0mas-w/Wordle
5ace04bd009da55ae7d43eed3bc13a1893609e4d
[ "MIT" ]
null
null
null
main.py
th0mas-w/Wordle
5ace04bd009da55ae7d43eed3bc13a1893609e4d
[ "MIT" ]
null
null
null
import random,sys, pygame as pg from tkinter import Tk,messagebox size = width, height = 400,600 pg.init() Tk().wm_withdraw() black = 0,0,0 white = 255,255,255 orange = 255,165,0 green = 0,255,0 screen = pg.display.set_mode(size) pg.display.set_caption("Wordle") titleFont = pg.font.SysFont("bahnschrift...
34.629213
102
0.559701
import random,sys, pygame as pg from tkinter import Tk,messagebox size = width, height = 400,600 pg.init() Tk().wm_withdraw() black = 0,0,0 white = 255,255,255 orange = 255,165,0 green = 0,255,0 screen = pg.display.set_mode(size) pg.display.set_caption("Wordle") titleFont = pg.font.SysFont("bahnschrift...
630
-6
134
3c5bcea151e26e6eb3230ce64f237194c16b667f
482
py
Python
lzw3/res/utils.py
Docheinstein/lzw3
39098f01b66f8860390123e2662ef0662667748d
[ "MIT" ]
1
2020-06-11T10:16:55.000Z
2020-06-11T10:16:55.000Z
lzw3/res/utils.py
Docheinstein/LZW3
39098f01b66f8860390123e2662ef0662667748d
[ "MIT" ]
2
2019-03-05T22:51:19.000Z
2021-01-27T22:45:44.000Z
lzw3/res/utils.py
Docheinstein/LZW3
39098f01b66f8860390123e2662ef0662667748d
[ "MIT" ]
null
null
null
import pkg_resources from lzw3.commons.utils import read_textual_file def read_textual_resource(res: str) -> str: """ Reads the content of the given resource. The resource is loaded relatively to the path "res/" using pkg_resources of setuptools. Args: res (str): the path of the resource rel...
25.368421
76
0.711618
import pkg_resources from lzw3.commons.utils import read_textual_file def read_textual_resource(res: str) -> str: """ Reads the content of the given resource. The resource is loaded relatively to the path "res/" using pkg_resources of setuptools. Args: res (str): the path of the resource rel...
0
0
0
be788a695806f43d2cfba0069186d03b3b2eccb2
462,019
py
Python
NN_layers/SENet154.py
Mxbonn/zigzag_fork
250ee5e22904ba846dfb106983d46b83bd9ee230
[ "BSD-3-Clause" ]
34
2020-08-11T14:38:29.000Z
2022-03-30T10:32:34.000Z
NN_layers/SENet154.py
Mxbonn/zigzag_fork
250ee5e22904ba846dfb106983d46b83bd9ee230
[ "BSD-3-Clause" ]
9
2020-11-16T19:19:48.000Z
2022-03-31T18:29:24.000Z
NN_layers/SENet154.py
Mxbonn/zigzag_fork
250ee5e22904ba846dfb106983d46b83bd9ee230
[ "BSD-3-Clause" ]
18
2020-08-24T07:26:51.000Z
2022-01-06T00:59:11.000Z
layer_info = \ {1: {'B': 1, 'K': 64, 'C': 3, 'OY': 112, 'OX': 112, 'FY': 3, 'FX': 3, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1}, 2: {'B': 1, 'K': 64, 'C': 64, 'OY': 112, 'OX': 112, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1}, 3: {'B': 1, 'K': 128, 'C': 64, '...
135.489443
140
0.343495
layer_info = \ {1: {'B': 1, 'K': 64, 'C': 3, 'OY': 112, 'OX': 112, 'FY': 3, 'FX': 3, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1}, 2: {'B': 1, 'K': 64, 'C': 64, 'OY': 112, 'OX': 112, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1}, 3: {'B': 1, 'K': 128, 'C': 64, '...
0
0
0
86386def2e4638a3af0c4558d4a7203f858a527d
5,474
py
Python
moya/tests/test_templates.py
moyaproject/moya
78b91d87b4519f91dfdd2b40dab44e72f201a843
[ "MIT" ]
129
2015-02-16T12:02:50.000Z
2021-11-06T00:20:01.000Z
moya/tests/test_templates.py
liaohandel/moya
78b91d87b4519f91dfdd2b40dab44e72f201a843
[ "MIT" ]
5
2015-02-19T15:56:41.000Z
2015-09-08T18:58:35.000Z
moya/tests/test_templates.py
liaohandel/moya
78b91d87b4519f91dfdd2b40dab44e72f201a843
[ "MIT" ]
14
2015-02-19T17:20:34.000Z
2022-03-28T01:38:09.000Z
from __future__ import unicode_literals import unittest import os import time from os.path import join from fs.opener import open_fs from moya.template.moyatemplates import MoyaTemplateEngine from moya.archive import Archive from moya.settings import SettingsContainer
35.545455
83
0.591706
from __future__ import unicode_literals import unittest import os import time from os.path import join from fs.opener import open_fs from moya.template.moyatemplates import MoyaTemplateEngine from moya.archive import Archive from moya.settings import SettingsContainer class TestTemplates(unittest.TestCase): def...
594
4,585
23
22f7c62e57b2fd7b02f02ae289eed84533770279
2,113
py
Python
nel/features/probability.py
psyML/nel
5ce1f0b2ef6246f27113ffe2d80d9b95f05f884e
[ "MIT" ]
196
2015-03-17T15:39:00.000Z
2021-01-07T00:26:17.000Z
nel/features/probability.py
psyML/nel
5ce1f0b2ef6246f27113ffe2d80d9b95f05f884e
[ "MIT" ]
28
2015-03-17T23:55:38.000Z
2019-11-12T14:10:02.000Z
nel/features/probability.py
psyML/nel
5ce1f0b2ef6246f27113ffe2d80d9b95f05f884e
[ "MIT" ]
52
2015-03-06T21:28:03.000Z
2020-12-06T22:26:15.000Z
#!/usr/bin/env python import math from .feature import Feature from ..model import disambiguation from ..process.candidates import CandidateGenerator from nel import logging log = logging.getLogger() @Feature.Extractable class EntityProbability(LogFeature): """ Entity prior probability. """ @classmethod @F...
32.507692
80
0.672504
#!/usr/bin/env python import math from .feature import Feature from ..model import disambiguation from ..process.candidates import CandidateGenerator from nel import logging log = logging.getLogger() class LogFeature(Feature): def compute(self, doc, chain, candidate, state): return math.log(self.comp...
1,349
5
292
441bd602f856bedb54cbb3fbcbac4223771b796e
779
py
Python
backoffice/models/group.py
MedPy-C/backend
262834adb1f4f5714c4bd490595fdfa1f49c9675
[ "MIT" ]
null
null
null
backoffice/models/group.py
MedPy-C/backend
262834adb1f4f5714c4bd490595fdfa1f49c9675
[ "MIT" ]
1
2021-05-20T16:08:35.000Z
2021-05-20T16:08:35.000Z
backoffice/models/group.py
MedPy-C/backend
262834adb1f4f5714c4bd490595fdfa1f49c9675
[ "MIT" ]
null
null
null
import uuid from django.db import models from backoffice.manager import group from backoffice.models import UpdatedCreated, UserLogin
35.409091
103
0.765083
import uuid from django.db import models from backoffice.manager import group from backoffice.models import UpdatedCreated, UserLogin class Group(UpdatedCreated): group_code = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) name = models.CharField(max_length=200) slug_name = model...
0
619
23
b97a73603a7d3561ac43e2d08dd8dc3aa4aefb23
3,474
py
Python
tests/crawler/media/test_sina.py
allenyummy/GoodInfo
94ab7421d1377450ac4cfdfd6e4667fa52b20d0c
[ "MIT" ]
1
2022-01-17T14:06:27.000Z
2022-01-17T14:06:27.000Z
tests/crawler/media/test_sina.py
allenyummy/GoodInfo
94ab7421d1377450ac4cfdfd6e4667fa52b20d0c
[ "MIT" ]
9
2021-08-12T07:39:01.000Z
2021-08-20T08:38:29.000Z
tests/crawler/media/test_sina.py
allenyummy/GoodInfo
94ab7421d1377450ac4cfdfd6e4667fa52b20d0c
[ "MIT" ]
1
2022-02-21T15:45:13.000Z
2022-02-21T15:45:13.000Z
# encoding=utf-8 # Author: Yu-Lun Chiang # Description: Test NewsCrawler import logging import pytest from collections import namedtuple from src.crawler.media import sina from src.utils.struct import NewsStruct logger = logging.getLogger(__name__) TEST_DATA = namedtuple( typename="TEST_DATA", field_names=[...
45.710526
944
0.729131
# encoding=utf-8 # Author: Yu-Lun Chiang # Description: Test NewsCrawler import logging import pytest from collections import namedtuple from src.crawler.media import sina from src.utils.struct import NewsStruct logger = logging.getLogger(__name__) TEST_DATA = namedtuple( typename="TEST_DATA", field_names=[...
258
0
44
9beaacdc5eb2a0518b1d76b1ec75b584b910a1e8
1,418
py
Python
PMega/Section 16 - OOP/database_interactivity.py
peternewman22/Python_Courses
07a798b6f264fc6069eb1205c9d429f00fb54bc5
[ "MIT" ]
null
null
null
PMega/Section 16 - OOP/database_interactivity.py
peternewman22/Python_Courses
07a798b6f264fc6069eb1205c9d429f00fb54bc5
[ "MIT" ]
null
null
null
PMega/Section 16 - OOP/database_interactivity.py
peternewman22/Python_Courses
07a798b6f264fc6069eb1205c9d429f00fb54bc5
[ "MIT" ]
null
null
null
""" SQL Lite: based on a file rather than a web serviceself. Therefore, you don't have to have SQL Lite installedself. You can totally use Python to Python sends SQL to interact with the DB 5 steps 1. Connect to DB 2. Cursor (pointer to rows in the DB) 3. SQL query 4. Commit changes to DB 5. Close connection """ imp...
21.815385
93
0.655853
""" SQL Lite: based on a file rather than a web serviceself. Therefore, you don't have to have SQL Lite installedself. You can totally use Python to Python sends SQL to interact with the DB 5 steps 1. Connect to DB 2. Cursor (pointer to rows in the DB) 3. SQL query 4. Commit changes to DB 5. Close connection """ imp...
882
0
115
b2dd4acbad31af2706622a39da77467375e14082
7,186
py
Python
testrail/testrail_api_test_data.py
tate138/Martindale_Automation
082169df9f88ddc96fa81365f9c5e8aa460f7d14
[ "Apache-2.0" ]
null
null
null
testrail/testrail_api_test_data.py
tate138/Martindale_Automation
082169df9f88ddc96fa81365f9c5e8aa460f7d14
[ "Apache-2.0" ]
null
null
null
testrail/testrail_api_test_data.py
tate138/Martindale_Automation
082169df9f88ddc96fa81365f9c5e8aa460f7d14
[ "Apache-2.0" ]
null
null
null
import sys sys.path.insert(0, '../glados/resources') # Import a module from other directory import re from testrail.testrail import testrail_api_glados
46.064103
164
0.606318
import sys sys.path.insert(0, '../glados/resources') # Import a module from other directory import re from testrail.testrail import testrail_api_glados class testrail_api_test_data: def get_tables_from_testrail_data(self, case_id): ''' Returns a list of tables detected from the testrail Data sect...
0
7,009
23
97a3f637a741b97e0eea2c54131c6a3251af5784
1,546
py
Python
jsv/__init__.py
akovner/json-separated-values
29ffb94810c9f1f562dbb7ac98960cf2531c371c
[ "MIT" ]
null
null
null
jsv/__init__.py
akovner/json-separated-values
29ffb94810c9f1f562dbb7ac98960cf2531c371c
[ "MIT" ]
5
2018-03-20T23:02:56.000Z
2018-12-11T14:42:22.000Z
jsv/__init__.py
akovner/jsv
29ffb94810c9f1f562dbb7ac98960cf2531c371c
[ "MIT" ]
null
null
null
""" JSV is a simple library for representing many JSON objects with a similar structure. It is intended to replace json lines, csv, and other similar formats. Basic write usage >>> import jsv >>> data = [{'key_1': 1}, {'key_1': ['any','json','object'], 'other_key': None}] >>> with jsv.JSVWriter('out.jsv',...
27.122807
115
0.582794
""" JSV is a simple library for representing many JSON objects with a similar structure. It is intended to replace json lines, csv, and other similar formats. Basic write usage >>> import jsv >>> data = [{'key_1': 1}, {'key_1': ['any','json','object'], 'other_key': None}] >>> with jsv.JSVWriter('out.jsv',...
0
0
0
3efc90ac60db18ec05cc1682f2e3e5c1fedc6a11
260
py
Python
Exercicios/PythonExercicios/ex021 - 030/ex021.py
sggrilo/Curso-em-Video-Python
a0e6f3d80d89eb8709345a38e207d81a77891192
[ "MIT" ]
null
null
null
Exercicios/PythonExercicios/ex021 - 030/ex021.py
sggrilo/Curso-em-Video-Python
a0e6f3d80d89eb8709345a38e207d81a77891192
[ "MIT" ]
null
null
null
Exercicios/PythonExercicios/ex021 - 030/ex021.py
sggrilo/Curso-em-Video-Python
a0e6f3d80d89eb8709345a38e207d81a77891192
[ "MIT" ]
null
null
null
# TOCANDO UM MP3 — Faça um programa em Python que abra e reproduza áudio de um arquivo MP3. import pygame pygame.init() pygame.mixer.music.load('song.mp3') pygame.mixer.music.play() input('') pygame.event.wait() # import playsound # playsound.playsound('')
20
91
0.738462
# TOCANDO UM MP3 — Faça um programa em Python que abra e reproduza áudio de um arquivo MP3. import pygame pygame.init() pygame.mixer.music.load('song.mp3') pygame.mixer.music.play() input('') pygame.event.wait() # import playsound # playsound.playsound('')
0
0
0
6c71eb1505e6c013fa6c9c30e18bb0309450e4f5
631
py
Python
backend/core/views.py
dominikbullo/SportAgenda
fa130111e08aed38d93b9ab85e14684f362b1930
[ "Apache-2.0" ]
null
null
null
backend/core/views.py
dominikbullo/SportAgenda
fa130111e08aed38d93b9ab85e14684f362b1930
[ "Apache-2.0" ]
null
null
null
backend/core/views.py
dominikbullo/SportAgenda
fa130111e08aed38d93b9ab85e14684f362b1930
[ "Apache-2.0" ]
null
null
null
from apps.events.models import Season # TODO refactor
28.681818
76
0.679873
from apps.events.models import Season def get_object_custom_queryset(request, db_object): if request.query_params.get('season') == "all": print("Getting all events") return db_object.objects.all() # print("Getting ONLY CURRENT season data") return db_object.objects.filter(season=Season.ob...
529
0
45
e89a31d0f4abe365e17394a32c051bf9c45f7075
1,296
py
Python
d10_karatsuba.py
kuThang/py100
d808b8d8de7a97c4c00fa20e35a8bab1c56bd966
[ "Apache-2.0" ]
null
null
null
d10_karatsuba.py
kuThang/py100
d808b8d8de7a97c4c00fa20e35a8bab1c56bd966
[ "Apache-2.0" ]
null
null
null
d10_karatsuba.py
kuThang/py100
d808b8d8de7a97c4c00fa20e35a8bab1c56bd966
[ "Apache-2.0" ]
null
null
null
import numpy as np from itertools import zip_longest # x = '789456123' # y = '898989898989' x = '11' y = '1111' x_arr = list(map(int, reversed(x))) y_arr = list(map(int, reversed(y))) print(x_arr) print(y_arr) mul = karatsuba(x_arr, y_arr) print(mul) print(''.join(map(str, reversed(mul))))
19.938462
49
0.497685
import numpy as np from itertools import zip_longest def add(x, y): z, carry = [], 0 for xi, yi in zip_longest(x, y, fillvalue=0): add_i = xi + yi + carry carry = add_i // 10 z.append(add_i % 10) if carry : z.append(carry) return z def sub(x, y): z, carry = [], 0 ...
932
0
68
a388e6639b6f82c5f7aafafa6227ed055bb95a9a
923
py
Python
declension_test.py
mihai3/ggana
5b3599a87f0687d221bc052ee53bcdf7a0a5d834
[ "MIT" ]
null
null
null
declension_test.py
mihai3/ggana
5b3599a87f0687d221bc052ee53bcdf7a0a5d834
[ "MIT" ]
null
null
null
declension_test.py
mihai3/ggana
5b3599a87f0687d221bc052ee53bcdf7a0a5d834
[ "MIT" ]
null
null
null
import unittest from declension import Declension, DeclensionResult if __name__ == "__main__": unittest.main()
36.92
88
0.654388
import unittest from declension import Declension, DeclensionResult class DeclensionTest(unittest.TestCase): def test_lemmatizer(self): with Declension() as d: self.assertEqual(d.lemmatize("Chinesinnen"), "Chinesin") self.assertIsNone(d.lemmatize("Erfundeneswortdasesnichtgibt")) ...
659
19
130
db9e7506df7ca129d96474119cf414c8ee734f80
3,281
py
Python
deepchem/molnet/load_function/freesolv_dataset.py
deloragaskins/deepchem
234ab699cdb997e5963966a8b6926cb2cda7c064
[ "MIT" ]
3,782
2016-02-21T03:53:11.000Z
2022-03-31T16:10:26.000Z
deepchem/molnet/load_function/freesolv_dataset.py
deloragaskins/deepchem
234ab699cdb997e5963966a8b6926cb2cda7c064
[ "MIT" ]
2,666
2016-02-11T01:54:54.000Z
2022-03-31T11:14:33.000Z
deepchem/molnet/load_function/freesolv_dataset.py
deloragaskins/deepchem
234ab699cdb997e5963966a8b6926cb2cda7c064
[ "MIT" ]
1,597
2016-02-21T03:10:08.000Z
2022-03-30T13:21:28.000Z
""" freesolv dataset loader. """ import os import deepchem as dc from deepchem.molnet.load_function.molnet_loader import TransformerGenerator, _MolnetLoader from deepchem.data import Dataset from typing import List, Optional, Tuple, Union FREESOLV_URL = 'https://deepchemdata.s3.us-west-1.amazonaws.com/datasets/freesol...
40.012195
91
0.734532
""" freesolv dataset loader. """ import os import deepchem as dc from deepchem.molnet.load_function.molnet_loader import TransformerGenerator, _MolnetLoader from deepchem.data import Dataset from typing import List, Optional, Tuple, Union FREESOLV_URL = 'https://deepchemdata.s3.us-west-1.amazonaws.com/datasets/freesol...
360
16
48
773e2c2c626727fe8b1a52f7790c86fd79ce3beb
575
py
Python
functions/recommendation_functions/google_suggest.py
Bernardo-Senna/keyword_recommender
3cf1a4945786b9f63e76cf6c3198f3da311fa34b
[ "MIT" ]
null
null
null
functions/recommendation_functions/google_suggest.py
Bernardo-Senna/keyword_recommender
3cf1a4945786b9f63e76cf6c3198f3da311fa34b
[ "MIT" ]
null
null
null
functions/recommendation_functions/google_suggest.py
Bernardo-Senna/keyword_recommender
3cf1a4945786b9f63e76cf6c3198f3da311fa34b
[ "MIT" ]
null
null
null
import json import requests def get_recommendation_suggest(seed_keyword): """get the list of auto-complete suggestions of google search""" try: url = f'http://suggestqueries.google.com/complete/search?client=firefox&q={seed_keyword}' headers = {'User-agent': 'Mozilla/5.0'} response = re...
35.9375
97
0.702609
import json import requests def get_recommendation_suggest(seed_keyword): """get the list of auto-complete suggestions of google search""" try: url = f'http://suggestqueries.google.com/complete/search?client=firefox&q={seed_keyword}' headers = {'User-agent': 'Mozilla/5.0'} response = re...
0
0
0
9a6b393e29185eb639796c4a0c233dab86bcd235
2,644
py
Python
download_jsons.py
kcliu/issue_aggregator
ddcf4393de8e4f3ab04989e688cac660e36a9a82
[ "MIT" ]
null
null
null
download_jsons.py
kcliu/issue_aggregator
ddcf4393de8e4f3ab04989e688cac660e36a9a82
[ "MIT" ]
null
null
null
download_jsons.py
kcliu/issue_aggregator
ddcf4393de8e4f3ab04989e688cac660e36a9a82
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import json import os import re import requests if __name__ == '__main__': download()
26.707071
88
0.574508
#!/usr/bin/env python3 import json import os import re import requests def get_authtoken(): with open('./config.json', 'r') as f: config = json.load(f) authtoken = config['token'] return authtoken def download_repos(session, repo_list_fpath, out_fpath): print('===== Download Repos St...
2,432
0
92
9afa75bf90503d63d131346b27ed10e0bcaffeb1
1,770
py
Python
opinions/united_states/federal_appellate/ca4.py
brianwc/juriscraper
f95221c3ab38ef89e642a3f5ed5569f73866d636
[ "BSD-2-Clause" ]
null
null
null
opinions/united_states/federal_appellate/ca4.py
brianwc/juriscraper
f95221c3ab38ef89e642a3f5ed5569f73866d636
[ "BSD-2-Clause" ]
null
null
null
opinions/united_states/federal_appellate/ca4.py
brianwc/juriscraper
f95221c3ab38ef89e642a3f5ed5569f73866d636
[ "BSD-2-Clause" ]
null
null
null
from juriscraper.OpinionSite import OpinionSite from datetime import date from datetime import datetime from datetime import timedelta
32.777778
86
0.549718
from juriscraper.OpinionSite import OpinionSite from datetime import date from datetime import datetime from datetime import timedelta class Site(OpinionSite): def __init__(self): super(Site, self).__init__() self.url = 'http://pacer.ca4.uscourts.gov/cgi-bin/opinions.pl' self.court_id = se...
1,447
3
184
c74f6af4e3f888812f14899b41c8b0d694dedd1b
1,223
py
Python
Media/nyts/Machinima/crowdScene/Scripts/WorldInit.py
dmacka/MultiverseClientServer
b64d7d754a0b2b1a3e5acabd4d6ebb80ab1d9379
[ "MIT" ]
5
2020-04-29T19:14:57.000Z
2022-02-18T08:48:37.000Z
Media/nyts/Machinima/crowdScene/Scripts/WorldInit.py
dmacka/MultiverseClientServer
b64d7d754a0b2b1a3e5acabd4d6ebb80ab1d9379
[ "MIT" ]
null
null
null
Media/nyts/Machinima/crowdScene/Scripts/WorldInit.py
dmacka/MultiverseClientServer
b64d7d754a0b2b1a3e5acabd4d6ebb80ab1d9379
[ "MIT" ]
2
2021-03-09T06:53:30.000Z
2021-03-27T12:02:39.000Z
import System import ClientAPI import SAWorld import SAUtil # This function is an event handler that runs when the world has been initialized. # Register an event handler that will run when the world has been initialized. ClientAPI.World.RegisterEventHandler('WorldInitialized', WorldInitHandler)
30.575
82
0.733442
import System import ClientAPI import SAWorld import SAUtil def SetupPanorama(): camera = ClientAPI.GetPlayerCamera() ClientAPI.GrabPlayerCamera() camera.FieldOfView = 90 camera.Near = 15000 camera.ProjectionType = ClientAPI.Camera.Projection.Orthographic pos, orient, props = SAWorld....
874
0
45
e6f74f61fc1265d7082537a796a7d601bab1f712
2,010
py
Python
branches.py
AlfrescoLabs/bamboo-migration-tools
8c47a0663d29aa514970027b1f9cf7ed59b26779
[ "Apache-2.0" ]
null
null
null
branches.py
AlfrescoLabs/bamboo-migration-tools
8c47a0663d29aa514970027b1f9cf7ed59b26779
[ "Apache-2.0" ]
null
null
null
branches.py
AlfrescoLabs/bamboo-migration-tools
8c47a0663d29aa514970027b1f9cf7ed59b26779
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import csv import sys from lib.config import get_or_create as get_or_create_config from lib.rest import REST_CONFIG_FIELDS, api_get, api_get_paged config = get_or_create_config('config.ini', 'bamboo', REST_CONFIG_FIELDS) auth = (config['username'], config['password']) base_path = config['url'] writ...
46.744186
327
0.70398
#!/usr/bin/python import csv import sys from lib.config import get_or_create as get_or_create_config from lib.rest import REST_CONFIG_FIELDS, api_get, api_get_paged config = get_or_create_config('config.ini', 'bamboo', REST_CONFIG_FIELDS) auth = (config['username'], config['password']) base_path = config['url'] writ...
961
0
92
90252ac71094874752fccb216c5531f908088155
250
py
Python
Python/MAHASENA.py
sid-146/Python-RePo-sEm-6
daf23074a411d38013329baf9eb2b8fb0c42fc54
[ "MIT" ]
null
null
null
Python/MAHASENA.py
sid-146/Python-RePo-sEm-6
daf23074a411d38013329baf9eb2b8fb0c42fc54
[ "MIT" ]
null
null
null
Python/MAHASENA.py
sid-146/Python-RePo-sEm-6
daf23074a411d38013329baf9eb2b8fb0c42fc54
[ "MIT" ]
null
null
null
l = int(input()) evenChk, oddChk = 0, 0 for i in range(0, l): number = int(input()) if number % 2 == 0: evenChk += 1 else: oddChk += 1 if evenChk > oddChk: print("READY FOR BATTLE ") else: print("NOT READY")
16.666667
30
0.524
l = int(input()) evenChk, oddChk = 0, 0 for i in range(0, l): number = int(input()) if number % 2 == 0: evenChk += 1 else: oddChk += 1 if evenChk > oddChk: print("READY FOR BATTLE ") else: print("NOT READY")
0
0
0
614d1b042e3326dfa610bab96aa07c9259278ab1
160
py
Python
count.py
doctoryes/python-morsels
4899cea21f4758a6ec8640e2152f40b3b9145dee
[ "MIT" ]
null
null
null
count.py
doctoryes/python-morsels
4899cea21f4758a6ec8640e2152f40b3b9145dee
[ "MIT" ]
null
null
null
count.py
doctoryes/python-morsels
4899cea21f4758a6ec8640e2152f40b3b9145dee
[ "MIT" ]
null
null
null
import re from collections import Counter
20
65
0.69375
import re from collections import Counter def count_words(word_str): words = Counter(re.findall(r"\b[\w'-]+\b", word_str.lower())) return dict(words)
94
0
23
737fb7b203a4c82b499fc7ef3d16640aae568988
1,362
py
Python
aoc/year2019/day17/day17.py
Godsmith/adventofcode
3c59ea66830f82b63881e0ea19bfe3076f2a500d
[ "Unlicense" ]
null
null
null
aoc/year2019/day17/day17.py
Godsmith/adventofcode
3c59ea66830f82b63881e0ea19bfe3076f2a500d
[ "Unlicense" ]
null
null
null
aoc/year2019/day17/day17.py
Godsmith/adventofcode
3c59ea66830f82b63881e0ea19bfe3076f2a500d
[ "Unlicense" ]
null
null
null
from aocd import data from aoc.utils import ints from aoc.year2019.intcode import Intcode if __name__ == '__main__': main()
21.967742
87
0.606461
from aocd import data from aoc.utils import ints from aoc.year2019.intcode import Intcode def main(): intcode = Intcode(ints(data)) outputs = intcode.run_to_next_input(None) s = ''.join(map(chr, outputs)) print(s) print(alignment_parameter_sum(s)) # part 2 activated_program = ints(data) ...
1,110
0
115
9c383187182b70b63f075e3e258b0198ef936769
660
py
Python
scripts/cache.py
the-mute-bow/the-mute-bow.github.io
46a9f30b98928b212b69c85ad1384db6c6e5f586
[ "RSA-MD" ]
null
null
null
scripts/cache.py
the-mute-bow/the-mute-bow.github.io
46a9f30b98928b212b69c85ad1384db6c6e5f586
[ "RSA-MD" ]
null
null
null
scripts/cache.py
the-mute-bow/the-mute-bow.github.io
46a9f30b98928b212b69c85ad1384db6c6e5f586
[ "RSA-MD" ]
null
null
null
from os import listdir extentions = ['html', 'css', 'js', 'png', 'gif', 'mp3', 'woff', 'woff2'] black_list = ['.git', 'sw.js', 'old', 'CNAME', 'CACHE', '_base', 'anim'] data = '' search('') print('Finished\n') with open('CACHE', 'w') as f: f.write(data)
23.571429
72
0.536364
from os import listdir extentions = ['html', 'css', 'js', 'png', 'gif', 'mp3', 'woff', 'woff2'] black_list = ['.git', 'sw.js', 'old', 'CNAME', 'CACHE', '_base', 'anim'] data = '' def search(IN: str) -> None: global data for file in listdir(IN if IN != '' else None): path = ('./' + file) if IN == '' else ('./' + ...
377
0
23
020f6988374f741a3f5fbec9aef3f148b21ef9f8
882
py
Python
ultron/actions/twitter/retrievemessage.py
Prakash2403/ultron
7d1067eb98ef52f6a88299534ea204e7ae45d7a7
[ "MIT" ]
13
2017-08-15T15:50:13.000Z
2019-06-03T10:24:50.000Z
ultron/actions/twitter/retrievemessage.py
Prakash2403/ultron
7d1067eb98ef52f6a88299534ea204e7ae45d7a7
[ "MIT" ]
3
2017-08-29T16:35:04.000Z
2021-06-01T23:49:16.000Z
ultron/actions/twitter/retrievemessage.py
Prakash2403/ultron
7d1067eb98ef52f6a88299534ea204e7ae45d7a7
[ "MIT" ]
4
2017-08-16T09:33:59.000Z
2019-06-05T07:25:30.000Z
from ultron.actions import Action from ultron.helpers.twitter_helper import load_api
30.413793
65
0.599773
from ultron.actions import Action from ultron.helpers.twitter_helper import load_api class RetrieveMessage(Action): def __init__(self): self.api = load_api() self.retrieve_message_status = False self.messages = None def pre_execute(self): pass def execute(self): "...
470
303
23
385c67364fb71e17a02b2708184a551d78ac2a8e
321
py
Python
messengerext/pages/urls.py
groupsome/groupsome
4edcf30d66ff458c4df37d3198ef187219a768d7
[ "MIT" ]
6
2016-10-07T13:43:17.000Z
2017-10-07T22:34:44.000Z
messengerext/pages/urls.py
groupsome/groupsome
4edcf30d66ff458c4df37d3198ef187219a768d7
[ "MIT" ]
null
null
null
messengerext/pages/urls.py
groupsome/groupsome
4edcf30d66ff458c4df37d3198ef187219a768d7
[ "MIT" ]
1
2020-07-15T04:29:31.000Z
2020-07-15T04:29:31.000Z
from django.conf.urls import url, include from . import views urlpatterns = [ url(r'^landing/?$', views.LandingView.as_view(), name='landing'), url(r'^registration/?$', views.RegistrationView.as_view(), name='registration'), url(r'^legal_notice/?$', views.LegalNoticeView.as_view(), name='legal_notice'), ]...
32.1
84
0.697819
from django.conf.urls import url, include from . import views urlpatterns = [ url(r'^landing/?$', views.LandingView.as_view(), name='landing'), url(r'^registration/?$', views.RegistrationView.as_view(), name='registration'), url(r'^legal_notice/?$', views.LegalNoticeView.as_view(), name='legal_notice'), ]...
0
0
0
c2e1f1e34af41bae6e5ab19ea0818c727f5f9db8
424
py
Python
examples/geschenken_fractieleden_example.py
openkamer/tk-api-python
907b98ccc7602ad7e3e74f1e06f9544fbe66aba3
[ "MIT" ]
9
2017-11-16T12:39:11.000Z
2021-10-16T19:30:52.000Z
examples/geschenken_fractieleden_example.py
openkamer/tk-api-python
907b98ccc7602ad7e3e74f1e06f9544fbe66aba3
[ "MIT" ]
1
2017-11-16T14:20:20.000Z
2017-11-20T18:49:14.000Z
examples/geschenken_fractieleden_example.py
openkamer/tk-api-python
907b98ccc7602ad7e3e74f1e06f9544fbe66aba3
[ "MIT" ]
3
2018-09-10T18:57:39.000Z
2020-06-09T14:13:10.000Z
from tkapi.util import queries if '__main__' == __name__: example_geschenken_fractieleden_actief()
28.266667
63
0.70283
from tkapi.util import queries def example_geschenken_fractieleden_actief(): leden_actief = queries.get_fractieleden_actief() for lid in leden_actief: persoon = lid.persoon print('{} ({})'.format(persoon, lid.fractie.afkorting)) for geschenk in lid.persoon.geschenken: print...
295
0
23
9ba50a22097073447a54847828922ff6be4ecf8e
2,635
py
Python
day7.py
DahlitzFlorian/advent-of-code-2018
09f3f6e40d75878dbb055c2ecc81f0165835f3e8
[ "Apache-2.0" ]
null
null
null
day7.py
DahlitzFlorian/advent-of-code-2018
09f3f6e40d75878dbb055c2ecc81f0165835f3e8
[ "Apache-2.0" ]
null
null
null
day7.py
DahlitzFlorian/advent-of-code-2018
09f3f6e40d75878dbb055c2ecc81f0165835f3e8
[ "Apache-2.0" ]
null
null
null
import click import collections import operator @click.command() @click.option("--part", default=2, help="Part of the challenge (either 1 or 2)") if __name__ == "__main__": main()
23.738739
80
0.580645
import click import collections import operator @click.command() @click.option("--part", default=2, help="Part of the challenge (either 1 or 2)") def main(part: int): with open("input") as f: instructions = [line.strip() for line in f.readlines()] dependencies = {} used_letters = set() for i...
2,329
0
114
47837c1d47d643ca13ab6bd7cc6ecb4d3655a30f
1,219
py
Python
src/oneagent/_impl/native/sdkdllinfo.py
Dynatrace/OneAgent-SDK-for-Python
fa4dd209b6a21407abca09a6fb8da1b85755ab0a
[ "Apache-2.0" ]
20
2018-05-22T22:12:23.000Z
2021-11-16T22:24:52.000Z
src/oneagent/_impl/native/sdkdllinfo.py
Dynatrace/OneAgent-SDK-for-Python
fa4dd209b6a21407abca09a6fb8da1b85755ab0a
[ "Apache-2.0" ]
15
2018-12-11T15:02:39.000Z
2021-01-15T12:06:18.000Z
src/oneagent/_impl/native/sdkdllinfo.py
Dynatrace/OneAgent-SDK-for-Python
fa4dd209b6a21407abca09a6fb8da1b85755ab0a
[ "Apache-2.0" ]
6
2018-10-05T08:39:18.000Z
2022-01-14T03:18:39.000Z
# # Copyright 2018 Dynatrace LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
29.02381
77
0.692371
# # Copyright 2018 Dynatrace LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
312
0
45
4a97e6af009cae396da41dd9861365359d7c3749
4,155
py
Python
migrate/views.py
pwqbot/eoj3
46be6a6f192798e74eab7b327bb8df7ca73575d9
[ "MIT" ]
107
2017-03-15T11:53:45.000Z
2019-09-06T11:23:44.000Z
migrate/views.py
OS-EDU/eoj3
f117dcd4e3cea7d150c3e3794e7255e00d486c88
[ "MIT" ]
27
2019-09-24T12:44:48.000Z
2022-03-11T23:18:21.000Z
migrate/views.py
OS-EDU/eoj3
f117dcd4e3cea7d150c3e3794e7255e00d486c88
[ "MIT" ]
25
2019-10-11T10:39:12.000Z
2022-03-18T05:15:57.000Z
import logging import threading import traceback from hashlib import sha1 from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core.mail import send_mail from django.db import transaction from django.shortcuts import render from acc...
38.831776
110
0.619735
import logging import threading import traceback from hashlib import sha1 from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core.mail import send_mail from django.db import transaction from django.shortcuts import render from acc...
3,322
19
117
c976908ca5479606e34da4eb7b1d1652d0ce7a93
3,049
py
Python
apps/base/urls.py
samsagaz/pyerp
db61bca307f73c13f4ad5a2ffb4531132ea5b605
[ "MIT" ]
1
2020-02-26T19:36:08.000Z
2020-02-26T19:36:08.000Z
apps/base/urls.py
samsagaz/pyerp
db61bca307f73c13f4ad5a2ffb4531132ea5b605
[ "MIT" ]
null
null
null
apps/base/urls.py
samsagaz/pyerp
db61bca307f73c13f4ad5a2ffb4531132ea5b605
[ "MIT" ]
2
2020-02-26T19:36:12.000Z
2020-03-16T16:30:57.000Z
from django.urls import path from django.contrib.auth import views as auth_views from ..base.views import CustomerListView, PartnerDetailView, PartnerCreateView, PartnerUpdateView, DeletePartner, ProviderListView from ..base.views import CompanyListView from ..base.views import ProductListView, ProductDetailView, Produ...
64.87234
135
0.737619
from django.urls import path from django.contrib.auth import views as auth_views from ..base.views import CustomerListView, PartnerDetailView, PartnerCreateView, PartnerUpdateView, DeletePartner, ProviderListView from ..base.views import CompanyListView from ..base.views import ProductListView, ProductDetailView, Produ...
0
0
0
4358aeacf7c4277c6e1e276b9551e3c567c62891
5,680
py
Python
exercises/adaboost_scenario.py
DanitYanowsky/IML.HUJI
391b661ede3fdbb72ecdf900c32df69445b3868b
[ "MIT" ]
null
null
null
exercises/adaboost_scenario.py
DanitYanowsky/IML.HUJI
391b661ede3fdbb72ecdf900c32df69445b3868b
[ "MIT" ]
null
null
null
exercises/adaboost_scenario.py
DanitYanowsky/IML.HUJI
391b661ede3fdbb72ecdf900c32df69445b3868b
[ "MIT" ]
null
null
null
import numpy as np from typing import Tuple from IMLearn.metalearners.adaboost import AdaBoost from IMLearn.learners.classifiers import DecisionStump from utils import * import plotly.graph_objects as go from plotly.subplots import make_subplots def generate_data(n: int, noise_ratio: float) -> Tuple[np.ndarray, np....
44.031008
117
0.608803
import numpy as np from typing import Tuple from IMLearn.metalearners.adaboost import AdaBoost from IMLearn.learners.classifiers import DecisionStump from utils import * import plotly.graph_objects as go from plotly.subplots import make_subplots def generate_data(n: int, noise_ratio: float) -> Tuple[np.ndarray, np....
4,445
0
23
58239f3df351b904d535943af702ab1bd2af852c
5,780
py
Python
1_dpp/dp.py
dongminlee94/supplement4deeprl
4db1a83f5dd3254abd8135fe94734a0d8d14a957
[ "MIT" ]
1
2022-01-17T15:20:28.000Z
2022-01-17T15:20:28.000Z
1_dpp/dp.py
dongminlee94/supplement4deeprl
4db1a83f5dd3254abd8135fe94734a0d8d14a957
[ "MIT" ]
null
null
null
1_dpp/dp.py
dongminlee94/supplement4deeprl
4db1a83f5dd3254abd8135fe94734a0d8d14a957
[ "MIT" ]
null
null
null
import gym import time import argparse import numpy as np class DynamicProgramming(object): """An implementation of the policy iteration, value iteration.""" if __name__ == "__main__": # Configurations parser = argparse.ArgumentParser(description='Traditional RL algorithms in FrozenLake environment') pars...
36.582278
106
0.592042
import gym import time import argparse import numpy as np class DynamicProgramming(object): """An implementation of the policy iteration, value iteration.""" def __init__(self, env, obs_num, act_num, gamma=0.99, epsilon=1e-6, ): ...
4,376
0
156
165f93a5281773da762dc9944142b898b01b55ed
1,690
py
Python
tddata/bonds.py
dkkomesu/tddata
9bf0f366850c74b784dc5edb2dd0d6f0948d5ab3
[ "MIT" ]
3
2021-05-16T21:17:40.000Z
2022-02-22T14:46:43.000Z
tddata/bonds.py
dkkomesu/tddata
9bf0f366850c74b784dc5edb2dd0d6f0948d5ab3
[ "MIT" ]
5
2021-04-06T18:16:31.000Z
2021-04-09T20:46:33.000Z
tddata/bonds.py
dankkom/tddata
9bf0f366850c74b784dc5edb2dd0d6f0948d5ab3
[ "MIT" ]
null
null
null
BONDS = { "aliases": { "tesouro prefixado": "LTN", "ltn": "LTN", "tesouro prefixado com juros semestrais": "NTN-F", "ntn-f": "NTN-F", "ntnf": "NTN-F", "tesouro ipca+": "NTN-B Principal", "ntn-b principal": "NTN-B Principal", "ntnbp": "NTN-B Principa...
25.606061
73
0.454438
BONDS = { "aliases": { "tesouro prefixado": "LTN", "ltn": "LTN", "tesouro prefixado com juros semestrais": "NTN-F", "ntn-f": "NTN-F", "ntnf": "NTN-F", "tesouro ipca+": "NTN-B Principal", "ntn-b principal": "NTN-B Principal", "ntnbp": "NTN-B Principa...
0
0
0
512819659542716af100678d1620ed213ee960c4
426
py
Python
testapp/models.py
lbrant1/django-history-triggers
d955be0ffaf28e006e0fe5f4bc078364b336ccd8
[ "BSD-2-Clause" ]
null
null
null
testapp/models.py
lbrant1/django-history-triggers
d955be0ffaf28e006e0fe5f4bc078364b336ccd8
[ "BSD-2-Clause" ]
null
null
null
testapp/models.py
lbrant1/django-history-triggers
d955be0ffaf28e006e0fe5f4bc078364b336ccd8
[ "BSD-2-Clause" ]
null
null
null
from django.db import models
25.058824
70
0.744131
from django.db import models class Author (models.Model): name = models.CharField(max_length=100) class Publisher (models.Model): name = models.CharField(max_length=100) class Book (models.Model): title = models.CharField(max_length=100) authors = models.ManyToManyField(Author) publisher = mod...
0
325
69
ec1d22cec893f32caf8134f561c43c61687db779
11,262
py
Python
resources/libraries/python/Map.py
preym17/csit
3151c98618c78e3782e48bbe4d9c8f906c126f69
[ "Apache-2.0" ]
null
null
null
resources/libraries/python/Map.py
preym17/csit
3151c98618c78e3782e48bbe4d9c8f906c126f69
[ "Apache-2.0" ]
null
null
null
resources/libraries/python/Map.py
preym17/csit
3151c98618c78e3782e48bbe4d9c8f906c126f69
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 Cisco and/or its affiliates. # 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 ag...
39.93617
80
0.554076
# Copyright (c) 2018 Cisco and/or its affiliates. # 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 ag...
0
0
0
7316fdbb7007cc275db81c50dbf936356d886d0c
2,039
py
Python
examples/http-post.py
karpierz/libcurl
531bd28ab32fb07c152e5b5ca4bd4dbde059b9a8
[ "Zlib" ]
null
null
null
examples/http-post.py
karpierz/libcurl
531bd28ab32fb07c152e5b5ca4bd4dbde059b9a8
[ "Zlib" ]
null
null
null
examples/http-post.py
karpierz/libcurl
531bd28ab32fb07c152e5b5ca4bd4dbde059b9a8
[ "Zlib" ]
null
null
null
#*************************************************************************** # _ _ ____ _ # Project ___| | | | _ \| | # / __| | | | |_) | | # | (__| |_| | _ <| |___ # \___|\___/|...
33.42623
88
0.575282
#*************************************************************************** # _ _ ____ _ # Project ___| | | | _ \| | # / __| | | | |_) | | # | (__| |_| | _ <| |___ # \___|\___/|...
851
0
23
0a529cfbaf77fcfa6763f418ccad45e7c7503777
6,889
py
Python
Horse.py
acresende/data-mining-puc-final-task
850f584e6f4fa9d3739fe2119ce3c37a41eab68e
[ "MIT" ]
null
null
null
Horse.py
acresende/data-mining-puc-final-task
850f584e6f4fa9d3739fe2119ce3c37a41eab68e
[ "MIT" ]
null
null
null
Horse.py
acresende/data-mining-puc-final-task
850f584e6f4fa9d3739fe2119ce3c37a41eab68e
[ "MIT" ]
1
2019-11-26T13:39:34.000Z
2019-11-26T13:39:34.000Z
# coding: utf-8 # # Import Bibliotecas # In[1]: get_ipython().run_line_magic('matplotlib', 'inline') from sklearn.model_selection import train_test_split from sklearn.neighbors import KNeighborsClassifier from sklearn.feature_selection import RFE from sklearn.linear_model import LogisticRegression import pandas a...
18.771117
136
0.689215
# coding: utf-8 # # Import Bibliotecas # In[1]: get_ipython().run_line_magic('matplotlib', 'inline') from sklearn.model_selection import train_test_split from sklearn.neighbors import KNeighborsClassifier from sklearn.feature_selection import RFE from sklearn.linear_model import LogisticRegression import pandas a...
0
0
0
dd0801433e3c004df97331cb76c88aae59fb5c77
1,267
py
Python
boupy/check/check.py
SeBecker/boupy
a540541435d1bddceecb981c4a829bfbc2ac0b75
[ "MIT" ]
null
null
null
boupy/check/check.py
SeBecker/boupy
a540541435d1bddceecb981c4a829bfbc2ac0b75
[ "MIT" ]
null
null
null
boupy/check/check.py
SeBecker/boupy
a540541435d1bddceecb981c4a829bfbc2ac0b75
[ "MIT" ]
null
null
null
"""This module provides some capabilities to check the integrity of the package.""" import os from boupy.check.custom_exceptions import UserError def check_consistency(init_dict): """This function performs some basic checks regarding the integrity of the user's request. There should be no uncontrolled termin...
36.2
88
0.659826
"""This module provides some capabilities to check the integrity of the package.""" import os from boupy.check.custom_exceptions import UserError def check_consistency(init_dict): """This function performs some basic checks regarding the integrity of the user's request. There should be no uncontrolled termin...
0
0
0
05a33e294724d36037e2e4e46b357dfe2d6e125b
9,548
py
Python
experiments/twitter_event_data_2019/evaluation/keyword_evaluate.py
HHansi/WhatsUp
87c3eb90570d2f997d8f1abc300a3553f8ef7ca9
[ "Apache-2.0" ]
null
null
null
experiments/twitter_event_data_2019/evaluation/keyword_evaluate.py
HHansi/WhatsUp
87c3eb90570d2f997d8f1abc300a3553f8ef7ca9
[ "Apache-2.0" ]
null
null
null
experiments/twitter_event_data_2019/evaluation/keyword_evaluate.py
HHansi/WhatsUp
87c3eb90570d2f997d8f1abc300a3553f8ef7ca9
[ "Apache-2.0" ]
null
null
null
# Created by Hansi at 7/6/2021 import editdistance import numpy as np from scipy.optimize import linear_sum_assignment def find_best_match(cluster, groundtruth_event, exact_match=True, cluster_n=None): """ Find best match (event duplicate) for the event cluster wrt the given event parameters -------...
48.222222
120
0.630603
# Created by Hansi at 7/6/2021 import editdistance import numpy as np from scipy.optimize import linear_sum_assignment class MatchedCluster: def __init__(self, cluster_words, gt_event_words, matched_words, keyword_n, keyword_tp): self.cluster = cluster_words self.gt_event = gt_event_words ...
352
0
49
e3cc3e1dd009a0f81ef763bdb403fa42619b84b9
1,126
py
Python
ip_country_search/main.py
manumathew23/ip-country-search
37f4487faaca8df74c21c61ae97201349ae19846
[ "MIT" ]
2
2019-09-10T06:27:05.000Z
2021-12-30T15:19:19.000Z
ip_country_search/main.py
manumathew23/ip-country-search
37f4487faaca8df74c21c61ae97201349ae19846
[ "MIT" ]
null
null
null
ip_country_search/main.py
manumathew23/ip-country-search
37f4487faaca8df74c21c61ae97201349ae19846
[ "MIT" ]
1
2021-12-30T15:19:24.000Z
2021-12-30T15:19:24.000Z
import concurrent.futures import csv import math from ipaddress import ip_address, IPv4Address import bisect from urllib.parse import urlencode, quote_plus import itertools from .constants import * from .helpers import * rir_file = [rir + ".csv" for rir in list(RIR_URL_MAPPING.keys())] # Parse RIR file data data =...
26.809524
94
0.701599
import concurrent.futures import csv import math from ipaddress import ip_address, IPv4Address import bisect from urllib.parse import urlencode, quote_plus import itertools from .constants import * from .helpers import * def update_rir_files(): with concurrent.futures.ProcessPoolExecutor(max_workers=len(RIR_URL_...
497
0
46
0b0a9dc713a85a0e9e52b654240b1a0c0342b452
1,138
py
Python
var/spack/repos/builtin/packages/r-assertive-reflection/package.py
varioustoxins/spack
cab0e4cb240f34891a6d753f3393e512f9a99e9a
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/r-assertive-reflection/package.py
varioustoxins/spack
cab0e4cb240f34891a6d753f3393e512f9a99e9a
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
6
2022-01-08T08:41:11.000Z
2022-03-14T19:28:07.000Z
var/spack/repos/builtin/packages/r-assertive-reflection/package.py
foeroyingur/spack
5300cbbb2e569190015c72d0970d25425ea38647
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RAssertiveReflection(RPackage): """assertive.reflection: Assertions for Checking the State...
42.148148
97
0.73638
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RAssertiveReflection(RPackage): """assertive.reflection: Assertions for Checking the State...
0
0
0
446a43907abe9d8d3aeb87680f9176aebcd26741
2,411
py
Python
Fcos_seg/data/coco_dataset.py
ricky40403/Fcos_seg
e2803108ca0114b906c739aa348e8b28f3c6342c
[ "MIT" ]
null
null
null
Fcos_seg/data/coco_dataset.py
ricky40403/Fcos_seg
e2803108ca0114b906c739aa348e8b28f3c6342c
[ "MIT" ]
1
2021-09-29T17:10:01.000Z
2021-09-29T17:10:01.000Z
Fcos_seg/data/coco_dataset.py
ricky40403/Fcos_seg
e2803108ca0114b906c739aa348e8b28f3c6342c
[ "MIT" ]
null
null
null
import torch import torchvision from Fcos_seg.utils.box_list import BoxList
27.397727
95
0.591871
import torch import torchvision from Fcos_seg.utils.box_list import BoxList def has_only_empty_bbox(annot): return all(any(o <= 1 for o in obj['bbox'][2:]) for obj in annot) def has_valid_annotation(annot): if len(annot) == 0: return False if has_only_empty_bbox(annot): return Fals...
2,107
38
157
53ef7d41cfd02d01bea136b337f6e4013ef28fde
527
py
Python
oscar/lib/python2.7/site-packages/phonenumbers/data/region_878.py
AMuratTuran/mkn
557086426773ced10d82c969304bd349414a601e
[ "BSD-3-Clause" ]
4
2018-10-19T04:36:20.000Z
2020-02-13T16:14:09.000Z
oscar/lib/python2.7/site-packages/phonenumbers/data/region_878.py
AMuratTuran/mkn
557086426773ced10d82c969304bd349414a601e
[ "BSD-3-Clause" ]
5
2020-03-24T16:37:25.000Z
2021-06-10T21:24:54.000Z
upibo-venv/Lib/site-packages/phonenumbers/data/region_878.py
smbpgroup/upibo
625dcda9f9692c62aeb9fe8f7123a5d407c610ae
[ "BSD-3-Clause" ]
null
null
null
"""Auto-generated file, do not edit by hand. 878 metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_878 = PhoneMetadata(id='001', country_code=878, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='1\\d{11}', possible_length=(12,)), ...
65.875
116
0.73814
"""Auto-generated file, do not edit by hand. 878 metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_878 = PhoneMetadata(id='001', country_code=878, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='1\\d{11}', possible_length=(12,)), ...
0
0
0
73c431bc255e30ab11e4c59b95bd0eec1d28f00c
633
py
Python
programmers/skill-test-lv2/skill_tree.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
3
2019-03-09T05:19:23.000Z
2019-04-06T09:26:36.000Z
programmers/skill-test-lv2/skill_tree.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
1
2020-02-23T10:38:04.000Z
2020-02-23T10:38:04.000Z
programmers/skill-test-lv2/skill_tree.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
1
2019-05-22T13:47:53.000Z
2019-05-22T13:47:53.000Z
# https://programmers.co.kr/learn/courses/30/lessons/49993 # 스킬트리 skill = 'CBD' skill_trees = ["BACDE", "CBADF", "AECB", "BDA"] cnt = 0 for tree in skill_trees: if is_validate(tree, skill) == True: cnt += 1 print(cnt)
26.375
62
0.614534
# https://programmers.co.kr/learn/courses/30/lessons/49993 # 스킬트리 def is_validate(item:str, string:str)->bool: chr_list = [c for c in item if c in string] check_list = [] for i in range(len(chr_list)): if string[0] in chr_list and chr_list[i] == string[i]: check_list.append(chr_list[i])...
379
0
23
10bfec843465aa20129ae7e2999ed499ac8a8c51
12,885
py
Python
models/Market1501TripletModel.py
rootadminWalker/autoencoder-siamese-experiments
4f3584dea08eefe70dc3383a09a7baf5d2588f00
[ "MIT" ]
null
null
null
models/Market1501TripletModel.py
rootadminWalker/autoencoder-siamese-experiments
4f3584dea08eefe70dc3383a09a7baf5d2588f00
[ "MIT" ]
null
null
null
models/Market1501TripletModel.py
rootadminWalker/autoencoder-siamese-experiments
4f3584dea08eefe70dc3383a09a7baf5d2588f00
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2021 Thomas Leong Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
35.108992
102
0.632674
""" MIT License Copyright (c) 2021 Thomas Leong Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
10,336
829
297
2be9ca2d3248ef3f0d25a49d917718285ffdb912
637
py
Python
settings.py
velrest/django-localized-fields
d308e773cf01ce84b7c91e97fd905de2434e3516
[ "MIT" ]
null
null
null
settings.py
velrest/django-localized-fields
d308e773cf01ce84b7c91e97fd905de2434e3516
[ "MIT" ]
null
null
null
settings.py
velrest/django-localized-fields
d308e773cf01ce84b7c91e97fd905de2434e3516
[ "MIT" ]
null
null
null
import dj_database_url DEBUG = True TEMPLATE_DEBUG = True SECRET_KEY = 'this is my secret key' # NOQA TEST_RUNNER = 'django.test.runner.DiscoverRunner' DATABASES = { 'default': dj_database_url.config(default='postgres:///localized_fields') } DATABASES['default']['ENGINE'] = 'psqlextra.backend' LANGUAGE_CODE ...
19.30303
77
0.697017
import dj_database_url DEBUG = True TEMPLATE_DEBUG = True SECRET_KEY = 'this is my secret key' # NOQA TEST_RUNNER = 'django.test.runner.DiscoverRunner' DATABASES = { 'default': dj_database_url.config(default='postgres:///localized_fields') } DATABASES['default']['ENGINE'] = 'psqlextra.backend' LANGUAGE_CODE ...
0
0
0
c08b8cff2e2cf1bd753344943444ebd8ba578acd
4,275
py
Python
src/bot.py
superstepa/SpeckChecker
ce33adb6ee1605766ff2d3e60c40018028a7e883
[ "MIT" ]
1
2017-11-04T19:59:14.000Z
2017-11-04T19:59:14.000Z
src/bot.py
theneosloth/HazeBot
ce33adb6ee1605766ff2d3e60c40018028a7e883
[ "MIT" ]
null
null
null
src/bot.py
theneosloth/HazeBot
ce33adb6ee1605766ff2d3e60c40018028a7e883
[ "MIT" ]
null
null
null
import discord import asyncio from steam_parser import SteamEventParser from datetime import datetime
34.2
108
0.591813
import discord import asyncio from steam_parser import SteamEventParser from datetime import datetime class HazeBot(discord.Client): def __init__(self, token, channel_id, event_id): """ Constructor for the bot class. Args: token (str): the token for the discord bot. chann...
794
3,355
23
107b40733098b87b14245c0bd302d56c75ccce38
169
py
Python
src/PySiCroFClass/test.py
kazulagi/plantfem_min
ba7398c031636644aef8acb5a0dad7f9b99fcb92
[ "MIT" ]
null
null
null
src/PySiCroFClass/test.py
kazulagi/plantfem_min
ba7398c031636644aef8acb5a0dad7f9b99fcb92
[ "MIT" ]
null
null
null
src/PySiCroFClass/test.py
kazulagi/plantfem_min
ba7398c031636644aef8acb5a0dad7f9b99fcb92
[ "MIT" ]
null
null
null
import SiCroF world=SiCroF.SiCroF() world.setDomainList("~/SiCroF/Debug_domainlist.txt") world.setIfaceList("~/SiCroF/Debug_Ifacelist.txt") world.exportFortranScript()
24.142857
52
0.810651
import SiCroF world=SiCroF.SiCroF() world.setDomainList("~/SiCroF/Debug_domainlist.txt") world.setIfaceList("~/SiCroF/Debug_Ifacelist.txt") world.exportFortranScript()
0
0
0
f6fa3e6aafff0f07d5147e3506e4a9c2dce32ba4
748
py
Python
arrayish/defaults.py
hameerabbasi/arrayish
4d43fa1b5d28526c8ca52a4ea394edc6d9ec908b
[ "BSD-3-Clause" ]
12
2018-04-20T16:12:13.000Z
2019-07-12T00:02:51.000Z
arrayish/defaults.py
hameerabbasi/arrayish
4d43fa1b5d28526c8ca52a4ea394edc6d9ec908b
[ "BSD-3-Clause" ]
2
2018-04-29T00:26:43.000Z
2018-05-13T10:17:14.000Z
arrayish/defaults.py
hameerabbasi/arrayish
4d43fa1b5d28526c8ca52a4ea394edc6d9ec908b
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import multipledispatch as md dot = md.Dispatcher('dot') dot.add((object, object), np.dot) tensordot = md.Dispatcher('tensordot') tensordot.add((object, object), np.tensordot) where = md.Dispatcher('where') where.add((object,), np.where) where.add((object, object, object), np.where) nanmin = md.D...
24.129032
45
0.72861
import numpy as np import multipledispatch as md dot = md.Dispatcher('dot') dot.add((object, object), np.dot) tensordot = md.Dispatcher('tensordot') tensordot.add((object, object), np.tensordot) where = md.Dispatcher('where') where.add((object,), np.where) where.add((object, object, object), np.where) nanmin = md.D...
0
0
0
ad807ba856901f3f1530a935b8e81a3c59878c53
6,239
py
Python
rgd/geodata/permissions.py
Erotemic/ResonantGeoData
ff9aec9daf73353bcc95a9d30e98fcc5cdffc6e0
[ "Apache-2.0" ]
null
null
null
rgd/geodata/permissions.py
Erotemic/ResonantGeoData
ff9aec9daf73353bcc95a9d30e98fcc5cdffc6e0
[ "Apache-2.0" ]
null
null
null
rgd/geodata/permissions.py
Erotemic/ResonantGeoData
ff9aec9daf73353bcc95a9d30e98fcc5cdffc6e0
[ "Apache-2.0" ]
null
null
null
from typing import Optional from django.contrib.auth.backends import BaseBackend from django.core.exceptions import PermissionDenied from django.db.models.functions import Coalesce from rgd.geodata import models def annotate_queryset(queryset): """Annotate the queryset to include a path to a collection. So...
40.777778
128
0.717583
from typing import Optional from django.contrib.auth.backends import BaseBackend from django.core.exceptions import PermissionDenied from django.db.models.functions import Coalesce from rgd.geodata import models def annotate_queryset(queryset): """Annotate the queryset to include a path to a collection. So...
0
919
23
723492ba33c1b129438603a6ea6b609e25092c5f
10,411
py
Python
inventory/migrations/0001_initial.py
common1/newassetcms
65eee3c2ed9dac4cc56bfff863a6cbaff9830d26
[ "MIT" ]
null
null
null
inventory/migrations/0001_initial.py
common1/newassetcms
65eee3c2ed9dac4cc56bfff863a6cbaff9830d26
[ "MIT" ]
7
2020-06-05T20:43:46.000Z
2022-01-13T01:14:21.000Z
inventory/migrations/0001_initial.py
common1/newassetcms
65eee3c2ed9dac4cc56bfff863a6cbaff9830d26
[ "MIT" ]
null
null
null
# Generated by Django 2.1.8 on 2019-05-27 22:42 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_userforeignkey.models.fields
67.603896
299
0.658726
# Generated by Django 2.1.8 on 2019-05-27 22:42 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_userforeignkey.models.fields class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependenc...
0
10,188
23
f7dd57a14d4edf9afe97ac1fddf73b9a1f182d91
804
py
Python
core/migrations/0029_auto_20170827_1818.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
13
2015-11-29T12:19:12.000Z
2021-02-21T15:42:11.000Z
core/migrations/0029_auto_20170827_1818.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
23
2015-04-29T19:43:34.000Z
2021-02-10T05:50:17.000Z
core/migrations/0029_auto_20170827_1818.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
11
2015-09-20T18:59:00.000Z
2020-02-07T08:47:34.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-08-27 15:18 from django.db import migrations, models
33.5
207
0.616915
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-08-27 15:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0028_auto_20170802_1453'), ] operations = [ migrations.AddField( model_name='event', ...
0
678
23
48779c72fda0d6c6afcecfc717e63401ad7ffc19
3,993
py
Python
tests/test_objects.py
pershinghar/icinga-notificator
44ca598157d93f9a5410844acaefdec0bb1f11cf
[ "MIT" ]
1
2019-10-05T15:30:14.000Z
2019-10-05T15:30:14.000Z
tests/test_objects.py
pershinghar/icinga-notificator
44ca598157d93f9a5410844acaefdec0bb1f11cf
[ "MIT" ]
null
null
null
tests/test_objects.py
pershinghar/icinga-notificator
44ca598157d93f9a5410844acaefdec0bb1f11cf
[ "MIT" ]
1
2020-08-19T13:32:40.000Z
2020-08-19T13:32:40.000Z
from icinga_notificator.classes import icingaNotification import string import random # some tools # EXITCODES = {0: "OK", 1: "WARNING", 2: "CRITICAL", 3: "UNKNOWN"} # generate some list of notifications(obj from elastic, class) # user generation class, sophistically generates data
35.026316
117
0.448535
from icinga_notificator.classes import icingaNotification import string import random # some tools # EXITCODES = {0: "OK", 1: "WARNING", 2: "CRITICAL", 3: "UNKNOWN"} def randomString(stringLength=10): # Generate a random string of fixed length letters = string.ascii_lowercase return "".join(random.choic...
3,477
-1
227
72ebdd78153756ef79542cac5ce533121180ddf8
12,548
py
Python
billing.py
sanketkr/Tkinter
2a00e1c5cc060ab10c6f4c33cb72c357156befd5
[ "MIT" ]
1
2021-12-06T11:32:12.000Z
2021-12-06T11:32:12.000Z
billing.py
sanketkr/Tkinter
2a00e1c5cc060ab10c6f4c33cb72c357156befd5
[ "MIT" ]
null
null
null
billing.py
sanketkr/Tkinter
2a00e1c5cc060ab10c6f4c33cb72c357156befd5
[ "MIT" ]
null
null
null
from os import kill from tkinter import * from tkinter.font import BOLD from PIL import ImageTk, Image import sqlite3 from babel.dates import DateTimeFormat from tkcalendar import * import mysql.connector import pyzbar.pyzbar as pyzbar import cv2 import qr from tkinter.ttk import Combobox from tkinter impor...
43.418685
352
0.613564
from os import kill from tkinter import * from tkinter.font import BOLD from PIL import ImageTk, Image import sqlite3 from babel.dates import DateTimeFormat from tkcalendar import * import mysql.connector import pyzbar.pyzbar as pyzbar import cv2 import qr from tkinter.ttk import Combobox from tkinter impor...
9,738
718
312
e2ef0818daf4f7bc94f8fcbe75c5507a95914d73
386
py
Python
FinalProject_SpeechRecognition/src/libs/inception/slim/slim.py
lev1khachatryan/ASDS_DL
ca00ce7b4cfb722f9bce545820cdb661ff8b643e
[ "MIT" ]
3
2019-12-14T04:48:44.000Z
2020-02-13T18:35:17.000Z
FinalProject_SpeechRecognition/src/libs/inception/slim/slim.py
lev1khachatryan/ASDS_DL
ca00ce7b4cfb722f9bce545820cdb661ff8b643e
[ "MIT" ]
1
2020-01-10T08:21:59.000Z
2020-01-10T08:21:59.000Z
FinalProject_SpeechRecognition/src/libs/inception/slim/slim.py
lev1khachatryan/ASDS_DL
ca00ce7b4cfb722f9bce545820cdb661ff8b643e
[ "MIT" ]
null
null
null
""" TF-Slim grouped API. Please see README.md for details and usage. """ # pylint: disable=unused-import # Collapse tf-slim into a single namespace. from inception.slim import inception_model as inception from inception.slim import losses from inception.slim import ops from inception.slim import scopes from inception....
29.692308
64
0.810881
""" TF-Slim grouped API. Please see README.md for details and usage. """ # pylint: disable=unused-import # Collapse tf-slim into a single namespace. from inception.slim import inception_model as inception from inception.slim import losses from inception.slim import ops from inception.slim import scopes from inception....
0
0
0
45bc6c3be80613aa3f46f312965fa4881154d7b8
234
py
Python
mw/lib/persistence/tests/test_tokenization.py
frankier/python-mediawiki-utilities
aa066d3d955daa3d20cf09bf5b0d46778dd67a7c
[ "MIT" ]
23
2015-09-13T04:42:24.000Z
2021-05-28T23:28:57.000Z
mw/lib/persistence/tests/test_tokenization.py
frankier/python-mediawiki-utilities
aa066d3d955daa3d20cf09bf5b0d46778dd67a7c
[ "MIT" ]
23
2015-01-14T04:48:59.000Z
2015-08-25T19:25:43.000Z
mw/lib/persistence/tests/test_tokenization.py
frankier/python-mediawiki-utilities
aa066d3d955daa3d20cf09bf5b0d46778dd67a7c
[ "MIT" ]
14
2015-09-15T16:04:50.000Z
2022-01-09T19:18:39.000Z
from nose.tools import eq_ from .. import tokenization
21.272727
67
0.542735
from nose.tools import eq_ from .. import tokenization def test_wikitext_split(): eq_( list(tokenization.wikitext_split("foo bar herp {{derp}}")), ["foo", " ", "bar", " ", "herp", " ", "{{", "derp", "}}"] )
154
0
23
051fe4eef239a443c1beb6f25b6a05972591b56a
14,972
py
Python
code/rnn/rnn_tensorflow/rnn_general_implement.py
Str0ngerCheng/Blog-Back-Up
37b89c37a2b3d652e5eb7c3ab8c8cd31e8badde7
[ "Apache-2.0" ]
null
null
null
code/rnn/rnn_tensorflow/rnn_general_implement.py
Str0ngerCheng/Blog-Back-Up
37b89c37a2b3d652e5eb7c3ab8c8cd31e8badde7
[ "Apache-2.0" ]
null
null
null
code/rnn/rnn_tensorflow/rnn_general_implement.py
Str0ngerCheng/Blog-Back-Up
37b89c37a2b3d652e5eb7c3ab8c8cd31e8badde7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np import tensorflow as tf import matplotlib.pyplot as plt import urllib.request import os import reader import time from LayerNormalizedLSTMCell import LayerNormalizedLSTMCell '''下载数据并读取数据''' file_url = 'https://raw.githubusercontent.com/jcjohnson/torch-rnn/master/data/tiny-sha...
42.655271
132
0.648878
# -*- coding: utf-8 -*- import numpy as np import tensorflow as tf import matplotlib.pyplot as plt import urllib.request import os import reader import time from LayerNormalizedLSTMCell import LayerNormalizedLSTMCell '''下载数据并读取数据''' file_url = 'https://raw.githubusercontent.com/jcjohnson/torch-rnn/master/data/tiny-sha...
13,065
0
181
2ae56ec91d1d634b458f1bd7e35ad4dc289229e5
12,975
py
Python
survey/tests/views/test_survey_completion.py
ericazhou7/uSurvey
1236f33355662957e7e1e769dde1811b910673a5
[ "BSD-3-Clause" ]
5
2016-08-25T12:48:54.000Z
2018-08-16T22:49:43.000Z
survey/tests/views/test_survey_completion.py
ericazhou7/uSurvey
1236f33355662957e7e1e769dde1811b910673a5
[ "BSD-3-Clause" ]
2
2016-08-11T06:43:56.000Z
2016-12-08T09:11:36.000Z
survey/tests/views/test_survey_completion.py
ericazhou7/uSurvey
1236f33355662957e7e1e769dde1811b910673a5
[ "BSD-3-Clause" ]
7
2016-09-16T11:03:44.000Z
2020-10-28T22:01:20.000Z
import datetime import json import ast from django.contrib.auth.models import User from django.template.defaultfilters import slugify from django.test import Client from survey.models.locations import * from survey.models import * from model_mommy import mommy from survey.tests.base_test import BaseTest from survey.vie...
54.516807
118
0.591676
import datetime import json import ast from django.contrib.auth.models import User from django.template.defaultfilters import slugify from django.test import Client from survey.models.locations import * from survey.models import * from model_mommy import mommy from survey.tests.base_test import BaseTest from survey.vie...
10,453
16
239
1a3eaeb0fec58e7bff5d49f796181be510f60976
1,304
py
Python
tests/test_sync_session.py
0dminnimda/brawlpython
b8ad04c643d3bd57a80d416214bd2dc30c562456
[ "MIT" ]
1
2020-08-24T02:02:42.000Z
2020-08-24T02:02:42.000Z
tests/test_sync_session.py
0dminnimda/brawlpython
b8ad04c643d3bd57a80d416214bd2dc30c562456
[ "MIT" ]
1
2020-10-05T21:10:01.000Z
2020-10-15T02:51:06.000Z
tests/test_sync_session.py
0dminnimda/brawlpython
b8ad04c643d3bd57a80d416214bd2dc30c562456
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from brawlpython.sessions import SyncSession from brawlpython.api_toolkit import unique, same from configobj import ConfigObj import pytest import time url_uuid = "http://httpbin.org/uuid" config = ConfigObj("config.ini") api_key = config["DEFAULT"].get("API_KEY") @pytest.yield_fixture @...
18.111111
59
0.681748
# -*- coding: utf-8 -*- from brawlpython.sessions import SyncSession from brawlpython.api_toolkit import unique, same from configobj import ConfigObj import pytest import time url_uuid = "http://httpbin.org/uuid" config = ConfigObj("config.ini") api_key = config["DEFAULT"].get("API_KEY") @pytest.yield_fixture def...
744
0
136
1dc1754e5b31a7e40e476f1220173250756fa8a6
2,524
py
Python
src/textacy/similarity/hybrid.py
austinjp/textacy
dddfdbf0e0ab3bf756bc4eda042eab1001aac709
[ "Apache-2.0" ]
1,929
2016-02-14T08:30:38.000Z
2022-03-31T03:00:35.000Z
src/textacy/similarity/hybrid.py
austinjp/textacy
dddfdbf0e0ab3bf756bc4eda042eab1001aac709
[ "Apache-2.0" ]
304
2016-02-18T15:52:22.000Z
2022-03-31T18:06:54.000Z
src/textacy/similarity/hybrid.py
austinjp/textacy
dddfdbf0e0ab3bf756bc4eda042eab1001aac709
[ "Apache-2.0" ]
285
2016-03-20T04:25:08.000Z
2022-03-24T11:31:17.000Z
""" Hybrid Metrics -------------- :mod:`textacy.similarity.hybrid`: Normalized similarity metrics that combine edit-, token-, and/or sequence-based algorithms. """ from __future__ import annotations from typing import Callable, Sequence from . import edits from .. import constants def token_sort_ratio(s1: str | Se...
29.011494
83
0.655309
""" Hybrid Metrics -------------- :mod:`textacy.similarity.hybrid`: Normalized similarity metrics that combine edit-, token-, and/or sequence-based algorithms. """ from __future__ import annotations from typing import Callable, Sequence from . import edits from .. import constants def token_sort_ratio(s1: str | Se...
0
0
0
a1d19e32f3d0a46e1d0bea55d83a4142f54c91ec
3,563
py
Python
tests/formatters/pe.py
ir4n6/plaso
010f9cbdfc82e21ed6658657fd09a7b44115c464
[ "Apache-2.0" ]
null
null
null
tests/formatters/pe.py
ir4n6/plaso
010f9cbdfc82e21ed6658657fd09a7b44115c464
[ "Apache-2.0" ]
null
null
null
tests/formatters/pe.py
ir4n6/plaso
010f9cbdfc82e21ed6658657fd09a7b44115c464
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the PE event formatters.""" from __future__ import unicode_literals import unittest from plaso.formatters import pe from tests.formatters import test_lib class PECompilationTimeFormatterTest(test_lib.EventFormatterTestCase): """Tests for the PE compilation ...
27.835938
73
0.740668
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the PE event formatters.""" from __future__ import unicode_literals import unittest from plaso.formatters import pe from tests.formatters import test_lib class PECompilationTimeFormatterTest(test_lib.EventFormatterTestCase): """Tests for the PE compilation ...
0
0
0
0199d21ce2f5f60f6da58ec6cb6b1c7954c4c4ea
3,845
py
Python
07_upload_a_model.py
FAIRdom/api-workshop
ec9db7b7cc556d78d771c2e83234abd4428d9d67
[ "BSD-3-Clause" ]
2
2020-07-22T11:03:07.000Z
2021-11-11T09:36:15.000Z
07_upload_a_model.py
FAIRdom/api-workshop
ec9db7b7cc556d78d771c2e83234abd4428d9d67
[ "BSD-3-Clause" ]
null
null
null
07_upload_a_model.py
FAIRdom/api-workshop
ec9db7b7cc556d78d771c2e83234abd4428d9d67
[ "BSD-3-Clause" ]
2
2019-03-25T11:54:30.000Z
2020-09-22T09:13:41.000Z
# -*- coding: utf-8 -*- """07 Upload a model.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1ZaM-sNR9_6vqGBpRobWjTq7gkm4t9bbW # 7 Uploading Model files Demonstrates uploading a file (rather than registering a URL). This requires multiple steps,...
36.971154
264
0.728218
# -*- coding: utf-8 -*- """07 Upload a model.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1ZaM-sNR9_6vqGBpRobWjTq7gkm4t9bbW # 7 Uploading Model files Demonstrates uploading a file (rather than registering a URL). This requires multiple steps,...
189
0
23
d798f0f5170e8e0e2b4fc5e9f5b7fc5115904d0b
1,489
py
Python
fashionnets/util/io.py
NiklasHoltmeyer/FashionNets
918e57f122b8cfa36dba1d0b993c763ba35ac815
[ "MIT" ]
null
null
null
fashionnets/util/io.py
NiklasHoltmeyer/FashionNets
918e57f122b8cfa36dba1d0b993c763ba35ac815
[ "MIT" ]
null
null
null
fashionnets/util/io.py
NiklasHoltmeyer/FashionNets
918e57f122b8cfa36dba1d0b993c763ba35ac815
[ "MIT" ]
null
null
null
import json from pathlib import Path from fashiondatasets.utils.logger.defaultLogger import defaultLogger def string_serializer(obj): """ Helper Function to Serialize Objects. Keeps List / Dict Structure, but will Convert everything else to String. """ if type(obj) in [list, tuple]: ret...
25.237288
114
0.638012
import json from pathlib import Path from fashiondatasets.utils.logger.defaultLogger import defaultLogger def read_file(path, flag="r"): with open(path, flag) as f: return f.read() def write_file(path, data, append=False): op = "w+" if not append else "a+" with open(path, op) as f: f.w...
833
0
138
33c39e7be077d0eb2f365f388b8273ba5be37adb
1,430
py
Python
SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Power/Fuel_Cell/Discharge/find_power_larminie.py
Vinicius-Tanigawa/Undergraduate-Research-Project
e92372f07882484b127d7affe305eeec2238b8a9
[ "MIT" ]
null
null
null
SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Power/Fuel_Cell/Discharge/find_power_larminie.py
Vinicius-Tanigawa/Undergraduate-Research-Project
e92372f07882484b127d7affe305eeec2238b8a9
[ "MIT" ]
null
null
null
SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Power/Fuel_Cell/Discharge/find_power_larminie.py
Vinicius-Tanigawa/Undergraduate-Research-Project
e92372f07882484b127d7affe305eeec2238b8a9
[ "MIT" ]
null
null
null
## @ingroup Methods-Power-Fuel_Cell-Discharge # find_power_larminie.py # # Created : Apr 2015, M. Vegh # Modified: Sep 2015, M. Vegh # Feb 2016, E. Botero # ---------------------------------------------------------------------- # Imports # -------------------------------------------------------------------...
31.086957
92
0.516783
## @ingroup Methods-Power-Fuel_Cell-Discharge # find_power_larminie.py # # Created : Apr 2015, M. Vegh # Modified: Sep 2015, M. Vegh # Feb 2016, E. Botero # ---------------------------------------------------------------------- # Imports # -------------------------------------------------------------------...
0
0
0
22e9d6b1423538ae1ff71fd135ba403b223d1f2f
4,094
py
Python
codes/utils.py
MMORTAR/CRPGCN
3461b1e64a4354f3ea97e1c347b490207e45b77f
[ "Apache-2.0" ]
1
2021-12-08T03:35:11.000Z
2021-12-08T03:35:11.000Z
codes/utils.py
enjoytoshare/CRPGCN
e926906ce5efdf78e32258a65435bce28a77cda8
[ "Apache-2.0" ]
3
2021-11-13T08:22:01.000Z
2021-12-20T08:05:34.000Z
codes/utils.py
enjoytoshare/CRPGCN
e926906ce5efdf78e32258a65435bce28a77cda8
[ "Apache-2.0" ]
3
2021-11-13T08:24:27.000Z
2021-12-08T03:37:50.000Z
from pylab import * import random from codes.inits import * def parse_index_file(filename): """Parse index file.""" index = [] for line in open(filename): index.append(int(line.strip())) return index def sample_mask(idx, l): """Create mask.""" mask = np.zeros(l) mask[idx] = 1 ...
34.694915
110
0.613092
from pylab import * import random from codes.inits import * def parse_index_file(filename): """Parse index file.""" index = [] for line in open(filename): index.append(int(line.strip())) return index def sample_mask(idx, l): """Create mask.""" mask = np.zeros(l) mask[idx] = 1 ...
2,564
0
92
afa1ad0c77ec7be1acf6ae02fa710c19954c77d0
777
py
Python
FieldConvolution/data_code/process_data.py
zshyang/FieldConvolution
ca88df568a6f2143dcb85d22c005fce4562a7523
[ "MIT" ]
1
2021-01-03T18:53:06.000Z
2021-01-03T18:53:06.000Z
FieldConvolution/data_code/process_data.py
zshyang/FieldConvolution
ca88df568a6f2143dcb85d22c005fce4562a7523
[ "MIT" ]
null
null
null
FieldConvolution/data_code/process_data.py
zshyang/FieldConvolution
ca88df568a6f2143dcb85d22c005fce4562a7523
[ "MIT" ]
null
null
null
import os def save_obj(): """Save the obj file. """ os.makedirs(OBJ_FLDR, exist_ok=True) for stage in STAGE_LIST: with open(os.path.join(META_FLDR, stage + ".json"), "r") as file: meta_list = json.load(file) for meta in tqdm(meta_list): os.makedirs(os.path.join(...
32.375
73
0.534106
import os def save_obj(): """Save the obj file. """ os.makedirs(OBJ_FLDR, exist_ok=True) for stage in STAGE_LIST: with open(os.path.join(META_FLDR, stage + ".json"), "r") as file: meta_list = json.load(file) for meta in tqdm(meta_list): os.makedirs(os.path.join(...
0
0
0
ac724d362e01703fe1025a3e0157a5f123aafc88
8,178
py
Python
main.py
Othko97/LotRchargen
5741781f3e43cee0ebc949af15c2fd9aba231d4b
[ "MIT" ]
1
2018-01-19T18:47:04.000Z
2018-01-19T18:47:04.000Z
main.py
Othko97/LotRchargen
5741781f3e43cee0ebc949af15c2fd9aba231d4b
[ "MIT" ]
null
null
null
main.py
Othko97/LotRchargen
5741781f3e43cee0ebc949af15c2fd9aba231d4b
[ "MIT" ]
null
null
null
"""Main program to be run for Character Generator""" ######### #IMPORTS# ######### import os import pickle from char import * from chargen import * from data import * from traittranslator import * from skilltranslator import * from functions import * ############### #MAIN FUNCTION# ############### app() ...
34.361345
180
0.328931
"""Main program to be run for Character Generator""" ######### #IMPORTS# ######### import os import pickle from char import * from chargen import * from data import * from traittranslator import * from skilltranslator import * from functions import * ############### #MAIN FUNCTION# ############### def app(): ru...
7,819
0
23
e575dd72a41b29a2ce58d8081bdea2bead856d10
600
py
Python
python_object_stuff.py
psilord/mastis_bot
e0a8183295492ea440b03c6975fb95d1677586ef
[ "MIT" ]
null
null
null
python_object_stuff.py
psilord/mastis_bot
e0a8183295492ea440b03c6975fb95d1677586ef
[ "MIT" ]
null
null
null
python_object_stuff.py
psilord/mastis_bot
e0a8183295492ea440b03c6975fb95d1677586ef
[ "MIT" ]
null
null
null
# Some idiotic python introspection stuff for when authors don't write # documentation about the classes their API creates.
24
70
0.72
# Some idiotic python introspection stuff for when authors don't write # documentation about the classes their API creates. def get_methods(obj): object_methods = [method_name for method_name in dir(obj) if callable(getattr(obj, method_name))] return object_methods def get_attributes(obj): return dir(obj) ...
406
0
69
a8ccc3671d6c87a0b85a4eea655a40385947ee79
3,795
py
Python
sldtk/models/polynomial.py
DonkeyShot21/SLDTk
3c777ccb3d7b280e2a86758b78316f415bb89145
[ "MIT" ]
1
2020-10-14T18:56:44.000Z
2020-10-14T18:56:44.000Z
sldtk/models/polynomial.py
DonkeyShot21/SLDTk
3c777ccb3d7b280e2a86758b78316f415bb89145
[ "MIT" ]
3
2019-03-11T09:34:34.000Z
2019-03-27T00:41:35.000Z
sldtk/models/polynomial.py
DonkeyShot21/SLDTk
3c777ccb3d7b280e2a86758b78316f415bb89145
[ "MIT" ]
1
2019-03-11T10:18:59.000Z
2019-03-11T10:18:59.000Z
import math import numpy as np import numpy.polynomial.polynomial as poly from .limb_model import LimbModel DEFAULT_ORDER = 2 class Polynomial(LimbModel): """Model a limb darkening profile as a polynomial in :math:`\cos{\psi}`. Attributes ---------- coefs : tuple of numbers Coefficients for...
29.88189
83
0.573123
import math import numpy as np import numpy.polynomial.polynomial as poly from .limb_model import LimbModel DEFAULT_ORDER = 2 class Polynomial(LimbModel): """Model a limb darkening profile as a polynomial in :math:`\cos{\psi}`. Attributes ---------- coefs : tuple of numbers Coefficients for...
555
0
104
c6b1dc6f0399473c437da4be53ba32b8aa09da35
331
py
Python
localemr/exec/implementations.py
rafaelleru/localemr
aa6e3e5285e96600e87c51639e75acbe35fbba3a
[ "Apache-2.0" ]
19
2020-05-01T19:57:58.000Z
2022-02-23T00:24:24.000Z
localemr/exec/implementations.py
rafaelleru/localemr
aa6e3e5285e96600e87c51639e75acbe35fbba3a
[ "Apache-2.0" ]
2
2020-09-14T21:17:35.000Z
2021-02-10T02:39:48.000Z
localemr/exec/implementations.py
rafaelleru/localemr
aa6e3e5285e96600e87c51639e75acbe35fbba3a
[ "Apache-2.0" ]
5
2021-03-14T03:00:03.000Z
2022-02-15T12:42:00.000Z
# pylint: disable=import-outside-toplevel from localemr.config import Configuration
25.461538
54
0.791541
# pylint: disable=import-outside-toplevel from localemr.config import Configuration def get_livylike_impl(config: Configuration): from localemr.exec.livylike.models import LivyLike return LivyLike(config) def get_livy_impl(config: Configuration): from localemr.exec.livy.backend import Livy return Li...
199
0
46
919e6ab91de214633c14225414077056978c470e
1,042
py
Python
lib/rucio/db/sqla/migrate_repo/versions/c129ccdb2d5_add_lumiblocknr_to_dids.py
balrampariyarath/rucio
8a68017af6b44485a9620566f1afc013838413c1
[ "Apache-2.0" ]
1
2017-08-07T13:34:55.000Z
2017-08-07T13:34:55.000Z
lib/rucio/db/sqla/migrate_repo/versions/c129ccdb2d5_add_lumiblocknr_to_dids.py
pujanm/rucio
355a997a5ea213c427a5d841ab151ceb01073eb4
[ "Apache-2.0" ]
null
null
null
lib/rucio/db/sqla/migrate_repo/versions/c129ccdb2d5_add_lumiblocknr_to_dids.py
pujanm/rucio
355a997a5ea213c427a5d841ab151ceb01073eb4
[ "Apache-2.0" ]
1
2021-06-17T14:15:15.000Z
2021-06-17T14:15:15.000Z
# Copyright European Organization for Nuclear Research (CERN) # # 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 # # Authors: # - Mario Lassnig, <mario...
24.809524
84
0.704415
# Copyright European Organization for Nuclear Research (CERN) # # 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 # # Authors: # - Mario Lassnig, <mario...
0
0
0
b22523c25b0de8f8a6ebd87437292d308e00ec71
1,398
py
Python
E-Diaristas-Backend/django/web/views.py
Drack112/E-diaristas-TreinaWeb
553e1e922cf378b2e23ca7e769e9e6e9df40d0e5
[ "MIT" ]
null
null
null
E-Diaristas-Backend/django/web/views.py
Drack112/E-diaristas-TreinaWeb
553e1e922cf378b2e23ca7e769e9e6e9df40d0e5
[ "MIT" ]
null
null
null
E-Diaristas-Backend/django/web/views.py
Drack112/E-diaristas-TreinaWeb
553e1e922cf378b2e23ca7e769e9e6e9df40d0e5
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from .forms import diarista_forms from .models import Diarista # Create your views here.
33.285714
83
0.708155
from django.shortcuts import render, redirect from .forms import diarista_forms from .models import Diarista # Create your views here. def cadastrar_diarista(request): if request.method == "POST": form_diarista = diarista_forms.DiaristaForm(request.POST, request.FILES) if form_diarista.is_valid()...
1,166
0
92
df0b933044f5ad192471c89482849261b6165bc2
4,730
py
Python
tetris game/Piece.py
ChenSunMac/Sokoban_python
39d43f2fd020c60614e9db653b071271f30bca28
[ "MIT" ]
null
null
null
tetris game/Piece.py
ChenSunMac/Sokoban_python
39d43f2fd020c60614e9db653b071271f30bca28
[ "MIT" ]
null
null
null
tetris game/Piece.py
ChenSunMac/Sokoban_python
39d43f2fd020c60614e9db653b071271f30bca28
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Class Piece: The shapes of tetrimonos each of them was a tuple of tuples containing the rotations PIECES is a dict containing all the shapes where number as a key. {1: I, 2: J, 3: L, 4: O, 5: S, 6:T, 7:Z} @author: Chens https://github.com/ChenSunMac """
22.740385
69
0.147569
# -*- coding: utf-8 -*- """ Class Piece: The shapes of tetrimonos each of them was a tuple of tuples containing the rotations PIECES is a dict containing all the shapes where number as a key. {1: I, 2: J, 3: L, 4: O, 5: S, 6:T, 7:Z} @author: Chens https://github.com/ChenSunMac """ class Piece: ...
0
4,402
23
06649076734e635187eb7a173acbc4ad0cff61ec
2,322
py
Python
tools/SocketObject.py
supercatex/TelloEdu
8f434dbc9866be3025cb119175c40f1d2d7fb5f3
[ "MIT" ]
1
2019-12-04T04:30:06.000Z
2019-12-04T04:30:06.000Z
tools/SocketObject.py
supercatex/TelloEdu
8f434dbc9866be3025cb119175c40f1d2d7fb5f3
[ "MIT" ]
null
null
null
tools/SocketObject.py
supercatex/TelloEdu
8f434dbc9866be3025cb119175c40f1d2d7fb5f3
[ "MIT" ]
null
null
null
import socket import time import cv2 import pickle import struct if __name__ == "__main__": sc = SocketClient("127.0.0.1", 8886, "127.0.0.1", 8888) camera = cv2.VideoCapture(0) while camera.isOpened(): success, frame = camera.read() if not success: break sc.send_imag...
29.392405
73
0.589147
import socket import time import cv2 import pickle import struct class SocketClient(object): def __init__(self, local_ip, local_port, target_ip, target_port): self.local_ip = local_ip self.local_port = local_port self.local_address = (local_ip, local_port) self.target_ip = target...
1,669
6
158
ba30ae2ae84102206c2139ed8997eeee6d1dfcec
8,286
py
Python
nsl_image_recog/experiments_cifar10/dynamic_uns/architecture.py
wy1iu/NSL
6cf1cd6c92071bbd48aa38b512d1d6f8fda58c7d
[ "MIT" ]
33
2019-10-16T21:14:53.000Z
2022-02-02T15:11:48.000Z
nsl_image_recog/experiments_cifar100/dynamic_uns/architecture.py
wy1iu/NSL
6cf1cd6c92071bbd48aa38b512d1d6f8fda58c7d
[ "MIT" ]
2
2019-12-14T17:36:44.000Z
2020-06-23T03:46:07.000Z
nsl_image_recog/experiments_cifar10/dynamic_uns/architecture.py
wy1iu/NSL
6cf1cd6c92071bbd48aa38b512d1d6f8fda58c7d
[ "MIT" ]
5
2019-11-03T00:45:57.000Z
2021-05-11T00:58:01.000Z
import tensorflow as tf import numpy as np import itertools
41.43
130
0.565049
import tensorflow as tf import numpy as np import itertools class VGG(): def get_conv_filter(self, shape, reg, stddev, reg_mag=1.0): init = tf.random_normal_initializer(stddev=stddev) if reg: regu = tf.contrib.layers.l2_regularizer(self.wd*reg_mag) filt = tf.get_variable('fi...
6,747
1,456
23
fe40272ed0ee4e5164a250370d8719522f90d5db
2,194
py
Python
benchmarks/rotation_cifar/appendix_plot.py
PSSF23/progressive-learning
894d25972636def6726e2c4219dc0dc99e1c5949
[ "MIT" ]
18
2020-10-13T00:43:06.000Z
2022-03-28T09:03:52.000Z
benchmarks/rotation_cifar/appendix_plot.py
PSSF23/progressive-learning
894d25972636def6726e2c4219dc0dc99e1c5949
[ "MIT" ]
234
2020-10-04T17:19:15.000Z
2022-03-17T15:43:57.000Z
benchmarks/rotation_cifar/appendix_plot.py
PSSF23/progressive-learning
894d25972636def6726e2c4219dc0dc99e1c5949
[ "MIT" ]
31
2020-10-05T07:43:50.000Z
2022-03-03T21:45:57.000Z
#%% import matplotlib.pyplot as plt import random import pickle from skimage.transform import rotate from scipy import ndimage from skimage.util import img_as_ubyte from joblib import Parallel, delayed from sklearn.ensemble.forest import _generate_unsampled_indices from sklearn.ensemble.forest import _generate_sample_i...
28.128205
89
0.731996
#%% import matplotlib.pyplot as plt import random import pickle from skimage.transform import rotate from scipy import ndimage from skimage.util import img_as_ubyte from joblib import Parallel, delayed from sklearn.ensemble.forest import _generate_unsampled_indices from sklearn.ensemble.forest import _generate_sample_i...
529
0
22
60c8a6f0c13852dcdb6bdbbdf8ac2e5311924d34
3,230
py
Python
src/data/make_dataset.py
mihaelagrigore/ResNet-Keras-code-from-scratch-train-on-GPU
ff86dc9de40f79fdce7371a98f477671cf3edad6
[ "MIT" ]
1
2022-03-10T06:20:23.000Z
2022-03-10T06:20:23.000Z
src/data/make_dataset.py
mihaelagrigore/ResNet-Keras-code-from-scratch-train-on-GPU
ff86dc9de40f79fdce7371a98f477671cf3edad6
[ "MIT" ]
null
null
null
src/data/make_dataset.py
mihaelagrigore/ResNet-Keras-code-from-scratch-train-on-GPU
ff86dc9de40f79fdce7371a98f477671cf3edad6
[ "MIT" ]
null
null
null
import os import shutil import PIL import pathlib import argparse import PIL.Image from pathlib import Path from src.utils.basic_functions import get_config # folder to load config file root = Path(__file__).parents[2] CONFIG_FILE = os.path.join(root, 'config.yaml') # center crop images into a square ...
31.057692
97
0.637152
import os import shutil import PIL import pathlib import argparse import PIL.Image from pathlib import Path from src.utils.basic_functions import get_config # folder to load config file root = Path(__file__).parents[2] CONFIG_FILE = os.path.join(root, 'config.yaml') # center crop images into a square ...
2,580
0
71
7c914ffce5e455cde81bce84b0f78f5ddefb3e20
438
py
Python
cotk/scripts/cli_constant.py
ishine/cotk
2242c16523830254b0ac509f7739b4cbcb03dea4
[ "Apache-2.0" ]
117
2019-03-14T15:06:42.000Z
2022-02-28T07:06:34.000Z
cotk/scripts/cli_constant.py
ishine/cotk
2242c16523830254b0ac509f7739b4cbcb03dea4
[ "Apache-2.0" ]
149
2019-03-12T09:43:21.000Z
2020-08-24T02:56:34.000Z
cotk/scripts/cli_constant.py
ishine/cotk
2242c16523830254b0ac509f7739b4cbcb03dea4
[ "Apache-2.0" ]
51
2019-03-14T15:12:48.000Z
2021-08-09T03:37:48.000Z
import os import sys import logging from pathlib import Path LOGGER = logging.getLogger(__name__) LOGGER.setLevel(level=logging.INFO) FORMAT = logging.Formatter("%(levelname)s: %(message)s") SH = logging.StreamHandler(stream=sys.stdout) SH.setFormatter(FORMAT) LOGGER.addHandler(SH) CONFIG_FILE = os.path.join(str(Path...
29.2
91
0.776256
import os import sys import logging from pathlib import Path LOGGER = logging.getLogger(__name__) LOGGER.setLevel(level=logging.INFO) FORMAT = logging.Formatter("%(levelname)s: %(message)s") SH = logging.StreamHandler(stream=sys.stdout) SH.setFormatter(FORMAT) LOGGER.addHandler(SH) CONFIG_FILE = os.path.join(str(Path...
0
0
0
c57122fa9b21370b52e99fd1e52485f5843094ed
5,506
py
Python
Tools/cystdlib.py
johannes-mueller/cython
b75af38ce5c309cd84c1835220932e53e9a9adb6
[ "Apache-2.0" ]
6,663
2015-01-02T06:06:43.000Z
2022-03-31T10:35:02.000Z
Tools/cystdlib.py
holzschu/cython
8f6c7f707b28cb8e76ecbf5fcd089c6255dacdb8
[ "Apache-2.0" ]
3,094
2015-01-01T15:44:13.000Z
2022-03-31T19:49:57.000Z
Tools/cystdlib.py
scoder/cython
ddaaa7b8bfe9885b7bed432cd0a5ab8191d112cd
[ "Apache-2.0" ]
1,425
2015-01-12T07:21:27.000Z
2022-03-30T14:10:40.000Z
""" Highly experimental script that compiles the CPython standard library using Cython. Execute the script either in the CPython 'Lib' directory or pass the option '--current-python' to compile the standard library of the running Python interpreter. Pass '-j N' to get a parallel build with N processes. Usage example...
28.978947
83
0.610788
""" Highly experimental script that compiles the CPython standard library using Cython. Execute the script either in the CPython 'Lib' directory or pass the option '--current-python' to compile the standard library of the running Python interpreter. Pass '-j N' to get a parallel build with N processes. Usage example...
2,164
0
92
e4ee98cbf2c741aa396523f8653cee4b94ee10a3
339
py
Python
Ex 91.py
brunobendel/Exercicios-python-Pycharm
145ded6cb5533aeef1b89f0bce20f0a90e37216c
[ "MIT" ]
null
null
null
Ex 91.py
brunobendel/Exercicios-python-Pycharm
145ded6cb5533aeef1b89f0bce20f0a90e37216c
[ "MIT" ]
null
null
null
Ex 91.py
brunobendel/Exercicios-python-Pycharm
145ded6cb5533aeef1b89f0bce20f0a90e37216c
[ "MIT" ]
null
null
null
from random import randint from time import sleep dicionario = {'Jogador 1':randint(1,6), 'Jogador 2':randint(1,6), 'Jogador 3':randint(1,6), 'Jogador 4':randint(1,6)} print(' Jogo de dados ') print('-='*30) for n, j in dicionario.items(): print(f'{n} tirou {j} no dado...
24.214286
39
0.560472
from random import randint from time import sleep dicionario = {'Jogador 1':randint(1,6), 'Jogador 2':randint(1,6), 'Jogador 3':randint(1,6), 'Jogador 4':randint(1,6)} print(' Jogo de dados ') print('-='*30) for n, j in dicionario.items(): print(f'{n} tirou {j} no dado...
0
0
0
a869ca584d71818084dfd64e52a573094625defb
684
py
Python
tests/test_gj.py
flyweilai1287/easytrader
492c3e9a7575e503e68306a596f4b060d1a06eec
[ "MIT" ]
null
null
null
tests/test_gj.py
flyweilai1287/easytrader
492c3e9a7575e503e68306a596f4b060d1a06eec
[ "MIT" ]
null
null
null
tests/test_gj.py
flyweilai1287/easytrader
492c3e9a7575e503e68306a596f4b060d1a06eec
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- """ Created on 2019/11/23 22:38 @author: Leo @file:test_gj.py @desc: """ import tempfile import pywinauto from easytrader import helpers
22.8
65
0.694444
# -*- coding:utf-8 -*- """ Created on 2019/11/23 22:38 @author: Leo @file:test_gj.py @desc: """ import tempfile import pywinauto from easytrader import helpers def startup_app(exe_path='C:\\app\\全能行证券交易终端\\xiadan.exe'): app=pywinauto.application.Application() app.start(exe_path) # app.top_window().Edit1...
493
0
45
df24e179b12d22936fbb72ff77dc4766045bc0a3
2,878
py
Python
examples/simple_spider/hitomi_spider.py
xlbf22/ruia
697d4e1dff62c8c60d1a7cc62bac559da5e079f6
[ "Apache-2.0" ]
null
null
null
examples/simple_spider/hitomi_spider.py
xlbf22/ruia
697d4e1dff62c8c60d1a7cc62bac559da5e079f6
[ "Apache-2.0" ]
null
null
null
examples/simple_spider/hitomi_spider.py
xlbf22/ruia
697d4e1dff62c8c60d1a7cc62bac559da5e079f6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from ruia import Spider, utils, Item, Middleware, AttrField, TextField from ruia_pyppeteer import PyppeteerRequest as Request log = utils.log.get_logger() fl_middleware = Middleware() @fl_middleware.request # class HitomiImageItem(Item): # target_item = TextField(xpath_select='//*[@id="...
39.972222
309
0.652536
#!/usr/bin/env python from ruia import Spider, utils, Item, Middleware, AttrField, TextField from ruia_pyppeteer import PyppeteerRequest as Request log = utils.log.get_logger() fl_middleware = Middleware() @fl_middleware.request async def print_on_request(spider_ins, request): # ua = 'ruia user-agent' ua =...
866
881
67
6b15a2219e6dfda269db92b3ca047d7121f2bcb5
3,151
py
Python
utils/artemis_utils/service.py
skyshe/artemis
c9686ca58b07532e7e2759ac0b0b58c7dc05a5b5
[ "TCL", "BSD-3-Clause", "PostgreSQL" ]
237
2018-12-20T11:16:36.000Z
2022-03-20T02:36:31.000Z
utils/artemis_utils/service.py
skyshe/artemis
c9686ca58b07532e7e2759ac0b0b58c7dc05a5b5
[ "TCL", "BSD-3-Clause", "PostgreSQL" ]
555
2019-01-03T21:07:09.000Z
2022-03-31T09:26:12.000Z
utils/artemis_utils/service.py
skyshe/artemis
c9686ca58b07532e7e2759ac0b0b58c7dc05a5b5
[ "TCL", "BSD-3-Clause", "PostgreSQL" ]
52
2018-12-20T18:53:51.000Z
2022-03-14T16:39:10.000Z
# service util functions import re import socket import time import requests from artemis_utils.constants import HEALTH_CHECK_TIMEOUT from artemis_utils.envvars import COMPOSE_PROJECT_NAME from artemis_utils.envvars import REST_PORT from . import log
33.521277
86
0.625198
# service util functions import re import socket import time import requests from artemis_utils.constants import HEALTH_CHECK_TIMEOUT from artemis_utils.envvars import COMPOSE_PROJECT_NAME from artemis_utils.envvars import REST_PORT from . import log def get_local_ip(): return socket.gethostbyname(socket.gethos...
2,802
0
92
8e70847026ea29045bad85eef3386b1c2bca7e93
3,731
py
Python
LOADDATA.py
naojibrainmachine/sentiment-analysis
c4477486a3f409bc4bbc5b5099cfe107b98ab509
[ "MIT" ]
1
2021-05-20T08:46:19.000Z
2021-05-20T08:46:19.000Z
LOADDATA.py
naojibrainmachine/sentiment-analysis
c4477486a3f409bc4bbc5b5099cfe107b98ab509
[ "MIT" ]
null
null
null
LOADDATA.py
naojibrainmachine/sentiment-analysis
c4477486a3f409bc4bbc5b5099cfe107b98ab509
[ "MIT" ]
null
null
null
import os import fool import math import pandas as pd import numpy as np import random import tensorflow as tf def get_corpus_indices(data,chars_to_idx): """ 转化成词库索引 """ corpus_indices=[] for d in data: d=d.replace('\n','').replace('\r','').replace(' ','').replace('\u3000','') ...
27.433824
144
0.651032
import os import fool import math import pandas as pd import numpy as np import random import tensorflow as tf def get_corpus_indices(data,chars_to_idx): """ 转化成词库索引 """ corpus_indices=[] for d in data: d=d.replace('\n','').replace('\r','').replace(' ','').replace('\u3000','') ...
0
0
0
5e89f5277144534e38f106a6bdf659d5052a1a8e
442
py
Python
leetcode/334.py
pingrunhuang/CodeChallenge
a8e5274e04c47d851836197907266418af4f1a22
[ "MIT" ]
null
null
null
leetcode/334.py
pingrunhuang/CodeChallenge
a8e5274e04c47d851836197907266418af4f1a22
[ "MIT" ]
null
null
null
leetcode/334.py
pingrunhuang/CodeChallenge
a8e5274e04c47d851836197907266418af4f1a22
[ "MIT" ]
null
null
null
''' Write a function that takes a string as input and returns the string reversed. ''' if __name__=='__main__': solution = Solution() testCase1='hello' print(solution.reverseString(testCase1))
21.047619
78
0.538462
''' Write a function that takes a string as input and returns the string reversed. ''' class Solution: def reverseString(self, s): """ :type s: str :rtype: str """ result='' i = len(s)-1 while i>=0: result+=s[i] i-=1 return res...
0
214
23
cd81febf4b1760467aa7578d91a3e48aae68cda0
809
py
Python
autoprocess/auto_analyse.py
michel4j/auto-process
9c011cef3cdc2fc55df31f9cac88c3e1074aa366
[ "BSD-3-Clause" ]
null
null
null
autoprocess/auto_analyse.py
michel4j/auto-process
9c011cef3cdc2fc55df31f9cac88c3e1074aa366
[ "BSD-3-Clause" ]
null
null
null
autoprocess/auto_analyse.py
michel4j/auto-process
9c011cef3cdc2fc55df31f9cac88c3e1074aa366
[ "BSD-3-Clause" ]
null
null
null
import os import subprocess import sys from autoprocess.parsers.distl import parse_distl_string from autoprocess.utils.misc import json
26.966667
69
0.631644
import os import subprocess import sys from autoprocess.parsers.distl import parse_distl_string from autoprocess.utils.misc import json def run_distl(img, rastering=False): try: args = [ 'distl.signal_strength', 'distl.res.outer={}'.format(3.0 if rastering else 1.0), '...
624
0
46
806927bc7845497c584436c19159712525f83553
2,302
py
Python
models/lanenet.py
aparecidovieira/keras_segmentation
9e80cb502378af6021dbfa565877adebbb4b674f
[ "Net-SNMP", "Xnet" ]
5
2021-04-17T07:13:35.000Z
2022-03-22T18:06:42.000Z
models/lanenet.py
aparecidovieira/keras_segmentation
9e80cb502378af6021dbfa565877adebbb4b674f
[ "Net-SNMP", "Xnet" ]
null
null
null
models/lanenet.py
aparecidovieira/keras_segmentation
9e80cb502378af6021dbfa565877adebbb4b674f
[ "Net-SNMP", "Xnet" ]
2
2021-04-17T07:13:33.000Z
2021-07-15T15:51:05.000Z
### import keras from keras.layers import * import keras.backend as K import common as C from keras.models import *
30.693333
107
0.658558
### import keras from keras.layers import * import keras.backend as K import common as C from keras.models import * def build_lanenet(input_shape,input_shape1=[128, 128, 3],input_shape2=[64, 64, 3], input_shape3=[32, 32, 3],input_shape4=[16, 16, 3], one_hot_label=False): print(input_shape, 'Input size shape ...
2,161
0
23
df4ed5f222f11f984a6e7b5fec275d35b69154ce
204
py
Python
basics_raspberry/readImg.py
ai-erorr404/opencv-practice
60ef5e4aec61ee5f7e675fb919e8f612e59f664a
[ "MIT" ]
1
2020-03-01T13:21:41.000Z
2020-03-01T13:21:41.000Z
basics_raspberry/readImg.py
ai-erorr404/opencv-practice
60ef5e4aec61ee5f7e675fb919e8f612e59f664a
[ "MIT" ]
null
null
null
basics_raspberry/readImg.py
ai-erorr404/opencv-practice
60ef5e4aec61ee5f7e675fb919e8f612e59f664a
[ "MIT" ]
1
2020-03-01T13:21:43.000Z
2020-03-01T13:21:43.000Z
#!/usr/bin/python3 import cv2 WINDOW_NAME = "picImage" img = cv2.imread("G:/learn-project/tmp/1.jpg", cv2.IMREAD_COLOR) cv2.imshow("picImage", img) cv2.waitKey(0) print("image is closed!")
17
65
0.671569
#!/usr/bin/python3 import cv2 WINDOW_NAME = "picImage" img = cv2.imread("G:/learn-project/tmp/1.jpg", cv2.IMREAD_COLOR) cv2.imshow("picImage", img) cv2.waitKey(0) print("image is closed!")
0
0
0
f905aa4c3f7fded9c62d70e50107ecad6885dfb8
3,118
py
Python
tanager/populationplots.py
jogoodma/inspyred-dashboard
b03f921abaac3a2271c3ca9b7ed97d954726bffd
[ "MIT" ]
1
2021-04-26T21:02:05.000Z
2021-04-26T21:02:05.000Z
tanager/populationplots.py
jogoodma/inspyred-dashboard
b03f921abaac3a2271c3ca9b7ed97d954726bffd
[ "MIT" ]
null
null
null
tanager/populationplots.py
jogoodma/inspyred-dashboard
b03f921abaac3a2271c3ca9b7ed97d954726bffd
[ "MIT" ]
1
2022-03-08T03:00:16.000Z
2022-03-08T03:00:16.000Z
import plotly.express as px import plotly.graph_objects as go import pandas as pd inspyred_data_folder = "/System/Volumes/Data/Personal/Degree/Tools/Inspyred/Code/Git/inspyred/tanager_data" if __name__ == '__main__': projects = ['Sphere'] # ,'Rastrigin', 'Ackley', 'Rosenbrock', 'TSM'] # chart_types = ...
32.821053
111
0.592367
import plotly.express as px import plotly.graph_objects as go def get_line_plot(data, generation, candidate, label, line_color, line_size): scatter_plot = go.Scatter(x=generation, y=data[label], mode='markers+lines', name=label, text=candidate, ...
1,692
0
92
0db80cecac19b52a8e9ad6a9f585c77fb4b4a94c
7,484
py
Python
homework2.py
duanxl0917/PythonBydxl
da990a92f6474e38803e218dfd2818e2994cec63
[ "Apache-2.0" ]
null
null
null
homework2.py
duanxl0917/PythonBydxl
da990a92f6474e38803e218dfd2818e2994cec63
[ "Apache-2.0" ]
null
null
null
homework2.py
duanxl0917/PythonBydxl
da990a92f6474e38803e218dfd2818e2994cec63
[ "Apache-2.0" ]
null
null
null
#1.一个五边形的面积 #import math #r = eval(input("Enter the length from the center to a vertex:")) #s = 2 * r * math.sin(math.pi / 5) #area = 5 *s ** 2 / (4 * math.tan(math.pi / 5)) #print("The area of the pentagon is %.2f" %area ) #2.大圆距离 #import math #x1,y1 = eval(input("Enter point 1 (latiude and longitude) in degr...
27.413919
107
0.538616
#1.一个五边形的面积 #import math #r = eval(input("Enter the length from the center to a vertex:")) #s = 2 * r * math.sin(math.pi / 5) #area = 5 *s ** 2 / (4 * math.tan(math.pi / 5)) #print("The area of the pentagon is %.2f" %area ) #2.大圆距离 #import math #x1,y1 = eval(input("Enter point 1 (latiude and longitude) in degr...
0
0
0
236a30597f14199e2b6b7d425c0696acb3fc3966
4,792
py
Python
src/model/transformer/mono_transformer_torch.py
sunprinceS/MetaASR-CrossAccent
43f45c2f121c1e47d3a088f03db5acc31d04f15a
[ "MIT" ]
9
2020-07-02T09:08:08.000Z
2021-05-12T16:14:54.000Z
src/model/transformer/mono_transformer_torch.py
sunprinceS/MetaASR-CrossAccent
43f45c2f121c1e47d3a088f03db5acc31d04f15a
[ "MIT" ]
null
null
null
src/model/transformer/mono_transformer_torch.py
sunprinceS/MetaASR-CrossAccent
43f45c2f121c1e47d3a088f03db5acc31d04f15a
[ "MIT" ]
1
2021-07-12T02:13:35.000Z
2021-07-12T02:13:35.000Z
import torch from torch import nn import torch.nn.functional as F import numpy as np import math from math import floor from src.nets_utils import to_device, lecun_normal_init_parameters, make_bool_pad_mask import src.monitor.logger as logger # TODO: # add relative positional encoding
38.336
113
0.596411
import torch from torch import nn import torch.nn.functional as F import numpy as np import math from math import floor from src.nets_utils import to_device, lecun_normal_init_parameters, make_bool_pad_mask import src.monitor.logger as logger # TODO: # add relative positional encoding class PositionalEncoding(nn.Mod...
4,013
289
201
0b3e30fa399b7b95882a5b6cfeb146059ba616f1
1,155
py
Python
tex/code/robrank/datasets/ilsvrc.py
cdluminate/robdml
51ffcdbd2b316b0550a073f4c19edbef7bbbe704
[ "Apache-2.0" ]
5
2021-10-29T20:24:03.000Z
2022-03-23T11:35:09.000Z
tex/code/robrank/datasets/ilsvrc.py
cdluminate/robdml
51ffcdbd2b316b0550a073f4c19edbef7bbbe704
[ "Apache-2.0" ]
null
null
null
tex/code/robrank/datasets/ilsvrc.py
cdluminate/robdml
51ffcdbd2b316b0550a073f4c19edbef7bbbe704
[ "Apache-2.0" ]
null
null
null
# pylint: disable=too-many-function-args import os import numpy as np import pickle from PIL import Image import torchvision as V from .. import configs def __get_classification_dataset(): ''' https://github.com/pytorch/examples/blob/master/imagenet/main.py ''' normalize = V.transforms.Normalize( ...
27.5
68
0.620779
# pylint: disable=too-many-function-args import os import numpy as np import pickle from PIL import Image import torchvision as V from .. import configs def getDataset(kind: str = 'classification'): if kind == 'classification': return __get_classification_dataset() else: raise NotImplementedE...
147
0
23
3d87c4b17f6e3b9a90a1e46704b5e0075e17cc9f
3,489
py
Python
src/grafimo/GRAFIMOException.py
pinellolab/GRAFIMO
4fe13421ab4200e624276ea39fb37e307c311cbf
[ "MIT" ]
21
2019-11-19T12:49:12.000Z
2022-01-28T09:25:05.000Z
src/grafimo/GRAFIMOException.py
InfOmics/GRAFIMO
5f7684ef0b5c804cffbb7335e74f319230d7b3c1
[ "MIT" ]
2
2019-12-17T15:03:32.000Z
2019-12-23T01:25:49.000Z
src/grafimo/GRAFIMOException.py
InfOmics/GRAFIMO
5f7684ef0b5c804cffbb7335e74f319230d7b3c1
[ "MIT" ]
3
2020-01-30T15:47:20.000Z
2021-01-07T17:04:07.000Z
"""Custom Exceptions for GRAFIMO and exception hook handler definition. The base class GRAFIMOException inherits from Exception. GRAFIMOException is extended with custom exceptions, handling errors occurring during GRAFIMO run. """ class GRAFIMOException(Exception): """Class to represent an excpetion which can ...
20.16763
80
0.693035
"""Custom Exceptions for GRAFIMO and exception hook handler definition. The base class GRAFIMOException inherits from Exception. GRAFIMOException is extended with custom exceptions, handling errors occurring during GRAFIMO run. """ class GRAFIMOException(Exception): """Class to represent an excpetion which can ...
0
0
0
692831ab6da6ab355d762f22f2a7d48c2705bdfd
3,850
py
Python
a2ml/api/auger/impl/mparts/predict.py
gitter-badger/a2ml
1d9ef6657645b61c64090284ed8fadb1a68b932c
[ "Apache-2.0" ]
null
null
null
a2ml/api/auger/impl/mparts/predict.py
gitter-badger/a2ml
1d9ef6657645b61c64090284ed8fadb1a68b932c
[ "Apache-2.0" ]
null
null
null
a2ml/api/auger/impl/mparts/predict.py
gitter-badger/a2ml
1d9ef6657645b61c64090284ed8fadb1a68b932c
[ "Apache-2.0" ]
null
null
null
import os import shutil import subprocess from zipfile import ZipFile from .deploy import ModelDeploy from ..cloud.cluster import AugerClusterApi from ..cloud.pipeline import AugerPipelineApi from ..exceptions import AugerException from a2ml.api.utils.dataframe import DataFrame class ModelPredict(): """Predict u...
36.320755
81
0.647792
import os import shutil import subprocess from zipfile import ZipFile from .deploy import ModelDeploy from ..cloud.cluster import AugerClusterApi from ..cloud.pipeline import AugerPipelineApi from ..exceptions import AugerException from a2ml.api.utils.dataframe import DataFrame class ModelPredict(): """Predict u...
3,338
0
162
a43f8de5dd9c2a4f97de83a2fde1d82db071cb63
2,114
py
Python
galaxy_api/contrib/logging.py
nixocio/galaxy-api
12dcacdc0b093f3051b5dc87095324fb63bf6af3
[ "Apache-2.0" ]
null
null
null
galaxy_api/contrib/logging.py
nixocio/galaxy-api
12dcacdc0b093f3051b5dc87095324fb63bf6af3
[ "Apache-2.0" ]
null
null
null
galaxy_api/contrib/logging.py
nixocio/galaxy-api
12dcacdc0b093f3051b5dc87095324fb63bf6af3
[ "Apache-2.0" ]
null
null
null
"""Logging utils.""" import logging import boto3 import watchtower import logstash_formatter import request_id.logging from django.conf import settings class CloudWatchHandler(watchtower.CloudWatchLogHandler): """Pre-configured CloudWatch handler.""" class RequestLogMiddleware: """Logs django requests."""...
27.454545
67
0.645695
"""Logging utils.""" import logging import boto3 import watchtower import logstash_formatter import request_id.logging from django.conf import settings class CloudWatchHandler(watchtower.CloudWatchLogHandler): """Pre-configured CloudWatch handler.""" def __init__(self): config = settings.CLOUD_WATC...
1,423
0
104
fdd183d574960843e473a3c3d1d57be478dd5234
521
py
Python
tests/test_day06.py
dbarbuzzi/aoc2021
48335c964a229cfe34d20bace03248b4d1cca585
[ "MIT" ]
null
null
null
tests/test_day06.py
dbarbuzzi/aoc2021
48335c964a229cfe34d20bace03248b4d1cca585
[ "MIT" ]
null
null
null
tests/test_day06.py
dbarbuzzi/aoc2021
48335c964a229cfe34d20bace03248b4d1cca585
[ "MIT" ]
null
null
null
import pytest from aoc2021 import day06 @pytest.mark.parametrize( ("name", "expected"), [("sample", 5934), ("full", 350917)], ) @pytest.mark.parametrize( ("name", "expected"), [("sample", 26984457539), ("full", 1592918715629)], )
23.681818
55
0.664107
import pytest from aoc2021 import day06 @pytest.mark.parametrize( ("name", "expected"), [("sample", 5934), ("full", 350917)], ) def test_day06_part1(name: str, expected: int): data_path = f"data/day06-{name}.txt" assert day06.part1(data_path) == expected @pytest.mark.parametrize( ("name", "expe...
226
0
44
900ec01f1d388abb347b3d1e1f11ec02688870df
6,911
py
Python
args.py
mHamzaArain/Whatsapp_bulk_msg_files_sender
fe5ad9c430b23e72fbd3c8d3ed339cc9cfbba01c
[ "Apache-2.0" ]
null
null
null
args.py
mHamzaArain/Whatsapp_bulk_msg_files_sender
fe5ad9c430b23e72fbd3c8d3ed339cc9cfbba01c
[ "Apache-2.0" ]
null
null
null
args.py
mHamzaArain/Whatsapp_bulk_msg_files_sender
fe5ad9c430b23e72fbd3c8d3ed339cc9cfbba01c
[ "Apache-2.0" ]
1
2020-12-17T16:43:29.000Z
2020-12-17T16:43:29.000Z
# Copyright 2020 Hamza Arain. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
33.066986
131
0.534221
# Copyright 2020 Hamza Arain. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
4,466
0
184
45c0d5a93ee77d9b729a387d513166b29a03e472
9,148
py
Python
src/code/srcClass/pathcom.py
cblatti3/KN_Builder
3c866a9b1884828d0ce39a5fb35b776770adf1d5
[ "MIT" ]
1
2020-07-31T03:23:19.000Z
2020-07-31T03:23:19.000Z
src/code/srcClass/pathcom.py
KnowEnG/KN_Builder
08086e118e0ee6600ddb01165af57a57bb5e1176
[ "MIT" ]
null
null
null
src/code/srcClass/pathcom.py
KnowEnG/KN_Builder
08086e118e0ee6600ddb01165af57a57bb5e1176
[ "MIT" ]
null
null
null
"""Extension of utilities.py to provide functions required to check the version information of pathcom and determine if it needs to be updated. Classes: Pathcom: Extends the SrcClass class and provides the static variables and pathcom specific functions required to perform a check on pathcom. Functions: ...
41.022422
97
0.581876
"""Extension of utilities.py to provide functions required to check the version information of pathcom and determine if it needs to be updated. Classes: Pathcom: Extends the SrcClass class and provides the static variables and pathcom specific functions required to perform a check on pathcom. Functions: ...
0
0
0