hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
39ec9a70f64ddc65a70eb731b8421b2083d1e79f | 410 | py | Python | src/aerocloud/packages.py | Aerometrex/aerocloud-python-client | 0bd15432bb0f81fc5e9ca03c48b9b15c8e8ed438 | [
"MIT"
] | null | null | null | src/aerocloud/packages.py | Aerometrex/aerocloud-python-client | 0bd15432bb0f81fc5e9ca03c48b9b15c8e8ed438 | [
"MIT"
] | null | null | null | src/aerocloud/packages.py | Aerometrex/aerocloud-python-client | 0bd15432bb0f81fc5e9ca03c48b9b15c8e8ed438 | [
"MIT"
] | null | null | null | import os
from enum import Enum
class AppPackage(Enum):
# Add packages here as required.
LASTOOLS = "lastools"
def getPackageDirectory(package: AppPackage, version: str = None):
"Gets the directory where the specified package is installed."
varName = f'AZ_BATCH_APP_PACKAGE_{package.value}'
if ... | 21.578947 | 66 | 0.702439 | 86 | 0.209756 | 0 | 0 | 0 | 0 | 0 | 0 | 165 | 0.402439 |
39ef2ca7f17378b96bb6865f18c59fdf8633759c | 680 | py | Python | src/nodeforge/StartEngine.py | nsk89/nodeforge | 51e798092cfaf52112cfdc96af359633741da799 | [
"BSD-3-Clause"
] | null | null | null | src/nodeforge/StartEngine.py | nsk89/nodeforge | 51e798092cfaf52112cfdc96af359633741da799 | [
"BSD-3-Clause"
] | 1 | 2018-10-21T05:30:32.000Z | 2018-10-31T05:53:18.000Z | src/nodeforge/StartEngine.py | nsk89/nodeforge | 51e798092cfaf52112cfdc96af359633741da799 | [
"BSD-3-Clause"
] | 2 | 2018-10-31T05:56:34.000Z | 2018-10-31T05:57:36.000Z | """
This file should be imported at the bottom of configure.py
TODO:
All of this may be moved into a single function in the future
so people can choose a reactor in configure.py
"""
from twisted.internet import reactor
from twisted.internet.task import LoopingCall
from threading import currentThread, Thread... | 29.565217 | 68 | 0.744118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 330 | 0.485294 |
39ef5804d073f8e1a8698f5b8f98bbb0a09926ef | 7,170 | py | Python | src/asit.py | 6H057WH1P3/Asit | 4dce80e3c4c05c4f56563110c59bae55e61aeaae | [
"MIT"
] | null | null | null | src/asit.py | 6H057WH1P3/Asit | 4dce80e3c4c05c4f56563110c59bae55e61aeaae | [
"MIT"
] | 3 | 2015-09-16T17:54:13.000Z | 2015-09-18T06:54:33.000Z | src/asit.py | 6H057WH1P3/Asit | 4dce80e3c4c05c4f56563110c59bae55e61aeaae | [
"MIT"
] | null | null | null |
import random
import time
import requests
class Account:
# C'tor
def __init__(self, language, world, user, password, ability):
# def standard class variables
self.cookie = ""
self.language = language
self.world = world
self.user = user
self.password = password
... | 39.61326 | 155 | 0.565969 | 7,122 | 0.993305 | 0 | 0 | 0 | 0 | 0 | 0 | 2,033 | 0.283543 |
39f17c6cf9e734ea907636289c61a9999dc0de12 | 251 | py | Python | src/core/views.py | Ao99/django-boilerplate | 7fa8078b67655698a4070ce58c10d2226fe1d59b | [
"MIT"
] | null | null | null | src/core/views.py | Ao99/django-boilerplate | 7fa8078b67655698a4070ce58c10d2226fe1d59b | [
"MIT"
] | null | null | null | src/core/views.py | Ao99/django-boilerplate | 7fa8078b67655698a4070ce58c10d2226fe1d59b | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.views import View
# Create your views here.
class CoreView(View):
template_name = 'core/home.html'
def get(self, request, *args, **kwargs):
return render(request, self.template_name, {}) | 31.375 | 54 | 0.717131 | 158 | 0.629482 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.163347 |
39f26329f53e08a2340c221abdf702988c619417 | 12,075 | py | Python | hashvis.py | boredzo/hashvis | 74a017c7fa9b6d48e43172ffd15fc19ccfb060e1 | [
"BSD-3-Clause"
] | 15 | 2015-12-02T14:26:52.000Z | 2018-01-21T15:18:59.000Z | hashvis.py | boredzo/hashvis | 74a017c7fa9b6d48e43172ffd15fc19ccfb060e1 | [
"BSD-3-Clause"
] | 10 | 2015-12-04T06:00:42.000Z | 2016-07-09T21:40:53.000Z | hashvis.py | boredzo/hashvis | 74a017c7fa9b6d48e43172ffd15fc19ccfb060e1 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""hashvis by Peter Hosey
Reads from standard input or files, and prints what it reads, along with colorized versions of any hashes or signatures found in each line.
The goal here is visual comparability. You should be able to tell whether two hashes are the same at a glance... | 46.087786 | 319 | 0.729441 | 0 | 0 | 2,100 | 0.173769 | 0 | 0 | 0 | 0 | 5,839 | 0.483161 |
39f2718894e3565b21d9ad13de2638c2e9273b26 | 270 | py | Python | euler_7_nth_prime.py | igorakkerman/euler-challenge | 1fdedce439520fc31a2e5fb66abe23b6f99f04db | [
"MIT"
] | null | null | null | euler_7_nth_prime.py | igorakkerman/euler-challenge | 1fdedce439520fc31a2e5fb66abe23b6f99f04db | [
"MIT"
] | null | null | null | euler_7_nth_prime.py | igorakkerman/euler-challenge | 1fdedce439520fc31a2e5fb66abe23b6f99f04db | [
"MIT"
] | null | null | null | # https://projecteuler.net/problem=7
import math
def sieve(xmax):
p = {i for i in range(2, xmax + 1)}
for i in range(2, xmax):
r = {j * i for j in range(2, int(xmax / i) + 1)}
p -= r
return sorted(p)
print(sum(sieve(2000000)))
| 20.769231 | 57 | 0.533333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.137037 |
39f3a173967eb82662e3417309654bea4d1eda7a | 3,066 | py | Python | docker/ubuntu/16-04/ub_limonero/migrations/versions/32053847c4db_add_new_types.py | eubr-atmosphere/jenkins | a9065584d810238c6fa101d92d12c131d1d317cb | [
"Apache-2.0"
] | null | null | null | docker/ubuntu/16-04/ub_limonero/migrations/versions/32053847c4db_add_new_types.py | eubr-atmosphere/jenkins | a9065584d810238c6fa101d92d12c131d1d317cb | [
"Apache-2.0"
] | null | null | null | docker/ubuntu/16-04/ub_limonero/migrations/versions/32053847c4db_add_new_types.py | eubr-atmosphere/jenkins | a9065584d810238c6fa101d92d12c131d1d317cb | [
"Apache-2.0"
] | null | null | null | """Add new types
Revision ID: 32053847c4db
Revises: 05a62958a9cc
Create Date: 2019-06-11 10:36:14.456629
"""
from alembic import context
from sqlalchemy.orm import sessionmaker
# revision identifiers, used by Alembic.
revision = '32053847c4db'
down_revision = '05a62958a9cc'
branch_labels = None
depends_on = None
a... | 32.967742 | 80 | 0.599152 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,756 | 0.572733 |
39f4f90e9b80ade83346acbec06fcedbaeda8cb3 | 88 | py | Python | advanced_tools/__init__.py | kvdogan/advanced_tools | 7e93232374980d83fda8051496a190188c11fe0d | [
"MIT"
] | null | null | null | advanced_tools/__init__.py | kvdogan/advanced_tools | 7e93232374980d83fda8051496a190188c11fe0d | [
"MIT"
] | null | null | null | advanced_tools/__init__.py | kvdogan/advanced_tools | 7e93232374980d83fda8051496a190188c11fe0d | [
"MIT"
] | null | null | null | from advanced_tools.IO_path_utils import *
from advanced_tools.algorithm_utils import *
| 29.333333 | 44 | 0.863636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
39f5a45cf3414a12f90b8d040d893593304736d0 | 2,836 | py | Python | sets-master/sets-master/sets/utility.py | FedericoMolinaChavez/tesis-research | d77cc621d452c9ecf48d9ac80349b41aeb842412 | [
"MIT"
] | null | null | null | sets-master/sets-master/sets/utility.py | FedericoMolinaChavez/tesis-research | d77cc621d452c9ecf48d9ac80349b41aeb842412 | [
"MIT"
] | 4 | 2021-03-09T20:33:57.000Z | 2022-02-18T12:56:32.000Z | sets-master/sets-master/sets/utility.py | FedericoMolinaChavez/tesis-research | d77cc621d452c9ecf48d9ac80349b41aeb842412 | [
"MIT"
] | null | null | null | import os
import pickle
import functools
import errno
import shutil
from urllib.request import urlopen
#import definitions
def read_config(schema='data/schema.yaml', name='sets'):
filename = '.{}rc'.format(name)
paths = [
os.path.join(os.curdir, filename),
os.path.expanduser(os.path... | 35.012346 | 80 | 0.619182 | 0 | 0 | 0 | 0 | 679 | 0.239422 | 0 | 0 | 765 | 0.269746 |
f2cdba45917fad7ff9ab33f608fa9dbb603aec4b | 1,984 | py | Python | src/test_fps.py | pjenpoomjai/tfpose-herokuNEW | 7d1085a3fcb02c0f6d16ed7f2cf1ad8daff103ea | [
"Apache-2.0"
] | null | null | null | src/test_fps.py | pjenpoomjai/tfpose-herokuNEW | 7d1085a3fcb02c0f6d16ed7f2cf1ad8daff103ea | [
"Apache-2.0"
] | null | null | null | src/test_fps.py | pjenpoomjai/tfpose-herokuNEW | 7d1085a3fcb02c0f6d16ed7f2cf1ad8daff103ea | [
"Apache-2.0"
] | null | null | null | import cv2
import time
import numpy as np
import imutils
camera= 0
cam = cv2.VideoCapture(camera)
fgbg = cv2.createBackgroundSubtractorMOG2(history=1000,varThreshold=0,detectShadows=False)
width=600
height=480
fps_time = 0
while True:
ret_val,image = cam.read()
image = cv2.resize(image,(width,height))
imag... | 28.342857 | 90 | 0.579133 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 640 | 0.322581 |
f2ce254695f631034aa335be9147cb99e06d1cfc | 999 | py | Python | Python/367.ValidPerfectSquare.py | nizD/LeetCode-Solutions | 7f4ca37bab795e0d6f9bfd9148a8fe3b62aa5349 | [
"MIT"
] | 263 | 2020-10-05T18:47:29.000Z | 2022-03-31T19:44:46.000Z | Python/367.ValidPerfectSquare.py | nizD/LeetCode-Solutions | 7f4ca37bab795e0d6f9bfd9148a8fe3b62aa5349 | [
"MIT"
] | 1,264 | 2020-10-05T18:13:05.000Z | 2022-03-31T23:16:35.000Z | Python/367.ValidPerfectSquare.py | nizD/LeetCode-Solutions | 7f4ca37bab795e0d6f9bfd9148a8fe3b62aa5349 | [
"MIT"
] | 760 | 2020-10-05T18:22:51.000Z | 2022-03-29T06:06:20.000Z | #Given a positive integer num, write a function which returns True if num is a perfect square else False.
class Solution(object):
def isPerfectSquare(self, num):
low=0
high=num
#Starting from zero till the number we need to check for perfect square
while(low<=high):
#Calu... | 47.571429 | 140 | 0.617618 | 884 | 0.884885 | 0 | 0 | 0 | 0 | 0 | 0 | 588 | 0.588589 |
f2d302744caca38acace037f6391b1ffee2c8630 | 1,432 | py | Python | src/minescrubber/controller.py | alok1974/minescrubber | 0c18d960b385a4a59ac0cf38bc69271a23c667e7 | [
"MIT"
] | 1 | 2020-08-11T23:08:34.000Z | 2020-08-11T23:08:34.000Z | src/minescrubber/controller.py | alok1974/minescrubber | 0c18d960b385a4a59ac0cf38bc69271a23c667e7 | [
"MIT"
] | null | null | null | src/minescrubber/controller.py | alok1974/minescrubber | 0c18d960b385a4a59ac0cf38bc69271a23c667e7 | [
"MIT"
] | null | null | null | from minescrubber_core import abstract
from . import mainwindow
class UI(abstract.UI):
def __init__(self):
self.main_window = mainwindow.MainWidget()
def init_board(self, board):
self.main_window.init_board(board)
def refresh(self, board, init_image=True):
self.main_window.refr... | 22.730159 | 68 | 0.670391 | 1,285 | 0.897346 | 0 | 0 | 350 | 0.244413 | 0 | 0 | 9 | 0.006285 |
f2d339d173f754cc9a0dd3025640fbb292c58b5b | 36 | py | Python | CADRE/power_dymos/__init__.py | johnjasa/CADRE | a4ffd61582b8474953fc309aa540838a14f29dcf | [
"Apache-2.0"
] | null | null | null | CADRE/power_dymos/__init__.py | johnjasa/CADRE | a4ffd61582b8474953fc309aa540838a14f29dcf | [
"Apache-2.0"
] | null | null | null | CADRE/power_dymos/__init__.py | johnjasa/CADRE | a4ffd61582b8474953fc309aa540838a14f29dcf | [
"Apache-2.0"
] | null | null | null | from .power_group import PowerGroup
| 18 | 35 | 0.861111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f2d47c8b76e7230c4405127adcd43ba0cfb587fd | 2,386 | py | Python | client/elementtype.py | Schille/weimar-graphstore | 76b47f98fba419ec6290628b56a202c60d8f2d46 | [
"MIT"
] | 2 | 2016-08-27T04:51:01.000Z | 2020-09-05T01:34:41.000Z | client/elementtype.py | Schille/weimar-graphstore | 76b47f98fba419ec6290628b56a202c60d8f2d46 | [
"MIT"
] | null | null | null | client/elementtype.py | Schille/weimar-graphstore | 76b47f98fba419ec6290628b56a202c60d8f2d46 | [
"MIT"
] | null | null | null | """
.. module:: elementtype.py
:platform: Linux
.. moduleauthor:: Michael Schilonka <michael@schilonka.de>
"""
import logging
class ElementType(object):
'''
The ElementType class is an in-memory representation of a graph element
type. It provides some functions to operate on all entities of the sam... | 24.854167 | 82 | 0.60855 | 2,229 | 0.934199 | 0 | 0 | 0 | 0 | 0 | 0 | 1,095 | 0.458927 |
f2d4d9817772d3d480a3be486cdd4fa4ac3b04f2 | 672 | py | Python | src/OTLMOW/OTLModel/Classes/Infiltratievoorziening.py | davidvlaminck/OTLClassPython | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | 2 | 2022-02-01T08:58:11.000Z | 2022-02-08T13:35:17.000Z | src/OTLMOW/OTLModel/Classes/Infiltratievoorziening.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | src/OTLMOW/OTLModel/Classes/Infiltratievoorziening.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | # coding=utf-8
from OTLMOW.OTLModel.Classes.Put import Put
from OTLMOW.OTLModel.Classes.PutRelatie import PutRelatie
from OTLMOW.GeometrieArtefact.VlakGeometrie import VlakGeometrie
# Generated with OTLClassCreator. To modify: extend, do not edit
class Infiltratievoorziening(Put, PutRelatie, VlakGeometrie):
"""Vo... | 37.333333 | 93 | 0.763393 | 422 | 0.627976 | 0 | 0 | 0 | 0 | 0 | 0 | 290 | 0.431548 |
f2d563db44644c1403a6f057432f77eaa66bdff6 | 1,517 | py | Python | Chapter04/chapter4.py | Kushalshingote/Hands-On-Generative-Adversarial-Networks-with-Keras | fccada4810ba1fe8b79c5a74420a590c95623b52 | [
"MIT"
] | 76 | 2019-05-27T23:38:53.000Z | 2021-12-19T00:31:13.000Z | Chapter04/chapter4.py | Kushalshingote/Hands-On-Generative-Adversarial-Networks-with-Keras | fccada4810ba1fe8b79c5a74420a590c95623b52 | [
"MIT"
] | 9 | 2019-05-29T21:01:32.000Z | 2020-07-30T12:00:02.000Z | Chapter04/chapter4.py | Kushalshingote/Hands-On-Generative-Adversarial-Networks-with-Keras | fccada4810ba1fe8b79c5a74420a590c95623b52 | [
"MIT"
] | 35 | 2019-05-12T04:20:54.000Z | 2022-03-03T19:46:06.000Z | # get the training data D, sample the Generator with random z to produce r
N = X_train
z = np.random.uniform(-1, 1, (1, z_dim))
r = G.predict_on_batch(z)
# define our distance measure S to be L1
S = lambda n, r: np.sum(np.abs(n - r))
# compute the distances between the reference and the samples in N using the... | 35.27907 | 87 | 0.712591 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 384 | 0.253131 |
f2d5d419d88204df9613b1050b9f75f4f36ef80c | 20,923 | py | Python | naspi/naspi.py | fgiroult321/simple-nas-pi | 6d1a13523f1f20ebe26f780c758a3ff15be899ff | [
"MIT"
] | null | null | null | naspi/naspi.py | fgiroult321/simple-nas-pi | 6d1a13523f1f20ebe26f780c758a3ff15be899ff | [
"MIT"
] | null | null | null | naspi/naspi.py | fgiroult321/simple-nas-pi | 6d1a13523f1f20ebe26f780c758a3ff15be899ff | [
"MIT"
] | null | null | null | import os
import boto3
# import subprocess
from subprocess import Popen, PIPE
from time import sleep
import json
import ast
from datetime import datetime, time, timedelta, date
import logging
import logging.handlers
import sys, getopt
import glob
import shutil
logger = logging.getLogger()
logger.setLevel(logging.INFO)... | 38.461397 | 164 | 0.633322 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,617 | 0.316255 |
f2d7e6c6a86e1314f1b2716ac6227b1dc354be91 | 14,328 | py | Python | fawkes/differentiator_lowkey.py | biergaiqiao/Oriole-Thwarting-Privacy-against-Trustworthy-Deep-Learning-Models | ffadb82b666e8c1561a036a10d9922db8a3266cc | [
"MIT"
] | 1 | 2021-05-18T01:14:44.000Z | 2021-05-18T01:14:44.000Z | fawkes/differentiator_lowkey.py | biergaiqiao/Oriole-Thwarting-Privacy-against-Trustworthy-Deep-Learning-Models | ffadb82b666e8c1561a036a10d9922db8a3266cc | [
"MIT"
] | null | null | null | fawkes/differentiator_lowkey.py | biergaiqiao/Oriole-Thwarting-Privacy-against-Trustworthy-Deep-Learning-Models | ffadb82b666e8c1561a036a10d9922db8a3266cc | [
"MIT"
] | 1 | 2021-05-18T01:14:47.000Z | 2021-05-18T01:14:47.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2020-10-21
# @Author : Emily Wenger (ewenger@uchicago.edu)
import time
import numpy as np
import tensorflow as tf
import tensorflow_addons as tfa
from keras.utils import Progbar
class FawkesMaskGeneration:
# if the attack is trying to mimic a target im... | 44.775 | 135 | 0.620254 | 14,085 | 0.98304 | 0 | 0 | 297 | 0.020729 | 0 | 0 | 3,188 | 0.222501 |
f2d93f0a50f1963382d3895bbaf47dcf3e2de6e0 | 1,124 | py | Python | routes/class_incoming.py | fingerecho/proms-4.0 | 6c3a1fd62c9394761664e100fc1dde50fd79dc11 | [
"CC-BY-4.0"
] | 2 | 2019-11-23T03:56:28.000Z | 2019-12-03T15:48:34.000Z | routes/class_incoming.py | fingerecho/proms-4.0 | 6c3a1fd62c9394761664e100fc1dde50fd79dc11 | [
"CC-BY-4.0"
] | null | null | null | routes/class_incoming.py | fingerecho/proms-4.0 | 6c3a1fd62c9394761664e100fc1dde50fd79dc11 | [
"CC-BY-4.0"
] | 3 | 2019-04-12T18:09:35.000Z | 2020-03-14T14:38:45.000Z | from abc import ABCMeta, abstractmethod
import database
from . import w_l
class IncomingClass(metaclass=ABCMeta):
@abstractmethod
def __init__(self, request):
self.request = request
self.graph = None
self.uri = None
self.named_graph_uri = None
self.error_messages = None... | 29.578947 | 120 | 0.615658 | 1,047 | 0.931495 | 0 | 0 | 306 | 0.272242 | 0 | 0 | 219 | 0.19484 |
f2da20f8cd9ede45ff2e1e9791b316945d38036c | 418 | py | Python | openwater/utils/decorator.py | jeradM/openwater | 740b7e76622a1ee909b970d9e5c612a840466cec | [
"MIT"
] | null | null | null | openwater/utils/decorator.py | jeradM/openwater | 740b7e76622a1ee909b970d9e5c612a840466cec | [
"MIT"
] | null | null | null | openwater/utils/decorator.py | jeradM/openwater | 740b7e76622a1ee909b970d9e5c612a840466cec | [
"MIT"
] | null | null | null | from typing import Callable
def blocking(func: Callable):
setattr(func, "_ow_blocking", True)
return func
def is_blocking(func: Callable):
return getattr(func, "_ow_blocking", False) is True
def nonblocking(func: Callable) -> Callable:
setattr(func, "_ow_nonblocking", True)
return func
def i... | 20.9 | 58 | 0.717703 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.148325 |
f2db2b20dcde6fe54280e2d0105ffc23c0015da0 | 404 | py | Python | setup.py | TDGerve/ramCOH | 328f27891906e7207344fb3c5a685648a0924dd2 | [
"MIT"
] | 2 | 2022-03-08T12:30:55.000Z | 2022-03-29T19:46:59.000Z | setup.py | TDGerve/ramCOH | 328f27891906e7207344fb3c5a685648a0924dd2 | [
"MIT"
] | null | null | null | setup.py | TDGerve/ramCOH | 328f27891906e7207344fb3c5a685648a0924dd2 | [
"MIT"
] | null | null | null | import setuptools
setuptools.setup(
name= 'ramCOH',
version= '0.1',
description= '...',
author= 'Thomas van Gerve',
packages= setuptools.find_packages(
exclude= ['examples']
),
# package_dir= {'' : 'petroPy'},
package_data= {'ramCOH': ['static/*']},
install_requi... | 17.565217 | 44 | 0.534653 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 137 | 0.339109 |
f2dd43c40f9fe338eecf074d6dac1c0de992c516 | 798 | py | Python | chess.py | jrj92280/python-eve-backend | c0566cdef5e5c75e2b75e59bde804e0d4ce407e3 | [
"MIT"
] | null | null | null | chess.py | jrj92280/python-eve-backend | c0566cdef5e5c75e2b75e59bde804e0d4ce407e3 | [
"MIT"
] | null | null | null | chess.py | jrj92280/python-eve-backend | c0566cdef5e5c75e2b75e59bde804e0d4ce407e3 | [
"MIT"
] | null | null | null | from chess_game._board import make_board
from chess_game.chess_game import ChessGame
from chess_game.play_game import get_user_input, game_event_loop
if __name__ == "__main__":
game_board = make_board()
# pawn = Pawn('x', 'y', None, None, None)
# pawn.move()
print('Chess')
print(' : Rules')
pr... | 33.25 | 76 | 0.639098 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 312 | 0.390977 |
f2dda34548b86bf17367a72a0ef32f5325649770 | 576 | py | Python | python/binary_tree/104.maximum-depth-of-binary-tree.py | Nobodylesszb/LeetCode | 0e902f6bff4834a93ce64cf9c57fd64297e63523 | [
"MIT"
] | null | null | null | python/binary_tree/104.maximum-depth-of-binary-tree.py | Nobodylesszb/LeetCode | 0e902f6bff4834a93ce64cf9c57fd64297e63523 | [
"MIT"
] | null | null | null | python/binary_tree/104.maximum-depth-of-binary-tree.py | Nobodylesszb/LeetCode | 0e902f6bff4834a93ce64cf9c57fd64297e63523 | [
"MIT"
] | null | null | null | """
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
Note: A leaf is a node with no children.
Example:
Given binary tree [3,9,20,null,null,15,7],
3
/ \
9 20
/ \
15 7
return its depth =... | 20.571429 | 114 | 0.625 | 226 | 0.392361 | 0 | 0 | 0 | 0 | 0 | 0 | 327 | 0.567708 |
f2de6356f341ba86e79ed1873bc9d766068dfedf | 1,589 | py | Python | strstr/3-2.py | stonemary/lintcode_solutions | f41fd0e56fb88ab54d0ab624977bff1623a6d33a | [
"Apache-2.0"
] | null | null | null | strstr/3-2.py | stonemary/lintcode_solutions | f41fd0e56fb88ab54d0ab624977bff1623a6d33a | [
"Apache-2.0"
] | null | null | null | strstr/3-2.py | stonemary/lintcode_solutions | f41fd0e56fb88ab54d0ab624977bff1623a6d33a | [
"Apache-2.0"
] | null | null | null | # time 15 mins
# used time 15 mins
# time 15 mins
# used time 15 mins
# this is actually a correct solution
# the code i submitted a day ago, which passed lintcode, is actually wrong after i looked KMP up
# the previous version does not take care of the situations where the target contains repeatitive elements
class... | 34.543478 | 118 | 0.570799 | 1,273 | 0.801133 | 0 | 0 | 0 | 0 | 0 | 0 | 328 | 0.206419 |
f2e1fc7cc5cf4031b844d0facd03421c1cb64cd2 | 15,633 | py | Python | ProyectoFinal.py | T0N1R/Recommendation-System-python-neo4J | 09dd1bbefa7e436a1aeedf9ccc9160719ec3a353 | [
"MIT"
] | null | null | null | ProyectoFinal.py | T0N1R/Recommendation-System-python-neo4J | 09dd1bbefa7e436a1aeedf9ccc9160719ec3a353 | [
"MIT"
] | null | null | null | ProyectoFinal.py | T0N1R/Recommendation-System-python-neo4J | 09dd1bbefa7e436a1aeedf9ccc9160719ec3a353 | [
"MIT"
] | null | null | null | # -*- coding: cp1252 -*-
# -*- coding: utf-8 -*-
"""
Algoritmos y Estructuras de Datos
Proyecto Final
Antonio Reyes #17273
Esteban Cabrera #17781
Miguel #17102
"""
import random
import xlrd
file_location = "C:/Users/Antonio/Desktop/Recommendation-System-python-neo4J-master/Database.xlsx"
workbook = xlrd.ope... | 30.414397 | 147 | 0.515832 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,070 | 0.324107 |
f2e37e6fb52ee6d2e740ecb159b5517384b2a2c4 | 324 | py | Python | www/async_flask/__init__.py | StarAhri/flask | facd476065c945f3467d4bfd7bc4ca910cc27d74 | [
"BSD-3-Clause"
] | null | null | null | www/async_flask/__init__.py | StarAhri/flask | facd476065c945f3467d4bfd7bc4ca910cc27d74 | [
"BSD-3-Clause"
] | null | null | null | www/async_flask/__init__.py | StarAhri/flask | facd476065c945f3467d4bfd7bc4ca910cc27d74 | [
"BSD-3-Clause"
] | null | null | null |
from flask import Flask
import time
from _thread import get_ident
app=Flask(__name__)
@app.route("/")
def hello_world():
time.sleep(20)
return "hello world!"+str(get_ident())
@app.route("/index")
def hello():
time.sleep(1)
return "Hello"+str(get_ident())
if __name__=="__main__":
app.run(port=6... | 17.052632 | 42 | 0.675926 | 0 | 0 | 0 | 0 | 183 | 0.564815 | 0 | 0 | 42 | 0.12963 |
f2e440f4b6da4c3dc8c1545aee15d9066fc4d3f5 | 724 | py | Python | codility-python/util/test_strings.py | mforoni/codility | be5005e96612dd7bb33b88bb76a590d28084b032 | [
"MIT"
] | null | null | null | codility-python/util/test_strings.py | mforoni/codility | be5005e96612dd7bb33b88bb76a590d28084b032 | [
"MIT"
] | null | null | null | codility-python/util/test_strings.py | mforoni/codility | be5005e96612dd7bb33b88bb76a590d28084b032 | [
"MIT"
] | null | null | null | import unittest
import util.strings as strings
class TestStrings(unittest.TestCase):
def test_first_index_of(self):
self.assertEqual(1, strings.first_index_of('1', "0103003004"))
self.assertEqual(20, strings.first_index_of('f', "post this text on a form"))
def test_last_index_of(self):
... | 31.478261 | 97 | 0.686464 | 624 | 0.861878 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.212707 |
f2e49a7f41a62f84a3de746b66ce03eb20e0b955 | 1,395 | py | Python | ipython/data/parseSource/input.py | cainja/RMG-Py | f9ad0f4244e476a28768c8a4a37410ad55bcd556 | [
"MIT"
] | 1 | 2020-01-14T09:12:22.000Z | 2020-01-14T09:12:22.000Z | ipython/data/parseSource/input.py | speth/RMG-Py | 1d2c2b684580396e984459d9347628a5ceb80e2e | [
"MIT"
] | 72 | 2016-06-06T18:18:49.000Z | 2019-11-17T03:21:10.000Z | ipython/data/parseSource/input.py | speth/RMG-Py | 1d2c2b684580396e984459d9347628a5ceb80e2e | [
"MIT"
] | 3 | 2017-09-22T15:47:37.000Z | 2021-12-30T23:51:47.000Z | # Data sources
database(
thermoLibraries = ['primaryThermoLibrary'],
reactionLibraries = [('C3', False)],
seedMechanisms = ['GRI-Mech3.0'],
kineticsDepositories = ['training'],
kineticsFamilies = 'default',
kineticsEstimator = 'rate rules',
)
# List of species
species(
label='ethane',
r... | 19.375 | 47 | 0.632258 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 283 | 0.202867 |
f2e593a65e27e8bb4c6dbcd20c5d00538ad0aa1c | 438 | py | Python | simbench/__init__.py | BaraaUniKassel/simbench | eca679bbef2b7c61d4a42dd9d9716ad969ff6f77 | [
"BSD-3-Clause"
] | null | null | null | simbench/__init__.py | BaraaUniKassel/simbench | eca679bbef2b7c61d4a42dd9d9716ad969ff6f77 | [
"BSD-3-Clause"
] | null | null | null | simbench/__init__.py | BaraaUniKassel/simbench | eca679bbef2b7c61d4a42dd9d9716ad969ff6f77 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2019-2021 by University of Kassel, Tu Dortmund, RWTH Aachen University and Fraunhofer
# Institute for Energy Economics and Energy System Technology (IEE) Kassel and individual
# contributors (see AUTHORS file for details). All rights reserved.
__version__ = "1.3.0"
__author__ = "smeinecke"
import os
s... | 33.692308 | 101 | 0.783105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.627854 |
f2e72fd64f8c76f1c9fc74fe2d074f594b42d146 | 215 | py | Python | src/output_module.py | abhishekpandeyIT/Virtual_Intelligent_Personal_Agent | 786261fbcf1468bcbaee9f6d17aea3f3cc06f81e | [
"Apache-2.0"
] | null | null | null | src/output_module.py | abhishekpandeyIT/Virtual_Intelligent_Personal_Agent | 786261fbcf1468bcbaee9f6d17aea3f3cc06f81e | [
"Apache-2.0"
] | null | null | null | src/output_module.py | abhishekpandeyIT/Virtual_Intelligent_Personal_Agent | 786261fbcf1468bcbaee9f6d17aea3f3cc06f81e | [
"Apache-2.0"
] | null | null | null | import assistantResume
from speak_module import speak
from database import speak_is_on
def output(o):
# For command line input
if speak_is_on():
speak(o)
print(assistantResume.name +": "+o+"\n") | 23.888889 | 44 | 0.702326 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.148837 |
f2ed016efef1c89871a2e33d8718c95390697abc | 3,545 | py | Python | vk_bot/needrework/relation.py | triangle1984/vk-bot | 39dea7bf8043e791ef079ea1ac6616f95d5b5312 | [
"BSD-3-Clause"
] | 3 | 2019-11-05T12:32:04.000Z | 2019-11-15T14:29:46.000Z | vk_bot/needrework/relation.py | anar66/vk-bot | 39dea7bf8043e791ef079ea1ac6616f95d5b5312 | [
"BSD-3-Clause"
] | 1 | 2019-12-11T20:26:31.000Z | 2019-12-11T20:26:31.000Z | vk_bot/needrework/relation.py | triangle1984/vk-bot | 39dea7bf8043e791ef079ea1ac6616f95d5b5312 | [
"BSD-3-Clause"
] | 5 | 2019-11-20T14:20:30.000Z | 2022-02-05T10:37:01.000Z | import vk_api
from vk_api.utils import get_random_id
from vk_bot.core.sql.vksql import *
def relationmeet(text, vk, event):
check = checkrelation('waitmeet', event.object.from_id)
if check == None:
check = checkrelation('relation', event.object.from_id)
if check == None:
userid = ""... | 48.561644 | 172 | 0.598025 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,672 | 0.416438 |
f2ed7a6bb514c982bc41d3c33e724e9e6365650e | 1,746 | py | Python | wallpaperdownloader/main.py | k-vinogradov/wallpaper-downloader | 568c6a1e3a2307f710bf6fe313b39da2d620213a | [
"MIT"
] | null | null | null | wallpaperdownloader/main.py | k-vinogradov/wallpaper-downloader | 568c6a1e3a2307f710bf6fe313b39da2d620213a | [
"MIT"
] | null | null | null | wallpaperdownloader/main.py | k-vinogradov/wallpaper-downloader | 568c6a1e3a2307f710bf6fe313b39da2d620213a | [
"MIT"
] | null | null | null | """Wallpaper Downloader Main Module."""
import argparse
import asyncio
import logging
import sys
from datetime import datetime
from wallpaperdownloader.downloader import download, LOGGER_NAME
def abort(*args):
"""Print message to the stderr and exit the program."""
print(*args, file=sys.stderr)
sys.exit... | 29.59322 | 76 | 0.683849 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 501 | 0.286942 |
f2ee02add396584dc919e32b6bdd9a63f34df039 | 4,512 | py | Python | Lib/site-packages/hackedit/app/common.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | Lib/site-packages/hackedit/app/common.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/hackedit/app/common.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | """
Functions shared across the main window, the welcome window and the system
tray.
"""
import os
import qcrash.api as qcrash
from PyQt5 import QtWidgets
from hackedit.app import templates, settings
from hackedit.app.dialogs.dlg_about import DlgAbout
from hackedit.app.dialogs.dlg_template_answers import DlgTemplate... | 32 | 77 | 0.623005 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,937 | 0.4293 |
f2ee858e562eab312d062843fa52105cd18f06ef | 4,778 | py | Python | pygame_menu/locals.py | apuly/pygame-menu | 77bf8f2c8913de5a24674ee0d0d2c7c9b816a58b | [
"MIT"
] | 419 | 2017-05-01T20:00:08.000Z | 2022-03-29T13:49:16.000Z | pygame_menu/locals.py | apuly/pygame-menu | 77bf8f2c8913de5a24674ee0d0d2c7c9b816a58b | [
"MIT"
] | 363 | 2017-11-05T17:42:48.000Z | 2022-03-27T21:13:33.000Z | pygame_menu/locals.py | apuly/pygame-menu | 77bf8f2c8913de5a24674ee0d0d2c7c9b816a58b | [
"MIT"
] | 167 | 2017-05-02T20:42:24.000Z | 2022-03-24T16:17:38.000Z | """
pygame-menu
https://github.com/ppizarror/pygame-menu
LOCALS
Local constants.
License:
-------------------------------------------------------------------------------
The MIT License (MIT)
Copyright 2017-2021 Pablo Pizarro R. @ppizarror
Permission is hereby granted, free of charge, to any person obtaining a
copy ... | 35.392593 | 113 | 0.75429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,849 | 0.596275 |
f2efb530b1ef641d5c0b78f798aa8a3ec91dbadc | 3,184 | py | Python | functions/constants.py | Katolus/functions | c4aff37231432ce6ef4ed6b37c8b5baaede5975a | [
"MIT"
] | 4 | 2022-03-08T08:46:44.000Z | 2022-03-19T07:52:11.000Z | functions/constants.py | Katolus/functions | c4aff37231432ce6ef4ed6b37c8b5baaede5975a | [
"MIT"
] | 114 | 2021-10-30T05:48:54.000Z | 2022-03-06T10:57:00.000Z | functions/constants.py | Katolus/functions | c4aff37231432ce6ef4ed6b37c8b5baaede5975a | [
"MIT"
] | null | null | null | import os
import sys
from enum import Enum
from enum import unique
from typing import List
# Set system constants based on the current platform
if sys.platform.startswith("win32"):
DEFAULT_SYSTEM_CONFIG_PATH = os.path.join(os.environ["APPDATA"], "config")
elif sys.platform.startswith("linux"):
DEFAULT_SYSTEM_C... | 25.269841 | 83 | 0.666143 | 2,149 | 0.674937 | 0 | 0 | 1,098 | 0.344849 | 0 | 0 | 1,163 | 0.365264 |
f2f174769c76e5752b21c530463b089bffb53275 | 1,076 | py | Python | mkmk/extend.py | tundra/mkmk | 4ca7a3e337dcc3345fb01ea205ae05c397f396b0 | [
"Apache-2.0"
] | null | null | null | mkmk/extend.py | tundra/mkmk | 4ca7a3e337dcc3345fb01ea205ae05c397f396b0 | [
"Apache-2.0"
] | null | null | null | mkmk/extend.py | tundra/mkmk | 4ca7a3e337dcc3345fb01ea205ae05c397f396b0 | [
"Apache-2.0"
] | null | null | null | #- Copyright 2014 GOTO 10.
#- Licensed under the Apache License, Version 2.0 (see LICENSE).
## Utilities used for creating build extensions.
from abc import ABCMeta, abstractmethod
# Abstract superclass of the tool sets loaded implicitly into each context.
# There can be many of these, one for each context.
class To... | 25.619048 | 76 | 0.737918 | 662 | 0.615242 | 0 | 0 | 56 | 0.052045 | 0 | 0 | 590 | 0.548327 |
f2f29f0872d8843eb8b228cb03ec5eb0946af9b8 | 32,864 | py | Python | tracklib/model/model.py | xueyuelei/tracklib | d33912baf1bebd1605d5e9c8dfc31484c96628cc | [
"MIT"
] | 5 | 2020-03-04T11:36:19.000Z | 2020-06-21T16:49:45.000Z | tracklib/model/model.py | xueyuelei/tracklib | d33912baf1bebd1605d5e9c8dfc31484c96628cc | [
"MIT"
] | null | null | null | tracklib/model/model.py | xueyuelei/tracklib | d33912baf1bebd1605d5e9c8dfc31484c96628cc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
REFERENCES:
[1] Y. Bar-Shalom, X. R. Li, and T. Kirubarajan, "Estimation with Applications to Tracking and Navigation," New York: John Wiley and Sons, Inc, 2001.
[2] R. A. Singer, "Estimating Optimal Tracking Filter Performance for Manned Maneuvering Targets," in IEEE Transactions on Aerospa... | 32.538614 | 222 | 0.549781 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11,754 | 0.357656 |
f2f2ed4004131258cff5093c7d766ecf35ed6781 | 848 | py | Python | orders/migrations/0005_auto_20210619_0848.py | garrett-rh/Slice-of-a-Pizza | 0e30e3a27b0e65e77cd52db1ef7db0470dea7a3f | [
"MIT"
] | 2 | 2020-05-15T10:20:13.000Z | 2021-04-03T12:38:37.000Z | orders/migrations/0005_auto_20210619_0848.py | garrett-rh/Slice-of-a-Pizza | 0e30e3a27b0e65e77cd52db1ef7db0470dea7a3f | [
"MIT"
] | 2 | 2020-05-15T10:39:42.000Z | 2021-11-26T03:01:19.000Z | orders/migrations/0005_auto_20210619_0848.py | garrett-rh/Slice-of-a-Pizza | 0e30e3a27b0e65e77cd52db1ef7db0470dea7a3f | [
"MIT"
] | 1 | 2021-11-12T12:10:57.000Z | 2021-11-12T12:10:57.000Z | # Generated by Django 3.2.4 on 2021-06-19 08:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orders', '0004_auto_20210619_0847'),
]
operations = [
migrations.AlterField(
model_name='dinner_platters',
name='Top... | 29.241379 | 99 | 0.604953 | 755 | 0.89033 | 0 | 0 | 0 | 0 | 0 | 0 | 228 | 0.268868 |
f2f3e2812670f2833f39a5b2980f1ac2b7819f19 | 1,229 | py | Python | benchbuild/engine.py | sturmianseq/benchbuild | e3cc1a24e877261e90baf781aa67a9d6f6528dac | [
"MIT"
] | 11 | 2017-10-05T08:59:35.000Z | 2021-05-29T01:43:07.000Z | benchbuild/engine.py | sturmianseq/benchbuild | e3cc1a24e877261e90baf781aa67a9d6f6528dac | [
"MIT"
] | 326 | 2016-07-12T08:11:43.000Z | 2022-03-28T07:10:11.000Z | benchbuild/engine.py | sturmianseq/benchbuild | e3cc1a24e877261e90baf781aa67a9d6f6528dac | [
"MIT"
] | 13 | 2016-06-17T12:13:35.000Z | 2022-01-04T16:09:12.000Z | """
Orchestrate experiment execution.
"""
import typing as tp
import attr
from benchbuild.experiment import Experiment
from benchbuild.project import Project
from benchbuild.utils import actions, tasks
ExperimentCls = tp.Type[Experiment]
Experiments = tp.List[ExperimentCls]
ProjectCls = tp.Type[Project]
Projects = t... | 25.604167 | 77 | 0.68511 | 745 | 0.606184 | 0 | 0 | 753 | 0.612693 | 0 | 0 | 105 | 0.085435 |
f2f4e04a8614d8edbaff0777a5f1c47f01d09f5f | 6,751 | py | Python | misc_code/fcn_loss_layer.py | kbardool/mrcnn3 | f4cbb1e34de97ab08558b56fb7362647436edbd7 | [
"MIT"
] | 7 | 2018-08-07T13:56:32.000Z | 2021-04-06T11:07:20.000Z | misc_code/fcn_loss_layer.py | kbardool/Contextual-Inference-V2 | f4cbb1e34de97ab08558b56fb7362647436edbd7 | [
"MIT"
] | null | null | null | misc_code/fcn_loss_layer.py | kbardool/Contextual-Inference-V2 | f4cbb1e34de97ab08558b56fb7362647436edbd7 | [
"MIT"
] | 1 | 2019-02-01T06:52:18.000Z | 2019-02-01T06:52:18.000Z | """
Mask R-CNN
Dataset functions and classes.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
import numpy as np
import tensorflow as tf
import keras.backend as KB
import keras.layers as KL
import keras.initiali... | 40.915152 | 123 | 0.578877 | 1,105 | 0.163679 | 0 | 0 | 0 | 0 | 0 | 0 | 2,581 | 0.382314 |
f2f6b4c27e7561e29dbb147f768e0c58a7d09bb7 | 2,150 | py | Python | mysticbit/plots.py | Connossor/mystic-bit | f57f471d3d154560d23bc9eff17fd5b8f284684c | [
"MIT"
] | 6 | 2018-11-23T20:13:53.000Z | 2019-02-25T15:54:55.000Z | mysticbit/plots.py | Connossor/mystic-bit | f57f471d3d154560d23bc9eff17fd5b8f284684c | [
"MIT"
] | null | null | null | mysticbit/plots.py | Connossor/mystic-bit | f57f471d3d154560d23bc9eff17fd5b8f284684c | [
"MIT"
] | 11 | 2018-11-23T20:55:44.000Z | 2021-12-20T17:25:24.000Z | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
def plot_well_map(df_logs, fig_size=(10, 10)):
""" Simple map of locations of nearby wells """
f, ax = plt.subplots(figsize=fig_size)
df = df_logs.drop_duplicates(subset=['HACKANAME', 'X', 'Y'])
plt.scatter... | 28.289474 | 105 | 0.58093 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 494 | 0.229767 |
f2f8aa778931cc06d7071bcf8a708498a3154677 | 5,244 | py | Python | cc_plugin_eustace/eustace_global_attrs.py | eustace-data/cc-plugin-eustace | 4b44d287433b632ea6f859cd72d5dd4b8c361cee | [
"BSD-2-Clause"
] | null | null | null | cc_plugin_eustace/eustace_global_attrs.py | eustace-data/cc-plugin-eustace | 4b44d287433b632ea6f859cd72d5dd4b8c361cee | [
"BSD-2-Clause"
] | null | null | null | cc_plugin_eustace/eustace_global_attrs.py | eustace-data/cc-plugin-eustace | 4b44d287433b632ea6f859cd72d5dd4b8c361cee | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""
cc_plugin_eustace.eustace_global_attrs
Compliance Test Suite: Check core global attributes in EUSTACE files
"""
import os
from netCDF4 import Dataset
# Import base objects from compliance checker
from compliance_checker.base import Result, BaseNCCheck, GenericFile
# Restrict which vocabs w... | 46.821429 | 153 | 0.474256 | 4,755 | 0.906751 | 0 | 0 | 0 | 0 | 0 | 0 | 1,218 | 0.232265 |
f2fc68a089e1541439b963f873f1136d0c533af5 | 705 | py | Python | final_project/machinetranslation/tests/tests.py | NicoFRizzo/xzceb-flask_eng_fr | 71c8a4c970e7a179f496ff0960d5fae2bba0ffc1 | [
"Apache-2.0"
] | null | null | null | final_project/machinetranslation/tests/tests.py | NicoFRizzo/xzceb-flask_eng_fr | 71c8a4c970e7a179f496ff0960d5fae2bba0ffc1 | [
"Apache-2.0"
] | null | null | null | final_project/machinetranslation/tests/tests.py | NicoFRizzo/xzceb-flask_eng_fr | 71c8a4c970e7a179f496ff0960d5fae2bba0ffc1 | [
"Apache-2.0"
] | null | null | null | import unittest
import translator
class TestTranslator(unittest.TestCase):
def test_one_e2f(self):
respopnse = translator.english_to_french('IBM Translator')
self.assertEqual(respopnse, 'Traducteur IBM')
def test_un_f2e(self):
respopnse = translator.french_to_english('Traducteur IB... | 32.045455 | 66 | 0.695035 | 618 | 0.876596 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 0.150355 |
f2fc8f6f95ceeb8cf32d3eeed59de008b87d73f7 | 556 | py | Python | src/appi/oop/classes/class_attributes.py | Kaju-Bubanja/APPI | 011afc872a0055ff56001547be6da73017042ad5 | [
"MIT"
] | null | null | null | src/appi/oop/classes/class_attributes.py | Kaju-Bubanja/APPI | 011afc872a0055ff56001547be6da73017042ad5 | [
"MIT"
] | null | null | null | src/appi/oop/classes/class_attributes.py | Kaju-Bubanja/APPI | 011afc872a0055ff56001547be6da73017042ad5 | [
"MIT"
] | null | null | null | class Student:
# class variables
school_name = 'ABC School'
# constructor
def __init__(self, name, age):
# instance variables
self.name = name
self.age = age
s1 = Student("Harry", 12)
# access instance variables
print('Student:', s1.name, s1.age)
# access class variable
print... | 20.592593 | 42 | 0.676259 | 198 | 0.356115 | 0 | 0 | 0 | 0 | 0 | 0 | 237 | 0.426259 |
f2fea27459e59001e49be2e7ed0478672dee266a | 264 | py | Python | clamor/rest/endpoints/__init__.py | TomSputz/Clamor | 13222b90532938e6ebdbe8aea0430512e7d22817 | [
"MIT"
] | 15 | 2019-07-05T20:26:18.000Z | 2020-09-18T12:44:16.000Z | clamor/rest/endpoints/__init__.py | TomSputz/Clamor | 13222b90532938e6ebdbe8aea0430512e7d22817 | [
"MIT"
] | 7 | 2019-07-07T19:55:07.000Z | 2019-08-20T22:07:31.000Z | clamor/rest/endpoints/__init__.py | TomSputz/Clamor | 13222b90532938e6ebdbe8aea0430512e7d22817 | [
"MIT"
] | 6 | 2019-07-07T20:39:29.000Z | 2020-11-06T10:12:20.000Z | # -*- coding: utf-8 -*-
from . import base
from .audit_log import *
from .channel import *
from .emoji import *
from .gateway import *
from .guild import *
from .invite import *
from .oauth import *
from .user import *
from .voice import *
from .webhook import *
| 18.857143 | 24 | 0.69697 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.087121 |
f2feb8df0aea648f82fd8f4f86ab95ad219d052f | 1,878 | py | Python | hamster2pdf.py | vleg1991/hamster2pdf | 1dda22a39b65a0f24b76d278f3d708ac51d3c262 | [
"MIT"
] | null | null | null | hamster2pdf.py | vleg1991/hamster2pdf | 1dda22a39b65a0f24b76d278f3d708ac51d3c262 | [
"MIT"
] | null | null | null | hamster2pdf.py | vleg1991/hamster2pdf | 1dda22a39b65a0f24b76d278f3d708ac51d3c262 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import datetime
import hamster.client
import reports
import argparse
import pdfkit
import gettext
gettext.install('brainz', '../datas/translations/')
# custom settings:
reportTitle = "My Activities Report"
activityFilter = "unfiled"
def valid_date(s):
try:
... | 27.617647 | 111 | 0.736954 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 577 | 0.307242 |
f2ff24739f7d32b20b931df9776f794aac82539a | 589 | py | Python | SingleTon.py | SuperLeis/meituan | 71d521826bc50cb8e7bee5617f84e2c26dce1394 | [
"MIT"
] | 1 | 2020-05-02T14:30:18.000Z | 2020-05-02T14:30:18.000Z | SingleTon.py | SuperLeis/meituan | 71d521826bc50cb8e7bee5617f84e2c26dce1394 | [
"MIT"
] | null | null | null | SingleTon.py | SuperLeis/meituan | 71d521826bc50cb8e7bee5617f84e2c26dce1394 | [
"MIT"
] | null | null | null | from functools import wraps
# created by PL
# git hello world
def single_ton(cls):
_instance = {}
@wraps(cls)
def single(*args, **kwargs):
if cls not in _instance:
_instance[cls] = cls(*args, **kwargs)
return _instance[cls]
return single
@single_ton
class ... | 19.633333 | 50 | 0.550085 | 89 | 0.151104 | 0 | 0 | 263 | 0.44652 | 0 | 0 | 60 | 0.101868 |
840025939ea1c2adbcc0cc3524f18c7230eb6fad | 374 | py | Python | exercicios-python/ex031.py | anavesilva/python-introduction | d85fb9381e348262584fd2942e4818ee822adbe5 | [
"MIT"
] | null | null | null | exercicios-python/ex031.py | anavesilva/python-introduction | d85fb9381e348262584fd2942e4818ee822adbe5 | [
"MIT"
] | null | null | null | exercicios-python/ex031.py | anavesilva/python-introduction | d85fb9381e348262584fd2942e4818ee822adbe5 | [
"MIT"
] | null | null | null | # Custo da viagem
distancia = float(input('Qual a distância da sua viagem? '))
valor1 = distancia * 0.5
valor2 = distancia * 0.45
print('Você está prestes a começar uma viagem de {}Km/h.'.format(distancia))
if distancia <= 200:
print('O preço de sua passagem será de R${:.2f}.'.format(valor1))
else:
print('O pre... | 37.4 | 76 | 0.687166 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 196 | 0.513089 |
8401761cbdcacb5f4d5eb5531d513247beb5261b | 10,254 | py | Python | datatest/differences.py | ajhynes7/datatest | 78742e98de992807286655f5685a2dc33a7b452e | [
"Apache-2.0"
] | 277 | 2016-05-12T13:22:49.000Z | 2022-03-11T00:18:32.000Z | datatest/differences.py | ajhynes7/datatest | 78742e98de992807286655f5685a2dc33a7b452e | [
"Apache-2.0"
] | 57 | 2016-05-18T01:03:32.000Z | 2022-02-17T13:48:43.000Z | datatest/differences.py | ajhynes7/datatest | 78742e98de992807286655f5685a2dc33a7b452e | [
"Apache-2.0"
] | 16 | 2016-05-22T11:35:19.000Z | 2021-12-01T19:41:42.000Z | """Difference classes."""
__all__ = [
'BaseDifference',
'Missing',
'Extra',
'Invalid',
'Deviation',
]
from cmath import isnan
from datetime import timedelta
from ._compatibility.builtins import *
from ._compatibility import abc
from ._compatibility.contextlib import suppress
from ._utils import _... | 29.048159 | 91 | 0.610396 | 7,359 | 0.717671 | 0 | 0 | 1,234 | 0.120343 | 0 | 0 | 4,621 | 0.450653 |
8401c1577e1e3475bf83b16d801193d6422761d2 | 2,735 | py | Python | dashboard/urls.py | playfulMIT/kimchi | 66802cc333770932a8c8b1a44ea5d235d916a8f1 | [
"MIT"
] | null | null | null | dashboard/urls.py | playfulMIT/kimchi | 66802cc333770932a8c8b1a44ea5d235d916a8f1 | [
"MIT"
] | 16 | 2019-12-10T19:40:27.000Z | 2022-02-10T11:51:06.000Z | dashboard/urls.py | playfulMIT/kimchi | 66802cc333770932a8c8b1a44ea5d235d916a8f1 | [
"MIT"
] | null | null | null | from django.conf.urls import include, url, re_path
from rest_framework import routers
from . import views
urlpatterns = [
re_path(r"^api/dashboard/(?P<slug>[a-zA-Z0-9-_]+)/versiontime", views.get_last_processed_time),
re_path(r"^api/dashboard/(?P<slug>[a-zA-Z0-9-_]+)/players", views.get_player_list),
re_p... | 80.441176 | 145 | 0.697623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,481 | 0.541499 |
8403354322f3d276144123191c8e910a521e71d2 | 1,945 | py | Python | VQ2D/vq2d/baselines/predictor.py | emulhall/episodic-memory | 27bafec6e09c108f0efe5ac899eabde9d1ac40cc | [
"MIT"
] | 27 | 2021-10-16T02:39:17.000Z | 2022-03-31T11:16:11.000Z | VQ2D/vq2d/baselines/predictor.py | emulhall/episodic-memory | 27bafec6e09c108f0efe5ac899eabde9d1ac40cc | [
"MIT"
] | 5 | 2022-03-23T04:53:36.000Z | 2022-03-29T23:39:07.000Z | VQ2D/vq2d/baselines/predictor.py | emulhall/episodic-memory | 27bafec6e09c108f0efe5ac899eabde9d1ac40cc | [
"MIT"
] | 13 | 2021-11-25T19:17:29.000Z | 2022-03-25T14:01:47.000Z | from typing import Any, Dict, List, Sequence
import numpy as np
import torch
from detectron2.engine import DefaultPredictor
class SiamPredictor(DefaultPredictor):
def __call__(
self,
original_images: Sequence[np.ndarray],
visual_crops: Sequence[np.ndarray],
) -> List[Dict[str, Any]]:
... | 38.9 | 93 | 0.519794 | 1,817 | 0.93419 | 0 | 0 | 0 | 0 | 0 | 0 | 589 | 0.302828 |
84050b8c0b169a6bad0d62fb6d1d81572077e370 | 109 | py | Python | user_agent2/__init__.py | dytttf/user_agent2 | 311bfc5c820ed8233207f57f27bfd7b789040d9d | [
"MIT"
] | null | null | null | user_agent2/__init__.py | dytttf/user_agent2 | 311bfc5c820ed8233207f57f27bfd7b789040d9d | [
"MIT"
] | 1 | 2022-02-08T11:58:15.000Z | 2022-02-08T16:59:37.000Z | user_agent2/__init__.py | dytttf/user_agent2 | 311bfc5c820ed8233207f57f27bfd7b789040d9d | [
"MIT"
] | 3 | 2021-11-21T22:47:43.000Z | 2022-02-15T00:45:40.000Z | from user_agent2.base import (
generate_user_agent,
generate_navigator,
generate_navigator_js,
)
| 18.166667 | 30 | 0.761468 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
840519afb7f020a56b84911fb8113394b9946381 | 7,626 | py | Python | mutagene/benchmark/multiple_benchmark.py | neksa/pymutagene | 1122d64a5ab843a4960124933f78f3c2e388a792 | [
"CC0-1.0"
] | 3 | 2020-05-18T07:00:46.000Z | 2022-02-20T02:55:48.000Z | mutagene/benchmark/multiple_benchmark.py | neksa/pymutagene | 1122d64a5ab843a4960124933f78f3c2e388a792 | [
"CC0-1.0"
] | 31 | 2020-03-13T16:28:34.000Z | 2021-02-27T22:12:15.000Z | mutagene/benchmark/multiple_benchmark.py | neksa/pymutagene | 1122d64a5ab843a4960124933f78f3c2e388a792 | [
"CC0-1.0"
] | 3 | 2020-03-24T20:01:44.000Z | 2020-11-26T17:30:39.000Z | import glob
import random
import uuid
import numpy as np
from multiprocessing import Pool
from sklearn.metrics import (
recall_score, precision_score, accuracy_score, f1_score, mean_squared_error)
from mutagene.io.profile import read_profile_file, write_profile, read_signatures
from mutagene.signatures.identify i... | 35.142857 | 141 | 0.560976 | 0 | 0 | 356 | 0.046682 | 0 | 0 | 0 | 0 | 1,569 | 0.205744 |
8406877949c3d33a1b17a8c7fd596cba40c180cf | 3,542 | py | Python | Restaurant_Finder_App/restaurant_finder_app/restaurant_finder_app/restaurant/migrations/0001_initial.py | midhun3112/restaurant_locator | 6ab5e906f26476352176059a8952c2c3f5b127bf | [
"Apache-2.0"
] | null | null | null | Restaurant_Finder_App/restaurant_finder_app/restaurant_finder_app/restaurant/migrations/0001_initial.py | midhun3112/restaurant_locator | 6ab5e906f26476352176059a8952c2c3f5b127bf | [
"Apache-2.0"
] | null | null | null | Restaurant_Finder_App/restaurant_finder_app/restaurant_finder_app/restaurant/migrations/0001_initial.py | midhun3112/restaurant_locator | 6ab5e906f26476352176059a8952c2c3f5b127bf | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-01 13:47
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Crea... | 38.5 | 168 | 0.559006 | 3,351 | 0.946076 | 0 | 0 | 0 | 0 | 0 | 0 | 919 | 0.259458 |
8407722043fe4e1043792c735a7c99de2eae2b6e | 1,807 | py | Python | ckl/run.py | damianbrunold/checkerlang-py | 97abe5eda5f692ef61acf906a5f596c65688b582 | [
"MIT"
] | null | null | null | ckl/run.py | damianbrunold/checkerlang-py | 97abe5eda5f692ef61acf906a5f596c65688b582 | [
"MIT"
] | null | null | null | ckl/run.py | damianbrunold/checkerlang-py | 97abe5eda5f692ef61acf906a5f596c65688b582 | [
"MIT"
] | null | null | null | import argparse
import os
import sys
from ckl.values import (
ValueList,
ValueString,
NULL
)
from ckl.errors import (
CklSyntaxError,
CklRuntimeError
)
from ckl.interpreter import Interpreter
def main():
parser = argparse.ArgumentParser(description="CKL run command")
parser.add_argument("... | 28.234375 | 72 | 0.633094 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 230 | 0.127283 |
840a373b87a5269d4b1deb705abae42b6703a996 | 21,190 | py | Python | Justice-Engine-source/security_monkey/alerters/custom/JusticeEngine.py | sendgrid/JusticeEngine | 9b39618c836bfcb120db5fb75557cc45c0105e9f | [
"MIT"
] | 1 | 2019-03-27T18:52:54.000Z | 2019-03-27T18:52:54.000Z | Justice-Engine-source/security_monkey/alerters/custom/JusticeEngine.py | sendgrid/JusticeEngine | 9b39618c836bfcb120db5fb75557cc45c0105e9f | [
"MIT"
] | 4 | 2018-08-17T19:10:05.000Z | 2018-11-16T16:46:04.000Z | Justice-Engine-source/security_monkey/alerters/custom/JusticeEngine.py | sendgrid/JusticeEngine | 9b39618c836bfcb120db5fb75557cc45c0105e9f | [
"MIT"
] | 2 | 2018-10-24T19:19:52.000Z | 2018-11-16T16:38:23.000Z | import datetime
import fnmatch
import hashlib
import json
import time
import arrow
import os
from botocore.exceptions import ClientError
from boto.s3.key import Key
from security_monkey.alerters import custom_alerter
from security_monkey.common.sts_connect import connect
from security_monkey import app, db
from securi... | 39.313544 | 131 | 0.612081 | 20,743 | 0.978905 | 0 | 0 | 13,138 | 0.620009 | 0 | 0 | 10,277 | 0.484993 |
840ab1d9437aeb791d935b51fa2d0357a65758ff | 623 | py | Python | bot/markups/inline_keyboards.py | Im-zeus/Stickers | f2484a1ecc9a3e4a2029eaadbde4ae1b0fe74536 | [
"MIT"
] | 44 | 2018-10-30T14:47:14.000Z | 2022-03-26T15:17:52.000Z | bot/markups/inline_keyboards.py | Im-zeus/Stickers | f2484a1ecc9a3e4a2029eaadbde4ae1b0fe74536 | [
"MIT"
] | 37 | 2018-11-09T11:51:15.000Z | 2021-12-27T15:08:48.000Z | bot/markups/inline_keyboards.py | Im-zeus/Stickers | f2484a1ecc9a3e4a2029eaadbde4ae1b0fe74536 | [
"MIT"
] | 38 | 2019-03-27T21:12:23.000Z | 2022-01-08T07:57:39.000Z | # noinspection PyPackageRequirements
from telegram import InlineKeyboardMarkup, InlineKeyboardButton
class InlineKeyboard:
HIDE = None
REMOVE = None
@staticmethod
def static_animated_switch(animated=False):
static_button = InlineKeyboardButton(
'{} normal'.format('☑️' if animated ... | 29.666667 | 71 | 0.658106 | 531 | 0.83622 | 0 | 0 | 470 | 0.740157 | 0 | 0 | 122 | 0.192126 |
840d053d29d25ef335ed6bf8148849bf05df3d8b | 596 | py | Python | guitar-package/guitar/guitar/fetcher/__init__.py | django-stars/guitar | 9bddfd2d7b555c97dd9470b458a5f43bd805b026 | [
"MIT"
] | null | null | null | guitar-package/guitar/guitar/fetcher/__init__.py | django-stars/guitar | 9bddfd2d7b555c97dd9470b458a5f43bd805b026 | [
"MIT"
] | null | null | null | guitar-package/guitar/guitar/fetcher/__init__.py | django-stars/guitar | 9bddfd2d7b555c97dd9470b458a5f43bd805b026 | [
"MIT"
] | null | null | null | import urllib2
import json
FAKE_PACKAGES = (
'south',
'django-debug-toolbar',
'django-extensions',
'django-social-auth',
)
class GuitarWebAPI(object):
def __init__(self, url):
self.url = url
def search(self, q):
url = self.url + 'search/' + q + '/'
res = urllib2.urlop... | 20.551724 | 55 | 0.587248 | 395 | 0.662752 | 0 | 0 | 0 | 0 | 0 | 0 | 123 | 0.206376 |
840d5087c07149f28ccd99ef85cfdb7e07ab4198 | 1,005 | py | Python | src/deterministicpasswordgenerator/compile.py | jelford/deterministic-password-generator | ad839a2e0d82e1742227a686c248d2ad03ef2fc1 | [
"MIT"
] | 1 | 2016-08-22T22:48:50.000Z | 2016-08-22T22:48:50.000Z | src/deterministicpasswordgenerator/compile.py | jelford/deterministic-password-generator | ad839a2e0d82e1742227a686c248d2ad03ef2fc1 | [
"MIT"
] | null | null | null | src/deterministicpasswordgenerator/compile.py | jelford/deterministic-password-generator | ad839a2e0d82e1742227a686c248d2ad03ef2fc1 | [
"MIT"
] | null | null | null | import zipfile
from getpass import getpass
import os
import stat
import tempfile
from os import path
from .crypto import encrypt
def compile_ruleset(ruleset_path, ruleset_encryption_password=None, output_path=None):
output_path = output_path or os.getcwd()
ruleset_encryption_password = ruleset_encryption_pa... | 34.655172 | 120 | 0.769154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.068657 |
840ed8b2d962e67e5075227c8b5fb7a2d2b1513b | 553 | py | Python | python/dp/min_cost_climbing_stairs.py | googege/algo-learn | 054d05e8037005c5810906d837de889108dad107 | [
"MIT"
] | 153 | 2020-09-24T12:46:51.000Z | 2022-03-31T21:30:44.000Z | python/dp/min_cost_climbing_stairs.py | googege/algo-learn | 054d05e8037005c5810906d837de889108dad107 | [
"MIT"
] | null | null | null | python/dp/min_cost_climbing_stairs.py | googege/algo-learn | 054d05e8037005c5810906d837de889108dad107 | [
"MIT"
] | 35 | 2020-12-22T11:07:06.000Z | 2022-03-09T03:25:08.000Z | from typing import List
# 使用最小花费爬楼梯
class Solution:
def minCostClimbingStairs_1(self, cost: List[int]) -> int:
dp = [0 for _ in range(len(cost))]
dp[0], dp[1] = cost[0], cost[1]
for i in range(2, len(cost)):
dp[i] = min(dp[i - 1], dp[i - 2]) + cost[i]
return min(dp[-... | 26.333333 | 62 | 0.529837 | 505 | 0.884413 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.050788 |
840f7e43205d6e7a06e7d699111b144ac79f0338 | 10,289 | py | Python | pages/graph.py | lmason98/PyGraph | 22d734cfd97333578c91ba4e331716df0aec668e | [
"MIT"
] | null | null | null | pages/graph.py | lmason98/PyGraph | 22d734cfd97333578c91ba4e331716df0aec668e | [
"MIT"
] | null | null | null | pages/graph.py | lmason98/PyGraph | 22d734cfd97333578c91ba4e331716df0aec668e | [
"MIT"
] | null | null | null | """
File: pages/page.py
Author: Luke Mason
Description: Main part of the application, the actual graph page.
"""
# Application imports
from message import log, error, success
from settings import APP_NAME, COLOR, FONT, FONT_SIZE, SCREEN_WIDTH, SCREEN_HEIGHT, WIDTH, HEIGHT, PAD, _QUIT
from sprites.vertex import Vertex
... | 28.035422 | 119 | 0.666051 | 9,637 | 0.936631 | 0 | 0 | 0 | 0 | 0 | 0 | 3,644 | 0.354165 |
8412473069d247b24941bba95ee50eaf3af4a33f | 521 | py | Python | tests/forked/test_update.py | rarity-adventure/rarity-names | e940b8bea296823faf003ecb9ab8735820ff54d1 | [
"MIT"
] | null | null | null | tests/forked/test_update.py | rarity-adventure/rarity-names | e940b8bea296823faf003ecb9ab8735820ff54d1 | [
"MIT"
] | null | null | null | tests/forked/test_update.py | rarity-adventure/rarity-names | e940b8bea296823faf003ecb9ab8735820ff54d1 | [
"MIT"
] | 2 | 2021-09-22T01:34:17.000Z | 2022-02-09T06:04:51.000Z | import brownie
def test_update(n1, barb, barb2, owner):
tx = n1.update_capitalization(1, "coNan", {'from': owner})
assert tx.events["NameUpdated"].values() == (1, "Conan", "coNan")
assert n1.summoner_name(1) == "coNan"
def test_update_fails(n1, barb, barb2, owner, accounts):
with brownie.reverts("!... | 32.5625 | 69 | 0.662188 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.220729 |
8413787081f15c4a41a8417aa64436712a8f0d85 | 603 | py | Python | pakcrack/__init__.py | Alpha-Demon404/RE-14 | b5b46a9f0eee218f2a642b615c77135c33c6f4ad | [
"MIT"
] | 39 | 2020-02-26T09:44:36.000Z | 2022-03-23T00:18:25.000Z | pakcrack/__init__.py | B4BY-DG/reverse-enginnering | b5b46a9f0eee218f2a642b615c77135c33c6f4ad | [
"MIT"
] | 15 | 2020-05-14T10:07:26.000Z | 2022-01-06T02:55:32.000Z | pakcrack/__init__.py | B4BY-DG/reverse-enginnering | b5b46a9f0eee218f2a642b615c77135c33c6f4ad | [
"MIT"
] | 41 | 2020-03-16T22:36:38.000Z | 2022-03-17T14:47:19.000Z | # Filenames : <tahm1d>
# Python bytecode : 2.7
# Time decompiled : Thu Sep 10 23:29:38 2020
# Selector <module> in line 4 file <tahm1d>
# Timestamp in code: 2020-09-02 17:33:14
import os, sys, time
from os import system
from time import sleep
def htrprint(s):
for t in s + '\n':
sys.stdout.write(t)
... | 21.535714 | 101 | 0.623549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 318 | 0.527363 |
8414f299e33cb1d7f5931b3a7e8db59199dffc99 | 4,165 | py | Python | MstarHe2R/components/models.py | IzayoiRin/MstarHe2R | 938d83acdfa5ec4464cf9113fef104a6e80ad662 | [
"MIT"
] | null | null | null | MstarHe2R/components/models.py | IzayoiRin/MstarHe2R | 938d83acdfa5ec4464cf9113fef104a6e80ad662 | [
"MIT"
] | 2 | 2021-06-08T21:19:41.000Z | 2021-09-08T01:54:27.000Z | MstarHe2R/components/models.py | IzayoiRin/MstarHe2R | 938d83acdfa5ec4464cf9113fef104a6e80ad662 | [
"MIT"
] | null | null | null | import os
import numpy as np
import pandas as pd
import torch as th
from mstarhe.core.nn.models import PrettyFeedForward
from MstarHe2R.components.dataloader import Mstar2RDataLoader
__IMG_SIZE__ = 128 * 128
class MSTARNet(PrettyFeedForward):
data_loader_class = Mstar2RDataLoader
# model_graph_class = AN... | 32.038462 | 100 | 0.614646 | 3,391 | 0.814166 | 0 | 0 | 138 | 0.033133 | 0 | 0 | 668 | 0.160384 |
8418475e8b117a7899349c6df5fd5aeff3d447b2 | 996 | py | Python | 4 - observer pattern/api/event_system.py | lucascionis/betterpython | ab8db8c016ff0bccc443443740a26bccb70402f3 | [
"MIT"
] | null | null | null | 4 - observer pattern/api/event_system.py | lucascionis/betterpython | ab8db8c016ff0bccc443443740a26bccb70402f3 | [
"MIT"
] | null | null | null | 4 - observer pattern/api/event_system.py | lucascionis/betterpython | ab8db8c016ff0bccc443443740a26bccb70402f3 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
'''Comments
In the original solution only functions were used to
implement the event system (observer pattern).
In this implementation I wanted to write classes (to be as
nearest as possible to the pattern (?)).
It is surely better to use python first-citizen functions to create
t... | 25.538462 | 68 | 0.696787 | 536 | 0.538153 | 0 | 0 | 56 | 0.056225 | 0 | 0 | 415 | 0.416667 |
84188f6567eb4fd0ad0c89e940fd5e2fe14303c7 | 3,056 | py | Python | predict_yolo3_disconnect.py | RentadroneCL/model-definition | 9dab1f1a808a1efc54d64144745277396c145ff7 | [
"MIT"
] | 2 | 2020-01-22T19:54:16.000Z | 2020-02-07T12:20:17.000Z | predict_yolo3_disconnect.py | RentadroneCL/model-definition | 9dab1f1a808a1efc54d64144745277396c145ff7 | [
"MIT"
] | 4 | 2020-06-03T00:27:22.000Z | 2020-07-15T17:15:23.000Z | predict_yolo3_disconnect.py | RentadroneCL/model-definition | 9dab1f1a808a1efc54d64144745277396c145ff7 | [
"MIT"
] | 1 | 2020-01-21T22:38:22.000Z | 2020-01-21T22:38:22.000Z | #! /usr/bin/env python
import time
import os
import argparse
import json
import cv2
import sys
sys.path += [os.path.abspath('keras-yolo3-master')]
from utils.utils import get_yolo_boxes, makedirs
from utils.bbox import draw_boxes
from tensorflow.keras.models import load_model
from tqdm import tqdm
import numpy as np
... | 32.168421 | 113 | 0.629581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 927 | 0.303338 |
8419172381c9e4256607a0db506cd791eeb0f296 | 11,655 | py | Python | tenning/layers/resnet_block.py | guilherme9820/Tenning | c0fe7695ef3dd791ea1083f39d6b312266fb0512 | [
"MIT"
] | null | null | null | tenning/layers/resnet_block.py | guilherme9820/Tenning | c0fe7695ef3dd791ea1083f39d6b312266fb0512 | [
"MIT"
] | null | null | null | tenning/layers/resnet_block.py | guilherme9820/Tenning | c0fe7695ef3dd791ea1083f39d6b312266fb0512 | [
"MIT"
] | null | null | null | import tensorflow.keras.constraints as constraints
from tensorflow.keras.layers import GlobalAveragePooling2D
from tensorflow.keras.layers import BatchNormalization
from tensorflow.keras.layers import Conv2DTranspose
from tensorflow.keras.layers import LeakyReLU
from tensorflow.keras.layers import ReLU
from tensorflow.... | 51.8 | 163 | 0.620764 | 10,909 | 0.935993 | 0 | 0 | 0 | 0 | 0 | 0 | 1,845 | 0.158301 |
841b950a79e8d2aae01b030de733c8d1017b6718 | 3,649 | py | Python | libs/token.py | yareally/twitter-clone-python | 1323c3fa4bf66f479a3092c09fb165a323eb1c85 | [
"MIT"
] | 1 | 2020-05-22T22:13:48.000Z | 2020-05-22T22:13:48.000Z | libs/token.py | yareally/twitter-clone-python | 1323c3fa4bf66f479a3092c09fb165a323eb1c85 | [
"MIT"
] | null | null | null | libs/token.py | yareally/twitter-clone-python | 1323c3fa4bf66f479a3092c09fb165a323eb1c85 | [
"MIT"
] | null | null | null | # coding=utf-8
from operator import xor
import os
import scrypt
import time
from libs.rediswrapper import UserHelper
try:
xrange
except NameError:
xrange = range
class Token(object):
"""
@param user_id:
@type user_id:
@param password:
@type password:
"""
__BLOCK_SIZE = 256
_... | 28.960317 | 102 | 0.609482 | 3,473 | 0.951768 | 0 | 0 | 0 | 0 | 0 | 0 | 1,649 | 0.451905 |
841dd327848fd2568a5c74230c7b659174fee507 | 2,961 | py | Python | saefportal/datastores/util.py | harry-consulting/SAEF1 | 055d6e492ba76f90e3248b9da2985fdfe0c6b430 | [
"BSD-2-Clause"
] | null | null | null | saefportal/datastores/util.py | harry-consulting/SAEF1 | 055d6e492ba76f90e3248b9da2985fdfe0c6b430 | [
"BSD-2-Clause"
] | null | null | null | saefportal/datastores/util.py | harry-consulting/SAEF1 | 055d6e492ba76f90e3248b9da2985fdfe0c6b430 | [
"BSD-2-Clause"
] | 1 | 2020-12-16T15:02:52.000Z | 2020-12-16T15:02:52.000Z | import json
from collections import defaultdict
import fastavro
import pandas as pd
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.urls import reverse
from datasets.models import Connection
from users.models import User
def get_supported_file_types():
"""Return a li... | 34.835294 | 110 | 0.695373 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 823 | 0.277947 |
841fba8a3c7dd4e8b6e7d2a9101dcfe6a12ffb43 | 637 | py | Python | count_div.py | odellus/year_of_code | bfa2b30893bcc12f46e73ac34c63b5b05b27af5f | [
"MIT"
] | 1 | 2017-01-03T02:24:34.000Z | 2017-01-03T02:24:34.000Z | count_div.py | odellus/year_of_code | bfa2b30893bcc12f46e73ac34c63b5b05b27af5f | [
"MIT"
] | null | null | null | count_div.py | odellus/year_of_code | bfa2b30893bcc12f46e73ac34c63b5b05b27af5f | [
"MIT"
] | null | null | null | #! /usr/bin/python
def solution(A, B, K):
res = 0
rem_A = A % K
rem_B = B % K
if rem_A == 0 and rem_B == 0:
res = (B - A) / K + 1
elif rem_A == 0 and rem_B != 0:
low_B = B - rem_B
if low_B >= A:
res = (low_B - A) / K + 1
else:
res = 0
elif... | 21.233333 | 37 | 0.400314 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.028257 |
842064b9ee1d937a6d9bb100474bd7dafa3c5859 | 3,766 | py | Python | applications/plugins/SofaPython/python/SofaPython/DAGValidation.py | sofa-framework/issofa | 94855f488465bc3ed41223cbde987581dfca5389 | [
"OML"
] | null | null | null | applications/plugins/SofaPython/python/SofaPython/DAGValidation.py | sofa-framework/issofa | 94855f488465bc3ed41223cbde987581dfca5389 | [
"OML"
] | null | null | null | applications/plugins/SofaPython/python/SofaPython/DAGValidation.py | sofa-framework/issofa | 94855f488465bc3ed41223cbde987581dfca5389 | [
"OML"
] | null | null | null | import sys
import Sofa
import Tools
def MechanicalObjectVisitor(node):
## listing mechanical states, bottom-up from node
ancestors = []
visited = []
for p in node.getParents():
path = p.getPathName()
if not path in visited:
state = p.getMechanicalState(... | 30.128 | 123 | 0.521774 | 2,404 | 0.638343 | 0 | 0 | 0 | 0 | 0 | 0 | 1,073 | 0.284918 |
842128da3d89d5f7a471cc4a5a88b8952b188592 | 7,216 | py | Python | models/DGIFullPipeline.py | nicolas-racchi/hpc2020-graphML | 7f0d8b7c18469e1c793c7097bd10a9e0322e75be | [
"Apache-2.0"
] | null | null | null | models/DGIFullPipeline.py | nicolas-racchi/hpc2020-graphML | 7f0d8b7c18469e1c793c7097bd10a9e0322e75be | [
"Apache-2.0"
] | null | null | null | models/DGIFullPipeline.py | nicolas-racchi/hpc2020-graphML | 7f0d8b7c18469e1c793c7097bd10a9e0322e75be | [
"Apache-2.0"
] | null | null | null | import time
import os
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.manifold import TSNE
from sklearn.tree import DecisionTreeClassifier
from sklearn.metrics import f1_score
import stellargraph as sg
from stellargraph.mapper import CorruptedGenerator, HinSAGENodeGenerator
from st... | 33.877934 | 106 | 0.651746 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,418 | 0.196508 |
84226726736f353bcbde4bab4581da03be81116f | 878 | py | Python | Newsfeed/Newsfeed/app.py | akshayseth7/Intership_Snapshot | e262ec4939e2e5c5e2037333b7fa37f7c57d5425 | [
"MIT"
] | null | null | null | Newsfeed/Newsfeed/app.py | akshayseth7/Intership_Snapshot | e262ec4939e2e5c5e2037333b7fa37f7c57d5425 | [
"MIT"
] | null | null | null | Newsfeed/Newsfeed/app.py | akshayseth7/Intership_Snapshot | e262ec4939e2e5c5e2037333b7fa37f7c57d5425 | [
"MIT"
] | null | null | null | from flask import Flask , render_template, request
import google_news
app = Flask(__name__)
outFile = ''
@app.route("/")
def main():
print "Welcome!"
return render_template('index.html')
@app.route('/uploadFile', methods=['POST'])
def upload():
global outputFile
filedata = request.files['upload']
... | 20.904762 | 50 | 0.67426 | 0 | 0 | 0 | 0 | 723 | 0.823462 | 0 | 0 | 206 | 0.234624 |
842586bea147f3e4d054e06882c5e5cefb545add | 1,222 | py | Python | physics_planning_games/mujoban/mujoban_level_test.py | mitchchristow/deepmind-research | 49c7ebe6acc48dd276ca09eca6924ba6cb5ec3a3 | [
"Apache-2.0"
] | 10,110 | 2019-08-27T20:05:30.000Z | 2022-03-31T16:31:56.000Z | physics_planning_games/mujoban/mujoban_level_test.py | ibex-training/deepmind-research | 6f8ae40b2626b30f5f80dfc92f5676689eff5599 | [
"Apache-2.0"
] | 317 | 2019-11-09T10:19:10.000Z | 2022-03-31T00:05:19.000Z | physics_planning_games/mujoban/mujoban_level_test.py | ibex-training/deepmind-research | 6f8ae40b2626b30f5f80dfc92f5676689eff5599 | [
"Apache-2.0"
] | 2,170 | 2019-08-28T12:53:36.000Z | 2022-03-31T13:15:11.000Z | # Copyright 2020 DeepMind Technologies Limited.
#
# 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... | 22.62963 | 78 | 0.636661 | 197 | 0.161211 | 0 | 0 | 0 | 0 | 0 | 0 | 847 | 0.693126 |
84272a9b78bd142a71da410927baa64f753039be | 1,069 | py | Python | TeamX/TeamXapp/migrations/0040_auto_20190712_1351.py | rootfinlay/SageTeamX | cf4cde3360c8cccb8a727ba64d66345805d7a0ed | [
"Unlicense"
] | null | null | null | TeamX/TeamXapp/migrations/0040_auto_20190712_1351.py | rootfinlay/SageTeamX | cf4cde3360c8cccb8a727ba64d66345805d7a0ed | [
"Unlicense"
] | null | null | null | TeamX/TeamXapp/migrations/0040_auto_20190712_1351.py | rootfinlay/SageTeamX | cf4cde3360c8cccb8a727ba64d66345805d7a0ed | [
"Unlicense"
] | null | null | null | # Generated by Django 2.2.3 on 2019-07-12 12:51
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('TeamXapp', '0039_auto_20190712_1348'),
]
operations = [
migrations.AddField(
model_name='leavec... | 35.633333 | 168 | 0.649205 | 943 | 0.882133 | 0 | 0 | 0 | 0 | 0 | 0 | 268 | 0.250702 |
842b2f72a08093681d688bb2f92eb0afb6f06354 | 742 | py | Python | quartic_sdk/core/entities/site.py | divyquartic/QuarticSDK | e3ce6387ed5f27845e0909878c831ae39badd8eb | [
"MIT"
] | 1 | 2021-03-26T12:39:44.000Z | 2021-03-26T12:39:44.000Z | quartic_sdk/core/entities/site.py | divyquartic/QuarticSDK | e3ce6387ed5f27845e0909878c831ae39badd8eb | [
"MIT"
] | 95 | 2021-02-18T03:15:38.000Z | 2022-03-25T05:39:12.000Z | quartic_sdk/core/entities/site.py | divyquartic/QuarticSDK | e3ce6387ed5f27845e0909878c831ae39badd8eb | [
"MIT"
] | 1 | 2021-09-03T12:46:18.000Z | 2021-09-03T12:46:18.000Z | """
The given file contains the class to refer to the Site entity
"""
from quartic_sdk.core.entities.base import Base
import quartic_sdk.utilities.constants as Constants
class Site(Base):
"""
The given class refers to the site entity which is created based upon the site response
returned by the API
""... | 23.935484 | 91 | 0.630728 | 569 | 0.766846 | 0 | 0 | 0 | 0 | 0 | 0 | 425 | 0.572776 |
842c3f72d982dddd1077d864f70783e67cb8182b | 525 | py | Python | newapp/migrations/0003_auto_20190524_1511.py | HCDigitalScholarship/liason_lair | 6035d100e3ea1216af2907a4cccd319a1cc4f8d8 | [
"MIT"
] | null | null | null | newapp/migrations/0003_auto_20190524_1511.py | HCDigitalScholarship/liason_lair | 6035d100e3ea1216af2907a4cccd319a1cc4f8d8 | [
"MIT"
] | null | null | null | newapp/migrations/0003_auto_20190524_1511.py | HCDigitalScholarship/liason_lair | 6035d100e3ea1216af2907a4cccd319a1cc4f8d8 | [
"MIT"
] | 1 | 2019-08-03T01:30:30.000Z | 2019-08-03T01:30:30.000Z | # Generated by Django 2.0.5 on 2019-05-24 15:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('newapp', '0002_auto_20190524_1507'),
]
operations = [
migrations.AlterField(
model_name='course',
name='additional_i... | 21.875 | 47 | 0.565714 | 432 | 0.822857 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.238095 |
842f1947d1778a3623e9a7a62865a578b298416e | 2,027 | py | Python | comment/views/blocker.py | Italo-Carvalho/Comment | 86424d02a901b74ccbcaa438fffc38f352535301 | [
"MIT"
] | 75 | 2018-09-08T14:29:35.000Z | 2022-03-25T16:17:06.000Z | comment/views/blocker.py | p0-oya/Comment | 39f6fb6c40314d97391d36fc25112d6420c96991 | [
"MIT"
] | 165 | 2018-10-07T21:55:31.000Z | 2022-02-27T14:44:32.000Z | comment/views/blocker.py | p0-oya/Comment | 39f6fb6c40314d97391d36fc25112d6420c96991 | [
"MIT"
] | 37 | 2019-12-01T19:44:23.000Z | 2022-02-13T16:46:14.000Z | from django.views import View
from comment.models import BlockedUser, BlockedUserHistory, Comment
from comment.mixins import CanBlockUsersMixin
from comment.responses import UTF8JsonResponse, DABResponseData
from comment.messages import BlockUserError
class BaseToggleBlockingView(DABResponseData):
response_class... | 34.948276 | 99 | 0.655649 | 1,768 | 0.872225 | 0 | 0 | 0 | 0 | 0 | 0 | 173 | 0.085348 |
843650dbb739a5fa34f00adc9a2ecc5b851d5e8f | 49 | py | Python | api_version_1.py | docktermj/python-future-proofing-apis | ae8ac783a14c6f9d4050ad2545c82f96fb990a5c | [
"Apache-2.0"
] | null | null | null | api_version_1.py | docktermj/python-future-proofing-apis | ae8ac783a14c6f9d4050ad2545c82f96fb990a5c | [
"Apache-2.0"
] | null | null | null | api_version_1.py | docktermj/python-future-proofing-apis | ae8ac783a14c6f9d4050ad2545c82f96fb990a5c | [
"Apache-2.0"
] | null | null | null | def stable_api(x):
print("X: {0}".format(x))
| 16.333333 | 29 | 0.571429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.163265 |
84377da9e8bef2666e66841f43d9581ba693e418 | 39,550 | py | Python | wicon/glyph.py | Wudan07/wIcon | 9189b7029759a22371827426b5342b6dc976f1b2 | [
"MIT"
] | null | null | null | wicon/glyph.py | Wudan07/wIcon | 9189b7029759a22371827426b5342b6dc976f1b2 | [
"MIT"
] | null | null | null | wicon/glyph.py | Wudan07/wIcon | 9189b7029759a22371827426b5342b6dc976f1b2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Brad Newbold (wudan07 [at] gmail.com)
# See LICENSE for details.
# glyph.py
#
"""wIcon library:
glyph provides GlyphObject
"""
##from handy import *
##from common import *
### represents a character in a glyphString
class GlyphObject:
def __init__(self, glyph):
### s... | 26.759134 | 143 | 0.596207 | 37,587 | 0.950367 | 0 | 0 | 0 | 0 | 0 | 0 | 1,273 | 0.032187 |
8438a4e8ec614cde523653248e7af3039519099a | 463 | py | Python | mqtt_sender.py | kehtolaulu/iot-ccs811 | 611ca30ffaec067d730ac95c59b6800fda2cf148 | [
"MIT"
] | null | null | null | mqtt_sender.py | kehtolaulu/iot-ccs811 | 611ca30ffaec067d730ac95c59b6800fda2cf148 | [
"MIT"
] | null | null | null | mqtt_sender.py | kehtolaulu/iot-ccs811 | 611ca30ffaec067d730ac95c59b6800fda2cf148 | [
"MIT"
] | null | null | null | import json
from paho.mqtt.client import Client
from subscriber import Subscriber
from datetime import datetime
class MqttSender(Subscriber):
def __init__(self, client: Client, topic: str):
self.client = client
self.topic = topic
def on_next(self, message: dict):
json_message = json... | 25.722222 | 72 | 0.695464 | 347 | 0.74946 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.12311 |
8439225f8d80c110768afbd91dc3a48cb1f55f67 | 1,914 | py | Python | users/migrations/0004_auto_20201228_1613.py | hhdMrLion/django-crm | 9f6f021e0cddc323c88280b733144366a0cb9fa6 | [
"Apache-2.0"
] | 1 | 2021-06-18T03:03:43.000Z | 2021-06-18T03:03:43.000Z | users/migrations/0004_auto_20201228_1613.py | hhdMrLion/django-crm | 9f6f021e0cddc323c88280b733144366a0cb9fa6 | [
"Apache-2.0"
] | null | null | null | users/migrations/0004_auto_20201228_1613.py | hhdMrLion/django-crm | 9f6f021e0cddc323c88280b733144366a0cb9fa6 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.17 on 2020-12-28 08:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0003_auto_20201228_1605'),
]
operations = [
migrations.CreateModel(
name='Count',
fields=[
... | 46.682927 | 106 | 0.581505 | 2,040 | 0.953271 | 0 | 0 | 0 | 0 | 0 | 0 | 706 | 0.329907 |
843bb9c05ba6309f2f5fa04bc4ff12d51bd9395e | 430 | py | Python | pages/homepage.py | eugenexxx/laptop_docker | 362ea238296e64fdd5c49ac55185d65b05e718cc | [
"Apache-2.0"
] | null | null | null | pages/homepage.py | eugenexxx/laptop_docker | 362ea238296e64fdd5c49ac55185d65b05e718cc | [
"Apache-2.0"
] | null | null | null | pages/homepage.py | eugenexxx/laptop_docker | 362ea238296e64fdd5c49ac55185d65b05e718cc | [
"Apache-2.0"
] | null | null | null | from webium import BasePage, Finds, Find
from selenium.webdriver.common.by import By
class Homepage(BasePage):
catalog_header = Find(by=By.CLASS_NAME, value="Header__BlockCatalogLink")
computers_label = Find(by=By.CSS_SELECTOR, value="a[href='/kompyutery/']")
laptops_accessories_label = Find(by=By.XPATH, ... | 43 | 99 | 0.746512 | 369 | 0.80744 | 0 | 0 | 0 | 0 | 0 | 0 | 129 | 0.282276 |
843c2a9f5e722e97bca056334565acff3143bb58 | 3,112 | py | Python | finetune/TensorFlow/download_model_and_dataset.py | cgouttham/microsoft-hackathon | 7e50981e0f165543676504592ad26818db13432f | [
"MIT"
] | 340 | 2019-05-15T06:42:37.000Z | 2022-02-23T13:29:34.000Z | finetune/TensorFlow/download_model_and_dataset.py | cgouttham/microsoft-hackathon | 7e50981e0f165543676504592ad26818db13432f | [
"MIT"
] | 43 | 2019-05-14T21:26:06.000Z | 2022-02-13T02:42:57.000Z | finetune/TensorFlow/download_model_and_dataset.py | cgouttham/microsoft-hackathon | 7e50981e0f165543676504592ad26818db13432f | [
"MIT"
] | 113 | 2019-05-23T08:21:48.000Z | 2022-03-03T19:18:17.000Z | from __future__ import print_function
import argparse
import sys
import os
import shutil
import zipfile
import urllib
parser = argparse.ArgumentParser()
## Required parameters
parser.add_argument("--bert_model_name",
default = None,
type = str,
required = Tr... | 43.222222 | 151 | 0.70662 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,483 | 0.476542 |
843ca99856298b4d971576c36ef2ff0db2f48136 | 1,386 | py | Python | pdata_app/migrations/0035_auto_20180221_1515.py | jonseddon/primavera-dmt | 1239044e37f070b925a3d06db68351f285df780c | [
"BSD-3-Clause"
] | null | null | null | pdata_app/migrations/0035_auto_20180221_1515.py | jonseddon/primavera-dmt | 1239044e37f070b925a3d06db68351f285df780c | [
"BSD-3-Clause"
] | 49 | 2018-11-14T17:00:03.000Z | 2021-12-20T11:04:22.000Z | pdata_app/migrations/0035_auto_20180221_1515.py | jonseddon/primavera-dmt | 1239044e37f070b925a3d06db68351f285df780c | [
"BSD-3-Clause"
] | 2 | 2018-07-04T10:58:43.000Z | 2018-09-29T14:55:08.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-02-21 15:15
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pdata_app', '0034_auto_20180221_1158'),
]
operations = [
migrations.AddField(... | 33.804878 | 101 | 0.622655 | 1,230 | 0.887446 | 0 | 0 | 0 | 0 | 0 | 0 | 360 | 0.25974 |
843d9417ba37601232cb640d55f1d03f38cd7f76 | 3,226 | py | Python | python/examples/imagenet/image_reader.py | gongweibao/Serving | d234a1421e8b964c5fa3e9901f57f24aa49e3a91 | [
"Apache-2.0"
] | null | null | null | python/examples/imagenet/image_reader.py | gongweibao/Serving | d234a1421e8b964c5fa3e9901f57f24aa49e3a91 | [
"Apache-2.0"
] | null | null | null | python/examples/imagenet/image_reader.py | gongweibao/Serving | d234a1421e8b964c5fa3e9901f57f24aa49e3a91 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 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... | 32.26 | 74 | 0.591135 | 2,582 | 0.800372 | 0 | 0 | 0 | 0 | 0 | 0 | 1,060 | 0.32858 |
843f97dd8ec994e4357ed02f96f7842db3d9a402 | 5,867 | py | Python | cloudflare-deploy.py | antonini/certbot-hooks | 61e200b7a038952f2f559953f47be62e1f992e39 | [
"Apache-2.0"
] | null | null | null | cloudflare-deploy.py | antonini/certbot-hooks | 61e200b7a038952f2f559953f47be62e1f992e39 | [
"Apache-2.0"
] | null | null | null | cloudflare-deploy.py | antonini/certbot-hooks | 61e200b7a038952f2f559953f47be62e1f992e39 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import logging
import sys
import CloudFlare
import os
import re
from os import path
from certbot.plugins import dns_common
__author__ = "Endrigo Antonini"
__copyright__ = "Copyright 2020, Endrigo Antonini"
__license__ = "Apache License 2.0"
__version__ = "1.0"
__maintainer__ = "Endrigo Antonini... | 32.236264 | 110 | 0.670701 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,947 | 0.331856 |
84416b0aa44ff310962bcf2724c753d72fba9519 | 476 | py | Python | main/schemas/location_lat.py | ohioh/ohioh_Framework_Cluster_3_Flask | 69e50b9d697b5e8818305328335d26314b625732 | [
"Apache-2.0"
] | 1 | 2020-08-11T18:37:36.000Z | 2020-08-11T18:37:36.000Z | main/schemas/location_lat.py | ohioh/ohioh_Framework_Cluster_3_Flask | 69e50b9d697b5e8818305328335d26314b625732 | [
"Apache-2.0"
] | null | null | null | main/schemas/location_lat.py | ohioh/ohioh_Framework_Cluster_3_Flask | 69e50b9d697b5e8818305328335d26314b625732 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from marshmallow import Schema, EXCLUDE
import marshmallow.fields as ms_fields
class LocationLatSchema(Schema):
user_id = ms_fields.Str(required=True)
user_timestamp = ms_fields.DateTime(default=datetime.now())
location_id = ms_fields.Str(default="")
latitude = ms_fields... | 23.8 | 63 | 0.737395 | 360 | 0.756303 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0.004202 |
84418df14873be48f72ce565d6b9bb740aefa623 | 411 | py | Python | Python/34-match.py | strawman2511/Learning | 21ee7bdad376060503fdc0a739fed2d7bd40f9b9 | [
"MIT"
] | 1 | 2022-03-16T23:25:54.000Z | 2022-03-16T23:25:54.000Z | Python/34-match.py | strawman2511/Learning | 21ee7bdad376060503fdc0a739fed2d7bd40f9b9 | [
"MIT"
] | null | null | null | Python/34-match.py | strawman2511/Learning | 21ee7bdad376060503fdc0a739fed2d7bd40f9b9 | [
"MIT"
] | null | null | null | # Till now only Python 3.10 can run match statement
def check_point(point):
match point:
case (0, 0):
print("Origin")
case (0, y):
print(f"Y = {y}")
case (x, 0)
print(f"X = {x}")
case (x, y):
print(f"X = {x}, Y = {y}")
case _:
... | 20.55 | 51 | 0.452555 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 111 | 0.270073 |
8441be7fed412cc2b0c06a54eaceebee4908fef7 | 272 | py | Python | incremental/settings.py | Nana0606/IUAD | c52439eb5bbbef6bd50533b5d9e142e18091d85e | [
"BSD-2-Clause"
] | 1 | 2021-07-05T02:20:32.000Z | 2021-07-05T02:20:32.000Z | incremental/settings.py | Nana0606/IUAD | c52439eb5bbbef6bd50533b5d9e142e18091d85e | [
"BSD-2-Clause"
] | null | null | null | incremental/settings.py | Nana0606/IUAD | c52439eb5bbbef6bd50533b5d9e142e18091d85e | [
"BSD-2-Clause"
] | 1 | 2021-08-22T08:45:18.000Z | 2021-08-22T08:45:18.000Z | # python3
# -*- coding: utf-8 -*-
# @Author : lina
# @Time : 2018/4/22 21:17
"""
code function: define all parameters.
"""
matched_file_name = "../data/gcn_res.txt"
wordvec_path = '../data/word2vec.model'
incremental_path = "../data/incremental_res.txt"
| 20.923077 | 49 | 0.628676 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 202 | 0.742647 |
84425e6e37d98a459d555c6b47a64806ebbb0769 | 246 | py | Python | app/newsletter/views.py | valeriansaliou/waaave-web | 8a0cde773563865a905af38f5a0b723a43b17341 | [
"RSA-MD"
] | 1 | 2020-04-06T10:04:43.000Z | 2020-04-06T10:04:43.000Z | app/newsletter/views.py | valeriansaliou/waaave-web | 8a0cde773563865a905af38f5a0b723a43b17341 | [
"RSA-MD"
] | null | null | null | app/newsletter/views.py | valeriansaliou/waaave-web | 8a0cde773563865a905af38f5a0b723a43b17341 | [
"RSA-MD"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
def root(request):
"""
Newsletter > Root
"""
return render(request, 'newsletter/newsletter_root.jade') | 24.6 | 61 | 0.756098 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.268293 |
84464ba3de7de8074ab4f3a72392eb3da290f401 | 16,826 | py | Python | transformer_courses/BERT_distillation/PaddleSlim-develop/paddleslim/nas/search_space/mobilenet_block.py | wwhio/awesome-DeepLearning | 2cc92edcf0c22bdfc670c537cc819c8fadf33fac | [
"Apache-2.0"
] | 1,150 | 2021-06-01T03:44:21.000Z | 2022-03-31T13:43:42.000Z | transformer_courses/BERT_distillation/PaddleSlim-develop/paddleslim/nas/search_space/mobilenet_block.py | wwhio/awesome-DeepLearning | 2cc92edcf0c22bdfc670c537cc819c8fadf33fac | [
"Apache-2.0"
] | 358 | 2021-06-01T03:58:47.000Z | 2022-03-28T02:55:00.000Z | transformer_courses/BERT_distillation/PaddleSlim-develop/paddleslim/nas/search_space/mobilenet_block.py | wwhio/awesome-DeepLearning | 2cc92edcf0c22bdfc670c537cc819c8fadf33fac | [
"Apache-2.0"
] | 502 | 2021-05-31T12:52:14.000Z | 2022-03-31T02:51:41.000Z | # Copyright (c) 2019 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 applic... | 39.130233 | 178 | 0.530013 | 15,693 | 0.932664 | 0 | 0 | 15,737 | 0.935279 | 0 | 0 | 3,005 | 0.178593 |
8446c1c3c431374432b1f4f4b191c7dc6650169d | 1,580 | py | Python | src/cltk/phonology/gmh/phonology.py | yelircaasi/cltk | 1583aa24682543a1f33434a21918f039ca27d60c | [
"MIT"
] | 757 | 2015-11-20T00:58:52.000Z | 2022-03-31T06:34:24.000Z | src/cltk/phonology/gmh/phonology.py | yelircaasi/cltk | 1583aa24682543a1f33434a21918f039ca27d60c | [
"MIT"
] | 950 | 2015-11-17T05:38:29.000Z | 2022-03-14T16:09:34.000Z | src/cltk/phonology/gmh/phonology.py | yelircaasi/cltk | 1583aa24682543a1f33434a21918f039ca27d60c | [
"MIT"
] | 482 | 2015-11-22T18:13:02.000Z | 2022-03-20T21:22:02.000Z | """Middle High German phonology tools
"""
from typing import List
from cltk.phonology.gmh.transcription import Transcriber
from cltk.phonology.syllabify import Syllabifier
__author__ = ["Clément Besnier <clem@clementbesnier.fr>"]
class MiddleHighGermanTranscription:
"""
Middle High German Transcriber
""... | 26.333333 | 103 | 0.666456 | 1,345 | 0.849116 | 0 | 0 | 0 | 0 | 0 | 0 | 757 | 0.477904 |
844826018788435b356bf6f9c896357ffb15fd09 | 11,680 | py | Python | baiduspider/core/parser.py | samzhangjy/GSSpider | 344d9c9053a5d5bf08692e0c817d30763dbd8ab7 | [
"MIT"
] | 31 | 2020-07-17T08:26:37.000Z | 2021-08-24T02:28:50.000Z | baiduspider/core/parser.py | samzhangjy/GSSpider | 344d9c9053a5d5bf08692e0c817d30763dbd8ab7 | [
"MIT"
] | 6 | 2020-07-14T17:13:17.000Z | 2020-09-12T06:02:01.000Z | baiduspider/core/parser.py | samzhangjy/GSSpider | 344d9c9053a5d5bf08692e0c817d30763dbd8ab7 | [
"MIT"
] | 12 | 2020-07-27T08:38:26.000Z | 2021-07-28T16:05:58.000Z | import json
from html import unescape
from bs4 import BeautifulSoup
from baiduspider.core._spider import BaseSpider
from baiduspider.errors import ParseError
class Parser(BaseSpider):
def __init__(self) -> None:
super().__init__()
def parse_web(self, content: str) -> dict:
"""解析百度网页搜索的页面源代码... | 36.72956 | 162 | 0.447603 | 12,365 | 0.986989 | 0 | 0 | 0 | 0 | 0 | 0 | 3,619 | 0.288873 |
8449b868c5c55bebc3c70da12ca1d458ad2a711a | 2,142 | py | Python | virtual/lib/python3.6/site-packages/requests_unixsocket/adapters.py | marknesh/pitches | 0a480d9bc2beafaefa0121393b1502cc05edab89 | [
"MIT"
] | null | null | null | virtual/lib/python3.6/site-packages/requests_unixsocket/adapters.py | marknesh/pitches | 0a480d9bc2beafaefa0121393b1502cc05edab89 | [
"MIT"
] | 10 | 2020-03-08T21:13:29.000Z | 2021-04-08T19:41:14.000Z | flask/lib/python3.6/site-packages/requests_unixsocket/adapters.py | JOFLIX/grapevines | 34576e01184570d79cc140b42ffb71d322132da6 | [
"MIT",
"Unlicense"
] | 1 | 2020-11-04T06:48:34.000Z | 2020-11-04T06:48:34.000Z | import socket
from requests.adapters import HTTPAdapter
from requests.compat import urlparse, unquote
try:
from requests.packages.urllib3.connection import HTTPConnection
from requests.packages.urllib3.connectionpool import HTTPConnectionPool
except ImportError:
from urllib3.connection import HTTPConnectio... | 35.114754 | 77 | 0.710551 | 1,617 | 0.754902 | 0 | 0 | 0 | 0 | 0 | 0 | 466 | 0.217554 |
844a39e610cb54a65514ca7f805b41f45b503518 | 3,021 | py | Python | jarvis/resume/tests/test_utils.py | Anubhav722/blahblah | 160698e06a02e671ac40de3113cd37d642e72e96 | [
"MIT"
] | 1 | 2019-01-03T06:10:04.000Z | 2019-01-03T06:10:04.000Z | jarvis/resume/tests/test_utils.py | Anubhav722/blahblah | 160698e06a02e671ac40de3113cd37d642e72e96 | [
"MIT"
] | 1 | 2021-03-31T19:11:52.000Z | 2021-03-31T19:11:52.000Z | jarvis/resume/tests/test_utils.py | Anubhav722/blahblah | 160698e06a02e671ac40de3113cd37d642e72e96 | [
"MIT"
] | null | null | null | from django.test import TestCase
from jarvis.resume.utils.extractor import get_text
from jarvis.resume.utils.parser_helper import get_urls, get_url_response, url_categories, get_github_username, get_stackoverflow_userid, get_stackoverflow_username, get_name, get_id_from_linkedin_url, get_email
from unidecode import uni... | 43.782609 | 210 | 0.676266 | 1,658 | 0.548825 | 0 | 0 | 0 | 0 | 0 | 0 | 977 | 0.323403 |
844aff8b757e567eab04101d17c08cb3e245797f | 8,032 | py | Python | profiles_weak.py | andreuvall/HybridPlaylistContinuation | 6e31e50050c61a2c3ae55183e18b665fd54c7250 | [
"BSD-2-Clause"
] | 8 | 2017-06-04T11:42:49.000Z | 2021-10-19T12:16:01.000Z | profiles_weak.py | andreuvall/HybridPlaylistContinuation | 6e31e50050c61a2c3ae55183e18b665fd54c7250 | [
"BSD-2-Clause"
] | null | null | null | profiles_weak.py | andreuvall/HybridPlaylistContinuation | 6e31e50050c61a2c3ae55183e18b665fd54c7250 | [
"BSD-2-Clause"
] | 5 | 2017-08-27T17:02:14.000Z | 2020-06-09T01:21:09.000Z | from __future__ import print_function
from __future__ import division
from sklearn.utils import check_random_state
from sklearn import preprocessing as prep
from utils.data import load_data, show_data_splits, shape_data
from utils.evaluation import evaluate
from utils.profiles import select_model, show_design, train,... | 37.886792 | 132 | 0.662475 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,050 | 0.379731 |
844bd667c2563dc8f5e9e83fc9eaf8e0c1857eb6 | 560 | py | Python | news/admin.py | trojsten/news | aa1dfb4ee31a7f810dcd484eecafd49659292d76 | [
"BSD-3-Clause"
] | null | null | null | news/admin.py | trojsten/news | aa1dfb4ee31a7f810dcd484eecafd49659292d76 | [
"BSD-3-Clause"
] | 6 | 2016-07-10T00:22:02.000Z | 2021-12-23T22:43:41.000Z | news/admin.py | trojsten/news | aa1dfb4ee31a7f810dcd484eecafd49659292d76 | [
"BSD-3-Clause"
] | 2 | 2019-04-30T20:20:38.000Z | 2021-02-16T18:41:01.000Z | from django.contrib import admin
from django.db import models
from easy_select2.widgets import Select2Multiple
from news.models import Entry
class EntryAdmin(admin.ModelAdmin):
list_display = ('title', 'pub_date', 'author')
readonly_fields = ('slug',)
exclude = ('author',)
formfield_overrides = {
... | 25.454545 | 61 | 0.682143 | 376 | 0.671429 | 0 | 0 | 0 | 0 | 0 | 0 | 47 | 0.083929 |
844c48d7274f542cdb76ae374555eb9e43a3cc30 | 21,999 | py | Python | deliverable1/analyzer/clientGUI.py | tonellotto/pira-project | 13f1f40fd3339d60067c09396822af8f3c83239c | [
"MIT"
] | null | null | null | deliverable1/analyzer/clientGUI.py | tonellotto/pira-project | 13f1f40fd3339d60067c09396822af8f3c83239c | [
"MIT"
] | null | null | null | deliverable1/analyzer/clientGUI.py | tonellotto/pira-project | 13f1f40fd3339d60067c09396822af8f3c83239c | [
"MIT"
] | null | null | null | import analyzer_client as analyzer
from tkinter import *
from tkinter import filedialog
from tkinter import messagebox
from tkinter import ttk
import json
import os
from pathlib import Path
IP_ADDRESS = "localhost"
PORT = "8061"
ENGINE_CURR_OPTIONS = {}
ANALYZE_CURR_OPTIONS = {'language':'en', 'ent... | 50.456422 | 208 | 0.589027 | 21,338 | 0.969953 | 0 | 0 | 0 | 0 | 0 | 0 | 4,513 | 0.205146 |
844d85dc62ed6dfb3a4f73a387bf2a08be758a8e | 53 | py | Python | 05-functions_and_modules/mods_1.py | palmieric/Tecnologie_Web-Introduzione_a_Python | b10ce49a947b239ca2af1938248f7191937b2f89 | [
"CC0-1.0"
] | 3 | 2021-05-17T14:48:42.000Z | 2021-05-24T10:12:06.000Z | 05-functions_and_modules/mods_1.py | palmieric/Tecnologie_Web-Introduzione_a_Python | b10ce49a947b239ca2af1938248f7191937b2f89 | [
"CC0-1.0"
] | null | null | null | 05-functions_and_modules/mods_1.py | palmieric/Tecnologie_Web-Introduzione_a_Python | b10ce49a947b239ca2af1938248f7191937b2f89 | [
"CC0-1.0"
] | 2 | 2021-05-17T13:52:15.000Z | 2021-05-24T10:44:54.000Z | # mods 1
import random
print(random.randint(1,10))
| 10.6 | 27 | 0.716981 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.150943 |