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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b88a756fba8d93702364d516718c809d4476d07c | 14,247 | py | Python | hm_gerber_ex/rs274x.py | halfmarble/halfmarble-panelizer | 73489a0b5d0d46e6d363f6d14454d91fab62f8e3 | [
"MIT"
] | null | null | null | hm_gerber_ex/rs274x.py | halfmarble/halfmarble-panelizer | 73489a0b5d0d46e6d363f6d14454d91fab62f8e3 | [
"MIT"
] | 5 | 2022-01-15T13:32:54.000Z | 2022-01-30T15:18:15.000Z | hm_gerber_ex/rs274x.py | halfmarble/halfmarble-panelizer | 73489a0b5d0d46e6d363f6d14454d91fab62f8e3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2022 HalfMarble LLC
# Copyright 2019 Hiroshi Murayama <[email protected]>
from hm_gerber_tool.cam import FileSettings
import hm_gerber_tool.rs274x
from hm_gerber_tool.gerber_statements import *
from hm_gerber_ex.gerber_statements import AMParamStmt, AMParamStm... | 41.057637 | 110 | 0.563206 | 13,028 | 0.914438 | 0 | 0 | 570 | 0.040008 | 0 | 0 | 1,056 | 0.074121 |
b88ad3cd16814edcf01716b7796117d85426c826 | 691 | py | Python | salamander/mktcalendar.py | cclauss/statarb | a59366f70122c355fc93a2391362a3e8818a290e | [
"Apache-2.0"
] | 51 | 2019-02-01T19:43:37.000Z | 2022-03-16T09:07:03.000Z | salamander/mktcalendar.py | cclauss/statarb | a59366f70122c355fc93a2391362a3e8818a290e | [
"Apache-2.0"
] | 2 | 2019-02-23T18:54:22.000Z | 2019-11-09T01:30:32.000Z | salamander/mktcalendar.py | cclauss/statarb | a59366f70122c355fc93a2391362a3e8818a290e | [
"Apache-2.0"
] | 35 | 2019-02-08T02:00:31.000Z | 2022-03-01T23:17:00.000Z | from pandas.tseries.holiday import AbstractHolidayCalendar, Holiday, nearest_workday, \
USMartinLutherKingJr, USPresidentsDay, GoodFriday, USMemorialDay, \
USLaborDay, USThanksgivingDay
from pandas.tseries.offsets import CustomBusinessDay
class USTradingCalendar(AbstractHolidayCalendar):
rules = [
... | 31.409091 | 88 | 0.691751 | 374 | 0.541245 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.062229 |
b88df16653e927e74a8e50a7da42dd7a7bec9732 | 3,063 | py | Python | wall/views.py | pydanny/pinax-wall | 1e3df60dad394292be9024e2ad90a07bf1a0b395 | [
"MIT"
] | 1 | 2019-08-16T20:05:40.000Z | 2019-08-16T20:05:40.000Z | wall/views.py | pydanny/pinax-wall | 1e3df60dad394292be9024e2ad90a07bf1a0b395 | [
"MIT"
] | null | null | null | wall/views.py | pydanny/pinax-wall | 1e3df60dad394292be9024e2ad90a07bf1a0b395 | [
"MIT"
] | null | null | null | """ Sample view for group aware projects """
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.contrib.auth.decorators import login_required
from django.http import Http404, HttpResponseRedirect
from django.shortcuts import render_to_response, get_object_or_404
from dja... | 31.57732 | 91 | 0.601698 | 0 | 0 | 0 | 0 | 1,717 | 0.560562 | 0 | 0 | 529 | 0.172706 |
b88fca2ebe335e0075492e9a81b964d8fd3677ae | 2,595 | py | Python | cdc/src/NoteDeid.py | ZebinKang/cdc | a32fe41892021d29a1d9c534728a92b67f9b6cea | [
"MIT"
] | null | null | null | cdc/src/NoteDeid.py | ZebinKang/cdc | a32fe41892021d29a1d9c534728a92b67f9b6cea | [
"MIT"
] | null | null | null | cdc/src/NoteDeid.py | ZebinKang/cdc | a32fe41892021d29a1d9c534728a92b67f9b6cea | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
The MIT License (MIT)
Copyright (c) 2016 Wei-Hung Weng
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 limita... | 47.181818 | 391 | 0.665511 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,191 | 0.844316 |
b8922ccaf7aecd6b398d579f4ddc8b100bfa96aa | 2,540 | py | Python | turbo_transformers/python/tests/qbert_layer_test.py | xcnick/TurboTransformers | 48b6ba09af2219616c6b97cc5c09222408e080c2 | [
"BSD-3-Clause"
] | 1 | 2021-11-04T07:12:46.000Z | 2021-11-04T07:12:46.000Z | turbo_transformers/python/tests/qbert_layer_test.py | xcnick/TurboTransformers | 48b6ba09af2219616c6b97cc5c09222408e080c2 | [
"BSD-3-Clause"
] | null | null | null | turbo_transformers/python/tests/qbert_layer_test.py | xcnick/TurboTransformers | 48b6ba09af2219616c6b97cc5c09222408e080c2 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2020 THL A29 Limited, a Tencent company.
# All rights reserved.
# Licensed under the BSD 3-Clause License (the "License"); you may
# not use this file except in compliance with the License. You may
# obtain a copy of the License at
# https://opensource.org/licenses/BSD-3-Clause
# Unless required by appl... | 36.285714 | 111 | 0.686614 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 870 | 0.34252 |
b892a01e77462df62b5d9db18651eb65be2d4626 | 571 | py | Python | datasets/__init__.py | cogito233/text-autoaugment | cae3cfddaba9da01cf291f975e5cf4f734634b51 | [
"MIT"
] | 1 | 2021-09-08T12:00:11.000Z | 2021-09-08T12:00:11.000Z | datasets/__init__.py | cogito233/text-autoaugment | cae3cfddaba9da01cf291f975e5cf4f734634b51 | [
"MIT"
] | null | null | null | datasets/__init__.py | cogito233/text-autoaugment | cae3cfddaba9da01cf291f975e5cf4f734634b51 | [
"MIT"
] | null | null | null | from .imdb import IMDB
from .sst5 import SST5
from .sst2 import SST2
from .trec import TREC
from .yelp2 import YELP2
from .yelp5 import YELP5
__all__ = ('IMDB', 'SST2', 'SST5', 'TREC', 'YELP2', 'YELP5')
def get_dataset(dataset_name, examples, tokenizer, text_transform=None):
dataset_name = dataset_name.lower()
... | 24.826087 | 73 | 0.640981 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.1331 |
b892a5808d0820ec82e081a7e4b50b19b5c795cf | 2,396 | py | Python | src/pypleasant/artifacts.py | weibell/pypleasant | de635994113b6cee7e2c5cfb8a5078921a8805cf | [
"MIT"
] | 3 | 2021-01-09T13:45:23.000Z | 2021-07-07T22:54:28.000Z | src/pypleasant/artifacts.py | weibell/pypleasant | de635994113b6cee7e2c5cfb8a5078921a8805cf | [
"MIT"
] | 2 | 2021-01-10T17:39:16.000Z | 2021-01-19T11:43:12.000Z | src/pypleasant/artifacts.py | weibell/pypleasant | de635994113b6cee7e2c5cfb8a5078921a8805cf | [
"MIT"
] | 3 | 2021-01-10T11:59:51.000Z | 2021-08-15T10:45:24.000Z | import base64
import pathlib
from collections import UserDict
from pypleasant.api import PleasantAPI
class Attachment:
def __init__(self, attachment_as_json: dict, api: PleasantAPI):
self.api = api
self._entry_id = attachment_as_json["CredentialObjectId"]
self._attachment_id = attachment_... | 34.724638 | 101 | 0.680718 | 2,279 | 0.951169 | 0 | 0 | 209 | 0.087229 | 0 | 0 | 192 | 0.080134 |
b894aa5fcf5ee5c3c91a08a010d10cc426cae285 | 857 | py | Python | npc/gui/util.py | Arent128/npc | c8a1e227a1d4d7c540c4f4427b611ffc290535ee | [
"MIT"
] | null | null | null | npc/gui/util.py | Arent128/npc | c8a1e227a1d4d7c540c4f4427b611ffc290535ee | [
"MIT"
] | null | null | null | npc/gui/util.py | Arent128/npc | c8a1e227a1d4d7c540c4f4427b611ffc290535ee | [
"MIT"
] | null | null | null | # Helpers common to the gui
from contextlib import contextmanager
from PyQt5 import QtWidgets
@contextmanager
def safe_command(command):
"""
Helper to suppress AttributeErrors from commands
Args:
command (callable): The command to run. Any AttributeError raised by
the command will be ... | 27.645161 | 83 | 0.679113 | 0 | 0 | 305 | 0.355893 | 321 | 0.374562 | 0 | 0 | 532 | 0.62077 |
b894e0eb0f3f3a5eab5eca43855c560fff5104ea | 2,040 | py | Python | meterbus/wtelegram_header.py | noda/pyMeterBus | a1bb6b6ef9b3db4583dfb2b154e4f65365dee9d9 | [
"BSD-3-Clause"
] | 44 | 2016-12-11T14:43:14.000Z | 2022-03-17T18:31:14.000Z | meterbus/wtelegram_header.py | noda/pyMeterBus | a1bb6b6ef9b3db4583dfb2b154e4f65365dee9d9 | [
"BSD-3-Clause"
] | 13 | 2017-11-29T14:36:34.000Z | 2020-12-20T18:33:35.000Z | meterbus/wtelegram_header.py | noda/pyMeterBus | a1bb6b6ef9b3db4583dfb2b154e4f65365dee9d9 | [
"BSD-3-Clause"
] | 32 | 2015-09-15T12:23:19.000Z | 2022-03-22T08:32:22.000Z | import simplejson as json
from .telegram_field import TelegramField
class WTelegramHeader(object):
def __init__(self):
# self._startField = TelegramField()
self._lField = TelegramField()
self._cField = TelegramField()
# self._crcField = TelegramField()
# self._stopField = T... | 24 | 60 | 0.601471 | 1,969 | 0.965196 | 0 | 0 | 685 | 0.335784 | 0 | 0 | 615 | 0.301471 |
b8957a58c70fbb1e911970ddbd303c74a8951fba | 2,966 | py | Python | clitt/actions.py | Leviosar/tt | f6099ca77736d17f46121c76a0763d587536467e | [
"MIT"
] | null | null | null | clitt/actions.py | Leviosar/tt | f6099ca77736d17f46121c76a0763d587536467e | [
"MIT"
] | null | null | null | clitt/actions.py | Leviosar/tt | f6099ca77736d17f46121c76a0763d587536467e | [
"MIT"
] | null | null | null | import tweepy
from .interface import show_message, show_tweet, show_user
def dm(api: tweepy.API, target: str, content: str):
"""
Sends a direct message to target user
Keyword arguments:
api -- API instance for handling the request
target -- Target user's screename (e.g. @jake/jak... | 28.796117 | 84 | 0.619016 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,501 | 0.506069 |
b89711b17746d4b4271b066247a24c7b87a987eb | 5,711 | py | Python | test/test_html.py | dominickpastore/pymd4c | 7fac37348b1e2520532c83bcb84b9cfecbcdff0c | [
"MIT"
] | 7 | 2020-04-30T08:27:44.000Z | 2022-02-09T12:23:07.000Z | test/test_html.py | dominickpastore/pymd4c | 7fac37348b1e2520532c83bcb84b9cfecbcdff0c | [
"MIT"
] | 23 | 2020-05-29T14:58:46.000Z | 2021-11-10T23:44:25.000Z | test/test_html.py | dominickpastore/pymd4c | 7fac37348b1e2520532c83bcb84b9cfecbcdff0c | [
"MIT"
] | 2 | 2020-09-17T19:40:44.000Z | 2021-07-13T16:43:18.000Z | # Based on spec_tests.py from
# https://github.com/commonmark/commonmark-spec/blob/master/test/spec_tests.py
# and
# https://github.com/github/cmark-gfm/blob/master/test/spec_tests.py
import sys
import os
import os.path
import re
import md4c
import md4c.domparser
import pytest
from normalize import normalize_html
ex... | 33.994048 | 78 | 0.615304 | 0 | 0 | 0 | 0 | 1,454 | 0.254418 | 0 | 0 | 1,434 | 0.250919 |
b897120ea53c19ba1923fce20e96449f3e0b8393 | 1,737 | py | Python | codes/fetch.py | Pregaine/debian | 9f4838d0eb9f38c9b8d3bf035a74f7d713bf8a95 | [
"Linux-OpenIB"
] | null | null | null | codes/fetch.py | Pregaine/debian | 9f4838d0eb9f38c9b8d3bf035a74f7d713bf8a95 | [
"Linux-OpenIB"
] | null | null | null | codes/fetch.py | Pregaine/debian | 9f4838d0eb9f38c9b8d3bf035a74f7d713bf8a95 | [
"Linux-OpenIB"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Usage: Download all stock code info from TWSE
#
# TWSE equities = 上市證券
# TPEx equities = 上櫃證券
#
import csv
from collections import namedtuple
import requests
from lxml import etree
TWSE_EQUITIES_URL = 'http://isin.twse.com.tw/isin/C_public.jsp?strMode=2'
TPEX_EQUITIES_URL = 'http://isin.tw... | 27.140625 | 96 | 0.580887 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 493 | 0.278374 |
b898caf8e8371912904209cfea669349d7d43e84 | 453 | py | Python | SimplePyGA/FitnessCalc/__init__.py | UglySoftware/SimplePyGA | 2cc0ef5709800059b323de2be6ea8bf77fb94384 | [
"MIT"
] | 1 | 2019-09-03T17:52:12.000Z | 2019-09-03T17:52:12.000Z | SimplePyGA/FitnessCalc/__init__.py | UglySoftware/SimplePyGA | 2cc0ef5709800059b323de2be6ea8bf77fb94384 | [
"MIT"
] | null | null | null | SimplePyGA/FitnessCalc/__init__.py | UglySoftware/SimplePyGA | 2cc0ef5709800059b323de2be6ea8bf77fb94384 | [
"MIT"
] | 1 | 2019-09-03T17:52:13.000Z | 2019-09-03T17:52:13.000Z | #-----------------------------------------------------------------------
#
# __init__.py (FitnessCalc)
#
# FitnessCalc package init module
#
# Copyright and Distribution
#
# Part of SimplePyGA: Simple Genetic Algorithms in Python
# Copyright (c) 2016 Terry McKiernan ([email protected])
# Released under The MI... | 32.357143 | 72 | 0.503311 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 440 | 0.971302 |
b898de5e2e4348a76809bd0da7631a2cc93a7b25 | 3,757 | py | Python | pyaz/billing/invoice/section/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/billing/invoice/section/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/billing/invoice/section/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | 1 | 2022-02-03T09:12:01.000Z | 2022-02-03T09:12:01.000Z | '''
billing invoice section
'''
from .... pyaz_utils import _call_az
def list(account_name, profile_name):
'''
List the invoice sections that a user has access to. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
Required Parameters:
- account_name... | 45.26506 | 164 | 0.730104 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,117 | 0.829651 |
b89c391348948a67ee076b201c2356ffbd5b2843 | 418 | py | Python | fifth.py | leephoter/coding-exam | a95fdd6e8477651da811b5b5a93b7214914e9418 | [
"MIT"
] | null | null | null | fifth.py | leephoter/coding-exam | a95fdd6e8477651da811b5b5a93b7214914e9418 | [
"MIT"
] | null | null | null | fifth.py | leephoter/coding-exam | a95fdd6e8477651da811b5b5a93b7214914e9418 | [
"MIT"
] | null | null | null | # abba
# foo bar bar foo
text1 = list(input())
text2 = input().split()
# text1 = set(text1)
print(text1)
print(text2)
for i in range(len(text1)):
if text1[i] == "a":
text1[i] = 1
else:
text1[i] = 0
for i in range(len(text2)):
if text2[i] == "foo":
text2[i] = 1
else:
te... | 14.928571 | 27 | 0.543062 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.12201 |
b89c5decc2d125e57179ddb7e0fbbf5b7fa1d17a | 864 | py | Python | login_checks.py | mhhoban/basic-blog | 107d6df7c8374ae088097780a15364bb96394664 | [
"MIT"
] | null | null | null | login_checks.py | mhhoban/basic-blog | 107d6df7c8374ae088097780a15364bb96394664 | [
"MIT"
] | null | null | null | login_checks.py | mhhoban/basic-blog | 107d6df7c8374ae088097780a15364bb96394664 | [
"MIT"
] | null | null | null | """
Methods for user login
"""
from cgi import escape
from google.appengine.ext import ndb
def login_fields_complete(post_data):
"""
validates that both login fields were filled in
:param post_data:
:return:
"""
try:
user_id = escape(post_data['user_id'], quote=True)
except KeyErr... | 18 | 75 | 0.611111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 264 | 0.305556 |
b89c8ecff52061b4f4230988ae5b6f0af41cff09 | 1,988 | py | Python | models/lstm_hands_enc_dec.py | amjltc295/hand_track_classification | 71fdc980d3150646cd531e28878ff1eb63c7efea | [
"MIT"
] | 6 | 2019-07-08T12:01:17.000Z | 2021-11-01T06:01:28.000Z | models/lstm_hands_enc_dec.py | georkap/hand_track_classification | 962faa1697864e892475989a97fa6ed9c2f1d7b3 | [
"MIT"
] | null | null | null | models/lstm_hands_enc_dec.py | georkap/hand_track_classification | 962faa1697864e892475989a97fa6ed9c2f1d7b3 | [
"MIT"
] | 3 | 2019-07-08T12:25:45.000Z | 2020-06-05T20:27:57.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 16 13:20:51 2018
lstm encoder decoder for hands
@author: Γιώργος
"""
import torch
import torch.nn as nn
from utils.file_utils import print_and_save
class LSTM_Hands_encdec(nn.Module):
# source: https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/02-in... | 37.509434 | 141 | 0.640845 | 1,788 | 0.896241 | 0 | 0 | 0 | 0 | 0 | 0 | 351 | 0.17594 |
b89dc31dd7495dce4a5df9abb3cb76e616316b5e | 2,201 | py | Python | My_Simple_Chatroom/MyChat_C1.py | WilliamWuLH/Network_Basic_Programming | 284f8d3664340b0270271da5c50d5b8bb7ce8534 | [
"MIT"
] | 1 | 2020-11-29T14:56:22.000Z | 2020-11-29T14:56:22.000Z | My_Simple_Chatroom/MyChat_C1.py | WilliamWuLH/Network_Basic_Programming | 284f8d3664340b0270271da5c50d5b8bb7ce8534 | [
"MIT"
] | null | null | null | My_Simple_Chatroom/MyChat_C1.py | WilliamWuLH/Network_Basic_Programming | 284f8d3664340b0270271da5c50d5b8bb7ce8534 | [
"MIT"
] | null | null | null | import socket
import sys
import os
ip_port = ('127.0.0.1',6666)
sk = socket.socket()
sk.bind(ip_port)
sk.listen(5)
def FTP_send(conn):
path = input('Path:')
file_name = os.path.basename(path)
file_size=os.stat(path).st_size
Informf=(file_name+'|'+str(file_size))
conn.send(Informf.encode())
re... | 26.518072 | 78 | 0.531122 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 352 | 0.159927 |
b89ddcfaf0bb84573dcaa412350a05a29d779e4c | 557 | py | Python | 2020/day14-1.py | alvaropp/AdventOfCode2017 | 2827dcc18ecb9ad59a1a5fe11e469f31bafb74ad | [
"MIT"
] | null | null | null | 2020/day14-1.py | alvaropp/AdventOfCode2017 | 2827dcc18ecb9ad59a1a5fe11e469f31bafb74ad | [
"MIT"
] | null | null | null | 2020/day14-1.py | alvaropp/AdventOfCode2017 | 2827dcc18ecb9ad59a1a5fe11e469f31bafb74ad | [
"MIT"
] | null | null | null | import re
with open("day14.txt", "r") as f:
data = f.read().splitlines()
def apply_mask(mask, value):
binary_value = f"{value:>036b}"
masked_value = "".join(
value if mask_value == "X" else mask_value
for value, mask_value in zip(binary_value, mask)
)
return int(masked_value, 2)
... | 21.423077 | 56 | 0.59246 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.095153 |
b89e8a9c6f13124a3751f523a8aebbcf0178bdb6 | 2,429 | py | Python | heppy/modules/host.py | bladeroot/heppy | b597916ff80890ca057b17cdd156e90bbbd9a87a | [
"BSD-3-Clause"
] | null | null | null | heppy/modules/host.py | bladeroot/heppy | b597916ff80890ca057b17cdd156e90bbbd9a87a | [
"BSD-3-Clause"
] | null | null | null | heppy/modules/host.py | bladeroot/heppy | b597916ff80890ca057b17cdd156e90bbbd9a87a | [
"BSD-3-Clause"
] | null | null | null | from ..Module import Module
from ..TagData import TagData
class host(Module):
opmap = {
'infData': 'descend',
'chkData': 'descend',
'creData': 'descend',
'roid': 'set',
'name': 'set',
'clID': 'set',
'crID': 'set... | 33.273973 | 92 | 0.559078 | 2,368 | 0.974887 | 0 | 0 | 0 | 0 | 0 | 0 | 411 | 0.169205 |
b89ead298075031fa1c3f90802815475e6fa1de6 | 594 | py | Python | setup.py | ANich/patois-stopwords | 37e63a0d9df60c7273dd7664a024e02cfcfb04c7 | [
"MIT"
] | null | null | null | setup.py | ANich/patois-stopwords | 37e63a0d9df60c7273dd7664a024e02cfcfb04c7 | [
"MIT"
] | null | null | null | setup.py | ANich/patois-stopwords | 37e63a0d9df60c7273dd7664a024e02cfcfb04c7 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='patois-stop-words',
version='0.0.1',
description='A list of patois stop words.',
long_description=open('README.md').read(),
license='MIT',
author='Alexander Nicholson',
author_email='[email protected]',
url='https://github.co... | 27 | 53 | 0.62963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 269 | 0.452862 |
b8a056a06ca2c0eb3d9388de7c316004827053f2 | 6,924 | py | Python | ls/joyous/tests/test_manythings.py | tjwalch/ls.joyous | 0ee50d3af71c066bddb2310948b02f74b52ee253 | [
"BSD-3-Clause"
] | 72 | 2018-03-16T16:35:08.000Z | 2022-03-23T08:09:33.000Z | polrev/ls/joyous/tests/test_manythings.py | polrev-github/polrev-django | 99108ace1a5307b14c3eccb424a9f9616e8c02ae | [
"MIT"
] | 41 | 2018-03-25T20:36:52.000Z | 2022-03-10T08:59:27.000Z | polrev/ls/joyous/tests/test_manythings.py | polrev-github/polrev-django | 99108ace1a5307b14c3eccb424a9f9616e8c02ae | [
"MIT"
] | 28 | 2018-08-13T22:36:09.000Z | 2022-03-17T12:24:15.000Z | # ------------------------------------------------------------------------------
# Test Many Things Utilities
# ------------------------------------------------------------------------------
import sys
import datetime as dt
import pytz
from django.test import TestCase
from django.utils import translation
from ls.joyous... | 45.254902 | 80 | 0.579434 | 6,078 | 0.867418 | 0 | 0 | 0 | 0 | 0 | 0 | 1,918 | 0.273726 |
b8a247344049a96e9c957980e4d29c8b38b429af | 21 | py | Python | sgqlc/__init__.py | pberthonneau/sgqlc | 6fb29d381239ba9256589cf177d236eb79b3f8cc | [
"ISC"
] | null | null | null | sgqlc/__init__.py | pberthonneau/sgqlc | 6fb29d381239ba9256589cf177d236eb79b3f8cc | [
"ISC"
] | null | null | null | sgqlc/__init__.py | pberthonneau/sgqlc | 6fb29d381239ba9256589cf177d236eb79b3f8cc | [
"ISC"
] | null | null | null | __version__ = '10.0'
| 10.5 | 20 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.285714 |
b8a2fb720f101a2bc0adde648afe4fb533a5d387 | 5,919 | py | Python | brew/migrations/0007_auto_20180307_1842.py | williamlagos/brauerei | 9ba1e22a45ea4f9cb4a58ee02a3149526318e523 | [
"MIT"
] | null | null | null | brew/migrations/0007_auto_20180307_1842.py | williamlagos/brauerei | 9ba1e22a45ea4f9cb4a58ee02a3149526318e523 | [
"MIT"
] | null | null | null | brew/migrations/0007_auto_20180307_1842.py | williamlagos/brauerei | 9ba1e22a45ea4f9cb4a58ee02a3149526318e523 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2018-03-07 18:42
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('brew', '0006_auto_20180109... | 36.312883 | 164 | 0.573746 | 5,695 | 0.962156 | 0 | 0 | 0 | 0 | 0 | 0 | 1,168 | 0.197331 |
b8a36c9bf09c46b7b162a8edc1a64e4df507a08f | 1,050 | py | Python | src/box/importer.py | p-ranav/box | 9060343cd4960894da220c4f244535623a54ff98 | [
"MIT"
] | 91 | 2021-07-02T06:00:57.000Z | 2022-03-04T02:51:05.000Z | src/box/importer.py | p-ranav/box | 9060343cd4960894da220c4f244535623a54ff98 | [
"MIT"
] | 1 | 2021-07-07T03:42:32.000Z | 2021-07-07T13:45:00.000Z | src/box/importer.py | p-ranav/box | 9060343cd4960894da220c4f244535623a54ff98 | [
"MIT"
] | 2 | 2021-07-02T06:01:02.000Z | 2021-11-16T21:10:38.000Z | from box.parser import Parser
from box.generator import Generator
import os
class Importer:
def __init__(self, path):
# Path to directory containing function graphs to import
self.path = os.path.abspath(path)
# { "FunctionName": <Generator>, ... }
self.function_declarations = {}
... | 32.8125 | 79 | 0.60381 | 971 | 0.924762 | 0 | 0 | 0 | 0 | 0 | 0 | 232 | 0.220952 |
b8a3792b87c74a7c4d324caa87c2a3a3046ea018 | 319 | py | Python | gargantua/utils/elasticsearch.py | Laisky/laisky-blog | ebe7dadf8fce283ebab0539926ad1be1246e5156 | [
"Apache-2.0"
] | 18 | 2015-05-08T02:06:39.000Z | 2022-03-05T21:36:48.000Z | gargantua/utils/elasticsearch.py | Laisky/laisky-blog | ebe7dadf8fce283ebab0539926ad1be1246e5156 | [
"Apache-2.0"
] | 131 | 2015-01-22T14:54:59.000Z | 2022-02-16T15:14:10.000Z | gargantua/utils/elasticsearch.py | Laisky/laisky-blog | ebe7dadf8fce283ebab0539926ad1be1246e5156 | [
"Apache-2.0"
] | 3 | 2016-01-11T13:52:41.000Z | 2019-06-12T08:54:15.000Z | import json
def parse_search_resp(resp):
return [i['_source'] for i in json.loads(resp)['hits']['hits']]
def generate_keyword_search(keyword, field='post_content'):
query = {
"query": {
"match": {
field: keyword
}
}
}
return json.dumps(query)
| 18.764706 | 67 | 0.539185 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 0.153605 |
b8a39d8abd6a6f5c91947df5a4f7859aa7716d4d | 957 | py | Python | HackerRank/Python_Learn/03_Strings/13_The_Minion_Game.py | Zubieta/CPP | fb4a3cbf2e4edcc590df15663cd28fb9ecab679c | [
"MIT"
] | 8 | 2017-03-02T07:56:45.000Z | 2021-08-07T20:20:19.000Z | HackerRank/Python_Learn/03_Strings/13_The_Minion_Game.py | zubie7a/Algorithms | fb4a3cbf2e4edcc590df15663cd28fb9ecab679c | [
"MIT"
] | null | null | null | HackerRank/Python_Learn/03_Strings/13_The_Minion_Game.py | zubie7a/Algorithms | fb4a3cbf2e4edcc590df15663cd28fb9ecab679c | [
"MIT"
] | 1 | 2021-08-07T20:20:20.000Z | 2021-08-07T20:20:20.000Z | # https://www.hackerrank.com/challenges/the-minion-game
from collections import Counter
def minion_game(string):
# your code goes here
string = string.lower()
consonants = set("bcdfghjklmnpqrstvwxyz")
vowels = set("aeiou")
# Stuart will get 1 point for every non-distinct substring that starts
# ... | 36.807692 | 77 | 0.640543 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 441 | 0.460815 |
b8a3fc4016e36479ead942be25f4a3a83458ff3e | 1,785 | py | Python | Data/girisbolum.py | kemalsanli/wordKontrol | e0de525f0434cb87ef641fd24e23a559a73bd389 | [
"MIT"
] | 1 | 2022-01-25T14:47:32.000Z | 2022-01-25T14:47:32.000Z | Data/girisbolum.py | FehmiDeniz/wordKontrol | e0de525f0434cb87ef641fd24e23a559a73bd389 | [
"MIT"
] | null | null | null | Data/girisbolum.py | FehmiDeniz/wordKontrol | e0de525f0434cb87ef641fd24e23a559a73bd389 | [
"MIT"
] | 3 | 2020-12-19T01:39:09.000Z | 2021-01-21T19:20:28.000Z | import os
from docx import Document
from docx.shared import Inches
from docx import Document
from docx.text.paragraph import Paragraph
def Iceriyomu(dosyayol):
document = Document('{}'.format(dosyayol))
headings = []
texts = []
para = []
giris = ""
for paragraph in document.paragraphs... | 30.775862 | 114 | 0.610644 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 457 | 0.252765 |
b8a55b880ef0e7fe5cf28dcff59d6249431111b4 | 7,008 | py | Python | src/damn_at/analyzers/mesh/analyzer_assimp.py | sagar-kohli/peragro-at | 057687d680d4b098c7642db7d406fc0d8df13019 | [
"BSD-3-Clause"
] | 5 | 2016-03-01T01:56:00.000Z | 2021-05-04T03:53:31.000Z | src/damn_at/analyzers/mesh/analyzer_assimp.py | sagar-kohli/peragro-at | 057687d680d4b098c7642db7d406fc0d8df13019 | [
"BSD-3-Clause"
] | 25 | 2016-03-05T07:13:45.000Z | 2017-07-21T16:32:06.000Z | src/damn_at/analyzers/mesh/analyzer_assimp.py | sueastside/damn-at | 057687d680d4b098c7642db7d406fc0d8df13019 | [
"BSD-3-Clause"
] | 12 | 2016-03-05T18:51:09.000Z | 2017-12-09T05:52:37.000Z | """Assimp-based analyzer."""
from __future__ import absolute_import
import os
import logging
import subprocess
import pyassimp
from damn_at import (
mimetypes,
MetaDataType,
MetaDataValue,
FileId,
FileDescription,
AssetDescription,
AssetId
)
from damn_at.pluginmanager import IAnalyzer
from... | 33.5311 | 79 | 0.519549 | 5,626 | 0.802797 | 0 | 0 | 0 | 0 | 0 | 0 | 1,580 | 0.225457 |
b8a5a0dd0bcce0b6f79040d683a76c1d74e9013f | 2,423 | py | Python | src/stk/ea/selection/selectors/remove_batches.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | 21 | 2018-04-12T16:25:24.000Z | 2022-02-14T23:05:43.000Z | src/stk/ea/selection/selectors/remove_batches.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | 8 | 2019-03-19T12:36:36.000Z | 2020-11-11T12:46:00.000Z | src/stk/ea/selection/selectors/remove_batches.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | 5 | 2018-08-07T13:00:16.000Z | 2021-11-01T00:55:10.000Z | """
Remove Batches
==============
"""
from .selector import Selector
class RemoveBatches(Selector):
"""
Prevents a :class:`.Selector` from selecting some batches.
Examples
--------
*Removing Batches From Selection*
You want to use :class:`.Roulette` selection on all but the
5 :class:`.... | 26.336957 | 68 | 0.529922 | 2,349 | 0.969459 | 661 | 0.272802 | 0 | 0 | 0 | 0 | 1,565 | 0.645894 |
b8a8d25a2989246934825ecb3bded3322cd894bb | 446 | py | Python | students/migrations/0010_institutionalemail_title_email.py | estudeplus/perfil | 58b847aa226b885ca6a7a128035f09de2322519f | [
"MIT"
] | null | null | null | students/migrations/0010_institutionalemail_title_email.py | estudeplus/perfil | 58b847aa226b885ca6a7a128035f09de2322519f | [
"MIT"
] | 21 | 2019-05-11T18:01:10.000Z | 2022-02-10T11:22:01.000Z | students/migrations/0010_institutionalemail_title_email.py | estudeplus/perfil | 58b847aa226b885ca6a7a128035f09de2322519f | [
"MIT"
] | null | null | null | # Generated by Django 2.2.1 on 2019-06-30 00:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('students', '0009_auto_20190629_0125'),
]
operations = [
migrations.AddField(
model_name='institutionalemail',
name='... | 23.473684 | 94 | 0.630045 | 353 | 0.79148 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.298206 |
b8a9652011ddd210555829c017c928bd04cf38bf | 920 | py | Python | azure_utility_tool/config.py | alextricity25/azure_utility_tool | 2975b5f415e5c64335618e83ed0216b7923c4166 | [
"MIT"
] | 5 | 2020-01-02T03:12:14.000Z | 2020-08-19T02:31:19.000Z | azure_utility_tool/config.py | alextricity25/azure_utility_tool | 2975b5f415e5c64335618e83ed0216b7923c4166 | [
"MIT"
] | null | null | null | azure_utility_tool/config.py | alextricity25/azure_utility_tool | 2975b5f415e5c64335618e83ed0216b7923c4166 | [
"MIT"
] | 2 | 2020-03-16T00:19:06.000Z | 2020-08-20T19:31:10.000Z | """
Author: Miguel Alex Cantu
Email: [email protected]
Date: 12/21/2019
Description:
Loads Azure Utility Tool configuration file. The configuration
file is a blend of what the Microsoft Authentication Library
requires and some extra directives that the Auzre Utility
Tool requires. It is a JSON file ... | 34.074074 | 71 | 0.702174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 541 | 0.588043 |
b8a965e925e8c33d2b6141373da012de99c134f6 | 1,197 | py | Python | ics/structures/secu_avb_settings.py | intrepidcs/python_ics | 7bfa8c2f893763608f9255f9536a2019cfae0c23 | [
"Unlicense"
] | 45 | 2017-10-17T08:42:08.000Z | 2022-02-21T16:26:48.000Z | ics/structures/secu_avb_settings.py | intrepidcs/python_ics | 7bfa8c2f893763608f9255f9536a2019cfae0c23 | [
"Unlicense"
] | 106 | 2017-03-07T21:10:39.000Z | 2022-03-29T15:32:46.000Z | ics/structures/secu_avb_settings.py | intrepidcs/python_ics | 7bfa8c2f893763608f9255f9536a2019cfae0c23 | [
"Unlicense"
] | 17 | 2017-04-04T12:30:22.000Z | 2022-01-28T05:30:25.000Z | # This file was auto generated; Do not modify, if you value your sanity!
import ctypes
import enum
from ics.structures.can_settings import *
from ics.structures.canfd_settings import *
from ics.structures.s_text_api_settings import *
class flags(ctypes.Structure):
_pack_ = 2
_fields_ = [
('disableUsb... | 27.837209 | 72 | 0.670844 | 839 | 0.700919 | 0 | 0 | 0 | 0 | 0 | 0 | 307 | 0.256475 |
b8a9e103986b1f6f93cdc5df1a8eef20f43536e8 | 1,531 | py | Python | unaccepted/Substring_with_Concatenation_of_All_Words.py | sheagk/leetcode_solutions | 7571bd13f4274f6b4b622b43a414d56fc26d3be0 | [
"MIT"
] | null | null | null | unaccepted/Substring_with_Concatenation_of_All_Words.py | sheagk/leetcode_solutions | 7571bd13f4274f6b4b622b43a414d56fc26d3be0 | [
"MIT"
] | null | null | null | unaccepted/Substring_with_Concatenation_of_All_Words.py | sheagk/leetcode_solutions | 7571bd13f4274f6b4b622b43a414d56fc26d3be0 | [
"MIT"
] | 1 | 2020-09-03T14:26:00.000Z | 2020-09-03T14:26:00.000Z | ## https://leetcode.com/problems/substring-with-concatenation-of-all-words/submissions/
## this method fails on test case 171 of 173 because it's too slow.
## i'm not sure I see a way to avoid checking every starting position
## in s, and I'm also not sure I see a way to avoid having a loop over
## the words too.
## ... | 31.895833 | 87 | 0.53821 | 1,050 | 0.685826 | 0 | 0 | 0 | 0 | 0 | 0 | 469 | 0.306336 |
b8ab8fab99f75b9332a0131cf9ea65ac9a6bcb59 | 1,848 | py | Python | python_app/supervised_learning/train_data/Data.py | 0xsuu/Project-Mahjong | e82edc67651ff93c8ec158b590cd728f28504be9 | [
"Apache-2.0"
] | 9 | 2018-06-08T00:09:08.000Z | 2021-11-17T11:05:11.000Z | python_app/supervised_learning/train_data/Data.py | 0xsuu/Project-Mahjong | e82edc67651ff93c8ec158b590cd728f28504be9 | [
"Apache-2.0"
] | 1 | 2020-04-25T12:43:26.000Z | 2020-04-25T12:43:26.000Z | python_app/supervised_learning/train_data/Data.py | 0xsuu/Project-Mahjong | e82edc67651ff93c8ec158b590cd728f28504be9 | [
"Apache-2.0"
] | 2 | 2019-05-30T07:18:45.000Z | 2019-11-05T09:15:13.000Z | #!/usr/bin/env python3
'''
The MIT License (MIT)
Copyright (c) 2014 Mark Haines
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... | 36.96 | 82 | 0.682359 | 199 | 0.107684 | 0 | 0 | 0 | 0 | 0 | 0 | 1,204 | 0.651515 |
b8ada7f96a8a91b1795a09283b5bb56adf3d888d | 2,373 | py | Python | tests/_geom/test_path_control_x_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 16 | 2021-04-16T02:01:29.000Z | 2022-01-01T08:53:49.000Z | tests/_geom/test_path_control_x_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 613 | 2021-03-24T03:37:38.000Z | 2022-03-26T10:58:37.000Z | tests/_geom/test_path_control_x_interface.py | simon-ritchie/apyscript | c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279 | [
"MIT"
] | 2 | 2021-06-20T07:32:58.000Z | 2021-12-26T08:22:11.000Z | from random import randint
from retrying import retry
import apysc as ap
from apysc._geom.path_control_x_interface import PathControlXInterface
class TestPathControlXInterface:
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test_control_x(self) -> None:
interface: ... | 43.944444 | 78 | 0.728614 | 2,215 | 0.933418 | 0 | 0 | 2,143 | 0.903076 | 0 | 0 | 11 | 0.004635 |
b8add48d3538b0aee1f01094470a9d13e1f3491d | 1,060 | py | Python | test/PySrc/tools/collect_tutorials.py | lifubang/live-py-plugin | 38a3cf447fd7d9c4e6014b71134e178b0d8a01de | [
"MIT"
] | 224 | 2015-03-22T23:40:52.000Z | 2022-03-01T21:45:51.000Z | test/PySrc/tools/collect_tutorials.py | lifubang/live-py-plugin | 38a3cf447fd7d9c4e6014b71134e178b0d8a01de | [
"MIT"
] | 371 | 2015-04-28T05:14:00.000Z | 2022-03-28T01:31:22.000Z | test/PySrc/tools/collect_tutorials.py | lifubang/live-py-plugin | 38a3cf447fd7d9c4e6014b71134e178b0d8a01de | [
"MIT"
] | 53 | 2015-10-30T07:52:07.000Z | 2022-02-28T12:56:35.000Z | import json
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter, FileType
from pathlib import Path
def main():
parser = ArgumentParser(description='Collect markdown files, and write JSON.',
formatter_class=ArgumentDefaultsHelpFormatter)
project_path = Path(__file__).... | 34.193548 | 82 | 0.592453 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.134906 |
b8ae0034ffcbb27bca0f7745d8873b03677fa88a | 1,569 | py | Python | autobiography.py | wcmckee/wcmckee | 19315a37b592b7bcebb5f2720c965aea58f928ce | [
"MIT"
] | null | null | null | autobiography.py | wcmckee/wcmckee | 19315a37b592b7bcebb5f2720c965aea58f928ce | [
"MIT"
] | null | null | null | autobiography.py | wcmckee/wcmckee | 19315a37b592b7bcebb5f2720c965aea58f928ce | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <markdowncell>
# My name is William Clifford Mckee and this is my autobiography. Written in November 2014.
#
# Structure:
#
# <markdowncell>
# Hello and goodNIĢ
# testing one two there.
# <markdowncell>
# Hello. Testing one two three.
# Screw you guys. I'm g... | 32.020408 | 185 | 0.733588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,522 | 0.969427 |
b8ae248b83fdee036686d9358abb1c53e99adc81 | 26,125 | py | Python | tests/configured_tests.py | maxcountryman/flask-security | ccb41df095177b11e8526958c1001d2f887d9feb | [
"MIT"
] | null | null | null | tests/configured_tests.py | maxcountryman/flask-security | ccb41df095177b11e8526958c1001d2f887d9feb | [
"MIT"
] | null | null | null | tests/configured_tests.py | maxcountryman/flask-security | ccb41df095177b11e8526958c1001d2f887d9feb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import with_statement
import base64
import time
import simplejson as json
from flask.ext.security.utils import capture_registrations, \
capture_reset_password_requests, capture_passwordless_login_requests
from flask.ext.security.forms import LoginForm, ConfirmRegisterForm,... | 33.407928 | 104 | 0.633952 | 25,505 | 0.976268 | 0 | 0 | 96 | 0.003675 | 0 | 0 | 6,536 | 0.250182 |
b8ae72a8774e3f5e5b83670734de99743ac5f598 | 94 | py | Python | Server/programs/__init__.py | VHirtz/CC-mastermind | 11dc4e043ed67c86e66230812cbd86f736e6a7d1 | [
"MIT"
] | null | null | null | Server/programs/__init__.py | VHirtz/CC-mastermind | 11dc4e043ed67c86e66230812cbd86f736e6a7d1 | [
"MIT"
] | null | null | null | Server/programs/__init__.py | VHirtz/CC-mastermind | 11dc4e043ed67c86e66230812cbd86f736e6a7d1 | [
"MIT"
] | null | null | null | from . import program
from . import turtle_test
from . import antoine_test
from . import dance | 23.5 | 26 | 0.797872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b8af272edd34ec0b3bc42014f30caae48187c86a | 8,283 | py | Python | src/robotkernel/utils.py | robocorp/robocode-kernel | b9c7ed20ba0046d0b3bae4e461205f9fa19b77a8 | [
"BSD-3-Clause"
] | 4 | 2020-04-01T16:24:01.000Z | 2022-02-16T19:22:44.000Z | src/robotkernel/utils.py | robocorp/robocode-kernel | b9c7ed20ba0046d0b3bae4e461205f9fa19b77a8 | [
"BSD-3-Clause"
] | 8 | 2020-04-21T13:35:02.000Z | 2022-03-12T00:39:17.000Z | src/robotkernel/utils.py | robocorp/robocode-kernel | b9c7ed20ba0046d0b3bae4e461205f9fa19b77a8 | [
"BSD-3-Clause"
] | 1 | 2020-04-03T10:48:31.000Z | 2020-04-03T10:48:31.000Z | # -*- coding: utf-8 -*-
from copy import deepcopy
from difflib import SequenceMatcher
from IPython.core.display import Image
from IPython.core.display import JSON
from json import JSONDecodeError
from lunr.builder import Builder
from lunr.stemmer import stemmer
from lunr.stop_word_filter import stop_word_filter
from lu... | 32.482353 | 87 | 0.60268 | 56 | 0.006761 | 251 | 0.030303 | 0 | 0 | 0 | 0 | 1,835 | 0.221538 |
b8b06e91b0fbc55f204d0286612efe3154be4b90 | 5,022 | py | Python | Pyduino/__init__.py | ItzTheDodo/Pyduino | a68d6a3214d5fb452e8b8e53cb013ee7205734bb | [
"Apache-2.0"
] | null | null | null | Pyduino/__init__.py | ItzTheDodo/Pyduino | a68d6a3214d5fb452e8b8e53cb013ee7205734bb | [
"Apache-2.0"
] | null | null | null | Pyduino/__init__.py | ItzTheDodo/Pyduino | a68d6a3214d5fb452e8b8e53cb013ee7205734bb | [
"Apache-2.0"
] | null | null | null | # Function Credits: https://github.com/lekum/pyduino/blob/master/pyduino/pyduino.py (lekum (as of 2014))
# Written By: ItzTheDodo
from Pyduino.Boards.Uno import UnoInfo
from Pyduino.Boards.Mega import MegaInfo
from Pyduino.Boards.Diecimila import DiecimilaInfo
from Pyduino.Boards.Due import DueInfo
from Pyduino... | 27.293478 | 105 | 0.554162 | 3,906 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 285 | 0.05675 |
b8b10e6e66f7f88c735881020e22e44e43687a75 | 2,218 | py | Python | apps/api/v1/social_auth.py | asmuratbek/oobamarket | 1053976a13ea84b9aabfcbbcbcffd79549ce9538 | [
"MIT"
] | null | null | null | apps/api/v1/social_auth.py | asmuratbek/oobamarket | 1053976a13ea84b9aabfcbbcbcffd79549ce9538 | [
"MIT"
] | 7 | 2020-06-05T23:36:01.000Z | 2022-01-13T01:42:07.000Z | apps/api/v1/social_auth.py | asmuratbek/oobamarket | 1053976a13ea84b9aabfcbbcbcffd79549ce9538 | [
"MIT"
] | null | null | null | from allauth.socialaccount.helpers import complete_social_login
from allauth.socialaccount.models import SocialApp, SocialToken, SocialLogin, SocialAccount
from allauth.socialaccount.providers.facebook.views import fb_complete_login
from allauth.socialaccount.providers.google.views import GoogleOAuth2Adapter
from djang... | 41.074074 | 118 | 0.701533 | 1,722 | 0.776375 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.027953 |
b8b1d87440313264fbf621f72a939400ed1ccedc | 390 | py | Python | Global and Local Inversions/Solution.py | chandrikadeb7/Awesome-LeetCode-Python | 57902d3394761afd9a51b6405c085c87526e647e | [
"MIT"
] | 2 | 2021-07-16T06:46:58.000Z | 2021-12-08T01:15:09.000Z | Global and Local Inversions/Solution.py | chandrikadeb7/Awesome-LeetCode-Python | 57902d3394761afd9a51b6405c085c87526e647e | [
"MIT"
] | null | null | null | Global and Local Inversions/Solution.py | chandrikadeb7/Awesome-LeetCode-Python | 57902d3394761afd9a51b6405c085c87526e647e | [
"MIT"
] | null | null | null | class Solution:
def isIdealPermutation(self, A: List[int]) -> bool:
n = len(A)
g = local = 0
for i in range(1, n):
if A[i] < A[i-1]:
local += 1
if A[i] < i:
diff = i - A[i]
... | 32.5 | 55 | 0.315385 | 389 | 0.997436 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b8b4581f931e18341efca7f99abcc93a3432695c | 13,076 | py | Python | queryable_properties/properties/common.py | W1ldPo1nter/django-queryable-properties | 9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1 | [
"BSD-3-Clause"
] | 36 | 2019-10-22T11:44:37.000Z | 2022-03-15T21:27:03.000Z | queryable_properties/properties/common.py | W1ldPo1nter/django-queryable-properties | 9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1 | [
"BSD-3-Clause"
] | 6 | 2020-10-03T15:13:26.000Z | 2021-09-25T14:05:50.000Z | queryable_properties/properties/common.py | W1ldPo1nter/django-queryable-properties | 9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1 | [
"BSD-3-Clause"
] | 3 | 2021-04-26T08:30:46.000Z | 2021-08-18T09:04:49.000Z | # encoding: utf-8
import operator
import six
from django.db.models import BooleanField, Field, Q
from ..utils.internal import MISSING_OBJECT, ModelAttributeGetter, QueryPath
from .base import QueryableProperty
from .mixins import AnnotationGetterMixin, AnnotationMixin, boolean_filter, LookupFilterMixin
class Boole... | 45.245675 | 119 | 0.613643 | 12,748 | 0.974916 | 0 | 0 | 232 | 0.017742 | 0 | 0 | 7,478 | 0.571887 |
b8b45d47d2d2b0c8935936a0ff5a2cb55518f1d6 | 2,558 | py | Python | experiments/examples/example_run_bench_s1_periodic_bench.py | cogsys-tuebingen/uninas | 06729b9cf517ec416fb798ae387c5bd9c3a278ac | [
"MIT"
] | 18 | 2020-11-22T16:03:08.000Z | 2022-03-15T12:11:46.000Z | experiments/examples/example_run_bench_s1_periodic_bench.py | cogsys-tuebingen/uninas | 06729b9cf517ec416fb798ae387c5bd9c3a278ac | [
"MIT"
] | 2 | 2022-01-04T08:10:17.000Z | 2022-01-05T08:13:14.000Z | experiments/examples/example_run_bench_s1_periodic_bench.py | cogsys-tuebingen/uninas | 06729b9cf517ec416fb798ae387c5bd9c3a278ac | [
"MIT"
] | 6 | 2021-03-08T07:08:52.000Z | 2022-02-24T12:00:43.000Z | """
training a super-network and periodically evaluating its performance on bench architectures
a work in this direction exists: https://arxiv.org/abs/2001.01431
"""
from uninas.main import Main
# default configurations, for the search process and the network design
# config_files = "{path_conf_bench_tasks}/s1_fairna... | 41.258065 | 114 | 0.69742 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,009 | 0.785379 |
b8b6326ff4e90a353f713e0c09d84e4633fbcdd7 | 9,650 | py | Python | zuds/photometry.py | charlotteaward/zuds-pipeline | 52423859498374203d13fdc15c88bdc1260db183 | [
"BSD-3-Clause"
] | null | null | null | zuds/photometry.py | charlotteaward/zuds-pipeline | 52423859498374203d13fdc15c88bdc1260db183 | [
"BSD-3-Clause"
] | null | null | null | zuds/photometry.py | charlotteaward/zuds-pipeline | 52423859498374203d13fdc15c88bdc1260db183 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql as psql
from sqlalchemy.orm import relationship
from sqlalchemy.ext.hybrid import hybrid_property
from sqlalchemy.schema import UniqueConstraint
from astropy import units as u
from .core import Base
from .constants import APER_KEY, A... | 33.623693 | 108 | 0.594922 | 1,437 | 0.148912 | 0 | 0 | 313 | 0.032435 | 0 | 0 | 1,408 | 0.145907 |
b8b69dfcb1d5f6e006ee8b568536b7b0df129c02 | 5,521 | py | Python | models/Libraries/UnitTest.py | yangshiquan/GraphDialog | 5bb1239bf502c8d79c4c888f69c7aff0c02c2928 | [
"MIT"
] | 26 | 2020-09-25T02:19:43.000Z | 2022-03-27T09:03:34.000Z | models/Libraries/UnitTest.py | yangshiquan/GraphDialog | 5bb1239bf502c8d79c4c888f69c7aff0c02c2928 | [
"MIT"
] | 1 | 2020-10-28T11:28:35.000Z | 2020-10-28T11:28:35.000Z | models/Libraries/UnitTest.py | yangshiquan/GraphDialog | 5bb1239bf502c8d79c4c888f69c7aff0c02c2928 | [
"MIT"
] | 2 | 2020-12-17T08:49:13.000Z | 2021-04-18T13:08:48.000Z | import tensorflow as tf
from models.Libraries.BidirectionalGraphEncoder import BidirectionalGraphEncoder
from tensorflow.python.ops import array_ops
if __name__ == "__main__":
# units=2, input_dim=2, edge_types=10, recurrent_size=4
bi_graph_encoder = BidirectionalGraphEncoder(2, 2, 10, 4)
# inputs: batch_... | 197.178571 | 1,087 | 0.307915 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,710 | 0.490853 |
b8b7d48ab2b3078dad4877e762a40e5343a5d8aa | 96 | py | Python | animazya/apps.py | KenFon/kenfontaine.fr | 6b4055de791e3cc47b473c1890b2fcafab8a635d | [
"MIT"
] | null | null | null | animazya/apps.py | KenFon/kenfontaine.fr | 6b4055de791e3cc47b473c1890b2fcafab8a635d | [
"MIT"
] | null | null | null | animazya/apps.py | KenFon/kenfontaine.fr | 6b4055de791e3cc47b473c1890b2fcafab8a635d | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class AnimazyaConfig(AppConfig):
name = 'animazya'
| 16 | 34 | 0.71875 | 55 | 0.572917 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.104167 |
b8b7e91501f23e4c04cf067b13d9a9480a460c77 | 59 | py | Python | python/testData/debug/test4.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2018-12-29T09:53:39.000Z | 2018-12-29T09:53:42.000Z | python/testData/debug/test4.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/debug/test4.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 1 | 2020-11-27T10:36:50.000Z | 2020-11-27T10:36:50.000Z | xval = 0
xvalue1 = 1
xvalue2 = 2
print(xvalue1 + xvalue2)
| 9.833333 | 24 | 0.677966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b8b9118b82c32808b4a088d2dcdc263280ad9a3a | 3,000 | py | Python | pres/ray-tracing/main.py | sosterwalder/mte7103-qde | e4ed8beda40c9cd15d3c815567d9a4e3396adee7 | [
"MIT"
] | null | null | null | pres/ray-tracing/main.py | sosterwalder/mte7103-qde | e4ed8beda40c9cd15d3c815567d9a4e3396adee7 | [
"MIT"
] | null | null | null | pres/ray-tracing/main.py | sosterwalder/mte7103-qde | e4ed8beda40c9cd15d3c815567d9a4e3396adee7 | [
"MIT"
] | null | null | null | from kivy.animation import Animation
from kivy.app import App
from kivy.core.window import Window
from kivy.graphics import Color
from kivy.graphics import Ellipse
from kivy.graphics import Line
from kivy.uix.widget import Widget
class ProjCenter(Widget):
def __init__(self, **kwargs):
super(ProjCenter, se... | 28.037383 | 77 | 0.553 | 2,703 | 0.901 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.012 |
b8b92ae2e5cf67849b6f6b332521716f375c2982 | 3,960 | py | Python | sookie.py | anygard/sookie | 5732f7644d2d908911735e62c8574863825174a2 | [
"MIT"
] | null | null | null | sookie.py | anygard/sookie | 5732f7644d2d908911735e62c8574863825174a2 | [
"MIT"
] | null | null | null | sookie.py | anygard/sookie | 5732f7644d2d908911735e62c8574863825174a2 | [
"MIT"
] | null | null | null |
""" Sookie, is a waiter, waits for a socket to be listening then it moves on
Usage:
sookie <socket> [--timeout=<to>] [--retry=<rt>] [--logsocket=<ls>] [--logfacility=<lf>] [--loglevel=<ll>]
sookie -h | --help
sookie --version
Options:
-h --help Show this screen
--version ... | 30.697674 | 109 | 0.630303 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,740 | 0.439394 |
b8bd55689822e6f7e5a2823014bfe14020f8b719 | 912 | py | Python | tests/parser/syntax/test_ann_assign.py | williamremor/vyper | 4d33dc4140f7d0c339876afb6af7b417bd0ed8e0 | [
"MIT"
] | 1 | 2018-08-31T02:32:57.000Z | 2018-08-31T02:32:57.000Z | tests/parser/syntax/test_ann_assign.py | williamremor/vyper | 4d33dc4140f7d0c339876afb6af7b417bd0ed8e0 | [
"MIT"
] | null | null | null | tests/parser/syntax/test_ann_assign.py | williamremor/vyper | 4d33dc4140f7d0c339876afb6af7b417bd0ed8e0 | [
"MIT"
] | null | null | null | import pytest
from pytest import raises
from vyper import compiler
from vyper.exceptions import VariableDeclarationException, TypeMismatchException
fail_list = [
"""
@public
def test():
a = 1
""",
"""
@public
def test():
a = 33.33
""",
"""
@public
def test():
a = "test string"
"""... | 16.888889 | 80 | 0.634868 | 0 | 0 | 0 | 0 | 431 | 0.472588 | 0 | 0 | 256 | 0.280702 |
b8bd59b6d2fd731f6b088f01ce1a174d704adcae | 7,568 | py | Python | tests/test_mongoengine_dsl.py | StoneMoe/mongoengine_dsl | 310d77c30e77ba1f695b3d644737fcfc3c2ab304 | [
"MIT"
] | 3 | 2021-08-25T02:08:34.000Z | 2022-03-23T08:32:09.000Z | tests/test_mongoengine_dsl.py | StoneMoe/mongoengine_dsl | 310d77c30e77ba1f695b3d644737fcfc3c2ab304 | [
"MIT"
] | 1 | 2021-08-24T09:41:11.000Z | 2021-08-24T10:02:43.000Z | tests/test_mongoengine_dsl.py | StoneMoe/mongoengine_dsl | 310d77c30e77ba1f695b3d644737fcfc3c2ab304 | [
"MIT"
] | 1 | 2021-08-24T14:25:28.000Z | 2021-08-24T14:25:28.000Z | #!/usr/bin/env python
import unittest
from mongoengine import Document, Q, StringField, connect
from mongoengine_dsl import Query
from mongoengine_dsl.errors import InvalidSyntaxError, TransformHookError
from tests.utils import ts2dt
class DSLTest(unittest.TestCase):
def test_whitespace(self):
self.asser... | 35.698113 | 88 | 0.532505 | 7,365 | 0.968314 | 0 | 0 | 0 | 0 | 0 | 0 | 2,146 | 0.282146 |
b8be08575104b59466524c927af95ffef96623e1 | 2,891 | py | Python | dmidecode/__init__.py | hamgom95/dmidecode | d8d82fecdbfe578ad5e9c561753dcbc6fdfdc02c | [
"MIT"
] | null | null | null | dmidecode/__init__.py | hamgom95/dmidecode | d8d82fecdbfe578ad5e9c561753dcbc6fdfdc02c | [
"MIT"
] | null | null | null | dmidecode/__init__.py | hamgom95/dmidecode | d8d82fecdbfe578ad5e9c561753dcbc6fdfdc02c | [
"MIT"
] | null | null | null | import subprocess
from collections import UserDict
from functools import lru_cache
def _parse_handle_section(lines):
"""
Parse a section of dmidecode output
* 1st line contains address, type and size
* 2nd line is title
* line started with one tab is one option and its value
* line started with... | 28.623762 | 79 | 0.528191 | 1,975 | 0.683155 | 610 | 0.211 | 592 | 0.204773 | 0 | 0 | 850 | 0.294016 |
b8beac8ab26c148a31cb1d0f421ff54922a1ebcd | 1,580 | py | Python | {{cookiecutter.repo_name}}/webapp/config/settings/cache.py | bopo/django-template | 465f48563bc9625e37bb278a32800e7a55d9e256 | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.repo_name}}/webapp/config/settings/cache.py | bopo/django-template | 465f48563bc9625e37bb278a32800e7a55d9e256 | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.repo_name}}/webapp/config/settings/cache.py | bopo/django-template | 465f48563bc9625e37bb278a32800e7a55d9e256 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
try:
from .base import MIDDLEWARE_CLASSES
except ImportError as e:
raise e
# MIDDLEWARE_CLASSES += (
# 'django.middleware.cache.CacheMiddleware',
# 'django.middleware.cache.UpdateCacheMiddleware',
# 'django.middleware.cache.FetchFrom... | 28.727273 | 75 | 0.563924 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,145 | 0.724684 |
b8c05b3185ce376bc8351fd54c6fd146defe890b | 5,144 | py | Python | scripts/evaluate_hatexplain.py | GKingA/POTATO | 585eb002d95375a94b496b0f38637fdf69cd8a9e | [
"MIT"
] | 26 | 2021-10-05T14:57:33.000Z | 2022-03-27T04:26:21.000Z | scripts/evaluate_hatexplain.py | GKingA/POTATO | 585eb002d95375a94b496b0f38637fdf69cd8a9e | [
"MIT"
] | 20 | 2021-12-01T09:03:41.000Z | 2022-03-09T10:45:58.000Z | scripts/evaluate_hatexplain.py | GKingA/POTATO | 585eb002d95375a94b496b0f38637fdf69cd8a9e | [
"MIT"
] | 3 | 2021-11-18T07:14:56.000Z | 2022-02-17T09:14:46.000Z | from typing import List, Dict
import json
import numpy as np
from pandas import DataFrame
import logging
from argparse import ArgumentParser, ArgumentError
from sklearn.metrics import classification_report
from xpotato.graph_extractor.extract import FeatureEvaluator
from xpotato.dataset.explainable_dataset import Expla... | 34.756757 | 120 | 0.626361 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,270 | 0.24689 |
b8c18579e2101b06416f377ffa427b6e165dcba7 | 53 | py | Python | agency/memory/__init__.py | jackharmer/agency | 5a78dd23e14c44c4076e49ea44b83ab1697e51c8 | [
"MIT"
] | 2 | 2022-03-30T19:51:42.000Z | 2022-03-30T20:05:39.000Z | agency/memory/__init__.py | jackharmer/agency | 5a78dd23e14c44c4076e49ea44b83ab1697e51c8 | [
"MIT"
] | null | null | null | agency/memory/__init__.py | jackharmer/agency | 5a78dd23e14c44c4076e49ea44b83ab1697e51c8 | [
"MIT"
] | null | null | null | from .episodic import EpisodicMemory, EpisodicBuffer
| 26.5 | 52 | 0.867925 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b8c19e5ee50c09165615a57248929fdadd0a46be | 1,876 | py | Python | examples/car_on_hill_fqi.py | doroK/mushroom | 47e5b1d09b65da585c1b19a6cc7f0366849d7863 | [
"MIT"
] | null | null | null | examples/car_on_hill_fqi.py | doroK/mushroom | 47e5b1d09b65da585c1b19a6cc7f0366849d7863 | [
"MIT"
] | null | null | null | examples/car_on_hill_fqi.py | doroK/mushroom | 47e5b1d09b65da585c1b19a6cc7f0366849d7863 | [
"MIT"
] | null | null | null | import numpy as np
from joblib import Parallel, delayed
from sklearn.ensemble import ExtraTreesRegressor
from mushroom.algorithms.value import FQI
from mushroom.core import Core
from mushroom.environments import *
from mushroom.policy import EpsGreedy
from mushroom.utils.dataset import compute_J
from mushroom.utils.pa... | 26.422535 | 80 | 0.655117 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.124733 |
b8c1beea49870d673c41dbabd215c2bea4001620 | 1,854 | py | Python | db.py | dashimaki360/mahjong-line-bot | e119e83308bed1bfe6d66d53e41a4b7908dceb5e | [
"MIT"
] | null | null | null | db.py | dashimaki360/mahjong-line-bot | e119e83308bed1bfe6d66d53e41a4b7908dceb5e | [
"MIT"
] | 5 | 2018-04-19T06:59:47.000Z | 2018-04-20T00:07:34.000Z | db.py | dashimaki360/mahjong-line-bot | e119e83308bed1bfe6d66d53e41a4b7908dceb5e | [
"MIT"
] | null | null | null | import os
from datetime import datetime
from flask_sqlalchemy import SQLAlchemy
# heroku postgresql setting
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE_URL', None)
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
db = SQLAlchemy(app)
class usermessage(db.Model):
'''
user message and reply d... | 28.090909 | 86 | 0.60356 | 862 | 0.464941 | 0 | 0 | 0 | 0 | 0 | 0 | 237 | 0.127832 |
b8c255c102573468b31394960a4e3c18d4bdfc95 | 728 | py | Python | loss/voxel_match_loss.py | sennnnn/Refer-it-in-RGBD | ac8dcaed80e28d2708f14cba5142fec5301eb3cc | [
"MIT"
] | 28 | 2021-03-26T09:24:23.000Z | 2022-02-17T20:14:43.000Z | loss/voxel_match_loss.py | sennnnn/Refer-it-in-RGBD | ac8dcaed80e28d2708f14cba5142fec5301eb3cc | [
"MIT"
] | 1 | 2021-07-12T02:38:51.000Z | 2021-07-12T11:43:31.000Z | loss/voxel_match_loss.py | sennnnn/Refer-it-in-RGBD | ac8dcaed80e28d2708f14cba5142fec5301eb3cc | [
"MIT"
] | 4 | 2021-08-05T01:57:05.000Z | 2022-02-17T20:26:35.000Z | import torch
import torch.nn as nn
class voxel_match_loss(nn.Module):
def __init__(self):
super().__init__()
self.criterion=nn.MSELoss()
def forward(self,output,label):
positive_mask=torch.zeros(label.shape).cuda()
positive_mask=torch.where(label>0.2,torch.ones_like(positive_mas... | 42.823529 | 96 | 0.715659 | 692 | 0.950549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b8c32fb0b4535e967806c491e7dce8ba89fb1433 | 1,134 | py | Python | app/cachedmodel/migrations/0001_initial.py | Uniquode/uniquode2 | 385f3e0b26383c042d8da64b52350e82414580ea | [
"MIT"
] | null | null | null | app/cachedmodel/migrations/0001_initial.py | Uniquode/uniquode2 | 385f3e0b26383c042d8da64b52350e82414580ea | [
"MIT"
] | null | null | null | app/cachedmodel/migrations/0001_initial.py | Uniquode/uniquode2 | 385f3e0b26383c042d8da64b52350e82414580ea | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-09-19 03:41
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
class Migration(migrations.Migration):
initial = True
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
]
operations =... | 32.4 | 128 | 0.574074 | 976 | 0.86067 | 0 | 0 | 0 | 0 | 0 | 0 | 258 | 0.227513 |
b8c4664f2ad6a4052e0d5d282f88dba0b1d97427 | 8,305 | py | Python | conduit/utils/awsbatch_operator.py | elenimath/saber | 71acab9798cf3aee1c4d64b09453e5234f8fdf1e | [
"Apache-2.0"
] | 12 | 2018-05-14T17:43:18.000Z | 2021-11-16T04:03:33.000Z | conduit/utils/awsbatch_operator.py | elenimath/saber | 71acab9798cf3aee1c4d64b09453e5234f8fdf1e | [
"Apache-2.0"
] | 34 | 2019-05-06T19:13:36.000Z | 2021-05-06T19:12:35.000Z | conduit/utils/awsbatch_operator.py | elenimath/saber | 71acab9798cf3aee1c4d64b09453e5234f8fdf1e | [
"Apache-2.0"
] | 3 | 2019-10-08T17:42:17.000Z | 2021-07-28T05:52:02.000Z | # Copyright 2019 The Johns Hopkins University Applied Physics Laboratory
#
# 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 ... | 38.627907 | 116 | 0.596388 | 7,314 | 0.880674 | 0 | 0 | 910 | 0.109573 | 0 | 0 | 2,935 | 0.353402 |
b8c4711e42028105dddd073eaee5ccd39e86f063 | 17,579 | py | Python | csapi.py | ria-ee/X-Road-cs-api | 37d28886e47eea21cb4e46ad20b84bbfcafe79ad | [
"MIT"
] | 1 | 2020-04-16T06:31:54.000Z | 2020-04-16T06:31:54.000Z | csapi.py | ria-ee/X-Road-cs-api | 37d28886e47eea21cb4e46ad20b84bbfcafe79ad | [
"MIT"
] | null | null | null | csapi.py | ria-ee/X-Road-cs-api | 37d28886e47eea21cb4e46ad20b84bbfcafe79ad | [
"MIT"
] | 1 | 2019-09-09T08:07:15.000Z | 2019-09-09T08:07:15.000Z | #!/usr/bin/env python3
"""This is a module for X-Road Central Server API.
This module allows:
* adding new member to the X-Road Central Server.
* adding new subsystem to the X-Road Central Server.
"""
import json
import logging
import re
import psycopg2
from flask import request, jsonify
from flask_restful i... | 34.878968 | 98 | 0.598669 | 3,286 | 0.186928 | 0 | 0 | 435 | 0.024745 | 0 | 0 | 7,709 | 0.438535 |
b210a7b86cf5f45e110a190e8d8eb560c075e998 | 397 | py | Python | dotacni_matice/migrations/0002_history.py | CzechInvest/ciis | c6102598f564a717472e5e31e7eb894bba2c8104 | [
"MIT"
] | 1 | 2019-05-26T22:24:01.000Z | 2019-05-26T22:24:01.000Z | dotacni_matice/migrations/0002_history.py | CzechInvest/ciis | c6102598f564a717472e5e31e7eb894bba2c8104 | [
"MIT"
] | 6 | 2019-01-22T14:53:43.000Z | 2020-09-22T16:20:28.000Z | dotacni_matice/migrations/0002_history.py | CzechInvest/ciis | c6102598f564a717472e5e31e7eb894bba2c8104 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-12-27 18:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dotacni_matice', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='dotacnititul',
name='history',... | 20.894737 | 58 | 0.602015 | 304 | 0.765743 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.251889 |
b2112b5aca6a5b5632c5810795648be898bf0703 | 898 | py | Python | telegrambotapiwrapper/printpretty.py | pynista/telegrambotapiwrapper | 4310882a1a7db94f5256b010ff8a3103b405dc0d | [
"MIT"
] | 1 | 2021-05-10T06:49:52.000Z | 2021-05-10T06:49:52.000Z | telegrambotapiwrapper/printpretty.py | pynista/telegrambotapiwrapper | 4310882a1a7db94f5256b010ff8a3103b405dc0d | [
"MIT"
] | null | null | null | telegrambotapiwrapper/printpretty.py | pynista/telegrambotapiwrapper | 4310882a1a7db94f5256b010ff8a3103b405dc0d | [
"MIT"
] | null | null | null | from collections import OrderedDict
from dataclasses import (
fields,
)
from prettyprinter.prettyprinter import pretty_call, register_pretty
def is_instance_of_dataclass(value):
try:
fields(value)
except TypeError:
return False
else:
return True
def pretty_dataclass_instance... | 23.631579 | 71 | 0.678174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.150334 |
b2113a9f179d1a1302e99c7904123f0326d3e145 | 1,055 | py | Python | bot.py | ctrezevant/GEFS-bot | 9fdfbb87e33399051ef2287e629baae234800dcf | [
"MIT"
] | null | null | null | bot.py | ctrezevant/GEFS-bot | 9fdfbb87e33399051ef2287e629baae234800dcf | [
"MIT"
] | null | null | null | bot.py | ctrezevant/GEFS-bot | 9fdfbb87e33399051ef2287e629baae234800dcf | [
"MIT"
] | null | null | null | """
GEFS Chart Bot
Polls https://www.tropicaltidbits.com/storminfo/11L_gefs_latest.png, but it can
really be used to monitor/notify about changes to any file on the web.
(c) Charlton Trezevant 2017
MIT License
Enjoy!
"""
import time, sys
sys.dont_write_bytecode = True
sys.path.insert(0, 'lib'... | 30.142857 | 102 | 0.700474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 470 | 0.445498 |
b2116bed98a7e670916911f64ee1ba8f859af9bb | 6,442 | py | Python | tests/test_periodbase.py | pierfra-ro/astrobase | b9f62c59a3ab9cdc1388d409fa281c26f1e6db6c | [
"MIT"
] | 45 | 2017-03-09T19:08:44.000Z | 2022-03-24T00:36:28.000Z | tests/test_periodbase.py | pierfra-ro/astrobase | b9f62c59a3ab9cdc1388d409fa281c26f1e6db6c | [
"MIT"
] | 92 | 2016-12-21T19:01:20.000Z | 2022-01-03T15:28:45.000Z | tests/test_periodbase.py | pierfra-ro/astrobase | b9f62c59a3ab9cdc1388d409fa281c26f1e6db6c | [
"MIT"
] | 20 | 2016-12-20T23:01:29.000Z | 2021-03-07T16:24:15.000Z | '''test_periodbase.py - Waqas Bhatti ([email protected]) - Feb 2018
License: MIT - see the LICENSE file for details.
This tests the following:
- downloads a light curve from the github repository notebooks/nb-data dir
- reads the light curve using astrobase.hatlc
- runs the GLS, WIN, PDM, AoV, BLS, AoVMH, a... | 26.510288 | 80 | 0.591276 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,871 | 0.290438 |
b211aa66d913dc22688021d4550c75de1f8811d6 | 2,877 | py | Python | tests/sdict/test_sdict_substitutor.py | nikitanovosibirsk/district42-exp-types | e36e43da62f32d58d4b14c65afa16856dc8849e1 | [
"Apache-2.0"
] | null | null | null | tests/sdict/test_sdict_substitutor.py | nikitanovosibirsk/district42-exp-types | e36e43da62f32d58d4b14c65afa16856dc8849e1 | [
"Apache-2.0"
] | 2 | 2021-08-01T05:02:21.000Z | 2021-08-01T10:06:28.000Z | tests/sdict/test_sdict_substitutor.py | nikitanovosibirsk/district42-exp-types | e36e43da62f32d58d4b14c65afa16856dc8849e1 | [
"Apache-2.0"
] | null | null | null | from _pytest.python_api import raises
from baby_steps import given, then, when
from district42 import schema
from revolt import substitute
from revolt.errors import SubstitutionError
from district42_exp_types.sdict import schema_sdict
def test_sdict_substitution():
with given:
sch = schema_sdict
wit... | 23.77686 | 54 | 0.468891 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 282 | 0.098019 |
b211f2e30f6de646dd73a75da8055e28f37f148d | 1,735 | py | Python | algo/problems/pascal_triangle.py | avi3tal/knowledgebase | fd30805aa94332a6c14c9d8631c7044673fb3e2c | [
"MIT"
] | null | null | null | algo/problems/pascal_triangle.py | avi3tal/knowledgebase | fd30805aa94332a6c14c9d8631c7044673fb3e2c | [
"MIT"
] | null | null | null | algo/problems/pascal_triangle.py | avi3tal/knowledgebase | fd30805aa94332a6c14c9d8631c7044673fb3e2c | [
"MIT"
] | 1 | 2021-11-19T13:45:59.000Z | 2021-11-19T13:45:59.000Z | """
Pascal's Triangle
1
11
121
1331
14641
Question:
Find the value in given row and column
First solution: brute force
Second solution: Dynamic programming
alternative
def pascal(r, c):
print(f"row: {r}, col: {c}")
if r == 0 or r == 1 or c == 0:
return 1
return pascal(r-1, c-1) + pascal(r-1, c... | 20.903614 | 98 | 0.595389 | 0 | 0 | 0 | 0 | 409 | 0.235735 | 0 | 0 | 372 | 0.214409 |
b212f83168a6342d8bcbdaa233860a911b7cdadb | 1,117 | py | Python | drf_ujson/parsers.py | radzhome/drf-ujson-renderer | b65c01edc5311404178a9d245d40ccc10733c5d7 | [
"MIT"
] | null | null | null | drf_ujson/parsers.py | radzhome/drf-ujson-renderer | b65c01edc5311404178a9d245d40ccc10733c5d7 | [
"MIT"
] | null | null | null | drf_ujson/parsers.py | radzhome/drf-ujson-renderer | b65c01edc5311404178a9d245d40ccc10733c5d7 | [
"MIT"
] | 1 | 2019-04-04T13:25:22.000Z | 2019-04-04T13:25:22.000Z | from __future__ import unicode_literals
import codecs
from django.conf import settings
from rest_framework.compat import six
from rest_framework.parsers import BaseParser, ParseError
from rest_framework import renderers
from rest_framework.settings import api_settings
import ujson
class UJSONParser(BaseParser):
... | 32.852941 | 78 | 0.72068 | 830 | 0.743062 | 0 | 0 | 0 | 0 | 0 | 0 | 189 | 0.169203 |
b213326f9b1abfe3dfc2e0c0ee4f51afa2c00f6e | 778 | py | Python | Software_University/python_basics/exam_preparation/4_exam_prep/renovation.py | Ivanazzz/SoftUni-W3resource-Python | 892321a290e22a91ff2ac2fef5316179a93f2f17 | [
"MIT"
] | 1 | 2022-01-26T07:38:11.000Z | 2022-01-26T07:38:11.000Z | Software_University/python_basics/exam_preparation/4_exam_prep/renovation.py | Ivanazzz/SoftUni-W3resource-Python | 892321a290e22a91ff2ac2fef5316179a93f2f17 | [
"MIT"
] | null | null | null | Software_University/python_basics/exam_preparation/4_exam_prep/renovation.py | Ivanazzz/SoftUni-W3resource-Python | 892321a290e22a91ff2ac2fef5316179a93f2f17 | [
"MIT"
] | null | null | null | from math import ceil
walls_hight = int(input())
walls_witdh = int(input())
percentage_walls_tottal_area_not_painted = int(input())
total_walls_area = walls_hight * walls_witdh * 4
quadratic_meters_left = total_walls_area - ceil(total_walls_area * percentage_walls_tottal_area_not_painted / 100)
while True:
paint... | 32.416667 | 114 | 0.717224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 174 | 0.22365 |
b2142b5c3740f3c4fe33aa1ffaba044ed1c5379b | 1,078 | py | Python | Order_Managment/GEMINI_OM/Order.py | anubhavj880/Jack | 932fc60923ccc17b5fd77bd13ee381b1c8ba0f15 | [
"Apache-2.0"
] | null | null | null | Order_Managment/GEMINI_OM/Order.py | anubhavj880/Jack | 932fc60923ccc17b5fd77bd13ee381b1c8ba0f15 | [
"Apache-2.0"
] | null | null | null | Order_Managment/GEMINI_OM/Order.py | anubhavj880/Jack | 932fc60923ccc17b5fd77bd13ee381b1c8ba0f15 | [
"Apache-2.0"
] | null | null | null | class Order():
def __init__(self, exchCode, sym_, _sym, orderType, price, side, qty, stopPrice=''):
self.odid = None
self.status = None
self.tempOdid = None
self.sym_ = sym_
self._sym = _sym
self.symbol = sym_ + _sym
self.exchCode = exchCode.upper()
se... | 31.705882 | 88 | 0.541744 | 1,077 | 0.999072 | 0 | 0 | 0 | 0 | 0 | 0 | 167 | 0.154917 |
b21485714fab66b89d8a0a3cada0bde14841a26b | 19,069 | py | Python | Commands.py | ehasting/psybot | 8699f1ad8010bac5d2622486cb549898fc979036 | [
"BSD-2-Clause"
] | null | null | null | Commands.py | ehasting/psybot | 8699f1ad8010bac5d2622486cb549898fc979036 | [
"BSD-2-Clause"
] | null | null | null | Commands.py | ehasting/psybot | 8699f1ad8010bac5d2622486cb549898fc979036 | [
"BSD-2-Clause"
] | null | null | null | import datetime
import re
import os
import requests
import json
import uuid
import random
import calendar
import time
import libs.SerializableDict as SerializableDict
import libs.StorageObjects as StorageObjects
import libs.Models as Models
import libs.Loggiz as Loggiz
from pytz import timezone
import pytz
import teleg... | 39.317526 | 204 | 0.608579 | 17,043 | 0.893754 | 0 | 0 | 408 | 0.021396 | 0 | 0 | 3,147 | 0.165032 |
b218434a962715f2504f0272b199565a159dcf7b | 115 | py | Python | aim/pytorch.py | avkudr/aim | 5961f31d358929287986ace09c73310886a94704 | [
"Apache-2.0"
] | 2,195 | 2020-01-23T03:08:11.000Z | 2022-03-31T14:32:19.000Z | aim/pytorch.py | deepanprabhu/aim | c00d8ec7bb2d9fd230a9430b516ca90cdb8072cb | [
"Apache-2.0"
] | 696 | 2020-02-08T21:55:45.000Z | 2022-03-31T16:52:22.000Z | aim/pytorch.py | deepanprabhu/aim | c00d8ec7bb2d9fd230a9430b516ca90cdb8072cb | [
"Apache-2.0"
] | 150 | 2020-03-27T10:44:25.000Z | 2022-03-21T21:29:41.000Z | # Alias to SDK PyTorch utils
from aim.sdk.adapters.pytorch import track_params_dists, track_gradients_dists # noqa
| 38.333333 | 85 | 0.834783 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.295652 |
b21881d06efcd08194a38d1b8b2a7efa72fa56b5 | 890 | py | Python | src/tools/checkDeckByUrl.py | kentokura/xenoparts | d861ca474accdf1ec7bcf6afcac6be9246cf4c85 | [
"MIT"
] | null | null | null | src/tools/checkDeckByUrl.py | kentokura/xenoparts | d861ca474accdf1ec7bcf6afcac6be9246cf4c85 | [
"MIT"
] | null | null | null | src/tools/checkDeckByUrl.py | kentokura/xenoparts | d861ca474accdf1ec7bcf6afcac6be9246cf4c85 | [
"MIT"
] | null | null | null | # coding: utf-8
# Your code here!
import csv
def encode_cardd_by_url(url: str) -> dict:
"""
入力:デッキURL
出力:{ card_id, num }
処理:
URLから、カードidごとの枚数の辞書を作成する
"""
site_url, card_url = url.split("c=")
card_url, key_card_url = card_url.split("&")
arr_card_id = card_url.split(".")
... | 22.25 | 77 | 0.61573 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 409 | 0.400196 |
b21bfec88e0dfd45846324420361a10ba1865cb9 | 193 | py | Python | kleeneup/__init__.py | caiopo/kleeneup | 0050054853ac7a3a2e40d492cc5fe741ef737191 | [
"MIT"
] | null | null | null | kleeneup/__init__.py | caiopo/kleeneup | 0050054853ac7a3a2e40d492cc5fe741ef737191 | [
"MIT"
] | null | null | null | kleeneup/__init__.py | caiopo/kleeneup | 0050054853ac7a3a2e40d492cc5fe741ef737191 | [
"MIT"
] | 1 | 2018-10-10T00:59:54.000Z | 2018-10-10T00:59:54.000Z | from .regular_grammar import RegularGrammar
from .finite_automaton import FiniteAutomaton, State, Symbol, Sentence
from .regular_expression import RegularExpression, StitchedBinaryTree, Lambda
| 48.25 | 77 | 0.870466 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b21c7a1509c7bfd68dcac48270c795470f743c73 | 89 | py | Python | recipe_backend/recipes/apps.py | jbernal0019/Recipe_site | 30090b521cac84156cf5f05429a12dd5889f8703 | [
"MIT"
] | null | null | null | recipe_backend/recipes/apps.py | jbernal0019/Recipe_site | 30090b521cac84156cf5f05429a12dd5889f8703 | [
"MIT"
] | 3 | 2020-02-12T01:22:24.000Z | 2021-06-10T21:49:21.000Z | recipe_backend/recipes/apps.py | jbernal0019/Recipe_site | 30090b521cac84156cf5f05429a12dd5889f8703 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class PluginsConfig(AppConfig):
name = 'recipes'
| 14.833333 | 33 | 0.752809 | 52 | 0.58427 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.101124 |
b21e2321bf77cc16cff7c91db7f72ea88ee39b5b | 1,337 | py | Python | mass_circular_weighing/constants.py | MSLNZ/Mass-Circular-Weighing | f144158b9e2337d7e9446326d6927e1dd606ed38 | [
"MIT"
] | 1 | 2020-02-19T09:10:43.000Z | 2020-02-19T09:10:43.000Z | mass_circular_weighing/constants.py | MSLNZ/Mass-Circular-Weighing | f144158b9e2337d7e9446326d6927e1dd606ed38 | [
"MIT"
] | null | null | null | mass_circular_weighing/constants.py | MSLNZ/Mass-Circular-Weighing | f144158b9e2337d7e9446326d6927e1dd606ed38 | [
"MIT"
] | null | null | null | """
A repository for constants and symbols used in the mass weighing program
Modify default folder paths as necessary
"""
import os
MU_STR = 'µ' # ALT+0181 or 'µ'. use 'u' if running into issues
SIGMA_STR = 'σ' # \u03C3 for sigma sign
DELTA_STR = 'Δ' # \u0394 for capi... | 36.135135 | 107 | 0.658938 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 703 | 0.523065 |
b21e3496e5fd13e41a572208964a13c7cf7ed7c2 | 3,032 | py | Python | UsbVibrationDevice.py | Suitceyes-Project-Code/Vibration-Pattern-Player | 44d8bac61eed0ee7712eb0299d0d7029f688fe24 | [
"MIT"
] | null | null | null | UsbVibrationDevice.py | Suitceyes-Project-Code/Vibration-Pattern-Player | 44d8bac61eed0ee7712eb0299d0d7029f688fe24 | [
"MIT"
] | null | null | null | UsbVibrationDevice.py | Suitceyes-Project-Code/Vibration-Pattern-Player | 44d8bac61eed0ee7712eb0299d0d7029f688fe24 | [
"MIT"
] | 1 | 2021-10-04T14:26:49.000Z | 2021-10-04T14:26:49.000Z | import PyCmdMessenger
from VestDeviceBase import VestDevice
class UsbVestDevice(VestDevice):
"""
Basic interface for sending commands to the vest using a
serial port connection.
"""
commands = [["PinSet","gg"],
["PinMute","g"],
["GloveSet","gg*"],
["... | 30.938776 | 115 | 0.539248 | 2,971 | 0.979881 | 0 | 0 | 0 | 0 | 0 | 0 | 1,409 | 0.46471 |
b2207477c30bc92b4836e3b6d2c7c4f40fd9d5d3 | 923 | py | Python | webapi/tests/test_models.py | c2masamichi/webapp-example-python-django | f0771526623bf5d1021ad1c5c8baf480fb285190 | [
"MIT"
] | null | null | null | webapi/tests/test_models.py | c2masamichi/webapp-example-python-django | f0771526623bf5d1021ad1c5c8baf480fb285190 | [
"MIT"
] | 4 | 2021-03-21T10:43:05.000Z | 2022-02-10T12:46:20.000Z | webapi/tests/test_models.py | c2masamichi/webapp-example-python-django | f0771526623bf5d1021ad1c5c8baf480fb285190 | [
"MIT"
] | null | null | null | from django.core.exceptions import ValidationError
import pytest
from api.models import Product
@pytest.mark.django_db
@pytest.mark.parametrize(
('name', 'price'),
(
('aa', 1000),
('a' * 21, 1000),
('house', 1000000001),
('minus', -1),
('A 01 %', 100),
),
)
def tes... | 21.97619 | 50 | 0.576381 | 0 | 0 | 0 | 0 | 820 | 0.888407 | 0 | 0 | 84 | 0.091008 |
b222b2832f0113a6843a7ce7ec02f0e981a7b9ca | 12,099 | py | Python | tests/app/main/views/test_users.py | AusDTO/dto-digitalmarketplace-admin-frontend | 1858a653623999d81bb4fa3e51f7cb4df4b83079 | [
"MIT"
] | 1 | 2018-01-04T18:10:28.000Z | 2018-01-04T18:10:28.000Z | tests/app/main/views/test_users.py | AusDTO/dto-digitalmarketplace-admin-frontend | 1858a653623999d81bb4fa3e51f7cb4df4b83079 | [
"MIT"
] | 5 | 2016-12-12T04:58:12.000Z | 2019-02-05T21:19:38.000Z | tests/app/main/views/test_users.py | AusDTO/dto-digitalmarketplace-admin-frontend | 1858a653623999d81bb4fa3e51f7cb4df4b83079 | [
"MIT"
] | 3 | 2017-06-19T07:51:38.000Z | 2021-01-12T12:30:22.000Z |
import mock
import pytest
import copy
import six
from lxml import html
from ...helpers import LoggedInApplicationTest
from dmapiclient import HTTPError
@mock.patch('app.main.views.users._user_info')
@mock.patch('app.main.views.users.data_api_client')
class TestUsersView(LoggedInApplicationTest):
def test_shoul... | 42.452632 | 112 | 0.659889 | 11,788 | 0.974295 | 0 | 0 | 11,939 | 0.986776 | 0 | 0 | 3,020 | 0.249607 |
b223d904c6830f2000cc2bff850aed8bde569ecc | 3,460 | py | Python | code/makestellar.py | gitter-badger/DHOD | f2f084fea6c299f95d15cbea5ec94d404bc946b5 | [
"MIT"
] | null | null | null | code/makestellar.py | gitter-badger/DHOD | f2f084fea6c299f95d15cbea5ec94d404bc946b5 | [
"MIT"
] | null | null | null | code/makestellar.py | gitter-badger/DHOD | f2f084fea6c299f95d15cbea5ec94d404bc946b5 | [
"MIT"
] | null | null | null | import numpy as np
import sys, os
from scipy.optimize import minimize
import json
import matplotlib.pyplot as plt
#
sys.path.append('./utils')
import tools
#
bs, ncf, stepf = 400, 512, 40
path = '../data/z00/'
ftype = 'L%04d_N%04d_S%04d_%02dstep/'
ftypefpm = 'L%04d_N%04d_S%04d_%02dstep_fpm/'
mm = np.load('../data/Il... | 29.827586 | 101 | 0.601734 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 502 | 0.145087 |
b22419f7d9aaad90e17b3010a06a273060fa238e | 1,729 | py | Python | mem_py/login/forms.py | Ciuel/Proyecto-Django | a466659fa7e84e77d0692f4f3c3f8c5f541079d4 | [
"MIT"
] | null | null | null | mem_py/login/forms.py | Ciuel/Proyecto-Django | a466659fa7e84e77d0692f4f3c3f8c5f541079d4 | [
"MIT"
] | null | null | null | mem_py/login/forms.py | Ciuel/Proyecto-Django | a466659fa7e84e77d0692f4f3c3f8c5f541079d4 | [
"MIT"
] | 1 | 2021-07-17T19:41:40.000Z | 2021-07-17T19:41:40.000Z | from django import forms
from django.contrib.auth.forms import UserCreationForm,AuthenticationForm
from .models import UserProfile
# Create your forms here
class LoginForm(AuthenticationForm):
def __init__(self, request, *args, **kwargs):
super().__init__(self, request, *args, **kwargs)
self.fiel... | 39.295455 | 90 | 0.632736 | 1,572 | 0.906574 | 0 | 0 | 0 | 0 | 0 | 0 | 475 | 0.273933 |
b224af29a62a1d5910e33f4af9c4dfcede1d3b53 | 556 | py | Python | diagrams/alibabacloud/analytics.py | bry-c/diagrams | 4c377a073e0aa8fe41934195da7a0869f31c58eb | [
"MIT"
] | 17,037 | 2020-02-03T01:30:30.000Z | 2022-03-31T18:09:15.000Z | diagrams/alibabacloud/analytics.py | bry-c/diagrams | 4c377a073e0aa8fe41934195da7a0869f31c58eb | [
"MIT"
] | 529 | 2020-02-03T10:43:41.000Z | 2022-03-31T17:33:08.000Z | diagrams/alibabacloud/analytics.py | bry-c/diagrams | 4c377a073e0aa8fe41934195da7a0869f31c58eb | [
"MIT"
] | 1,068 | 2020-02-05T11:54:29.000Z | 2022-03-30T23:28:55.000Z | # This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _AlibabaCloud
class _Analytics(_AlibabaCloud):
_type = "analytics"
_icon_dir = "resources/alibabacloud/analytics"
class AnalyticDb(_Analytics):
_icon = "analytic-db.png"
class ClickHouse(_Analytics):
_icon = "click... | 17.375 | 68 | 0.726619 | 428 | 0.769784 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.397482 |
b224f08977080d30a8248e3383147fd3fad725df | 1,487 | py | Python | numpy_examples/basic_5_structured_arrays.py | stealthness/sklearn-examples | e755fd3804cc15dd28ff2a38e299e80c83565d0a | [
"BSD-3-Clause"
] | null | null | null | numpy_examples/basic_5_structured_arrays.py | stealthness/sklearn-examples | e755fd3804cc15dd28ff2a38e299e80c83565d0a | [
"BSD-3-Clause"
] | null | null | null | numpy_examples/basic_5_structured_arrays.py | stealthness/sklearn-examples | e755fd3804cc15dd28ff2a38e299e80c83565d0a | [
"BSD-3-Clause"
] | null | null | null | """
Purpose of this file is to give examples of structured arrays
This script is partially dirived from the LinkedIn learning course
https://www.linkedin.com/learning/numpy-data-science-essential-training/create-arrays-from-python-structures
"""
import numpy as np
person_data_def = [('name', 'S6'), ('height', 'f8'),... | 33.795455 | 108 | 0.718897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 972 | 0.653665 |
b225b39eea6ed7af22b6d9216dba4156c3fa8839 | 5,716 | py | Python | scripts/ebook_meta_rename.py | mcxiaoke/python-labs | 61c0a1f91008ba82fc2f5a5deb19e60aec9df960 | [
"Apache-2.0"
] | 7 | 2016-07-08T10:53:13.000Z | 2021-07-20T00:20:10.000Z | scripts/ebook_meta_rename.py | mcxiaoke/python-labs | 61c0a1f91008ba82fc2f5a5deb19e60aec9df960 | [
"Apache-2.0"
] | 1 | 2021-05-11T05:20:18.000Z | 2021-05-11T05:20:18.000Z | scripts/ebook_meta_rename.py | mcxiaoke/python-labs | 61c0a1f91008ba82fc2f5a5deb19e60aec9df960 | [
"Apache-2.0"
] | 7 | 2016-10-31T06:31:54.000Z | 2020-08-31T20:55:00.000Z | '''
File: ebook_fix.py
Created: 2021-03-06 15:46:09
Modified: 2021-03-06 15:46:14
Author: mcxiaoke ([email protected])
License: Apache License 2.0
'''
import sys
import os
from pprint import pprint
from types import new_class
from mobi import Mobi
from ebooklib import epub
import argparse
from multiprocessing.dummy i... | 31.755556 | 90 | 0.574003 | 2,636 | 0.461162 | 0 | 0 | 0 | 0 | 0 | 0 | 1,159 | 0.202764 |
b2268ed3f38975678da47248462c6f15c287a3c3 | 387 | py | Python | sources/boltun/util/collections.py | meiblorn/boltun | d141f555b4f0ed604d8d71883c0bc8811e74370e | [
"MIT"
] | 1 | 2019-12-06T04:19:37.000Z | 2019-12-06T04:19:37.000Z | sources/boltun/util/collections.py | meiblorn/boltun | d141f555b4f0ed604d8d71883c0bc8811e74370e | [
"MIT"
] | null | null | null | sources/boltun/util/collections.py | meiblorn/boltun | d141f555b4f0ed604d8d71883c0bc8811e74370e | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import attr
@attr.s
class Stack(object):
__items = attr.ib(type=list, factory=list)
def push(self, item):
self.__items.append(item)
def pop(self):
return self.__items.pop()
def peek(self):
return self.__items[... | 18.428571 | 64 | 0.648579 | 298 | 0.770026 | 0 | 0 | 306 | 0.790698 | 0 | 0 | 0 | 0 |
b22a4ac4d8d41f1f54853d90f7a7aa435b4d6a78 | 41 | py | Python | test/python/echo_hi_then_error.py | WrkMetric/Python--NodeJS | 502bb3d81152ef9a16fb618f71f9e9fc43777349 | [
"MIT",
"Unlicense"
] | 1,869 | 2015-01-07T18:06:52.000Z | 2022-03-30T08:35:39.000Z | test/python/echo_hi_then_error.py | PavanAnanthSharma/python-shell | 502bb3d81152ef9a16fb618f71f9e9fc43777349 | [
"MIT",
"Unlicense"
] | 252 | 2015-01-08T17:33:58.000Z | 2022-03-31T09:04:38.000Z | test/python/echo_hi_then_error.py | PavanAnanthSharma/python-shell | 502bb3d81152ef9a16fb618f71f9e9fc43777349 | [
"MIT",
"Unlicense"
] | 238 | 2015-03-22T11:22:30.000Z | 2022-03-15T22:01:44.000Z | print('hi')
raise Exception('fibble-fah') | 20.5 | 29 | 0.731707 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.390244 |
b22a61d2c3956ab8bd21246cdd7e1d90a774793b | 105 | py | Python | lamdata_baisal89/df_util.py | Baisal89/ds_8_lamdata | 67911b6f15ae6230a65c439a978303ac4b492075 | [
"MIT"
] | null | null | null | lamdata_baisal89/df_util.py | Baisal89/ds_8_lamdata | 67911b6f15ae6230a65c439a978303ac4b492075 | [
"MIT"
] | 1 | 2020-03-31T11:12:26.000Z | 2020-03-31T11:12:26.000Z | lamdata_baisal89/df_util.py | Baisal89/ds_8_lamdata | 67911b6f15ae6230a65c439a978303ac4b492075 | [
"MIT"
] | null | null | null | """
Utility functions for working with DataFrame
"""
import pandas
TEST_DF = pandas.DataFrame([1,2,3])
| 13.125 | 44 | 0.72381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 52 | 0.495238 |
b22aabd883c6bf5301a8cac5ec9620f3e682a650 | 2,160 | py | Python | lab05/parsePhoneNrs.py | peter201943/pjm349-CS265-winter2019 | 704ffa8fe0a51795670b6c2b40b153291846fe0b | [
"MIT"
] | null | null | null | lab05/parsePhoneNrs.py | peter201943/pjm349-CS265-winter2019 | 704ffa8fe0a51795670b6c2b40b153291846fe0b | [
"MIT"
] | null | null | null | lab05/parsePhoneNrs.py | peter201943/pjm349-CS265-winter2019 | 704ffa8fe0a51795670b6c2b40b153291846fe0b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
#Peter J. Mangelsdorf
#
# Kurt Schmidt
# 7/06
#
#
# parsePhoneNrs.py - an example of 'grouping' - extracting parts of a match
#
# Python 3.5.2
# on Linux 4.4.0-36-generic x86_64
#
# Demonstrates: regexp, re, search, groups
#
# Usage: By default, reads telNrs.txt . You may supply a different ... | 24.545455 | 77 | 0.602315 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,447 | 0.669907 |
b22ba815e08036847020bc1f981a8232bfaa3cd2 | 567 | py | Python | board/gpio.py | JonathanItakpe/realtime-office-light-dashboard | a783152bfee3e099d039c574ca1ea5635f79900d | [
"MIT"
] | 1 | 2017-09-04T14:05:59.000Z | 2017-09-04T14:05:59.000Z | board/gpio.py | JonathanItakpe/realtime-office-light-dashboard | a783152bfee3e099d039c574ca1ea5635f79900d | [
"MIT"
] | null | null | null | board/gpio.py | JonathanItakpe/realtime-office-light-dashboard | a783152bfee3e099d039c574ca1ea5635f79900d | [
"MIT"
] | null | null | null | import RPi.GPIO as gpio
from pusher import Pusher
import time
pusher = Pusher(app_id=u'394325', key=u'cc900daae41222ea463e', secret=u'02ae96830fe03a094573', cluster=u'eu')
gpio.setmode(gpio.BCM)
gpio.setup(2, gpio.OUT)
# TODO: Map each gpio pin to a room eg 2: HNG Main
while True:
gpio.output(2, gpio.OUT)
passcode ... | 27 | 109 | 0.708995 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.363316 |
b22bc88a2d140b8c45a0fbac6ce8fea46af69f26 | 1,036 | py | Python | courses/python/mflac/vuln_app/patched_admin.py | tank1st99/securitygym | 2e4fbdf8002afbe51648706906f0db2c294362a6 | [
"MIT"
] | 49 | 2021-05-20T12:49:28.000Z | 2022-03-13T11:35:03.000Z | courses/python/mflac/vuln_app/patched_admin.py | tank1st99/securitygym | 2e4fbdf8002afbe51648706906f0db2c294362a6 | [
"MIT"
] | null | null | null | courses/python/mflac/vuln_app/patched_admin.py | tank1st99/securitygym | 2e4fbdf8002afbe51648706906f0db2c294362a6 | [
"MIT"
] | 5 | 2021-05-20T12:58:34.000Z | 2021-12-05T19:08:13.000Z | import functools
from flask import Blueprint
from flask import render_template
from flask import g
from flask import redirect
from flask import url_for
from flask import flash
from mflac.vuln_app.db import get_db
bp = Blueprint("admin", __name__, url_prefix="/admin")
def admin_required(view):
@functools.wraps(... | 25.268293 | 76 | 0.697876 | 0 | 0 | 0 | 0 | 648 | 0.625483 | 0 | 0 | 170 | 0.164093 |
b22c071ff2cdd5ff5f1c6258280e4c7e042b6c35 | 3,708 | py | Python | inpainting/common/eval_test.py | yuyay/ASNG-NAS | 6b908dd25e49471e454d3c2b1e93638af2bd8ecc | [
"MIT"
] | 96 | 2019-05-22T19:04:39.000Z | 2021-12-21T07:50:51.000Z | inpainting/common/eval_test.py | pawopawo/ASNG-NAS | a13c4828cfa9acc1eebd598dc1f88ee18e152159 | [
"MIT"
] | 3 | 2019-11-11T02:13:24.000Z | 2019-11-28T13:25:40.000Z | inpainting/common/eval_test.py | pawopawo/ASNG-NAS | a13c4828cfa9acc1eebd598dc1f88ee18e152159 | [
"MIT"
] | 14 | 2019-05-24T07:50:15.000Z | 2021-07-25T14:16:18.000Z | import os
import pandas as pd
import torch
from torch import nn
import common.utils as util
import scipy.misc as spmi
def save_img(img_np, file_name, out_dir='./'):
if not os.path.exists(out_dir):
os.makedirs(out_dir)
image = img_np.copy().transpose(1, 2, 0)
# for gray image
if img_np.shape[... | 43.623529 | 128 | 0.562567 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 475 | 0.128101 |
b22daaab8d4ecd141b8b7df40454e33e53d6bbdf | 10,218 | py | Python | connectivity/connectivity.py | vagechirkov/NI-project | fa0687d81ffad9b2e3737fe9115a151335bda358 | [
"MIT"
] | 1 | 2021-06-01T08:06:15.000Z | 2021-06-01T08:06:15.000Z | connectivity/connectivity.py | vagechirkov/NI-project | fa0687d81ffad9b2e3737fe9115a151335bda358 | [
"MIT"
] | null | null | null | connectivity/connectivity.py | vagechirkov/NI-project | fa0687d81ffad9b2e3737fe9115a151335bda358 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import networkx as nx
from nxviz import CircosPlot
from neurolib.utils import atlases
# https://doi.org/10.1016/j.neuroimage.2015.07.075 Table 2
# number corresponds to AAL2 labels indices
CORTICAL_REGIONS = {
'central_region': [1, 2, 61, 62, 13, 14],
'fron... | 33.501639 | 78 | 0.592582 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,029 | 0.296438 |
b22e2d62e71b8fbbd1c5658b31e4eb4e56a96389 | 140 | py | Python | secao5/exercicio6.py | robinson-1985/exercicios_python_geek_university | 6dfc740472de9ff7c029e26a2ba8f51080e3860b | [
"MIT"
] | null | null | null | secao5/exercicio6.py | robinson-1985/exercicios_python_geek_university | 6dfc740472de9ff7c029e26a2ba8f51080e3860b | [
"MIT"
] | null | null | null | secao5/exercicio6.py | robinson-1985/exercicios_python_geek_university | 6dfc740472de9ff7c029e26a2ba8f51080e3860b | [
"MIT"
] | null | null | null | '''6. Escreva um programa que, dados dois números inteiros, mostre na tela o maior deles,
assim como a diferença existente entre ambos.'''
| 35 | 89 | 0.757143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 0.985915 |
b22e6d6bc215d8e3aa72605534263f2c5a57156d | 1,694 | py | Python | src/conf.py | RJTK/dwglasso_cweeds | eaaa9cd3b3b4f0120f6d9061b585ec46f0678740 | [
"MIT"
] | null | null | null | src/conf.py | RJTK/dwglasso_cweeds | eaaa9cd3b3b4f0120f6d9061b585ec46f0678740 | [
"MIT"
] | null | null | null | src/conf.py | RJTK/dwglasso_cweeds | eaaa9cd3b3b4f0120f6d9061b585ec46f0678740 | [
"MIT"
] | null | null | null | '''
This is the config file for the code in src/. Essentially it
holds things like file and variable names.
'''
# The folder locations of the below files are specified by the
# cookie cutter data science format and are hardcoded into the code.
# I'm not entirely sure that that was the best way to go about it,
# but t... | 30.25 | 68 | 0.756198 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,159 | 0.684179 |
b22e87213200baf4d5c3c89eb335262571cc546e | 1,486 | py | Python | HackerEarth/Python/BasicProgramming/InputOutput/BasicsOfInputOutput/MinimizeCost.py | cychitivav/programming_exercises | e8e7ddb4ec4eea52ee0d3826a144c7dc97195e78 | [
"MIT"
] | null | null | null | HackerEarth/Python/BasicProgramming/InputOutput/BasicsOfInputOutput/MinimizeCost.py | cychitivav/programming_exercises | e8e7ddb4ec4eea52ee0d3826a144c7dc97195e78 | [
"MIT"
] | null | null | null | HackerEarth/Python/BasicProgramming/InputOutput/BasicsOfInputOutput/MinimizeCost.py | cychitivav/programming_exercises | e8e7ddb4ec4eea52ee0d3826a144c7dc97195e78 | [
"MIT"
] | null | null | null | #!/Usr/bin/env python
"""
You are given an array of numbers Ai which contains positive as well as negative numbers . The cost of the array can be defined as C(X)
C(x) = |A1 + T1| + |A2 + T2| + ... + |An + Tn|, where T is the transfer array which contains N zeros initially.
You need to minimize this cost. You ca... | 31.617021 | 362 | 0.691117 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,389 | 0.929719 |
b23021f02a20519683a1417ea552146f63c73f1a | 2,002 | py | Python | pava/implementation/natives/java/net/TwoStacksPlainSocketImpl.py | laffra/pava | 54d10cf7f8def2f96e254c0356623d08f221536f | [
"MIT"
] | 4 | 2017-03-30T16:51:16.000Z | 2020-10-05T12:25:47.000Z | pava/implementation/natives/java/net/TwoStacksPlainSocketImpl.py | laffra/pava | 54d10cf7f8def2f96e254c0356623d08f221536f | [
"MIT"
] | null | null | null | pava/implementation/natives/java/net/TwoStacksPlainSocketImpl.py | laffra/pava | 54d10cf7f8def2f96e254c0356623d08f221536f | [
"MIT"
] | null | null | null | def add_native_methods(clazz):
def initProto____():
raise NotImplementedError()
def socketCreate__boolean__(a0, a1):
raise NotImplementedError()
def socketConnect__java_net_InetAddress__int__int__(a0, a1, a2, a3):
raise NotImplementedError()
def socketBind__java_net_InetAddres... | 39.254902 | 123 | 0.793207 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b231777aaaf136ffab975467c0c084dcecffc14f | 973 | py | Python | ansible/utils/check_droplet.py | louis-pre/NewsBlur | b4e9a56041ff187ef77b38dfd0778daf41b53f4f | [
"MIT"
] | 3,073 | 2015-01-01T07:20:18.000Z | 2022-03-31T20:33:41.000Z | ansible/utils/check_droplet.py | louis-pre/NewsBlur | b4e9a56041ff187ef77b38dfd0778daf41b53f4f | [
"MIT"
] | 1,054 | 2015-01-02T13:32:35.000Z | 2022-03-30T04:21:21.000Z | ansible/utils/check_droplet.py | louis-pre/NewsBlur | b4e9a56041ff187ef77b38dfd0778daf41b53f4f | [
"MIT"
] | 676 | 2015-01-03T16:40:29.000Z | 2022-03-30T14:00:40.000Z | import sys
import time
import digitalocean
import subprocess
def test_ssh(drop):
droplet_ip_address = drop.ip_address
result = subprocess.call(f"ssh -o StrictHostKeyChecking=no root@{droplet_ip_address} ls", shell=True)
if result == 0:
return True
return False
TOKEN_FILE = "/srv/secrets-newsbl... | 27.027778 | 105 | 0.697842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 254 | 0.261048 |