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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e57c0b31f4195a26edf8f9247751452b0807e246 | 1,709 | py | Python | wifi.py | 4yub1k/Python-Wifi-Password | 913d39fe532c566f96aa3605191d142bea759498 | [
"MIT"
] | null | null | null | wifi.py | 4yub1k/Python-Wifi-Password | 913d39fe532c566f96aa3605191d142bea759498 | [
"MIT"
] | null | null | null | wifi.py | 4yub1k/Python-Wifi-Password | 913d39fe532c566f96aa3605191d142bea759498 | [
"MIT"
] | null | null | null | #@ayuboid --- salahuddin[@]protonmail.ch/com
import subprocess
class t:
def user(self):
x_1=subprocess.Popen("netsh wlan show profiles",stdout=subprocess.PIPE) #run IDE as admin
stdout=x_1.communicate()[0]
return stdout
def password_1(self,name):
for pswd in name:
#r... | 39.744186 | 139 | 0.591574 | 1,560 | 0.912815 | 0 | 0 | 0 | 0 | 0 | 0 | 746 | 0.436513 |
e58014cfc6228afdc63430dc2ea3095af62a76a8 | 760 | py | Python | Dataset/Leetcode/test/53/155.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/test/53/155.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/test/53/155.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | class Solution(object):
def XXX(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
def maxSub(arr,lo,hi):
if lo == hi:return arr[lo]
mid = (lo+hi) // 2
# 左最大
left = maxSub(arr,lo,mid)
# 右最大
right = maxSub... | 28.148148 | 56 | 0.455263 | 778 | 0.997436 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.144872 |
e580b0c306509aee55a5e30612158ccd86541db3 | 23,831 | py | Python | cal_metric.py | BMEngineeR/single_cell_spatial_image | 72676556218605907085a81847cb640a0bc460ea | [
"MIT"
] | 5 | 2021-04-29T12:45:42.000Z | 2021-11-06T23:22:07.000Z | cal_metric.py | OSU-BMBL/single_cell_spatial_image | 61db0da133787885e9f5f7ecc977df0620b62ad7 | [
"MIT"
] | 6 | 2021-02-26T12:36:06.000Z | 2022-02-26T11:44:05.000Z | cal_metric.py | BMEngineeR/single_cell_spatial_image | 72676556218605907085a81847cb640a0bc460ea | [
"MIT"
] | 6 | 2021-04-20T14:01:14.000Z | 2021-11-18T20:18:38.000Z | import os.path as osp
import pickle
import shutil
import tempfile
import os
import mmcv
import numpy as np
import torch
import torch.distributed as dist
from mmcv.image import tensor2imgs
from mmcv.runner import get_dist_info
import pandas as pd
import json
import cv2
from PIL import Image
from sklearn.m... | 43.329091 | 123 | 0.537745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,658 | 0.153498 |
e58484894c5f43692fe7341a176dcb84807da1d8 | 467 | py | Python | asab/proactor/__init__.py | TeskaLabs/asab | f28894b62bad192d8d30df01a8ad1b842ee2a2fb | [
"BSD-3-Clause"
] | 23 | 2018-03-07T18:58:13.000Z | 2022-03-29T17:11:47.000Z | asab/proactor/__init__.py | TeskaLabs/asab | f28894b62bad192d8d30df01a8ad1b842ee2a2fb | [
"BSD-3-Clause"
] | 87 | 2018-04-04T19:44:13.000Z | 2022-03-31T11:18:00.000Z | asab/proactor/__init__.py | TeskaLabs/asab | f28894b62bad192d8d30df01a8ad1b842ee2a2fb | [
"BSD-3-Clause"
] | 10 | 2018-04-30T16:40:25.000Z | 2022-03-09T10:55:24.000Z | import logging
import asab
from .service import ProactorService
#
L = logging.getLogger(__name__)
#
asab.Config.add_defaults(
{
'asab:proactor': {
'max_workers': '0',
'default_executor': True,
}
}
)
class Module(asab.Module):
'''
Proactor pattern based on loop.run_in_executor()
https://en.wikiped... | 14.59375 | 61 | 0.704497 | 248 | 0.531049 | 0 | 0 | 0 | 0 | 0 | 0 | 180 | 0.385439 |
e5851888f1c433217aef830313dc07ac613ce867 | 13,266 | py | Python | mywebsite/shop/views.py | Zadigo/ecommerce_template | a4572c3faeaeb9cd399351c0fd1f19a4ef94de27 | [
"MIT"
] | 16 | 2020-07-01T03:42:40.000Z | 2022-02-21T21:02:27.000Z | mywebsite/shop/views.py | Zadigo/ecommerce_template | a4572c3faeaeb9cd399351c0fd1f19a4ef94de27 | [
"MIT"
] | 14 | 2020-11-19T18:55:28.000Z | 2022-02-01T22:08:23.000Z | mywebsite/shop/views.py | Zadigo/ecommerce_template | a4572c3faeaeb9cd399351c0fd1f19a4ef94de27 | [
"MIT"
] | 7 | 2020-06-30T23:55:36.000Z | 2021-11-12T00:06:40.000Z | """
Conversion Tunnel
------
checkout > shipment > payment > success
Payment process
-------
1. On submitting the form, an AJAX request is
done using Stripe in order to get the token
2. An intermediate view is used afterwards to
process the payment ofn ... | 34.546875 | 99 | 0.635761 | 8,605 | 0.648309 | 0 | 0 | 6,993 | 0.526859 | 0 | 0 | 3,397 | 0.255933 |
e585e2842a0d58243451c36eb2f3bb53a795288e | 245 | py | Python | docker/dataset/stock_analysis/run.py | jojees/operations | bb1a242efbbf56c9afbe4b9e4b5aa14218720e2b | [
"MIT"
] | null | null | null | docker/dataset/stock_analysis/run.py | jojees/operations | bb1a242efbbf56c9afbe4b9e4b5aa14218720e2b | [
"MIT"
] | 2 | 2019-09-22T11:24:19.000Z | 2019-09-22T11:38:49.000Z | docker/dataset/stock_analysis/run.py | jojees/operations | bb1a242efbbf56c9afbe4b9e4b5aa14218720e2b | [
"MIT"
] | null | null | null | """Application entry point."""
from webapp import init_app
app = init_app()
# Using a development configuration
app.config.from_object('config.DevConfig')
# print(app.config)
if __name__ == "__main__":
app.run(host="0.0.0.0", debug=False) | 22.272727 | 42 | 0.722449 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 121 | 0.493878 |
e585fd72caa5f846d1fe6076b952b19c250c6439 | 19,169 | py | Python | utils/yolo_utils.py | Dishoungh/martrec | 74d0cffa3c046509017e1fd121a474ee5b50a194 | [
"MIT"
] | null | null | null | utils/yolo_utils.py | Dishoungh/martrec | 74d0cffa3c046509017e1fd121a474ee5b50a194 | [
"MIT"
] | 1 | 2021-01-28T16:57:41.000Z | 2021-01-28T18:13:34.000Z | utils/yolo_utils.py | Dishoungh/martrec | 74d0cffa3c046509017e1fd121a474ee5b50a194 | [
"MIT"
] | null | null | null | import numpy as np
import cv2 as cv
import time
import os
import sys
import multiprocessing
def init(labelfile, config, weights):
# Get the labels
labels = open(labelfile).read().strip().split('\n')
# Initializing colors to represent each label uniquely
colors = np.random.randint(0, 255, size=(len(lab... | 42.787946 | 194 | 0.440816 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,065 | 0.159894 |
e5862640078cc1b43e3103a6081579e3c5f73b50 | 1,386 | py | Python | collectDataFromNet/postTest.py | xu6148152/Binea_Python_Project | d943eb5f4685d08f080b372dcf1a7cbd5d63efed | [
"MIT"
] | null | null | null | collectDataFromNet/postTest.py | xu6148152/Binea_Python_Project | d943eb5f4685d08f080b372dcf1a7cbd5d63efed | [
"MIT"
] | null | null | null | collectDataFromNet/postTest.py | xu6148152/Binea_Python_Project | d943eb5f4685d08f080b372dcf1a7cbd5d63efed | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
import requests
def simple_post_test():
params = {'firstname': 'Ryan', 'lastname': 'Mitchell'}
r = requests.post("http://pythonscraping.com/files/processing.php", data=params)
print(r.text)
def cookie_test():
params = {'username': 'Ryan', 'password':... | 30.130435 | 94 | 0.647186 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 623 | 0.449495 |
e5882538b7bda731c247750333cac651bac62825 | 775 | py | Python | python_pyxel/pyxel1.py | Perceu/tiktok | c3da4d0a6300867737c1574a552100bdf5eed10f | [
"MIT"
] | null | null | null | python_pyxel/pyxel1.py | Perceu/tiktok | c3da4d0a6300867737c1574a552100bdf5eed10f | [
"MIT"
] | null | null | null | python_pyxel/pyxel1.py | Perceu/tiktok | c3da4d0a6300867737c1574a552100bdf5eed10f | [
"MIT"
] | null | null | null | from turtle import width
import pyxel
from random import randint
class App:
def __init__(self):
width, height = 720, 1280
pyxel.init(width, height)
self.raio = 10
self.color = 1
self.position_x = int(width/2)
self.position_y = int(height/2)
pyxel.run(self.up... | 23.484848 | 76 | 0.575484 | 703 | 0.907097 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e589291903c062b835adf5adc75c3f7669bcca6a | 723 | py | Python | dataset.py | chengsen/Pytorch_model_train_template | 7da63210ac4015df74baef0205776abe9dc2b5d8 | [
"MIT"
] | null | null | null | dataset.py | chengsen/Pytorch_model_train_template | 7da63210ac4015df74baef0205776abe9dc2b5d8 | [
"MIT"
] | null | null | null | dataset.py | chengsen/Pytorch_model_train_template | 7da63210ac4015df74baef0205776abe9dc2b5d8 | [
"MIT"
] | null | null | null | from torch.utils.data import DataLoader, Dataset
__build__ = 2018
__author__ = "singsam_jam@126.com"
def get_loader(args, kwargs):
train_loader = DataLoader(dataset=ModelDataset, batch_size=args.test_batch_size, collate_fn=collate_fn, shuffle=True,
**kwargs)
test_loader = DataLo... | 25.821429 | 121 | 0.672199 | 198 | 0.273859 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.029046 |
e5893301e5d8b6496d1b088428d496d181d86dbc | 2,386 | py | Python | get_apis.py | Pemacope/Assessment_3 | 37591a8c2245b0d64dcb1b75326a7a82de45480f | [
"Unlicense"
] | null | null | null | get_apis.py | Pemacope/Assessment_3 | 37591a8c2245b0d64dcb1b75326a7a82de45480f | [
"Unlicense"
] | null | null | null | get_apis.py | Pemacope/Assessment_3 | 37591a8c2245b0d64dcb1b75326a7a82de45480f | [
"Unlicense"
] | null | null | null | from uk_covid19 import Cov19API
import geocoder
import logging
import requests
import json
logging.basicConfig(filename = "sys.log", encoding = 'utf-8')
#get_location function
def get_location():
"""This function gets the location of the user"""
current_location_data = geocoder.ip('me')
retu... | 28.404762 | 74 | 0.602263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 749 | 0.313915 |
e58b7e482ceb4804189a6da6cf34ef3305149a16 | 81 | py | Python | tests/unit/system_status/formatters/__init__.py | BMeu/Orchard | cd595c9942e4e1ad0032193059f2b39fdf3bcfba | [
"MIT"
] | 2 | 2016-10-06T21:19:32.000Z | 2016-10-06T21:58:04.000Z | tests/unit/system_status/formatters/__init__.py | BMeu/Orchard | cd595c9942e4e1ad0032193059f2b39fdf3bcfba | [
"MIT"
] | 392 | 2016-10-06T17:13:30.000Z | 2021-01-15T04:15:38.000Z | tests/unit/system_status/formatters/__init__.py | BMeu/Orchard | cd595c9942e4e1ad0032193059f2b39fdf3bcfba | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Unit Test: orchard.system_status.formatters
"""
| 13.5 | 47 | 0.592593 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 0.962963 |
e58ccf5e4c1a6de4e6e01e0244878e63b72d84c5 | 5,522 | py | Python | benchmark/how_lineage_benchmark.py | ZhuofanXie/DataTracer | 718f58ca87f297e7541c910a53ca8dde8ed7b66e | [
"MIT"
] | null | null | null | benchmark/how_lineage_benchmark.py | ZhuofanXie/DataTracer | 718f58ca87f297e7541c910a53ca8dde8ed7b66e | [
"MIT"
] | null | null | null | benchmark/how_lineage_benchmark.py | ZhuofanXie/DataTracer | 718f58ca87f297e7541c910a53ca8dde8ed7b66e | [
"MIT"
] | null | null | null | import time
from time import time
import dask
import pandas as pd
from dask.diagnostics import ProgressBar
import datatracer
def transform_single_column(tables, column_info):
aggregation = column_info['aggregation']
column_name = column_info['source_col']['col_name']
fk = column_info['row_map']
if a... | 33.877301 | 121 | 0.641434 | 0 | 0 | 0 | 0 | 2,337 | 0.423216 | 0 | 0 | 1,365 | 0.247193 |
e58deea7e4ceca8f46170fba5c491445e89261b9 | 4,606 | py | Python | pysnmp/H323-TRAP-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/H323-TRAP-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/H323-TRAP-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module H323-TRAP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/H323-TRAP-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:07:51 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 201... | 139.575758 | 559 | 0.745766 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,965 | 0.426617 |
e58f4679796a04818a079751cf89d2d05f6670ee | 2,132 | py | Python | admin.py | dikshith/allcode | b5563f9d9f1839c50396a2d4de70aac5bceb318f | [
"MIT"
] | null | null | null | admin.py | dikshith/allcode | b5563f9d9f1839c50396a2d4de70aac5bceb318f | [
"MIT"
] | null | null | null | admin.py | dikshith/allcode | b5563f9d9f1839c50396a2d4de70aac5bceb318f | [
"MIT"
] | null | null | null | # save this as app.py
from __main__ import app, ALLOWED_EXTENSIONS, UPLOAD_FOLDER
from flask import Flask, request, jsonify, abort, render_template, Flask, flash, redirect, url_for
from werkzeug.utils import secure_filename
import os
import io
import csv
from models import *
def allowed_file(filename):
return '.'... | 37.403509 | 344 | 0.615385 | 0 | 0 | 0 | 0 | 1,637 | 0.767824 | 0 | 0 | 448 | 0.210131 |
e58f86674bdf77a8b5f16bc946bf19c653623803 | 2,057 | py | Python | BSSN_SF/BSSN_ID_function_string.py | kazewong/nrpytutorial | cc511325f37f01284b2b83584beb2a452556b3fb | [
"BSD-2-Clause"
] | null | null | null | BSSN_SF/BSSN_ID_function_string.py | kazewong/nrpytutorial | cc511325f37f01284b2b83584beb2a452556b3fb | [
"BSD-2-Clause"
] | null | null | null | BSSN_SF/BSSN_ID_function_string.py | kazewong/nrpytutorial | cc511325f37f01284b2b83584beb2a452556b3fb | [
"BSD-2-Clause"
] | null | null | null | # This module sets up an initial data function meant to
# be called in a pointwise manner at all gridpoints.
# Author: Zachariah B. Etienne
# zachetie **at** gmail **dot* com
from outputC import *
def BSSN_ID_function_string(cf,hDD,lambdaU,aDD,trK,alpha,vetU,betU):
returnstring = "void BSSN_ID(REAL xx0,R... | 55.594595 | 115 | 0.500243 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 921 | 0.447739 |
e5919a61e375fbb9499ebd4f58ee76df900f51b5 | 8,163 | py | Python | CollectData/instagram_downloader_public.py | erik1110/face-transformation | e9afab85340522c8e19d73b08cedced187d8ada0 | [
"MIT"
] | 1 | 2020-10-04T07:39:50.000Z | 2020-10-04T07:39:50.000Z | CollectData/instagram_downloader_public.py | erik1110/face-transformation | e9afab85340522c8e19d73b08cedced187d8ada0 | [
"MIT"
] | null | null | null | CollectData/instagram_downloader_public.py | erik1110/face-transformation | e9afab85340522c8e19d73b08cedced187d8ada0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# coding:utf-8
"""
Instagram Downloader
"""
import os
import logging
import time
import requests
from datetime import datetime
import tkinter as tk
from tkinter import ttk
from tkinter import messagebox
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from bs4 i... | 32.521912 | 111 | 0.565356 | 7,815 | 0.93425 | 0 | 0 | 0 | 0 | 0 | 0 | 2,270 | 0.271369 |
e5955e9b54c057b715c9c61eeca8482e6b1cbc74 | 474 | py | Python | src/entrypoint.py | nastjamakh/home-credit-risk | 610d5cd4ddfed4298b4119ca1a5d73609a339e6a | [
"MIT"
] | null | null | null | src/entrypoint.py | nastjamakh/home-credit-risk | 610d5cd4ddfed4298b4119ca1a5d73609a339e6a | [
"MIT"
] | null | null | null | src/entrypoint.py | nastjamakh/home-credit-risk | 610d5cd4ddfed4298b4119ca1a5d73609a339e6a | [
"MIT"
] | null | null | null | """CLI interface."""
import fire
from train import TrainingPipeline
from data.load import FileDataLoader
from modelling.estimator import HeuristicEstimator
class Entrypoint:
"""CLI entrypoint."""
def __init__(self) -> None:
self.train = TrainingPipeline()
self.data = FileDataLoader()
... | 18.96 | 50 | 0.672996 | 195 | 0.411392 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 0.166667 |
e59674284af4fef611fde876735095fbdeedb812 | 538 | py | Python | Working folder/refactored/Player_Ability.py | rschnek/SpaceShooterRemix | 7e667183e770679d593f46b119780ad72f4e3135 | [
"MIT"
] | null | null | null | Working folder/refactored/Player_Ability.py | rschnek/SpaceShooterRemix | 7e667183e770679d593f46b119780ad72f4e3135 | [
"MIT"
] | null | null | null | Working folder/refactored/Player_Ability.py | rschnek/SpaceShooterRemix | 7e667183e770679d593f46b119780ad72f4e3135 | [
"MIT"
] | null | null | null | import pygame
from os import path
import constants as con
class ability:
def __init__(self):
self.__power = 1
self.__power_timer = pygame.time.get_ticks()
def powerdown(self):
if pygame.time.get_ticks() - self.__power_timer > con.poweruptime:
self.__power -= 1
... | 24.454545 | 74 | 0.620818 | 478 | 0.888476 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e59820d95011ac7776cfe69371f262bf5dfa9d62 | 3,475 | py | Python | src/preview_item.py | viraelin/yame | 2cd2bfa6143c3578ecede602dd1c05236122c1cf | [
"MIT"
] | null | null | null | src/preview_item.py | viraelin/yame | 2cd2bfa6143c3578ecede602dd1c05236122c1cf | [
"MIT"
] | null | null | null | src/preview_item.py | viraelin/yame | 2cd2bfa6143c3578ecede602dd1c05236122c1cf | [
"MIT"
] | null | null | null | # Copyright (C) 2022 viraelin
# License: MIT
from PyQt6.QtCore import *
from PyQt6.QtWidgets import *
from PyQt6.QtGui import *
import system
from layer_type_menu import LayerType
class PreviewTile(QGraphicsRectItem):
# def __init__(self, item: QStandardItem) -> None:
def __init__(self) -> None:
su... | 29.201681 | 98 | 0.61295 | 3,287 | 0.945899 | 0 | 0 | 0 | 0 | 0 | 0 | 321 | 0.092374 |
e59b01a27430e94ec873e872b409079f3cbd1265 | 781 | py | Python | rznotifier/migrations/0004_auto_20160619_1004.py | rskokan/robozebra | 907ef76b00bef7208078a6ec08260212b2f9aa20 | [
"Apache-2.0"
] | null | null | null | rznotifier/migrations/0004_auto_20160619_1004.py | rskokan/robozebra | 907ef76b00bef7208078a6ec08260212b2f9aa20 | [
"Apache-2.0"
] | null | null | null | rznotifier/migrations/0004_auto_20160619_1004.py | rskokan/robozebra | 907ef76b00bef7208078a6ec08260212b2f9aa20 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-19 08:04
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rznotifier', '0003_loan_notified'),
]
operations = [
migrations.AlterField(
... | 25.193548 | 61 | 0.582586 | 624 | 0.798976 | 0 | 0 | 0 | 0 | 0 | 0 | 162 | 0.207426 |
e59c0f14387bcc428f3ef596243e548882b04d5f | 54 | py | Python | spotifymoods/__init__.py | ammar-oker/spotifymoods | b5f24e48cc6f17fdbf42001e3e5ec00606b07f5c | [
"MIT"
] | null | null | null | spotifymoods/__init__.py | ammar-oker/spotifymoods | b5f24e48cc6f17fdbf42001e3e5ec00606b07f5c | [
"MIT"
] | null | null | null | spotifymoods/__init__.py | ammar-oker/spotifymoods | b5f24e48cc6f17fdbf42001e3e5ec00606b07f5c | [
"MIT"
] | null | null | null | from .train import train
from .predict import predict
| 18 | 28 | 0.814815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e59e35b470fb03223bde0bdc8a8066d61bc5a26b | 1,522 | py | Python | snippets/python/pipe_functional_programming/pipe_example.py | jerabaul29/config_scripts_snippets | c192f50c7cf90088862fd1f4d5678e0936cc375c | [
"MIT"
] | null | null | null | snippets/python/pipe_functional_programming/pipe_example.py | jerabaul29/config_scripts_snippets | c192f50c7cf90088862fd1f4d5678e0936cc375c | [
"MIT"
] | 6 | 2021-10-12T12:27:27.000Z | 2022-03-11T19:45:35.000Z | snippets/python/pipe_functional_programming/pipe_example.py | jerabaul29/config_scripts_snippets | c192f50c7cf90088862fd1f4d5678e0936cc375c | [
"MIT"
] | null | null | null | from pipe import Pipe
from pipe import select as pmap
from pipe import where as filter
from pipe import take
import functools
from icecream import ic
ic.configureOutput(prefix="", outputFunction=print)
"""
For my part, I like to stick to the usual functional programming terminology:
take
map
filter
reduce
"""
# ... | 21.742857 | 85 | 0.631406 | 0 | 0 | 0 | 0 | 86 | 0.056505 | 0 | 0 | 706 | 0.463863 |
e59fc847dbc2cbfebb58016de59804f87b3a6672 | 686 | py | Python | Code/Data_Generator/dgenerator_instances_json.py | AymanABDELHAMID/OD_MTO_DARP | a942faabfa6c1a24d9046d74e56a48bd0d2a6d48 | [
"MIT"
] | 1 | 2020-06-19T18:38:31.000Z | 2020-06-19T18:38:31.000Z | Code/Data_Generator/dgenerator_instances_json.py | AymanABDELHAMID/OD_MTO_DARP | a942faabfa6c1a24d9046d74e56a48bd0d2a6d48 | [
"MIT"
] | null | null | null | Code/Data_Generator/dgenerator_instances_json.py | AymanABDELHAMID/OD_MTO_DARP | a942faabfa6c1a24d9046d74e56a48bd0d2a6d48 | [
"MIT"
] | null | null | null | """
Mai 2020 - Ayman Mahmoud
--------------------------------------------
This code - as the title tells will read the data in
the instances .txt files and generate .json files
along the way the data will be modified to input missing data from the instances given
"""
import re
second_part = False
costs = []
with op... | 26.384615 | 86 | 0.590379 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 318 | 0.463557 |
e5a1307319cf2f807f6042d57a0f8ef329aff915 | 2,322 | py | Python | Modulos/cfirm.py | ovpn-web/lundy | 15f6743995aa5916ba5957dd284e695d1dcc83d5 | [
"CC0-1.0"
] | 1 | 2020-07-14T16:48:06.000Z | 2020-07-14T16:48:06.000Z | Modulos/cfirm.py | ovpn-web/lundy | 15f6743995aa5916ba5957dd284e695d1dcc83d5 | [
"CC0-1.0"
] | null | null | null | Modulos/cfirm.py | ovpn-web/lundy | 15f6743995aa5916ba5957dd284e695d1dcc83d5 | [
"CC0-1.0"
] | 1 | 2021-12-27T00:38:34.000Z | 2021-12-27T00:38:34.000Z | #!/usr/bin/env python
# encoding: utf-8
import smtplib,socket,sys
from os import system
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from datetime import datetime
_NOME_ = sys.argv[1]
_IP_ = sys.argv[2]
_ADRESS_OS_ = '/etc/issue.net'
OS = open(_ADRESS_OS_).readlines()
for SYS in O... | 40.736842 | 108 | 0.586994 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,718 | 0.679051 |
e5a13e5250764c306a86cb714394aa76f09f4016 | 673 | py | Python | pollsite/poll/migrations/0009_remove_meeting_meeting_date_start_and_more.py | RduMarais/django-polling-site | d194e906cd099531257cf0537b1664295f593c05 | [
"MIT"
] | 2 | 2022-01-11T16:46:36.000Z | 2022-01-11T16:46:51.000Z | pollsite/poll/migrations/0009_remove_meeting_meeting_date_start_and_more.py | RduMarais/django-polling-site | d194e906cd099531257cf0537b1664295f593c05 | [
"MIT"
] | null | null | null | pollsite/poll/migrations/0009_remove_meeting_meeting_date_start_and_more.py | RduMarais/django-polling-site | d194e906cd099531257cf0537b1664295f593c05 | [
"MIT"
] | null | null | null | # Generated by Django 4.0 on 2022-01-06 16:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('poll', '0008_remove_meeting_meeting_date_and_more'),
]
operations = [
migrations.RemoveField(
model_name='meeting',
na... | 24.925926 | 89 | 0.594354 | 582 | 0.864785 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.288262 |
e5a27f53e59e6bdb43b79f5ce55cc60189760583 | 5,790 | py | Python | lcrequest.py | nigelboid/lc-investor | 65f5de5c7a4c082fa3e090e4479a78d7432edfdb | [
"MIT"
] | 2 | 2015-10-13T02:54:49.000Z | 2015-11-12T21:59:34.000Z | lcrequest.py | nigelboid/lc-investor | 65f5de5c7a4c082fa3e090e4479a78d7432edfdb | [
"MIT"
] | null | null | null | lcrequest.py | nigelboid/lc-investor | 65f5de5c7a4c082fa3e090e4479a78d7432edfdb | [
"MIT"
] | null | null | null | #
# Import all necessary libraries
#
import requests
#
# Define some global constants
#
VERSION= '1.0.0'
# API request building blocks
API_VERSION= 'v1'
REQUEST_ROOT= 'https://api.lendingclub.com/api/investor/{}/'.format(API_VERSION)
REQUEST_LOANS= 'loans/listing?showAll=true'
REQUEST_ACCOUNTS= 'accounts/{}/'
REQU... | 35.304878 | 215 | 0.721934 | 4,867 | 0.840587 | 0 | 0 | 0 | 0 | 0 | 0 | 1,559 | 0.269257 |
e5a3174fd3725503784105163c310d47e1598ce0 | 8,317 | py | Python | exegis/analysis.py | gruel/AphorismToTEI | 6d33a353c4b4f159af62e061618ff03a1f09fb7f | [
"BSD-3-Clause"
] | null | null | null | exegis/analysis.py | gruel/AphorismToTEI | 6d33a353c4b4f159af62e061618ff03a1f09fb7f | [
"BSD-3-Clause"
] | null | null | null | exegis/analysis.py | gruel/AphorismToTEI | 6d33a353c4b4f159af62e061618ff03a1f09fb7f | [
"BSD-3-Clause"
] | null | null | null | """Module which contains the function to analyse aphorism and commentaries line
There are two functions which are treating the references ``[W1 W2]``
and the footnotes *XXX*.
The ``references`` function has to be used before the ``footnotes``.
:Authors: Jonathan Boyle, Nicolas Gruel <nicolas.gruel@manchester.ac.uk>
... | 35.391489 | 79 | 0.597451 | 79 | 0.009499 | 0 | 0 | 0 | 0 | 0 | 0 | 4,939 | 0.593844 |
e5a35747d0cd68dc4fa0ce60853f7e9f138b0cb3 | 21,201 | py | Python | ThesisPlot.py | dtiarks/ThesisPlot | b9eaa5f2b2c472667cb17b2ba5a0471c741f0abe | [
"MIT"
] | 1 | 2018-12-27T01:35:40.000Z | 2018-12-27T01:35:40.000Z | ThesisPlot.py | dtiarks/ThesisPlot | b9eaa5f2b2c472667cb17b2ba5a0471c741f0abe | [
"MIT"
] | null | null | null | ThesisPlot.py | dtiarks/ThesisPlot | b9eaa5f2b2c472667cb17b2ba5a0471c741f0abe | [
"MIT"
] | null | null | null | import locale
import numpy as np
import io
import json
import pandas as pd
import ast
import os
# Set to German locale to get comma decimal separater
locale.setlocale(locale.LC_NUMERIC, 'deu_deu')
#locale.setlocale(locale.LC_NUMERIC, 'de_DE.utf8')
import matplotlib as mpl
mpl.use('pgf')
preamble = [
# use utf8 fon... | 52.738806 | 274 | 0.466582 | 14,567 | 0.68709 | 0 | 0 | 0 | 0 | 0 | 0 | 8,086 | 0.381397 |
e5a7b8b0481012f5ade5147dd6e2ed6513934354 | 1,695 | py | Python | update_damage_sheet.py | faith-grins/RS-RS-DamageRankings | 667387bb8971ea57d8ff669efb62ea7c2ef61f8e | [
"Apache-2.0"
] | null | null | null | update_damage_sheet.py | faith-grins/RS-RS-DamageRankings | 667387bb8971ea57d8ff669efb62ea7c2ef61f8e | [
"Apache-2.0"
] | null | null | null | update_damage_sheet.py | faith-grins/RS-RS-DamageRankings | 667387bb8971ea57d8ff669efb62ea7c2ef61f8e | [
"Apache-2.0"
] | null | null | null | import gspread
# If modifying these scopes, delete the file token.json.
SCOPES = ['https://www.googleapis.com/auth/spreadsheets']
CLIENT_SECRET_FILE = '.secrets/PythonSheetsApiSecret.json'
CREDENTIALS_TOKEN = '.secrets/token.json'
# The ID and range of a sample spreadsheet.
SPREADSHEET_ID = '1oc5TC_nGzLXk4sP3zhlyFeYt... | 30.818182 | 118 | 0.756342 | 44 | 0.025959 | 0 | 0 | 0 | 0 | 0 | 0 | 444 | 0.261947 |
e5a938e5e2ec369977b37c0a78e456d48e469534 | 350 | py | Python | Intermediate/json-data.py | abhishek8075374519/python-for-beginners | a3c0334751001c6468819af7c8ae7ec0993a48c3 | [
"MIT"
] | null | null | null | Intermediate/json-data.py | abhishek8075374519/python-for-beginners | a3c0334751001c6468819af7c8ae7ec0993a48c3 | [
"MIT"
] | null | null | null | Intermediate/json-data.py | abhishek8075374519/python-for-beginners | a3c0334751001c6468819af7c8ae7ec0993a48c3 | [
"MIT"
] | null | null | null | import json as j
# CONVERTING TO JSON
data = {
"Name": "John Doe",
"Age": "22"
}
y = j.dumps(data)
print(y)
# A LIST IS CONVERTED INTO JSON EQUIVALENT ARRAY
data = [1, 2, 3, 4, 5]
i = j.dumps(data)
print(i)
# READING FROM JSON
x = '{ "name":"John", "age":30, "city":"New York"}'
y = j.loads(x... | 16.666667 | 52 | 0.554286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 167 | 0.477143 |
e5aa8f799f1cb16c92d8d94d9ce091e420f85e52 | 958 | py | Python | programdom/problems/urls.py | vCra/Programdom | 23d734409102917734e67d233768b494904a5cef | [
"MIT"
] | 1 | 2021-06-14T01:08:55.000Z | 2021-06-14T01:08:55.000Z | programdom/problems/urls.py | vCra/Programdom | 23d734409102917734e67d233768b494904a5cef | [
"MIT"
] | 10 | 2019-01-28T16:03:12.000Z | 2019-01-28T16:09:48.000Z | programdom/problems/urls.py | vCra/Programdom | 23d734409102917734e67d233768b494904a5cef | [
"MIT"
] | null | null | null | from django.urls import path
from programdom.problems.views import ProblemStudentView, ProblemListView, ProblemDetailView, ProblemDeleteView, \
ProblemCreateView, ProblemTestcaseCreateView, ProblemTestCaseUpdateView, ProblemTestCaseDeleteView
urlpatterns = [
path("", ProblemListView.as_view(), name="problem_l... | 50.421053 | 114 | 0.746347 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 281 | 0.293319 |
e5ab3b077876292916d291b072dc3571dc23411f | 3,023 | py | Python | Diff-TVT.py | vipersnews/py-tvt-nbn | 02164752db44967c33001f0c738f69feb1a2b283 | [
"Unlicense"
] | null | null | null | Diff-TVT.py | vipersnews/py-tvt-nbn | 02164752db44967c33001f0c738f69feb1a2b283 | [
"Unlicense"
] | null | null | null | Diff-TVT.py | vipersnews/py-tvt-nbn | 02164752db44967c33001f0c738f69feb1a2b283 | [
"Unlicense"
] | null | null | null | from getpass import getpass
import netmiko
import re
import difflib
def make_connection (ip, username, password):
return netmiko.ConnectHandler(device_type='cisco_ios', ip=ip, username=username, password=password)
def get_ip (input):
return(re.findall(r'(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2... | 32.159574 | 120 | 0.68872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,367 | 0.4522 |
e5ac1349e31fac2f5f5e8ce25f69ca68f7e752f0 | 28 | py | Python | pyiArduinoI2Cmotor/__init__.py | tremaru/pyiArduinoI2Cmotor | 5e83c4ab1beaf6041663f4399028a5d3f5fa3f56 | [
"MIT"
] | null | null | null | pyiArduinoI2Cmotor/__init__.py | tremaru/pyiArduinoI2Cmotor | 5e83c4ab1beaf6041663f4399028a5d3f5fa3f56 | [
"MIT"
] | null | null | null | pyiArduinoI2Cmotor/__init__.py | tremaru/pyiArduinoI2Cmotor | 5e83c4ab1beaf6041663f4399028a5d3f5fa3f56 | [
"MIT"
] | null | null | null | name = "pyiArduinoI2Cmotor"
| 14 | 27 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.714286 |
e5ac46d95f62c31e2cdcf0a830026f35e4bd572a | 620 | py | Python | code/python/echomesh/output/Registry.py | rec/echomesh | be668971a687b141660fd2e5635d2fd598992a01 | [
"MIT"
] | 30 | 2015-02-18T14:07:00.000Z | 2021-12-11T15:19:01.000Z | code/python/echomesh/output/Registry.py | rec/echomesh | be668971a687b141660fd2e5635d2fd598992a01 | [
"MIT"
] | 16 | 2015-01-01T23:17:24.000Z | 2015-04-18T23:49:27.000Z | code/python/echomesh/output/Registry.py | rec/echomesh | be668971a687b141660fd2e5635d2fd598992a01 | [
"MIT"
] | 31 | 2015-03-11T20:04:07.000Z | 2020-11-02T13:56:59.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
from echomesh.util.registry.Module import register
from echomesh.output.OutputCache import OutputCache
REGISTRY = register(
__name__,
'Bidirectional',
'Offset',
'Output',
'Map',
'Spi',
'Test',
'Visualizer',
)
OUTPUT_CA... | 22.142857 | 82 | 0.73871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.108065 |
e5ad2e5b2f0edde8b2e2a850a9a192abd378fd9f | 1,221 | py | Python | pihkaparser.py | K4ldun/slack-starterbot | e0c1468df3b343715cf88f66b5cdb959daa25c0e | [
"MIT"
] | null | null | null | pihkaparser.py | K4ldun/slack-starterbot | e0c1468df3b343715cf88f66b5cdb959daa25c0e | [
"MIT"
] | null | null | null | pihkaparser.py | K4ldun/slack-starterbot | e0c1468df3b343715cf88f66b5cdb959daa25c0e | [
"MIT"
] | null | null | null | from selenium import webdriver #Browser control with options/waits/exceptions.
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
from bs4 import BeautifulSoup
import json
def main():
opts = Options()
opts.add_argument('--headless')
opts.add_argument('--disable-gp... | 23.480769 | 79 | 0.692056 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 269 | 0.220311 |
e5ae60de2c631682842c6e19a0b866b268ecc7f0 | 203 | py | Python | learning_python/ex19.py | wcsten/Python-exercises- | cd025b37fa37d847d8ce4f3aff4be6f7b0b5d487 | [
"MIT"
] | null | null | null | learning_python/ex19.py | wcsten/Python-exercises- | cd025b37fa37d847d8ce4f3aff4be6f7b0b5d487 | [
"MIT"
] | null | null | null | learning_python/ex19.py | wcsten/Python-exercises- | cd025b37fa37d847d8ce4f3aff4be6f7b0b5d487 | [
"MIT"
] | null | null | null | # Ler dois valores (considere que não serão lidos valores iguais) e escrever o maior deles.
n1 = float(input('Numero 1:'))
n2 = float(input('Numero 2: '))
if n1 > n2:
print(n1)
else:
print(n2)
| 20.3 | 91 | 0.660099 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.565854 |
e5ae9ba55496f9a8c174dd1ac0caa3926485c92a | 2,277 | py | Python | RFEM/TypesForMembers/memberResultIntermediatePoints.py | Dlubal-Software/RFEM_Python_Client | 9e29c598dadf380d49677c463931f0be659ccc40 | [
"MIT"
] | 16 | 2021-10-13T21:00:11.000Z | 2022-03-21T11:12:09.000Z | RFEM/TypesForMembers/memberResultIntermediatePoints.py | Dlubal-Software/RFEM_Python_Client | 9e29c598dadf380d49677c463931f0be659ccc40 | [
"MIT"
] | 49 | 2021-10-19T13:18:51.000Z | 2022-03-30T08:20:17.000Z | RFEM/TypesForMembers/memberResultIntermediatePoints.py | Dlubal-Software/RFEM_Python_Client | 9e29c598dadf380d49677c463931f0be659ccc40 | [
"MIT"
] | 7 | 2021-10-13T06:06:24.000Z | 2022-03-29T17:48:39.000Z | from RFEM.initModel import ConvertToDlString, Model, clearAtributes
class MemberResultIntermediatePoint():
def __init__(self,
no: int = 1,
members: str = "",
point_count: int = 2,
uniform_distribution: bool = True,
distances = Non... | 36.725806 | 119 | 0.615283 | 2,207 | 0.969258 | 0 | 0 | 0 | 0 | 0 | 0 | 809 | 0.355292 |
e5aecff027dc26da16498680b52ebce4340235d7 | 12,433 | py | Python | migrations/versions/bdeeeacbec4d_initial_schema.py | Innopoints/backend | 723565ba3f63914a7dab03346696d89e28060d64 | [
"MIT"
] | 1 | 2020-11-30T17:41:36.000Z | 2020-11-30T17:41:36.000Z | migrations/versions/bdeeeacbec4d_initial_schema.py | Innopoints/backend | 723565ba3f63914a7dab03346696d89e28060d64 | [
"MIT"
] | 34 | 2020-04-18T19:31:27.000Z | 2021-03-19T13:56:56.000Z | migrations/versions/bdeeeacbec4d_initial_schema.py | Innopoints/backend | 723565ba3f63914a7dab03346696d89e28060d64 | [
"MIT"
] | null | null | null | """Initial schema
Revision ID: bdeeeacbec4d
Revises:
Create Date: 2020-04-11 11:20:18.814141
"""
import json
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'bdeeeacbec4d'
down_revision = None
branch_labels = None
depends_... | 50.54065 | 332 | 0.696292 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,067 | 0.327113 |
e5b00d7e128695512faf3dee89d09b98e4ae7a89 | 636 | py | Python | build/lib/DateTimeTools/DayNotoDate.py | pshustov/DateTimeTools | e542fd3f0e3c5290faad09b7cf8a2751132d4dd3 | [
"MIT"
] | null | null | null | build/lib/DateTimeTools/DayNotoDate.py | pshustov/DateTimeTools | e542fd3f0e3c5290faad09b7cf8a2751132d4dd3 | [
"MIT"
] | null | null | null | build/lib/DateTimeTools/DayNotoDate.py | pshustov/DateTimeTools | e542fd3f0e3c5290faad09b7cf8a2751132d4dd3 | [
"MIT"
] | null | null | null | import numpy as np
from ._CFunctions import _CDayNotoDate
from ._CTConv import _CTConv
def DayNotoDate(Year,Doy):
'''
Converts year and day numbers to a date of the format yyyymmdd.
Inputs
======
Year : int32
Array or scalar of years
Doy : int32
Array or scalar of day numbers
Returns
=======
Date : i... | 19.272727 | 64 | 0.698113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 357 | 0.561321 |
e5b241b8fb352b546133a594008c04d79660503c | 4,996 | py | Python | BigDataArchitecture/application_pod/application.py | Brebeck-Jan/AlphaBigDataTech | df7b63056e7067e366e72193ec8260dbc59b53bb | [
"MIT"
] | null | null | null | BigDataArchitecture/application_pod/application.py | Brebeck-Jan/AlphaBigDataTech | df7b63056e7067e366e72193ec8260dbc59b53bb | [
"MIT"
] | null | null | null | BigDataArchitecture/application_pod/application.py | Brebeck-Jan/AlphaBigDataTech | df7b63056e7067e366e72193ec8260dbc59b53bb | [
"MIT"
] | null | null | null | ##########################################################################################
##########################################################################################
# BigData - Application #
#################################################################... | 37.007407 | 90 | 0.45036 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,938 | 0.586779 |
e5b26b56fc6da7a7d52f30abc550181b0a2029e2 | 112 | py | Python | src/nwb_datajoint/data_import/__init__.py | jihyunbak/spyglass | 780fe2c101db60d42a1b73ad8fd729db42620ba6 | [
"MIT"
] | 14 | 2020-02-04T20:05:02.000Z | 2022-03-13T18:13:20.000Z | src/nwb_datajoint/data_import/__init__.py | jihyunbak/spyglass | 780fe2c101db60d42a1b73ad8fd729db42620ba6 | [
"MIT"
] | 118 | 2020-06-15T16:40:48.000Z | 2022-03-21T17:25:47.000Z | src/nwb_datajoint/data_import/__init__.py | jihyunbak/spyglass | 780fe2c101db60d42a1b73ad8fd729db42620ba6 | [
"MIT"
] | 16 | 2020-02-04T19:04:07.000Z | 2022-03-18T21:15:32.000Z | from .insert_sessions import insert_sessions
from .storage_dirs import base_dir, check_env, kachery_storage_dir
| 37.333333 | 66 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e5b81ac7187e3d891702be4006393c6f2fc6c15a | 327 | py | Python | apps/experiments/models.py | mikicz/bulk-update-tests | 85bca2ea05513c42d8f12e3439c27853bbed8c44 | [
"MIT"
] | 1 | 2020-02-23T18:16:48.000Z | 2020-02-23T18:16:48.000Z | apps/experiments/models.py | mikicz/bulk-update-tests | 85bca2ea05513c42d8f12e3439c27853bbed8c44 | [
"MIT"
] | null | null | null | apps/experiments/models.py | mikicz/bulk-update-tests | 85bca2ea05513c42d8f12e3439c27853bbed8c44 | [
"MIT"
] | 1 | 2020-01-23T14:21:44.000Z | 2020-01-23T14:21:44.000Z | from django.db import models
class Experiment(models.Model):
INBUILT = 0
PACKAGE = 1
method = models.IntegerField()
field_types = models.CharField(max_length=100)
fields = models.SmallIntegerField()
count = models.IntegerField()
batch_size = models.IntegerField()
time = models.FloatF... | 21.8 | 50 | 0.700306 | 295 | 0.902141 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e5b95944808ec9a85548a9ce892ca8f3e8424bc3 | 751 | py | Python | spammer.py | Potatosil/Pyhton-Discord-Spam-Bot | 7d3f12ae4e9c9933754be484ec2755c22ca079d1 | [
"CC0-1.0"
] | 2 | 2021-11-27T15:54:27.000Z | 2022-01-14T11:21:51.000Z | spammer.py | Potatosil/Python-Discord-Spam-Bot | 7d3f12ae4e9c9933754be484ec2755c22ca079d1 | [
"CC0-1.0"
] | null | null | null | spammer.py | Potatosil/Python-Discord-Spam-Bot | 7d3f12ae4e9c9933754be484ec2755c22ca079d1 | [
"CC0-1.0"
] | null | null | null | import pyautogui, time
from time import sleep
spamnum = int(input(f"Input Number: "))
spamtext = input(f"What is the Message u want to send?: ")
time = 0
while time != 10:
time += 1
sleep(1)
print("spammer waitinig.." + str(time))
def spam (msg, maxMsg):
count = 0
while count != maxMsg:
count +... | 25.033333 | 228 | 0.6498 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 111 | 0.147803 |
e5bc642c6a81db7a4fc50c2b2445c823d9de303f | 12,795 | py | Python | alterations.py | AlexysAlves/Simulacao_de_trafego | 8193b8a47d284c1b84f2903d286d222f3984bbf1 | [
"MIT"
] | null | null | null | alterations.py | AlexysAlves/Simulacao_de_trafego | 8193b8a47d284c1b84f2903d286d222f3984bbf1 | [
"MIT"
] | null | null | null | alterations.py | AlexysAlves/Simulacao_de_trafego | 8193b8a47d284c1b84f2903d286d222f3984bbf1 | [
"MIT"
] | null | null | null | import random
import time
import threading
import pygame
import sys
# Default values of signal timers
defaultGreen = {0: 10, 1: 10, 2: 10, 3: 10}
defaultRed = 150
defaultYellow = 5
signals = []
noOfSignals = 4
currentGreen = 0 # Indicates which signal is green currently
nextGreen = (currentGreen + 1) % noOfSignals ... | 41.407767 | 220 | 0.590074 | 7,565 | 0.591247 | 0 | 0 | 0 | 0 | 0 | 0 | 2,282 | 0.178351 |
e5bc9bb9de777c853bd717ee97128cd3e2825f2c | 6,327 | py | Python | pylbm/mpi_topology.py | Mopolino8/pylbm | b457ccdf1e7a1009807bd1136a276886f81a9e7d | [
"BSD-3-Clause"
] | 106 | 2016-09-13T07:19:17.000Z | 2022-03-19T13:41:55.000Z | pylbm/mpi_topology.py | Mopolino8/pylbm | b457ccdf1e7a1009807bd1136a276886f81a9e7d | [
"BSD-3-Clause"
] | 53 | 2017-09-18T04:51:19.000Z | 2022-01-19T21:36:23.000Z | pylbm/mpi_topology.py | gouarin/pylbm | fd4419933e05b85be364232fddedfcb4f7275e1f | [
"BSD-3-Clause"
] | 33 | 2016-06-17T13:21:17.000Z | 2021-11-11T16:57:46.000Z | # Authors:
# Loic Gouarin <loic.gouarin@polytechnique.edu>
# Benjamin Graille <benjamin.graille@math.u-psud.fr>
#
# License: BSD 3 clause
"""
Module which implements a Cartesian MPI topology
"""
import numpy as np
import mpi4py.MPI as mpi
from .options import options
class MpiTopology:
"""
Interface... | 26.472803 | 89 | 0.5633 | 4,629 | 0.731626 | 0 | 0 | 0 | 0 | 0 | 0 | 3,633 | 0.574206 |
e5bd1c8d864738a7eee90d8736eddcad096e5f3d | 10,060 | py | Python | exact.py | jesgadiaz/ckc | 717e7289fff530ea5be4d6db94dc2936e355ed8c | [
"Apache-2.0"
] | 1 | 2020-02-20T10:01:03.000Z | 2020-02-20T10:01:03.000Z | exact.py | jesgadiaz/ckc | 717e7289fff530ea5be4d6db94dc2936e355ed8c | [
"Apache-2.0"
] | null | null | null | exact.py | jesgadiaz/ckc | 717e7289fff530ea5be4d6db94dc2936e355ed8c | [
"Apache-2.0"
] | 1 | 2019-12-05T05:30:50.000Z | 2019-12-05T05:30:50.000Z | from gurobipy import *
import math
import numpy as np
import heapq
def heap_sort(items):
heapq.heapify(items)
items[:] = [heapq.heappop(items) for i in range(len(items))]
return items
def createGraph(input_file, instance_format):
global n, m , k, matrix, ordered_sizes
if instance_forma... | 37.677903 | 193 | 0.41004 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,464 | 0.24493 |
e5bd703be1b27cb762cec30b232a4d069f3d4c16 | 204 | py | Python | PySrc/4day/Mod00.py | Timmy-Oh/Adorable-Lab | c21454d011e6888fd28c41d1624721ea1826be40 | [
"Apache-2.0"
] | null | null | null | PySrc/4day/Mod00.py | Timmy-Oh/Adorable-Lab | c21454d011e6888fd28c41d1624721ea1826be40 | [
"Apache-2.0"
] | null | null | null | PySrc/4day/Mod00.py | Timmy-Oh/Adorable-Lab | c21454d011e6888fd28c41d1624721ea1826be40 | [
"Apache-2.0"
] | null | null | null | # Mod00.py
print('name: {}'.format(__name__))
import Calc00
import Calc00 as c
from Calc00 import *
x= 20; y= 10;
Calc00.Sum(x, y)
c.Sub(x,y)
Mul(x,y)
import sys
for path in sys.path:
print(path)
| 12 | 34 | 0.661765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.098039 |
e5bd9846792ca0380e9358b95728eb11553310f8 | 1,887 | py | Python | bot.py | liamkirsh/FBChatBot | 59eafee2c78f2d6a93c38a74fecf1a4d311a00e9 | [
"MIT"
] | 3 | 2017-07-23T20:10:19.000Z | 2020-09-23T21:21:47.000Z | bot.py | liamkirsh/FBChatBot | 59eafee2c78f2d6a93c38a74fecf1a4d311a00e9 | [
"MIT"
] | 1 | 2018-03-06T05:34:07.000Z | 2018-03-07T19:51:18.000Z | bot.py | liamkirsh/FBChatBot | 59eafee2c78f2d6a93c38a74fecf1a4d311a00e9 | [
"MIT"
] | null | null | null | from collections import namedtuple
from fbchat import Client
from fbchat.models import ThreadType
class Bot(Client):
Command = namedtuple('Command', ['func', 'admin', 'directed'])
def __init__(self, email, password, name, admins=[], protected=[], *args, **kwargs):
super(Bot, self).__init__(email=ema... | 38.510204 | 88 | 0.598304 | 1,784 | 0.945416 | 0 | 0 | 0 | 0 | 0 | 0 | 212 | 0.112348 |
e5bdc2fd22c992b2cd181d55011e5aa6b716ab9f | 80 | py | Python | devices/windows_wsl.py | premandfriends/boardfarm-1 | 3c952c94507fff25ba9955cad993610ea4a95e2e | [
"BSD-3-Clause-Clear"
] | null | null | null | devices/windows_wsl.py | premandfriends/boardfarm-1 | 3c952c94507fff25ba9955cad993610ea4a95e2e | [
"BSD-3-Clause-Clear"
] | 1 | 2019-02-03T17:06:21.000Z | 2019-02-03T17:06:21.000Z | devices/windows_wsl.py | mgualco-contractor/boardfarm | 6a033e5dc84c7368fdd8ec2738b08b35ca7b07e7 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-03-05T01:58:34.000Z | 2020-03-05T01:58:34.000Z | import debian
class WindowsWSL(debian.DebianBox):
model = ('windows_wsl')
| 13.333333 | 35 | 0.725 | 64 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.1625 |
e5bfc9b67168b7368cc1fe061546a71eda82eb03 | 242 | py | Python | zeroshot_topics/utils.py | charyeezy/zeroshot_topics | c77b12fcd82b87703eb6e92d6eac6d741c4de59f | [
"Apache-2.0",
"MIT"
] | 49 | 2021-11-21T08:33:05.000Z | 2022-03-11T22:47:00.000Z | zeroshot_topics/utils.py | charyeezy/zeroshot_topics | c77b12fcd82b87703eb6e92d6eac6d741c4de59f | [
"Apache-2.0",
"MIT"
] | 4 | 2021-11-22T13:54:44.000Z | 2022-01-07T19:43:08.000Z | zeroshot_topics/utils.py | charyeezy/zeroshot_topics | c77b12fcd82b87703eb6e92d6eac6d741c4de59f | [
"Apache-2.0",
"MIT"
] | 4 | 2021-11-22T18:39:45.000Z | 2022-02-24T05:11:56.000Z | from functools import lru_cache
from transformers import pipeline
@lru_cache
def load_zeroshot_model(model_name="valhalla/distilbart-mnli-12-6"):
classifier = pipeline("zero-shot-classification", model=model_name)
return classifier
| 26.888889 | 71 | 0.805785 | 0 | 0 | 0 | 0 | 173 | 0.714876 | 0 | 0 | 57 | 0.235537 |
e5c0e09f7a45cb2ecf9eba32890f4af165a441f0 | 273 | py | Python | Draft/Decode a cipher.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 6 | 2020-09-03T09:32:25.000Z | 2020-12-07T04:10:01.000Z | Draft/Decode a cipher.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 1 | 2021-12-13T15:30:21.000Z | 2021-12-13T15:30:21.000Z | Draft/Decode a cipher.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | null | null | null | table={i:j for i,j in enumerate("abcdefghijklmnopqrstuvwxyz"+"abcdefghijklmnopqrstuvwxyz".upper())}
def decode(cipher, b, c):
cipher.insert(0, 0)
res=[]
for i in range(1, len(cipher)):
res.append(table[cipher[i]-cipher[i-1]-b-c])
return "".join(res) | 39 | 99 | 0.655678 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.212454 |
e5c1039cda0312feb3e593ae896f87fa3acd4dcc | 53 | py | Python | src/HABApp/rule/scheduler/__init__.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 44 | 2018-12-13T08:46:44.000Z | 2022-03-07T03:23:21.000Z | src/HABApp/rule/scheduler/__init__.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 156 | 2019-03-02T20:53:31.000Z | 2022-03-23T13:13:58.000Z | src/HABApp/rule/scheduler/__init__.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 18 | 2019-03-08T07:13:21.000Z | 2022-03-22T19:52:31.000Z | from .habappschedulerview import HABAppSchedulerView
| 26.5 | 52 | 0.90566 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e5c143fee608434a37b93838fcca4dd45eb0545b | 627 | py | Python | cases/migrations/0002_auto_20200506_2202.py | testyourcodenow/core | 05865b02ff7e60ffd3b30652161b3523046b9696 | [
"MIT"
] | 1 | 2020-05-10T06:40:58.000Z | 2020-05-10T06:40:58.000Z | cases/migrations/0002_auto_20200506_2202.py | testyourcodenow/core | 05865b02ff7e60ffd3b30652161b3523046b9696 | [
"MIT"
] | 25 | 2020-05-03T08:10:38.000Z | 2021-09-22T18:59:29.000Z | cases/migrations/0002_auto_20200506_2202.py | testyourcodenow/core | 05865b02ff7e60ffd3b30652161b3523046b9696 | [
"MIT"
] | 10 | 2020-05-03T08:25:56.000Z | 2020-06-03T06:49:34.000Z | # Generated by Django 3.0.3 on 2020-05-06 22:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cases', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='visual',
name='id',
field=mod... | 25.08 | 119 | 0.586922 | 534 | 0.851675 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.161085 |
e5c399ccf40bc25cefef6274b5920b5a4ae32549 | 7,048 | py | Python | dssm/train.py | nlpming/tensorflow-DSMM | dc982cc49bf03f474da2895e4dd4fb37061c0271 | [
"MIT"
] | null | null | null | dssm/train.py | nlpming/tensorflow-DSMM | dc982cc49bf03f474da2895e4dd4fb37061c0271 | [
"MIT"
] | null | null | null | dssm/train.py | nlpming/tensorflow-DSMM | dc982cc49bf03f474da2895e4dd4fb37061c0271 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#encoding=utf-8
'''
@Time : 2020/10/25 22:28:30
@Author : zhiyang.zzy
@Contact : zhiyangchou@gmail.com
@Desc : 训练相似度模型
1. siamese network,分别使用 cosine、曼哈顿距离
2. triplet loss
'''
# here put the import lib
from model.bert_classifier import BertClassifier
import os
import time
from num... | 40.045455 | 119 | 0.678065 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,555 | 0.339039 |
e5c7a4ae568522e409aa3f1c6efdf5afa6011ded | 6,517 | py | Python | train_blstm_e2e.py | ishine/E2E-langauge-diarization | 0bcb3ec82bd6de6fac848c66fd5ad8fe7b284f0e | [
"MIT"
] | 4 | 2021-12-13T10:24:23.000Z | 2021-12-22T09:40:58.000Z | train_blstm_e2e.py | ishine/E2E-langauge-diarization | 0bcb3ec82bd6de6fac848c66fd5ad8fe7b284f0e | [
"MIT"
] | null | null | null | train_blstm_e2e.py | ishine/E2E-langauge-diarization | 0bcb3ec82bd6de6fac848c66fd5ad8fe7b284f0e | [
"MIT"
] | 2 | 2021-04-07T02:34:17.000Z | 2021-04-23T03:33:54.000Z | import os
import random
import argparse
import torch
import torch.nn as nn
import numpy as np
from torch.utils.data import DataLoader
from tqdm import tqdm
from model import *
from Loss import *
from data_load import *
from model_evaluation import *
#python train_blstm_e2e.py --savedir "/home/hexin/Desktop/models" --t... | 43.446667 | 153 | 0.588154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,089 | 0.167101 |
e5c851fb9a85bd589c9d3056d5470e792ff6484e | 2,551 | py | Python | war3structs/objects.py | sides/war3structs | 171c91240346e610e22cf10bab0c6d526996f855 | [
"MIT"
] | 10 | 2019-12-07T12:10:13.000Z | 2022-02-24T12:45:32.000Z | war3structs/objects.py | warlockbrawl/war3structs | 171c91240346e610e22cf10bab0c6d526996f855 | [
"MIT"
] | null | null | null | war3structs/objects.py | warlockbrawl/war3structs | 171c91240346e610e22cf10bab0c6d526996f855 | [
"MIT"
] | 3 | 2020-02-28T12:43:26.000Z | 2020-06-08T23:31:29.000Z | from construct import *
from .common import *
"""
Formats: w3u, w3t, w3b, w3h, w3d, w3a, w3q
Version: 1
The objects file contains data that the object editor would typically
manipulate. If dealing with abilities, doodads or upgrades, the
ObjectsWithVariationsFile is used instead of the ObjectsFile.
Option... | 30.369048 | 86 | 0.73579 | 181 | 0.070953 | 0 | 0 | 0 | 0 | 0 | 0 | 1,021 | 0.400235 |
e5c8fc169ab19e9767386e1463980ba6e2c72681 | 3,078 | py | Python | lexicon.py | adamlek/swedish-lexical-blends | 5189bcc1680fda5ac32637dd63b895c091b56997 | [
"MIT"
] | null | null | null | lexicon.py | adamlek/swedish-lexical-blends | 5189bcc1680fda5ac32637dd63b895c091b56997 | [
"MIT"
] | null | null | null | lexicon.py | adamlek/swedish-lexical-blends | 5189bcc1680fda5ac32637dd63b895c091b56997 | [
"MIT"
] | null | null | null | import pickle
from collections import defaultdict
from helper_functions import format_lemma, get_blends_csv
from os import listdir
import networkx as nx
def saldo_obj(filename):
saldo = defaultdict(int)
with open(filename) as f:
for line in f:
if line.startswith('#'):
contin... | 29.596154 | 109 | 0.556855 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,175 | 0.381741 |
e5cc7b20cfa963b9093b9d8a0f7b606c9c72c66a | 1,737 | py | Python | app.py | macloo/flask-form-exercise | e487c84cfe6fb995aa1615c2c6e3c6f1cef5a537 | [
"MIT"
] | null | null | null | app.py | macloo/flask-form-exercise | e487c84cfe6fb995aa1615c2c6e3c6f1cef5a537 | [
"MIT"
] | null | null | null | app.py | macloo/flask-form-exercise | e487c84cfe6fb995aa1615c2c6e3c6f1cef5a537 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, redirect, url_for
from flask_bootstrap import Bootstrap
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField
from wtforms.validators import Required
import csv
app = Flask(__name__)
app.config['DEBUG'] = True
# Flask-WTF requires an enryption key - the... | 31.017857 | 77 | 0.65688 | 134 | 0.077145 | 0 | 0 | 546 | 0.314335 | 0 | 0 | 888 | 0.511226 |
e5cd738342d6d3e6c1d28d3273ebe5ae8755466f | 8,015 | py | Python | core_scripts/data_io/io_tools.py | tyanz/project-NN-Pytorch-scripts | 7e90df0f90b04088613d6efb667e147a366273fb | [
"BSD-3-Clause"
] | null | null | null | core_scripts/data_io/io_tools.py | tyanz/project-NN-Pytorch-scripts | 7e90df0f90b04088613d6efb667e147a366273fb | [
"BSD-3-Clause"
] | null | null | null | core_scripts/data_io/io_tools.py | tyanz/project-NN-Pytorch-scripts | 7e90df0f90b04088613d6efb667e147a366273fb | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
io_tools
Functions to load data
"""
from __future__ import absolute_import
import os
import sys
import json
import numpy as np
__author__ = "Xin Wang"
__email__ = "wangxin@nii.ac.jp"
__copyright__ = "Copyright 2020, Xin Wang"
def f_read_raw_mat(filename, col, data_format='f4', end='l'):
... | 29.251825 | 86 | 0.572302 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,461 | 0.431815 |
e5cf36edc22c7f7e4d4a27e2cc587f5fe4069278 | 3,000 | py | Python | envs/flatland/utils/env_generators.py | BkyuChoi/HpicFlatland | bdbba7ce451eb72dc760993b96cec4772a08983c | [
"MIT"
] | 4 | 2021-01-15T10:49:33.000Z | 2021-12-31T08:11:35.000Z | envs/flatland/utils/env_generators.py | BkyuChoi/HpicFlatland | bdbba7ce451eb72dc760993b96cec4772a08983c | [
"MIT"
] | null | null | null | envs/flatland/utils/env_generators.py | BkyuChoi/HpicFlatland | bdbba7ce451eb72dc760993b96cec4772a08983c | [
"MIT"
] | null | null | null | import logging
import random
from typing import NamedTuple
from flatland.envs.malfunction_generators import malfunction_from_params
# from flatland.envs.rail_env import RailEnv
from envs.flatland.utils.gym_env_wrappers import FlatlandRenderWrapper as RailEnv
from flatland.envs.rail_generators import sparse_rail_genera... | 50.847458 | 149 | 0.687 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 584 | 0.194667 |
e5cfab6e94dd6a1313e2d99802b5e11a6af2b20d | 616 | py | Python | api/permissions.py | andela-jmuli/wishlist | 39650f7545606aedfe0b32f39bcc883d9b38985c | [
"MIT"
] | 2 | 2017-10-07T09:26:46.000Z | 2019-01-20T01:34:13.000Z | api/permissions.py | mrmuli/wishlist | 39650f7545606aedfe0b32f39bcc883d9b38985c | [
"MIT"
] | null | null | null | api/permissions.py | mrmuli/wishlist | 39650f7545606aedfe0b32f39bcc883d9b38985c | [
"MIT"
] | null | null | null | from rest_framework import permissions
from models import Bucketlist
class IsOwnerOrReadOnly(permissions.BasePermission):
"""
Object-level permission to only allow owners of an object to edit it.
"""
def has_object_permission(self, request, view, obj):
"""
Read permissions are allowed... | 29.333333 | 73 | 0.652597 | 544 | 0.883117 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.347403 |
e5d01d592715818cd44140b5a297b191c7be3b94 | 1,438 | py | Python | mvp/presets.py | danbradham/mvp | 7471af9964ff789897792b23d59c597055d566f5 | [
"MIT"
] | 19 | 2016-02-26T18:43:31.000Z | 2021-04-10T18:29:29.000Z | mvp/presets.py | danbradham/mvp | 7471af9964ff789897792b23d59c597055d566f5 | [
"MIT"
] | null | null | null | mvp/presets.py | danbradham/mvp | 7471af9964ff789897792b23d59c597055d566f5 | [
"MIT"
] | 8 | 2015-12-14T15:10:09.000Z | 2021-06-12T04:20:36.000Z | # -*- coding: utf-8 -*-
import json
import glob
import os
from . import config
def get_presets():
'''Get a generator yielding preset name, data pairs'''
for path in config.PRESETS_PATH:
for f in glob.glob(os.path.join(path, '*.json')):
base = os.path.basename(f)
name = os.pa... | 21.787879 | 70 | 0.596662 | 0 | 0 | 369 | 0.256606 | 0 | 0 | 0 | 0 | 463 | 0.321975 |
e5d100195ec1f56bb39011ceafce3d09ae2b3187 | 9,539 | py | Python | tests/test_flask_cuttlepool.py | smitchell556/flask-cuttlepool | 32112c41947197d255646e408ede8f6b86ffb21c | [
"BSD-3-Clause"
] | 1 | 2019-06-13T21:18:10.000Z | 2019-06-13T21:18:10.000Z | tests/test_flask_cuttlepool.py | smitchell556/flask-cuttlepool | 32112c41947197d255646e408ede8f6b86ffb21c | [
"BSD-3-Clause"
] | 11 | 2018-01-16T19:12:12.000Z | 2020-05-11T12:05:56.000Z | tests/test_flask_cuttlepool.py | smitchell556/flask-cuttlepool | 32112c41947197d255646e408ede8f6b86ffb21c | [
"BSD-3-Clause"
] | 1 | 2018-01-17T05:36:43.000Z | 2018-01-17T05:36:43.000Z | # -*- coding: utf-8 -*-
"""Tests for Flask-CuttlePool."""
import pytest
from flask import Flask
# Find the stack on which we want to store the database connection.
# Starting with Flask 0.9, the _app_ctx_stack is the correct one,
# before that we need to use the _request_ctx_stack.
try:
from flask import _app_ctx_... | 27.891813 | 84 | 0.679945 | 55 | 0.005766 | 0 | 0 | 2,024 | 0.212182 | 0 | 0 | 2,661 | 0.27896 |
e5d3badd80eff4da8c9ac59f2ae9e00ec9a2daf0 | 6,516 | py | Python | backend/tests/test_scoringHelpers.py | brownben/munro | 2beeae23f29fd064b102a44a1c2d3d852eed65e0 | [
"MIT"
] | 5 | 2020-02-02T14:58:15.000Z | 2022-01-07T08:24:37.000Z | backend/tests/test_scoringHelpers.py | brownben/munro | 2beeae23f29fd064b102a44a1c2d3d852eed65e0 | [
"MIT"
] | 773 | 2020-01-04T22:54:01.000Z | 2022-03-31T16:07:56.000Z | backend/tests/test_scoringHelpers.py | brownben/munro | 2beeae23f29fd064b102a44a1c2d3d852eed65e0 | [
"MIT"
] | 1 | 2021-12-25T14:32:25.000Z | 2021-12-25T14:32:25.000Z | from typing import List, Dict
from ..utils.scoringHelpers import *
def listToResult(l: List[int]) -> List[Dict[str, int]]:
return [{"position": item} for item in l]
class Test_countOccurancesOfPosition:
def test_noData(self) -> None:
assert occuracesOfPosition([], False) == 0
assert occurace... | 44.630137 | 86 | 0.57612 | 6,333 | 0.971915 | 0 | 0 | 0 | 0 | 0 | 0 | 1,398 | 0.214549 |
e5d3f1aaa2a4db3d649462b9a4b2872c64304957 | 911 | py | Python | wsdeval/formats/wordnet.py | frankier/finn-wsd-eval | 11671a7d87e16a9b45f5bea8a5db3d2f25f31d40 | [
"Apache-2.0"
] | null | null | null | wsdeval/formats/wordnet.py | frankier/finn-wsd-eval | 11671a7d87e16a9b45f5bea8a5db3d2f25f31d40 | [
"Apache-2.0"
] | 2 | 2018-09-22T08:38:23.000Z | 2019-03-22T13:11:34.000Z | wsdeval/formats/wordnet.py | frankier/finn-wsd-eval | 11671a7d87e16a9b45f5bea8a5db3d2f25f31d40 | [
"Apache-2.0"
] | null | null | null | import sys
from stiff.data.constants import UNI_POS_WN_MAP
from finntk.wordnet.reader import get_en_fi_maps
from finntk.wordnet.utils import pre_id_to_post, ss2pre
def lemmas_from_instance(wn, instance):
word = instance.attrib["lemma"]
pos = UNI_POS_WN_MAP[instance.attrib["pos"]]
lemmas = wn.lemmas(word, ... | 30.366667 | 62 | 0.626784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.07135 |
e5d49c1e85942ea8815872335e92c377df02dcdd | 553 | py | Python | fosspay/database.py | shleeable/fosspay | 05aae16454463c0cd0211b4d706475837f2f007d | [
"MIT"
] | 4 | 2020-06-01T07:09:38.000Z | 2021-04-25T21:27:10.000Z | fosspay/database.py | shleeable/fosspay | 05aae16454463c0cd0211b4d706475837f2f007d | [
"MIT"
] | 3 | 2020-04-19T07:18:41.000Z | 2020-10-15T21:11:12.000Z | fosspay/database.py | shleeable/fosspay | 05aae16454463c0cd0211b4d706475837f2f007d | [
"MIT"
] | 1 | 2021-02-28T08:26:28.000Z | 2021-02-28T08:26:28.000Z | # import sqlite3
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from .config import _cfg, _cfgi
# engine = create_engine(_cfg('connection-string'), module=sqlite3.dbapi2)
engine = create_engine(_cfg('connection-strin... | 29.105263 | 81 | 0.797468 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.197107 |
e5d700f93cac04fc331b71c3c1e4693e6a3e9976 | 1,600 | py | Python | emojis/db/generator.py | mercuree/emojis | 43437a2929ccb1f1783ae13c8dcb9570ce401abd | [
"MIT"
] | null | null | null | emojis/db/generator.py | mercuree/emojis | 43437a2929ccb1f1783ae13c8dcb9570ce401abd | [
"MIT"
] | null | null | null | emojis/db/generator.py | mercuree/emojis | 43437a2929ccb1f1783ae13c8dcb9570ce401abd | [
"MIT"
] | null | null | null | import argparse
import os
from datetime import datetime
import requests
JSON_DB_FILE = 'https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json'
def generate(path, dbname):
req = requests.get(JSON_DB_FILE)
req.raise_for_status()
data = req.json()
path = os.path.join(path, dbname)
... | 32.653061 | 96 | 0.575 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 568 | 0.355 |
e5d7325ca98374479c7e719100f4da872f071b99 | 5,653 | py | Python | pdfs/Commands/WWW.py | tmearnest/sbd | 92e59ed6286ff7b6a036688db086e47951f07cdd | [
"MIT"
] | null | null | null | pdfs/Commands/WWW.py | tmearnest/sbd | 92e59ed6286ff7b6a036688db086e47951f07cdd | [
"MIT"
] | null | null | null | pdfs/Commands/WWW.py | tmearnest/sbd | 92e59ed6286ff7b6a036688db086e47951f07cdd | [
"MIT"
] | null | null | null | from .Command import Command
class WWW(Command):
command = 'www'
help = "Spin up http server"
def set_args(self, subparser):
subparser.add_argument("--port","-P", help="Port number to listen on", type=int, default=5000)
def run(self, args):
import logging
import mimetypes
... | 36.707792 | 109 | 0.5268 | 5,623 | 0.994693 | 0 | 0 | 2,367 | 0.418716 | 0 | 0 | 657 | 0.116221 |
e5d751700fbfc083b181f629d2da2225fc4505cb | 9,593 | py | Python | nessmado_discord_manager.py | subaru3535/discordpy-startup | 94c700f6af590c56f05708a3556198c20f9ee9e4 | [
"MIT"
] | null | null | null | nessmado_discord_manager.py | subaru3535/discordpy-startup | 94c700f6af590c56f05708a3556198c20f9ee9e4 | [
"MIT"
] | null | null | null | nessmado_discord_manager.py | subaru3535/discordpy-startup | 94c700f6af590c56f05708a3556198c20f9ee9e4 | [
"MIT"
] | null | null | null | # スクリプト名:nessmado_function.py
# バージョン:5.01
# 作成日:2019/03/xx
# 最終更新日:2019/10/14
# 作成者:(へっへ)
# スクリプト概要:
# |キャラ対策チャンネル(大元)に「質問」から始まるメッセージを投稿すると、
# |各キャラ別の対策チャンネルに文言をコピーした上で、
# |大元のキャラ対策チャンネルと雑談チャンネルに周知メッセージを送る。
"""更新履歴
2019/03/xx ver 3.0?覚えてない。
オブジェクト指向に沿ってクラス化。
2019/07/31 Ver 5.0
勇者追加。
2019/10/14 Ver ... | 40.306723 | 125 | 0.533618 | 11,493 | 0.927977 | 0 | 0 | 0 | 0 | 0 | 0 | 5,112 | 0.412757 |
e5d89d2a5e74dad3c40f155b2e13235f2835045c | 528 | py | Python | awx/main/management/commands/deprovision_node.py | gitEdouble/awx | 5885654405ccaf465f08df4db998a6dafebd9b4d | [
"Apache-2.0"
] | 1 | 2018-09-28T16:02:30.000Z | 2018-09-28T16:02:30.000Z | awx/main/management/commands/deprovision_node.py | gitEdouble/awx | 5885654405ccaf465f08df4db998a6dafebd9b4d | [
"Apache-2.0"
] | 4 | 2020-04-29T23:03:16.000Z | 2022-03-01T23:56:09.000Z | awx/main/management/commands/deprovision_node.py | gitEdouble/awx | 5885654405ccaf465f08df4db998a6dafebd9b4d | [
"Apache-2.0"
] | 2 | 2018-09-03T19:10:02.000Z | 2019-06-12T07:07:16.000Z | # Copyright (c) 2017 Ansible by Red Hat
# All Rights Reserved
# Borrow from another AWX command
from awx.main.management.commands.deprovision_instance import Command as OtherCommand
# Python
import warnings
class Command(OtherCommand):
def handle(self, *args, **options):
# TODO: delete this entire file... | 29.333333 | 86 | 0.69697 | 316 | 0.598485 | 0 | 0 | 0 | 0 | 0 | 0 | 231 | 0.4375 |
e5da928182393c5f5c747b08972d2fb8f2ff9446 | 8,775 | py | Python | rss_temple/api/views/feed.py | murrple-1/rss_temple | 289197923b1e7d1213f1673d164337df17d7269b | [
"MIT"
] | null | null | null | rss_temple/api/views/feed.py | murrple-1/rss_temple | 289197923b1e7d1213f1673d164337df17d7269b | [
"MIT"
] | 8 | 2019-12-04T21:58:35.000Z | 2021-12-15T02:29:49.000Z | rss_temple/api/views/feed.py | murrple-1/rss_temple | 289197923b1e7d1213f1673d164337df17d7269b | [
"MIT"
] | null | null | null | from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseNotFound, HttpResponseNotAllowed
from django.db import transaction
import requests
import ujson
from url_normalize import url_normalize
from api import models, query_utils, feed_handler, rss_requests, archived_feed_entry_util
from api.excepti... | 30.681818 | 154 | 0.692877 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 734 | 0.083647 |
e5daabddd78accd0c119c7d00f383e8e6adda241 | 2,954 | py | Python | hbruraldoctor/hbvirtual/lib/python3.7/site-packages/Naked/settings.py | hallohubo/DjangoDocterAPI | 2d86d17c718affa968c0b2d4f9590aa08d43716e | [
"Apache-2.0"
] | 89 | 2015-04-10T14:34:05.000Z | 2021-11-08T09:17:09.000Z | hbruraldoctor/hbvirtual/lib/python3.7/site-packages/Naked/settings.py | hallohubo/DjangoDocterAPI | 2d86d17c718affa968c0b2d4f9590aa08d43716e | [
"Apache-2.0"
] | 13 | 2015-03-17T15:44:41.000Z | 2020-11-19T03:07:13.000Z | hbruraldoctor/hbvirtual/lib/python3.7/site-packages/Naked/settings.py | hallohubo/DjangoDocterAPI | 2d86d17c718affa968c0b2d4f9590aa08d43716e | [
"Apache-2.0"
] | 19 | 2015-05-13T09:18:12.000Z | 2021-04-28T10:35:39.000Z | #!/usr/bin/env python
# encoding: utf-8
#------------------------------------------------------------------------------
# Application Name
#------------------------------------------------------------------------------
app_name = "naked"
#------------------------------------------------------------------------------
... | 33.954023 | 396 | 0.474611 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,859 | 0.960685 |
e5de3b649cde237814d8eb0d0baa2f698e762515 | 7,959 | py | Python | fempagno/modules/motoremesh.py | giovap95/metis-fem | f8a67698d1531a862e541f79229c0e4486edde6c | [
"MIT"
] | null | null | null | fempagno/modules/motoremesh.py | giovap95/metis-fem | f8a67698d1531a862e541f79229c0e4486edde6c | [
"MIT"
] | 2 | 2020-05-08T21:51:44.000Z | 2020-05-13T13:41:41.000Z | fempagno/modules/motoremesh.py | giovap95/metis-fem | f8a67698d1531a862e541f79229c0e4486edde6c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 27 18:54:01 2020
@author: giova
"""
import numpy as np
import sys
import meshio
# Creates a mesh class
class Mesh:
def __init__(self):
self.el_def = None
self.material = None
self.conn_table = None
self.cds_table = Non... | 33.1625 | 107 | 0.489257 | 451 | 0.056665 | 0 | 0 | 0 | 0 | 0 | 0 | 3,216 | 0.404071 |
e5e0321b867fbd3540821c3d571734424765569b | 326 | py | Python | setup.py | mephizzle/python-funkyfunc | 5b7b9edc817830348227e8c7f9178d26ecc9991f | [
"Apache-2.0"
] | null | null | null | setup.py | mephizzle/python-funkyfunc | 5b7b9edc817830348227e8c7f9178d26ecc9991f | [
"Apache-2.0"
] | null | null | null | setup.py | mephizzle/python-funkyfunc | 5b7b9edc817830348227e8c7f9178d26ecc9991f | [
"Apache-2.0"
] | null | null | null | from distutils.core import setup
setup(
author='Marco Westerhof',
author_email='mephistolomaniac@gmail.com',
url='https://github.com/mephizzle/python-funkyfunc',
name='FunkyFunk',
version='0.0.2-dev',
packages=['funkyfunc'],
license='Apache 2.0',
long_description=open('README.txt').read... | 25.076923 | 56 | 0.677914 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 149 | 0.457055 |
e5e10452d84b6a103a29913ec774bc796c7a58d7 | 35 | py | Python | spartan/examples/sklearn/linear_model/__init__.py | GabrielWen/spartan | ce3bf7f2bb551d7f996a1884acef819b620cc854 | [
"Apache-2.0"
] | 156 | 2015-01-10T21:54:25.000Z | 2021-10-17T14:13:57.000Z | spartan/examples/sklearn/linear_model/__init__.py | GabrielWen/spartan | ce3bf7f2bb551d7f996a1884acef819b620cc854 | [
"Apache-2.0"
] | 8 | 2015-01-05T16:34:18.000Z | 2015-12-11T08:12:28.000Z | spartan/examples/sklearn/linear_model/__init__.py | GabrielWen/spartan | ce3bf7f2bb551d7f996a1884acef819b620cc854 | [
"Apache-2.0"
] | 24 | 2015-01-10T21:55:48.000Z | 2021-04-14T08:09:34.000Z | from .base import LinearRegression
| 17.5 | 34 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e5e256e472aa9a2645b2b2a6d05bcb536688a4a9 | 1,116 | py | Python | pygame/key-event- get-changed-states/main-using-get_pressed.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 140 | 2017-02-21T22:49:04.000Z | 2022-03-22T17:51:58.000Z | pygame/key-event- get-changed-states/main-using-get_pressed.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 5 | 2017-12-02T19:55:00.000Z | 2021-09-22T23:18:39.000Z | pygame/key-event- get-changed-states/main-using-get_pressed.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 79 | 2017-01-25T10:53:33.000Z | 2022-03-11T16:13:57.000Z | #!/usr/bin/env python3
#
# https://stackoverflow.com/a/48034477/1832058
#
import pygame
pygame.init()
screen = pygame.display.set_mode((300, 200))
pressed = pygame.key.get_pressed()
clock = pygame.time.Clock()
is_running = True
while is_running:
for event in pygame.event.get():
if event.type == py... | 21.461538 | 87 | 0.612007 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.143369 |
e5e25a60a68dadc256cd1d15a2436325f5c9ecdb | 828 | py | Python | epsagon/modules/sqlalchemy.py | Dryja/epsagon-python | 505b09268820593903afdce26e1bab7f64adc23b | [
"MIT"
] | 55 | 2018-09-30T11:46:01.000Z | 2022-03-15T13:37:26.000Z | epsagon/modules/sqlalchemy.py | Dryja/epsagon-python | 505b09268820593903afdce26e1bab7f64adc23b | [
"MIT"
] | 323 | 2018-10-04T15:42:08.000Z | 2022-02-20T11:26:40.000Z | epsagon/modules/sqlalchemy.py | Dryja/epsagon-python | 505b09268820593903afdce26e1bab7f64adc23b | [
"MIT"
] | 20 | 2018-10-11T14:47:16.000Z | 2022-01-20T11:07:29.000Z | """
sqlalchemy patcher module
"""
from __future__ import absolute_import
from epsagon.modules.general_wrapper import wrapper
from ..events.sqlalchemy import SqlAlchemyEventFactory
from ..utils import patch_once
def _wrapper(wrapped, instance, args, kwargs):
"""
General wrapper for sqlalchemy instrumentation.... | 21.230769 | 75 | 0.665459 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 380 | 0.458937 |
e5e3335794c38081b262ad2769536aeb3e3e96ca | 471 | py | Python | access/website_tests/make_profile.py | ldbiz/ukwa-services | afa30cf631a3464e53f41244b989e32984c40294 | [
"Apache-2.0"
] | 2 | 2020-05-12T18:01:21.000Z | 2021-05-18T21:47:32.000Z | access/website_tests/make_profile.py | ldbiz/ukwa-services | afa30cf631a3464e53f41244b989e32984c40294 | [
"Apache-2.0"
] | 53 | 2020-01-23T16:10:53.000Z | 2022-03-30T16:59:17.000Z | access/website_tests/make_profile.py | ldbiz/ukwa-services | afa30cf631a3464e53f41244b989e32984c40294 | [
"Apache-2.0"
] | 5 | 2020-01-20T17:28:27.000Z | 2022-02-08T21:30:12.000Z | def make_profile():
from selenium import webdriver
fp = webdriver.FirefoxProfile()
fp.set_preference("network.proxy.http", "pywb");
fp.set_preference("network.proxy.http_port", 8080);
fp.set_preference("network.proxy.share_proxy_settings", True);
fp.set_preference("network.proxy.ssl", "pywb");
... | 33.642857 | 66 | 0.713376 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.33121 |
e5e4afd5dbe24702344b3fb95577c4c8061e708c | 415 | py | Python | app/component/sink/resolver.py | melphi/kafkaform | 391c4c70b6aff9fd5ad703dcf4b6e863e92d53b6 | [
"MIT"
] | null | null | null | app/component/sink/resolver.py | melphi/kafkaform | 391c4c70b6aff9fd5ad703dcf4b6e863e92d53b6 | [
"MIT"
] | null | null | null | app/component/sink/resolver.py | melphi/kafkaform | 391c4c70b6aff9fd5ad703dcf4b6e863e92d53b6 | [
"MIT"
] | null | null | null | from typing import Optional
from app import model, client
from app.component.connect import resolver
class SinkResolver(resolver.BaseConnectResolver):
def __init__(self, *, connect_client: client.ConnectClient):
super().__init__(connect_client=connect_client, connector_type=model.RESOURCE_SINK)
def ... | 31.923077 | 91 | 0.775904 | 310 | 0.746988 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e5e4d509b89cb0862f92845dd6ce191e2a31dfb4 | 187 | py | Python | scrapy_cookies/signals.py | scrapedia/scrapy-cookies | 9741c767005254f5c427d3938ccad9ad74f93c2a | [
"BSD-3-Clause"
] | 13 | 2019-05-29T03:31:58.000Z | 2021-09-30T14:53:45.000Z | scrapy_cookies/signals.py | scrapedia/scrapy-cookies | 9741c767005254f5c427d3938ccad9ad74f93c2a | [
"BSD-3-Clause"
] | 18 | 2019-06-02T12:43:05.000Z | 2022-03-08T01:07:21.000Z | scrapy_cookies/signals.py | scrapedia/scrapy-cookies | 9741c767005254f5c427d3938ccad9ad74f93c2a | [
"BSD-3-Clause"
] | 11 | 2019-08-14T12:06:38.000Z | 2021-08-13T00:24:35.000Z | """
Scrapy-Cookies signals
These signals are documented in docs/topics/signals.rst. Please don't add new
signals here without documenting them there.
"""
cookies_invalidated = object()
| 20.777778 | 77 | 0.780749 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.823529 |
e5e53846e2bb66fb7964f5329a489cc90405aafd | 881 | py | Python | Python/BasicTutorials/loops.py | ronkitay/Rons-Tutorials | c0459c57cc24b546847ec24afa94d2c1e5373bd4 | [
"MIT"
] | null | null | null | Python/BasicTutorials/loops.py | ronkitay/Rons-Tutorials | c0459c57cc24b546847ec24afa94d2c1e5373bd4 | [
"MIT"
] | null | null | null | Python/BasicTutorials/loops.py | ronkitay/Rons-Tutorials | c0459c57cc24b546847ec24afa94d2c1e5373bd4 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from rons_tutorial_formatting import *
print_block_separator()
x = 1
while x < 10:
print x,
x += 1
end_block(True)
start_block()
words = ['hello', 'world', 'have', 'a', 'nice', 'day']
for word in words:
if word.isalpha() and word[0] == 'h':
print word,... | 16.622642 | 83 | 0.594779 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 0.15891 |
e5e672aa538e6785d26c19832f02db4cd318b24e | 471 | py | Python | CSE-6239-assignment-1/code/sobel.py | shahidul56/computer-vision-resource | fd9f2a328e015bc0bf083578496e980681204614 | [
"MIT"
] | null | null | null | CSE-6239-assignment-1/code/sobel.py | shahidul56/computer-vision-resource | fd9f2a328e015bc0bf083578496e980681204614 | [
"MIT"
] | null | null | null | CSE-6239-assignment-1/code/sobel.py | shahidul56/computer-vision-resource | fd9f2a328e015bc0bf083578496e980681204614 | [
"MIT"
] | null | null | null | # Some imports
from matplotlib import pyplot as plt
import cv2
# for display
from skimage import data # for loading example data
from skimage.color import rgb2gray # for converting to grayscale
# Load image, convert to grayscale and show it
image = rgb2gray(data.astronaut())
def draw_image_histogram(ima... | 29.4375 | 66 | 0.704883 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.288747 |
e5e752f6a18aedce35c0b66c9dcf5c5d4d5eb6e8 | 677 | py | Python | stack_reverse_string.py | kromagg/Python | 1ade4c3ac8f0ef24735c22437d3716cc7388f6a1 | [
"MIT"
] | null | null | null | stack_reverse_string.py | kromagg/Python | 1ade4c3ac8f0ef24735c22437d3716cc7388f6a1 | [
"MIT"
] | null | null | null | stack_reverse_string.py | kromagg/Python | 1ade4c3ac8f0ef24735c22437d3716cc7388f6a1 | [
"MIT"
] | null | null | null | class Stack:
def __init__(self):
self.items = []
def is_empty(self):
# return len(self.items) == 0
return not self.items
def push(self, item):
self.items.append(item)
def pop(self):
return self.items.pop()
def peek(self):
return self.items[-1]
... | 18.297297 | 45 | 0.568685 | 422 | 0.623338 | 0 | 0 | 0 | 0 | 0 | 0 | 73 | 0.107829 |
e5e7f6b3dfe5867d1dd051b77e4c526e95d5eaf6 | 5,100 | py | Python | hg2git.py | LukasPersonal/hg-fast-export | 77a770c2b856a49f0d58a035cd9e300c8c0203ac | [
"MIT"
] | null | null | null | hg2git.py | LukasPersonal/hg-fast-export | 77a770c2b856a49f0d58a035cd9e300c8c0203ac | [
"MIT"
] | 1 | 2021-09-30T17:11:13.000Z | 2021-09-30T17:11:13.000Z | hg2git.py | LukasPersonal/hg-fast-export | 77a770c2b856a49f0d58a035cd9e300c8c0203ac | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# pylint: disable=E1101.E0602
# Copyright (c) 2007, 2008 Rocco Rutte <pdmef@gmx.net> and others.
# License: MIT <http://www.opensource.org/licenses/mit-license.php>
import os
import re
import subprocess
import sys
from mercurial import error as hgerror
from mercurial import hg, templatefilters,... | 30.909091 | 88 | 0.612941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,539 | 0.301765 |
e5e873bb87ab31b611a9db0a4399b14d3a1da37d | 331 | py | Python | l1-l100/7.py | ZucchiniY/Leetcode-cn | c26d080b7f8115a2edfc135742c1cad0105eccfc | [
"MIT"
] | null | null | null | l1-l100/7.py | ZucchiniY/Leetcode-cn | c26d080b7f8115a2edfc135742c1cad0105eccfc | [
"MIT"
] | null | null | null | l1-l100/7.py | ZucchiniY/Leetcode-cn | c26d080b7f8115a2edfc135742c1cad0105eccfc | [
"MIT"
] | null | null | null | """
最终的结果要考虑 Python 的int 类型会比一般语言的长,所以要考虑 32位这个范围。
"""
class Solution:
def reverse(self, x: int) -> int:
y = x
if x < 0:
y = -1 * x
y = str(y)[::-1]
if x < 0:
r = -1 * int(y)
else:
r = int(y)
return r if -2147483648 < r < 2147483... | 18.388889 | 55 | 0.432024 | 273 | 0.694656 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.295165 |
e5e8dd52ec7800abc2fea2d0e906bb4110812873 | 382 | py | Python | users/urls.py | Gabriel-limadev/learning_log | c8f0d0e95d19da652c7a56d80df0990d5c3a18d0 | [
"MIT"
] | null | null | null | users/urls.py | Gabriel-limadev/learning_log | c8f0d0e95d19da652c7a56d80df0990d5c3a18d0 | [
"MIT"
] | null | null | null | users/urls.py | Gabriel-limadev/learning_log | c8f0d0e95d19da652c7a56d80df0990d5c3a18d0 | [
"MIT"
] | null | null | null | """Define padrões de URL para users"""
from django.urls import path, include
from django.contrib.auth.views import LoginView
from . import views
urlpatterns = [
# Página de Login
path('login', LoginView.as_view(template_name='users/login.html'), name='login'),
path('logout', views.logout_view, name='logo... | 27.285714 | 85 | 0.712042 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.325521 |
e5ebdbe01f05c949fa7304e210592a5bcd39cded | 5,923 | py | Python | resumecollection/users/v1/views.py | m-ali-ubit/resume-collection | 1e598928fed38f4a3b5972ff473e26e07e4c464a | [
"MIT"
] | null | null | null | resumecollection/users/v1/views.py | m-ali-ubit/resume-collection | 1e598928fed38f4a3b5972ff473e26e07e4c464a | [
"MIT"
] | null | null | null | resumecollection/users/v1/views.py | m-ali-ubit/resume-collection | 1e598928fed38f4a3b5972ff473e26e07e4c464a | [
"MIT"
] | null | null | null | import logging
from django.contrib.auth import get_user_model, authenticate
from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import Http404
from django.views.generic import RedirectView
from rest_framework import status, permissions
from rest_framework.exceptions import ValidationError
from r... | 39.225166 | 96 | 0.667905 | 4,770 | 0.805335 | 0 | 0 | 0 | 0 | 0 | 0 | 905 | 0.152794 |
e5ede57f6e5a4c4f286e2ced6355288e52909591 | 1,947 | py | Python | binding/python/test_cobra_perf.py | Picovoice/cobra | 2684f7e873930b66fa5cd114ee06434a63760160 | [
"Apache-2.0"
] | 26 | 2021-09-17T20:11:52.000Z | 2022-03-13T01:33:22.000Z | binding/python/test_cobra_perf.py | Picovoice/cobra | 2684f7e873930b66fa5cd114ee06434a63760160 | [
"Apache-2.0"
] | 4 | 2021-09-29T20:39:25.000Z | 2022-01-19T18:24:56.000Z | binding/python/test_cobra_perf.py | Picovoice/cobra | 2684f7e873930b66fa5cd114ee06434a63760160 | [
"Apache-2.0"
] | 3 | 2021-11-08T05:19:24.000Z | 2022-03-07T03:08:24.000Z | #
# Copyright 2022 Picovoice Inc.
#
# You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
# file accompanying this source.
#
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
# an "AS IS" B... | 33 | 117 | 0.663585 | 1,116 | 0.57319 | 0 | 0 | 0 | 0 | 0 | 0 | 654 | 0.335901 |
e5edfa705d3471d7a0761238dd4b5b4398bf2f00 | 4,034 | py | Python | neurons/boltzmann/main.py | unconst/SimpleWord2Vec | d1af6993c1d6bca273a0c8d147132ee9867f5543 | [
"MIT"
] | 9 | 2019-12-18T10:20:15.000Z | 2021-03-18T00:07:28.000Z | neurons/boltzmann/main.py | unconst/SimpleWord2Vec | d1af6993c1d6bca273a0c8d147132ee9867f5543 | [
"MIT"
] | 5 | 2020-02-12T02:21:15.000Z | 2022-02-10T00:25:28.000Z | neurons/boltzmann/main.py | unconst/BitTensor | d1af6993c1d6bca273a0c8d147132ee9867f5543 | [
"MIT"
] | null | null | null | import bittensor
from config import Config
from metagraph import Metagraph
from dendrite import Dendrite
from nucleus import Nucleus
from neuron import Neuron
from Crypto.Hash import SHA256
from datetime import timedelta
import grpc
from loguru import logger
import pickle
import numpy as np
import random
import time
... | 28.609929 | 83 | 0.589737 | 0 | 0 | 0 | 0 | 260 | 0.064452 | 0 | 0 | 2,111 | 0.523302 |
e5ee0a1b58d18c70bdda71d41120500488aa7c66 | 897 | py | Python | miplearn/tests/__init__.py | GregorCH/MIPLearn | 28e2ba7c0133602fb361f8690bc7424869f68b43 | [
"BSD-3-Clause"
] | null | null | null | miplearn/tests/__init__.py | GregorCH/MIPLearn | 28e2ba7c0133602fb361f8690bc7424869f68b43 | [
"BSD-3-Clause"
] | null | null | null | miplearn/tests/__init__.py | GregorCH/MIPLearn | 28e2ba7c0133602fb361f8690bc7424869f68b43 | [
"BSD-3-Clause"
] | null | null | null | # MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
# Released under the modified BSD license. See COPYING.md for more details.
from miplearn import LearningSolver
from miplearn.problems.knapsack import KnapsackInstance
... | 34.5 | 82 | 0.634337 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 224 | 0.249721 |
e5ee4943aac68235054c17ff1e0039fbf33c5e05 | 3,394 | py | Python | RPi/PBUtils.py | lefake/RPi-Arduino-PB-Communication | 8f827a4b8eaa331cd47d9a3f5bfa0414ec8c264f | [
"MIT"
] | null | null | null | RPi/PBUtils.py | lefake/RPi-Arduino-PB-Communication | 8f827a4b8eaa331cd47d9a3f5bfa0414ec8c264f | [
"MIT"
] | null | null | null | RPi/PBUtils.py | lefake/RPi-Arduino-PB-Communication | 8f827a4b8eaa331cd47d9a3f5bfa0414ec8c264f | [
"MIT"
] | null | null | null | from binascii import unhexlify
import threading
import time
# Serialization utils
class PBSerializationHandler:
def __init__(self, msg_obj):
self._msg_obj = msg_obj
def encode_msgs(self, ids, msgs):
msg = "<"
for id_msg, pb_msg in zip(ids, msgs):
msg += str(id_msg) + "|"
... | 27.819672 | 113 | 0.57749 | 3,272 | 0.964054 | 0 | 0 | 0 | 0 | 0 | 0 | 247 | 0.072775 |
e5f095d1388f9625e63f8d8fbeb39317cd585f8c | 68 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.11-list-del-function.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.11-list-del-function.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.11-list-del-function.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | li = [1, 2, 3, 3, 4, 5, 6]
del(li[1])
print(li)
del(li)
print(li)
| 8.5 | 26 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e5f0bb1e5a4c34450975dee81ee353ebb2c952b3 | 9,769 | py | Python | Old_Files/QuickPool_Old.py | PV-Lab/stability | d18da803a399a7c338b225b0d6adbdfe1b427707 | [
"MIT"
] | null | null | null | Old_Files/QuickPool_Old.py | PV-Lab/stability | d18da803a399a7c338b225b0d6adbdfe1b427707 | [
"MIT"
] | null | null | null | Old_Files/QuickPool_Old.py | PV-Lab/stability | d18da803a399a7c338b225b0d6adbdfe1b427707 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 4 18:07:03 2019
@author: NickT
"""
from pymatgen import MPRester
import pandas as pd
import matplotlib.pyplot as plt
import csv
import multiprocessing as mp
import pickle
import tqdm
import time
mat_api_key = '<ENTER API KEY>'
mpr = MPRester(mat... | 37.003788 | 131 | 0.604873 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,999 | 0.409356 |
e5f19e16e2b08093649aea79bf01a6ebe7b3786c | 1,638 | py | Python | lhq_nn_lib/layers/loss.py | lhq1208/DL_lib | 53c99157efcc36f2288a82eedad09cdecda579e5 | [
"Apache-2.0"
] | null | null | null | lhq_nn_lib/layers/loss.py | lhq1208/DL_lib | 53c99157efcc36f2288a82eedad09cdecda579e5 | [
"Apache-2.0"
] | null | null | null | lhq_nn_lib/layers/loss.py | lhq1208/DL_lib | 53c99157efcc36f2288a82eedad09cdecda579e5 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from layers.activation_layer import *
from layers.gradient_check import *
def mean_square_error_loss(y_hat, y):
"""
MSE loss, loss=mean(y_hat-y)^2
:param y_hat: output of the network
:param y: input labels
:return: MSE loss
"""
loss = np.mean((y_hat - y) ** 2)
num_ou... | 27.762712 | 87 | 0.632479 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 469 | 0.286325 |
e5f2b2946d7fb399e25a69e9d6f0ee5cf294595b | 2,518 | py | Python | clearmash/prep_entities_for_search.py | Beit-Hatfutsot/mojp-dbs-pipelines | 7bac0da9c1777351f40f422c664a7168b52e218a | [
"MIT"
] | 1 | 2017-06-21T11:36:01.000Z | 2017-06-21T11:36:01.000Z | clearmash/prep_entities_for_search.py | Beit-Hatfutsot/mojp-dbs-pipelines | 7bac0da9c1777351f40f422c664a7168b52e218a | [
"MIT"
] | 66 | 2017-05-09T11:48:50.000Z | 2018-01-02T11:57:26.000Z | clearmash/prep_entities_for_search.py | Beit-Hatfutsot/mojp-dbs-pipelines | 7bac0da9c1777351f40f422c664a7168b52e218a | [
"MIT"
] | 2 | 2017-04-25T09:07:15.000Z | 2017-06-15T10:35:36.000Z | from datapackage_pipelines.wrapper import ingest, spew
from datapackage_pipelines.utilities.resources import PROP_STREAMING
from bs4 import BeautifulSoup
parameters, datapackage, resources = ingest()
def get_resource():
for resource in resources:
for row in resource:
if row["collection"] == ... | 61.414634 | 120 | 0.470612 | 0 | 0 | 1,064 | 0.422558 | 0 | 0 | 0 | 0 | 829 | 0.32923 |
e5f2df89ffd4743d543ef9c3d879f0b8408bef7f | 2,011 | py | Python | flight-data/adb_7_eda.py | plzm/azure-databricks | 29884a184698a034a7e5c25ac5b80d36757b2fff | [
"MIT"
] | null | null | null | flight-data/adb_7_eda.py | plzm/azure-databricks | 29884a184698a034a7e5c25ac5b80d36757b2fff | [
"MIT"
] | null | null | null | flight-data/adb_7_eda.py | plzm/azure-databricks | 29884a184698a034a7e5c25ac5b80d36757b2fff | [
"MIT"
] | null | null | null | # Databricks notebook source
# MAGIC %md
# MAGIC References
# MAGIC
# MAGIC https://spark.apache.org/docs/latest/api/python/pyspark.sql.html#pyspark.sql.DataFrameStatFunctions<br>
# MAGIC https://docs.azuredatabricks.net/user-guide/visualizations/index.html<br>
# COMMAND ----------
# MAGIC %md
# MAGIC #### Get a dat... | 19.336538 | 117 | 0.655893 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,303 | 0.647936 |
e5f31ec7b6d809900feb1de6c282c008dc5ae47f | 50 | py | Python | tools/onnx2daq/python/onnx2daq/__init__.py | Anon-Artist/DNNLibrary | 6e38a880a90c28ff238a80f44c7d35ffd3eedae8 | [
"Apache-2.0"
] | 199 | 2019-02-14T05:44:27.000Z | 2022-03-29T09:48:35.000Z | tools/onnx2daq/python/onnx2daq/__init__.py | Anon-Artist/DNNLibrary | 6e38a880a90c28ff238a80f44c7d35ffd3eedae8 | [
"Apache-2.0"
] | 26 | 2019-02-18T07:18:17.000Z | 2021-05-29T11:42:08.000Z | tools/onnx2daq/python/onnx2daq/__init__.py | Anon-Artist/DNNLibrary | 6e38a880a90c28ff238a80f44c7d35ffd3eedae8 | [
"Apache-2.0"
] | 33 | 2019-02-16T09:23:46.000Z | 2022-02-19T07:24:22.000Z | from .convert import convert, simplify_and_convert | 50 | 50 | 0.88 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e5f5488490016c728274b70ed9f953908256998b | 1,788 | py | Python | reanalysis/mt_to_vcf.py | populationgenomics/automated-interpretation-pipeline | 64afbf396dcc2f4f2330cdfd0414238560910e93 | [
"MIT"
] | null | null | null | reanalysis/mt_to_vcf.py | populationgenomics/automated-interpretation-pipeline | 64afbf396dcc2f4f2330cdfd0414238560910e93 | [
"MIT"
] | 4 | 2022-03-28T06:28:01.000Z | 2022-03-31T00:16:02.000Z | reanalysis/mt_to_vcf.py | populationgenomics/automated-interpretation-pipeline | 64afbf396dcc2f4f2330cdfd0414238560910e93 | [
"MIT"
] | null | null | null | """
Takes an input MT, and extracts a VCF-format representation.
This is currently required as the end-to-end CPG pipeline doesn't currently
store intermediate files. To simulate workflows running on VCF files, we
have to regenerate a VCF representation from a MT.
Optional argument allows the specification of an 'add... | 28.380952 | 83 | 0.69519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 934 | 0.522371 |
e5f5c14f40a001a742cdc89ea72f7c6f1ffa6230 | 3,787 | py | Python | asrtoolkit/wer.py | kaleko/greenkey-asrtoolkit | a729e25ae9c1c65b3c9f25438eb67dba8d03a730 | [
"Apache-2.0"
] | null | null | null | asrtoolkit/wer.py | kaleko/greenkey-asrtoolkit | a729e25ae9c1c65b3c9f25438eb67dba8d03a730 | [
"Apache-2.0"
] | 1 | 2020-02-07T19:20:07.000Z | 2020-02-07T19:27:19.000Z | asrtoolkit/wer.py | kaleko/greenkey-asrtoolkit | a729e25ae9c1c65b3c9f25438eb67dba8d03a730 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Python function for computing word error rates metric for Automatic Speech Recognition files
"""
import argparse
import re
import editdistance
from asrtoolkit.clean_formatting import clean_up
from asrtoolkit.data_structures.time_aligned_text import time_aligned_text
from asrtoolkit.file_uti... | 25.587838 | 111 | 0.639028 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,458 | 0.385001 |