hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
d084cbae54b480c7285413e8320b17434455ebf4
1,666
py
Python
python_exercises/main.py
nchristie/slide-python-intro
dd52781b5d25435f97aa83cfff58c175fa7fdd1c
[ "MIT" ]
1
2018-06-07T12:40:37.000Z
2018-06-07T12:40:37.000Z
python_exercises/main.py
nchristie/slide-python-intro
dd52781b5d25435f97aa83cfff58c175fa7fdd1c
[ "MIT" ]
3
2018-06-07T14:39:19.000Z
2019-01-15T16:35:23.000Z
python_exercises/main.py
nchristie/slide-python-intro
dd52781b5d25435f97aa83cfff58c175fa7fdd1c
[ "MIT" ]
9
2018-05-30T17:12:27.000Z
2021-07-01T03:22:48.000Z
""" Press run above to start """ from exercises.question_runner import run from question_directory import ( boolean_operators, boolean_review, changing_lists, dictionaries, equality_and_booleans, for_loops, functions, functions_quick_review, greater_than_less_than_and_booleans, ...
32.038462
93
0.758703
0
0
0
0
0
0
0
0
319
0.191477
d085434851368c058d877fff6243d0f3f90e2c23
462
py
Python
config.py
LandRegistry/historian-alpha
3f2c2060d0f747772e8362dbe4867aea24731180
[ "MIT" ]
null
null
null
config.py
LandRegistry/historian-alpha
3f2c2060d0f747772e8362dbe4867aea24731180
[ "MIT" ]
null
null
null
config.py
LandRegistry/historian-alpha
3f2c2060d0f747772e8362dbe4867aea24731180
[ "MIT" ]
1
2021-04-11T06:07:16.000Z
2021-04-11T06:07:16.000Z
import os class Config(object): DEBUG = False STORAGE = os.environ['STORAGE'] SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL'] # these are on heroku only so get safely BASIC_AUTH_USERNAME = os.environ.get('BASIC_AUTH_USERNAME') BASIC_AUTH_PASSWORD = os.environ.get('BASIC_AUTH_PASSWORD') c...
25.666667
63
0.727273
446
0.965368
0
0
0
0
0
0
114
0.246753
d085e4d4c18167f75fdb378a2d6a53bb684ea18f
1,124
py
Python
scripts/removeComments.py
doggy8088/azure-devops-cli-extension
2f6b1a6ffbc49ae454df640a8bb00dac991d6514
[ "MIT" ]
326
2019-04-10T12:38:23.000Z
2022-03-31T23:07:49.000Z
scripts/removeComments.py
doggy8088/azure-devops-cli-extension
2f6b1a6ffbc49ae454df640a8bb00dac991d6514
[ "MIT" ]
562
2019-04-10T07:36:12.000Z
2022-03-28T07:37:54.000Z
scripts/removeComments.py
doggy8088/azure-devops-cli-extension
2f6b1a6ffbc49ae454df640a8bb00dac991d6514
[ "MIT" ]
166
2019-04-10T07:59:40.000Z
2022-03-16T14:17:13.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
36.258065
94
0.544484
0
0
0
0
0
0
0
0
417
0.370996
d086ce5911f7ac6a2a4bd8994adb6dc6191adc49
7,407
py
Python
scripts/update_tables.py
EnsemblGSOC/tony-gsoc-2018
7b727e3a82654a4f102d735fb0b2c4ab12470ff6
[ "Apache-2.0" ]
1
2018-08-12T08:34:51.000Z
2018-08-12T08:34:51.000Z
scripts/update_tables.py
EnsemblGSOC/tony-gsoc-2018
7b727e3a82654a4f102d735fb0b2c4ab12470ff6
[ "Apache-2.0" ]
19
2018-05-11T12:46:28.000Z
2018-08-13T11:28:44.000Z
scripts/update_tables.py
EnsemblGSOC/tony-gsoc-2018
7b727e3a82654a4f102d735fb0b2c4ab12470ff6
[ "Apache-2.0" ]
1
2018-09-22T04:58:55.000Z
2018-09-22T04:58:55.000Z
""" .. See the NOTICE file distributed with this work for additional information regarding copyright ownership. 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.or...
38.780105
119
0.652491
0
0
128
0.017281
0
0
0
0
2,635
0.355745
d086d7aab191c7687a9c71aa884d413b256ec344
8,518
py
Python
lda_loader.py
abramhindle/organize-conference-sessions-by-paper-topics
076adf1049fe9588c04f37840e938b20dd32d102
[ "Apache-2.0" ]
1
2017-12-24T23:48:33.000Z
2017-12-24T23:48:33.000Z
lda_loader.py
abramhindle/organize-conference-sessions-by-paper-topics
076adf1049fe9588c04f37840e938b20dd32d102
[ "Apache-2.0" ]
1
2017-12-29T15:31:24.000Z
2018-01-03T17:39:58.000Z
lda_loader.py
abramhindle/organize-conference-sessions-by-paper-topics
076adf1049fe9588c04f37840e938b20dd32d102
[ "Apache-2.0" ]
2
2017-12-29T15:14:00.000Z
2021-01-16T13:33:50.000Z
# Copyright (C) 2014 Alex Wilson # Copyright (C) 2012-14 Abram Hindle # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later v...
34.909836
110
0.646513
6,813
0.799836
0
0
465
0.05459
0
0
2,025
0.237732
d086eb141826a0dd9e722b35bf04940deba291b8
1,003
py
Python
api-gateway/services/mail_service.py
Niweera/DNSTool-Middleware-API
0e83d9f62fb65d9223b86a7876b3f30b2771befb
[ "Apache-2.0" ]
null
null
null
api-gateway/services/mail_service.py
Niweera/DNSTool-Middleware-API
0e83d9f62fb65d9223b86a7876b3f30b2771befb
[ "Apache-2.0" ]
9
2021-06-12T05:39:59.000Z
2021-08-14T09:20:00.000Z
api-gateway/services/mail_service.py
Niweera/DNSTool-Middleware-API
0e83d9f62fb65d9223b86a7876b3f30b2771befb
[ "Apache-2.0" ]
2
2021-05-22T15:33:50.000Z
2021-08-28T08:51:25.000Z
from flask_mail import Message from mailer import mailer from middleware.error_handling import write_log class MailService: @staticmethod def send_welcome_email(email: str, full_name: str) -> None: try: email = Message( subject="Welcome to DNSTool!", recipie...
31.34375
130
0.564307
895
0.892323
0
0
866
0.86341
0
0
201
0.200399
d0879d6a8986f5d89d403d25cf640af496e2854b
2,390
py
Python
tests/system/test_grpc_streams.py
danoscarmike/gapic-generator-python
805645d5571dde05c6fb947c81f0f41f2ba10a98
[ "Apache-2.0" ]
null
null
null
tests/system/test_grpc_streams.py
danoscarmike/gapic-generator-python
805645d5571dde05c6fb947c81f0f41f2ba10a98
[ "Apache-2.0" ]
null
null
null
tests/system/test_grpc_streams.py
danoscarmike/gapic-generator-python
805645d5571dde05c6fb947c81f0f41f2ba10a98
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.297297
74
0.706695
0
0
0
0
0
0
0
0
924
0.386611
d088e305cc713c10d76eb917ab7c20df555901b9
1,469
py
Python
day02/python/subesokun/solution.py
clssn/aoc-2019
a978e5235855be937e60a1e7f88d1ef9b541be15
[ "MIT" ]
22
2019-11-27T08:28:46.000Z
2021-04-27T05:37:08.000Z
day02/python/subesokun/solution.py
sancho1241/aoc-2019
e0f63824c8250e0f84a42805e1a7ff7d9232002c
[ "MIT" ]
77
2019-11-16T17:22:42.000Z
2021-05-10T20:36:36.000Z
day02/python/subesokun/solution.py
sancho1241/aoc-2019
e0f63824c8250e0f84a42805e1a7ff7d9232002c
[ "MIT" ]
43
2019-11-27T06:36:51.000Z
2021-11-03T20:56:48.000Z
INPUT_FILE_NAME = 'input.txt' puzzle_input = None with open(INPUT_FILE_NAME) as input_file: puzzle_input = list(map(lambda val: int(val), input_file.readline().rstrip('\n').split(','))) def run_instruction(opcode, param_1, param_2, param_3, memory): if opcode == 1: memory[param_3] = memory[param_1] +...
31.934783
163
0.673247
0
0
0
0
0
0
0
0
76
0.051736
d08a58e73bc10ca50c82c660e481d5fd9ab9cf8d
6,299
py
Python
opendata_module/anonymizer/iio/mongodb_manager.py
ria-ee/monitor
d5cb9384abf38394b35e760729649136cbbc7548
[ "MIT" ]
10
2017-12-01T11:59:54.000Z
2021-11-08T10:30:35.000Z
opendata_module/anonymizer/iio/mongodb_manager.py
ria-ee/monitor
d5cb9384abf38394b35e760729649136cbbc7548
[ "MIT" ]
16
2019-11-15T08:45:33.000Z
2021-06-10T18:06:03.000Z
opendata_module/anonymizer/iio/mongodb_manager.py
ria-ee/monitor
d5cb9384abf38394b35e760729649136cbbc7548
[ "MIT" ]
13
2017-11-22T08:46:57.000Z
2021-12-16T06:51:07.000Z
from pymongo import MongoClient import pymongo import datetime import sqlite3 as sql import os import signal from signal import SIGABRT, SIGILL, SIGINT, SIGSEGV, SIGTERM, SIGHUP import traceback from anonymizer.utils import logger_manager import sys ROOT_DIR = os.path.abspath(os.path.dirname(__file__)) ATEXIT_SINGLET...
40.378205
118
0.640895
5,672
0.90046
1,224
0.194317
0
0
0
0
915
0.145261
d08c99da891c1e82a3ced1b3133024eb4b5c39fb
826
py
Python
viewer/models.py
davhanks/digitalmyworld
0f718be3967d399dddc6105f0b9d4cbc0ab35764
[ "Apache-2.0" ]
null
null
null
viewer/models.py
davhanks/digitalmyworld
0f718be3967d399dddc6105f0b9d4cbc0ab35764
[ "Apache-2.0" ]
null
null
null
viewer/models.py
davhanks/digitalmyworld
0f718be3967d399dddc6105f0b9d4cbc0ab35764
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.contrib.auth.models import User from django.conf import settings class Calculation(models.Model): '''Just an example model: a log of all calculations made''' log_date = models.DateTimeField(auto_now_add=True) num1 = models.FloatField(blank=True, null=True) num2 = model...
35.913043
80
0.733656
473
0.572639
0
0
0
0
0
0
303
0.366828
d08cfb1d89201e35321b4d716317704e5a60a247
552
py
Python
tests/test_dbapi_sqlite.py
cyanodbc/cyanodbc
6ed49ded15a545edf4b78886868daebc8c5d4874
[ "MIT" ]
2
2020-07-10T17:36:00.000Z
2020-08-12T14:57:48.000Z
tests/test_dbapi_sqlite.py
detule/cyanodbc
e7713c3cc3333a018409ec50ee1e5836a8d85f06
[ "MIT" ]
15
2018-09-09T12:05:15.000Z
2020-07-07T12:06:16.000Z
tests/test_dbapi_sqlite.py
detule/cyanodbc
e7713c3cc3333a018409ec50ee1e5836a8d85f06
[ "MIT" ]
1
2020-07-02T10:58:07.000Z
2020-07-02T10:58:07.000Z
import cyanodbc import dbapi20 from distro import linux_distribution import pytest class CyanodbcDBApiTest(dbapi20.DatabaseAPI20Test): driver = cyanodbc connect_args = ("Driver={SQLite3 ODBC Driver};Database=" "example.db;Timeout=1000;", ) "" def test_setoutputsize(self): pass def test...
26.285714
60
0.684783
467
0.846014
0
0
171
0.309783
0
0
134
0.242754
d08f1ec8fdeeec92aebf3f03615a051f9221f14d
802
py
Python
problems/p050.py
davisschenk/project-euler-python
1375412e6c8199ab02250bd67223c758d4df1725
[ "MIT" ]
null
null
null
problems/p050.py
davisschenk/project-euler-python
1375412e6c8199ab02250bd67223c758d4df1725
[ "MIT" ]
null
null
null
problems/p050.py
davisschenk/project-euler-python
1375412e6c8199ab02250bd67223c758d4df1725
[ "MIT" ]
2
2020-10-08T23:35:03.000Z
2020-10-09T00:28:36.000Z
from problem import Problem from utils.primes import sieve_of_eratosthenes, simple_is_prime class ConsecutivePrimeSum(Problem, name="Consecutive prime sum", expected=997651): @Problem.solution() def brute_force(self): upper_bound = 1_000_000 primes = list(sieve_of_eratosthenes(4000)) m...
30.846154
82
0.588529
707
0.881546
0
0
620
0.773067
0
0
23
0.028678
d091d22d60b6b043a2100712328787d0097e7ec3
2,312
py
Python
acapy_client/models/indy_pres_attr_spec.py
dbluhm/acapy-client
d92ef607ba2ff1152ec15429f2edb20976991424
[ "Apache-2.0" ]
4
2021-08-05T09:20:34.000Z
2021-08-08T19:37:29.000Z
acapy_client/models/indy_pres_attr_spec.py
dbluhm/acapy-client
d92ef607ba2ff1152ec15429f2edb20976991424
[ "Apache-2.0" ]
null
null
null
acapy_client/models/indy_pres_attr_spec.py
dbluhm/acapy-client
d92ef607ba2ff1152ec15429f2edb20976991424
[ "Apache-2.0" ]
2
2021-08-12T18:18:45.000Z
2021-08-14T13:22:28.000Z
from typing import Any, Dict, List, Type, TypeVar, Union import attr from ..types import UNSET, Unset T = TypeVar("T", bound="IndyPresAttrSpec") @attr.s(auto_attribs=True) class IndyPresAttrSpec: """ """ name: str cred_def_id: Union[Unset, str] = UNSET mime_type: Union[Unset, str] = UNSET refe...
27.2
77
0.602076
2,134
0.92301
0
0
2,161
0.934689
0
0
122
0.052768
d0955d256ce56a7190e83eb9977c69b7f233f594
4,929
py
Python
close_approach.py
jepster/python_project_near_earth_objects
6e48da50685f15226bbc0adc66231c661596ac67
[ "MIT" ]
null
null
null
close_approach.py
jepster/python_project_near_earth_objects
6e48da50685f15226bbc0adc66231c661596ac67
[ "MIT" ]
null
null
null
close_approach.py
jepster/python_project_near_earth_objects
6e48da50685f15226bbc0adc66231c661596ac67
[ "MIT" ]
null
null
null
from helpers import cd_to_datetime, datetime_to_str class CloseApproach: """A close approach to Earth by an NEO. A `CloseApproach` encapsulates information about the NEO's close approach to Earth, such as the date and time (in UTC) of closest approach, the nominal approach distance in astronomical un...
39.432
79
0.581862
4,874
0.988842
0
0
872
0.176912
0
0
3,224
0.654088
d096f230d88b0cb0b44ad27a15da83bc18edf195
11,023
py
Python
terncy/terncy.py
rxwen/python-terncy
69be427c39118f122554a300e6e82ec24ad48bc1
[ "MIT" ]
1
2020-06-30T07:06:14.000Z
2020-06-30T07:06:14.000Z
terncy/terncy.py
rxwen/python-terncy
69be427c39118f122554a300e6e82ec24ad48bc1
[ "MIT" ]
null
null
null
terncy/terncy.py
rxwen/python-terncy
69be427c39118f122554a300e6e82ec24ad48bc1
[ "MIT" ]
1
2020-12-26T11:20:42.000Z
2020-12-26T11:20:42.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import asyncio import logging import json import ssl import uuid from terncy.version import __version__ import terncy.event as event import ipaddress from datetime import datetime from enum import Enum from zeroconf import ServiceBrowser, Zeroconf import aiohttp import webs...
34.021605
122
0.547945
9,849
0.893495
0
0
0
0
7,888
0.715595
1,317
0.119477
d0974c0fc40e9d8831ae2a7987183cbff51e0997
110
py
Python
scripts/item/consume_2430769.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
9
2021-04-26T11:59:29.000Z
2021-12-20T13:15:27.000Z
scripts/item/consume_2430769.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
null
null
null
scripts/item/consume_2430769.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
6
2021-07-14T06:32:05.000Z
2022-02-06T02:32:56.000Z
if sm.getSlotsLeftToAddByInvType(2) < 8: sm.dispose() sm.addInventorySlotsByInvType(8, 2) sm.consumeItem()
27.5
40
0.763636
0
0
0
0
0
0
0
0
0
0
d0995eaa88ebe8af4a5de82f32eaa66b6c6943ba
5,310
py
Python
ssc/visualization/vispy_voxel.py
DavidGillsjo/bssc-net
e1ffa643a2c8e3df34225f0756bad0dec9f801a2
[ "MIT" ]
5
2021-02-25T01:59:46.000Z
2022-02-09T12:23:30.000Z
ssc/visualization/vispy_voxel.py
DavidGillsjo/bssc-net
e1ffa643a2c8e3df34225f0756bad0dec9f801a2
[ "MIT" ]
null
null
null
ssc/visualization/vispy_voxel.py
DavidGillsjo/bssc-net
e1ffa643a2c8e3df34225f0756bad0dec9f801a2
[ "MIT" ]
1
2021-04-10T04:11:02.000Z
2021-04-10T04:11:02.000Z
import vispy vispy.use(app='egl') from moviepy.editor import VideoClip import numpy as np from vispy import scene, io, visuals from vispy.color import * import cv2 # Check the application correctly picked up egl assert vispy.app.use_app().backend_name == 'egl', 'Not using EGL' class AlphaAwareCM(BaseColormap): d...
38.759124
170
0.634087
802
0.151036
0
0
0
0
0
0
727
0.136911
d09a191e2a3804cf26b16a157b643e61f06cbb1c
69,906
py
Python
__init__.py
state-of-the-art/BlendNet
0a303e34081b820370c9528c807f276eefb122dc
[ "Apache-2.0" ]
66
2019-10-30T13:39:13.000Z
2022-03-23T18:33:03.000Z
__init__.py
state-of-the-art/BlendNet
0a303e34081b820370c9528c807f276eefb122dc
[ "Apache-2.0" ]
97
2019-10-18T16:48:50.000Z
2022-02-13T18:58:45.000Z
__init__.py
state-of-the-art/BlendNet
0a303e34081b820370c9528c807f276eefb122dc
[ "Apache-2.0" ]
12
2019-11-23T12:53:52.000Z
2021-08-09T21:15:48.000Z
bl_info = { 'name': 'BlendNet - distributed cloud render', 'author': 'www.state-of-the-art.io', 'version': (0, 4, 0), 'warning': 'development version', 'blender': (2, 80, 0), 'location': 'Properties --> Render --> BlendNet Render', 'description': 'Allows to easy allocate resources in cloud a...
38.988288
131
0.608918
62,881
0.899508
0
0
4,247
0.060753
0
0
15,774
0.225646
d09d02c68d6758f8f9b41f85738e74eee8e7455d
3,601
py
Python
codonlib/codonlib.py
tmsincomb/codonlib
026bc475b3255831d749455b4c76250d56e4b91e
[ "MIT" ]
null
null
null
codonlib/codonlib.py
tmsincomb/codonlib
026bc475b3255831d749455b4c76250d56e4b91e
[ "MIT" ]
null
null
null
codonlib/codonlib.py
tmsincomb/codonlib
026bc475b3255831d749455b4c76250d56e4b91e
[ "MIT" ]
null
null
null
"""Main module.""" from collections import defaultdict from functools import cache from itertools import product from operator import itemgetter from typing import List import numpy as np from Bio.Data.CodonTable import unambiguous_dna_by_id class CodonDegeneracy: def __init__(self, table_id: int = 1): ...
34.295238
120
0.580117
3,354
0.931408
0
0
878
0.243821
0
0
874
0.24271
d0a007717c7cd5164028357f50c0a77b0adfbf09
243
py
Python
M7 - python script.py
kfmahre/movies_neural_net
749d2a4e05bb24537c03c6069443da6956084055
[ "MIT" ]
null
null
null
M7 - python script.py
kfmahre/movies_neural_net
749d2a4e05bb24537c03c6069443da6956084055
[ "MIT" ]
null
null
null
M7 - python script.py
kfmahre/movies_neural_net
749d2a4e05bb24537c03c6069443da6956084055
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Dec 15 01:37:59 2019 @author: kfmah """ stuff = list() stuff.append('python') stuff.append('chuck') stuff.sort() print (stuff[0]) print (stuff.__getitem__(0)) print (list.__getitem__(stuff,0))
12.15
35
0.650206
0
0
0
0
0
0
0
0
97
0.399177
d0a233e2c4be9f3270a7527a6c44f88fc90c7f07
179
py
Python
python/ql/src/Security/CWE-022/examples/tarslip_bad.py
vadi2/codeql
a806a4f08696d241ab295a286999251b56a6860c
[ "MIT" ]
4,036
2020-04-29T00:09:57.000Z
2022-03-31T14:16:38.000Z
python/ql/src/Security/CWE-022/examples/tarslip_bad.py
vadi2/codeql
a806a4f08696d241ab295a286999251b56a6860c
[ "MIT" ]
2,970
2020-04-28T17:24:18.000Z
2022-03-31T22:40:46.000Z
python/ql/src/Security/CWE-022/examples/tarslip_bad.py
ScriptBox99/github-codeql
2ecf0d3264db8fb4904b2056964da469372a235c
[ "MIT" ]
794
2020-04-29T00:28:25.000Z
2022-03-30T08:21:46.000Z
import tarfile with tarfile.open('archive.zip') as tar: #BAD : This could write any file on the filesystem. for entry in tar: tar.extract(entry, "/tmp/unpack/")
22.375
55
0.664804
0
0
0
0
0
0
0
0
78
0.435754
d0a27cee092dbbcf3e9f8c3f67fcac4a8d78a9b8
2,206
py
Python
thermidor/classes/clusterer_socket.py
rcorrero/thermidor
01381da6dcef6d256c4438f90b46197ea89c4e7d
[ "BSD-3-Clause" ]
null
null
null
thermidor/classes/clusterer_socket.py
rcorrero/thermidor
01381da6dcef6d256c4438f90b46197ea89c4e7d
[ "BSD-3-Clause" ]
null
null
null
thermidor/classes/clusterer_socket.py
rcorrero/thermidor
01381da6dcef6d256c4438f90b46197ea89c4e7d
[ "BSD-3-Clause" ]
null
null
null
# Author: Richard Correro from sklearn.base import ClusterMixin from .transformer_socket import TransformerSocket class ClustererSocket(TransformerSocket, ClusterMixin): '''Class which allows for treating clusterers as model parameters. Parameters ---------- estimator : Sci-kit learn estimator o...
30.219178
76
0.593835
2,088
0.94651
0
0
0
0
0
0
1,720
0.779692
d0a31acaeb6c9427098272c4fe196ed9fa1d7cff
17,639
py
Python
Telstra_Messaging/configuration.py
yashints/MessagingAPI-SDK-python
6cb41ed90fd237e57a6ce4ca383fa035cd842a7d
[ "Apache-2.0" ]
null
null
null
Telstra_Messaging/configuration.py
yashints/MessagingAPI-SDK-python
6cb41ed90fd237e57a6ce4ca383fa035cd842a7d
[ "Apache-2.0" ]
null
null
null
Telstra_Messaging/configuration.py
yashints/MessagingAPI-SDK-python
6cb41ed90fd237e57a6ce4ca383fa035cd842a7d
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Telstra Messaging API # Introduction <table><tbody><tr><td class = 'into_api' style='border:none;padding:0 0 0 0'><p>Send and receive SMS and MMS messages globally using Telstra's enterprise grade Messaging API. It also allows your application to track the delivery status of both sent an...
73.495833
10,226
0.704122
7,097
0.402279
0
0
2,610
0.147942
0
0
13,669
0.774799
d0a3ddac31091e48614d1cfeaf2b19071cf7215f
1,598
py
Python
gym_minigrid/envs/mygridworld.py
nathan-miller23/gym-minigrid
4ed9e6a511be88a49903f107003951977d86d842
[ "Apache-2.0" ]
null
null
null
gym_minigrid/envs/mygridworld.py
nathan-miller23/gym-minigrid
4ed9e6a511be88a49903f107003951977d86d842
[ "Apache-2.0" ]
null
null
null
gym_minigrid/envs/mygridworld.py
nathan-miller23/gym-minigrid
4ed9e6a511be88a49903f107003951977d86d842
[ "Apache-2.0" ]
null
null
null
from gym_minigrid.minigrid import * from gym_minigrid.register import register class MyEnv(MyMiniGridEnv): def __init__(self, size=9, max_steps=100, start_pos=(1, 1), good_goal_pos=None, bad_goal_pos=None, reward='sparse', good_goal_reward=10, bad_goal_reward=-10): self.start_pos = start_pos self....
30.730769
162
0.646433
1,509
0.944305
0
0
0
0
0
0
99
0.061952
d0a76a2ccea01e9241f0631317ad97ebe4b3a680
86
py
Python
dai10shou/code10-1.py
naoshige314/workshop01
5c7be08f99eb164b7901628de26cecfd04fa926f
[ "MIT" ]
null
null
null
dai10shou/code10-1.py
naoshige314/workshop01
5c7be08f99eb164b7901628de26cecfd04fa926f
[ "MIT" ]
null
null
null
dai10shou/code10-1.py
naoshige314/workshop01
5c7be08f99eb164b7901628de26cecfd04fa926f
[ "MIT" ]
2
2021-06-10T11:53:02.000Z
2021-06-20T15:43:39.000Z
#頂点数 n=7 #隣接リスト表現 G=[[] for _ in range(n)] G[0]=[1,2] G[1]=[0,3] G[2]=[0,4,5] #etc.
7.818182
24
0.476744
0
0
0
0
0
0
0
0
37
0.349057
d0a7c3be5b482ff8c7670f19fff95f3a54a4face
5,854
py
Python
tawsocks/tcp_relay.py
comeacrossyun/skyun
96ef2e98da2826863850c8b917bf1cba8a8a796b
[ "MIT" ]
1
2021-05-23T15:50:25.000Z
2021-05-23T15:50:25.000Z
tawsocks/tcp_relay.py
comeacrossyun/skyun
96ef2e98da2826863850c8b917bf1cba8a8a796b
[ "MIT" ]
null
null
null
tawsocks/tcp_relay.py
comeacrossyun/skyun
96ef2e98da2826863850c8b917bf1cba8a8a796b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 # @Time : 2019-06-04 # @Author : hongshu import sys import asyncio from tawsocks import common class TcpRelayHandler(object): def __init__(self, is_client, config, loop): self.is_client = is_client self.config = config self.loop = loop asyn...
39.823129
118
0.591561
5,756
0.975924
0
0
0
0
4,467
0.757375
317
0.053747
d0a857e2bc8d397632de8161aef9ad14a63435bd
1,033
py
Python
exchange/utils/http_util.py
inasie/PyExchange
7d40517c8145f92ac8068d5a0f25cc44ecddc82b
[ "MIT" ]
12
2018-07-31T14:56:33.000Z
2021-05-24T23:47:51.000Z
exchange/utils/http_util.py
inasie/PyExchange
7d40517c8145f92ac8068d5a0f25cc44ecddc82b
[ "MIT" ]
1
2018-08-17T09:16:04.000Z
2018-08-17T09:16:04.000Z
exchange/utils/http_util.py
inasie/PyExchange
7d40517c8145f92ac8068d5a0f25cc44ecddc82b
[ "MIT" ]
8
2018-07-31T14:57:37.000Z
2021-05-24T23:47:52.000Z
# -*- coding: utf-8 -*- import requests import json import logging class HttpUtil: """ http util """ def get(self, url, params=None): ''' get request :param str url: url :param set params: parameters :return: json object or json array ''' resp =...
25.825
73
0.522749
963
0.932236
0
0
0
0
0
0
346
0.334947
d0aa2fe0ec18a3eff28a11f7344074671b7a9434
452
py
Python
src/glitchygames/movement/vertical.py
terrysimons/ghettogames
23773119d1994251b43c42db39c1c99c08386c24
[ "BSD-3-Clause" ]
1
2019-07-06T02:01:27.000Z
2019-07-06T02:01:27.000Z
src/glitchygames/movement/vertical.py
terrysimons/ghettogames
23773119d1994251b43c42db39c1c99c08386c24
[ "BSD-3-Clause" ]
4
2021-12-31T04:18:01.000Z
2022-03-29T13:40:32.000Z
src/glitchygames/movement/vertical.py
terrysimons/glitchygames
23773119d1994251b43c42db39c1c99c08386c24
[ "BSD-3-Clause" ]
1
2019-07-12T19:41:09.000Z
2019-07-12T19:41:09.000Z
""" Vertical: Adds movement functions along the vertical (Y) axis to a game object """ class Vertical: def __init__(self, speed): self.speed = speed self.current_speed = self.speed.y def _change_speed(self, value): self.current_speed = value def up(self): self._change_sp...
18.833333
68
0.634956
362
0.800885
0
0
0
0
0
0
86
0.190265
d0aadc614a084b433d38993f99643e2433d5d14d
3,828
py
Python
pip_services3_datadog/clients/DataDogLogClient.py
pip-services3-python/pip-services3-datadog-python
5d4549685b8486f1fc663b0e50ea52d019095909
[ "MIT" ]
null
null
null
pip_services3_datadog/clients/DataDogLogClient.py
pip-services3-python/pip-services3-datadog-python
5d4549685b8486f1fc663b0e50ea52d019095909
[ "MIT" ]
null
null
null
pip_services3_datadog/clients/DataDogLogClient.py
pip-services3-python/pip-services3-datadog-python
5d4549685b8486f1fc663b0e50ea52d019095909
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from typing import Optional, List, Any from pip_services3_commons.config import ConfigParams from pip_services3_commons.convert import StringConverter from pip_services3_commons.errors import ConfigException from pip_services3_commons.refer import IReferences from pip_services3_...
35.119266
97
0.648642
3,335
0.871212
0
0
0
0
0
0
605
0.158046
d0aaf1fbb6455df5e13ef467cbacc908e5245647
2,802
py
Python
gui/composition_worker.py
ivanovwaltz/wavelet_sound_microscope
ff14d82135193a3d20543e84a9e6a81f884b1cf7
[ "MIT" ]
null
null
null
gui/composition_worker.py
ivanovwaltz/wavelet_sound_microscope
ff14d82135193a3d20543e84a9e6a81f884b1cf7
[ "MIT" ]
null
null
null
gui/composition_worker.py
ivanovwaltz/wavelet_sound_microscope
ff14d82135193a3d20543e84a9e6a81f884b1cf7
[ "MIT" ]
null
null
null
import logging import os from functools import partial from PIL.Image import Image from PyQt5.QtCore import QObject, pyqtSignal, QThread from PyQt5.QtWidgets import QProgressDialog from .threading import QThreadedWorkerDebug as QThreadedWorker from analyze.composition import Composition, Spectrogram from analyze.medi...
25.472727
77
0.664525
2,343
0.836188
0
0
0
0
0
0
258
0.092077
d0ab2fa07ec216f8af2558d0b182fc6b664345b5
61,891
py
Python
metalpipe/node.py
zacernst/nanostream
382389b09c42b55c6bdb64c7b0017d4810c7165f
[ "MIT" ]
2
2019-04-12T19:32:55.000Z
2019-12-24T16:50:09.000Z
metalpipe/node.py
zacernst/metalpipe
382389b09c42b55c6bdb64c7b0017d4810c7165f
[ "MIT" ]
10
2019-04-03T01:25:52.000Z
2019-12-16T05:09:35.000Z
metalpipe/node.py
zacernst/nanostream
382389b09c42b55c6bdb64c7b0017d4810c7165f
[ "MIT" ]
1
2019-04-17T12:55:19.000Z
2019-04-17T12:55:19.000Z
""" Node module =========== The ``node`` module contains the ``MetalNode`` class, which is the foundation for MetalPipe. """ import time import datetime import uuid import importlib import logging import os import threading import pprint import sys import copy import random import functools import csv import MySQLdb ...
35.185333
97
0.587194
57,875
0.935112
19,232
0.31074
5,159
0.083356
0
0
18,294
0.295584
d0ac701e358934362e43d3495ffc036dc298f1b4
184
py
Python
Curso_de_Python_ Curso_em_Video/PythonTeste/condicoesEx001.py
DanilooSilva/Cursos_de_Python
8f167a4c6e16f01601e23b6f107578aa1454472d
[ "MIT" ]
null
null
null
Curso_de_Python_ Curso_em_Video/PythonTeste/condicoesEx001.py
DanilooSilva/Cursos_de_Python
8f167a4c6e16f01601e23b6f107578aa1454472d
[ "MIT" ]
null
null
null
Curso_de_Python_ Curso_em_Video/PythonTeste/condicoesEx001.py
DanilooSilva/Cursos_de_Python
8f167a4c6e16f01601e23b6f107578aa1454472d
[ "MIT" ]
null
null
null
import random numeroPc = random.randint(1, 5) numeroUsuario = int(input('Digite um número: ')) print('Parabéns vc acertou!' if numeroPc == numeroUsuario else 'O Computador venceu')
23
85
0.73913
0
0
0
0
0
0
0
0
65
0.349462
d0ae7da86f116336cc253188f9639ca495e26131
5,739
py
Python
src/get_device_id.py
icemanzz/SPS_NM_Scripts
f7b9e05e441d35715ee98bf1e2a73765a3a8d7c9
[ "Apache-2.0" ]
null
null
null
src/get_device_id.py
icemanzz/SPS_NM_Scripts
f7b9e05e441d35715ee98bf1e2a73765a3a8d7c9
[ "Apache-2.0" ]
null
null
null
src/get_device_id.py
icemanzz/SPS_NM_Scripts
f7b9e05e441d35715ee98bf1e2a73765a3a8d7c9
[ "Apache-2.0" ]
null
null
null
import pyipmi import pyipmi.interfaces import os import re import datetime import os.path import time import math import numpy import mmap import array import getopt import sys #Inmport path sys.path.append('../src') from aardvark_initial import * #Inmport path sys.path.append('../') from os_parameters_define import...
31.021622
194
0.638439
0
0
0
0
0
0
0
0
1,774
0.309113
d0af8ccc38db80b7705a16b0b92de3ffc09909b1
321
py
Python
submissions/arc068/b.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
1
2021-05-10T01:16:28.000Z
2021-05-10T01:16:28.000Z
submissions/arc068/b.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
3
2021-05-11T06:14:15.000Z
2021-06-19T08:18:36.000Z
submissions/arc068/b.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
null
null
null
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) from collections import Counter n, *a = map(int, read().split()) counter = Counter(a).values() ans = len(counter) if (sum(counter) - ans) % 2 == 1: ans -= 1 print(ans)...
21.4
38
0.697819
0
0
0
0
0
0
0
0
0
0
d0af98534b90208cb7e4f06f1ab2ae7e3d283c93
9,730
py
Python
server/plato/test/test_domains.py
zhlooking/plato
9daf0dfd8b376603453eadf2d981c71d3adb2632
[ "MIT" ]
null
null
null
server/plato/test/test_domains.py
zhlooking/plato
9daf0dfd8b376603453eadf2d981c71d3adb2632
[ "MIT" ]
null
null
null
server/plato/test/test_domains.py
zhlooking/plato
9daf0dfd8b376603453eadf2d981c71d3adb2632
[ "MIT" ]
null
null
null
import json from plato import db from plato.model.user import User from plato.test.base import BaseTestCase from plato.test.utils import add_user, add_domain class TestDomainService(BaseTestCase): def test_add_domain(self): '''Ensure a new domain can be added to database''' add_user('test', 'test...
39.076305
84
0.481809
9,568
0.98335
0
0
0
0
0
0
2,140
0.219938
d0b20375cd75fe0eef53b990d01615a34d6461be
442
py
Python
create.py
chen-robert/hackcmu21
0728af0aa4f61b1969d0b73f7e8688fee90c1cb9
[ "MIT" ]
null
null
null
create.py
chen-robert/hackcmu21
0728af0aa4f61b1969d0b73f7e8688fee90c1cb9
[ "MIT" ]
null
null
null
create.py
chen-robert/hackcmu21
0728af0aa4f61b1969d0b73f7e8688fee90c1cb9
[ "MIT" ]
null
null
null
import sqlite3 import datetime conn = sqlite3.connect('database.db') print("Opened database successfully") # NOTE: ID is DEPRECATED conn.execute('CREATE TABLE simulated (id TEXT, lat NUMERIC, lon NUMERIC, alt NUMERIC, time TIMESTAMP DEFAULT CURRENT_TIMESTAMP)') conn.execute('CREATE TABLE locations (id TEXT, lat NUMER...
40.181818
129
0.791855
0
0
0
0
0
0
0
0
325
0.735294
d0b20f9be0257673e00f2b9f9aa968fab5295bbd
3,091
py
Python
tests/components/test_ts_component.py
T4rk1n/dazzler
69c49422dc19c910445ab265b1d3481041de8f43
[ "MIT" ]
15
2019-12-19T11:57:30.000Z
2021-11-15T23:34:41.000Z
tests/components/test_ts_component.py
T4rk1n/dazzler
69c49422dc19c910445ab265b1d3481041de8f43
[ "MIT" ]
196
2019-09-21T15:10:14.000Z
2022-03-31T11:07:48.000Z
tests/components/test_ts_component.py
T4rk1n/dazzler
69c49422dc19c910445ab265b1d3481041de8f43
[ "MIT" ]
7
2019-10-30T19:38:15.000Z
2021-12-01T04:54:16.000Z
# A bit of duplication of the component system tests to ensure # typescript components are transpiled properly to Python. # Types are tested in test_mypy. import json import re import pytest from . import ts_components as tsc @pytest.mark.parametrize( 'component', [tsc.TypedComponent, tsc.TypedClassComponen...
31.865979
117
0.693303
0
0
0
0
2,580
0.834681
1,119
0.362019
1,187
0.384018
d0b22aa7904b846e9743534781f5c71318798017
9,371
py
Python
python test generator/main.py
ElDonad/Tixel-Dungeon
ad622e570a06bf7722cdf15dcc33547ba14aada4
[ "MIT" ]
null
null
null
python test generator/main.py
ElDonad/Tixel-Dungeon
ad622e570a06bf7722cdf15dcc33547ba14aada4
[ "MIT" ]
null
null
null
python test generator/main.py
ElDonad/Tixel-Dungeon
ad622e570a06bf7722cdf15dcc33547ba14aada4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import random import numpy as np import colorama from colorama import Fore, Back import copy colorama.init() LEFT = 'lft' RIGHT = 'rgt' UP = 'up' DOWN = 'dwn' HORIZONTAL = 'horizontal' VERTICAL = 'vertical' class Room: def __init__(self, x=0, y=0, h=0, w=0): self.x = x s...
33.230496
146
0.555224
676
0.071999
0
0
0
0
0
0
644
0.068591
d0b36a7b39c48086c567c97c9b01212d0a865743
255
py
Python
src/py/vmw/ui/vmw_launcher.py
jp-uom/variant_matrix_wizard
c5d7ac509be6d6a2020ab38f49c28df090a03c1d
[ "MIT" ]
1
2017-12-27T11:56:33.000Z
2017-12-27T11:56:33.000Z
src/py/vmw/ui/vmw_launcher.py
jp-uom/variant_matrix_wizard
c5d7ac509be6d6a2020ab38f49c28df090a03c1d
[ "MIT" ]
null
null
null
src/py/vmw/ui/vmw_launcher.py
jp-uom/variant_matrix_wizard
c5d7ac509be6d6a2020ab38f49c28df090a03c1d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import wx import vmwizard as vmw if __name__ == '__main__': app = wx.App(False) frame = wx.Frame(None, wx.ID_ANY, "Variant Matrix") wiz = vmw.Wizard(frame) frame.Show(True) frame.Centre() app.MainLoop()
15.9375
55
0.639216
0
0
0
0
0
0
0
0
48
0.188235
d0b370195e62577b0993491b41073f0838231b20
2,308
py
Python
Modules/Scripted/DMRIInstall/DMRIInstall.py
TheInterventionCentre/NorMIT-Plan-App
765ed9a5dccc1cc134b65ccabe93fc132baeb2ea
[ "MIT" ]
null
null
null
Modules/Scripted/DMRIInstall/DMRIInstall.py
TheInterventionCentre/NorMIT-Plan-App
765ed9a5dccc1cc134b65ccabe93fc132baeb2ea
[ "MIT" ]
null
null
null
Modules/Scripted/DMRIInstall/DMRIInstall.py
TheInterventionCentre/NorMIT-Plan-App
765ed9a5dccc1cc134b65ccabe93fc132baeb2ea
[ "MIT" ]
null
null
null
import os import string import textwrap import unittest import vtk, qt, ctk, slicer from slicer.ScriptedLoadableModule import * import logging # # DMRIInstall # class DMRIInstall(ScriptedLoadableModule): """ """ helpText = textwrap.dedent( """ Please use the Extension Manager to install the "SlicerDMRI" ex...
29.589744
96
0.731369
2,142
0.928076
0
0
0
0
0
0
954
0.413345
d0b43ab4f6dd3ba972b2dc8c30789b6cc19eaa03
24,698
py
Python
opcalendar/models.py
buahaha/allianceauth-opcalendar
44e50e06eac4b5c0e6b809e5ca2638af5e49145f
[ "MIT" ]
null
null
null
opcalendar/models.py
buahaha/allianceauth-opcalendar
44e50e06eac4b5c0e6b809e5ca2638af5e49145f
[ "MIT" ]
null
null
null
opcalendar/models.py
buahaha/allianceauth-opcalendar
44e50e06eac4b5c0e6b809e5ca2638af5e49145f
[ "MIT" ]
null
null
null
import requests import json from typing import Tuple from datetime import timedelta, datetime from django.db import models from django.urls import reverse from django.contrib.auth.models import User from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from django.utils.html import...
33.285714
309
0.604907
23,830
0.964855
0
0
6,562
0.26569
0
0
6,710
0.271682
d0b49d08acf472e125d49a19fc95585b9f897f91
5,603
py
Python
scripts/mot_neural_solver/pl_module/pair_nuclei.py
taimurhassan/crc
930be78505dd17655542a38b0fc1ded9cf19a9a2
[ "MIT" ]
1
2022-03-16T10:40:23.000Z
2022-03-16T10:40:23.000Z
scripts/mot_neural_solver/pl_module/pair_nuclei.py
taimurhassan/crc
930be78505dd17655542a38b0fc1ded9cf19a9a2
[ "MIT" ]
null
null
null
scripts/mot_neural_solver/pl_module/pair_nuclei.py
taimurhassan/crc
930be78505dd17655542a38b0fc1ded9cf19a9a2
[ "MIT" ]
null
null
null
import sacred from sacred import Experiment import os.path as osp import pandas as pd import scipy.io as sio import numpy as np from sacred import SETTINGS SETTINGS.CONFIG.READ_ONLY_CONFIG=False def pair_nuclei_and_generate_output(out_files_dir, datasetName, detector = "tracktor_prepr_det"): startFrame = 159 ...
29.489474
124
0.493129
0
0
0
0
0
0
0
0
1,031
0.184009
d0b6dbf00473c06ab74f4d07421e49558388e75e
90
py
Python
test.py
Jiyao17/fl-grouping
37ada217cdf9121c9d7119f311228e87ba4a8e83
[ "MIT" ]
null
null
null
test.py
Jiyao17/fl-grouping
37ada217cdf9121c9d7119f311228e87ba4a8e83
[ "MIT" ]
null
null
null
test.py
Jiyao17/fl-grouping
37ada217cdf9121c9d7119f311228e87ba4a8e83
[ "MIT" ]
1
2022-01-29T22:31:43.000Z
2022-01-29T22:31:43.000Z
import numpy as np arrs = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) print(arrs[[0,2]])
18
50
0.511111
0
0
0
0
0
0
0
0
0
0
d0b8c5cb52a0f84127322d8ea824dbfd7a2fbbb9
1,087
py
Python
onnxmltools/convert/coreml/operator_converters/ArrayFeatureExtractor.py
szha/onnxmltools
b04d05bda625cbc006955ce0a220277739a95825
[ "MIT" ]
3
2019-02-27T21:03:43.000Z
2020-04-07T22:16:50.000Z
onnxmltools/convert/coreml/operator_converters/ArrayFeatureExtractor.py
szha/onnxmltools
b04d05bda625cbc006955ce0a220277739a95825
[ "MIT" ]
null
null
null
onnxmltools/convert/coreml/operator_converters/ArrayFeatureExtractor.py
szha/onnxmltools
b04d05bda625cbc006955ce0a220277739a95825
[ "MIT" ]
2
2020-10-01T09:24:55.000Z
2021-04-17T13:57:31.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from .......
41.807692
117
0.678933
0
0
0
0
0
0
0
0
385
0.354186
d0b987edf568de32ee6c05d30261bbe4ded56c15
2,682
py
Python
constants.py
xuefei1/Graph-Seq2Attn
336c69877e483c95d9996ee205d2a005342f08af
[ "MIT" ]
1
2020-01-06T07:49:46.000Z
2020-01-06T07:49:46.000Z
constants.py
xuefei1/Graph-Seq2Attn
336c69877e483c95d9996ee205d2a005342f08af
[ "MIT" ]
1
2020-04-16T10:15:27.000Z
2020-04-16T16:41:42.000Z
constants.py
xuefei1/Graph-Seq2Attn
336c69877e483c95d9996ee205d2a005342f08af
[ "MIT" ]
null
null
null
# one identifier for one types of dict # for instance, DK_SOME_KEY means this is a key for a data_dict DK_BATCH_SIZE = "batch_size" DK_PAD = "pad" # DK: general purpose data_dict DK_SRC_WID = "src_wid" # src = msg + ctx DK_SRC_WID_MASK = "src_wid_mask" DK_SRC_SEQ_MASK = "src_seq_mask" DK_MSG_WID = "msg_wid" # msg is us...
37.774648
73
0.818792
0
0
0
0
0
0
0
0
1,344
0.501119
d0ba6c15a6c14b45dd62608fe761ce634451a9c5
794
py
Python
register/views/list.py
Bartlett-Christopher/coaching_manual
43e6dd582f74afa3e0c89203cd01380638f8ed7f
[ "MIT" ]
null
null
null
register/views/list.py
Bartlett-Christopher/coaching_manual
43e6dd582f74afa3e0c89203cd01380638f8ed7f
[ "MIT" ]
6
2020-05-18T05:38:26.000Z
2021-09-22T19:02:10.000Z
register/views/list.py
Bartlett-Christopher/coaching_manual
43e6dd582f74afa3e0c89203cd01380638f8ed7f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ .. module:: register.views.list :synopsis: View to list all registered users .. moduleauthor:: Chris Bartlett """ from django.urls import reverse from django.views.generic import TemplateView from register.api.utils.make_request import make_request class UserListView(TemplateView): ...
25.612903
61
0.667506
509
0.641058
0
0
0
0
0
0
224
0.282116
d0bd703517c8b3f6a8e778d87ff497a305805d45
12,308
py
Python
tests/evaluator_test.py
NightShade256/prymate
deeb81ab685854599d803719971e85ead6699a90
[ "MIT" ]
6
2020-06-22T14:54:55.000Z
2021-12-13T12:33:21.000Z
tests/evaluator_test.py
NightShade256/prymate
deeb81ab685854599d803719971e85ead6699a90
[ "MIT" ]
null
null
null
tests/evaluator_test.py
NightShade256/prymate
deeb81ab685854599d803719971e85ead6699a90
[ "MIT" ]
1
2020-10-11T18:31:57.000Z
2020-10-11T18:31:57.000Z
import unittest from prymate import evaluator, objects from prymate.lexer import Lexer from prymate.parser import Parser class TestEvaluator(unittest.TestCase): def test_eval_numeric_exp(self): tests = [ ["5", 5], ["10", 10], ["-5", -5], ["-10", -10], ...
32.474934
87
0.456451
12,134
0.985863
0
0
0
0
0
0
3,916
0.318167
d0be74bdfe9cb84b8767afe5f63676a2412c89f4
1,074
py
Python
chrome/common/extensions/docs/examples/extensions/native_messaging/echo.py
codenote/chromium-test
0637af0080f7e80bf7d20b29ce94c5edc817f390
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2018-03-10T13:08:49.000Z
2018-03-10T13:08:49.000Z
chrome/common/extensions/docs/examples/extensions/native_messaging/echo.py
codenote/chromium-test
0637af0080f7e80bf7d20b29ce94c5edc817f390
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
chrome/common/extensions/docs/examples/extensions/native_messaging/echo.py
codenote/chromium-test
0637af0080f7e80bf7d20b29ce94c5edc817f390
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2020-11-04T07:25:45.000Z
2020-11-04T07:25:45.000Z
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # A simple native client in python. # All this client does is echo the text it receives back at the extension. import sys import s...
25.571429
74
0.633147
0
0
0
0
0
0
0
0
472
0.439479
d0bf49499bee89967eb7d175fcbf84d7e2af6904
1,140
py
Python
covid_19/users_app/models.py
MikePolyakov/djanjo_project
4d80cac9142bacdaa91b5f7be0c7377a365c3db9
[ "MIT" ]
null
null
null
covid_19/users_app/models.py
MikePolyakov/djanjo_project
4d80cac9142bacdaa91b5f7be0c7377a365c3db9
[ "MIT" ]
6
2021-06-04T23:11:44.000Z
2022-03-12T00:29:55.000Z
covid_19/users_app/models.py
id2k1149/django_project
4d80cac9142bacdaa91b5f7be0c7377a365c3db9
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractUser from django.db.models.signals import post_save from django.dispatch import receiver # Create your models here. from django.dispatch import receiver class AppUser(AbstractUser): email = models.EmailField(unique=True) is_author =...
30.810811
79
0.728947
663
0.503799
0
0
0
0
0
0
630
0.478723
d0bf9ddf2a1b5e4b50f545954e0579d25793cb8e
1,748
py
Python
Wrappers/Python/setup.py
lauramurgatroyd/CILViewer
3aafa4693498a55ffd270c55118399dd807dee5f
[ "Apache-2.0" ]
null
null
null
Wrappers/Python/setup.py
lauramurgatroyd/CILViewer
3aafa4693498a55ffd270c55118399dd807dee5f
[ "Apache-2.0" ]
null
null
null
Wrappers/Python/setup.py
lauramurgatroyd/CILViewer
3aafa4693498a55ffd270c55118399dd807dee5f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2017 Edoardo Pasca # # 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 ap...
31.214286
76
0.677346
0
0
0
0
0
0
0
0
1,422
0.813501
d0c0175702c2bf4073b22292f0de9bec50aa18ec
4,658
py
Python
src/das/model_analyzer/analyzer_args.py
saifullah3396/doc_shap
0b65912bc9abc8721b5a8aec008a438fa13e8cbf
[ "Apache-2.0" ]
null
null
null
src/das/model_analyzer/analyzer_args.py
saifullah3396/doc_shap
0b65912bc9abc8721b5a8aec008a438fa13e8cbf
[ "Apache-2.0" ]
null
null
null
src/das/model_analyzer/analyzer_args.py
saifullah3396/doc_shap
0b65912bc9abc8721b5a8aec008a438fa13e8cbf
[ "Apache-2.0" ]
null
null
null
""" Defines the dataclass for holding training related arguments. """ import json import math import sys from dataclasses import asdict, dataclass, field from enum import Enum from typing import Any, Dict, List, Optional, Union from das.models.model_args import ModelArguments from das.utils.basic_utils import create_...
30.444444
86
0.738729
3,641
0.781666
0
0
3,711
0.796694
0
0
945
0.202877
d0c3051d812d65b6baa90af1922f0a2918135e6d
128
py
Python
django_cenvars/tools/sanitize.py
martinphellwig/django-cenvars
2b7ae6e719fa6ae7ffb8f0cedad615114064dab1
[ "BSD-2-Clause" ]
null
null
null
django_cenvars/tools/sanitize.py
martinphellwig/django-cenvars
2b7ae6e719fa6ae7ffb8f0cedad615114064dab1
[ "BSD-2-Clause" ]
null
null
null
django_cenvars/tools/sanitize.py
martinphellwig/django-cenvars
2b7ae6e719fa6ae7ffb8f0cedad615114064dab1
[ "BSD-2-Clause" ]
null
null
null
""" Perform sanitization check prior of releasing the app as ready. """ def main(): "Perform sanitization checks" pass
16
63
0.695313
0
0
0
0
0
0
0
0
100
0.78125
d0c48f41277d0c455a9e37dabfa1c49d07148ba0
1,982
py
Python
src/server/ClientHandler.py
ENDERZOMBI102/chatapp
3f54e72a8d3b10457cf88ec5f87b2984cc84a51f
[ "MIT" ]
1
2021-06-20T05:47:53.000Z
2021-06-20T05:47:53.000Z
src/server/ClientHandler.py
ENDERZOMBI102/chatapp
3f54e72a8d3b10457cf88ec5f87b2984cc84a51f
[ "MIT" ]
null
null
null
src/server/ClientHandler.py
ENDERZOMBI102/chatapp
3f54e72a8d3b10457cf88ec5f87b2984cc84a51f
[ "MIT" ]
null
null
null
import asyncio import traceback from asyncio import StreamWriter, StreamReader, Task from .BaseClientHandler import BaseClientHandler from data import Message class ClientHandler(BaseClientHandler): _inputTask: Task _errorCheckTask: Task reader: StreamReader writer: StreamWriter # noinspection PyUnresolvedRef...
30.492308
95
0.700807
1,819
0.91776
0
0
0
0
1,127
0.568618
176
0.088799
d0c5b0e690a24fec09fd97682f7f29681f7e57f6
8,658
py
Python
strangeflix/room/consumers.py
samsoldeinstein/webster2020
9795635e806caa261bb33d629f3d1f2bd603638c
[ "MIT" ]
6
2020-11-02T16:40:56.000Z
2020-11-07T06:59:00.000Z
strangeflix/room/consumers.py
samsoldeinstein/webster2020
9795635e806caa261bb33d629f3d1f2bd603638c
[ "MIT" ]
null
null
null
strangeflix/room/consumers.py
samsoldeinstein/webster2020
9795635e806caa261bb33d629f3d1f2bd603638c
[ "MIT" ]
2
2020-11-03T05:20:25.000Z
2020-11-03T05:38:47.000Z
# chat/consumers.py import json from channels.generic.websocket import AsyncWebsocketConsumer from .models import RoomControl from channels.db import database_sync_to_async class ChatConsumer(AsyncWebsocketConsumer): # when a user connect async def connect(self): self.user = self.scope['user'] ...
36.378151
102
0.473897
8,484
0.979903
0
0
308
0.035574
7,635
0.881843
1,744
0.201432
d0c819007b9eb94c341aa70c5a8a5172d3857e95
7,342
py
Python
src/cnnclustering/hooks.py
janjoswig/CNN
06ab0e07da46141cca941e99ac1a11ddc7ce233d
[ "MIT" ]
4
2020-06-16T13:33:57.000Z
2021-01-05T18:19:57.000Z
src/cnnclustering/hooks.py
janjoswig/CNN
06ab0e07da46141cca941e99ac1a11ddc7ce233d
[ "MIT" ]
12
2019-10-22T09:15:09.000Z
2020-07-02T09:42:44.000Z
src/cnnclustering/hooks.py
janjoswig/CommonNNClustering
06ab0e07da46141cca941e99ac1a11ddc7ce233d
[ "MIT" ]
null
null
null
import numpy as np from cnnclustering._primitive_types import P_AINDEX, P_AVALUE from cnnclustering import _types, _fit COMPONENT_ALT_KW_MAP = { "input": "input_data", "data": "input_data", "n": "neighbours", "na": "neighbours", "nb": "neighbour_neighbours", "getter": "neighbours_getter", ...
28.679688
84
0.566194
0
0
0
0
0
0
0
0
3,552
0.483792
d0c895b700d9298c6544f69260721fb2fce2376e
15,620
py
Python
cybergis/jobs.py
cybergis/jupyterlib
b39cf9c525b52fc9f67a388a751126df00b498f2
[ "NCSA" ]
5
2017-11-08T15:32:09.000Z
2019-12-20T03:05:34.000Z
cybergis/jobs.py
cybergis/jupyterlib
b39cf9c525b52fc9f67a388a751126df00b498f2
[ "NCSA" ]
null
null
null
cybergis/jobs.py
cybergis/jupyterlib
b39cf9c525b52fc9f67a388a751126df00b498f2
[ "NCSA" ]
1
2019-12-20T02:46:56.000Z
2019-12-20T02:46:56.000Z
#!/usr/bin/env python from __future__ import print_function from ipywidgets import * from IPython.display import display from getpass import getpass import glob import os import stat import paramiko from string import Template from os.path import expanduser from pkg_resources import resource_string from IPython.core.ma...
37.368421
151
0.541613
12,252
0.784379
0
0
0
0
0
0
3,646
0.233419
d0c95eb3b0bfb04075898983cf10d20a892318cb
5,419
py
Python
compile.py
Wizard-collab/wizard_2
a2cb23362e178a0205f6dd0b9b4328c329b5b142
[ "MIT" ]
1
2021-10-13T15:07:32.000Z
2021-10-13T15:07:32.000Z
compile.py
Wizard-collab/wizard_2
a2cb23362e178a0205f6dd0b9b4328c329b5b142
[ "MIT" ]
null
null
null
compile.py
Wizard-collab/wizard_2
a2cb23362e178a0205f6dd0b9b4328c329b5b142
[ "MIT" ]
null
null
null
import subprocess import os import shutil import time import yaml import sys import logging logger = logging.getLogger(__name__) class compile(): def __init__(self): args = sys.argv args.pop(0) if len(args) >= 1: self.release_type = args.pop(0) else: self.release_type = None self.build_folder = None ...
29.291892
92
0.677985
5,250
0.968813
0
0
0
0
0
0
1,519
0.28031
d0cbf9627e932b48a14476699153120bd9f96cba
990
py
Python
ibms_project/ibms/migrations/0011_auto_20190814_1110.py
parksandwildlife/ibms
caea0cb15deed1744ee73a6a44c264650391f71d
[ "Apache-2.0" ]
2
2019-09-07T20:39:29.000Z
2021-09-16T12:02:16.000Z
ibms_project/ibms/migrations/0011_auto_20190814_1110.py
ropable/ibms
8cb2c24ad0202e961c4cf7e3c79385f5716b8c63
[ "Apache-2.0" ]
11
2020-06-18T06:53:01.000Z
2022-02-11T01:55:42.000Z
ibms_project/ibms/migrations/0011_auto_20190814_1110.py
ropable/ibms
8cb2c24ad0202e961c4cf7e3c79385f5716b8c63
[ "Apache-2.0" ]
5
2016-01-18T04:36:48.000Z
2017-09-07T06:38:28.000Z
# Generated by Django 2.1.11 on 2019-08-14 03:10 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('sfm', '0001_squashed_0003_auto_20180319_0924'), ('ibms', '0010_auto_20190808_1104'), ] operations = [ migrations.AlterUniqueTogether( ...
28.285714
60
0.579798
904
0.913131
0
0
0
0
0
0
302
0.305051
d0ce5b7ab68cf3a392399184b703c3027b6d7ef3
180
py
Python
config.py
x5g/AutoWritePoems
634d30587bb8e5cf15d8287d259ac22fe0798762
[ "MIT" ]
null
null
null
config.py
x5g/AutoWritePoems
634d30587bb8e5cf15d8287d259ac22fe0798762
[ "MIT" ]
null
null
null
config.py
x5g/AutoWritePoems
634d30587bb8e5cf15d8287d259ac22fe0798762
[ "MIT" ]
null
null
null
class Config(object): poetry_file = 'poetry4min.txt' weight_file = 'poetry_model_4_1.h5' # 根据前六个字预测第七个字 max_len = 4 batch_size = 128 learning_rate = 0.0005
22.5
39
0.672222
203
0.995098
0
0
0
0
0
0
75
0.367647
d0d20743fdd39b355e497598543bd007290f251f
840
py
Python
src/discolight/loaders/annotation/widthheightcsv.py
denzel-datature/discolight
7c8309d3f883263b2e4cae0b289f17be1d1c07ea
[ "MIT" ]
27
2020-07-23T08:09:25.000Z
2022-03-01T08:24:43.000Z
src/discolight/loaders/annotation/widthheightcsv.py
denzel-datature/discolight
7c8309d3f883263b2e4cae0b289f17be1d1c07ea
[ "MIT" ]
7
2020-08-05T07:26:55.000Z
2020-12-31T04:20:40.000Z
src/discolight/loaders/annotation/widthheightcsv.py
denzel-datature/discolight
7c8309d3f883263b2e4cae0b289f17be1d1c07ea
[ "MIT" ]
6
2020-07-27T04:30:01.000Z
2020-08-13T02:39:25.000Z
"""A CSV annotation writer that reads the bbox in x, y, w, h format.""" from discolight.annotations import BoundingBox from .types import CSVRow, CSVAnnotationLoader class WidthHeightCSV(CSVAnnotationLoader): """Loads annotations from a CSV file in the following format. image_name, x_min, y_min, width, heig...
28.965517
78
0.633333
671
0.79881
0
0
0
0
0
0
293
0.34881
d0d3e5c8138c7d0eda8194549ae4292083be2818
1,286
py
Python
test/test_day09.py
frangiz/AdventOfCode2017
5fc171d4a83bfb9a408b4647ded4cb3efd12247e
[ "MIT" ]
null
null
null
test/test_day09.py
frangiz/AdventOfCode2017
5fc171d4a83bfb9a408b4647ded4cb3efd12247e
[ "MIT" ]
null
null
null
test/test_day09.py
frangiz/AdventOfCode2017
5fc171d4a83bfb9a408b4647ded4cb3efd12247e
[ "MIT" ]
null
null
null
from days import day09 from ddt import ddt, data, unpack import unittest import util @ddt class MyTestCase(unittest.TestCase): @data( [['{}'], '1'], [['{{{}}}'], '6'], [['{{},{}}'], '5'], [['{{{},{},{{}}}}'], '16'], [['{<a>,<a>,<a>,<a>}'], '1'], [['{{<...
29.906977
67
0.437014
1,185
0.921462
0
0
1,191
0.926128
0
0
302
0.234837
d0d550ba7652a9b60f892093b2e1479dc926d08c
751
py
Python
venv/lib/python2.7/dist-packages/landscape/lib/fd.py
pengwu/scapy_env
3db9c5dea2e219048a2387649d6d89be342903d9
[ "MIT" ]
null
null
null
venv/lib/python2.7/dist-packages/landscape/lib/fd.py
pengwu/scapy_env
3db9c5dea2e219048a2387649d6d89be342903d9
[ "MIT" ]
null
null
null
venv/lib/python2.7/dist-packages/landscape/lib/fd.py
pengwu/scapy_env
3db9c5dea2e219048a2387649d6d89be342903d9
[ "MIT" ]
null
null
null
"""A utility module which has FD-related functions. This module mostly exists for L{clean_fds}, so it can be imported without accidentally getting a reactor or something else that might create a critical file descriptor. """ import os import resource def clean_fds(): """Close all non-stdio file descriptors. ...
28.884615
79
0.713715
0
0
0
0
0
0
0
0
462
0.61518
d0d55d407b26fa73a5076bdbaa2919b847abf548
6,760
py
Python
jps-people-importer.py
UniversalSuperBox/jps-people-importer
eb7128122d00879798a88b599d90e53c139a00da
[ "MIT" ]
null
null
null
jps-people-importer.py
UniversalSuperBox/jps-people-importer
eb7128122d00879798a88b599d90e53c139a00da
[ "MIT" ]
null
null
null
jps-people-importer.py
UniversalSuperBox/jps-people-importer
eb7128122d00879798a88b599d90e53c139a00da
[ "MIT" ]
null
null
null
""" This script creates users in a JAMF Pro Server instance from an LDAP query. """ # Copyright 2020 Dalton Durst # # 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, inclu...
31.009174
88
0.657988
0
0
0
0
0
0
0
0
2,713
0.401331
d0d82bd9b120db172a8b9b2c6622284777e11985
442
py
Python
l8.py
snowleung/mypychallenge
9482e267906a23fc10041f49f7d308c596447f16
[ "MIT" ]
null
null
null
l8.py
snowleung/mypychallenge
9482e267906a23fc10041f49f7d308c596447f16
[ "MIT" ]
null
null
null
l8.py
snowleung/mypychallenge
9482e267906a23fc10041f49f7d308c596447f16
[ "MIT" ]
null
null
null
# coding:utf-8 ''' from http://www.pythonchallenge.com/pc/def/integrity.html ''' un = 'BZh91AY&SYA\xaf\x82\r\x00\x00\x01\x01\x80\x02\xc0\x02\x00 \x00!\x9ah3M\x07<]\xc9\x14\xe1BA\x06\xbe\x084' pw = 'BZh91AY&SY\x94$|\x0e\x00\x00\x00\x81\x00\x03$ \x00!\x9ah3M\x13<]\xc9\x14\xe1BBP\x91\xf08' def bz2_un(): return un.d...
23.263158
110
0.665158
0
0
0
0
0
0
0
0
294
0.665158
d0d8be8cd8fd46f56d5540bc555ac35643dd277b
1,387
py
Python
app.py
arian-nasr/Temporary-SMS
cedbe68b3e329362049c86e0974396bc660875da
[ "MIT" ]
null
null
null
app.py
arian-nasr/Temporary-SMS
cedbe68b3e329362049c86e0974396bc660875da
[ "MIT" ]
null
null
null
app.py
arian-nasr/Temporary-SMS
cedbe68b3e329362049c86e0974396bc660875da
[ "MIT" ]
1
2021-09-10T05:02:48.000Z
2021-09-10T05:02:48.000Z
from flask import Flask, jsonify, request from flask_cors import CORS from twilio.twiml.messaging_response import MessagingResponse, Message from twilio.rest import Client import sqlconnector as sql from datetime import datetime import os # configuration DEBUG = True twilio_sid = os.environ.get('TWILIO_SID') twilio_se...
28.895833
79
0.716655
0
0
0
0
779
0.561644
0
0
315
0.227109
d0dd4e4b7186f7188547583db738e69bad28912d
1,174
py
Python
testLib.py
quarker/stream-metrics
ae03748b75f840dbff346bedb195f9414243553f
[ "Apache-2.0" ]
null
null
null
testLib.py
quarker/stream-metrics
ae03748b75f840dbff346bedb195f9414243553f
[ "Apache-2.0" ]
1
2018-02-27T20:57:06.000Z
2018-02-27T20:57:06.000Z
testLib.py
dnguyen219/stream-metrics
ae03748b75f840dbff346bedb195f9414243553f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from scapy.all import * import dpkt import argparse import sys def printTS(pcapFile, lib): if lib == 'scapy': packets = rdpcap(pcapFile) counter = 0 for packet in packets: # print packet.time print str.format('{0:.9f}', packet.time) ...
28.634146
123
0.563884
0
0
0
0
0
0
0
0
253
0.215503
d0df0de6b9dc212d463d40040bc158f2287e5e3f
1,101
py
Python
scripts/txtool/txtool/get_logs.py
baajur/cita
763c7866e6ea59ff96de085b4c72665f4e2f69ba
[ "Apache-2.0" ]
930
2017-07-25T08:27:55.000Z
2019-11-26T10:07:48.000Z
scripts/txtool/txtool/get_logs.py
baajur/cita
763c7866e6ea59ff96de085b4c72665f4e2f69ba
[ "Apache-2.0" ]
484
2017-07-25T14:32:44.000Z
2019-11-14T11:16:45.000Z
scripts/txtool/txtool/get_logs.py
QingYanL/testCITA
6d2e82c87831553c8d34749c56c4e5c8b94ece9c
[ "Apache-2.0" ]
184
2017-07-26T01:37:36.000Z
2019-11-19T07:07:49.000Z
#!/usr/bin/env python3 # coding=utf-8 from __future__ import print_function from jsonrpcclient.http_client import HTTPClient from url_util import endpoint import argparse import simplejson def get_topics(): with open("../output/transaction/topics", 'r') as topicfile: topics = simplejson.load(topicfile) ...
22.02
64
0.659401
0
0
0
0
0
0
0
0
151
0.137148
d0df17b69424625513414f688731105176ee7001
319
py
Python
demo/flask_app/flask_api/model.py
joshyjoseph/react-docker-swagger-demo
7ba7dce6ff1457fd6bfa2af0873f60c07f918ade
[ "MIT" ]
null
null
null
demo/flask_app/flask_api/model.py
joshyjoseph/react-docker-swagger-demo
7ba7dce6ff1457fd6bfa2af0873f60c07f918ade
[ "MIT" ]
null
null
null
demo/flask_app/flask_api/model.py
joshyjoseph/react-docker-swagger-demo
7ba7dce6ff1457fd6bfa2af0873f60c07f918ade
[ "MIT" ]
null
null
null
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() class TeamModel(db.Model): rowId = db.Column(db.Integer, primary_key=True) teamName = db.Column(db.String) teamRole = db.Column(db.String) def __repr__(self) -> str: return "{}:{}:{}".format(self.rowId, self.teamName, self.teamRole)
24.538462
74
0.680251
257
0.805643
0
0
0
0
0
0
10
0.031348
d0e03d5a5825d11b0df50f5373fcf12a4e9bb5fb
114
py
Python
rev_powersystems/__init__.py
NREL-SIIP/reV-PowerSystems
39e2577082743f638426f14c8b01a1576a985558
[ "BSD-3-Clause" ]
null
null
null
rev_powersystems/__init__.py
NREL-SIIP/reV-PowerSystems
39e2577082743f638426f14c8b01a1576a985558
[ "BSD-3-Clause" ]
null
null
null
rev_powersystems/__init__.py
NREL-SIIP/reV-PowerSystems
39e2577082743f638426f14c8b01a1576a985558
[ "BSD-3-Clause" ]
null
null
null
__version__ = "0.0.1" from .revx_output_siip import SIIPTimeSeriesMetadata, concat, max_fiber_size, match_points
28.5
90
0.824561
0
0
0
0
0
0
0
0
7
0.061404
d0e07e8ca8f962f207b1a467ec124c229cd57722
2,095
py
Python
w2/w2/t1.py
mvgrigoriev/ml-course
fc5cf01d0de0eb5771389ea3d978e0bd291fdf2b
[ "MIT" ]
null
null
null
w2/w2/t1.py
mvgrigoriev/ml-course
fc5cf01d0de0eb5771389ea3d978e0bd291fdf2b
[ "MIT" ]
null
null
null
w2/w2/t1.py
mvgrigoriev/ml-course
fc5cf01d0de0eb5771389ea3d978e0bd291fdf2b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Jan 07 07:52:52 2018 @author: MVGrigoriev @task: kNN method """ import pandas import numpy as np from sklearn.neighbors import KNeighborsClassifier # Import class from scikit-learn from sklearn.model_selection import KFold # Import KFold function from sklearn.model_se...
36.754386
115
0.719809
0
0
0
0
0
0
0
0
772
0.368496
d0e15314e67099f053fc8acbea6a1a91c7a8ed52
1,946
py
Python
tutorial/tutorial.py
isabella232/sosp21-artifact
1b4a11c648e456c9ff9d74f16b09f4238d6694a0
[ "BSD-3-Clause" ]
1
2021-09-20T07:57:50.000Z
2021-09-20T07:57:50.000Z
tutorial/tutorial.py
digi-project/sosp21-artifact
1b4a11c648e456c9ff9d74f16b09f4238d6694a0
[ "BSD-3-Clause" ]
1
2022-03-21T11:33:33.000Z
2022-03-21T11:33:33.000Z
tutorial/tutorial.py
isabella232/sosp21-artifact
1b4a11c648e456c9ff9d74f16b09f4238d6694a0
[ "BSD-3-Clause" ]
2
2021-12-09T12:54:52.000Z
2022-03-21T08:43:31.000Z
# ipython utils import os import sys import time import yaml import datetime from pathlib import Path from IPython import get_ipython from IPython.core.magic import (register_line_magic, register_cell_magic, register_line_cell_magic) import warnings; warnings.simplefilter('ignore') s...
26.297297
73
0.613052
0
0
0
0
188
0.096608
0
0
433
0.222508
d0e275de32ffad1ac148c2e85a79a876fec1fd53
362
py
Python
examples/rotation.py
aallan/picamera2
d64fbe669e071402d11c043cf044f52f6b2edc57
[ "BSD-2-Clause" ]
null
null
null
examples/rotation.py
aallan/picamera2
d64fbe669e071402d11c043cf044f52f6b2edc57
[ "BSD-2-Clause" ]
null
null
null
examples/rotation.py
aallan/picamera2
d64fbe669e071402d11c043cf044f52f6b2edc57
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python3 # Run the camera with a 180 degree rotation. from qt_gl_preview import * from picamera2 import * import time picam2 = Picamera2() preview = QtGlPreview(picam2) preview_config = picam2.preview_configuration() preview_config["transform"] = libcamera.Transform(hflip=1, vflip=1) picam2.configure(prev...
20.111111
67
0.779006
0
0
0
0
0
0
0
0
73
0.201657
d0e40ed7df88adf45e5432f3af67cf4214a7c00a
331
py
Python
examples/system-prompt.py
davidbrochart/python-prompt-toolkit
8498692b31671fee7c5a426300a9df2ee290eae2
[ "BSD-3-Clause" ]
2
2020-04-12T01:23:25.000Z
2021-05-22T13:46:00.000Z
examples/system-prompt.py
davidbrochart/python-prompt-toolkit
8498692b31671fee7c5a426300a9df2ee290eae2
[ "BSD-3-Clause" ]
null
null
null
examples/system-prompt.py
davidbrochart/python-prompt-toolkit
8498692b31671fee7c5a426300a9df2ee290eae2
[ "BSD-3-Clause" ]
2
2016-12-30T23:57:44.000Z
2021-05-22T13:50:21.000Z
#!/usr/bin/env python from __future__ import unicode_literals from prompt_toolkit import prompt if __name__ == '__main__': print('If you press meta-! or esc-! at the following prompt, you can enter system commands.') answer = prompt('Give me some input: ', enable_system_bindings=True) print('You said: %s'...
33.1
97
0.725076
0
0
0
0
0
0
0
0
153
0.462236
d0e4e293078cbb35e7bb94fd2a5b26005400333e
3,294
py
Python
searcheval/test/test_metrics.py
VikasNeha/searcheval
90f3be8e57dd70179f707ef73241306cdd2ec915
[ "Apache-2.0" ]
1
2018-01-18T18:37:11.000Z
2018-01-18T18:37:11.000Z
searcheval/test/test_metrics.py
VikasNeha/searcheval
90f3be8e57dd70179f707ef73241306cdd2ec915
[ "Apache-2.0" ]
1
2022-01-11T10:37:11.000Z
2022-01-11T17:11:01.000Z
searcheval/test/test_metrics.py
VikasNeha/searcheval
90f3be8e57dd70179f707ef73241306cdd2ec915
[ "Apache-2.0" ]
1
2022-01-11T10:46:05.000Z
2022-01-11T10:46:05.000Z
import unittest import searcheval.metrics as sm class MetricsTests(unittest.TestCase): def test_mean(self): vector = [2, 3, 7] mean = sm.mean(vector) self.assertEqual(mean, 4) def test_precision(self): relevance_vector = [1, 0, 0, 1, 0] precision = sm.precision(relev...
32.94
77
0.608682
3,193
0.969338
0
0
0
0
0
0
164
0.049787
d0e54036779246dea8bdd23ebf8e7a5ba24254b9
1,054
py
Python
debpkgr/compat.py
sassoftware/python-debpkgr
220d57b461c2f323a30fb44b2d1126ca4a0f9ea6
[ "Apache-2.0" ]
7
2017-03-09T11:28:42.000Z
2019-10-26T02:12:09.000Z
debpkgr/compat.py
sassoftware/python-debpkgr
220d57b461c2f323a30fb44b2d1126ca4a0f9ea6
[ "Apache-2.0" ]
12
2017-03-24T07:45:41.000Z
2019-12-20T15:44:11.000Z
debpkgr/compat.py
sassoftware/python-debpkgr
220d57b461c2f323a30fb44b2d1126ca4a0f9ea6
[ "Apache-2.0" ]
5
2017-03-09T11:28:15.000Z
2021-02-18T13:14:34.000Z
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
30.114286
74
0.766603
0
0
0
0
0
0
0
0
549
0.520873
d0e6ec9507e696a89752b35b6c0b3c155c6656fe
16,732
py
Python
nomic/proposal.py
HactarCE/Quobot
e13f28990f212b92835dd9c8fcbdc53bc37d5ab8
[ "MIT" ]
null
null
null
nomic/proposal.py
HactarCE/Quobot
e13f28990f212b92835dd9c8fcbdc53bc37d5ab8
[ "MIT" ]
null
null
null
nomic/proposal.py
HactarCE/Quobot
e13f28990f212b92835dd9c8fcbdc53bc37d5ab8
[ "MIT" ]
null
null
null
from collections import OrderedDict from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import Optional, Set import discord import functools from .gameflags import GameFlagsManager from .playerdict import PlayerDict from .repoman import GameRepoManager from constants impor...
35.449153
97
0.573392
16,059
0.959778
0
0
8,363
0.499821
9,285
0.554925
2,479
0.148159
d0e74c23345f71b01c04f878f36260962612bba5
897
py
Python
vexmpp/features/stream_mgmt.py
nicfit/vexmpp
e67070d2822da8356345976fb15d365935b550a6
[ "MIT" ]
null
null
null
vexmpp/features/stream_mgmt.py
nicfit/vexmpp
e67070d2822da8356345976fb15d365935b550a6
[ "MIT" ]
349
2017-02-18T22:48:17.000Z
2021-12-13T19:50:23.000Z
vexmpp/features/stream_mgmt.py
nicfit/vexmpp
e67070d2822da8356345976fb15d365935b550a6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from ..stanzas import Stanza from ..errors import makeStanzaError from ..protocols.stream_mgmt import NS_URI async def handle(stream, feature_elem, sm_opts, timeout=None): assert(feature_elem is not None) nsmap = {"sm": NS_URI} enable_elem = Stanza("enable", nsmap={None: NS_URI}) ...
32.035714
70
0.625418
0
0
0
0
0
0
761
0.848384
130
0.144928
d0e7767371bb84c6b1d217086e05c8cb123f2e3b
293
py
Python
napari_allencell_segmenter/model/channel.py
neuromusic/napari-allencell-segmenter
c732408023c828c07ec2a425f4f426174d94946b
[ "BSD-3-Clause" ]
8
2021-06-29T09:24:22.000Z
2022-03-22T23:43:10.000Z
napari_allencell_segmenter/model/channel.py
neuromusic/napari-allencell-segmenter
c732408023c828c07ec2a425f4f426174d94946b
[ "BSD-3-Clause" ]
97
2021-02-18T02:39:31.000Z
2021-06-18T21:38:41.000Z
napari_allencell_segmenter/model/channel.py
neuromusic/napari-allencell-segmenter
c732408023c828c07ec2a425f4f426174d94946b
[ "BSD-3-Clause" ]
2
2021-09-14T22:07:22.000Z
2022-02-07T16:41:02.000Z
from dataclasses import dataclass @dataclass class Channel: index: int name: str = None @property def display_name(self): if self.name is None or self.name.strip().isspace(): return f"Channel {self.index}" return f"Ch{self.index}. {self.name}"
19.533333
60
0.627986
245
0.836177
0
0
256
0.87372
0
0
54
0.1843
d0e808e3235cc1782c3a0aac8f2ccd3eaf6e8e7d
705
py
Python
tests/feature_extraction/pattern/test_pattern.py
fidsusj/HateSpeechDetection
1306a8a901aed856e51ee8fe16158ff267fb5405
[ "BSD-3-Clause" ]
null
null
null
tests/feature_extraction/pattern/test_pattern.py
fidsusj/HateSpeechDetection
1306a8a901aed856e51ee8fe16158ff267fb5405
[ "BSD-3-Clause" ]
17
2020-11-08T16:55:54.000Z
2021-05-28T05:58:17.000Z
tests/feature_extraction/pattern/test_pattern.py
fidsusj/HateSpeechDetection
1306a8a901aed856e51ee8fe16158ff267fb5405
[ "BSD-3-Clause" ]
2
2020-12-18T10:42:58.000Z
2021-05-24T19:32:57.000Z
from unittest import TestCase import pandas as pd from feature_extraction.pattern.pattern import Pattern from preprocessing.corpus import build_corpus class Test_Pattern(TestCase): raw_data = { "class": [0, 0, 1, 0], "content": [ "John hates bitches", "John hates hookers",...
27.115385
88
0.639716
550
0.780142
0
0
0
0
0
0
108
0.153191
d0e812a6800aac72cae877576878f53d8cd3bd64
11,525
py
Python
main.py
C3ald/Token-API
5bb34ac1276b23a6f3c780c8d7011d621f02ab90
[ "MIT" ]
4
2021-12-20T22:51:20.000Z
2021-12-30T17:55:34.000Z
main.py
C3ald/Token-API
5bb34ac1276b23a6f3c780c8d7011d621f02ab90
[ "MIT" ]
14
2021-12-08T18:30:00.000Z
2022-01-06T05:27:08.000Z
main.py
C3ald/Token-API
5bb34ac1276b23a6f3c780c8d7011d621f02ab90
[ "MIT" ]
null
null
null
from starlette.responses import Response from passlib.hash import pbkdf2_sha256 from starlette.websockets import WebSocketDisconnect from blockchain import Blockchain # from wallet import Wallet from fastapi import FastAPI, WebSocket import uvicorn import socket import requests as r from pydantic import BaseModel from ...
29.551282
227
0.702907
971
0.084252
0
0
7,170
0.622126
6,572
0.570239
4,258
0.369458
d0e8204ae150a3e8c57ae24fe1a684bdf4ee48d0
4,650
py
Python
utils/config.py
ebadawy/JointModeling
5140e596113a6dabbc503a1fb1a3234efabf0f0b
[ "Apache-2.0" ]
null
null
null
utils/config.py
ebadawy/JointModeling
5140e596113a6dabbc503a1fb1a3234efabf0f0b
[ "Apache-2.0" ]
null
null
null
utils/config.py
ebadawy/JointModeling
5140e596113a6dabbc503a1fb1a3234efabf0f0b
[ "Apache-2.0" ]
1
2020-04-11T09:40:17.000Z
2020-04-11T09:40:17.000Z
import json from bunch import Bunch import os def get_config_from_json(json_file): """ Get the config from a json file :param json_file: :return: config(namespace) or config(dictionary) """ # parse the configurations from the config json file provided with open(json_file, 'r') as config_fi...
73.809524
133
0.529892
0
0
0
0
0
0
0
0
1,285
0.276344
d0e9d30679706cc8bbbaa272614c4af5c8ce41cd
7,096
py
Python
app/user/views.py
cosmos-sajal/magic-link
346e828673f298bae9ec3075db8d5e837e4b7aaf
[ "MIT" ]
2
2020-10-19T07:35:59.000Z
2020-10-24T17:43:41.000Z
app/user/views.py
cosmos-sajal/magic-link
346e828673f298bae9ec3075db8d5e837e4b7aaf
[ "MIT" ]
null
null
null
app/user/views.py
cosmos-sajal/magic-link
346e828673f298bae9ec3075db8d5e837e4b7aaf
[ "MIT" ]
null
null
null
import json from django.views import View from django.shortcuts import redirect, render from django.core.exceptions import ObjectDoesNotExist from django.contrib import messages from django.http.response import HttpResponseRedirect from rest_framework.renderers import TemplateHTMLRenderer from rest_framework import st...
28.612903
82
0.604284
6,158
0.867813
0
0
0
0
0
0
1,160
0.163472
d0ebd202e54ba07a8cd29fa1c18be451fa7b6215
560
py
Python
dvadmin-backend/apps/vadmin/system/models/__init__.py
yuanlaimantou/vue-django-admin
3757caf5d5ca2682ffbb6e017ef03ff9a3715cc9
[ "MIT" ]
193
2021-02-25T17:36:47.000Z
2022-03-31T09:54:48.000Z
dvadmin-backend/apps/vadmin/system/models/__init__.py
yuanlaimantou/vue-django-admin
3757caf5d5ca2682ffbb6e017ef03ff9a3715cc9
[ "MIT" ]
6
2021-04-23T12:35:14.000Z
2021-09-16T03:27:28.000Z
dvadmin-backend/apps/vadmin/system/models/__init__.py
yuanlaimantou/vue-django-admin
3757caf5d5ca2682ffbb6e017ef03ff9a3715cc9
[ "MIT" ]
59
2021-03-29T09:25:00.000Z
2022-03-24T06:53:27.000Z
from apps.vadmin.system.models.celery_log import CeleryLog from apps.vadmin.system.models.config_settings import ConfigSettings from apps.vadmin.system.models.dict_data import DictData from apps.vadmin.system.models.dict_details import DictDetails from apps.vadmin.system.models.logininfor import LoginInfor from apps.va...
56
68
0.871429
0
0
0
0
0
0
0
0
0
0
d0efa324455bfc009730dba34af132a2fd676468
260
py
Python
app/hunter/urls.py
edynox/iis
594200506b641cbac249dc6e95d229bea1edeb28
[ "MIT" ]
null
null
null
app/hunter/urls.py
edynox/iis
594200506b641cbac249dc6e95d229bea1edeb28
[ "MIT" ]
null
null
null
app/hunter/urls.py
edynox/iis
594200506b641cbac249dc6e95d229bea1edeb28
[ "MIT" ]
null
null
null
from django.conf.urls import url from .views import profile, hunterList, changePass urlpatterns = [ url(r'^$', profile, name='hunter_profile'), url(r'^password', changePass, name='hunter_password'), url(r'^list', hunterList, name='hunter_list') ]
28.888889
58
0.703846
0
0
0
0
0
0
0
0
71
0.273077
d0f002a005c22f45ad7c152982173fb33768f83a
1,822
py
Python
src/aves/features/sparse.py
sergioangulo/aves
43a14ec9c82929136a39590b15fe7f92182aae20
[ "CC-BY-3.0" ]
34
2020-10-23T08:57:03.000Z
2022-03-23T17:07:20.000Z
src/aves/features/sparse.py
sergioangulo/aves
43a14ec9c82929136a39590b15fe7f92182aae20
[ "CC-BY-3.0" ]
3
2021-12-02T22:42:25.000Z
2021-12-10T02:37:01.000Z
src/aves/features/sparse.py
sergioangulo/aves
43a14ec9c82929136a39590b15fe7f92182aae20
[ "CC-BY-3.0" ]
11
2021-03-25T02:40:34.000Z
2022-01-03T22:41:29.000Z
from scipy.sparse import dok_matrix import pandas as pd from cytoolz import itemmap def long_dataframe_to_sparse_matrix( df, index, vars, values, id_to_row=None, var_to_column=None ): if id_to_row is None: unique_index_values = df[index].unique() id_to_row = dict(zip(unique_index_values, range...
25.305556
83
0.625137
0
0
0
0
0
0
0
0
22
0.012075
d0f021bab54a09a9592e986f398fbcf5edaf9bb8
1,059
py
Python
backent/api/migrations/0010_populate_event_tags.py
namafutatsu/backent
9db38d0db8d9193fad7cd41aa2e4b55c75dfe01d
[ "MIT" ]
null
null
null
backent/api/migrations/0010_populate_event_tags.py
namafutatsu/backent
9db38d0db8d9193fad7cd41aa2e4b55c75dfe01d
[ "MIT" ]
null
null
null
backent/api/migrations/0010_populate_event_tags.py
namafutatsu/backent
9db38d0db8d9193fad7cd41aa2e4b55c75dfe01d
[ "MIT" ]
null
null
null
from django.db import migrations from backent.api import enums def populate_tags(apps, schema_editor): EventTag = apps.get_model('backent_api', 'EventTag') EventTag.objects.get_or_create(name=enums.EVENT_TAG_BEGINNER_FRIENDLY) EventTag.objects.get_or_create(name=enums.EVENT_TAG_INTERNATIONAL) EventTa...
34.16129
76
0.777148
202
0.190746
0
0
0
0
0
0
80
0.075543
d0f08bf1893b85dd5be23260d025c66fdf373d25
938
py
Python
test_ukz/test_ukzlang/test_uk_pipes.py
clauderichard/Ultrakazoid
619f1afd1fd55afb06e7d27b2bc30eee9929f660
[ "MIT" ]
null
null
null
test_ukz/test_ukzlang/test_uk_pipes.py
clauderichard/Ultrakazoid
619f1afd1fd55afb06e7d27b2bc30eee9929f660
[ "MIT" ]
null
null
null
test_ukz/test_ukzlang/test_uk_pipes.py
clauderichard/Ultrakazoid
619f1afd1fd55afb06e7d27b2bc30eee9929f660
[ "MIT" ]
null
null
null
from .test_uk_base import TestUkBase class TestUkPipes(TestUkBase): ################ # Tests def test_pipe_seq_start(self): self.equkz("|c","c") self.equkz("c|","c<¬") self.equkz("[ce|]","[ce]<¬") def test_pipe_seq_end(self): self.equkz("[c||d]e","c(de)") self.equkz("[c*2_3||d]e","c*2_3(...
24.051282
44
0.574627
868
0.921444
0
0
0
0
0
0
251
0.266454
d0f14602b75f864977df1e3824cf1f1c1da55ef2
25,329
py
Python
wltp/autograph.py
ankostis/wltp
c95462cadbcab32d4fc94f8ea8bf9d85a0a3763e
[ "Apache-2.0" ]
null
null
null
wltp/autograph.py
ankostis/wltp
c95462cadbcab32d4fc94f8ea8bf9d85a0a3763e
[ "Apache-2.0" ]
null
null
null
wltp/autograph.py
ankostis/wltp
c95462cadbcab32d4fc94f8ea8bf9d85a0a3763e
[ "Apache-2.0" ]
1
2015-02-20T11:47:33.000Z
2015-02-20T11:47:33.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019-2020 European Commission (JRC); # Licensed under the EUPL (the 'Licence'); # You may not use this work except in compliance with the Licence. # You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl """ Harvest functions & annotate their ...
34.182186
98
0.569189
19,334
0.763315
6,625
0.261558
0
0
0
0
10,859
0.428718
d0f233170bb0ccf428c1b03e76710d47e94cea40
2,637
py
Python
gen_embeddings.py
dominiccarrano/backdoor-nn-geometry
d1fa0754f1d57a9b303e2eb71edf0787a86529c8
[ "MIT" ]
1
2021-05-28T14:57:57.000Z
2021-05-28T14:57:57.000Z
gen_embeddings.py
dominiccarrano/backdoor-nn-geometry
d1fa0754f1d57a9b303e2eb71edf0787a86529c8
[ "MIT" ]
null
null
null
gen_embeddings.py
dominiccarrano/backdoor-nn-geometry
d1fa0754f1d57a9b303e2eb71edf0787a86529c8
[ "MIT" ]
null
null
null
import pandas as pd import os import torch import numpy as np import argparse from trojai_utils import * def batch_embeddings(reviews, N, batch_size, tokenizer, embedding, cls_first, embedding_dim=768): embeddings = torch.zeros((N, 1, embedding_dim)) for i in range(N // batch_size): review_batch = revi...
49.754717
120
0.759954
0
0
0
0
0
0
0
0
582
0.220705
d0f527a740c29092c88c485c40c531a07e3a243b
1,584
py
Python
example/image-classification/test_score.py
Abusnina/mxnet
7f8d94a24bf64fe0f24712a7952a09725c2df9bd
[ "Apache-2.0" ]
399
2017-05-30T05:12:48.000Z
2022-01-29T05:53:08.000Z
smd_hpi/examples/binary-imagenet1k/test_score.py
yanghaojin/BMXNet
102f8d0ed59529bbd162c37bf07ae58ad6c4caa1
[ "Apache-2.0" ]
58
2017-05-30T23:25:32.000Z
2019-11-18T09:30:54.000Z
smd_hpi/examples/binary-imagenet1k/test_score.py
yanghaojin/BMXNet
102f8d0ed59529bbd162c37bf07ae58ad6c4caa1
[ "Apache-2.0" ]
107
2017-05-30T05:53:22.000Z
2021-06-24T02:43:31.000Z
""" test pretrained models """ from __future__ import print_function import mxnet as mx from common import find_mxnet, modelzoo from common.util import download_file, get_gpus from score import score def download_data(): download_file('http://data.mxnet.io/data/val-5k-256.rec', 'data/val-5k-256.rec') def test_ima...
33.702128
84
0.599747
0
0
0
0
0
0
0
0
386
0.243687
d0f7159e2aa65ab951c742e07f51245c54e91b4b
293
py
Python
rest_framework_siren/renderers.py
clarkperkins/django-rest-framework-siren
a0bc3d9990d88cfda7204fd0cf78ef08c38084b5
[ "Apache-2.0" ]
2
2017-01-29T03:08:12.000Z
2019-03-28T20:12:01.000Z
rest_framework_siren/renderers.py
clarkperkins/django-rest-framework-siren
a0bc3d9990d88cfda7204fd0cf78ef08c38084b5
[ "Apache-2.0" ]
null
null
null
rest_framework_siren/renderers.py
clarkperkins/django-rest-framework-siren
a0bc3d9990d88cfda7204fd0cf78ef08c38084b5
[ "Apache-2.0" ]
null
null
null
""" Provides Siren rendering support. """ from __future__ import unicode_literals from rest_framework.renderers import JSONRenderer class SirenRenderer(JSONRenderer): """ Renderer which serializes to YAML. """ media_type = 'application/vnd.siren+json' format = 'siren'
18.3125
49
0.726962
157
0.535836
0
0
0
0
0
0
126
0.430034
d0f7870601183663c27b2407e2c8458ad2ea5542
4,050
py
Python
src/ekpmeasure/experiments/ferroelectric/_tester/_wfs.py
cjfinnell/ekpmeasure
e6611c053cad28e06f4f8a94764ebe3805cddb15
[ "MIT" ]
null
null
null
src/ekpmeasure/experiments/ferroelectric/_tester/_wfs.py
cjfinnell/ekpmeasure
e6611c053cad28e06f4f8a94764ebe3805cddb15
[ "MIT" ]
null
null
null
src/ekpmeasure/experiments/ferroelectric/_tester/_wfs.py
cjfinnell/ekpmeasure
e6611c053cad28e06f4f8a94764ebe3805cddb15
[ "MIT" ]
null
null
null
import numpy as np __all__ = ( "standard_bipolar_sine", "double_bipolar_sine", "standard_bipolar", "double_bipolar", "semicircle", "double_semicircle", "gaussian", "double_gaussian", ) def semicircle(a, T): """Return semicircle bipolar wave with amplitude a (units of V) and period...
23.546512
101
0.536049
0
0
0
0
0
0
0
0
1,576
0.389136
d0f98a3a2c3fd048d824ad74c18868bd24ec85c0
1,686
py
Python
inference.py
KirtoXX/Object_track
92b7d3308ab12d9211b04d18f825bf9a488c46a2
[ "Apache-2.0" ]
null
null
null
inference.py
KirtoXX/Object_track
92b7d3308ab12d9211b04d18f825bf9a488c46a2
[ "Apache-2.0" ]
null
null
null
inference.py
KirtoXX/Object_track
92b7d3308ab12d9211b04d18f825bf9a488c46a2
[ "Apache-2.0" ]
null
null
null
from keras import layers import tensorflow as tf from Resnet import ResNet50 import keras from keras.models import Input,Model def inference(image_pre,image_now,location_tensor,shape): #extra high leavl feature input = Input(shape=shape) vision_model = keras.applications.MobileNet(include_top=False, ...
31.811321
72
0.645907
0
0
0
0
0
0
0
0
196
0.116251
d0f9bc7af6fe73617d028c362d0710385e92b83d
1,807
py
Python
src/visualizations/Visualize.py
chpatola/election_nlp
6463edb2eacca09ff828029c69d11be7985ceeb0
[ "MIT" ]
1
2020-04-11T12:00:09.000Z
2020-04-11T12:00:09.000Z
src/visualizations/Visualize.py
chpatola/election_nlp
6463edb2eacca09ff828029c69d11be7985ceeb0
[ "MIT" ]
null
null
null
src/visualizations/Visualize.py
chpatola/election_nlp
6463edb2eacca09ff828029c69d11be7985ceeb0
[ "MIT" ]
null
null
null
"""Visualizations for NLP analysis""" import pandas as pd import numpy as np from sklearn.metrics import classification_report from sklearn.metrics import confusion_matrix import matplotlib.pyplot as plt import seaborn as sns def _plot_classification_report(val_y,predictions): report = classification_report(val_y...
35.431373
78
0.598229
0
0
0
0
0
0
0
0
114
0.063088
d0f9d9924cd74ed348272e7fd7ebf2c3d8c9e835
2,844
py
Python
sqlpuzzle/_queries/selectoptions.py
Dundee/python-sqlpuzzle
260524922a0645c9bf94a9779195f93ef2c78cba
[ "MIT" ]
8
2015-03-19T11:25:32.000Z
2020-09-02T11:30:10.000Z
sqlpuzzle/_queries/selectoptions.py
Dundee/python-sqlpuzzle
260524922a0645c9bf94a9779195f93ef2c78cba
[ "MIT" ]
7
2015-03-23T14:34:28.000Z
2022-02-21T12:36:01.000Z
sqlpuzzle/_queries/selectoptions.py
Dundee/python-sqlpuzzle
260524922a0645c9bf94a9779195f93ef2c78cba
[ "MIT" ]
4
2018-11-28T21:59:27.000Z
2020-01-05T01:50:08.000Z
from sqlpuzzle._common import Object from sqlpuzzle._queries.options import Options __all__ = () class SelectOptions(Options): _definition_of_options = { 'sql_cache': { 'off': '', 'cache': 'SQL_CACHE', 'no_cache': 'SQL_NO_CACHE' }, 'duplicated': { ...
27.085714
71
0.54782
2,740
0.963432
0
0
63
0.022152
0
0
709
0.249297
d0fa3582daacb7e7b72dfa9ecf2ba23f58d16510
1,199
py
Python
Code/RowVariable.py
akankshadiwedy/t2wml
02f60611eec19d10a92fd2cb06f07339cd2cb269
[ "MIT" ]
null
null
null
Code/RowVariable.py
akankshadiwedy/t2wml
02f60611eec19d10a92fd2cb06f07339cd2cb269
[ "MIT" ]
null
null
null
Code/RowVariable.py
akankshadiwedy/t2wml
02f60611eec19d10a92fd2cb06f07339cd2cb269
[ "MIT" ]
null
null
null
from Code.utility_functions import get_excel_row_index class RowVariable: def __init__(self) -> None: self.value = None def evaluate(self, bindings: dict) -> str: """ This function checks if the row variable exists in the bindings dictionary If yes, then returns the value from...
29.243902
98
0.574646
1,141
0.951626
0
0
0
0
0
0
508
0.423686
d0fc29ac4209ca758dbc0af3c328c5e20828a2e9
9,189
py
Python
cvprac_abstraction/cvpChangeControl.py
titom73/arista-cvp-scripts
64f7ffa28d2483b3dd357e9b6c671725a51661b4
[ "BSD-3-Clause" ]
2
2019-08-20T07:35:08.000Z
2019-10-01T00:52:14.000Z
cvprac_abstraction/cvpChangeControl.py
inetsix/arista-cvp-scripts
64f7ffa28d2483b3dd357e9b6c671725a51661b4
[ "BSD-3-Clause" ]
2
2019-05-07T14:36:38.000Z
2019-07-26T05:56:51.000Z
cvprac_abstraction/cvpChangeControl.py
titom73/arista-cvp-scripts
64f7ffa28d2483b3dd357e9b6c671725a51661b4
[ "BSD-3-Clause" ]
1
2021-05-08T20:15:36.000Z
2021-05-08T20:15:36.000Z
import logging from datetime import datetime from datetime import timedelta from cvprac.cvp_client_errors import CvpApiError class CvpChangeControl(object): """Change-control class to provide generic method for CVP CC mechanism. Change Control structure is based on: - A name to identify change ...
34.939163
114
0.575144
9,061
0.98607
0
0
0
0
0
0
6,336
0.68952
d0fd59da3a0fd9fe3acc37b2d63f3055243a7e1f
1,289
py
Python
app/controllers/stores/update.py
Brunoro811/api_dangels
21c064eaa4f5009412dddc9676044d6cc08a5b65
[ "MIT" ]
null
null
null
app/controllers/stores/update.py
Brunoro811/api_dangels
21c064eaa4f5009412dddc9676044d6cc08a5b65
[ "MIT" ]
null
null
null
app/controllers/stores/update.py
Brunoro811/api_dangels
21c064eaa4f5009412dddc9676044d6cc08a5b65
[ "MIT" ]
null
null
null
from flask import current_app, request from http import HTTPStatus from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.orm import Session from app.models.stores.store_model import StoreModel from app.decorators import verify_payload, validator @validator(zip_code="zip_code") @verify_payload( fields_and...
25.78
68
0.59969
0
0
0
0
1,031
0.799845
0
0
163
0.126455
190383e67ecd4d49f6a52f77fa42e3e6a18c204f
4,197
py
Python
misc/openstack-dev.py
tnoff/OpenDerp
44f1e5c2027a2949b785941044a8503a34423228
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
misc/openstack-dev.py
tnoff/OpenDerp
44f1e5c2027a2949b785941044a8503a34423228
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
misc/openstack-dev.py
tnoff/OpenDerp
44f1e5c2027a2949b785941044a8503a34423228
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
#!/usr/bin/env python import argparse import boto from boto.s3 import connection as s3_connection from cinderclient.v1 import client as cinder_v1 import code from novaclient.v1_1 import client as nova_v1 from novaclient.shell import OpenStackComputeShell as open_shell from glanceclient import Client as glance_client fr...
41.97
84
0.571122
0
0
0
0
0
0
0
0
773
0.184179
190468c6a6a1d847c7290e48226df8d86d0b3049
330
py
Python
src/area51/nowd/decorator.py
thatcr/knowed
025b66e4b660ed4339d3156ebca19065bb65b630
[ "MIT" ]
null
null
null
src/area51/nowd/decorator.py
thatcr/knowed
025b66e4b660ed4339d3156ebca19065bb65b630
[ "MIT" ]
null
null
null
src/area51/nowd/decorator.py
thatcr/knowed
025b66e4b660ed4339d3156ebca19065bb65b630
[ "MIT" ]
null
null
null
import inspect from .descriptors import Descriptor from .arguments import ArgsDescriptor def node(fget, *args, **kwargs): signature = inspect.signature(fget) base = ArgsDescriptor if len(signature.parameters) > 1 else Descriptor cls = type(fget.__code__.co_name, (base, ), {}) return cls(fget, *args,...
27.5
74
0.718182
0
0
0
0
0
0
0
0
0
0