hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 251 | max_forks_repo_name stringlengths 4 130 | 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 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a223ecf83d36d6f31411c69dbf4da28e7438e27b | 6,255 | py | Python | scripts/fetch_bitcoin_data.py | r-medina/interbtc | f01c7679d837dd3239a6263aeeef436071971278 | [
"Apache-2.0"
] | 61 | 2021-07-09T14:24:42.000Z | 2022-03-30T14:03:26.000Z | scripts/fetch_bitcoin_data.py | r-medina/interbtc | f01c7679d837dd3239a6263aeeef436071971278 | [
"Apache-2.0"
] | 81 | 2021-07-06T13:28:29.000Z | 2022-03-31T12:18:49.000Z | scripts/fetch_bitcoin_data.py | r-medina/interbtc | f01c7679d837dd3239a6263aeeef436071971278 | [
"Apache-2.0"
] | 22 | 2021-07-05T15:30:07.000Z | 2022-03-23T16:44:18.000Z | import requests
import json
import random
import os
import asyncio
import gzip
DIRNAME = os.path.dirname(__file__)
TESTDATA_DIR = os.path.join(DIRNAME, "..", "standalone", "runtime", "tests", "data")
TESTDATA_FILE = os.path.join(TESTDATA_DIR, "bitcoin-testdata.json")
TESTDATA_ZIPPED = os.path.join(TESTDATA_DIR, "bitco... | 30.512195 | 88 | 0.609113 |
a2249efce47df056312d91cc653b9f530c413e5a | 1,304 | py | Python | src/clic/initnode.py | NathanRVance/clic | e28f7f2686f5ac6689b384474e3fdfa4d207f6ec | [
"MIT"
] | 2 | 2017-12-13T03:41:07.000Z | 2019-03-12T14:08:42.000Z | src/clic/initnode.py | NathanRVance/clic | e28f7f2686f5ac6689b384474e3fdfa4d207f6ec | [
"MIT"
] | null | null | null | src/clic/initnode.py | NathanRVance/clic | e28f7f2686f5ac6689b384474e3fdfa4d207f6ec | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import os
from pathlib import Path
from pwd import getpwnam
from clic import pssh
import configparser
config = configparser.ConfigParser()
config.read('/etc/clic/clic.conf')
user = config['Daemon']['user']
| 39.515152 | 166 | 0.67408 |
a225d4215664eb0e76d8e4f28cc69143c6d676df | 359 | py | Python | src/text_selection/cover_export.py | stefantaubert/text-selection | 4b3b49005cbeb2e9212ed94686d8e871c6c2c368 | [
"MIT"
] | null | null | null | src/text_selection/cover_export.py | stefantaubert/text-selection | 4b3b49005cbeb2e9212ed94686d8e871c6c2c368 | [
"MIT"
] | null | null | null | src/text_selection/cover_export.py | stefantaubert/text-selection | 4b3b49005cbeb2e9212ed94686d8e871c6c2c368 | [
"MIT"
] | null | null | null | from typing import List
from typing import OrderedDict as OrderedDictType
from typing import Set
from ordered_set import OrderedSet
from text_selection.cover_applied import cover_symbols
| 23.933333 | 103 | 0.791086 |
a22664719551bd9b619aac10e37bfaca231b7de4 | 1,277 | py | Python | app/barber/forms.py | avb76/barbershop | 975b501b0c53600909910619e248dff627acaa22 | [
"MIT"
] | null | null | null | app/barber/forms.py | avb76/barbershop | 975b501b0c53600909910619e248dff627acaa22 | [
"MIT"
] | null | null | null | app/barber/forms.py | avb76/barbershop | 975b501b0c53600909910619e248dff627acaa22 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField, TextAreaField, IntegerField
from wtforms.validators import DataRequired, EqualTo, ValidationError, Length
from app.models import Barber
| 47.296296 | 99 | 0.736883 |
a22672c26b21c2dcb23aca1b6a35742a4a6a6b9f | 5,122 | py | Python | UI/MenuBar/SetupMenu.py | Luk-kar/Show_Similar_Images | 806cc36dc44283a13883fa7940b99e6c3ba484b9 | [
"MIT"
] | null | null | null | UI/MenuBar/SetupMenu.py | Luk-kar/Show_Similar_Images | 806cc36dc44283a13883fa7940b99e6c3ba484b9 | [
"MIT"
] | null | null | null | UI/MenuBar/SetupMenu.py | Luk-kar/Show_Similar_Images | 806cc36dc44283a13883fa7940b99e6c3ba484b9 | [
"MIT"
] | null | null | null | import os
import sys
import tkinter as tk
from configparser import ConfigParser
from tkinter import filedialog # for Python 3
from tkinter import messagebox
from config.Dialogs import Dialogs
from UI.helpers.open_folder import open_folder
# https://stackoverflow.com/questions/31170616/how-to-access-a-method-in-one-... | 31.423313 | 127 | 0.630613 |
a227318e6a334fffff87d6e6e584338f480d2fab | 4,500 | py | Python | helper.py | prachir1501/NeuralDater | 3604443c73c4eba36fcfac37668fcc4c7039df63 | [
"Apache-2.0"
] | 64 | 2018-05-15T01:35:08.000Z | 2021-08-16T06:41:29.000Z | helper.py | prachir1501/NeuralDater | 3604443c73c4eba36fcfac37668fcc4c7039df63 | [
"Apache-2.0"
] | 16 | 2018-12-04T05:47:55.000Z | 2022-02-09T23:43:41.000Z | helper.py | prachir1501/NeuralDater | 3604443c73c4eba36fcfac37668fcc4c7039df63 | [
"Apache-2.0"
] | 15 | 2018-05-15T01:40:25.000Z | 2021-07-26T07:13:31.000Z | import numpy as np, sys, unicodedata, requests, os, random, pdb, requests, json, gensim
import matplotlib.pyplot as plt, uuid, time, argparse, pickle, operator
import logging, logging.config, itertools, pathlib
import scipy.sparse as sp
from collections import defaultdict as ddict
from random import randint
from pprin... | 28.66242 | 115 | 0.639778 |
a2286fc0850b349d58a0c4ff43aac7de7b7fddb6 | 24 | py | Python | pywick/models/segmentation/testnets/drnet/__init__.py | achaiah/pywick | 9d663faf0c1660a9b8359a6472c164f658dfc8cb | [
"MIT"
] | 408 | 2019-05-16T16:12:41.000Z | 2022-03-26T17:27:12.000Z | pywick/models/segmentation/testnets/drnet/__init__.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | 13 | 2019-05-17T05:47:06.000Z | 2021-06-21T19:02:30.000Z | pywick/models/segmentation/testnets/drnet/__init__.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | 42 | 2019-05-16T19:57:12.000Z | 2022-03-06T15:23:18.000Z | from .drnet import DRNet | 24 | 24 | 0.833333 |
a228f2269b0b7236b33b169d615d780e9a83375c | 1,916 | py | Python | Solutions/problem11.py | WalrusCow/euler | b5bfa67c87c7043f521cde32e7212c0fffdbacd9 | [
"MIT"
] | null | null | null | Solutions/problem11.py | WalrusCow/euler | b5bfa67c87c7043f521cde32e7212c0fffdbacd9 | [
"MIT"
] | null | null | null | Solutions/problem11.py | WalrusCow/euler | b5bfa67c87c7043f521cde32e7212c0fffdbacd9 | [
"MIT"
] | null | null | null | # Project Euler Problem 11
# Created on: 2012-06-14
# Created by: William McDonald
# Return the minimum number that can be present in
# a solution set of four numbers
ans = getAns()
print(ans)
| 23.95 | 51 | 0.408142 |
a2298083ce23c56c820c746c853d5f1e55a1c6d8 | 461 | py | Python | Python/pyworkout/files/ex18.py | honchardev/Fun | ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc | [
"MIT"
] | null | null | null | Python/pyworkout/files/ex18.py | honchardev/Fun | ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc | [
"MIT"
] | 3 | 2020-03-24T16:26:35.000Z | 2020-04-15T19:40:41.000Z | Python/pyworkout/files/ex18.py | honchardev/Fun | ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main()
| 18.44 | 56 | 0.624729 |
bf3dd4728334d3eb10985f40bf78421b50fef902 | 4,847 | py | Python | frontend-python/test/test_uart.py | kazooiebombchu/spc-player | 8d6ae8f92cbaaf182377c3914aedf6bb6d8a9e3d | [
"MIT"
] | 31 | 2020-01-28T20:46:39.000Z | 2022-03-30T00:55:39.000Z | frontend-python/test/test_uart.py | kazooiebombchu/spc-player | 8d6ae8f92cbaaf182377c3914aedf6bb6d8a9e3d | [
"MIT"
] | null | null | null | frontend-python/test/test_uart.py | kazooiebombchu/spc-player | 8d6ae8f92cbaaf182377c3914aedf6bb6d8a9e3d | [
"MIT"
] | 1 | 2021-12-31T14:01:50.000Z | 2021-12-31T14:01:50.000Z | import time
from test.serial_test_case import SerialTestCase
from uart import Uart
from exceptions import SpcExpection
| 41.42735 | 87 | 0.588612 |
bf3ff739f5d2991ad3d76f833bf7356a90d392e0 | 861 | py | Python | gunnery/account/backend.py | dholdaway/gunnery | 87664986cd8bf1a17a9cbfb98fb1012cef9adaec | [
"Apache-2.0"
] | null | null | null | gunnery/account/backend.py | dholdaway/gunnery | 87664986cd8bf1a17a9cbfb98fb1012cef9adaec | [
"Apache-2.0"
] | 1 | 2021-06-10T23:55:50.000Z | 2021-06-10T23:55:50.000Z | gunnery/account/backend.py | dholdaway/gunnery | 87664986cd8bf1a17a9cbfb98fb1012cef9adaec | [
"Apache-2.0"
] | null | null | null | from django.contrib.auth.models import check_password
from django.contrib.auth import get_user_model
_user = get_user_model() | 30.75 | 76 | 0.637631 |
bf4005072d631cf675107862189be528c29b2df5 | 3,025 | py | Python | tsim/serialization/network.py | eduardomezencio/tsim | 60ac63152a98fd7dabb59c66367bca216e6a7370 | [
"MIT"
] | 2 | 2021-04-24T06:48:13.000Z | 2022-01-25T02:38:44.000Z | tsim/serialization/network.py | eduardomezencio/tsim | 60ac63152a98fd7dabb59c66367bca216e6a7370 | [
"MIT"
] | null | null | null | tsim/serialization/network.py | eduardomezencio/tsim | 60ac63152a98fd7dabb59c66367bca216e6a7370 | [
"MIT"
] | null | null | null | """Network serialization configuration."""
from __future__ import annotations
from functools import partialmethod
from itertools import chain
from tsim.core.entity import EntityRef
from tsim.core.network.intersection import ConflictPoint, Curve, Intersection
from tsim.core.network.lane import Lane, LaneSegment
from ... | 33.988764 | 79 | 0.727603 |
bf41401950390cdf29d5f90c31faef77bad5aca9 | 6,143 | py | Python | egs/icfhr2014kws/src/plot_xml_submission.py | lquirosd/PyLaia | 398146be3ef211d7de97564ce5e55a141afe622c | [
"MIT"
] | 3 | 2020-08-26T00:17:05.000Z | 2021-02-25T19:03:30.000Z | egs/icfhr2014kws/src/plot_xml_submission.py | Transkribus/PyLaia | 903ef593ccb2eefb99109c25ffd1be357e83a86b | [
"MIT"
] | 1 | 2020-12-06T18:11:52.000Z | 2020-12-06T18:19:38.000Z | egs/icfhr2014kws/src/plot_xml_submission.py | Transkribus/PyLaia | 903ef593ccb2eefb99109c25ffd1be357e83a86b | [
"MIT"
] | 2 | 2020-04-20T13:40:56.000Z | 2020-10-17T11:59:55.000Z | #!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import math
import os.path
import random
import xml.sax
from PIL import Image, ImageDraw
if __name__ == "__main__":
parser = argparse.ArgumentParser()
pars... | 32.675532 | 88 | 0.506105 |
bf422087326ad1d8b6d00ce1855d37c1b494e173 | 288 | py | Python | tests/_test_paramiko.py | weka-io/plumbum | 2d244c02f38498cacfb3519bdebe42e4c5dc72b3 | [
"MIT"
] | 1 | 2021-03-25T21:13:13.000Z | 2021-03-25T21:13:13.000Z | tests/_test_paramiko.py | weka-io/plumbum | 2d244c02f38498cacfb3519bdebe42e4c5dc72b3 | [
"MIT"
] | null | null | null | tests/_test_paramiko.py | weka-io/plumbum | 2d244c02f38498cacfb3519bdebe42e4c5dc72b3 | [
"MIT"
] | null | null | null | from plumbum.paramiko_machine import ParamikoMachine as PM
from plumbum import local
local.env.path.append("c:\\progra~1\\git\\bin")
from plumbum.cmd import ls, grep
m=PM("192.168.1.143")
mls=m["ls"]
mgrep=m["grep"]
#(mls | mgrep["b"])()
(mls | grep["\\."])()
(ls | mgrep["\\."])()
| 16.941176 | 58 | 0.638889 |
bf433dd8529117f175667a1ada2e1fe46bda728e | 21,820 | py | Python | spiders/zhihu_spider.py | sunhailin-Leo/TeamLeoX_BlogsCrawler | 389ff31e02bdff415c8bc470a3a48da1acb14c4c | [
"MIT"
] | null | null | null | spiders/zhihu_spider.py | sunhailin-Leo/TeamLeoX_BlogsCrawler | 389ff31e02bdff415c8bc470a3a48da1acb14c4c | [
"MIT"
] | null | null | null | spiders/zhihu_spider.py | sunhailin-Leo/TeamLeoX_BlogsCrawler | 389ff31e02bdff415c8bc470a3a48da1acb14c4c | [
"MIT"
] | null | null | null | import time
from typing import Dict, List, Optional
from urllib.parse import urlencode
from requests.utils import dict_from_cookiejar
from requests_toolbelt import MultipartEncoder
from utils.encrypt_utils import md5_str
from utils.logger_utils import LogManager
from utils.str_utils import check_is_json
from captcha.... | 46.033755 | 391 | 0.537764 |
bf4389979bbeb1ecafb87741b50b5595107dacec | 1,521 | py | Python | tilapia/lib/basic/bip32.py | huazhouwang/python_multichain_wallet | 52e0acdc2984c08990cb36433ef17a414fbe8312 | [
"MIT"
] | 2 | 2021-09-23T13:47:08.000Z | 2021-09-24T02:39:14.000Z | tilapia/lib/basic/bip32.py | huazhouwang/tilapia | 52e0acdc2984c08990cb36433ef17a414fbe8312 | [
"MIT"
] | null | null | null | tilapia/lib/basic/bip32.py | huazhouwang/tilapia | 52e0acdc2984c08990cb36433ef17a414fbe8312 | [
"MIT"
] | null | null | null | from typing import List, Optional
BIP32_PRIME = 0x80000000
UINT32_MAX = (1 << 32) - 1
| 29.25 | 83 | 0.593688 |
bf4417e992cda896f5b5d7ec9787891875aec0be | 2,070 | py | Python | pitronically/blog/migrations/0002_auto_20190719_1436.py | the16thpythonist/pitronically | 2f680f4e04a59fed7b410a4b8c26240c4efc5159 | [
"MIT"
] | null | null | null | pitronically/blog/migrations/0002_auto_20190719_1436.py | the16thpythonist/pitronically | 2f680f4e04a59fed7b410a4b8c26240c4efc5159 | [
"MIT"
] | null | null | null | pitronically/blog/migrations/0002_auto_20190719_1436.py | the16thpythonist/pitronically | 2f680f4e04a59fed7b410a4b8c26240c4efc5159 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.8 on 2019-07-19 14:36
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import filer.fields.image
import taggit.managers
| 39.056604 | 171 | 0.658937 |
bf4534497c74067b4ddb8a6599a853af99617d7a | 587 | py | Python | rest_slack/app_settings.py | jordaneremieff/django-rest-slack | 18d2662898c6d9408d7cbb573ffdbb5dad1fb1b3 | [
"MIT"
] | 1 | 2020-09-26T18:28:11.000Z | 2020-09-26T18:28:11.000Z | rest_slack/app_settings.py | jordaneremieff/django-rest-slack | 18d2662898c6d9408d7cbb573ffdbb5dad1fb1b3 | [
"MIT"
] | null | null | null | rest_slack/app_settings.py | jordaneremieff/django-rest-slack | 18d2662898c6d9408d7cbb573ffdbb5dad1fb1b3 | [
"MIT"
] | null | null | null | import os
from django.conf import settings
SLACK_CLIENT_ID = getattr(settings, 'SLACK_CLIENT_ID', os.environ.get('SLACK_CLIENT_ID'))
SLACK_CLIENT_SECRET = getattr(settings, 'SLACK_CLIENT_SECRET', os.environ.get('SLACK_CLIENT_SECRET'))
SLACK_VERIFICATION_TOKEN = getattr(settings, 'SLACK_VERIFICATION_TOKEN', os.e... | 30.894737 | 117 | 0.807496 |
bf4d33f3d55caacf7fbaa981aaf614ce3ba88ed9 | 435 | py | Python | komax_app/migrations/0002_komax_group_of_square.py | UsernameForGerman/PrettlNKKomax | 8684300852458ab99988a63e49db47d53ff7ddc4 | [
"Apache-2.0"
] | null | null | null | komax_app/migrations/0002_komax_group_of_square.py | UsernameForGerman/PrettlNKKomax | 8684300852458ab99988a63e49db47d53ff7ddc4 | [
"Apache-2.0"
] | 9 | 2021-03-19T14:08:01.000Z | 2022-03-12T00:41:09.000Z | komax_app/migrations/0002_komax_group_of_square.py | UsernameForGerman/PrettlNKKomax | 8684300852458ab99988a63e49db47d53ff7ddc4 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.7 on 2020-02-14 10:43
from django.db import migrations, models
| 21.75 | 66 | 0.593103 |
bf4ebc7557f5026b59e46c0c1926e1f3995e617c | 5,934 | py | Python | src/logos.py | NitikaGupta16/logohunter | f57e987bbd37d6316e701688f99d6e1fea6d406b | [
"MIT"
] | 128 | 2019-02-27T08:47:03.000Z | 2022-02-25T04:23:48.000Z | src/logos.py | AntonMu/logohunter | 4c6eb0931b3c100d4ed03334e26166d2429d5722 | [
"MIT"
] | 10 | 2019-12-11T07:17:27.000Z | 2022-03-27T06:30:55.000Z | src/logos.py | AntonMu/logohunter | 4c6eb0931b3c100d4ed03334e26166d2429d5722 | [
"MIT"
] | 32 | 2019-06-25T20:34:46.000Z | 2022-03-21T12:29:30.000Z | import cv2
import numpy as np
import os
from PIL import Image
from timeit import default_timer as timer
import utils
from utils import contents_of_bbox, features_from_image
from similarity import load_brands_compute_cutoffs, similar_matches, similarity_cutoff, draw_matches
def detect_logo(yolo, img_path, save_img, s... | 40.924138 | 105 | 0.679811 |
bf4f1bc2c88eea77883111bb514d3727d052d5a3 | 1,039 | py | Python | doc/ext/local.py | bneradt/libswoc | 58719322a17fe020ed2340592abb30bbfba26f2f | [
"Apache-2.0"
] | 4 | 2020-05-08T01:11:59.000Z | 2021-10-19T19:04:14.000Z | doc/ext/local.py | bneradt/libswoc | 58719322a17fe020ed2340592abb30bbfba26f2f | [
"Apache-2.0"
] | 12 | 2018-12-19T17:19:18.000Z | 2022-03-01T13:20:11.000Z | doc/ext/local.py | bneradt/libswoc | 58719322a17fe020ed2340592abb30bbfba26f2f | [
"Apache-2.0"
] | 10 | 2019-04-15T14:52:49.000Z | 2022-02-15T00:26:03.000Z | from docutils import nodes
from docutils.parsers import rst
from sphinx.domains import Domain
import os.path
# This is a place to hang git file references.
def make_github_link(name, rawtext, text, lineno, inliner, options={}, content=[]):
"""
This docutils role lets us link to source code via the handy :swoc... | 30.558824 | 100 | 0.688162 |
bf4f56cdd7d1ed2026205e05256522ca0fa0a56b | 157 | py | Python | testreport/views.py | mikiec84/badger-api | d0764fa0fd35ebfd7581e2a0218b59be9d13e814 | [
"MIT"
] | null | null | null | testreport/views.py | mikiec84/badger-api | d0764fa0fd35ebfd7581e2a0218b59be9d13e814 | [
"MIT"
] | 2 | 2021-03-19T23:41:57.000Z | 2021-06-10T23:08:34.000Z | testreport/views.py | gaybro8777/badger-api | d0764fa0fd35ebfd7581e2a0218b59be9d13e814 | [
"MIT"
] | null | null | null | from django.views.generic import TemplateView
import logging
log = logging.getLogger(__name__)
| 15.7 | 45 | 0.77707 |
bf4fb6bd0129319ecf0305a17ab66e72508012dc | 659 | py | Python | BS01-flask-bootstrap-table-demo/app/models.py | AngelLiang/Flask-Demos | cf0a74885b873cb2583b3870ccdf3508d3af602e | [
"MIT"
] | 3 | 2020-06-17T05:44:48.000Z | 2021-09-11T02:49:38.000Z | BS01-flask-bootstrap-table-demo/app/models.py | AngelLiang/Flask-Demos | cf0a74885b873cb2583b3870ccdf3508d3af602e | [
"MIT"
] | 3 | 2021-06-08T20:57:03.000Z | 2022-02-23T14:54:59.000Z | BS01-flask-bootstrap-table-demo/app/models.py | AngelLiang/Flask-Demos | cf0a74885b873cb2583b3870ccdf3508d3af602e | [
"MIT"
] | 6 | 2020-06-17T05:44:56.000Z | 2022-03-29T12:53:05.000Z | from sqlalchemy_mptt.mixins import BaseNestedSets
from .extensions import db
| 27.458333 | 76 | 0.590288 |
bf51ea8f66f30cc8444a666730d0eb20578437ae | 660 | py | Python | python/source/weather.py | oltv00/knowledge | 25d9507d529c494e0d6d9c1d7f643d3249624b65 | [
"MIT"
] | null | null | null | python/source/weather.py | oltv00/knowledge | 25d9507d529c494e0d6d9c1d7f643d3249624b65 | [
"MIT"
] | null | null | null | python/source/weather.py | oltv00/knowledge | 25d9507d529c494e0d6d9c1d7f643d3249624b65 | [
"MIT"
] | null | null | null | import pyowm
token = '88983f82566dea8294a9d3e3fb479918'
language = 'ru'
owm = pyowm.OWM(API_key = token, language = language)
city_temp()
| 30 | 100 | 0.680303 |
bf52a76d4894ce6f64a4e116c982f263b48cac35 | 1,410 | py | Python | main.py | jxk20/nlb-python | 50b29539269210b833f8e5e53e5859b3ac32e248 | [
"MIT"
] | null | null | null | main.py | jxk20/nlb-python | 50b29539269210b833f8e5e53e5859b3ac32e248 | [
"MIT"
] | 1 | 2022-01-08T05:56:12.000Z | 2022-01-08T05:56:12.000Z | main.py | jxk20/nlb-python | 50b29539269210b833f8e5e53e5859b3ac32e248 | [
"MIT"
] | null | null | null | DESCRIPTION = """
This script will look at all the csvs in 'inputs'
Gets all 'to-read' books
Outputs their availability into 'outputs'
"""
import argparse
import os
import logging
logger = logging.Logger("Main Logger")
from pathlib import Path
from dotenv import load_dotenv
from nlbsg import Client
from nlbsg.catalo... | 28.2 | 87 | 0.697872 |
bf53ef3d918d4715c6704f2df580b7658e51cdbf | 159 | py | Python | pythonProject/ex012.py | aknowxd/python_cursoemvideo_1 | 826a7df2c813c209a68193d4f03638e60ca2eb4a | [
"MIT"
] | null | null | null | pythonProject/ex012.py | aknowxd/python_cursoemvideo_1 | 826a7df2c813c209a68193d4f03638e60ca2eb4a | [
"MIT"
] | null | null | null | pythonProject/ex012.py | aknowxd/python_cursoemvideo_1 | 826a7df2c813c209a68193d4f03638e60ca2eb4a | [
"MIT"
] | null | null | null | price = float(input("Digite o preco do produto: "))
discount = (5/100) * price
total = price - discount
print("O valor com desconto eh: {:.2f}".format(total)) | 31.8 | 54 | 0.679245 |
bf55c375383410b68471e4aaaea5cbb22ffb9121 | 1,661 | py | Python | accounts/migrations/0004_auto_20210202_0653.py | MattatPath/Path-backend | c8fde0f39162ff020c475badc76b191f9fec600c | [
"Apache-2.0"
] | null | null | null | accounts/migrations/0004_auto_20210202_0653.py | MattatPath/Path-backend | c8fde0f39162ff020c475badc76b191f9fec600c | [
"Apache-2.0"
] | null | null | null | accounts/migrations/0004_auto_20210202_0653.py | MattatPath/Path-backend | c8fde0f39162ff020c475badc76b191f9fec600c | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.12 on 2021-02-02 06:53
from django.db import migrations, models
| 30.759259 | 82 | 0.560506 |
bf5b03b6aea324518faad975783b72f435bb8835 | 8,115 | py | Python | misvm/misssvm.py | lvkd84/misvm | 9f4fb375c05a6b1dac55e96c025c738e8619db98 | [
"BSD-3-Clause"
] | null | null | null | misvm/misssvm.py | lvkd84/misvm | 9f4fb375c05a6b1dac55e96c025c738e8619db98 | [
"BSD-3-Clause"
] | null | null | null | misvm/misssvm.py | lvkd84/misvm | 9f4fb375c05a6b1dac55e96c025c738e8619db98 | [
"BSD-3-Clause"
] | null | null | null | """
Implements MissSVM
"""
from __future__ import print_function, division
import numpy as np
import scipy.sparse as sp
from random import uniform
import inspect
from misvm.quadprog import IterativeQP, Objective
from misvm.util import BagSplitter, spdiag, slices
from misvm.kernel import by_name as kernel_by_name
from m... | 41.192893 | 89 | 0.52175 |
bf5eb7600c6effe11ba9834981e9b94a78c72d11 | 630 | py | Python | vehicle_counter.py | tzechiop/Traffic-Counter-Image-Analysis | 54fbd50ed616e9e09686b8a02debe96d584486f7 | [
"MIT"
] | null | null | null | vehicle_counter.py | tzechiop/Traffic-Counter-Image-Analysis | 54fbd50ed616e9e09686b8a02debe96d584486f7 | [
"MIT"
] | null | null | null | vehicle_counter.py | tzechiop/Traffic-Counter-Image-Analysis | 54fbd50ed616e9e09686b8a02debe96d584486f7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 3 21:28:05 2016
@author: thasegawa
"""
import logging
# ============================================================================
# ============================================================================
| 24.230769 | 78 | 0.48254 |
bf601bab0eabedcbb63dd95b687c310892810533 | 8,130 | py | Python | examples/muffin/app.py | javdrher/umongo | 7eef315cea588c4c22815effbd1e4d8c571e8aa7 | [
"MIT"
] | null | null | null | examples/muffin/app.py | javdrher/umongo | 7eef315cea588c4c22815effbd1e4d8c571e8aa7 | [
"MIT"
] | null | null | null | examples/muffin/app.py | javdrher/umongo | 7eef315cea588c4c22815effbd1e4d8c571e8aa7 | [
"MIT"
] | null | null | null | import json
import datetime
import muffin
from bson import ObjectId
from aiohttp.web import json_response
from motor.motor_asyncio import AsyncIOMotorClient
from functools import partial
from umongo import Instance, Document, fields, ValidationError, set_gettext
from umongo.marshmallow_bonus import SchemaFromUmongo
i... | 31.882353 | 97 | 0.651661 |
bf622286d5a2ac131a9d50dc4d3ad733d1ded785 | 1,594 | py | Python | bluebed/dhs_example.py | eivindgl/bluebed | 6d5aac9e37c43e2821df8fe8ba7dd6fc71ed78a1 | [
"MIT"
] | null | null | null | bluebed/dhs_example.py | eivindgl/bluebed | 6d5aac9e37c43e2821df8fe8ba7dd6fc71ed78a1 | [
"MIT"
] | null | null | null | bluebed/dhs_example.py | eivindgl/bluebed | 6d5aac9e37c43e2821df8fe8ba7dd6fc71ed78a1 | [
"MIT"
] | null | null | null | from bluebed import download
from bluebed import storage
import xmlrpc.client
| 41.947368 | 108 | 0.702008 |
bf624e744ab608312869ea11ba9c230d82852eee | 5,715 | py | Python | modules/utils/model.py | GurovRoman/pythonNGramModel | b87896d89979127fa864c77932f207bd8241a1bf | [
"MIT"
] | null | null | null | modules/utils/model.py | GurovRoman/pythonNGramModel | b87896d89979127fa864c77932f207bd8241a1bf | [
"MIT"
] | null | null | null | modules/utils/model.py | GurovRoman/pythonNGramModel | b87896d89979127fa864c77932f207bd8241a1bf | [
"MIT"
] | null | null | null | import pickle
from collections import defaultdict, Counter
from numpy.random import choice
| 30.398936 | 90 | 0.552231 |
bf64329a401f8a3deaff34d4c2c062d41d879888 | 6,900 | py | Python | app/views/book_views.py | lfernandez55/flask_full_directory | 8daa341ea0c7ee569d3f1a1dea84396d2252be03 | [
"BSD-2-Clause"
] | null | null | null | app/views/book_views.py | lfernandez55/flask_full_directory | 8daa341ea0c7ee569d3f1a1dea84396d2252be03 | [
"BSD-2-Clause"
] | null | null | null | app/views/book_views.py | lfernandez55/flask_full_directory | 8daa341ea0c7ee569d3f1a1dea84396d2252be03 | [
"BSD-2-Clause"
] | null | null | null | # Copyright 2014 SolidBuilds.com. All rights reserved
#
# Authors: Ling Thio <ling.thio@gmail.com>
from flask import Blueprint, redirect, render_template
from flask import request, url_for
from flask_user import current_user, login_required, roles_required
from app import db
from app.models.user_models import UserPr... | 38.983051 | 224 | 0.658841 |
bf64e15c2ae7fbe778bd815cba2fe89218f46d8c | 1,284 | py | Python | flux/trapezoidal.py | AaronDJohnson/fbtpoint | d5f84006b7b5a53cbf92a9e763f8a6913b86233e | [
"MIT"
] | 1 | 2021-01-19T19:14:03.000Z | 2021-01-19T19:14:03.000Z | flux/trapezoidal.py | AaronDJohnson/fbtpoint | d5f84006b7b5a53cbf92a9e763f8a6913b86233e | [
"MIT"
] | null | null | null | flux/trapezoidal.py | AaronDJohnson/fbtpoint | d5f84006b7b5a53cbf92a9e763f8a6913b86233e | [
"MIT"
] | null | null | null | import numpy as np
def trapezoidal_rule(f, a, b, tol=1e-8):
"""
The trapezoidal rule is known to be very accurate for
oscillatory integrals integrated over their period.
See papers on spectral integration (it's just the composite trapezoidal rule....)
TODO (aaron): f is memoized to get the alrea... | 32.1 | 92 | 0.560748 |
bf650b82a89d14e4f85fb66a34893fc6b8f9780c | 5,625 | py | Python | custom-actions/actions/sql_query.py | AnthonyGigerich/conciergerie-test | b2e30bb85c5e1bcc0903c8fce3fe5d333dc61e06 | [
"MIT"
] | null | null | null | custom-actions/actions/sql_query.py | AnthonyGigerich/conciergerie-test | b2e30bb85c5e1bcc0903c8fce3fe5d333dc61e06 | [
"MIT"
] | null | null | null | custom-actions/actions/sql_query.py | AnthonyGigerich/conciergerie-test | b2e30bb85c5e1bcc0903c8fce3fe5d333dc61e06 | [
"MIT"
] | null | null | null | import sqlite3
from datetime import datetime
database = "../rasa.db"
# Parameter: Database pointer, sql command, and the data used for the command
# Function: Run the sql command
# Function: Add a new search entry in the database
# Function: Add the keyword proposed in the database
# Parameter: result_data = (r... | 28.69898 | 140 | 0.605867 |
bf66561ccab793fd97f838030e913d07b3b572ed | 380 | py | Python | example_problems/tutorial/triangle/bots/feasible_path_bot.py | romeorizzi/TAlight | 2217f8790820d8ec7ab076c836b2d182877d8ee8 | [
"MIT"
] | 3 | 2021-01-08T09:56:46.000Z | 2021-03-02T20:47:29.000Z | example_problems/tutorial/triangle/bots/feasible_path_bot.py | romeorizzi/TAlight | 2217f8790820d8ec7ab076c836b2d182877d8ee8 | [
"MIT"
] | 1 | 2021-01-23T06:50:31.000Z | 2021-03-17T15:35:18.000Z | example_problems/tutorial/triangle/bots/feasible_path_bot.py | romeorizzi/TAlight | 2217f8790820d8ec7ab076c836b2d182877d8ee8 | [
"MIT"
] | 4 | 2021-01-06T12:10:23.000Z | 2021-03-16T22:16:07.000Z | #!/usr/bin/python
from sys import stderr, exit, argv
import random
usage=f"""I am an efficient (linear time) bot that provides a feasible path for every instance (in an infinite loop)."""
while True:
directions = ["L","R"]
instance = input()
n = len(instance)
path = ""
for _ in range(n-1):
... | 22.352941 | 120 | 0.642105 |
bf66c90ca3f06c6426422a9f5d3196136c5282fd | 1,211 | py | Python | shop/orders/repository.py | n400/faunadb-shop | 631274d899bab7b8471f714057dd08abff0805dc | [
"MIT"
] | 2 | 2021-03-24T09:01:59.000Z | 2021-07-10T21:10:12.000Z | shop/orders/repository.py | n400/faunadb-shop | 631274d899bab7b8471f714057dd08abff0805dc | [
"MIT"
] | null | null | null | shop/orders/repository.py | n400/faunadb-shop | 631274d899bab7b8471f714057dd08abff0805dc | [
"MIT"
] | 1 | 2021-07-20T23:17:04.000Z | 2021-07-20T23:17:04.000Z | from faunadb import query as q
from shop.fauna.client import FaunaClient
| 30.275 | 112 | 0.535095 |
bf68cb245ba6deee59d3d18e4dc1928aacd04d53 | 1,500 | py | Python | spacy_loggers/util.py | snosrap/spacy-loggers | 487fc4cb8e63f7ff197f6e988a217c9d6f2ce63a | [
"MIT"
] | 2 | 2021-09-16T12:04:20.000Z | 2022-02-26T21:21:13.000Z | spacy_loggers/util.py | snosrap/spacy-loggers | 487fc4cb8e63f7ff197f6e988a217c9d6f2ce63a | [
"MIT"
] | 8 | 2021-09-22T12:47:32.000Z | 2022-01-14T21:30:38.000Z | spacy_loggers/util.py | snosrap/spacy-loggers | 487fc4cb8e63f7ff197f6e988a217c9d6f2ce63a | [
"MIT"
] | 5 | 2021-09-14T12:00:03.000Z | 2022-02-26T08:17:17.000Z | """
Configuration utilities copied from spacy.util.
"""
from typing import Dict, Any, Iterator, Tuple, List
def dot_to_dict(values: Dict[str, Any]) -> Dict[str, dict]:
"""Convert dot notation to a dict. For example: {"token.pos": True,
"token._.xyz": True} becomes {"token": {"pos": True, "_": {"xyz": True }}... | 34.090909 | 79 | 0.597333 |
bf6993abead3ad20864b92dcbe7c7622bbb2b45e | 2,533 | py | Python | fun_IntegralScale.py | Tmizu0719/FFB_HISTORY | 11aaba65c587033d3ad82564c39fba53414143fa | [
"MIT"
] | null | null | null | fun_IntegralScale.py | Tmizu0719/FFB_HISTORY | 11aaba65c587033d3ad82564c39fba53414143fa | [
"MIT"
] | null | null | null | fun_IntegralScale.py | Tmizu0719/FFB_HISTORY | 11aaba65c587033d3ad82564c39fba53414143fa | [
"MIT"
] | null | null | null | """
January 13th 2020
Author T.Mizumoto
"""
#! python 3
# ver.x1.00
# Integral-Scale_function.py - this program calculate integral-scale and correlation.
import numpy as np
from scipy.integrate import simps
from scipy.stats import pearsonr
import pandas as pd
# index_basepoint = 0 (defult)
if __name... | 30.154762 | 107 | 0.631267 |
bf69a79ad9cc5ad34daad0afb95291607ec744b9 | 1,003 | py | Python | Alfred.alfredpreferences/workflows/user.workflow.73C16A76-E7DC-4A21-AE3B-32FD533AB1FF/src/action.py | Puritanic/Dotfiles | 6f8561f1c5badbe39d9d06cea06f577ddac68fc6 | [
"MIT"
] | 34 | 2016-11-07T15:06:11.000Z | 2021-05-09T08:04:29.000Z | alfred/src/action.py | dishantpandya777/pomodoro-alfred | 48ade5a50b183a3614c6a54d08f7607390b9c5b5 | [
"MIT"
] | 6 | 2016-11-08T05:08:50.000Z | 2017-03-14T19:08:50.000Z | alfred/src/action.py | dishantpandya777/pomodoro-alfred | 48ade5a50b183a3614c6a54d08f7607390b9c5b5 | [
"MIT"
] | 13 | 2016-11-07T18:22:00.000Z | 2022-01-18T23:55:52.000Z | #!/usr/bin/python
# encoding: utf-8
import sys
from subprocess import call
from workflow import Workflow, notify
from args import *
if __name__ == '__main__':
# Create a global `Workflow` object
wf = Workflow()
# Call your entry function via `Workflow.run()` to enable its helper
# functions, like exc... | 23.325581 | 72 | 0.684945 |
bf6bba62cfa86d75f46fc7260c7fa058af76ac89 | 2,897 | py | Python | opsrest/custom/basecontroller.py | chinhtle/ops-restd | ab3599a0b8b4df99c35b3f99de6948b2c41630d5 | [
"Apache-2.0"
] | null | null | null | opsrest/custom/basecontroller.py | chinhtle/ops-restd | ab3599a0b8b4df99c35b3f99de6948b2c41630d5 | [
"Apache-2.0"
] | null | null | null | opsrest/custom/basecontroller.py | chinhtle/ops-restd | ab3599a0b8b4df99c35b3f99de6948b2c41630d5 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2015-2016 Hewlett Packard Enterprise Development LP
#
# 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 ... | 33.686047 | 78 | 0.678288 |
bf6bdc1e70f317e3b24fbc925cd202f707caf212 | 2,775 | py | Python | daluke/api/fetch_model.py | peleiden/daluke | d2c85ba6b80021b2959b369381c447d18b058576 | [
"MIT"
] | 10 | 2021-07-06T08:31:45.000Z | 2021-12-17T09:13:33.000Z | daluke/api/fetch_model.py | peleiden/daLUKE | d2c85ba6b80021b2959b369381c447d18b058576 | [
"MIT"
] | 70 | 2021-03-26T13:30:39.000Z | 2021-06-10T15:06:36.000Z | daluke/api/fetch_model.py | peleiden/daluke | d2c85ba6b80021b2959b369381c447d18b058576 | [
"MIT"
] | null | null | null | from __future__ import annotations
import enum
import os
import pathlib
from typing import Optional
import wget
import torch
import numpy as np
from transformers import AutoConfig
from daluke.serialize import load_from_archive
from daluke.model import DaLUKE, get_ent_embed_size
from daluke.ner.model import NERDaLUKE
... | 35.126582 | 114 | 0.710991 |
bf6be8417c2a0792cfff0913ae7b2f5069068560 | 2,044 | py | Python | main.py | cpwasthere/Module09 | 76dbe293f22ad775353c30c9845d8e22a640679c | [
"MIT"
] | null | null | null | main.py | cpwasthere/Module09 | 76dbe293f22ad775353c30c9845d8e22a640679c | [
"MIT"
] | null | null | null | main.py | cpwasthere/Module09 | 76dbe293f22ad775353c30c9845d8e22a640679c | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------
# Title: Assignment 09
# Description: Working with Modules
# ChangeLog (Who,When,What):
# ChrisPerry,12/2/19, Created started script
# ChrisPerry,12/6/19, Edits
# ChrisPerry,12/7/19, Final Edits to complete Assignment 9
# ----------------------... | 39.307692 | 108 | 0.641389 |
bf6c8896b3823d91e05bd42f0104f9e302b14adf | 1,417 | py | Python | RecoLocalCalo/Configuration/python/ecalLocalRecoSequenceCosmics_cff.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | RecoLocalCalo/Configuration/python/ecalLocalRecoSequenceCosmics_cff.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | RecoLocalCalo/Configuration/python/ecalLocalRecoSequenceCosmics_cff.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
# Calo geometry service model
#
# removed by tommaso
#
#ECAL conditions
# include "CalibCalorimetry/EcalTrivialCondModules/data/EcalTrivialCondRetriever.cfi"
#
#TPG condition needed by ecalRecHit producer if TT recovery is ON
from RecoLocalCalo.EcalRecProducers.ecalRecHitTPGCo... | 33.738095 | 100 | 0.819337 |
bf6c8f928de7466c904bdf317f5ab154d04ebdaf | 3,065 | py | Python | recurrent_neural_networks/hopfield_network.py | sgalella/RecurrentNeuralNetworks | 7ff5b9487e7f91d8d93fe04c825491318e87504d | [
"MIT"
] | null | null | null | recurrent_neural_networks/hopfield_network.py | sgalella/RecurrentNeuralNetworks | 7ff5b9487e7f91d8d93fe04c825491318e87504d | [
"MIT"
] | null | null | null | recurrent_neural_networks/hopfield_network.py | sgalella/RecurrentNeuralNetworks | 7ff5b9487e7f91d8d93fe04c825491318e87504d | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from utils import get_state_vowel
if __name__ == "__main__":
main()
| 33.681319 | 113 | 0.562153 |
bf6e81a2084745fc5aa9fbd063f88115c043ebff | 3,973 | py | Python | src/calcExpectedDiff.py | marioevz/eth_tools | df219cd8a32bd73b84924aa9e00345db99b601eb | [
"MIT"
] | 4 | 2021-11-04T16:57:47.000Z | 2021-12-12T03:39:01.000Z | src/calcExpectedDiff.py | marioevz/eth_tools | df219cd8a32bd73b84924aa9e00345db99b601eb | [
"MIT"
] | null | null | null | src/calcExpectedDiff.py | marioevz/eth_tools | df219cd8a32bd73b84924aa9e00345db99b601eb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import json
import os
if len(sys.argv) == 2 and sys.argv[1] == '-h':
print_usage()
sys.exit()
elif len(sys.argv) != 7:
print_usage()
raise Exception('Incorrect number of arguments')
(_, parent_diff, parent_uncle_count, parent_timestamp, timestamp, block, fork) = sys.ar... | 26.844595 | 180 | 0.709036 |
bf6f67f11444109c1bcf16f2c4b70d8b67dc8cc0 | 947 | py | Python | graph_rl/envs/flatten_wrapper.py | nicoguertler/graphrl | 21a1cefc53e5c457745570460de0d99e68622e57 | [
"MIT"
] | 1 | 2022-01-04T15:21:55.000Z | 2022-01-04T15:21:55.000Z | graph_rl/envs/flatten_wrapper.py | nicoguertler/graph_rl | 21a1cefc53e5c457745570460de0d99e68622e57 | [
"MIT"
] | null | null | null | graph_rl/envs/flatten_wrapper.py | nicoguertler/graph_rl | 21a1cefc53e5c457745570460de0d99e68622e57 | [
"MIT"
] | null | null | null | from gym import Wrapper
from ..spaces import space_from_gym_space
| 31.566667 | 89 | 0.708553 |
bf6fa3bac8a01bbe20117acf8a4c0088fe713ca1 | 94 | py | Python | _playground/in_progress/sand.py | the-deep/DEEPL | 93f7bf7d61d7424250d01c1fc510347375d767c4 | [
"MIT"
] | 6 | 2018-05-17T07:40:16.000Z | 2020-09-27T00:04:39.000Z | _playground/in_progress/sand.py | eoglethorpe/DEEPL | fb6403ceb63197ecd314905f060a2e5f1e790f66 | [
"MIT"
] | 11 | 2017-10-28T10:50:09.000Z | 2021-06-10T20:07:44.000Z | _playground/in_progress/sand.py | eoglethorpe/DEEPL | fb6403ceb63197ecd314905f060a2e5f1e790f66 | [
"MIT"
] | 1 | 2018-10-04T21:27:58.000Z | 2018-10-04T21:27:58.000Z | import nltk
txt = nltk.data.load('/Users/ewanog/Dropbox/Work/ACAPS/nlp/text.txt')
print(txt) | 18.8 | 69 | 0.744681 |
bf714ad8fd6286252d03542ce325ec9f5d78e4a5 | 2,375 | py | Python | photoapp/tests.py | johnmwangi/Gallery_jpG | e8c9874cbedf519c522f7e313a3bdfd6ea193cbf | [
"MIT"
] | null | null | null | photoapp/tests.py | johnmwangi/Gallery_jpG | e8c9874cbedf519c522f7e313a3bdfd6ea193cbf | [
"MIT"
] | 5 | 2021-03-19T01:11:45.000Z | 2022-03-11T23:49:40.000Z | photoapp/tests.py | johnmwangi/Gallery_jpG | e8c9874cbedf519c522f7e313a3bdfd6ea193cbf | [
"MIT"
] | null | null | null | from django.test import TestCase
from .models import *
# Create your tests here.
#
# def test_delete_image(self):
# self.drinks.save()
# self.drinks.delete()
# self.assertTrue(len(Image.objects.all()) == 0)
#
# def test_update(self):
# self.drinks.save()
# self.drinks.na... | 30.063291 | 116 | 0.624421 |
bf72b9650859239f0b880a34a918bd7ae3eb176f | 7,939 | py | Python | onnxruntime/test/python/quantization/test_op_relu.py | jamill/onnxruntime | 0565fecf46c4dd711c01a4106641946963bf7ff0 | [
"MIT"
] | 669 | 2018-12-03T22:00:31.000Z | 2019-05-06T19:42:49.000Z | onnxruntime/test/python/quantization/test_op_relu.py | jamill/onnxruntime | 0565fecf46c4dd711c01a4106641946963bf7ff0 | [
"MIT"
] | 440 | 2018-12-03T21:09:56.000Z | 2019-05-06T20:47:23.000Z | onnxruntime/test/python/quantization/test_op_relu.py | jamill/onnxruntime | 0565fecf46c4dd711c01a4106641946963bf7ff0 | [
"MIT"
] | 140 | 2018-12-03T21:15:28.000Z | 2019-05-06T18:02:36.000Z | #!/usr/bin/env python
# coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------... | 35.761261 | 114 | 0.596171 |
bf72c55ebb1f1fda069f0c87cc81e120a9000b0c | 6,852 | py | Python | main.py | devanshuDesai/SenseHAR | 7ade495c24fbbc661ceab5f90cadbf132e42819c | [
"MIT"
] | null | null | null | main.py | devanshuDesai/SenseHAR | 7ade495c24fbbc661ceab5f90cadbf132e42819c | [
"MIT"
] | null | null | null | main.py | devanshuDesai/SenseHAR | 7ade495c24fbbc661ceab5f90cadbf132e42819c | [
"MIT"
] | 1 | 2021-09-23T08:04:17.000Z | 2021-09-23T08:04:17.000Z | from model import *
from dataloader import *
from utils import *
from torch.utils.tensorboard import SummaryWriter
import torch.optim as optim
import time
import gc
from tqdm import tqdm
import matplotlib.pyplot as plt
import torch.nn as nn
import numpy as np
import warnings as wn
wn.filterwarnings('ignore')
#load eit... | 35.319588 | 114 | 0.630473 |
bf73ab2efa36aa2f2e67822fb2e61d93d45566d1 | 38 | py | Python | src/kgmk/io/writing/__init__.py | kagemeka/python | 486ce39d97360b61029527bacf00a87fdbcf552c | [
"MIT"
] | null | null | null | src/kgmk/io/writing/__init__.py | kagemeka/python | 486ce39d97360b61029527bacf00a87fdbcf552c | [
"MIT"
] | null | null | null | src/kgmk/io/writing/__init__.py | kagemeka/python | 486ce39d97360b61029527bacf00a87fdbcf552c | [
"MIT"
] | null | null | null | from .df_writer import (
DFWriter,
) | 12.666667 | 24 | 0.710526 |
bf76c3539d0de551ed13011d5b79073fc3c69dca | 563 | py | Python | src/apps/domains/location/urls.py | antiline/jun2 | 00928cea1f4b8cd6634cf9a1ae6dc19c95d0e54c | [
"MIT"
] | null | null | null | src/apps/domains/location/urls.py | antiline/jun2 | 00928cea1f4b8cd6634cf9a1ae6dc19c95d0e54c | [
"MIT"
] | 17 | 2019-06-24T14:11:49.000Z | 2021-06-04T22:19:59.000Z | src/apps/domains/location/urls.py | antiline/jun2 | 00928cea1f4b8cd6634cf9a1ae6dc19c95d0e54c | [
"MIT"
] | null | null | null | from django.urls import path
from apps.domains.location.views import GpxShareFileView, GpxShareView, LocationIndexView, GpxView, GpxFileView
app_name = 'apps.domains.location'
urlpatterns = [
path('', LocationIndexView.as_view(), name='index'),
path('gpx/by-date/', GpxView.as_view(), name='gpx'),
path('g... | 37.533333 | 111 | 0.721137 |
bf77938f692240f0c7e1c8436d0758c664f12b9f | 979 | py | Python | swap_user/__init__.py | artinnok/django-swap-user | f2c02b9fc5829651a6dab9c6d053dfe2425e2266 | [
"MIT"
] | null | null | null | swap_user/__init__.py | artinnok/django-swap-user | f2c02b9fc5829651a6dab9c6d053dfe2425e2266 | [
"MIT"
] | null | null | null | swap_user/__init__.py | artinnok/django-swap-user | f2c02b9fc5829651a6dab9c6d053dfe2425e2266 | [
"MIT"
] | null | null | null | """
________ ___ __ ________ ________ ___ ___ ________ _______ ________
|\ ____\|\ \ |\ \|\ __ \|\ __ \ |\ \|\ \|\ ____\|\ ___ \ |\ __ \
\ \ \___|\ \ \ \ \ \ \ \|\ \ \ \|\ \ \ \ \\\ \ \ \___|\ \ __/|\ \ \|\ \
\ \_____ \ \ \ __\ \ \ \ __ \ \ ... | 44.5 | 95 | 0.427988 |
bf7843d6556dd0a1d7a0a25924f9f057a12b10c1 | 1,495 | py | Python | tools/visualize-sawtooth-label.py | dev0x13/globus-plasma | fa94e8f26ad122485c006d29fd98e767e14e7f3c | [
"MIT"
] | null | null | null | tools/visualize-sawtooth-label.py | dev0x13/globus-plasma | fa94e8f26ad122485c006d29fd98e767e14e7f3c | [
"MIT"
] | null | null | null | tools/visualize-sawtooth-label.py | dev0x13/globus-plasma | fa94e8f26ad122485c006d29fd98e767e14e7f3c | [
"MIT"
] | null | null | null | #!/usr/bin/python3.6
import numpy as np
import csv
import argparse
import matplotlib.pyplot as plt
import sys
import os
####################################
# Sawtooth crash labels visualizer #
####################################
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Sawtooth ... | 29.313725 | 98 | 0.58194 |
bf78aaaa0acb465353b273336d13b89d4bd83f96 | 1,176 | py | Python | tests/config/test_structure.py | gcollard/lightbus | d04deeda8ccef5a582b79255725ca2025a085c02 | [
"Apache-2.0"
] | 178 | 2017-07-22T12:35:00.000Z | 2022-03-28T07:53:13.000Z | tests/config/test_structure.py | adamcharnock/warren | 5e7069da06cd37a8131e8c592ee957ccb73603d5 | [
"Apache-2.0"
] | 26 | 2017-08-03T12:09:29.000Z | 2021-10-19T16:47:18.000Z | tests/config/test_structure.py | adamcharnock/warren | 5e7069da06cd37a8131e8c592ee957ccb73603d5 | [
"Apache-2.0"
] | 19 | 2017-09-15T17:51:24.000Z | 2022-02-28T13:00:16.000Z | import pytest
from lightbus.config.structure import make_transport_selector_structure, ApiConfig, RootConfig
pytestmark = pytest.mark.unit
| 32.666667 | 94 | 0.783163 |
bf7bb0df2ea5bd1508b28ac03700685986a30403 | 3,565 | py | Python | main.py | DataBiosphere/bond | 8459ea2f2a1f0b4e7c9c5e3c4e6361cf71e45ecd | [
"BSD-3-Clause"
] | 2 | 2018-05-29T14:32:55.000Z | 2020-01-16T18:42:14.000Z | main.py | DataBiosphere/bond | 8459ea2f2a1f0b4e7c9c5e3c4e6361cf71e45ecd | [
"BSD-3-Clause"
] | 45 | 2018-06-07T11:30:57.000Z | 2021-05-27T15:13:48.000Z | main.py | DataBiosphere/bond | 8459ea2f2a1f0b4e7c9c5e3c4e6361cf71e45ecd | [
"BSD-3-Clause"
] | 2 | 2018-05-31T20:14:06.000Z | 2020-03-06T01:29:19.000Z | import logging
import logging.config
import os
import flask
import google.cloud.logging
import yaml
from flask_cors import CORS
from google.auth.credentials import AnonymousCredentials
from google.cloud import ndb
from bond_app import routes
from bond_app.json_exception_handler import JsonExceptionHandler
from bond_a... | 37.135417 | 120 | 0.718373 |
bf7d512629d958e60aaa663791c9575360983509 | 131 | py | Python | mathics/builtin/files_io/__init__.py | skirpichev/Mathics | 318e06dea8f1c70758a50cb2f95c9900150e3a68 | [
"Apache-2.0"
] | 1,920 | 2015-01-06T17:56:26.000Z | 2022-03-24T14:33:29.000Z | mathics/builtin/files_io/__init__.py | skirpichev/Mathics | 318e06dea8f1c70758a50cb2f95c9900150e3a68 | [
"Apache-2.0"
] | 868 | 2015-01-04T06:19:40.000Z | 2022-03-14T13:39:38.000Z | mathics/builtin/files_io/__init__.py | skirpichev/Mathics | 318e06dea8f1c70758a50cb2f95c9900150e3a68 | [
"Apache-2.0"
] | 240 | 2015-01-16T13:31:26.000Z | 2022-03-12T12:52:46.000Z | """
Input/Output, Files, and Filesystem
"""
from mathics.version import __version__ # noqa used in loading to check consistency.
| 21.833333 | 85 | 0.755725 |
bf7feb4bc03a7cf74545a61a15312f64a2e90c69 | 2,018 | py | Python | bokeh-app/main.py | cvalencia09/bokeh | 871ed5d17a982aec87db9d3764711d2d8ab1baf5 | [
"BSD-3-Clause"
] | null | null | null | bokeh-app/main.py | cvalencia09/bokeh | 871ed5d17a982aec87db9d3764711d2d8ab1baf5 | [
"BSD-3-Clause"
] | null | null | null | bokeh-app/main.py | cvalencia09/bokeh | 871ed5d17a982aec87db9d3764711d2d8ab1baf5 | [
"BSD-3-Clause"
] | null | null | null | import pandas as pd
import numpy as np
from bokeh.io import curdoc
from bokeh.layouts import layout
from bokeh.models import (Button, CategoricalColorMapper, ColumnDataSource,
HoverTool, Label, SingleIntervalTicker, Slider)
from bokeh.palettes import Spectral6
from bokeh.plotting import figure... | 28.828571 | 179 | 0.672944 |
bf81bc3381e26a30b7c9fc6ffec6fbb0d14885b5 | 223 | py | Python | tests/unit/conftest.py | stefanhoelzl/synopse | 07e5966b675d85d60e2e2484a62780a5735b2ed9 | [
"MIT"
] | 1 | 2021-03-09T23:04:28.000Z | 2021-03-09T23:04:28.000Z | tests/unit/conftest.py | stefanhoelzl/synopse | 07e5966b675d85d60e2e2484a62780a5735b2ed9 | [
"MIT"
] | null | null | null | tests/unit/conftest.py | stefanhoelzl/synopse | 07e5966b675d85d60e2e2484a62780a5735b2ed9 | [
"MIT"
] | null | null | null | import pytest
from synopse.core.component import Component
| 20.272727 | 64 | 0.744395 |
bf8411fd3c7f8eeb647fdc9c68bd3d4a95694a45 | 1,021 | py | Python | Desafios/des059.py | joseangelooliveira-br/Python3 | c0ba39768706f84f26b0616b75dd8c7971145b0e | [
"MIT"
] | null | null | null | Desafios/des059.py | joseangelooliveira-br/Python3 | c0ba39768706f84f26b0616b75dd8c7971145b0e | [
"MIT"
] | null | null | null | Desafios/des059.py | joseangelooliveira-br/Python3 | c0ba39768706f84f26b0616b75dd8c7971145b0e | [
"MIT"
] | null | null | null | from time import sleep
n1 = int(input('Primeiro valor:'))
n2 = int(input('Segundo valor:'))
opcao = 0
while opcao != 5:
print('''
[1] somar
[2] Multiplicar
[3] Maior
[4] Novos nmeros
[5] Sair do programa.''')
opcao = int(input('Qual a sua opo? '))
if opcao == 1:
soma = n1 + n2
... | 29.171429 | 73 | 0.522037 |
bf85f9843114f2752dcbb7c6b3b62f76bd08b491 | 65 | py | Python | maskrcnn_benchmark/layers/nv_decode.py | DeLightCMU/MAL | a03d4d3ed2ea4200ac6b4c6d980f3138b29d94ee | [
"MIT"
] | 13 | 2020-09-05T11:15:10.000Z | 2021-07-26T08:12:28.000Z | maskrcnn_benchmark/layers/nv_decode.py | DeLightCMU/MAL | a03d4d3ed2ea4200ac6b4c6d980f3138b29d94ee | [
"MIT"
] | null | null | null | maskrcnn_benchmark/layers/nv_decode.py | DeLightCMU/MAL | a03d4d3ed2ea4200ac6b4c6d980f3138b29d94ee | [
"MIT"
] | 3 | 2020-11-26T03:54:58.000Z | 2021-07-26T08:12:33.000Z | from maskrcnn_benchmark import _C
nv_decode = _C.nv_decode
| 13 | 34 | 0.769231 |
bf87b207d4a53d5dbc4b552d43c3530f705b6504 | 508 | py | Python | SimGeneral/MixingModule/python/pileupVtxDigitizer_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | SimGeneral/MixingModule/python/pileupVtxDigitizer_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | SimGeneral/MixingModule/python/pileupVtxDigitizer_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
pileupVtxDigitizer = cms.PSet(
accumulatorType = cms.string("PileupVertexAccumulator"),
hitsProducer = cms.string('generator'),
vtxTag = cms.InputTag("generatorSmeared"),
vtxFallbackTag = cms.InputTag("generator"),
makeDigiSimLinks = cms.untracked.bool(False... | 39.076923 | 75 | 0.773622 |
bf87f1499d3b717a9457ce2ddb8d7a572916001a | 41,840 | py | Python | tests/util/answers.py | selectel/python-selvpcclient | 99955064215c2be18b568e5e9b34f17087ec304f | [
"Apache-2.0"
] | 7 | 2017-07-15T12:44:23.000Z | 2020-03-24T09:45:11.000Z | tests/util/answers.py | selectel/python-selvpcclient | 99955064215c2be18b568e5e9b34f17087ec304f | [
"Apache-2.0"
] | 13 | 2017-07-05T09:34:09.000Z | 2021-04-20T08:18:46.000Z | tests/util/answers.py | selectel/python-selvpcclient | 99955064215c2be18b568e5e9b34f17087ec304f | [
"Apache-2.0"
] | 9 | 2017-06-29T13:51:35.000Z | 2021-06-26T21:00:49.000Z | from tests.util.params import LOGO_BASE64
PROJECTS_LIST = {
'projects': [{
"id": "15c578ea47a5466db2aeb57dc8443676",
"name": "pr1",
"url": "http://11111.selvpc.ru",
"enabled": True,
"theme": {
"color": "",
"logo": "",
"brand_color": "",
... | 26.199123 | 73 | 0.328489 |
bf89a35182e948aab86460626582c36fa6685c35 | 11,980 | py | Python | basisnet/personalization/centralized_so_nwp/stackoverflow_basis_models.py | xxdreck/google-research | dac724bc2b9362d65c26747a8754504fe4c615f8 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | basisnet/personalization/centralized_so_nwp/stackoverflow_basis_models.py | xxdreck/google-research | dac724bc2b9362d65c26747a8754504fe4c615f8 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | basisnet/personalization/centralized_so_nwp/stackoverflow_basis_models.py | admariner/google-research | 7cee4b22b925581d912e8d993625c180da2a5a4f | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 35.443787 | 80 | 0.683389 |
bf8b338908637181ebe9028e89c7cd0871aadbe2 | 7,829 | py | Python | self_supervised_learning.py | monaj07/pytorch_semseg | e93e96f811bcdb45c8c88380f561e87d0ccbf514 | [
"MIT"
] | null | null | null | self_supervised_learning.py | monaj07/pytorch_semseg | e93e96f811bcdb45c8c88380f561e87d0ccbf514 | [
"MIT"
] | null | null | null | self_supervised_learning.py | monaj07/pytorch_semseg | e93e96f811bcdb45c8c88380f561e87d0ccbf514 | [
"MIT"
] | null | null | null | """
This is the code for Self-Supervised Learning.
The goal is to learn image feature maps using video data.
The idea is to assign the frames within each video a unique class label, and perform a classification.
"""
import sys
import torch
import visdom
import argparse
import numpy as np
import torch.nn as nn
import t... | 41.86631 | 156 | 0.537617 |
bf8c421e9eba28669406e4e17a7acb7deccf7637 | 11,641 | py | Python | Prim&Kruskal.py | FusionPower/Prim-Kruskal-Visualizer | 6ca7c8a7fab939c75b6a9154b018814fa2d22552 | [
"MIT"
] | null | null | null | Prim&Kruskal.py | FusionPower/Prim-Kruskal-Visualizer | 6ca7c8a7fab939c75b6a9154b018814fa2d22552 | [
"MIT"
] | null | null | null | Prim&Kruskal.py | FusionPower/Prim-Kruskal-Visualizer | 6ca7c8a7fab939c75b6a9154b018814fa2d22552 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pygame
import heapq as pq
import random
width=700
height=500
pygame.init()
window = pygame.display.set_mode((width, height))
window.fill((0, 0, 0))
mst_edge=(125,255,125)
node_color=(255, 0, 0)
red=(255, 0, 0)
white=(255,255,255)
edge_color=white
node_radius=10
... | 25.306522 | 94 | 0.460785 |
bf8d1de3cc701ac9377ddd86ee131b8f80174c12 | 2,323 | py | Python | src/couplib/constants.py | DKosenkov/PyFREC | a578f649b1309f1e23412e3695cce2b9e48fda3d | [
"MIT"
] | null | null | null | src/couplib/constants.py | DKosenkov/PyFREC | a578f649b1309f1e23412e3695cce2b9e48fda3d | [
"MIT"
] | null | null | null | src/couplib/constants.py | DKosenkov/PyFREC | a578f649b1309f1e23412e3695cce2b9e48fda3d | [
"MIT"
] | null | null | null | import math
#-------------------------------------------------------------------------------
# Conversion factors
ATOB = 1.889725989 #Angstrom to Bohr Conversion
BTOA = 1.0/ATOB
HartreeToKCal = 627.509
HartreeToCM1 = 219474.629232
HartreeToeV = 27.211215
eVToHartree = 1/HartreeToeV
#eVToCM1_old ... | 47.408163 | 163 | 0.541541 |
bf8eecb8f82f8d61b12d8554a2c2e9eff9686e71 | 2,598 | py | Python | datasets.py | artemisart/transformer-lm | a0e45cd8c03a15f28eed69d4095c941cf3837fc7 | [
"MIT"
] | null | null | null | datasets.py | artemisart/transformer-lm | a0e45cd8c03a15f28eed69d4095c941cf3837fc7 | [
"MIT"
] | null | null | null | datasets.py | artemisart/transformer-lm | a0e45cd8c03a15f28eed69d4095c941cf3837fc7 | [
"MIT"
] | null | null | null | import os
import csv
import numpy as np
from pathlib import Path
from tqdm import tqdm
from sklearn.utils import shuffle
from sklearn.model_selection import train_test_split
seed = 3535999445
def _rocstories(path):
"""Returns 4 lists :
st: input sentences
ct1: first answer
ct2: second a... | 31.301205 | 167 | 0.579292 |
bf91a7679367657315e27a80badc0c467aa07f65 | 3,059 | py | Python | miyu_bot/commands/cogs/utility.py | sigonasr2/miyu-bot | 4f28a62b6f3657e19b8b569a60745261b0ddc2f6 | [
"MIT"
] | null | null | null | miyu_bot/commands/cogs/utility.py | sigonasr2/miyu-bot | 4f28a62b6f3657e19b8b569a60745261b0ddc2f6 | [
"MIT"
] | null | null | null | miyu_bot/commands/cogs/utility.py | sigonasr2/miyu-bot | 4f28a62b6f3657e19b8b569a60745261b0ddc2f6 | [
"MIT"
] | null | null | null | import logging
import textwrap
from discord.ext import commands
from miyu_bot.bot.bot import D4DJBot
from miyu_bot.commands.common.fuzzy_matching import romanize, FuzzyMatcher
| 30.59 | 113 | 0.545276 |
bf91c7ce0734843568c6741a132090be34c55297 | 1,416 | py | Python | lib/solutions/CHK/checkout_solution.py | DPNT-Sourcecode/CHK-zdtm01 | 680a6cfa6fb56cd515f5fe8ff31c162900552a9c | [
"Apache-2.0"
] | null | null | null | lib/solutions/CHK/checkout_solution.py | DPNT-Sourcecode/CHK-zdtm01 | 680a6cfa6fb56cd515f5fe8ff31c162900552a9c | [
"Apache-2.0"
] | null | null | null | lib/solutions/CHK/checkout_solution.py | DPNT-Sourcecode/CHK-zdtm01 | 680a6cfa6fb56cd515f5fe8ff31c162900552a9c | [
"Apache-2.0"
] | null | null | null |
# noinspection PyUnusedLocal
# skus = unicode string
price_table = { 'A': {'Price': 50, 'Offers': ['3A', 130]},
'B': {'Price': 30, 'Offers': ['2b', 45]},
'C': {'Price': 20, 'Offers': []},
'D': {'Price': 15, 'Offers': []}
}
| 29.5 | 61 | 0.531073 |
bf91e7ee6b27531aaec8dca185fbbe5b603c9c01 | 9,183 | py | Python | opensearch/models/behavior_fields.py | Timandes/opensearch-python | 70152155cf338f4710fef89a8a12efa0f7adf483 | [
"Apache-2.0"
] | null | null | null | opensearch/models/behavior_fields.py | Timandes/opensearch-python | 70152155cf338f4710fef89a8a12efa0f7adf483 | [
"Apache-2.0"
] | null | null | null | opensearch/models/behavior_fields.py | Timandes/opensearch-python | 70152155cf338f4710fef89a8a12efa0f7adf483 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Copyright 2019 Alibaba Group Holding 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required b... | 28.342593 | 143 | 0.581945 |
bf91fd0e6ff5a588ad41746670409b50877da233 | 4,056 | py | Python | tests/test_molecule.py | zig1000/schem | 22883d345e6efbc6e2cc8c6b107a61f267b7b067 | [
"MIT"
] | null | null | null | tests/test_molecule.py | zig1000/schem | 22883d345e6efbc6e2cc8c6b107a61f267b7b067 | [
"MIT"
] | 1 | 2021-02-15T23:21:03.000Z | 2021-02-15T23:21:03.000Z | tests/test_molecule.py | zig1000/schem | 22883d345e6efbc6e2cc8c6b107a61f267b7b067 | [
"MIT"
] | 1 | 2021-02-15T22:48:38.000Z | 2021-02-15T22:48:38.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pathlib import Path
import pickle
from timeit import Timer
import unittest
import sys
# Insert the parent directory to sys path so schem is accessible even if it's not available system-wide
sys.path.insert(1, str(Path(__file__).parent.parent))
from schem.molecule im... | 44.086957 | 220 | 0.655325 |
bf94d09f1a74c7a79cfafcb370c14a7e527ca36f | 654 | py | Python | Discussion/migrations/0003_auto_20180906_1441.py | Arianxx/ShareForum | b3bf6a3b2ace869cb88a0b41bbbd4575b6cdfd28 | [
"MIT"
] | 39 | 2018-09-08T04:40:59.000Z | 2021-09-10T02:02:04.000Z | Discussion/migrations/0003_auto_20180906_1441.py | STARCASTPOD/BookForum | b3bf6a3b2ace869cb88a0b41bbbd4575b6cdfd28 | [
"MIT"
] | null | null | null | Discussion/migrations/0003_auto_20180906_1441.py | STARCASTPOD/BookForum | b3bf6a3b2ace869cb88a0b41bbbd4575b6cdfd28 | [
"MIT"
] | 8 | 2018-09-08T08:50:45.000Z | 2020-03-13T15:38:56.000Z | # Generated by Django 2.0.5 on 2018-09-06 06:41
from django.conf import settings
from django.db import migrations, models
| 26.16 | 98 | 0.639144 |
bf9580b132679654b2ba7f1ae1833f1c0e20d766 | 4,763 | py | Python | folks/go.py | hugosenari/folks | 934d32220e5dd7cb59be311eea3ddb5689e744cf | [
"MIT"
] | 1 | 2017-08-13T14:16:28.000Z | 2017-08-13T14:16:28.000Z | folks/go.py | hugosenari/folks | 934d32220e5dd7cb59be311eea3ddb5689e744cf | [
"MIT"
] | null | null | null | folks/go.py | hugosenari/folks | 934d32220e5dd7cb59be311eea3ddb5689e744cf | [
"MIT"
] | null | null | null | import gi
import ctypes as pyc
from ctypes import pythonapi
from gi.repository import GObject as GO
pyc.cdll.LoadLibrary('libgobject-2.0.so')
lego = pyc.CDLL('libgobject-2.0.so')
lego.g_type_name.restype = pyc.c_char_p
lego.g_type_name.argtypes = (pyc.c_ulonglong,)
pythonapi.PyCapsule_GetName.restype = pyc.c_char_p
pyt... | 29.76875 | 79 | 0.61012 |
bf95e8ba45ff95f24183b488e1c746015e0ff293 | 1,879 | py | Python | ambry/cli/test.py | kball/ambry | ae865245128b92693d654fbdbb3efc9ef29e9745 | [
"BSD-2-Clause"
] | 1 | 2017-06-14T13:40:57.000Z | 2017-06-14T13:40:57.000Z | ambry/cli/test.py | kball/ambry | ae865245128b92693d654fbdbb3efc9ef29e9745 | [
"BSD-2-Clause"
] | null | null | null | ambry/cli/test.py | kball/ambry | ae865245128b92693d654fbdbb3efc9ef29e9745 | [
"BSD-2-Clause"
] | null | null | null | """
Copyright (c) 2013 Clarinova. This file is licensed under the terms of the
Revised BSD License, included in this distribution as LICENSE.txt
"""
from ..cli import prt,fatal
| 25.053333 | 105 | 0.674827 |
bf9aecbead0ecf0a0d2c99aee54178261d5cf854 | 3,508 | py | Python | dataset/semi.py | lanyinemt2/ST-PlusPlus | 7c31abfcf21e390a06c4d5da1f77a9fe5ff071ed | [
"MIT"
] | 73 | 2021-06-10T01:12:04.000Z | 2022-03-30T08:31:24.000Z | dataset/semi.py | lanyinemt2/ST-PlusPlus | 7c31abfcf21e390a06c4d5da1f77a9fe5ff071ed | [
"MIT"
] | 12 | 2021-07-01T00:27:11.000Z | 2022-03-17T05:09:49.000Z | dataset/semi.py | lanyinemt2/ST-PlusPlus | 7c31abfcf21e390a06c4d5da1f77a9fe5ff071ed | [
"MIT"
] | 18 | 2021-06-10T11:24:31.000Z | 2022-03-31T16:48:58.000Z | from dataset.transform import crop, hflip, normalize, resize, blur, cutout
import math
import os
from PIL import Image
import random
from torch.utils.data import Dataset
from torchvision import transforms
| 39.863636 | 116 | 0.594356 |
bf9b5c87b3d7bdfaee8dbebe22119d256e8bb7cd | 1,171 | py | Python | solve.py | Phyxius/z3ncoder | 1e5de397a58443057fb73291e6c9903989075422 | [
"MIT"
] | 9 | 2018-10-10T02:27:58.000Z | 2022-03-24T00:31:27.000Z | solve.py | Phyxius/z3ncoder | 1e5de397a58443057fb73291e6c9903989075422 | [
"MIT"
] | null | null | null | solve.py | Phyxius/z3ncoder | 1e5de397a58443057fb73291e6c9903989075422 | [
"MIT"
] | 4 | 2018-10-19T04:35:46.000Z | 2020-03-11T03:43:17.000Z | #!/usr/bin/env python
from z3 import *
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-a", "--addr", type=lambda x: (int(x,16)),
help="Address to carve")
args = parser.parse_args()
if not args.addr:
parser.print_help()
parser.exit()
n = args.addr
neg = 0xFFFFFFFF - n + 1
pr... | 22.09434 | 64 | 0.547395 |
bf9b687363872d2c81cd3b0b9a855b8681216a4f | 1,521 | py | Python | analyzer/apisan/check/condition.py | oslab-swrc/apisan | 9ff3d3bc04c8e119f4d659f03b38747395e58c3e | [
"MIT"
] | 58 | 2016-08-27T03:19:14.000Z | 2022-01-05T17:33:44.000Z | analyzer/apisan/check/condition.py | oslab-swrc/apisan | 9ff3d3bc04c8e119f4d659f03b38747395e58c3e | [
"MIT"
] | 14 | 2017-12-01T17:16:59.000Z | 2020-12-21T12:16:35.000Z | analyzer/apisan/check/condition.py | oslab-swrc/apisan | 9ff3d3bc04c8e119f4d659f03b38747395e58c3e | [
"MIT"
] | 22 | 2016-11-27T09:53:31.000Z | 2021-11-22T00:22:53.000Z | # SPDX-License-Identifier: MIT
#!/usr/bin/env python3
from .checker import Checker, Context
from ..lib import utils, rank_utils
from ..lib.rank_utils import (
is_alloc, is_dealloc, is_lock, is_unlock
)
from ..parse.explorer import is_call
from ..parse.symbol import IDSymbol
| 32.361702 | 93 | 0.550953 |
bf9cfdb3c97875e9f7a5b1f9e6e8d9129f1282a2 | 1,877 | py | Python | venv/Lib/site-packages/pyo/examples/17-osc/02-receive-streams.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | venv/Lib/site-packages/pyo/examples/17-osc/02-receive-streams.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | venv/Lib/site-packages/pyo/examples/17-osc/02-receive-streams.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | """
Receiving Open Sound Control messages as audio streams
**02-receive-streams.py**
This script shows a granulation process controlled by OSC messages
coming from another program (run the next example, *03-send-streams.py*,
to get values coming in).
"""
from pyo import *
s = Server().boot()
# The sound table to g... | 34.127273 | 90 | 0.692595 |
bf9d2d241c888d51a05c56b512bbb1e4f199d49f | 11,234 | py | Python | pybald/core/controllers.py | boswellgathu/pybald | a3578f8a5220ce51627b151a2a98b5a59732e63e | [
"BSD-3-Clause"
] | 7 | 2015-10-09T15:45:04.000Z | 2019-03-11T15:54:19.000Z | pybald/core/controllers.py | boswellgathu/pybald | a3578f8a5220ce51627b151a2a98b5a59732e63e | [
"BSD-3-Clause"
] | 7 | 2015-12-02T20:13:11.000Z | 2018-09-25T16:09:38.000Z | pybald/core/controllers.py | boswellgathu/pybald | a3578f8a5220ce51627b151a2a98b5a59732e63e | [
"BSD-3-Clause"
] | 3 | 2015-09-19T13:19:59.000Z | 2019-08-22T16:52:18.000Z | #!/usr/bin/env python
# encoding: utf-8
from six import with_metaclass
from functools import wraps
from webob import Request, Response, exc
import re
from pybald.util import camel_to_underscore
from routes import redirect_to
from pybald import context
import json
import random
import uuid
import logging
console = log... | 35.77707 | 94 | 0.622485 |
bf9d745d2381a404054965a7b5323e8727143048 | 1,573 | py | Python | recommendation/views.py | Nabeel965/AgriTechies | 75826fbc88c4c41bd4a8a1ec64e19ae593559e78 | [
"Apache-2.0"
] | null | null | null | recommendation/views.py | Nabeel965/AgriTechies | 75826fbc88c4c41bd4a8a1ec64e19ae593559e78 | [
"Apache-2.0"
] | null | null | null | recommendation/views.py | Nabeel965/AgriTechies | 75826fbc88c4c41bd4a8a1ec64e19ae593559e78 | [
"Apache-2.0"
] | null | null | null | from django.http import HttpResponse
from django.shortcuts import render
import joblib
import pandas as pd
import numpy as np
from .models import crop_data
from .recommender import CropDataForm
model = joblib.load('model.pkl')
xl_file = pd.ExcelFile('Features - Rev02.xlsx')
storage_df=xl_file.parse('Cold Storage Data'... | 32.102041 | 86 | 0.725366 |
bf9e7aaac691ac51a2f699b313807f8994b22f6b | 6,449 | py | Python | bloxone/oph_management/oph_rename.py | frankhecker/infoblox-public | dc6f7b1e1e6dbf9eef00ddb75bf84190bb984564 | [
"Apache-2.0"
] | 1 | 2021-07-04T10:21:31.000Z | 2021-07-04T10:21:31.000Z | bloxone/oph_management/oph_rename.py | frankhecker/infoblox-public | dc6f7b1e1e6dbf9eef00ddb75bf84190bb984564 | [
"Apache-2.0"
] | null | null | null | bloxone/oph_management/oph_rename.py | frankhecker/infoblox-public | dc6f7b1e1e6dbf9eef00ddb75bf84190bb984564 | [
"Apache-2.0"
] | 1 | 2021-07-04T10:27:25.000Z | 2021-07-04T10:27:25.000Z | #!/usr/bin/python3
"""oph_rename: rename a BloxOne on-prem host."""
# Import the required Python modules.
import argparse
import sys
import os
import json
import bloxone
# BloxOne constants.
B1_OVA_HOST_TYPE = '3'
B1_CONTAINER_HOST_TYPE = '5'
B1_SUPPORTED_HOST_TYPES = [
B1_OVA_HOST_TYPE,
B1_CONTAINER_HOST_... | 27.442553 | 79 | 0.6294 |
bf9fc969dad23026bfd5d2310d90a7e44531e11c | 2,314 | py | Python | hackerrank/euler007/euler007_2.py | jcpince/algorithms | c43dd8e98a0f0df691ead5f25c2c17a9241db908 | [
"MIT"
] | null | null | null | hackerrank/euler007/euler007_2.py | jcpince/algorithms | c43dd8e98a0f0df691ead5f25c2c17a9241db908 | [
"MIT"
] | null | null | null | hackerrank/euler007/euler007_2.py | jcpince/algorithms | c43dd8e98a0f0df691ead5f25c2c17a9241db908 | [
"MIT"
] | null | null | null | #!/bin/python3
import time
from math import sqrt
count3 = 0
count5 = 0
count7 = 0
start = time.time()
primes = [2, 3, 5, 7, 11]
t = int(input().strip())
for a0 in range(t):
n = int(input().strip())
print(get_prime(primes, n))
assert(get_prime(primes, 168) == 997)
assert(get_prime(primes, 10000) == 104729)
pri... | 30.853333 | 78 | 0.448142 |
bfa0ea90fc49fb1ca4300d442097a204d2777368 | 662 | py | Python | emencia_paste_djangocms_3/django_buildout/project/mods_available/filebrowser/__init__.py | emencia/emencia_paste_djangocms_3 | 29eabbcb17e21996a6e1d99592fc719dc8833b59 | [
"MIT"
] | 1 | 2015-01-17T21:38:50.000Z | 2015-01-17T21:38:50.000Z | emencia_paste_djangocms_3/django_buildout/project/mods_available/filebrowser/__init__.py | emencia/emencia_paste_djangocms_3 | 29eabbcb17e21996a6e1d99592fc719dc8833b59 | [
"MIT"
] | 5 | 2015-01-28T15:51:02.000Z | 2015-03-16T15:51:15.000Z | emencia_paste_djangocms_3/django_buildout/project/mods_available/filebrowser/__init__.py | emencia/emencia_paste_djangocms_3 | 29eabbcb17e21996a6e1d99592fc719dc8833b59 | [
"MIT"
] | null | null | null | """
Add `Django Filebrowser`_ to your project so you can use a centralized interface to manage the uploaded files to be used with other components (`cms`_, `zinnia`_, etc.).
The version used is a special version called *no grappelli* that can be used outside of the *django-grapelli* environment.
Filebrowser manage fi... | 66.2 | 200 | 0.765861 |
bfa16f320199d6949fdfad6395c1ecd8c2cf09dd | 4,175 | py | Python | allauth/socialaccount/providers/apple/views.py | 321core/django-allauth | 60c30bd3373d650fb1453002490bdd69511317b8 | [
"MIT"
] | null | null | null | allauth/socialaccount/providers/apple/views.py | 321core/django-allauth | 60c30bd3373d650fb1453002490bdd69511317b8 | [
"MIT"
] | null | null | null | allauth/socialaccount/providers/apple/views.py | 321core/django-allauth | 60c30bd3373d650fb1453002490bdd69511317b8 | [
"MIT"
] | null | null | null | import json
import requests
from datetime import timedelta
from django.http import HttpResponseRedirect
from django.utils import timezone
from django.utils.http import urlencode
from django.views.decorators.csrf import csrf_exempt
import jwt
from allauth.socialaccount.models import SocialApp, SocialToken
from allaut... | 31.870229 | 75 | 0.636886 |
bfa262fe8a13bcb8142e0bf9665a364d87fdf705 | 752 | py | Python | core/models.py | GuiSilva11/sospet | f29a8cd3f06a955974292025e9ba1272e84a385a | [
"MIT"
] | null | null | null | core/models.py | GuiSilva11/sospet | f29a8cd3f06a955974292025e9ba1272e84a385a | [
"MIT"
] | null | null | null | core/models.py | GuiSilva11/sospet | f29a8cd3f06a955974292025e9ba1272e84a385a | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django import dj_database_url
# Create your models here. | 32.695652 | 69 | 0.719415 |
bfa263056c348a6c1f4150ad9b38871d4c77f498 | 422 | py | Python | 8KYU/first_non_consecutive.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | 4 | 2021-07-17T22:48:03.000Z | 2022-03-25T14:10:58.000Z | 8KYU/first_non_consecutive.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | null | null | null | 8KYU/first_non_consecutive.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | 3 | 2021-06-14T14:18:16.000Z | 2022-03-16T06:02:02.000Z | def first_non_consecutive(arr: list) -> int:
''' This function returns the first element of an array that is not consecutive. '''
if len(arr) < 2:
return None
non_consecutive = []
for i in range(len(arr) - 1):
if arr[i+1] - arr[i] != 1:
non_consecutive.append(arr[i+1])
if... | 38.363636 | 88 | 0.599526 |
bfa63ba9bde1c83316708be51a4ee8d5c65760db | 8,136 | py | Python | yolo/yolo_v3.py | ToddZhouFeng/YOLOv3_TensorFlow2 | 44545e4d94f847117f115cd2890083d40f639f7e | [
"MIT"
] | null | null | null | yolo/yolo_v3.py | ToddZhouFeng/YOLOv3_TensorFlow2 | 44545e4d94f847117f115cd2890083d40f639f7e | [
"MIT"
] | null | null | null | yolo/yolo_v3.py | ToddZhouFeng/YOLOv3_TensorFlow2 | 44545e4d94f847117f115cd2890083d40f639f7e | [
"MIT"
] | null | null | null | # yolo-fastest
# ResidualBlock, ->1x1->3x3-> ->1x1->3x3->1x1->
# make_residual_block,
import tensorflow as tf
def make_residual_block(pre_conv_filters1, pre_conv_filters2, filters1, filters2, num_blocks, pre_conv_strides=1):
x = tf.keras.Sequential()
x.add(DarkNetConv2D(filters=pre_conv_filters1, kerne... | 51.169811 | 148 | 0.650934 |
bfa683be31a1831980167b7300b1c62a083e17db | 851 | py | Python | builder/dummyCrystalConfig.py | jcamstan3370/MachineLearningPerovskites | d7bc433bac349bf53473dc6d636954cae996b8d2 | [
"MIT"
] | 6 | 2020-05-09T17:18:00.000Z | 2021-09-22T09:37:40.000Z | builder/dummyCrystalConfig.py | jstanai/ml_perovskites | d7bc433bac349bf53473dc6d636954cae996b8d2 | [
"MIT"
] | null | null | null | builder/dummyCrystalConfig.py | jstanai/ml_perovskites | d7bc433bac349bf53473dc6d636954cae996b8d2 | [
"MIT"
] | 1 | 2021-03-24T04:21:31.000Z | 2021-03-24T04:21:31.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Jared
"""
# LATTICE VARIATION
lattice_mul = 20 #how many lattice variations to perform
lattice_variation_percent = 10
keep_aspect = False
# COMPOSITION VARIATION
# upper limit to sim num
lattice_comp_num = 500 #how many crystals to generate (random mixing)
l... | 23 | 77 | 0.647474 |
bfa7843bcdb86b3f94012b1ea1de6ffb043c292c | 1,692 | py | Python | bitey/cpu/pin.py | jgerrish/bitey | a393a83c19338d94116f3405f4b8a0f03ea84d79 | [
"MIT"
] | null | null | null | bitey/cpu/pin.py | jgerrish/bitey | a393a83c19338d94116f3405f4b8a0f03ea84d79 | [
"MIT"
] | null | null | null | bitey/cpu/pin.py | jgerrish/bitey | a393a83c19338d94116f3405f4b8a0f03ea84d79 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from enum import Enum
class IRQ(Pin):
"""
The IRQ pin
When the IRQ line is low, an interrupt has been requested.
Multiple lines may be connected to this pin.
"""
| 20.888889 | 76 | 0.630615 |
bfa8dff4a33110979569972331ac56feda87a711 | 181 | py | Python | example/try1.py | sano-jin/go-in-ocaml | b5e5fca33e194776477a0db389f6e52bdc0a66fe | [
"MIT"
] | 1 | 2021-09-24T10:25:40.000Z | 2021-09-24T10:25:40.000Z | example/try1.py | sano-jin/go-in-ocaml | b5e5fca33e194776477a0db389f6e52bdc0a66fe | [
"MIT"
] | null | null | null | example/try1.py | sano-jin/go-in-ocaml | b5e5fca33e194776477a0db389f6e52bdc0a66fe | [
"MIT"
] | null | null | null | try:
print('enter try statement')
raise Exception()
print('exit try statement')
except Exception as inst:
print(inst.__class__.__name__)
| 18.1 | 34 | 0.59116 |
bfa97c289b0736c98a1200a9e4a73734a8953802 | 276 | py | Python | sme_uniforme_apps/custom_user/urls.py | prefeiturasp/SME-PortalUniforme-BackEnd | d7e15dd3b9c7b9cfb621e53ec81d40f18c1fab3f | [
"MIT"
] | null | null | null | sme_uniforme_apps/custom_user/urls.py | prefeiturasp/SME-PortalUniforme-BackEnd | d7e15dd3b9c7b9cfb621e53ec81d40f18c1fab3f | [
"MIT"
] | null | null | null | sme_uniforme_apps/custom_user/urls.py | prefeiturasp/SME-PortalUniforme-BackEnd | d7e15dd3b9c7b9cfb621e53ec81d40f18c1fab3f | [
"MIT"
] | 1 | 2020-02-01T12:10:42.000Z | 2020-02-01T12:10:42.000Z | from django.urls import include, path
from rest_framework import routers
from .api.viewsets.usuario_viewset import UsuarioViewset
router = routers.DefaultRouter()
router.register("usuarios", UsuarioViewset, "Usurios")
urlpatterns = [
path('', include(router.urls))
]
| 21.230769 | 56 | 0.775362 |
bfa9e9e64bf356bd1cacc359a0d51be50f947a91 | 2,837 | py | Python | Driver/models.py | Anne56njeri/Carpool | b1d95b1307c287a8edca576ad24ccc3b7a8427fc | [
"Unlicense",
"MIT"
] | 1 | 2018-08-01T08:57:44.000Z | 2018-08-01T08:57:44.000Z | Driver/models.py | Anne56njeri/Carpool | b1d95b1307c287a8edca576ad24ccc3b7a8427fc | [
"Unlicense",
"MIT"
] | null | null | null | Driver/models.py | Anne56njeri/Carpool | b1d95b1307c287a8edca576ad24ccc3b7a8427fc | [
"Unlicense",
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from django.db.models.signals import post_save
from django.dispatch import receiver
# Create your models here.
'''
we create a profile class that will help us save information on whether the... | 38.337838 | 128 | 0.739161 |
bfaa06301e4f72dec47a85b72806305bb7f8be9a | 375 | py | Python | taskmanager/src/modules/events/infrastructure/persistence/models/event_model.py | alice-biometrics/petisco-task-manager | 2bad52013ab122f8c3e5dce740dcd154883e6940 | [
"MIT"
] | 1 | 2020-04-14T18:12:11.000Z | 2020-04-14T18:12:11.000Z | taskmanager/src/modules/events/infrastructure/persistence/models/event_model.py | alice-biometrics/petisco-task-manager | 2bad52013ab122f8c3e5dce740dcd154883e6940 | [
"MIT"
] | 3 | 2020-04-20T10:35:26.000Z | 2020-06-15T07:45:59.000Z | taskmanager/src/modules/events/infrastructure/persistence/models/event_model.py | alice-biometrics/petisco-task-manager | 2bad52013ab122f8c3e5dce740dcd154883e6940 | [
"MIT"
] | 1 | 2021-03-12T13:48:01.000Z | 2021-03-12T13:48:01.000Z | from petisco.persistence.persistence import Persistence
from sqlalchemy import Column, Integer, String, JSON
Base = Persistence.get_base("taskmanager")
| 25 | 55 | 0.712 |
bfaaa304ed1acd0ac8c6f5beb7135584dfbb4b6e | 558 | py | Python | Literature-backend/utils/authorization.py | czl0325/Literature-python3 | e5b061f503b0a18a092b67469086f64b615f8604 | [
"MIT"
] | 7 | 2021-04-13T08:01:00.000Z | 2022-03-17T05:47:47.000Z | Literature-backend/utils/authorization.py | czl0325/Literature-python3 | e5b061f503b0a18a092b67469086f64b615f8604 | [
"MIT"
] | 1 | 2022-01-01T13:43:24.000Z | 2022-01-01T13:43:24.000Z | Literature-backend/utils/authorization.py | czl0325/Literature-python3 | e5b061f503b0a18a092b67469086f64b615f8604 | [
"MIT"
] | 1 | 2021-07-14T04:13:57.000Z | 2021-07-14T04:13:57.000Z | import functools
from flask import g, request
from lib.jwt_utils import verify_jwt
| 27.9 | 61 | 0.645161 |
bfac88aa2efc80d3e0ff9e391c7c17befe2acae2 | 2,661 | py | Python | backend/emailer.py | amm042/Flower | fb28defb27a30b2cd59c21e4f0adb21ed0a541e7 | [
"MIT"
] | 3 | 2017-10-28T23:21:56.000Z | 2018-03-27T18:52:18.000Z | backend/emailer.py | amm042/Flower | fb28defb27a30b2cd59c21e4f0adb21ed0a541e7 | [
"MIT"
] | 276 | 2017-10-27T16:25:22.000Z | 2018-05-03T20:55:47.000Z | backend/emailer.py | amm042/Flower | fb28defb27a30b2cd59c21e4f0adb21ed0a541e7 | [
"MIT"
] | 2 | 2017-11-28T01:44:42.000Z | 2018-11-16T14:09:37.000Z | import os
import subprocess
import smtplib
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
EMAIL_HTML_START = '<html><head></head><body><p>'
EMAIL_HTML_END = '</p></body></html>'
"""
Send Email with attachments and text
attachments should be ... | 32.851852 | 117 | 0.705374 |
bfadd469cad5706d4a73cff7e85fb26ba6227888 | 734 | py | Python | inf.py | ultrasound1372/RFXPy | 8f8ba1576739f8ef35a33b10cd2324e24f87fa37 | [
"MIT"
] | null | null | null | inf.py | ultrasound1372/RFXPy | 8f8ba1576739f8ef35a33b10cd2324e24f87fa37 | [
"MIT"
] | null | null | null | inf.py | ultrasound1372/RFXPy | 8f8ba1576739f8ef35a33b10cd2324e24f87fa37 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# -*- Coding: UTF-8 -*-
# infinity test case
# The port seems to differ from the original code here
# the original code will madly clip this string
# while this code seems to ignore the infinity and just produces a normal wave
# unsure of which behavior is desireable at this time
# or how... | 43.176471 | 143 | 0.756131 |
bfaf3db1d4b600dd66949900ef59563704cf0ba1 | 7,454 | py | Python | tests/test_generators.py | fsoubelet/PyHEADTAIL | 51cae8845cceb61cc3f140db4ab0eeb68469110f | [
"BSD-3-Clause"
] | null | null | null | tests/test_generators.py | fsoubelet/PyHEADTAIL | 51cae8845cceb61cc3f140db4ab0eeb68469110f | [
"BSD-3-Clause"
] | null | null | null | tests/test_generators.py | fsoubelet/PyHEADTAIL | 51cae8845cceb61cc3f140db4ab0eeb68469110f | [
"BSD-3-Clause"
] | null | null | null | '''
@date: 31/03/2015
@author: Stefan Hegglin
Tests for generator
'''
import unittest
import numpy as np
import scipy.constants as constants
from PyHEADTAIL.trackers.longitudinal_tracking import RFSystems
import PyHEADTAIL.particles.generators as gf
from PyHEADTAIL.general.printers import SilentPrinter
if __name... | 40.291892 | 101 | 0.615374 |
bfaffed3dc6c85e18ff256e7a09f00cc54d48e17 | 1,878 | py | Python | Python/longest-turbulent-subarray.py | RideGreg/LeetCode | b70818b1e6947bf29519a24f78816e022ebab59e | [
"MIT"
] | 1 | 2022-01-30T06:55:28.000Z | 2022-01-30T06:55:28.000Z | Python/longest-turbulent-subarray.py | RideGreg/LeetCode | b70818b1e6947bf29519a24f78816e022ebab59e | [
"MIT"
] | null | null | null | Python/longest-turbulent-subarray.py | RideGreg/LeetCode | b70818b1e6947bf29519a24f78816e022ebab59e | [
"MIT"
] | 1 | 2021-12-31T03:56:39.000Z | 2021-12-31T03:56:39.000Z | # Time: O(n)
# Space: O(1)
# 978
# A subarray A[i], A[i+1], ..., A[j] of A is said to be turbulent if and only if:
# - For i <= k < j, A[k] > A[k+1] when k is odd, and A[k] < A[k+1] when k is even;
# - OR, for i <= k < j, A[k] > A[k+1] when k is even, and A[k] < A[k+1] when k is odd.
# That is, the subarray is turbu... | 34.145455 | 98 | 0.517039 |