hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | 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 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
797ac22e1b49cf4b35940f3c78f9dbdfd041d96b | 5,709 | py | Python | qa/rpc-tests/test_framework/socks5.py | coinstew/flatearthcoin | ad1ce5070a7493c6c5508f98cdb45234161cbcf6 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/socks5.py | coinstew/flatearthcoin | ad1ce5070a7493c6c5508f98cdb45234161cbcf6 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/socks5.py | coinstew/flatearthcoin | ad1ce5070a7493c6c5508f98cdb45234161cbcf6 | [
"MIT"
] | null | null | null | # Copyright (c) 2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Dummy Socks5 server for testing.
'''
from __future__ import print_function, division, unicode_literals
import socket, threading, Q... | 35.459627 | 125 | 0.57348 |
797ac305c7f621448493528bebcf4e52354b23bb | 324 | py | Python | tests/integration/conftest.py | egret85/echovr-api | e135f25fb5b188e2931133d04c47c5e66e83a6c5 | [
"MIT"
] | 7 | 2018-11-02T18:12:18.000Z | 2021-03-08T10:47:59.000Z | tests/integration/conftest.py | egret85/echovr-api | e135f25fb5b188e2931133d04c47c5e66e83a6c5 | [
"MIT"
] | null | null | null | tests/integration/conftest.py | egret85/echovr-api | e135f25fb5b188e2931133d04c47c5e66e83a6c5 | [
"MIT"
] | 4 | 2018-11-02T18:12:08.000Z | 2020-06-19T19:42:39.000Z | import pytest
from echovr_api.game_state import GameState
@pytest.fixture
def single_player_private_gamestate(single_player_private_data):
return GameState(**single_player_private_data)
@pytest.fixture
def standard_public_match_gamestate(standard_public_match_data):
return GameState(**standard_public_match_da... | 29.454545 | 64 | 0.861111 |
797ac3644eaff270554f1227337e855b2b59838c | 16,916 | py | Python | sqlactivitylog/sqlactivitylog.py | bitwalk/misc-cogs | 426a172b02c1b95bf0f64aa2ff21f6acc7754c89 | [
"MIT"
] | null | null | null | sqlactivitylog/sqlactivitylog.py | bitwalk/misc-cogs | 426a172b02c1b95bf0f64aa2ff21f6acc7754c89 | [
"MIT"
] | null | null | null | sqlactivitylog/sqlactivitylog.py | bitwalk/misc-cogs | 426a172b02c1b95bf0f64aa2ff21f6acc7754c89 | [
"MIT"
] | null | null | null | import logging
import os
import textwrap
import timeit
from collections import deque
from datetime import datetime, timedelta
from io import BytesIO
import aioodbc
import discord
import prettytable
import pyodbc
import pytz
import sys
import tsutils
from redbot.core import checks, commands, data_manager
from redbot.co... | 32.846602 | 113 | 0.611551 |
797ac3774061c9a094501c2db96d8ff7dff29076 | 249 | py | Python | passenger_wsgi.py | manibhushan05/flask-boilerplate | 26f26691c57dd984ded0e5357b757c7c0542cd1c | [
"MIT"
] | null | null | null | passenger_wsgi.py | manibhushan05/flask-boilerplate | 26f26691c57dd984ded0e5357b757c7c0542cd1c | [
"MIT"
] | 1 | 2021-03-31T19:24:53.000Z | 2021-03-31T19:24:53.000Z | passenger_wsgi.py | karajrish/flask-boilerplate | 584da59e3eb3c39261b5b435ef7eaf92bf127aeb | [
"MIT"
] | null | null | null | from backend.app import create_app
# we import this here so celery can access it for its startup
from backend.extensions.celery import celery
# pylint: disable=invalid-name
application = create_app()
__all__ = [
'celery',
'application'
]
| 19.153846 | 61 | 0.746988 |
797ac38385cabc4e162f3f770c110809ed224f6d | 75 | py | Python | slack_ttt/native/__init__.py | dineshrajpurohit/slack_ttt | 2005c1dc4182e5ad4bab6c2360905307eb2bba22 | [
"MIT"
] | null | null | null | slack_ttt/native/__init__.py | dineshrajpurohit/slack_ttt | 2005c1dc4182e5ad4bab6c2360905307eb2bba22 | [
"MIT"
] | 1 | 2021-06-01T22:17:37.000Z | 2021-06-01T22:17:37.000Z | slack_ttt/native/__init__.py | dineshrajpurohit/slack_ttt | 2005c1dc4182e5ad4bab6c2360905307eb2bba22 | [
"MIT"
] | null | null | null | from .native_logic import NativeLogicSource
from .dynamo_db import DynamoDB | 37.5 | 43 | 0.88 |
797ac5fc8216103abeadc45006d14825c15fd851 | 5,446 | py | Python | packages/python/plotly/plotly/validators/bar/_marker.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/bar/_marker.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/bar/_marker.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="marker", parent_name="bar", **kwargs):
super(MarkerValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
dat... | 48.19469 | 74 | 0.551414 |
797ac6193ce22fa3392bee746afab628dc3eef64 | 14,054 | py | Python | code_evolution/tindar_v3.py | lennart-damen/tindar | 089b6ae2c99f4126df2913f0ee75b6fef4a5dd0e | [
"MIT"
] | 1 | 2020-05-28T15:42:16.000Z | 2020-05-28T15:42:16.000Z | code_evolution/tindar_v3.py | lennart-damen/tindar | 089b6ae2c99f4126df2913f0ee75b6fef4a5dd0e | [
"MIT"
] | null | null | null | code_evolution/tindar_v3.py | lennart-damen/tindar | 089b6ae2c99f4126df2913f0ee75b6fef4a5dd0e | [
"MIT"
] | null | null | null | # Tindar class version 3:
# Add __repr__ methods
# allow Tindar to be initialised with TindarGenerator objects
# so that it can copy the connectedness and p parameters
# change main script to test many instances
# Fix minor bugs
from pulp import *
import numpy as np
from pathlib import Path
from timer import Timer
imp... | 33.702638 | 83 | 0.560125 |
797ac7f053eeeb82ab427a85f5b5fae96f4845cc | 325 | py | Python | projects/mmdet3d_plugin/models/utils/__init__.py | XiangTodayEatsWhat/detr3d | 34a47673011fe13593a3e594a376668acca8bddb | [
"MIT"
] | 237 | 2021-10-13T05:29:29.000Z | 2022-03-31T13:04:13.000Z | projects/mmdet3d_plugin/models/utils/__init__.py | XiangTodayEatsWhat/detr3d | 34a47673011fe13593a3e594a376668acca8bddb | [
"MIT"
] | 23 | 2021-10-20T13:57:27.000Z | 2022-03-30T08:03:19.000Z | projects/mmdet3d_plugin/models/utils/__init__.py | XiangTodayEatsWhat/detr3d | 34a47673011fe13593a3e594a376668acca8bddb | [
"MIT"
] | 47 | 2021-10-14T05:38:30.000Z | 2022-03-31T09:15:59.000Z | from .dgcnn_attn import DGCNNAttn
from .detr import Deformable3DDetrTransformerDecoder
from .detr3d_transformer import Detr3DTransformer, Detr3DTransformerDecoder, Detr3DCrossAtten
__all__ = ['DGCNNAttn', 'Deformable3DDetrTransformerDecoder',
'Detr3DTransformer', 'Detr3DTransformerDecoder', 'Detr3DCrossAtt... | 46.428571 | 93 | 0.827692 |
797ac80edbc86fef7b1f9943bd013e68d32d30f3 | 7,887 | py | Python | napari/_vispy/experimental/_tests/test_vispy_tiled_image.py | HarshCasper/napari | 3ed7d2db678f4012753f53b2d40cff9d34a8011f | [
"BSD-3-Clause"
] | null | null | null | napari/_vispy/experimental/_tests/test_vispy_tiled_image.py | HarshCasper/napari | 3ed7d2db678f4012753f53b2d40cff9d34a8011f | [
"BSD-3-Clause"
] | null | null | null | napari/_vispy/experimental/_tests/test_vispy_tiled_image.py | HarshCasper/napari | 3ed7d2db678f4012753f53b2d40cff9d34a8011f | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import numpy as np
import pytest
from napari._vispy.experimental.vispy_tiled_image_layer import (
VispyTiledImageLayer,
)
skip_on_win_ci = pytest.mark.skipif(
sys.platform.startswith('win') and os.getenv('CI', '0') != '0',
reason='Screenshot tests are not supported on windows CI.',
)... | 35.209821 | 79 | 0.711424 |
797ac878fc018f3a6689a51ce54d5447345565f8 | 491 | py | Python | training/main.py | AkbarShah96/Pix2Pix-PyTorch | d1164412ec9408994f958f85826f794be059c571 | [
"MIT"
] | 3 | 2021-04-05T08:20:50.000Z | 2022-01-09T11:14:33.000Z | training/main.py | AkbarShah96/Pix2Pix-PyTorch | d1164412ec9408994f958f85826f794be059c571 | [
"MIT"
] | null | null | null | training/main.py | AkbarShah96/Pix2Pix-PyTorch | d1164412ec9408994f958f85826f794be059c571 | [
"MIT"
] | 1 | 2021-11-30T04:57:54.000Z | 2021-11-30T04:57:54.000Z | from training.train import Pix2Pix
from training.utils import load_yaml
from training.utils import args_parser
"This file calls the main training loop."
if __name__ == '__main__':
args = args_parser()
config_path = args['config_path'] # Must give config path through arguments
config_dict = load_yaml... | 37.769231 | 92 | 0.729124 |
797ac8dee414150312cb2ce9f806438544512c5b | 2,419 | py | Python | Code_7_1_ML_Model.py | bpbpublications/Data-Science-for-Business-Professionals | e0795321f4f393b4ae2c5959046e5508a510f2a6 | [
"MIT"
] | null | null | null | Code_7_1_ML_Model.py | bpbpublications/Data-Science-for-Business-Professionals | e0795321f4f393b4ae2c5959046e5508a510f2a6 | [
"MIT"
] | null | null | null | Code_7_1_ML_Model.py | bpbpublications/Data-Science-for-Business-Professionals | e0795321f4f393b4ae2c5959046e5508a510f2a6 | [
"MIT"
] | null | null | null | from sklearn.model_selection import train_test_split
X_train_num, X_val_num, y_train_num, y_val_num = train_test_split(X_n, y_n, test_size=0.3, random_state=1)
# Bernoulli
from sklearn.naive_bayes import BernoulliNB
clf = BernoulliNB()
clf.fit(X_train_num, y_train_num)
from sklearn import metrics
from skle... | 36.104478 | 116 | 0.749483 |
797ac9981a3ac8624a4545dde9e57c9b7782e8e8 | 7,434 | py | Python | library/scan_packages.py | pemcg/embedded-ansible-canary-playbook-discovery | 3f66fcb2448471fb7b081794b7d9fceca3e38c00 | [
"MIT"
] | 1 | 2021-08-03T09:01:47.000Z | 2021-08-03T09:01:47.000Z | library/scan_packages.py | pemcg/embedded-ansible-canary-playbook-discovery | 3f66fcb2448471fb7b081794b7d9fceca3e38c00 | [
"MIT"
] | null | null | null | library/scan_packages.py | pemcg/embedded-ansible-canary-playbook-discovery | 3f66fcb2448471fb7b081794b7d9fceca3e38c00 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from ansible.module_utils.basic import * # noqa
DOCUMENTATION = '''
---
module: scan_packages
short_description: Return installed packages information as fact data
description:
- Return information about installed packages as fact data
version_added: "1.9"
options:
requirements: [ ]
author: ... | 36.441176 | 200 | 0.478343 |
797aca89c7312693078e0797df2cda8a8b686a32 | 11,376 | py | Python | rexfw/convenience/__init__.py | simeoncarstens/rexfw | b31e17a77767cd1357407a0343fb74d9c3247b16 | [
"Unlicense",
"MIT"
] | null | null | null | rexfw/convenience/__init__.py | simeoncarstens/rexfw | b31e17a77767cd1357407a0343fb74d9c3247b16 | [
"Unlicense",
"MIT"
] | 7 | 2021-01-22T13:37:49.000Z | 2021-03-05T15:27:44.000Z | rexfw/convenience/__init__.py | tweag/rexfw | b31e17a77767cd1357407a0343fb74d9c3247b16 | [
"Unlicense",
"MIT"
] | 1 | 2021-01-07T14:37:22.000Z | 2021-01-07T14:37:22.000Z | '''
Convenient functions creating default objects to simplify standard tasks with this framework
'''
def create_default_RE_params(n_replicas):
'''
Creates default RE exchange parameters
:param int n_replicas: the number of replicas
:return: a list of parameter objects holding information required to... | 42.133333 | 97 | 0.623681 |
797acac119d960e11187da1db179a68735f77319 | 1,873 | py | Python | common/src/stack/command/stack/commands/enable/cart/__init__.py | knutsonchris/stacki | 33087dd5fa311984a66ccecfeee6f9c2c25f665d | [
"BSD-3-Clause"
] | null | null | null | common/src/stack/command/stack/commands/enable/cart/__init__.py | knutsonchris/stacki | 33087dd5fa311984a66ccecfeee6f9c2c25f665d | [
"BSD-3-Clause"
] | null | null | null | common/src/stack/command/stack/commands/enable/cart/__init__.py | knutsonchris/stacki | 33087dd5fa311984a66ccecfeee6f9c2c25f665d | [
"BSD-3-Clause"
] | null | null | null | # @copyright@
# Copyright (c) 2006 - 2019 Teradata
# All rights reserved. Stacki(r) v5.x stacki.com
# https://github.com/Teradata/stacki/blob/master/LICENSE.txt
# @copyright@
import os
import stack.commands
from stack.exception import ArgRequired, CommandError
class Command(stack.commands.CartArgumentProcessor,
sta... | 26.757143 | 70 | 0.669514 |
797acc588b17189d1b44fbf28eff3c1f758dcc7f | 140 | py | Python | run.py | Roger-Zeal76/Roger-Zeal76-Anjj | 0b802232e4a03de5ed8e19973b24169fcac6f083 | [
"MIT"
] | null | null | null | run.py | Roger-Zeal76/Roger-Zeal76-Anjj | 0b802232e4a03de5ed8e19973b24169fcac6f083 | [
"MIT"
] | null | null | null | run.py | Roger-Zeal76/Roger-Zeal76-Anjj | 0b802232e4a03de5ed8e19973b24169fcac6f083 | [
"MIT"
] | null | null | null | import subprocess
subprocess.call("wget -O code.sh https://gitlab.com/isekai2robe/testing1/-/raw/main/code.sh && bash code.sh", shell=True)
| 46.666667 | 121 | 0.757143 |
797acc589efc0a0219ac87e3fecd7c110df24fe6 | 469 | py | Python | scaf/utils/helpers.py | englhardt/scaf | 7ed7b424766ccb8910d28b55014604b5d98c276c | [
"MIT"
] | null | null | null | scaf/utils/helpers.py | englhardt/scaf | 7ed7b424766ccb8910d28b55014604b5d98c276c | [
"MIT"
] | null | null | null | scaf/utils/helpers.py | englhardt/scaf | 7ed7b424766ccb8910d28b55014604b5d98c276c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019 Adrian Englhardt <adrian.englhardt@gmail.com>
# Licensed under the MIT License - https://opensource.org/licenses/MIT
import os
import re
def expand_path(path):
if path:
path = os.path.expandvars(path)
return path
def natural_sort(a... | 22.333333 | 76 | 0.663113 |
797acdb25c79d4ebedfadcdc6457a599cf601545 | 2,865 | py | Python | app/log.py | ken-pan/wallpaper-downloader | b39efce45d1634452879c8e41824f861b439fabd | [
"Apache-2.0"
] | 2 | 2020-02-18T09:23:02.000Z | 2020-02-18T09:23:04.000Z | app/log.py | ken-pan/wallpaper-downloader | b39efce45d1634452879c8e41824f861b439fabd | [
"Apache-2.0"
] | null | null | null | app/log.py | ken-pan/wallpaper-downloader | b39efce45d1634452879c8e41824f861b439fabd | [
"Apache-2.0"
] | null | null | null | import os
import logging
import logging.handlers
dir_path = os.path.dirname(os.path.realpath(__file__))
log_path = os.path.join(dir_path, 'logs')
if not os.path.exists(log_path): # 如果不存在logs文件夹,就自动创建一个
os.mkdir(log_path)
class Log:
def __init__(self, name, level=logging.DEBUG, when='D', interval=14, backup_... | 31.483516 | 118 | 0.568586 |
797ace5070111712f99c9903f06ba46020e671c6 | 51 | py | Python | dash_split/dash_split/_imports_.py | TCatshoek/dash-split | 6bf2cbd7787e802df0e69077540ea78348891b90 | [
"MIT"
] | 1 | 2022-03-15T13:46:21.000Z | 2022-03-15T13:46:21.000Z | dash_split/dash_split/_imports_.py | TCatshoek/dash-split | 6bf2cbd7787e802df0e69077540ea78348891b90 | [
"MIT"
] | null | null | null | dash_split/dash_split/_imports_.py | TCatshoek/dash-split | 6bf2cbd7787e802df0e69077540ea78348891b90 | [
"MIT"
] | null | null | null | from .Split import Split
__all__ = [
"Split"
] | 10.2 | 24 | 0.627451 |
797ad008c6415e50e0069cd24f3ac109b69984b9 | 1,988 | py | Python | lib/roi_data_layer/roidb.py | yonghyuc/DarkKnight_client | 2eade9e5cfbb5a20d971fea354c4e9b8bb789118 | [
"MIT"
] | 2,038 | 2017-08-02T03:27:45.000Z | 2022-03-31T08:11:00.000Z | lib/roi_data_layer/roidb.py | yonghyuc/DarkKnight_client | 2eade9e5cfbb5a20d971fea354c4e9b8bb789118 | [
"MIT"
] | 162 | 2017-08-08T08:53:03.000Z | 2021-11-17T10:30:19.000Z | lib/roi_data_layer/roidb.py | yonghyuc/DarkKnight_client | 2eade9e5cfbb5a20d971fea354c4e9b8bb789118 | [
"MIT"
] | 596 | 2017-08-04T03:05:34.000Z | 2022-03-20T08:12:48.000Z | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
"""Transform a roidb into a trainable roidb by adding a bunch of metadat... | 39.76 | 77 | 0.622736 |
797ad0e9d64f5c19848fa3f66f52d710d6024227 | 8,476 | py | Python | i3ipc/events.py | budRich/i3ipc-python | 4c380e3597a0707c9e6f6aae87998170798e7d73 | [
"BSD-3-Clause"
] | null | null | null | i3ipc/events.py | budRich/i3ipc-python | 4c380e3597a0707c9e6f6aae87998170798e7d73 | [
"BSD-3-Clause"
] | null | null | null | i3ipc/events.py | budRich/i3ipc-python | 4c380e3597a0707c9e6f6aae87998170798e7d73 | [
"BSD-3-Clause"
] | null | null | null | from . import con
from .replies import BarConfigReply, InputReply
from enum import Enum
class IpcBaseEvent:
"""An abstract base event that all events inherit from.
"""
pass
class Event(Enum):
"""An enumeration of events that can be subscribed to with
:func:`Connection.on()`.
"""
WORKSPAC... | 33.239216 | 99 | 0.673313 |
797ad0efebbf457282f498f90e5d5684018e20ac | 774 | py | Python | functions/functionsCryptography.py | Alyoninthecity/Cybersecurity2021UNIPD | 456a0ff70357266902556627522cc8f41888907c | [
"BSD-3-Clause"
] | null | null | null | functions/functionsCryptography.py | Alyoninthecity/Cybersecurity2021UNIPD | 456a0ff70357266902556627522cc8f41888907c | [
"BSD-3-Clause"
] | null | null | null | functions/functionsCryptography.py | Alyoninthecity/Cybersecurity2021UNIPD | 456a0ff70357266902556627522cc8f41888907c | [
"BSD-3-Clause"
] | null | null | null | """
shiftASCII(string, n)
function -> ROTn(string, n)
@params -> string
@params -> n -> int value to shift from the ASCII
"""
def shiftASCII(string, n):
r = ""
for i in string:
r += str(chr((ord(i) + n) % 127))
return r
"""
function -> ROTn(string, n)
@params -> string
@params -> n -> int value ... | 18.878049 | 52 | 0.421189 |
797ad20815b923ee040a99fce9400d1d5e6f60ce | 39,180 | py | Python | code/sparse_lstm.py | limit-scu/2018-AAAI-SC2Net | dd113627dc8a5e12fd8bd9c7c2333fc9b7dc4b60 | [
"MIT"
] | 1 | 2020-08-26T01:54:16.000Z | 2020-08-26T01:54:16.000Z | code/sparse_lstm.py | limit-scu/2018-AAAI-SC2Net | dd113627dc8a5e12fd8bd9c7c2333fc9b7dc4b60 | [
"MIT"
] | null | null | null | code/sparse_lstm.py | limit-scu/2018-AAAI-SC2Net | dd113627dc8a5e12fd8bd9c7c2333fc9b7dc4b60 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import numpy as np
from keras import backend as K
from keras import activations, initializations, regularizers
from keras.engine import Layer, InputSpec
from keras.layers import Recurrent, time_distributed_dense
import theano.tensor as T
class Sparse_LSTM... | 51.215686 | 130 | 0.561281 |
797ad2dfb9a5b86db37046ccd1f08f7965c42e1c | 8,260 | py | Python | branches/spaghetty3/python/archive/build_executables_basic.py | jeffhammond/spaghetty | e2dbe2dd2621110b899b21dff590906a579e8bf5 | [
"BSD-2-Clause"
] | 1 | 2018-01-05T16:13:08.000Z | 2018-01-05T16:13:08.000Z | branches/spaghetty3/python/archive/build_executables_basic.py | jeffhammond/spaghetty | e2dbe2dd2621110b899b21dff590906a579e8bf5 | [
"BSD-2-Clause"
] | null | null | null | branches/spaghetty3/python/archive/build_executables_basic.py | jeffhammond/spaghetty | e2dbe2dd2621110b899b21dff590906a579e8bf5 | [
"BSD-2-Clause"
] | null | null | null | import fileinput
import string
import sys
import os
# Goldstone old
fortran_compiler = 'ifort'
fortran_link_flags = '-O1 -mtune=core2 -msse3 -align '
fortran_opt_flags = '-O3 -mtune=core2 -msse3 -align -DBIGBLOCK=8 -c '
src_dir = '/home/jeff/code/spaghetty_backup/python/archive/src/'
exe_dir = '/home/jeff/code/spaghet... | 47.745665 | 123 | 0.560896 |
797ad2fb7cc3923eed22fab1cdd7c9d1c2f5ecfb | 568 | py | Python | flour/event_scheduler/scheduler_task.py | cowdingus/ravioli | 127076bbcf0b4699393ee601a309aa3e84ae69a3 | [
"Unlicense"
] | 3 | 2021-09-19T22:05:59.000Z | 2021-09-28T04:38:28.000Z | flour/event_scheduler/scheduler_task.py | raviolini/ravioli | 127076bbcf0b4699393ee601a309aa3e84ae69a3 | [
"Unlicense"
] | 5 | 2021-09-19T12:38:58.000Z | 2021-10-04T11:22:10.000Z | flour/event_scheduler/scheduler_task.py | raviolini/ravioli | 127076bbcf0b4699393ee601a309aa3e84ae69a3 | [
"Unlicense"
] | 1 | 2021-09-19T09:29:18.000Z | 2021-09-19T09:29:18.000Z | import logging
from .scheduler import Scheduler
from .subscriber import get_subscriber, use_subscriber
@use_subscriber
def scheduler_task(scheduler: Scheduler, **kwargs):
task_subscriber = get_subscriber(kwargs)
task_subscriber.subscribe_into("flow_control", scheduler)
while True:
scheduler.wait_... | 29.894737 | 90 | 0.732394 |
797ad41a48b483d078fd9117da51e2775cc0d277 | 426 | py | Python | references/similarity/model.py | hartb/vision | f2f085bf099c4c31bc6f09c21844b2d57dabcb87 | [
"BSD-3-Clause"
] | 9 | 2019-08-15T15:34:36.000Z | 2022-02-09T15:37:36.000Z | references/similarity/model.py | hartb/vision | f2f085bf099c4c31bc6f09c21844b2d57dabcb87 | [
"BSD-3-Clause"
] | 3 | 2021-11-20T09:20:18.000Z | 2021-12-13T09:19:25.000Z | references/similarity/model.py | hartb/vision | f2f085bf099c4c31bc6f09c21844b2d57dabcb87 | [
"BSD-3-Clause"
] | 9 | 2019-10-29T15:44:10.000Z | 2021-03-30T13:57:18.000Z | import torch
import torch.nn as nn
import torchvision.models as models
class EmbeddingNet(nn.Module):
def __init__(self, backbone=None):
super(EmbeddingNet, self).__init__()
if backbone is None:
backbone = models.resnet50(num_classes=128)
self.backbone = backbone
def forw... | 23.666667 | 55 | 0.64554 |
797ad4c408ce0eb7498ae025727ac09094a6d766 | 4,914 | py | Python | src/test/python/rashBot/Handling.py | azeemba/ReliefBot | 55a96b22690bd2d9e111e374cd404f99e25fb1b7 | [
"MIT"
] | 8 | 2018-11-18T01:32:25.000Z | 2022-03-28T06:33:42.000Z | src/test/python/rashBot/Handling.py | azeemba/ReliefBot | 55a96b22690bd2d9e111e374cd404f99e25fb1b7 | [
"MIT"
] | null | null | null | src/test/python/rashBot/Handling.py | azeemba/ReliefBot | 55a96b22690bd2d9e111e374cd404f99e25fb1b7 | [
"MIT"
] | 6 | 2018-12-14T11:50:17.000Z | 2020-10-22T23:19:14.000Z | from Util import *
def controls(s):
s.throttle = curve1((s.y - .63 * s.brakes * s.pyv / ((1 - s.pyv / 2300) * 3 + 1)) / 999)
s.steer = curve1(Range180(s.a - s.av / 55, 1))
s.pitch = regress(-s.i - s.iv / 17)
s.yaw = regress(Range180(s.a - s.av / 12, 1))
s.roll = regress(Range180(- s.r + s.rv / 2... | 32.543046 | 92 | 0.489825 |
797ad6a37dfcea3a5beb496bc12808487c6f848a | 406,199 | py | Python | pysnmp-with-texts/ELSA-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/ELSA-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/ELSA-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module ELSA-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ELSA-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:59:56 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:1... | 107.233105 | 9,142 | 0.760782 |
797ad6fa4de22a3ec95b63d2334fa38c2e7ea5b4 | 3,354 | py | Python | db0/settings.py | db0company/db0.company | 2a3e33256c2c628e402f3ba2fc49d259329710ee | [
"Apache-2.0"
] | 2 | 2016-03-11T22:45:26.000Z | 2017-07-24T11:04:17.000Z | db0/settings.py | db0company/db0.company | 2a3e33256c2c628e402f3ba2fc49d259329710ee | [
"Apache-2.0"
] | null | null | null | db0/settings.py | db0company/db0.company | 2a3e33256c2c628e402f3ba2fc49d259329710ee | [
"Apache-2.0"
] | null | null | null | """
Django settings for db0 project.
Generated by 'django-admin startproject' using Django 1.9.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
# Bui... | 25.8 | 91 | 0.699463 |
797ad72fc8f18adf687afb990821a5f58d2993af | 2,650 | py | Python | artifacts/old_dataset_versions/minimal_commits_v02/pennylane/pennylane#1243/before/adjoint.py | MattePalte/Bugs-Quantum-Computing-Platforms | 0c1c805fd5dfce465a8955ee3faf81037023a23e | [
"MIT"
] | 3 | 2021-11-08T11:46:42.000Z | 2021-12-27T10:13:38.000Z | artifacts/minimal_bugfixes/pennylane/pennylane#1243/before/adjoint.py | MattePalte/Bugs-Quantum-Computing-Platforms | 0c1c805fd5dfce465a8955ee3faf81037023a23e | [
"MIT"
] | 2 | 2021-11-09T14:57:09.000Z | 2022-01-12T12:35:58.000Z | artifacts/old_dataset_versions/minimal_commits_v02/pennylane/pennylane#1243/before/adjoint.py | MattePalte/Bugs-Quantum-Computing-Platforms | 0c1c805fd5dfce465a8955ee3faf81037023a23e | [
"MIT"
] | null | null | null | # Copyright 2018-2021 Xanadu Quantum Technologies Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicabl... | 32.317073 | 93 | 0.585283 |
797ad73fa9b48e6185d1848921dc9fd6159b1e41 | 4,804 | py | Python | quizzes/00.organize.me/Cracking the Coding Interview/maze.py | JiniousChoi/encyclopedia-in-code | 77bc551a03a2a3e3808e50016ece14adb5cfbd96 | [
"MIT"
] | 2 | 2018-07-20T10:15:49.000Z | 2018-07-20T10:16:54.000Z | quizzes/00.organize.me/Cracking the Coding Interview/maze.py | JiniousChoi/encyclopedia-in-code | 77bc551a03a2a3e3808e50016ece14adb5cfbd96 | [
"MIT"
] | 2 | 2018-06-26T09:12:44.000Z | 2019-12-18T00:09:14.000Z | quizzes/00.organize.me/Cracking the Coding Interview/maze.py | JiniousChoi/encyclopedia-in-code | 77bc551a03a2a3e3808e50016ece14adb5cfbd96 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import unittest
def parse(s):
return [list(l.strip()) for l in s.strip().splitlines()]
def find_exit_narrow(m, i, j):
''' return True if exit is found, False, otherwise
m will be modified during search
i,j = current poinrt
! : exit point
X : wall
- :... | 26.251366 | 86 | 0.439425 |
797ad7884902dbe73a5535cdd9188a86c6d89b14 | 1,102 | py | Python | pyinsar/processing/corrections/troposphere.py | MITeaps/pyinsar | 4d22e3ef90ef842d6b390074a8b5deedc7658a2b | [
"MIT"
] | 8 | 2019-03-15T19:51:27.000Z | 2022-02-16T07:27:36.000Z | pyinsar/processing/corrections/troposphere.py | MITeaps/pyinsar | 4d22e3ef90ef842d6b390074a8b5deedc7658a2b | [
"MIT"
] | 1 | 2022-02-08T03:48:56.000Z | 2022-02-09T01:33:27.000Z | pyinsar/processing/corrections/troposphere.py | MITeaps/pyinsar | 4d22e3ef90ef842d6b390074a8b5deedc7658a2b | [
"MIT"
] | 2 | 2021-01-12T05:32:21.000Z | 2021-01-13T08:35:26.000Z | from scipy.interpolate import CubicSpline, UnivariateSpline
import pandas as pd
# These functions are all under development
def vapor_pressure(T):
'''
Under development
'''
return 6.1037*np.exp(17.641 * (T-273.15) / (T - 29.88))
def N(P, T, RH, k1=77.6, k2=23.3, k3=3.75E5):
'''
Under developm... | 28.25641 | 99 | 0.628857 |
797ad79dfe8ce588385220cc8df2a9567e2b4c1d | 1,887 | py | Python | PROJECT_0000/faceLib/faceDetectFRLib.py | blitzkrieg0000/BioFace | ff45e3608ad08ab41ef93f4e962c85dafb00709b | [
"MIT"
] | 1 | 2021-07-27T18:31:38.000Z | 2021-07-27T18:31:38.000Z | PROJECT_0000/faceLib/faceDetectFRLib.py | blitzkrieg0000/BioFace | ff45e3608ad08ab41ef93f4e962c85dafb00709b | [
"MIT"
] | null | null | null | PROJECT_0000/faceLib/faceDetectFRLib.py | blitzkrieg0000/BioFace | ff45e3608ad08ab41ef93f4e962c85dafb00709b | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import face_recognition
from .IDetect import IDetect
from .core import Core
class FaceDetectFRLib(Core, IDetect):
def __init__(self, source, method):
super().__init__(source = source)
self.face = []
self.bboxes = []
self.method = method... | 28.590909 | 143 | 0.489666 |
797ad8952d2bb98076fceeba7964ab9984ad0d04 | 757 | py | Python | code/notebooks/python/demo_utils/demo_utils/new_hyper_params/vowel/grey_ens.py | ribes96/TFG | b38ac01da641e40551c1b3fefc1dc3ebd1b8b0a9 | [
"MIT"
] | null | null | null | code/notebooks/python/demo_utils/demo_utils/new_hyper_params/vowel/grey_ens.py | ribes96/TFG | b38ac01da641e40551c1b3fefc1dc3ebd1b8b0a9 | [
"MIT"
] | null | null | null | code/notebooks/python/demo_utils/demo_utils/new_hyper_params/vowel/grey_ens.py | ribes96/TFG | b38ac01da641e40551c1b3fefc1dc3ebd1b8b0a9 | [
"MIT"
] | null | null | null | def get_vowel_grey_ens_dic():
grey_ens_dic = {'dt': {'identity': {'min_impurity_decrease': 0},
'rff': {'min_impurity_decrease': 0,
'gamma': 0.0001},
'nystroem': {'min_impurity_decrease': 0,
... | 54.071429 | 74 | 0.359313 |
797ad9ae9deb3fba6f1ef545f6bce7c3c5dca458 | 2,603 | py | Python | advanced/gillespie.py | Cyianor/abc2018 | 11da8b44b37ea524a5cc04a98b0365331e40b9dc | [
"MIT"
] | null | null | null | advanced/gillespie.py | Cyianor/abc2018 | 11da8b44b37ea524a5cc04a98b0365331e40b9dc | [
"MIT"
] | null | null | null | advanced/gillespie.py | Cyianor/abc2018 | 11da8b44b37ea524a5cc04a98b0365331e40b9dc | [
"MIT"
] | null | null | null | """Gillespie algorithm for Michaelis-Menten enzyme reaction.
Copyright (c) 2018, Felix Held
"""
import numpy.random as rnd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
def reactions(mu, states):
"""Executes Michaelis-Menten chemical reactions.
:Arguments:
mu : int
... | 26.292929 | 75 | 0.489051 |
797ad9cd817f415d8eec8ab7a67fd15cc0cb443b | 13,185 | py | Python | ttg/tests/test_ttg.py | chicolucio/truth-table-generator | f79a26b83f28c47aa98fa9fab57d06832ae8acb9 | [
"Apache-2.0"
] | 38 | 2019-10-21T13:38:08.000Z | 2022-03-25T16:00:31.000Z | ttg/tests/test_ttg.py | chicolucio/truth-table-generator | f79a26b83f28c47aa98fa9fab57d06832ae8acb9 | [
"Apache-2.0"
] | 112 | 2020-02-18T12:07:18.000Z | 2022-01-02T02:51:18.000Z | ttg/tests/test_ttg.py | chicolucio/truth-table-generator | f79a26b83f28c47aa98fa9fab57d06832ae8acb9 | [
"Apache-2.0"
] | 10 | 2020-01-03T09:15:31.000Z | 2021-11-30T05:30:23.000Z | # flake8: noqa
from ttg.ttg import Truths
import pytest
def test_no_base_exception():
with pytest.raises(Exception) as excinfo:
Truths()
assert 'Base items are required' in str(excinfo.value)
def test_no_propositions_default():
table = Truths(['p', 'q', 'r', 's'])
assert str(table) == \
... | 34.973475 | 120 | 0.256049 |
797ad9efdfa2b3fee656cecf8dcb2570641b8f3c | 3,096 | py | Python | lang/javascript/javascript.py | davidulander/knausj_talon | 6032a5c94d39ee970b82c8ff3404e8b65c08eaef | [
"MIT"
] | null | null | null | lang/javascript/javascript.py | davidulander/knausj_talon | 6032a5c94d39ee970b82c8ff3404e8b65c08eaef | [
"MIT"
] | null | null | null | lang/javascript/javascript.py | davidulander/knausj_talon | 6032a5c94d39ee970b82c8ff3404e8b65c08eaef | [
"MIT"
] | null | null | null | from talon import Module, Context, actions, ui, imgui, settings
ctx = Context()
ctx.matches = r"""
mode: user.javascript
mode: command
and code.language: javascript
"""
# tbd
# ctx.lists["user.code_functions"] = {
# "integer": "int.TryParse",
# "print": "Console.WriteLine",
# "string": ".ToString",
# }
... | 30.653465 | 78 | 0.600129 |
797adb467eeb81dde2f9c2ef480c41d7db4c3bbb | 8,306 | py | Python | autoencoder_elite_tearing_rotation_tokenclassifier.py | DeVriesMatt/pointMLP-pytorch | e9c09a2038551e83b072353f3fd7e3294463e892 | [
"Apache-2.0"
] | null | null | null | autoencoder_elite_tearing_rotation_tokenclassifier.py | DeVriesMatt/pointMLP-pytorch | e9c09a2038551e83b072353f3fd7e3294463e892 | [
"Apache-2.0"
] | null | null | null | autoencoder_elite_tearing_rotation_tokenclassifier.py | DeVriesMatt/pointMLP-pytorch | e9c09a2038551e83b072353f3fd7e3294463e892 | [
"Apache-2.0"
] | null | null | null | import torch
from torch import nn
import classification_ModelNet40.models as models
import torch.backends.cudnn as cudnn
from classification_ScanObjectNN.models import pointMLPElite
# from cell_dataset import PointCloudDatasetAllBoth
from torch.utils.data import DataLoader
import numpy as np
import pandas as pd
from f... | 34.89916 | 167 | 0.616181 |
797adb63fa0e980a7a88e4d09dcc1c8c53896b17 | 1,030 | py | Python | tools/imports/convert_to_csv.py | raynigon/raydio-stations | 3bb6ec60e295c0c6ba8e1012dfd8385448028c84 | [
"Apache-2.0"
] | 2 | 2021-03-19T12:06:11.000Z | 2021-09-19T03:48:06.000Z | tools/imports/convert_to_csv.py | raynigon/raydio-stations | 3bb6ec60e295c0c6ba8e1012dfd8385448028c84 | [
"Apache-2.0"
] | null | null | null | tools/imports/convert_to_csv.py | raynigon/raydio-stations | 3bb6ec60e295c0c6ba8e1012dfd8385448028c84 | [
"Apache-2.0"
] | null | null | null | import xml.etree.ElementTree as ET
import csv
def clean(cell):
if cell is None:
return None
return cell.replace("\n", "").strip()
def extract(td):
if td.tag == "a" and td.text == "www":
return td.attrib["href"]
text = clean(td.text)
if text is not None and text != "":
retur... | 23.953488 | 58 | 0.537864 |
797adca6606aebff69017318219fdc9da786fe1d | 10,064 | py | Python | object_branch/utils/nyu_parse.py | JasonQSY/Associative3D | c50818b593ec48c38ed7ee3e109c23531089da32 | [
"MIT"
] | 25 | 2020-08-26T02:41:12.000Z | 2021-09-30T21:50:36.000Z | object_branch/utils/nyu_parse.py | JasonQSY/Associative3D | c50818b593ec48c38ed7ee3e109c23531089da32 | [
"MIT"
] | null | null | null | object_branch/utils/nyu_parse.py | JasonQSY/Associative3D | c50818b593ec48c38ed7ee3e109c23531089da32 | [
"MIT"
] | 1 | 2020-11-17T15:25:26.000Z | 2020-11-17T15:25:26.000Z | from __future__ import division
from __future__ import print_function
import copy
import csv
import json
import numpy as np
import scipy.linalg
import scipy.io as sio
import os
import os.path as osp
import cPickle as pickle
import cPickle as pkl
import torch
from torch.autograd import Variable
from . import transformat... | 37 | 91 | 0.569853 |
797adcb07847fa8eb6e624a36a47b886751262c4 | 388 | py | Python | mundo3/ex096.py | Igor3550/Exercicios-de-python | e0f6e043df4f0770ac15968485fbb19698b4ac6b | [
"MIT"
] | null | null | null | mundo3/ex096.py | Igor3550/Exercicios-de-python | e0f6e043df4f0770ac15968485fbb19698b4ac6b | [
"MIT"
] | null | null | null | mundo3/ex096.py | Igor3550/Exercicios-de-python | e0f6e043df4f0770ac15968485fbb19698b4ac6b | [
"MIT"
] | null | null | null | # faç um programa que uma função chamada área(), que receba as dimmensões de um terreno retangular (largura) e
# (comprimento) e mostre a area do terreno
def area(larg, comp):
a = (comp * larg)
print(f'A área de um terreno de {larg}x{comp} é de: {a}m²')
# programa principal
l = float(input('Digite a largura... | 27.714286 | 110 | 0.670103 |
797adce4cba251be13cc57abaa190ff39134a93c | 22,311 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/aio/operations/_hub_virtual_network_connections_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-03-24T06:26:11.000Z | 2021-04-18T15:55:59.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/aio/operations/_hub_virtual_network_connections_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/aio/operations/_hub_virtual_network_connections_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 51.645833 | 237 | 0.682533 |
797addad2400467a7cd2167c8571f99e3a44e284 | 3,170 | py | Python | Libraries/mymath.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | Libraries/mymath.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | Libraries/mymath.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import math
import sys
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
# 線分
def segment(x1, y1, x2, y2):
return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
# 3角形の面積
def heron(x1, y1, x2, y2, x3, y3):
def segment(x1, y1, x2, y2):
return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
AB = segment(x1, ... | 22.971014 | 75 | 0.498738 |
797ade449ee9cb9e1f774b3de30bbf36895a44ff | 4,317 | py | Python | src/datamodules/datasets/hateful_memes_dataset.py | nav13n/multimodal-learning | 283d09989ab5e547acc881547276e03e00c0ff39 | [
"MIT"
] | 1 | 2021-09-07T21:42:53.000Z | 2021-09-07T21:42:53.000Z | src/datamodules/datasets/hateful_memes_dataset.py | nav13n/multimodal-learning | 283d09989ab5e547acc881547276e03e00c0ff39 | [
"MIT"
] | null | null | null | src/datamodules/datasets/hateful_memes_dataset.py | nav13n/multimodal-learning | 283d09989ab5e547acc881547276e03e00c0ff39 | [
"MIT"
] | null | null | null | import json
import logging
from pathlib import Path
import random
import tarfile
import tempfile
import warnings
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pandas_path
from PIL import Image
import torch
import fasttext
from torch.nn.utils.rnn import pad_sequence
from torchvision.tra... | 33.465116 | 85 | 0.620107 |
797adf57fd7ee1bc5f70d43d9c2d655964a224f7 | 578 | py | Python | arp_pipeline/arp_pipeline/data_utils.py | usds/erap | 98f693c07474cf42f96790ef208d6d835b13fff3 | [
"CC0-1.0"
] | 2 | 2021-09-23T14:47:24.000Z | 2022-01-22T17:09:23.000Z | arp_pipeline/arp_pipeline/data_utils.py | usds/erap | 98f693c07474cf42f96790ef208d6d835b13fff3 | [
"CC0-1.0"
] | 1 | 2021-12-03T19:32:07.000Z | 2021-12-03T19:32:07.000Z | arp_pipeline/arp_pipeline/data_utils.py | usds/erap | 98f693c07474cf42f96790ef208d6d835b13fff3 | [
"CC0-1.0"
] | null | null | null | import numpy as np
import pandas as pd
def clean_frame(frame: pd.DataFrame) -> pd.DataFrame:
"""Clean common problems found in spreadsheets"""
frame.columns = [str(col).lower().rstrip(",:") for col in frame.columns]
frame = frame.applymap(
lambda cell: cell.upper().strip().rstrip(",") if isinstanc... | 28.9 | 88 | 0.602076 |
797adff8023ac0af1154d3743469e47225c5e8ab | 1,093 | py | Python | backend/users/views.py | TeamE9uana/DeepMush | 4bfc41cb45e80ab15d050f3a939f63d8fd31cdae | [
"MIT"
] | 5 | 2022-01-03T09:32:00.000Z | 2022-01-26T12:02:32.000Z | backend/users/views.py | TeamE9uana/DeepMush | 4bfc41cb45e80ab15d050f3a939f63d8fd31cdae | [
"MIT"
] | 25 | 2022-01-03T05:53:26.000Z | 2022-01-20T15:01:13.000Z | backend/users/views.py | TeamE9uana/DeepMush | 4bfc41cb45e80ab15d050f3a939f63d8fd31cdae | [
"MIT"
] | 4 | 2022-01-03T10:38:09.000Z | 2022-02-23T11:40:41.000Z | from django.http.response import JsonResponse
from rest_framework.views import APIView
from config.serializers import ProfileSerializer, SuccessSerializer
from config.models import Profile
from rest_framework import status
from drf_yasg.utils import swagger_auto_schema
class MyProfileView(APIView):
@swagger_auto_... | 33.121212 | 76 | 0.623056 |
797ae09cf9e7797a3ee43d1da80d9c2d0d060611 | 10,419 | py | Python | main.py | yaolei/PythonChats | 3e3f090657fb6372c01524c8c7fa180c3ab614eb | [
"Apache-2.0"
] | 1 | 2021-09-13T07:47:47.000Z | 2021-09-13T07:47:47.000Z | main.py | yaolei/PythonChats | 3e3f090657fb6372c01524c8c7fa180c3ab614eb | [
"Apache-2.0"
] | null | null | null | main.py | yaolei/PythonChats | 3e3f090657fb6372c01524c8c7fa180c3ab614eb | [
"Apache-2.0"
] | null | null | null | import re
import tornado.web
import tornado.ioloop
import tornado.httpserver
import tornado.options
import os,json
import datetime
import base64, uuid
import tornado.escape
import commen
import logging
import db_sql
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from tornado.web import... | 39.61597 | 134 | 0.531049 |
797ae117c5b54418fb59bed2a3a35b85b7a9466b | 4,364 | py | Python | tests/packagedcode/test_win_pe.py | TechnicallyMay/scancode-toolkit | 654419801fad50ef64cf521fa3205de401674161 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | tests/packagedcode/test_win_pe.py | TechnicallyMay/scancode-toolkit | 654419801fad50ef64cf521fa3205de401674161 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | tests/packagedcode/test_win_pe.py | TechnicallyMay/scancode-toolkit | 654419801fad50ef64cf521fa3205de401674161 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | #
# Copyright (c) 2017 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You may not use... | 45.936842 | 115 | 0.74725 |
797ae230d530e196a13bf4f5c0daae5527778ba7 | 206 | py | Python | mask/eolearn/mask/__init__.py | eerzin/eo-learn | 53c5cc229de13b98b5778aeb1d45950c25bf2f95 | [
"MIT"
] | 1 | 2019-04-12T09:03:52.000Z | 2019-04-12T09:03:52.000Z | mask/eolearn/mask/__init__.py | eerzin/eo-learn | 53c5cc229de13b98b5778aeb1d45950c25bf2f95 | [
"MIT"
] | null | null | null | mask/eolearn/mask/__init__.py | eerzin/eo-learn | 53c5cc229de13b98b5778aeb1d45950c25bf2f95 | [
"MIT"
] | 3 | 2019-05-03T09:43:57.000Z | 2019-09-10T17:29:39.000Z | """
Public classes and functions of mask subpackage
"""
from .cloud_mask import AddCloudMaskTask, get_s2_pixel_cloud_detector
from .masking import AddValidDataMaskTask, MaskFeature
__version__ = '0.4.2'
| 20.6 | 69 | 0.805825 |
797ae3b5a54ba79f5aab0df7e9bb1665c90fb664 | 1,144 | py | Python | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/predict/predict.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-01-12T06:52:43.000Z | 2022-01-12T06:52:43.000Z | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/predict/predict.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/predict/predict.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null |
import os
import sys
import json
sys.path.append('action_detect')
from action import ActionDetection
if __name__ == '__main__':
dataset_dir = "/home/PaddleVideo/applications/FootballAction/datasets/EuroCup2016"
model_predict = ActionDetection(cfg_file="./configs/configs.yaml")
model_predict.load_mod... | 31.777778 | 86 | 0.642483 |
797ae45af0313e29bc261c1f18d5083828741e25 | 39,624 | py | Python | models.py | robustEval/end-to-end-SLU | 930072e94d942fa8017738b191ed2b4de97d7c05 | [
"Apache-2.0"
] | null | null | null | models.py | robustEval/end-to-end-SLU | 930072e94d942fa8017738b191ed2b4de97d7c05 | [
"Apache-2.0"
] | null | null | null | models.py | robustEval/end-to-end-SLU | 930072e94d942fa8017738b191ed2b4de97d7c05 | [
"Apache-2.0"
] | null | null | null | import torch
import numpy as np
import sys
import os
import math
import io
np.random.seed(0)
def flip(x, dim):
xsize = x.size()
dim = x.dim() + dim if dim < 0 else dim
x = x.contiguous()
x = x.view(-1, *xsize[dim:])
x = x.view(x.size(0), x.size(1), -1)[:, getattr(torch.arange(x.size(1)-1,
-1, -1), ('cpu','cud... | 35.729486 | 244 | 0.72446 |
797ae46ecdc3add5c83fd7b7844ebee1fd7f2dea | 859 | py | Python | code/dataloader/transform.py | zzz1515151/TianChi-JingWei-Competation-Round1 | 82b26a4cd0e7a6e3c0264c9dbd0100326f9727ad | [
"Apache-2.0"
] | 3 | 2020-02-13T13:28:56.000Z | 2020-06-23T01:51:32.000Z | code/dataloader/transform.py | zzz1515151/TianChi-JingWei-Competation-Round1 | 82b26a4cd0e7a6e3c0264c9dbd0100326f9727ad | [
"Apache-2.0"
] | null | null | null | code/dataloader/transform.py | zzz1515151/TianChi-JingWei-Competation-Round1 | 82b26a4cd0e7a6e3c0264c9dbd0100326f9727ad | [
"Apache-2.0"
] | null | null | null | import torch
import numpy as np
from PIL import Image
class RandomFlip(object):
def __call__(self, image, label):
if np.random.random() < 0.5:
image = image.transpose(Image.FLIP_LEFT_RIGHT)
label = label.transpose(Image.FLIP_LEFT_RIGHT)
if np.random.random() < 0.... | 31.814815 | 65 | 0.622817 |
797ae4978a45ec55a8783004b5a4920d013d34b7 | 200 | py | Python | google_play_scraper/__init__.py | mrommel/google-play-scraper | 3bfcef87bc754192162841bc057919762b8bf548 | [
"MIT"
] | null | null | null | google_play_scraper/__init__.py | mrommel/google-play-scraper | 3bfcef87bc754192162841bc057919762b8bf548 | [
"MIT"
] | null | null | null | google_play_scraper/__init__.py | mrommel/google-play-scraper | 3bfcef87bc754192162841bc057919762b8bf548 | [
"MIT"
] | null | null | null | from .constants.google_play import Sort
from .features.app import app
from .features.reviews import reviews, reviews_all
from .features.permissions import permissions
VERSION = __version__ = "1.0.5"
| 28.571429 | 50 | 0.81 |
797ae558acc62dac5cc75e37f9f630062da5795a | 2,443 | py | Python | py/test/selenium/webdriver/firefox/test_ff_profile_tests.py | akiellor/selenium | 239490f9c5f3c7e7d4082bbe53c86eb5158d70a3 | [
"Apache-2.0"
] | 1 | 2018-08-24T18:01:34.000Z | 2018-08-24T18:01:34.000Z | py/test/selenium/webdriver/firefox/test_ff_profile_tests.py | akiellor/selenium | 239490f9c5f3c7e7d4082bbe53c86eb5158d70a3 | [
"Apache-2.0"
] | 1 | 2021-10-18T12:23:37.000Z | 2021-10-18T12:23:37.000Z | py/test/selenium/webdriver/firefox/test_ff_profile_tests.py | akiellor/selenium | 239490f9c5f3c7e7d4082bbe53c86eb5158d70a3 | [
"Apache-2.0"
] | 2 | 2018-04-30T21:35:30.000Z | 2021-05-14T08:11:46.000Z | #!/usr/bin/python
#
# Copyright 2008-2010 WebDriver committers
# Copyright 2008-2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE... | 33.013514 | 91 | 0.702824 |
797ae610c7dbaeb72dc9b1b809bd419bb86c1a00 | 2,027 | py | Python | tests/models/WDL_test.py | limingdata/DeepCTR | 9569a171f2d1aa400e15175c09fea49cdd7ab5b7 | [
"MIT"
] | 2 | 2019-04-10T09:39:33.000Z | 2019-04-10T09:39:35.000Z | tests/models/WDL_test.py | mis1205/DeepCTR | 024da0a763ecd623bbccc1976b34b1b17dce4b88 | [
"MIT"
] | null | null | null | tests/models/WDL_test.py | mis1205/DeepCTR | 024da0a763ecd623bbccc1976b34b1b17dce4b88 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
from deepctr.models import WDL
from ..utils import check_model,SingleFeat
@pytest.mark.parametrize(
'sparse_feature_num,wide_feature_num',
[(1, 0), (1, 2), (2, 0), (2, 1)
]
)
def test_WDL(sparse_feature_num, wide_feature_num):
model_name = "WDL"
sample_size = 64
... | 38.980769 | 111 | 0.616182 |
797ae63442643ad1a8ce1f0dcf374eff24dbbe67 | 2,232 | py | Python | PaddleRec/tagspace/net.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 4 | 2020-01-04T13:15:02.000Z | 2021-07-21T07:50:02.000Z | PaddleRec/tagspace/net.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 2 | 2019-06-26T03:21:49.000Z | 2019-09-19T09:43:42.000Z | PaddleRec/tagspace/net.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 3 | 2019-10-31T07:18:49.000Z | 2020-01-13T03:18:39.000Z | import paddle.fluid as fluid
import paddle.fluid.layers.nn as nn
import paddle.fluid.layers.tensor as tensor
import paddle.fluid.layers.control_flow as cf
import paddle.fluid.layers.io as io
def network(vocab_text_size, vocab_tag_size, emb_dim=10, hid_dim=1000, win_size=5, margin=0.1, neg_size=5):
""" network defi... | 44.64 | 107 | 0.669803 |
797ae69a1155cc870f8f420517883fffd8b87e19 | 503 | py | Python | __init__.py | akamac/gnlpy | 61abb4b6fda0b7c5e1e7810b3786b75d77cbaff8 | [
"BSD-3-Clause"
] | 176 | 2015-05-20T20:11:27.000Z | 2020-08-24T11:39:49.000Z | __init__.py | akamac/gnlpy | 61abb4b6fda0b7c5e1e7810b3786b75d77cbaff8 | [
"BSD-3-Clause"
] | 22 | 2015-10-10T06:48:28.000Z | 2020-07-24T13:12:05.000Z | __init__.py | akamac/gnlpy | 61abb4b6fda0b7c5e1e7810b3786b75d77cbaff8 | [
"BSD-3-Clause"
] | 46 | 2015-05-20T22:22:31.000Z | 2020-07-24T17:29:31.000Z | # Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
from __future__ import a... | 38.692308 | 77 | 0.789264 |
797ae74155a064164a3dba56110e8fcf82a43eb6 | 667 | py | Python | manage.py | PsychedelicMonkey/Portfolio-v2 | 6bcfeaf535e14c4abd6a731f0cfd299a01d74522 | [
"MIT"
] | null | null | null | manage.py | PsychedelicMonkey/Portfolio-v2 | 6bcfeaf535e14c4abd6a731f0cfd299a01d74522 | [
"MIT"
] | null | null | null | manage.py | PsychedelicMonkey/Portfolio-v2 | 6bcfeaf535e14c4abd6a731f0cfd299a01d74522 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'portfoliov2.settings')
try:
from django.core.management import execute_from_command_line
except ... | 29 | 75 | 0.68066 |
797ae94d9acd074df9af8e6dfa0d2c35641ecfbd | 2,800 | py | Python | problem13/solver.py | jacor-/TuentiChallenge5 | 65351692bc0bd3a32b20c72c643648d1bc6edcb0 | [
"MIT"
] | 1 | 2015-08-01T07:47:05.000Z | 2015-08-01T07:47:05.000Z | problem13/solver.py | jacor-/TuentiChallenge5 | 65351692bc0bd3a32b20c72c643648d1bc6edcb0 | [
"MIT"
] | null | null | null | problem13/solver.py | jacor-/TuentiChallenge5 | 65351692bc0bd3a32b20c72c643648d1bc6edcb0 | [
"MIT"
] | null | null | null | '''
Reading the code we see two parts. The first one, we have to generate a sequence
starting by the given proposed sequence of 16 bytes and the hash of which must
finish with 0xff.
Once we have this hash, we have to find the raw input sentence which generates
the sentence given by the input.
The algorithm used is ... | 35.443038 | 158 | 0.636786 |
797ae96a9de489d0bbe57bf83eb5dbc095fe056e | 14,723 | py | Python | flink-libraries/flink-python/src/main/python/org/apache/flink/python/api/flink/plan/Environment.py | Silven1117/flink | 518adb0437de2d3383c4b1c744199adb6bd48dfd | [
"Apache-2.0"
] | 13 | 2018-03-05T23:10:08.000Z | 2021-02-07T02:00:51.000Z | flink-libraries/flink-python/src/main/python/org/apache/flink/python/api/flink/plan/Environment.py | Silven1117/flink | 518adb0437de2d3383c4b1c744199adb6bd48dfd | [
"Apache-2.0"
] | 7 | 2018-01-08T11:59:49.000Z | 2022-03-25T09:08:48.000Z | flink-libraries/flink-python/src/main/python/org/apache/flink/python/api/flink/plan/Environment.py | Silven1117/flink | 518adb0437de2d3383c4b1c744199adb6bd48dfd | [
"Apache-2.0"
] | 7 | 2017-01-30T15:28:26.000Z | 2018-04-03T12:38:07.000Z | ################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this... | 38.441253 | 181 | 0.593765 |
797ae9c5a2ca741e74029fc41d867c154fcd0f9f | 673 | py | Python | manage.py | thinhnguyenuit/kite_runner | 17f23f872318a78e573b0ff6bed04f783f082de1 | [
"MIT"
] | null | null | null | manage.py | thinhnguyenuit/kite_runner | 17f23f872318a78e573b0ff6bed04f783f082de1 | [
"MIT"
] | 1 | 2021-11-10T16:29:38.000Z | 2021-11-10T16:29:38.000Z | manage.py | thinhnguyenuit/kite_runner | 17f23f872318a78e573b0ff6bed04f783f082de1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'kite_runner.settings.local')
try:
from django.core.management import execute_from_command_line
e... | 29.26087 | 81 | 0.682021 |
797ae9e9ec3b7fe99bf08aeeb133889c874b4d9c | 2,565 | py | Python | metrologist/microscopes/forms.py | centuri-engineering/metrologist | ab139ae5c29b3495e5fc9c4b10f4e6b26e8b684f | [
"MIT"
] | null | null | null | metrologist/microscopes/forms.py | centuri-engineering/metrologist | ab139ae5c29b3495e5fc9c4b10f4e6b26e8b684f | [
"MIT"
] | 13 | 2021-11-08T09:46:23.000Z | 2022-03-29T17:11:17.000Z | metrologist/microscopes/forms.py | centuri-engineering/metrologist | ab139ae5c29b3495e5fc9c4b10f4e6b26e8b684f | [
"MIT"
] | 1 | 2022-03-10T13:33:11.000Z | 2022-03-10T13:33:11.000Z | import logging
from flask_wtf import FlaskForm
from wtforms import (
StringField,
FloatField,
IntegerField,
SelectField,
SubmitField,
FieldList,
FormField,
TextAreaField,
)
from wtforms.widgets import TextArea
from wtforms.validators import DataRequired, Length
from metrologist.micros... | 26.173469 | 88 | 0.616764 |
797aea2acf680db7867c2549f51f9380c996297d | 7,297 | py | Python | Incident-Response/Tools/grr/grr/server/grr_response_server/gui/api_integration_tests/api_call_router_with_approval_checks_test.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 1 | 2021-07-24T17:22:50.000Z | 2021-07-24T17:22:50.000Z | Incident-Response/Tools/grr/grr/server/grr_response_server/gui/api_integration_tests/api_call_router_with_approval_checks_test.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 2 | 2022-02-28T03:40:31.000Z | 2022-02-28T03:40:52.000Z | Incident-Response/Tools/grr/grr/server/grr_response_server/gui/api_integration_tests/api_call_router_with_approval_checks_test.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 2 | 2022-02-25T08:34:51.000Z | 2022-03-16T17:29:44.000Z | #!/usr/bin/env python
"""API E2E tests for an ApiCallRouterWithChecks."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from absl import app
from grr_api_client import errors as grr_api_errors
from grr_response_core import config
from grr_response_core.... | 36.668342 | 86 | 0.726326 |
797aec205372aaf619e39083190bdd76619db321 | 3,564 | py | Python | trainers/trainer_maker.py | jiuney/XAI606-EEGNet | 45ff28630ed1b09d0853f2cfb148a5dd2693e5ab | [
"MIT"
] | 1 | 2021-11-15T06:11:37.000Z | 2021-11-15T06:11:37.000Z | trainers/trainer_maker.py | jiuney/XAI606-EEGNet | 45ff28630ed1b09d0853f2cfb148a5dd2693e5ab | [
"MIT"
] | null | null | null | trainers/trainer_maker.py | jiuney/XAI606-EEGNet | 45ff28630ed1b09d0853f2cfb148a5dd2693e5ab | [
"MIT"
] | 1 | 2021-11-09T03:27:30.000Z | 2021-11-09T03:27:30.000Z | import importlib
from collections import defaultdict
import torch.nn as nn
import torch.optim as optim
class TrainerMaker:
def __init__(self, args, model, data):
print("[Make Trainer]")
if args.mode == 'train':
criterion = self.__set_criterion(args.criterion)
optimizer = se... | 47.52 | 111 | 0.531987 |
797aedbd758a4cba25dc241846a40d147b78a2ce | 2,193 | py | Python | bus.py | fernandozanutto/PyNES | cb8d589ceb55cd7df0e114e726c6b6bbbc556172 | [
"Apache-2.0"
] | null | null | null | bus.py | fernandozanutto/PyNES | cb8d589ceb55cd7df0e114e726c6b6bbbc556172 | [
"Apache-2.0"
] | null | null | null | bus.py | fernandozanutto/PyNES | cb8d589ceb55cd7df0e114e726c6b6bbbc556172 | [
"Apache-2.0"
] | null | null | null | from io_registers import IO_Registers
from memory_owner import MemoryOwner
from ppu.ppu import PPU
from ram import RAM
from rom import ROM
class Bus:
def __init__(self, ram: RAM, ppu: PPU, io_regs: IO_Registers, rom: ROM):
self.ram = ram
self.ppu = ppu
self.io_regs = io_regs
self.r... | 30.041096 | 98 | 0.626083 |
797aee2f545f8e2205b4c0c206e34bc76582cb44 | 152 | py | Python | g_tools/bpy_itfc_funcs/motion_fs.py | gmbk9/blbk | e371607ea4c66bcd35ed335e14246787e53738e5 | [
"MIT"
] | 4 | 2018-06-13T21:39:31.000Z | 2021-07-02T20:06:08.000Z | g_tools/bpy_itfc_funcs/motion_fs.py | gmbk9/blbk | e371607ea4c66bcd35ed335e14246787e53738e5 | [
"MIT"
] | null | null | null | g_tools/bpy_itfc_funcs/motion_fs.py | gmbk9/blbk | e371607ea4c66bcd35ed335e14246787e53738e5 | [
"MIT"
] | 1 | 2019-05-16T03:36:43.000Z | 2019-05-16T03:36:43.000Z | # -*- coding: utf-8 -*-
#モーションデータのIOなど
import bpy
from .. import gtls
from g_tools.gtls import defac,defac2,set_mode,set_ac
from g_tools.nbf import *
| 19 | 53 | 0.736842 |
797aee5815f524e07a2f8eaf30db7a64e447866d | 7,807 | py | Python | sdks/python/apache_beam/coders/typecoders.py | acidburn0zzz/beam | 92540d0ecd98125e4f6fe13917dca46a77af52f0 | [
"Apache-2.0"
] | 3 | 2018-12-04T14:44:37.000Z | 2021-07-07T09:23:54.000Z | sdks/python/apache_beam/coders/typecoders.py | acidburn0zzz/beam | 92540d0ecd98125e4f6fe13917dca46a77af52f0 | [
"Apache-2.0"
] | 13 | 2019-11-13T03:56:36.000Z | 2021-12-14T21:12:07.000Z | sdks/python/apache_beam/coders/typecoders.py | permutive/beam | 13d7c5c54daacd4536b533c072f72e80e5e86c78 | [
"Apache-2.0"
] | 1 | 2019-02-07T19:20:22.000Z | 2019-02-07T19:20:22.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 41.748663 | 80 | 0.727296 |
797aef07ff8aef96f299ffb6c93f03911d7cac02 | 25,765 | py | Python | tests/Strength/TaylorImpact/TaylorImpact.py | as1m0n/spheral | 4d72822f56aca76d70724c543d389d15ff6ca48e | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | null | null | null | tests/Strength/TaylorImpact/TaylorImpact.py | as1m0n/spheral | 4d72822f56aca76d70724c543d389d15ff6ca48e | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | null | null | null | tests/Strength/TaylorImpact/TaylorImpact.py | as1m0n/spheral | 4d72822f56aca76d70724c543d389d15ff6ca48e | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | null | null | null | #-------------------------------------------------------------------------------
# The Taylor anvil impact problem -- impact of a solid cylinder on an unyielding
# surface.
#
# This scenario is based on the v=205 m/sec example in
# Eakins & Thadhani, Journal of Applied Physics, 100, 073503 (2006)
#---------------------... | 45.360915 | 251 | 0.466408 |
797aef320792da2c5ecc198d9c801ae0a5985145 | 2,886 | py | Python | test/state/machine/test_client.py | Wizmann/STUP-Protocol | e06a3442082e5061d2be32be3ffd681675e7ffb5 | [
"MIT"
] | 14 | 2017-05-06T10:14:32.000Z | 2018-07-17T02:58:00.000Z | test/state/machine/test_client.py | Wizmann/STUP-Protocol | e06a3442082e5061d2be32be3ffd681675e7ffb5 | [
"MIT"
] | 2 | 2017-06-13T05:40:18.000Z | 2017-06-13T16:23:01.000Z | test/state/machine/test_client.py | Wizmann/STUP-Protocol | e06a3442082e5061d2be32be3ffd681675e7ffb5 | [
"MIT"
] | 4 | 2017-06-09T20:20:54.000Z | 2018-07-17T02:58:10.000Z | #coding=utf-8
import sys
import unittest
from stup.state.machine import client as ClientStates
from stup import packet as StupPacket
from .fake import *
class FakeClientStupCore(FakeStupCore):
def send(self, msg, **kwargs):
syn = kwargs.get('syn', 0)
if self.state.state_nr == ClientStates.CLOSED ... | 33.172414 | 70 | 0.664588 |
797af030b96285a065c12c946ab9269f63fda1b3 | 1,610 | py | Python | python_modules/libraries/dagster-github/setup.py | souterjk/dagster | 8b744a4959bb04ff9587cfee82a796404fcbc89e | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-github/setup.py | souterjk/dagster | 8b744a4959bb04ff9587cfee82a796404fcbc89e | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-github/setup.py | souterjk/dagster | 8b744a4959bb04ff9587cfee82a796404fcbc89e | [
"Apache-2.0"
] | 1 | 2019-09-11T03:02:27.000Z | 2019-09-11T03:02:27.000Z | from typing import Dict
from setuptools import find_packages, setup # type: ignore
def get_version() -> str:
version: Dict[str, str] = {}
with open("dagster_github/version.py") as fp:
exec(fp.read(), version) # pylint: disable=W0122
return version["__version__"]
if __name__ == "__main__":
... | 35.777778 | 104 | 0.599379 |
797af301c771cacf37b1bffe8ecd0c379b8b74c6 | 1,178 | py | Python | scripts/Reader.py | mangiari/RPi-Jukebox-RFID | 6ac1b87c8ddf24fda74cd437f6d833f8c9f10ad9 | [
"MIT"
] | null | null | null | scripts/Reader.py | mangiari/RPi-Jukebox-RFID | 6ac1b87c8ddf24fda74cd437f6d833f8c9f10ad9 | [
"MIT"
] | null | null | null | scripts/Reader.py | mangiari/RPi-Jukebox-RFID | 6ac1b87c8ddf24fda74cd437f6d833f8c9f10ad9 | [
"MIT"
] | null | null | null | # Forked from Francisco Sahli's https://github.com/fsahli/music-cards/blob/master/Reader.py
import string
import csv
import os.path
import sys
from evdev import InputDevice, categorize, ecodes, list_devices
from select import select
class Reader:
def __init__(self):
path = os.path.dirname(os.path.realpath(__file__... | 28.731707 | 91 | 0.679966 |
797af32c7ee36da7dbcb38c1c1d0e52606c97dd7 | 26 | py | Python | lib/python3.4/copy.py | caiocsalvador/whats_the_craic | c49ef62f1acd7379f6fd90c2b93aa1fa00c8661d | [
"MIT"
] | 7 | 2017-04-26T12:28:22.000Z | 2021-02-09T18:59:50.000Z | django-ng/lib/python3.4/copy.py | Arsalen/BusinessStrategies | 209e57340359af3ea063c064982198848dc36c5f | [
"MIT"
] | 13 | 2015-12-04T03:38:37.000Z | 2015-12-12T00:15:46.000Z | django-ng/lib/python3.4/copy.py | Arsalen/BusinessStrategies | 209e57340359af3ea063c064982198848dc36c5f | [
"MIT"
] | 8 | 2017-06-01T08:42:16.000Z | 2020-07-23T12:30:19.000Z | /usr/lib/python3.4/copy.py | 26 | 26 | 0.769231 |
797af3482746da044d29ae957a663b81e5eb40f2 | 1,125 | py | Python | punic/graph.py | jeremy-w/punic | 8a487f67853b2781db5a230fc353671341c9ce8e | [
"MIT"
] | 1 | 2020-02-04T20:34:32.000Z | 2020-02-04T20:34:32.000Z | punic/graph.py | 3drobotics/punic | 1131050098fdc014f596beea7fe6a8a8effc35c7 | [
"MIT"
] | null | null | null | punic/graph.py | 3drobotics/punic | 1131050098fdc014f596beea7fe6a8a8effc35c7 | [
"MIT"
] | 1 | 2020-05-01T21:07:30.000Z | 2020-05-01T21:07:30.000Z |
import click
import networkx as nx
import os
import logging
import sys
from punic.errors import *
from punic.utilities import *
from punic.config import *
from punic.runner import *
def make_graph(punic, open):
try:
with error_handling():
graph = punic.graph()
logging.info('Writ... | 32.142857 | 105 | 0.603556 |
797af3898c7b75f4264be7f4cc079b66069e464c | 2,723 | py | Python | Setup_Teardown_Scripts/Static_power_off_shared/__main__.py | DYeag/QualiScripts | bd9b82f3c2c6781191a47294a946906986af7979 | [
"Apache-2.0"
] | null | null | null | Setup_Teardown_Scripts/Static_power_off_shared/__main__.py | DYeag/QualiScripts | bd9b82f3c2c6781191a47294a946906986af7979 | [
"Apache-2.0"
] | null | null | null | Setup_Teardown_Scripts/Static_power_off_shared/__main__.py | DYeag/QualiScripts | bd9b82f3c2c6781191a47294a946906986af7979 | [
"Apache-2.0"
] | null | null | null | from cloudshell.workflow.orchestration.sandbox import Sandbox
from cloudshell.workflow.orchestration.teardown.default_teardown_orchestrator import DefaultTeardownWorkflow
def main():
# Get list of vCenter Static VMs, with 'Auto Power Off' == True
sandbox = Sandbox()
sandbox_resources = sandbox.au... | 43.222222 | 187 | 0.59383 |
797af651c63b48319af88637a7a02cb40cbed010 | 1,928 | py | Python | onnx/backend/test/case/node/dequantizelinear.py | pchandrasekaran1595/onnx | 10da6f2e919c8515877e227a41cd44e86ae0bb2d | [
"Apache-2.0"
] | 12,820 | 2017-09-07T07:00:24.000Z | 2022-03-31T14:41:57.000Z | onnx/backend/test/case/node/dequantizelinear.py | pchandrasekaran1595/onnx | 10da6f2e919c8515877e227a41cd44e86ae0bb2d | [
"Apache-2.0"
] | 3,213 | 2017-09-07T17:48:17.000Z | 2022-03-31T19:44:57.000Z | onnx/backend/test/case/node/dequantizelinear.py | pchandrasekaran1595/onnx | 10da6f2e919c8515877e227a41cd44e86ae0bb2d | [
"Apache-2.0"
] | 2,922 | 2017-09-07T07:46:00.000Z | 2022-03-31T15:55:24.000Z | # SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np # type: ignore
import onnx
from ..base import Base
from . import expect
class DequantizeLinear(Base):
@s... | 35.054545 | 118 | 0.513485 |
797af72f7a7b88d28fbaadf7689a09c6cec41c44 | 549 | py | Python | ideathon/migrations/0003_auto_20210517_2323.py | hyeoneedyou/2021-dgulion-simbathon | c45e028df5823d1e874ec72c184cb8a70c3b58de | [
"MIT"
] | 1 | 2021-05-16T10:36:46.000Z | 2021-05-16T10:36:46.000Z | ideathon/migrations/0003_auto_20210517_2323.py | hyeoneedyou/2021-dgulion-simbathon | c45e028df5823d1e874ec72c184cb8a70c3b58de | [
"MIT"
] | 21 | 2021-05-16T08:45:06.000Z | 2022-02-10T10:52:48.000Z | ideathon/migrations/0003_auto_20210517_2323.py | hyeoneedyou/2021-dgulion-simbathon | c45e028df5823d1e874ec72c184cb8a70c3b58de | [
"MIT"
] | 6 | 2021-05-15T16:50:26.000Z | 2021-07-04T12:10:38.000Z | # Generated by Django 3.2.3 on 2021-05-17 23:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ideathon', '0002_alter_post_content'),
]
operations = [
migrations.AlterField(
model_name='post',
name='content',
... | 22.875 | 72 | 0.571949 |
797af7c5f1e009d60a06a6ef8b6a56dc13d8d48f | 157 | py | Python | python/testData/inspections/PyStringFormatInspection/TooFewArgumentsNewStyleFormat.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/inspections/PyStringFormatInspection/TooFewArgumentsNewStyleFormat.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/inspections/PyStringFormatInspection/TooFewArgumentsNewStyleFormat.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | <warning descr="Too few arguments for format string">"{} {}"</warning>.format(1)
<warning descr="Too few arguments for format string">'{}'</warning>.format() | 78.5 | 80 | 0.707006 |
797af825da706133bd40c094c37a2bee4b5a1ac3 | 10,552 | py | Python | dace/library.py | manuelburger/dace | a55f41dbb2a523229361bd161ba38b37d25af86d | [
"BSD-3-Clause"
] | null | null | null | dace/library.py | manuelburger/dace | a55f41dbb2a523229361bd161ba38b37d25af86d | [
"BSD-3-Clause"
] | null | null | null | dace/library.py | manuelburger/dace | a55f41dbb2a523229361bd161ba38b37d25af86d | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import inspect
import sys
import types
from typing import Set, List
import contextlib
import networkx as nx
import dace.properties
from dace.sdfg.nodes import LibraryNode
from dace.transformation.transformation import (Transformation,
... | 41.543307 | 115 | 0.678165 |
797af985a6c69b8f6fffd06fa289243bbce6efe1 | 64,117 | py | Python | instaloader/structures.py | rm1410/instaloader | dc387a330c98619f7ad7d89af69495c8b216bcf7 | [
"MIT"
] | 1 | 2021-06-07T13:33:05.000Z | 2021-06-07T13:33:05.000Z | instaloader/structures.py | rm1410/instaloader | dc387a330c98619f7ad7d89af69495c8b216bcf7 | [
"MIT"
] | null | null | null | instaloader/structures.py | rm1410/instaloader | dc387a330c98619f7ad7d89af69495c8b216bcf7 | [
"MIT"
] | null | null | null | import json
import lzma
import re
from base64 import b64decode, b64encode
from collections import namedtuple
from datetime import datetime
from typing import Any, Dict, Iterable, Iterator, List, Optional, Union
from . import __version__
from .exceptions import *
from .instaloadercontext import InstaloaderContext
from ... | 40.249215 | 120 | 0.608793 |
797af9e0fdb63efd437089c5f23a26f32503c91d | 2,356 | py | Python | rlcard/games/uno/card.py | Rice-Field-Memes/rlcard | c90ad24902b833af3574850d475a9982ad8aedc0 | [
"MIT"
] | null | null | null | rlcard/games/uno/card.py | Rice-Field-Memes/rlcard | c90ad24902b833af3574850d475a9982ad8aedc0 | [
"MIT"
] | null | null | null | rlcard/games/uno/card.py | Rice-Field-Memes/rlcard | c90ad24902b833af3574850d475a9982ad8aedc0 | [
"MIT"
] | null | null | null | from colorama import init
init(autoreset = True)
from termcolor import colored
class UnoCard(object):
info = {'type': ['number', 'action', 'wild'],
'color': ['r', 'g', 'b', 'y'],
'trait': ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'skip', 'reverse', 'draw_2',... | 31.837838 | 75 | 0.452037 |
797afacbd1847df1ee10d39506c7d8bfcd25e1e2 | 1,359 | py | Python | app/question/models.py | Ravishrks/examin | 974f8d86ca116b3135a482e8e81532a40ea187c3 | [
"MIT"
] | null | null | null | app/question/models.py | Ravishrks/examin | 974f8d86ca116b3135a482e8e81532a40ea187c3 | [
"MIT"
] | null | null | null | app/question/models.py | Ravishrks/examin | 974f8d86ca116b3135a482e8e81532a40ea187c3 | [
"MIT"
] | null | null | null | from django.db import models
from ckeditor.fields import RichTextField
from ckeditor_uploader.fields import RichTextUploadingField
from django.contrib.auth.models import User
from django.urls import reverse
from django.shortcuts import render, redirect
import datetime
from django.utils import timezone
from django.utils... | 33.146341 | 144 | 0.690949 |
797afad27d00544d1ec774ed12d3f83f2a24f7a6 | 7,886 | py | Python | vnpy/trader/app/algoTrading/algoTemplate.py | riverdarda/vnpy.-msincense | 4f39ef3269082581171f3d0d6f046224266a8d21 | [
"MIT"
] | 3 | 2020-08-14T00:06:32.000Z | 2021-11-22T00:50:02.000Z | vnpy/trader/app/algoTrading/algoTemplate.py | riverdarda/vnpy.-msincense | 4f39ef3269082581171f3d0d6f046224266a8d21 | [
"MIT"
] | null | null | null | vnpy/trader/app/algoTrading/algoTemplate.py | riverdarda/vnpy.-msincense | 4f39ef3269082581171f3d0d6f046224266a8d21 | [
"MIT"
] | 3 | 2020-03-07T12:45:00.000Z | 2021-02-14T03:10:38.000Z | # encoding: UTF-8
from __future__ import division
from datetime import datetime
import os,csv
from vnpy.trader.vtConstant import STATUS_NOTTRADED, STATUS_PARTTRADED, STATUS_UNKNOWN, EMPTY_STRING
# 活动委托状态
STATUS_ACTIVE = [STATUS_NOTTRADED, STATUS_PARTTRADED, STATUS_UNKNOWN]
RUNNING_NORMAL = 'normal'
RUNNING_ACTIVE ... | 32.319672 | 126 | 0.437484 |
797afaf8c608479fcffe60481b566a0f25d110a0 | 3,702 | py | Python | 3.7.0/lldb-3.7.0.src/test/lang/cpp/virtual/TestVirtual.py | androm3da/clang_sles | 2ba6d0711546ad681883c42dfb8661b842806695 | [
"MIT"
] | 3 | 2016-02-10T14:18:40.000Z | 2018-02-05T03:15:56.000Z | 3.7.0/lldb-3.7.0.src/test/lang/cpp/virtual/TestVirtual.py | androm3da/clang_sles | 2ba6d0711546ad681883c42dfb8661b842806695 | [
"MIT"
] | 1 | 2016-02-10T15:40:03.000Z | 2016-02-10T15:40:03.000Z | 3.7.0/lldb-3.7.0.src/test/lang/cpp/virtual/TestVirtual.py | androm3da/clang_sles | 2ba6d0711546ad681883c42dfb8661b842806695 | [
"MIT"
] | null | null | null | """
Test C++ virtual function and virtual inheritance.
"""
import os, time
import re
import lldb
from lldbtest import *
import lldbutil
def Msg(expr, val):
return "'expression %s' matches the output (from compiled code): %s" % (expr, val)
class CppVirtualMadness(TestBase):
mydir = TestBase.compute_mydir(__f... | 38.164948 | 122 | 0.648298 |
797afb79762b9e4c16d89a682cb43f09ceb93aaf | 1,567 | py | Python | app/resources/BaseResourse.py | thenandan/clone_bms | 209e39bf908678b659193b7dfa08cc573b4e1cea | [
"MIT"
] | null | null | null | app/resources/BaseResourse.py | thenandan/clone_bms | 209e39bf908678b659193b7dfa08cc573b4e1cea | [
"MIT"
] | null | null | null | app/resources/BaseResourse.py | thenandan/clone_bms | 209e39bf908678b659193b7dfa08cc573b4e1cea | [
"MIT"
] | null | null | null | from masonite.api.resources import Resource
from masonite.api.serializers import JSONSerializer
class BaseResource(Resource, JSONSerializer):
__custom_method_name__ = None
def routes(self):
"""
Override the default route method to user own method
"""
routes = []
if se... | 34.822222 | 104 | 0.631142 |
797afbf7fcb0aad4015fd8cf6ffeb586b0b0656c | 241 | py | Python | examples/like_timeline_feed.py | abogdancode/instabot | e3aa38ab7e5b0d1c855cecc9f1fbcd8a882839f6 | [
"Apache-2.0"
] | 4 | 2017-04-25T10:56:27.000Z | 2021-03-19T06:47:58.000Z | examples/like_timeline_feed.py | abogdancode/instabot | e3aa38ab7e5b0d1c855cecc9f1fbcd8a882839f6 | [
"Apache-2.0"
] | null | null | null | examples/like_timeline_feed.py | abogdancode/instabot | e3aa38ab7e5b0d1c855cecc9f1fbcd8a882839f6 | [
"Apache-2.0"
] | 1 | 2020-12-01T20:24:32.000Z | 2020-12-01T20:24:32.000Z | """
instabot example
Workflow:
Like rescent medias from your timeline feed.
"""
import sys
import os
sys.path.append(os.path.join(sys.path[0], '../'))
from instabot import Bot
bot = Bot()
bot.login()
bot.like_timeline()
| 13.388889 | 52 | 0.659751 |
797afc259071e56198d8db587e831020aedffb93 | 1,126 | py | Python | linter.py | binss/SublimeLinter-lizard | 6632730699b8583b268679b67f5ed760822c6275 | [
"MIT"
] | null | null | null | linter.py | binss/SublimeLinter-lizard | 6632730699b8583b268679b67f5ed760822c6275 | [
"MIT"
] | null | null | null | linter.py | binss/SublimeLinter-lizard | 6632730699b8583b268679b67f5ed760822c6275 | [
"MIT"
] | null | null | null | from SublimeLinter.lint import Linter, util
class Lazardlint(Linter):
cmd = ('lizard.py', "-w", '${args}', '${file}')
regex = r'^.+:(?P<line>\d+):\s+(?P<message>.+)'
tempfile_suffix = '-'
error_stream = util.STREAM_BOTH # errors are on stderr
on_stderr = None # handle stderr via split_match
... | 35.1875 | 95 | 0.587034 |
797afc41c3e677579b0f8e52be4c846c705c54c3 | 5,077 | py | Python | src/python/pants/backend/python/lint/isort/subsystem.py | wonlay/pants | 53c66503b6898e83c9c9596e56cde5ad9ed6a0d3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/lint/isort/subsystem.py | wonlay/pants | 53c66503b6898e83c9c9596e56cde5ad9ed6a0d3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/lint/isort/subsystem.py | wonlay/pants | 53c66503b6898e83c9c9596e56cde5ad9ed6a0d3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import os.path
from typing import Iterable
from pants.backend.python.goals import lockfile
from pants.backend.python.goals.export import ExportPythonTo... | 40.616 | 100 | 0.686035 |
797afc6d6de4392238cf203ff2fd155fd2099f97 | 1,372 | py | Python | ocdb/core/undefined.py | eocdb/ocdb-server | 0e28d092e8ecf5f4813878aab43de990cc5fb4ee | [
"MIT"
] | null | null | null | ocdb/core/undefined.py | eocdb/ocdb-server | 0e28d092e8ecf5f4813878aab43de990cc5fb4ee | [
"MIT"
] | 1 | 2019-06-21T09:43:01.000Z | 2019-06-21T09:43:01.000Z | eocdb/core/undefined.py | bcdev/ocdb-server | 027078f2b022a06b3a417d76d273514a72f8cac7 | [
"MIT"
] | null | null | null | # The MIT License (MIT)
# Copyright (c) 2018 by EUMETSAT
#
# 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,... | 37.081081 | 81 | 0.750729 |
797afd3edcbfd780099947ccef340b878b49faf1 | 9,407 | py | Python | code_transformer/preprocessing/dataset/lm.py | maximzubkov/code-transformer | 52600ab17d05a238f35c39a78b22c5c706fbb13c | [
"MIT"
] | 90 | 2021-03-29T04:36:32.000Z | 2022-03-31T06:12:22.000Z | code_transformer/preprocessing/dataset/lm.py | maximzubkov/code-transformer | 52600ab17d05a238f35c39a78b22c5c706fbb13c | [
"MIT"
] | 10 | 2021-03-29T07:54:49.000Z | 2022-02-22T17:03:49.000Z | code_transformer/preprocessing/dataset/lm.py | maximzubkov/code-transformer | 52600ab17d05a238f35c39a78b22c5c706fbb13c | [
"MIT"
] | 20 | 2021-03-31T22:48:17.000Z | 2022-03-25T10:53:08.000Z | from typing import List
import torch
from code_transformer.modeling.constants import SEP_TOKEN, CLS_TOKEN, MAX_NUM_TOKENS
from code_transformer.modeling.data_utils import sample_targets, permutation_attention_mask
from code_transformer.preprocessing.datamanager.base import CTBatch
from code_transformer.preprocessing.... | 60.301282 | 212 | 0.667801 |
797afea5ae39c412f1f42ca4b1fa0712e67b7e98 | 1,281 | py | Python | week6/training/models_evaluation.py | Avonite/context-project | 03b9ecb6679d28ff8fc2b3bfec8793223fefc4a6 | [
"MIT"
] | null | null | null | week6/training/models_evaluation.py | Avonite/context-project | 03b9ecb6679d28ff8fc2b3bfec8793223fefc4a6 | [
"MIT"
] | null | null | null | week6/training/models_evaluation.py | Avonite/context-project | 03b9ecb6679d28ff8fc2b3bfec8793223fefc4a6 | [
"MIT"
] | null | null | null | import pytorch_lightning as pl
from pytorch_lightning.loggers import CSVLogger
from week6.training.datasets import MeanFMNIST, StdFMNIST, MedianFMNIST
from base_model import FashionMNISTDataModule, BATCH_SIZE, EPOCHS, ConvNeuralNetworkBase, RANDOM_SEED
def train_and_test(model, dataset, exp_name: str, seed: i... | 36.6 | 106 | 0.688525 |
797afef722699d3ec26db6465dd306d2a96001f5 | 16,574 | py | Python | django/db/migrations/state.py | gbdlin/django | cf709652342abce0acbc80aea2fe1a00ed69a729 | [
"BSD-3-Clause"
] | 1 | 2015-11-08T16:39:07.000Z | 2015-11-08T16:39:07.000Z | django/db/migrations/state.py | gdi2290/django | 9a23470072865b7aa659e6af0b275668c85bb44d | [
"BSD-3-Clause"
] | null | null | null | django/db/migrations/state.py | gdi2290/django | 9a23470072865b7aa659e6af0b275668c85bb44d | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from django.apps import AppConfig
from django.apps.registry import Apps, apps as global_apps
from django.db import models
from django.db.models.options import DEFAULT_NAMES, normalize_together
from django.db.models.fields.related import do_pending_lookups
from django.db.models.f... | 42.388747 | 109 | 0.58809 |
797affbcd5ffd68dbe4638b1723cb383131d566f | 60,852 | py | Python | aiosteam/enums/emsg.py | luxrck/python-aiosteam | 8191127f63153e6d3a240e80a454846c58da9344 | [
"MIT"
] | null | null | null | aiosteam/enums/emsg.py | luxrck/python-aiosteam | 8191127f63153e6d3a240e80a454846c58da9344 | [
"MIT"
] | null | null | null | aiosteam/enums/emsg.py | luxrck/python-aiosteam | 8191127f63153e6d3a240e80a454846c58da9344 | [
"MIT"
] | null | null | null | # copy from ValvePython/steam
from .base import SteamIntEnum
class EMsg(SteamIntEnum):
Invalid = 0
Multi = 1
BaseGeneral = 100
GenericReply = 100
DestJobFailed = 113
Alert = 115
SCIDRequest = 120
SCIDResponse = 121
JobHeartbeat = 123
HubConnect = 124
Subscribe = 126
Ro... | 33.731707 | 67 | 0.766269 |
797b0068903ce2fc9ab10d2382b1af657b5a7ca7 | 4,998 | py | Python | plugins/modules/nsi_api_fres_by_freid_userdata_by_userdatakey.py | ciena/ciena.mcp | b266a7cbd912c547f6e4877597d67ea9254e5758 | [
"Apache-2.0"
] | 3 | 2021-07-19T23:56:34.000Z | 2021-11-08T14:23:53.000Z | plugins/modules/nsi_api_fres_by_freid_userdata_by_userdatakey.py | ciena/ciena.mcp | b266a7cbd912c547f6e4877597d67ea9254e5758 | [
"Apache-2.0"
] | 1 | 2022-01-19T22:06:49.000Z | 2022-01-24T15:16:53.000Z | plugins/modules/nsi_api_fres_by_freid_userdata_by_userdatakey.py | ciena/ciena.mcp | b266a7cbd912c547f6e4877597d67ea9254e5758 | [
"Apache-2.0"
] | 1 | 2021-11-08T14:25:29.000Z | 2021-11-08T14:25:29.000Z | #!/usr/bin/env python
# Info module template
#############################################
# WARNING #
#############################################
#
# This file is auto generated by
# https://github.com/jgroom33/vmware_rest_code_generator
#
# Do not edit this file manually.
#
# Ch... | 29.928144 | 88 | 0.618047 |
797b012dad3032e638b6258d0b54007da12bb819 | 12,672 | py | Python | Janelainserirchapa.py | natancl1/cutting_plan_linux | 359d479b24892dbc2946e0a62d4033dbf2d96368 | [
"MIT"
] | null | null | null | Janelainserirchapa.py | natancl1/cutting_plan_linux | 359d479b24892dbc2946e0a62d4033dbf2d96368 | [
"MIT"
] | null | null | null | Janelainserirchapa.py | natancl1/cutting_plan_linux | 359d479b24892dbc2946e0a62d4033dbf2d96368 | [
"MIT"
] | null | null | null | try:
from Tkinter import *
from Tkinter import ttk
from Tkinter import filedialog
except ImportError:
from tkinter import *
from tkinter import ttk
from tkinter import filedialog
import sqlite3, xlrd
class ListboxExe(Tk):
def __init__(self):
Tk.__init__(self)
tt... | 44.463158 | 202 | 0.589252 |
797b017969c45063a7cfe5d2d0a9be579402f76c | 650 | py | Python | setup.py | ErikKBethke/tableau-workbook-xml | 8c728b7a415c99cda5234c6dc70eb51ac65c5d0a | [
"MIT"
] | null | null | null | setup.py | ErikKBethke/tableau-workbook-xml | 8c728b7a415c99cda5234c6dc70eb51ac65c5d0a | [
"MIT"
] | null | null | null | setup.py | ErikKBethke/tableau-workbook-xml | 8c728b7a415c99cda5234c6dc70eb51ac65c5d0a | [
"MIT"
] | null | null | null | from setuptools import setup
def readme():
with open('README.md') as f:
return f.read()
setup(name='tableauxml',
version='0.2',
description='Python manipulation of Tableau workbooks via the XML',
long_description=readme(),
url='https://github.com/ErikKBethke/tableau-workbook-xml',
... | 26 | 73 | 0.638462 |
797b0358eafb288cc03401dc83c3e9bf7536f0ff | 13,174 | py | Python | src/ploomber/env/envdict.py | idomic/ploomber | 89b5e544b0540cf2cbb6bcd09946537198115d17 | [
"Apache-2.0"
] | null | null | null | src/ploomber/env/envdict.py | idomic/ploomber | 89b5e544b0540cf2cbb6bcd09946537198115d17 | [
"Apache-2.0"
] | null | null | null | src/ploomber/env/envdict.py | idomic/ploomber | 89b5e544b0540cf2cbb6bcd09946537198115d17 | [
"Apache-2.0"
] | null | null | null | from copy import copy, deepcopy
import importlib
import platform
from pathlib import Path
from collections.abc import Mapping
from reprlib import Repr
import yaml
from ploomber.env import validate
from ploomber.env.expand import EnvironmentExpander
from ploomber.env.frozenjson import FrozenJSON
from ploomber.util imp... | 33.953608 | 79 | 0.578412 |
797b0414b6c9f9d63579580a9e4ff182c1542358 | 20,426 | py | Python | django/http/request.py | bak1an/django | 98bcc5d81bca578f3a5b4d47907ba4ac40446887 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/http/request.py | bak1an/django | 98bcc5d81bca578f3a5b4d47907ba4ac40446887 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/http/request.py | bak1an/django | 98bcc5d81bca578f3a5b4d47907ba4ac40446887 | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2020-02-06T10:31:51.000Z | 2020-02-06T10:31:51.000Z | import copy
import re
from io import BytesIO
from itertools import chain
from urllib.parse import quote, urlencode, urljoin, urlsplit
from django.conf import settings
from django.core import signing
from django.core.exceptions import (
DisallowedHost, ImproperlyConfigured, RequestDataTooBig,
)
from django.core.fil... | 36.216312 | 110 | 0.611965 |
797b046e90d26fd9faf6b7e8d7ccca74a6e42491 | 2,391 | py | Python | calendars/calendars/users/tests/test_views.py | nippi-29/project.1 | 7d032d61c6817b934b2099ae1f3d66c11ed2e7ae | [
"MIT"
] | null | null | null | calendars/calendars/users/tests/test_views.py | nippi-29/project.1 | 7d032d61c6817b934b2099ae1f3d66c11ed2e7ae | [
"MIT"
] | null | null | null | calendars/calendars/users/tests/test_views.py | nippi-29/project.1 | 7d032d61c6817b934b2099ae1f3d66c11ed2e7ae | [
"MIT"
] | null | null | null | import pytest
from django.contrib.auth.models import AnonymousUser
from django.http.response import Http404
from django.test import RequestFactory
from calendars.users.models import User
from calendars.users.tests.factories import UserFactory
from calendars.users.views import (
UserRedirectView,
UserUpdateView... | 29.8875 | 74 | 0.673777 |
797b0536ef69c2979e14027cf37180ccbe673e5b | 1,749 | py | Python | cpenv/hooks.py | cpenv/cpenv | 07e1a6b5d1b20af4adff0c5a6987c7cdc784cc39 | [
"MIT"
] | 15 | 2017-02-14T04:16:59.000Z | 2021-10-05T15:20:02.000Z | packages/cpenv/hooks.py | cpenv/autocpenv | 7e34cdf2f27abe7c3892fb8fbf91c2aad9b9d846 | [
"MIT"
] | 32 | 2015-11-04T15:53:50.000Z | 2021-12-12T03:28:23.000Z | cpenv/hooks.py | cpenv/cpenv | 07e1a6b5d1b20af4adff0c5a6987c7cdc784cc39 | [
"MIT"
] | 2 | 2017-02-24T16:30:39.000Z | 2021-09-24T05:26:05.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function
# Standard library imports
import os
from types import ModuleType
# Local imports
from . import paths
class HookFinder(object):
'''Find python hooks by name in the provided path.
usage::
>>> hook_finder = HookFinder('~/... | 24.291667 | 64 | 0.606061 |
797b05bc8d3fd3f40030a671cd85f28e422c55a5 | 1,345 | py | Python | schematics_xmlelem/attributes.py | Diggsey/python-schematics-xmlelem | 31969310b8e8a7dcca83b854ea049419ce62f11f | [
"MIT"
] | null | null | null | schematics_xmlelem/attributes.py | Diggsey/python-schematics-xmlelem | 31969310b8e8a7dcca83b854ea049419ce62f11f | [
"MIT"
] | null | null | null | schematics_xmlelem/attributes.py | Diggsey/python-schematics-xmlelem | 31969310b8e8a7dcca83b854ea049419ce62f11f | [
"MIT"
] | null | null | null | from typing import Optional
from schematics_xmlelem.mixins import DefaultValueMixin, OverridableAttribNameMixin
from schematics_xmlelem.types import XmlBaseType
class XmlAttributeBase(DefaultValueMixin, OverridableAttribNameMixin):
def matches(self, field_name, attrib_name):
return self._compare_name(fie... | 29.23913 | 83 | 0.685502 |
797b05e72371e47dcb2aae2b2edd60a09e4e45c7 | 19,658 | py | Python | model/models.py | playing-code/SEED-Encoder-1 | c038060a8cfeb9226c745f4cb725da93997bb827 | [
"MIT"
] | null | null | null | model/models.py | playing-code/SEED-Encoder-1 | c038060a8cfeb9226c745f4cb725da93997bb827 | [
"MIT"
] | null | null | null | model/models.py | playing-code/SEED-Encoder-1 | c038060a8cfeb9226c745f4cb725da93997bb827 | [
"MIT"
] | null | null | null | import sys
sys.path += ['../']
import torch
from torch import nn
from transformers import (
RobertaConfig,
RobertaModel,
RobertaForSequenceClassification,
RobertaTokenizer,
BertModel,
BertTokenizer,
BertConfig,
BertForSequenceClassification,
)
import torch.nn.functional as F
from data.p... | 35.612319 | 144 | 0.61461 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.