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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a8e27fe84476933e035a3939488c30dcc66b58ba | 17,061 | py | Python | rb/processings/sentiment/utils_new.py | readerbench/ReaderBench | f0588a9a63ba21e3b8c2e5e5bc474904c07f6897 | [
"Apache-2.0"
] | 1 | 2022-03-05T17:12:55.000Z | 2022-03-05T17:12:55.000Z | rb/processings/sentiment/utils_new.py | rwth-acis/readerbenchpy | 1a070ae678f58ccd6f358c0802bdf0b3b3dde9d3 | [
"Apache-2.0"
] | 2 | 2021-10-17T14:00:52.000Z | 2021-10-17T14:00:52.000Z | rb/processings/sentiment/utils_new.py | rwth-acis/readerbenchpy | 1a070ae678f58ccd6f358c0802bdf0b3b3dde9d3 | [
"Apache-2.0"
] | null | null | null | import json
import sys
# import matplotlib.pyplot as plt
import copy
import numpy as np
import tensorflow as tf
from sklearn.model_selection import StratifiedShuffleSplit
from sklearn.utils import class_weight
from collections import Counter
import random
from tensorflow.keras.callbacks import Callback
from sklearn.met... | 35.104938 | 144 | 0.649083 | 615 | 0.036047 | 0 | 0 | 0 | 0 | 0 | 0 | 4,331 | 0.253854 |
a8e295359a28a2381f6b58817f1595af8035d0d8 | 4,200 | py | Python | trie.py | kawasaki-kento/LOUDS | 6a5e157e04ad0f9a50e7c3858b382f9189d044db | [
"MIT"
] | 1 | 2020-12-02T04:38:12.000Z | 2020-12-02T04:38:12.000Z | trie.py | kawasaki-kento/LOUDS | 6a5e157e04ad0f9a50e7c3858b382f9189d044db | [
"MIT"
] | 1 | 2022-02-17T05:39:27.000Z | 2022-02-17T05:39:27.000Z | trie.py | kawasaki-kento/LOUDS | 6a5e157e04ad0f9a50e7c3858b382f9189d044db | [
"MIT"
] | null | null | null | from constructor import ArrayConstructor
from measure import MeasureMemory
import re
import array
class Trie(object):
def __init__(self, words, unit_scale=8):
bit_array, labels = self.create_tree(words)
self.rank1 = self.get_rank(1)
self.unit_scale = unit_scale
self.split_list = B... | 28.378378 | 108 | 0.561667 | 4,282 | 0.97274 | 0 | 0 | 0 | 0 | 0 | 0 | 360 | 0.081781 |
a8e480da6a075138e07033a8fe888a7b13527f5b | 3,813 | py | Python | metglyphs/__init__.py | informatics-lab/metglyphs | 5726502d5873a44fcee270b3e058d681fee84be7 | [
"BSD-3-Clause"
] | 4 | 2018-05-12T03:12:29.000Z | 2020-05-29T06:10:31.000Z | metglyphs/__init__.py | informatics-lab/metglyphs | 5726502d5873a44fcee270b3e058d681fee84be7 | [
"BSD-3-Clause"
] | null | null | null | metglyphs/__init__.py | informatics-lab/metglyphs | 5726502d5873a44fcee270b3e058d681fee84be7 | [
"BSD-3-Clause"
] | 1 | 2021-04-10T23:58:45.000Z | 2021-04-10T23:58:45.000Z | """A library for converting weather codes to symbols."""
import os.path
from io import BytesIO
import cairosvg
import imageio
from .glyphs import WMO_GLYPH_LOOKUP, DEFAULT_GLYPHS
from .codes import DATAPOINT_TO_WMO_LOOKUP, DARKSKY_TO_WMO_LOOKUP
class GlyphSet():
"""A set of glyphs."""
def __init__(self, n... | 34.044643 | 79 | 0.602151 | 3,559 | 0.933386 | 0 | 0 | 328 | 0.086022 | 0 | 0 | 830 | 0.217676 |
a8e5b8ce05b40fbc469c45e36983e0d032a99b84 | 1,581 | py | Python | showyourwork/exceptions/other.py | katiebreivik/showyourwork | 77a15de6778e14c3a3936e86e181539cc31cc693 | [
"MIT"
] | null | null | null | showyourwork/exceptions/other.py | katiebreivik/showyourwork | 77a15de6778e14c3a3936e86e181539cc31cc693 | [
"MIT"
] | null | null | null | showyourwork/exceptions/other.py | katiebreivik/showyourwork | 77a15de6778e14c3a3936e86e181539cc31cc693 | [
"MIT"
] | null | null | null | from .base import ShowyourworkException
class RequestError(ShowyourworkException):
def __init__(
self,
status="",
message="An error occurred while accessing a remote server.",
):
super().__init__(f"Request error {status}: {message}")
class CondaNotFoundError(ShowyourworkExcep... | 21.657534 | 97 | 0.71537 | 1,499 | 0.948134 | 0 | 0 | 0 | 0 | 0 | 0 | 358 | 0.226439 |
a8e65d0852311bd81e04a9f8be156d61168eac0b | 1,222 | py | Python | seq_util/pull_longest_seq_from_img_fa.py | fandemonium/code | 4498f97658c146de8e693776e05bedeaaf2d5a1d | [
"MIT"
] | 2 | 2017-12-25T09:14:52.000Z | 2021-05-18T06:39:26.000Z | seq_util/pull_longest_seq_from_img_fa.py | fandemonium/code | 4498f97658c146de8e693776e05bedeaaf2d5a1d | [
"MIT"
] | 1 | 2018-09-29T22:34:30.000Z | 2018-09-29T22:34:30.000Z | seq_util/pull_longest_seq_from_img_fa.py | fandemonium/code | 4498f97658c146de8e693776e05bedeaaf2d5a1d | [
"MIT"
] | 1 | 2015-01-30T20:29:25.000Z | 2015-01-30T20:29:25.000Z | import sys
from Bio import SeqIO
import operator
# 1. get genome img_oid from the genecart text file
# 2. create gene sequence dictionary
# 3. add genome img_oid to the gene sequence dictionary
# 4. for genes from the same organism, pull the longest sequence out
gene_cart = open(sys.argv[1], 'rU')
firstline = gene_c... | 28.418605 | 144 | 0.673486 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 247 | 0.202128 |
a8e727decc6f36450568f08df6b418bcc7070425 | 3,444 | py | Python | chapter_projects/quiz_generator/quiz_generator.py | zspatter/automate-the-boring-stuff | 5efc5ab7112be5b5e1197c86472aee212c3a829b | [
"Unlicense"
] | 15 | 2019-08-16T19:44:30.000Z | 2021-09-05T20:19:40.000Z | chapter_projects/quiz_generator/quiz_generator.py | zspatter/automate-the-boring-stuff | 5efc5ab7112be5b5e1197c86472aee212c3a829b | [
"Unlicense"
] | 1 | 2020-01-05T10:06:33.000Z | 2020-01-17T22:28:07.000Z | chapter_projects/quiz_generator/quiz_generator.py | zspatter/automate-the-boring-stuff | 5efc5ab7112be5b5e1197c86472aee212c3a829b | [
"Unlicense"
] | 7 | 2019-08-16T20:42:11.000Z | 2022-03-10T10:33:18.000Z | #! /usr/bin/env python3
# randomQuizGenerator.py - Creates quizzes with questions and answers in
# random order, along with the answer key
import random
# The quiz data. Keys are states and values are their capitals.
capitals = {'Alabama': 'Montgomery',
'Alaska': 'Juneau',
'Ariz... | 38.696629 | 87 | 0.485772 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,673 | 0.485772 |
a8e92779935c13faae8293404567f0278d30ae7e | 138 | py | Python | scripts/reactor/autogen_ludiquest2.py | hsienjan/SideQuest-Server | 3e88debaf45615b759d999255908f99a15283695 | [
"MIT"
] | null | null | null | scripts/reactor/autogen_ludiquest2.py | hsienjan/SideQuest-Server | 3e88debaf45615b759d999255908f99a15283695 | [
"MIT"
] | null | null | null | scripts/reactor/autogen_ludiquest2.py | hsienjan/SideQuest-Server | 3e88debaf45615b759d999255908f99a15283695 | [
"MIT"
] | null | null | null | # ParentID: 2202002
# Character field ID when accessed: 220020000
# ObjectID: 1000016
# Object Position X: -228
# Object Position Y: -198
| 23 | 45 | 0.746377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.963768 |
a8e9720c8eef1700f8da8b99e8e23353e5960428 | 565 | py | Python | GN.py | Aashutosh-922/News-Notifier | fef0665f09f87feeaaa39533905c75ca67098559 | [
"MIT"
] | 1 | 2021-12-09T06:24:46.000Z | 2021-12-09T06:24:46.000Z | GN.py | Aashutosh-922/News-Notifier | fef0665f09f87feeaaa39533905c75ca67098559 | [
"MIT"
] | null | null | null | GN.py | Aashutosh-922/News-Notifier | fef0665f09f87feeaaa39533905c75ca67098559 | [
"MIT"
] | null | null | null | import feedparser
def parseRSS( rss_url ):
return feedparser.parse( rss_url )
def getHeadlines(rss_url):
headlines = []
feed = parseRSS(rss_url)
for newsitem in feed['items']:
headlines.append(newsitem['title'])
return headlines
allheadlines = []
... | 15.27027 | 82 | 0.59115 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.155752 |
a8e9cca9c462f701ccbd95ce0e087cddfc60329e | 3,070 | py | Python | src/jarvis/jarvis/skills/collection/remember.py | jameswynn/Python-ai-assistant | 2acc2982350e8500e3fbd534b26bcdaa1c00a14b | [
"MIT"
] | 424 | 2020-04-19T06:01:00.000Z | 2022-03-31T10:54:03.000Z | src/jarvis/jarvis/skills/collection/remember.py | jameswynn/Python-ai-assistant | 2acc2982350e8500e3fbd534b26bcdaa1c00a14b | [
"MIT"
] | 40 | 2020-05-11T18:14:27.000Z | 2022-03-20T14:26:55.000Z | src/jarvis/jarvis/skills/collection/remember.py | mdanisurrahmanrony/Python-ai-assistant | d519731478e809ca085b67de4eaf1d59cd0a64f5 | [
"MIT"
] | 164 | 2020-04-15T11:46:39.000Z | 2022-03-31T14:28:20.000Z | # MIT License
# Copyright (c) 2019 Georgios Papachristou
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify,... | 41.486486 | 95 | 0.630945 | 1,503 | 0.489577 | 0 | 0 | 1,448 | 0.471661 | 0 | 0 | 1,722 | 0.560912 |
a8ea590dba805a42688e0ba0bfb3a1410eed7819 | 1,977 | py | Python | kubernetes/e2e_test/test_batch.py | pllsxyc/python | 442ebc019056c2dc246be94f85cf61f1e1d26a88 | [
"Apache-2.0"
] | 2 | 2021-03-09T12:42:05.000Z | 2021-03-09T13:27:50.000Z | kubernetes/e2e_test/test_batch.py | pllsxyc/python | 442ebc019056c2dc246be94f85cf61f1e1d26a88 | [
"Apache-2.0"
] | 8 | 2020-10-28T01:18:36.000Z | 2021-06-11T01:06:15.000Z | kubernetes/e2e_test/test_batch.py | pllsxyc/python | 442ebc019056c2dc246be94f85cf61f1e1d26a88 | [
"Apache-2.0"
] | 1 | 2021-06-13T09:21:37.000Z | 2021-06-13T09:21:37.000Z | # -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | 33.508475 | 75 | 0.587759 | 1,250 | 0.632271 | 0 | 0 | 87 | 0.044006 | 0 | 0 | 764 | 0.386444 |
a8ebb8c7ba04d8c8e2be86842c467f1340eb08b4 | 3,223 | py | Python | ZZZ/DES/match_bliss.py | ivmfnal/striped | eef1a4d544fa1b97fde39d7ee5ef779071218891 | [
"BSD-3-Clause"
] | 1 | 2019-07-01T15:19:43.000Z | 2019-07-01T15:19:43.000Z | ZZZ/DES/match_bliss.py | ivmfnal/striped | eef1a4d544fa1b97fde39d7ee5ef779071218891 | [
"BSD-3-Clause"
] | null | null | null | ZZZ/DES/match_bliss.py | ivmfnal/striped | eef1a4d544fa1b97fde39d7ee5ef779071218891 | [
"BSD-3-Clause"
] | 1 | 2020-04-21T21:18:01.000Z | 2020-04-21T21:18:01.000Z | from striped.common import Tracer
T = Tracer()
with T["run"]:
with T["imports"]:
from striped.job import SinglePointStripedSession as Session
import numpy as np
from numpy.lib.recfunctions import append_fields
impor... | 39.790123 | 131 | 0.501396 | 910 | 0.282346 | 0 | 0 | 0 | 0 | 0 | 0 | 647 | 0.200745 |
a8ebf8bbb141395df211d1beccebe31440e682f7 | 109 | py | Python | chk.py | benhur98/GazeUI_RH3 | 3e633474bcb78ab30897692fbcb75c8ad1f5c92e | [
"MIT"
] | null | null | null | chk.py | benhur98/GazeUI_RH3 | 3e633474bcb78ab30897692fbcb75c8ad1f5c92e | [
"MIT"
] | null | null | null | chk.py | benhur98/GazeUI_RH3 | 3e633474bcb78ab30897692fbcb75c8ad1f5c92e | [
"MIT"
] | null | null | null | import numpy as np
a=np.load("train-data-{}.npy".format(input()))
while 1:
print(a[int(input())][1])
| 21.8 | 47 | 0.605505 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0.174312 |
a8ec8c2dda24550165672ed485cf1f2b5ef00950 | 30 | py | Python | python/orcreader/__init__.py | nqbao/python-orc-reader | c4d6a06851b12a309f485ef208c0d84e80b22f8b | [
"BSD-3-Clause"
] | 15 | 2016-07-04T17:05:31.000Z | 2020-06-28T02:15:49.000Z | python/orcreader/__init__.py | nqbao/python-orc-reader | c4d6a06851b12a309f485ef208c0d84e80b22f8b | [
"BSD-3-Clause"
] | 3 | 2017-05-15T06:01:18.000Z | 2018-04-18T21:14:17.000Z | python/orcreader/__init__.py | nqbao/python-orc-reader | c4d6a06851b12a309f485ef208c0d84e80b22f8b | [
"BSD-3-Clause"
] | 6 | 2017-01-23T23:47:52.000Z | 2018-11-01T17:43:40.000Z | from .reader import OrcReader
| 15 | 29 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a8ec95c8cb86838f72fe414c4922ade690fedb2c | 4,509 | py | Python | materials-downloader.py | goDoCer/imperial-computing-materials-downloader | 7ab906d3b2720d1f7739c50908a367d4a6d3155e | [
"MIT"
] | 10 | 2020-11-02T12:27:16.000Z | 2020-12-23T05:31:03.000Z | materials-downloader.py | prnvbn/imperial-computing-materials-downloader | 7ab906d3b2720d1f7739c50908a367d4a6d3155e | [
"MIT"
] | null | null | null | materials-downloader.py | prnvbn/imperial-computing-materials-downloader | 7ab906d3b2720d1f7739c50908a367d4a6d3155e | [
"MIT"
] | null | null | null | import sys
import os
import json
import subprocess
import datetime as dt
sys.path.insert(1, './lib')
from config import *
from webhelpers import *
from argsparser import *
from getpass import getpass
from distutils.dir_util import remove_tree, copy_tree
from selenium import webdriver
from selenium.webdriver.chrome.op... | 30.466216 | 88 | 0.569306 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,420 | 0.314926 |
a8ed6afe97f49d0c92eeaeda111ff0c3ba602a10 | 16,551 | py | Python | PoliCmm/src/parser.py | jutge-org/cpp2many | 2d2fb1784f2515b3c1a1056e163640e556331766 | [
"MIT"
] | 4 | 2018-04-06T00:18:20.000Z | 2021-10-11T20:25:38.000Z | PoliCmm/src/parser.py | jutge-org/cpp2many | 2d2fb1784f2515b3c1a1056e163640e556331766 | [
"MIT"
] | 1 | 2019-02-27T17:04:43.000Z | 2019-02-28T08:25:12.000Z | PoliCmm/src/parser.py | jutge-org/cpp2many | 2d2fb1784f2515b3c1a1056e163640e556331766 | [
"MIT"
] | 4 | 2019-02-27T17:05:17.000Z | 2021-03-12T10:36:04.000Z | import ply.lex as lex
import ply.yacc as yacc
import lexer
import sys
import ast
tokens = lexer.tokens
precedence = (
('right', 'ELSE'),
)
def p_start (t):
'''start : program'''
t[0] = t[1]
def p_program_01 (t):
'''program : program_part'''
t[0] = ast.Program(t[1])
def p_program_02 (t):
... | 21.921854 | 114 | 0.638995 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,996 | 0.483113 |
a8eda53e827a5f782990a22fc39cd52fd4859e3a | 6,530 | py | Python | src/models/backbones/resnet.py | DIVA-DIA/DIVA-DAF | 0ae3b873d04f1852d9053cb4cb2fbc7bda73471c | [
"MIT"
] | 3 | 2022-02-10T17:35:41.000Z | 2022-03-04T10:38:58.000Z | src/models/backbones/resnet.py | DIVA-DIA/DIVA-DAF | 0ae3b873d04f1852d9053cb4cb2fbc7bda73471c | [
"MIT"
] | 3 | 2022-02-02T09:12:18.000Z | 2022-02-16T13:42:30.000Z | src/models/backbones/resnet.py | DIVA-DIA/DIVA-DAF | 0ae3b873d04f1852d9053cb4cb2fbc7bda73471c | [
"MIT"
] | null | null | null | """
Model definition adapted from: https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py
"""
import math
from typing import Optional, List, Union, Type
import torch.nn as nn
model_urls = {
'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth',
'resnet34': 'https://downlo... | 34.550265 | 114 | 0.606126 | 5,693 | 0.871822 | 0 | 0 | 0 | 0 | 0 | 0 | 635 | 0.097243 |
a8f137a79f39517bbee4123c05c0f4f0f49019c3 | 5,652 | py | Python | feature_extraction.py | Tina-Rezaei/malware-detection-based-on-pe-header | f897f5b3e9ac8158ee4d7bf6a002cd7f1498f8f7 | [
"MIT"
] | 1 | 2020-11-15T18:43:07.000Z | 2020-11-15T18:43:07.000Z | feature_extraction.py | Tina-Rezaei/malware-detection-based-on-pe-header | f897f5b3e9ac8158ee4d7bf6a002cd7f1498f8f7 | [
"MIT"
] | null | null | null | feature_extraction.py | Tina-Rezaei/malware-detection-based-on-pe-header | f897f5b3e9ac8158ee4d7bf6a002cd7f1498f8f7 | [
"MIT"
] | null | null | null | import os
import pefile
import time
import re
import click
import subprocess
data_directory_list = ['DIRECTORY_ENTRY_DEBUG', 'DIRECTORY_ENTRY_EXPORT', 'DIRECTORY_ENTRY_LOAD_CONFIG',
'DIRECTORY_ENTRY_RESOURCE', 'DIRECTORY_ENTRY_BASERELOC', 'DIRECTORY_ENTRY_TLS']
normal_section_names = ['.text',... | 36.701299 | 111 | 0.548478 | 0 | 0 | 0 | 0 | 3,205 | 0.567056 | 0 | 0 | 1,119 | 0.197983 |
a8f190e009aea7f92f01038fb21a86895c98af57 | 18,148 | py | Python | research/steve/toy_demo.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | 1 | 2021-05-17T01:42:29.000Z | 2021-05-17T01:42:29.000Z | research/steve/toy_demo.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | null | null | null | research/steve/toy_demo.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | null | null | null | from __future__ import division
from __future__ import print_function
from builtins import range
from past.utils import old_div
# Copyright 2018 The TensorFlow Authors All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licen... | 40.782022 | 119 | 0.605356 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,747 | 0.206469 |
a8f4b9efd55de6bdf846467727516214fa245f0e | 7,112 | py | Python | ldbs.py | Greg-Bernard/EloquaDataLoader | 523aebb519758f086177cc4124508c0cda88610b | [
"MIT"
] | 11 | 2018-02-02T03:02:17.000Z | 2022-03-01T03:52:20.000Z | ldbs.py | Greg-Bernard/EloquaDataLoader | 523aebb519758f086177cc4124508c0cda88610b | [
"MIT"
] | null | null | null | ldbs.py | Greg-Bernard/EloquaDataLoader | 523aebb519758f086177cc4124508c0cda88610b | [
"MIT"
] | null | null | null | #!/usr/bin/python
# ElqBulk scheduler by Greg Bernard
import schedule
import time
from ElqBulk import ElqBulk
from ElqRest import ElqRest
import TableNames
import geoip
from closest_city import CityAppend
def initialise_database(filename='EloquaDB.db'):
"""
Initialise entire database in one run
"""
... | 30.135593 | 121 | 0.695585 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,121 | 0.579443 |
a8f537040119b192daaa8da6c2ebd5f6aff85c58 | 22,554 | py | Python | test/FileTest.py | ytyaru/Python.File.Dir.Stat.20180402093000 | f66e5eff603c62e24dd25f4aea034ce288059c66 | [
"CC0-1.0"
] | null | null | null | test/FileTest.py | ytyaru/Python.File.Dir.Stat.20180402093000 | f66e5eff603c62e24dd25f4aea034ce288059c66 | [
"CC0-1.0"
] | null | null | null | test/FileTest.py | ytyaru/Python.File.Dir.Stat.20180402093000 | f66e5eff603c62e24dd25f4aea034ce288059c66 | [
"CC0-1.0"
] | null | null | null | import sys, os, os.path, pathlib
print(pathlib.Path(__file__).parent.parent / 'src')
sys.path.append(str(pathlib.Path(__file__).parent.parent / 'src'))
from File import File
from Directory import Directory
import unittest
import time, datetime
class FileTest(unittest.TestCase):
# ----------------------------
#... | 41.689464 | 222 | 0.6202 | 22,699 | 0.987171 | 0 | 0 | 0 | 0 | 0 | 0 | 5,304 | 0.230669 |
a8f571492f94df0b230565b81e8284f0b4160ad7 | 1,994 | py | Python | cogs/StatCollector.py | galaxyAbstractor/rvnBot | a013b92c924cc218811e801680bf7d4318406a4c | [
"MIT"
] | null | null | null | cogs/StatCollector.py | galaxyAbstractor/rvnBot | a013b92c924cc218811e801680bf7d4318406a4c | [
"MIT"
] | null | null | null | cogs/StatCollector.py | galaxyAbstractor/rvnBot | a013b92c924cc218811e801680bf7d4318406a4c | [
"MIT"
] | null | null | null | from discord import TextChannel
from discord.ext import commands
from stats import StatService
from users import UserService
class StatCollector(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.stats = StatService(bot.pool)
self.users = UserService(bot.pool)
@commands.Cog.l... | 23.458824 | 56 | 0.654965 | 1,812 | 0.908726 | 0 | 0 | 1,561 | 0.782849 | 1,184 | 0.593781 | 0 | 0 |
a8f671f7ebe45c7c676519c46355c82e84f18cea | 1,369 | py | Python | dredis/gc.py | keang/dredis | 520b3c10a1cee6de9d0f73cd2c43298ce3f9598a | [
"MIT"
] | 53 | 2018-09-19T15:19:09.000Z | 2022-03-06T17:05:32.000Z | dredis/gc.py | keang/dredis | 520b3c10a1cee6de9d0f73cd2c43298ce3f9598a | [
"MIT"
] | 31 | 2018-09-19T16:45:46.000Z | 2021-05-05T15:12:20.000Z | dredis/gc.py | keang/dredis | 520b3c10a1cee6de9d0f73cd2c43298ce3f9598a | [
"MIT"
] | 5 | 2018-09-19T16:42:25.000Z | 2022-03-07T11:36:57.000Z | import threading
import time
from dredis.db import NUMBER_OF_REDIS_DATABASES, DB_MANAGER, KEY_CODEC
DEFAULT_GC_INTERVAL = 500 # milliseconds
DEFAULT_GC_BATCH_SIZE = 10000 # number of storage keys to delete in a batch
class KeyGarbageCollector(threading.Thread):
def __init__(self, gc_interval=DEFAULT_GC_INTE... | 35.102564 | 90 | 0.65084 | 1,144 | 0.835646 | 0 | 0 | 0 | 0 | 0 | 0 | 102 | 0.074507 |
a8f6ec64b56c58fb68898e4ec50ed4fb8d84702a | 431 | py | Python | week08/states_utils.py | thashmadech/is445_spring2022 | 034f71ca545bf06fb2491d818ceb3f8dd6bba8b7 | [
"BSD-3-Clause"
] | 1 | 2019-08-11T04:03:24.000Z | 2019-08-11T04:03:24.000Z | week08/states_utils.py | thashmadech/is445_spring2022 | 034f71ca545bf06fb2491d818ceb3f8dd6bba8b7 | [
"BSD-3-Clause"
] | 1 | 2020-03-02T00:11:33.000Z | 2020-03-02T00:11:33.000Z | week08/states_utils.py | thashmadech/is445_spring2022 | 034f71ca545bf06fb2491d818ceb3f8dd6bba8b7 | [
"BSD-3-Clause"
] | 5 | 2022-01-30T19:45:48.000Z | 2022-03-07T04:15:37.000Z | import numpy as np
def get_ids_and_names(states_map):
ids = []
state_names = []
state_data_vec = states_map.map_data['objects']['subunits']['geometries']
for i in range(len(state_data_vec)):
if state_data_vec[i]['properties'] is not None:
state_names.append(state_data_vec[i]['propert... | 39.181818 | 77 | 0.663573 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.150812 |
a8fb94dedf1844c0d8c37c6a506f33161aed70db | 464 | py | Python | 1005.py | TheLurkingCat/TIOJ | 077e1cd22239d8f6bc1cd7561f27c68143e80263 | [
"MIT"
] | 1 | 2018-10-21T10:03:42.000Z | 2018-10-21T10:03:42.000Z | 1005.py | TheLurkingCat/TIOJ | 077e1cd22239d8f6bc1cd7561f27c68143e80263 | [
"MIT"
] | null | null | null | 1005.py | TheLurkingCat/TIOJ | 077e1cd22239d8f6bc1cd7561f27c68143e80263 | [
"MIT"
] | 2 | 2018-10-12T16:40:11.000Z | 2021-04-05T12:05:36.000Z | from itertools import combinations
from math import gcd, sqrt
a = int(input())
while a:
s = set()
total = 0
coprime = 0
for _ in range(a):
s.add(int(input()))
for (x, y) in combinations(list(s), 2):
total += 1
if gcd(x, y) == 1:
coprime += 1
try:
print... | 24.421053 | 57 | 0.538793 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.086207 |
a8fbf8ce338a6262976301ea199c5ca131183f5f | 49 | py | Python | reloader/__init__.py | gerardroche/AutomaticPackageReloader | e90c22a50f6bfb195394cc6eedab0e7977a0011d | [
"MIT"
] | 30 | 2017-03-05T12:28:31.000Z | 2022-03-23T11:32:23.000Z | reloader/__init__.py | gerardroche/AutomaticPackageReloader | e90c22a50f6bfb195394cc6eedab0e7977a0011d | [
"MIT"
] | 34 | 2017-03-14T05:59:58.000Z | 2021-08-24T16:25:05.000Z | reloader/__init__.py | randy3k/PackageReloader | 1255fcb0bc8effb66956e2240c42b7ae10615860 | [
"MIT"
] | 16 | 2017-03-09T12:03:21.000Z | 2019-10-18T08:19:37.000Z | from .reloader import reload_package, load_dummy
| 24.5 | 48 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a8fc954825cc770935a579719186567eddd9a42d | 1,899 | py | Python | tests/bugs/core_2361_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_2361_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_2361_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | #coding:utf-8
#
# id: bugs.core_2361
# title: String truncation reading 8859-1 Spanish column using isc_dsql_fetch with UTF-8 connection..
# decription:
# tracker_id: CORE-2361
# min_versions: []
# versions: 3.0
# qmid: None
import pytest
from firebird.qa import db_factory, isql_act, ... | 27.128571 | 126 | 0.674039 | 0 | 0 | 0 | 0 | 183 | 0.096367 | 0 | 0 | 1,414 | 0.744602 |
a8fcc6ac8aab4f48607db30ce376a669495d6728 | 229 | py | Python | lorem/data.py | Ahsoka/python-lorem | 5252a5819fcdf87955794a4f1d06284d152e2c8a | [
"MIT"
] | 21 | 2016-06-16T22:33:40.000Z | 2022-03-13T22:56:39.000Z | lorem/data.py | Ahsoka/python-lorem | 5252a5819fcdf87955794a4f1d06284d152e2c8a | [
"MIT"
] | null | null | null | lorem/data.py | Ahsoka/python-lorem | 5252a5819fcdf87955794a4f1d06284d152e2c8a | [
"MIT"
] | 10 | 2017-02-09T14:33:02.000Z | 2021-08-07T15:02:04.000Z | WORDS = ("adipisci aliquam amet consectetur dolor dolore dolorem eius est et"
"incidunt ipsum labore magnam modi neque non numquam porro quaerat qui"
"quia quisquam sed sit tempora ut velit voluptatem").split()
| 57.25 | 80 | 0.733624 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 190 | 0.829694 |
a8fdf92716ffae4bc0c6399c929dc082d01dc0eb | 886 | py | Python | motto/readers.py | attakei/jamproject | f3a677f4f95c112b89fb38957e6ba1a3c923ea85 | [
"Apache-2.0"
] | null | null | null | motto/readers.py | attakei/jamproject | f3a677f4f95c112b89fb38957e6ba1a3c923ea85 | [
"Apache-2.0"
] | 1 | 2020-01-05T14:04:35.000Z | 2020-01-05T14:04:35.000Z | motto/readers.py | attakei/motto | f3a677f4f95c112b89fb38957e6ba1a3c923ea85 | [
"Apache-2.0"
] | null | null | null | """Core custom readers for docutils
"""
from typing import List, Type
from docutils import readers
from docutils.transforms import Transform
from .skill import SkillBase
from .transforms import InitializeReportTransform, TokenizeTransform
class Reader(readers.Reader):
"""Basic custom reader class.
Includes
... | 27.6875 | 68 | 0.694131 | 644 | 0.726862 | 0 | 0 | 0 | 0 | 0 | 0 | 165 | 0.18623 |
d100ae3537b01cb4189c0cbb205089a37a69ed98 | 14,136 | py | Python | flybrainlab/utilities/neurometry.py | FlyBrainLab/FBLClient | c85de23d428a38fe13491b2f5eb30b690610108e | [
"BSD-3-Clause"
] | 3 | 2020-07-23T05:51:22.000Z | 2021-12-24T11:40:30.000Z | flybrainlab/utilities/neurometry.py | FlyBrainLab/FBLClient | c85de23d428a38fe13491b2f5eb30b690610108e | [
"BSD-3-Clause"
] | 3 | 2020-07-31T05:08:35.000Z | 2021-01-08T17:55:16.000Z | flybrainlab/utilities/neurometry.py | FlyBrainLab/FBLClient | c85de23d428a38fe13491b2f5eb30b690610108e | [
"BSD-3-Clause"
] | 1 | 2019-02-03T02:03:00.000Z | 2019-02-03T02:03:00.000Z | import pandas as pd
import numpy as np
from scipy.spatial.distance import pdist
from sklearn.metrics import pairwise_distances
import networkx as nx
def generate_neuron_stats(_input, scale = 'mum', scale_coefficient = 1., log=False):
"""Generates statistics for a given neuron.
# Arguments:
_input ... | 44.037383 | 286 | 0.599392 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,208 | 0.29768 |
d1010b9ee7ff4151215a648eb88588c6174fb854 | 2,495 | py | Python | server/external/youtube-dl/youtube_dl/extractor/promptfile.py | yycc179/urlp | d272b74c4aed18f03ccada8817ecf5c572a1bf71 | [
"MIT"
] | null | null | null | server/external/youtube-dl/youtube_dl/extractor/promptfile.py | yycc179/urlp | d272b74c4aed18f03ccada8817ecf5c572a1bf71 | [
"MIT"
] | null | null | null | server/external/youtube-dl/youtube_dl/extractor/promptfile.py | yycc179/urlp | d272b74c4aed18f03ccada8817ecf5c572a1bf71 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
determine_ext,
ExtractorError,
urlencode_postdata,
)
class PromptFileIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?promptfile\.com/l/(?P<id>[0-9A-Z\-]+)'
... | 35.140845 | 101 | 0.515832 | 2,289 | 0.917435 | 0 | 0 | 0 | 0 | 0 | 0 | 799 | 0.32024 |
d10113d3430723c74844cb610a13bb918fa54c11 | 46 | py | Python | bunruija/modules/__init__.py | tma15/bunruija | 64a5c993a06e9de75f8f382cc4b817f91965223f | [
"MIT"
] | 4 | 2020-12-22T11:12:35.000Z | 2021-12-15T13:30:02.000Z | bunruija/modules/__init__.py | tma15/bunruija | 64a5c993a06e9de75f8f382cc4b817f91965223f | [
"MIT"
] | 4 | 2021-01-16T07:34:22.000Z | 2021-08-14T06:56:07.000Z | bunruija/modules/__init__.py | tma15/bunruija | 64a5c993a06e9de75f8f382cc4b817f91965223f | [
"MIT"
] | null | null | null | from .static_embedding import StaticEmbedding
| 23 | 45 | 0.891304 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d103d48eee96afdf2e4285944634993cf755898d | 23,504 | py | Python | RPiAntDrv.py | N7IFC/RPi_Antenna_Driver | 57cf57b6093f893b7e47fda64d721ec77234b032 | [
"MIT"
] | null | null | null | RPiAntDrv.py | N7IFC/RPi_Antenna_Driver | 57cf57b6093f893b7e47fda64d721ec77234b032 | [
"MIT"
] | 1 | 2020-05-20T12:35:51.000Z | 2020-05-20T12:35:51.000Z | RPiAntDrv.py | N7IFC/RPi_Antenna_Driver | 57cf57b6093f893b7e47fda64d721ec77234b032 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
##################################################################
#
# Raspberry Pi Antenna Driver (RPiAntDrv.py)
#
# Python GUI script to control H-Bridge via RPi.
# H-Bridge drives single DC motor tuned antenna.
#
# Name Call Date(s)
# Authors: Bill Peterson N7IFC Mar-May202... | 47.967347 | 96 | 0.551481 | 22,484 | 0.956603 | 0 | 0 | 0 | 0 | 0 | 0 | 7,093 | 0.301778 |
d104b69824ddd7c1f8640b233b546c4955e4df9d | 4,021 | py | Python | extensions/customer_action.py | time-track-tool/time-track-tool | a1c280f32a7766e460c862633b748fa206256f24 | [
"MIT"
] | null | null | null | extensions/customer_action.py | time-track-tool/time-track-tool | a1c280f32a7766e460c862633b748fa206256f24 | [
"MIT"
] | 1 | 2019-07-03T13:32:38.000Z | 2019-07-03T13:32:38.000Z | extensions/customer_action.py | time-track-tool/time-track-tool | a1c280f32a7766e460c862633b748fa206256f24 | [
"MIT"
] | 1 | 2019-05-15T16:01:31.000Z | 2019-05-15T16:01:31.000Z | #! /usr/bin/python
# Copyright (C) 2006 Dr. Ralf Schlatterbeck Open Source Consulting.
# Reichergasse 131, A-3411 Weidling.
# Web: http://www.runtux.com Email: office@runtux.com
# All rights reserved
# ****************************************************************************
# This program is free software; you can ... | 38.663462 | 79 | 0.605073 | 1,656 | 0.411838 | 0 | 0 | 0 | 0 | 0 | 0 | 1,850 | 0.460085 |
d104ca6c9b0546b1e6e69454841d4fb7d4af63b5 | 7,018 | py | Python | layouts/window_profile.py | TkfleBR/PyManager | d57f6cced4932d03b51902cbcf4d9b217c67bd3c | [
"MIT"
] | null | null | null | layouts/window_profile.py | TkfleBR/PyManager | d57f6cced4932d03b51902cbcf4d9b217c67bd3c | [
"MIT"
] | null | null | null | layouts/window_profile.py | TkfleBR/PyManager | d57f6cced4932d03b51902cbcf4d9b217c67bd3c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'window_profile.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QMainWindow
class Profile(QMainWindow):
d... | 53.572519 | 78 | 0.708891 | 6,730 | 0.958963 | 0 | 0 | 0 | 0 | 0 | 0 | 766 | 0.109148 |
d105481f869074fc1ccad9921caae59fba74e538 | 1,816 | py | Python | tests/test_inheritance_and_pydantic_generation/test_validators_in_generated_pydantic.py | ivangirko/ormar | 1f5d993716da0da83874cbdfd5b44dbf7af1b9c5 | [
"MIT"
] | 905 | 2020-08-31T19:13:34.000Z | 2022-03-31T08:38:10.000Z | tests/test_inheritance_and_pydantic_generation/test_validators_in_generated_pydantic.py | ivangirko/ormar | 1f5d993716da0da83874cbdfd5b44dbf7af1b9c5 | [
"MIT"
] | 359 | 2020-08-28T14:14:54.000Z | 2022-03-29T07:40:32.000Z | tests/test_inheritance_and_pydantic_generation/test_validators_in_generated_pydantic.py | ivangirko/ormar | 1f5d993716da0da83874cbdfd5b44dbf7af1b9c5 | [
"MIT"
] | 56 | 2020-10-26T02:22:14.000Z | 2022-03-20T06:41:31.000Z | import enum
import databases
import pydantic
import pytest
import sqlalchemy
from pydantic import ValidationError
import ormar
from tests.settings import DATABASE_URL
metadata = sqlalchemy.MetaData()
database = databases.Database(DATABASE_URL)
class BaseMeta(ormar.ModelMeta):
database = database
metadata ... | 26.705882 | 78 | 0.698789 | 703 | 0.387115 | 0 | 0 | 163 | 0.089758 | 0 | 0 | 229 | 0.126101 |
d105fd819be01d37eabcfc76984d50eb4c0e68fb | 20,654 | py | Python | tests/unit/test_searchtools.py | canonical/hotsos | 1960e80a3f7529045c44798b0d3ac27d75036562 | [
"Apache-2.0"
] | 6 | 2021-10-01T19:46:14.000Z | 2022-03-31T17:05:08.000Z | tests/unit/test_searchtools.py | canonical/hotsos | 1960e80a3f7529045c44798b0d3ac27d75036562 | [
"Apache-2.0"
] | 111 | 2021-10-01T18:18:17.000Z | 2022-03-29T12:23:20.000Z | tests/unit/test_searchtools.py | canonical/hotsos | 1960e80a3f7529045c44798b0d3ac27d75036562 | [
"Apache-2.0"
] | 10 | 2021-09-29T14:47:54.000Z | 2022-03-18T14:52:16.000Z | import glob
import os
import tempfile
from unittest import mock
from . import utils
from hotsos.core.config import setup_config, HotSOSConfig
from hotsos.core.searchtools import (
FileSearcher,
FilterDef,
SearchDef,
SearchResult,
SequenceSearchDef,
)
FILTER_TEST_1 = """blah blah ERROR blah
blah ... | 39.56705 | 79 | 0.534812 | 19,705 | 0.954052 | 0 | 0 | 1,003 | 0.048562 | 0 | 0 | 3,379 | 0.1636 |
d1067d667a8681b9e02f92cf39cbd928fbd8b767 | 896 | py | Python | setup.py | KimWiese/bqtools | f874834167dddaae9da7dd5a8564d80a479d59ac | [
"MIT"
] | null | null | null | setup.py | KimWiese/bqtools | f874834167dddaae9da7dd5a8564d80a479d59ac | [
"MIT"
] | null | null | null | setup.py | KimWiese/bqtools | f874834167dddaae9da7dd5a8564d80a479d59ac | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
VERSION = '0.5.0'
with open('README.md', 'r') as f:
LONG_DESCRIPTION = f.read()
with open('requirements.txt') as f:
DEPENDENCIES = f.read().split('\n')
setup(
name = 'bqtools',
version = VERSION,
description = 'Python Tools for BigQuery',
long_desc... | 28.903226 | 52 | 0.639509 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 360 | 0.401786 |
d10682fb60ec99068c4dbd7e5b8bac0fee1bcbce | 32 | py | Python | dag_executor/Executor/__init__.py | GennadiiTurutin/dag_executor | ddc7eab1e0e98753309e245247ac00e465e52ec1 | [
"MIT"
] | null | null | null | dag_executor/Executor/__init__.py | GennadiiTurutin/dag_executor | ddc7eab1e0e98753309e245247ac00e465e52ec1 | [
"MIT"
] | null | null | null | dag_executor/Executor/__init__.py | GennadiiTurutin/dag_executor | ddc7eab1e0e98753309e245247ac00e465e52ec1 | [
"MIT"
] | null | null | null | from .executor import Executor
| 16 | 31 | 0.8125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d106a8e65c56d421953b12f1ee56992d0d42670b | 2,546 | py | Python | tests/create_test_db.py | TargetProcess/duro | 3e70c17aed3d6d8714c94f0dfda539969d22157a | [
"MIT"
] | 4 | 2020-01-31T13:54:51.000Z | 2020-04-17T15:53:02.000Z | tests/create_test_db.py | TargetProcess/duro | 3e70c17aed3d6d8714c94f0dfda539969d22157a | [
"MIT"
] | null | null | null | tests/create_test_db.py | TargetProcess/duro | 3e70c17aed3d6d8714c94f0dfda539969d22157a | [
"MIT"
] | 1 | 2020-04-14T12:32:08.000Z | 2020-04-14T12:32:08.000Z | import sqlite3
ddl = """
create table commits
(
hash text,
processed integer
);
create table tables
(
table_name text,
query text,
interval integer,
config text,
last_created integer,
mean real,
times_run integer,
force integer,
started integer,
deleted integer,
wai... | 27.376344 | 122 | 0.689709 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,511 | 0.986253 |
d106bcbb2782ae3b631b100e3fcc2d409f55aa2d | 6,534 | py | Python | dti_classification_pytorch.py | fyrdahl/ISMRM2018_Educational_DeepLearning | 8bd3fa4a6828e0bb3a9832a9ec90ab5a99836f52 | [
"MIT"
] | 17 | 2018-06-16T09:06:18.000Z | 2022-03-11T16:20:03.000Z | dti_classification_pytorch.py | fyrdahl/ISMRM2018_Educational_DeepLearning | 8bd3fa4a6828e0bb3a9832a9ec90ab5a99836f52 | [
"MIT"
] | null | null | null | dti_classification_pytorch.py | fyrdahl/ISMRM2018_Educational_DeepLearning | 8bd3fa4a6828e0bb3a9832a9ec90ab5a99836f52 | [
"MIT"
] | 8 | 2018-06-16T09:12:43.000Z | 2020-12-17T02:54:16.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
DTI classification demo ISMRM 2018
Created in May 2018 for ISMRM educational "How to Jump-Start Your Deep Learning Research"
Educational course Deep Learning: Everything You Want to Know, Saturday, June 16th 2018
Joint Annual meeting of ISMRM and ESMRMB, Paris, France... | 31.873171 | 197 | 0.716406 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,421 | 0.370523 |
d108c51bdb007cb0e84b86a435237fb3a1b224b6 | 30,044 | py | Python | dasem/wikipedia.py | eaksnes/dasem | d8d1c5e68aedf758aee1ba83da063f1e0952c21d | [
"Apache-2.0"
] | 18 | 2017-03-28T15:36:49.000Z | 2021-11-02T12:09:17.000Z | dasem/wikipedia.py | eaksnes/dasem | d8d1c5e68aedf758aee1ba83da063f1e0952c21d | [
"Apache-2.0"
] | 9 | 2017-02-17T12:58:23.000Z | 2021-02-14T14:04:17.000Z | dasem/wikipedia.py | eaksnes/dasem | d8d1c5e68aedf758aee1ba83da063f1e0952c21d | [
"Apache-2.0"
] | 2 | 2018-10-04T09:29:12.000Z | 2019-08-15T10:04:55.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Wikipedia interface.
Usage:
dasem.wikipedia category-graph | count-category-pages
dasem.wikipedia count-pages | count-pages-per-user
dasem.wikipedia article-link-graph [options]
dasem.wikipedia download [options]
dasem.wikipedia get-all-article-sentences
das... | 28.972035 | 79 | 0.580748 | 21,651 | 0.720595 | 5,776 | 0.192239 | 0 | 0 | 0 | 0 | 12,242 | 0.407442 |
d109fc9aa0086799eb6cc991bb49a126a301ba91 | 794 | py | Python | ViceVersus/users/migrations/0001_initial.py | ViceVersusMe/ViceVersus | 1f814f8a8c3ee0c156ebf400f4dac87c19d7747a | [
"MIT"
] | null | null | null | ViceVersus/users/migrations/0001_initial.py | ViceVersusMe/ViceVersus | 1f814f8a8c3ee0c156ebf400f4dac87c19d7747a | [
"MIT"
] | null | null | null | ViceVersus/users/migrations/0001_initial.py | ViceVersusMe/ViceVersus | 1f814f8a8c3ee0c156ebf400f4dac87c19d7747a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='UserProfile',
fields=[
('id', models.AutoField(... | 33.083333 | 133 | 0.584383 | 685 | 0.86272 | 0 | 0 | 0 | 0 | 0 | 0 | 99 | 0.124685 |
d10a3d88aef5a6ce7c6db2138dda46ee0331ecd1 | 10,992 | py | Python | VideoEncoding/Encoding_H264_OverlayImage/encoding-h264-overlayimage.py | IngridAtMicrosoft/media-services-v3-python | 2eb43f502cd8637961869faf8d0c365ffa1680d2 | [
"MIT"
] | null | null | null | VideoEncoding/Encoding_H264_OverlayImage/encoding-h264-overlayimage.py | IngridAtMicrosoft/media-services-v3-python | 2eb43f502cd8637961869faf8d0c365ffa1680d2 | [
"MIT"
] | null | null | null | VideoEncoding/Encoding_H264_OverlayImage/encoding-h264-overlayimage.py | IngridAtMicrosoft/media-services-v3-python | 2eb43f502cd8637961869faf8d0c365ffa1680d2 | [
"MIT"
] | null | null | null | from datetime import timedelta
from dotenv import load_dotenv
from azure.identity import DefaultAzureCredential
from azure.mgmt.media import AzureMediaServices
from azure.storage.blob import BlobServiceClient
from azure.mgmt.media.models import (
Asset,
Transform,
TransformOutput,
StandardEncoderPreset,
AacAu... | 40.411765 | 170 | 0.744269 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,575 | 0.507187 |
d10a8191767d3047473533170660c6af542ccdde | 3,858 | py | Python | fixture/project.py | shark-x/py_mantis_traning | d0e262f3833bd8ba570f6ca66f66f44279eac4e6 | [
"Apache-2.0"
] | null | null | null | fixture/project.py | shark-x/py_mantis_traning | d0e262f3833bd8ba570f6ca66f66f44279eac4e6 | [
"Apache-2.0"
] | null | null | null | fixture/project.py | shark-x/py_mantis_traning | d0e262f3833bd8ba570f6ca66f66f44279eac4e6 | [
"Apache-2.0"
] | null | null | null | from model.project import Project
import random
import string
class ProjectHelper:
def __init__(self, app):
self. app = app
def open_project_page(self):
wd = self.app.wd
if not wd.current_url.endswith("/manage_proj_page.php"):
wd.find_element_by_link_text("Manage").click()... | 39.367347 | 87 | 0.634266 | 3,795 | 0.98367 | 0 | 0 | 0 | 0 | 0 | 0 | 859 | 0.222654 |
d10c10ebac6b3f7660217ed74c5259e0bf35c57f | 555 | py | Python | PropertyBazaar/urls.py | rudolphalmeida/PropertyBazaarAPI | bada589e415817b6b4e36a656adae9b70d047884 | [
"MIT"
] | null | null | null | PropertyBazaar/urls.py | rudolphalmeida/PropertyBazaarAPI | bada589e415817b6b4e36a656adae9b70d047884 | [
"MIT"
] | 1 | 2021-06-10T23:19:37.000Z | 2021-06-10T23:19:37.000Z | PropertyBazaar/urls.py | rudolphalmeida/PropertyBazaarAPI | bada589e415817b6b4e36a656adae9b70d047884 | [
"MIT"
] | 1 | 2018-12-22T16:43:52.000Z | 2018-12-22T16:43:52.000Z | from django.conf.urls import url
from PropertyBazaar.views import PropertyList, PropertyDetail, UserDetail, UserList
from rest_framework.urlpatterns import format_suffix_patterns
urlpatterns = [
url(r'^property/$', PropertyList.as_view(), name='property-list'),
url(r'^property/(?P<pk>[0-9]+)/$', PropertyDetai... | 42.692308 | 89 | 0.724324 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.257658 |
d10c14d2ae3b5ea7f31dec6255423208caac1f0c | 1,339 | py | Python | cdedup/testsum.py | salotz/boar | c3022a65217e5befe37100a71632e6540e74992e | [
"Apache-2.0"
] | 2 | 2020-03-31T17:44:31.000Z | 2020-08-21T07:33:15.000Z | cdedup/testsum.py | salotz/boar | c3022a65217e5befe37100a71632e6540e74992e | [
"Apache-2.0"
] | null | null | null | cdedup/testsum.py | salotz/boar | c3022a65217e5befe37100a71632e6540e74992e | [
"Apache-2.0"
] | 1 | 2020-08-21T07:33:39.000Z | 2020-08-21T07:33:39.000Z | from __future__ import print_function
# Copyright 2010 Mats Ekberg
#
# 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 appl... | 32.658537 | 92 | 0.74832 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 789 | 0.589246 |
d10c91aeb1ebbaeec21b56fc9e92b2459863b1e8 | 160 | py | Python | app/models/forms.py | raimota/Gerador-Validador-CPF_CNPJ | e2af5ec35995b63b4bb739af92e9532563d9ed12 | [
"MIT"
] | null | null | null | app/models/forms.py | raimota/Gerador-Validador-CPF_CNPJ | e2af5ec35995b63b4bb739af92e9532563d9ed12 | [
"MIT"
] | null | null | null | app/models/forms.py | raimota/Gerador-Validador-CPF_CNPJ | e2af5ec35995b63b4bb739af92e9532563d9ed12 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField
from wtforms.validators import DataRequired
class Campos(FlaskForm):
es = StringField('es') | 26.666667 | 43 | 0.8125 | 51 | 0.31875 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0.025 |
d10dfd254ad04354b6df951eaf41bb1393f023dc | 1,642 | py | Python | setup.py | mvandam/CEO | eedca8bafe2aaf5b434bafed445eb2c6367914bf | [
"Zlib"
] | 18 | 2016-02-29T12:41:52.000Z | 2021-12-03T15:10:34.000Z | setup.py | mvandam/CEO | eedca8bafe2aaf5b434bafed445eb2c6367914bf | [
"Zlib"
] | 23 | 2015-04-27T14:17:19.000Z | 2021-11-29T22:19:12.000Z | setup.py | mvandam/CEO | eedca8bafe2aaf5b434bafed445eb2c6367914bf | [
"Zlib"
] | 17 | 2015-04-09T14:13:16.000Z | 2022-02-17T10:03:00.000Z | #!/usr/bin/env python
import os
import sys
import distutils.cmd
import distutils.log
import setuptools
import subprocess
from distutils.core import setup
import setuptools.command.build_py
sys.path.append(os.path.dirname(__file__)+"/python")
print(sys.path)
class MakeCeoCommand(distutils.cmd.Command):
"""A custom ... | 24.507463 | 68 | 0.672351 | 1,050 | 0.639464 | 0 | 0 | 0 | 0 | 0 | 0 | 637 | 0.387942 |
d10e119827edf64c5992be98368eca488d789d1c | 263 | py | Python | users/tokens.py | maks-nurgazy/diploma-project | 66889488ffaa0269e1be2df6f6c76a3ca68a3cfb | [
"MIT"
] | null | null | null | users/tokens.py | maks-nurgazy/diploma-project | 66889488ffaa0269e1be2df6f6c76a3ca68a3cfb | [
"MIT"
] | null | null | null | users/tokens.py | maks-nurgazy/diploma-project | 66889488ffaa0269e1be2df6f6c76a3ca68a3cfb | [
"MIT"
] | null | null | null | from rest_framework_simplejwt.tokens import RefreshToken
def get_jwt_tokens_for_user(user, **kwargs):
"""
Generates a refresh token for the valid user
"""
refresh = RefreshToken.for_user(user)
return str(refresh), str(refresh.access_token)
| 23.909091 | 56 | 0.737643 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.228137 |
d10f214ef69fa8548dfc5cc8ae64127b9968d418 | 376 | py | Python | tests/bitly/*REPL* [python].py | goldsborough/lnk | 1487d272a70329571c77c0ec17c394dc6a1d088f | [
"MIT"
] | 3 | 2017-06-16T18:51:54.000Z | 2018-04-08T19:36:12.000Z | tests/bitly/*REPL* [python].py | goldsborough/lnk | 1487d272a70329571c77c0ec17c394dc6a1d088f | [
"MIT"
] | 2 | 2021-02-08T20:17:54.000Z | 2021-04-30T20:35:44.000Z | tests/bitly/*REPL* [python].py | goldsborough/lnk | 1487d272a70329571c77c0ec17c394dc6a1d088f | [
"MIT"
] | 1 | 2019-11-06T19:05:30.000Z | 2019-11-06T19:05:30.000Z | Python 3.5.0 (default, Sep 14 2015, 02:37:27)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = [{'a': 1}, {'b': 2}]
>>> sorted(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unorder... | 41.777778 | 70 | 0.606383 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.148936 |
d10fc18cdd03e862b01f58847357abc40d702c0b | 12,015 | py | Python | src/server/server.py | ZePaiva/Secure-Hearts | 3a2cde096156c56c29c43b21109e096e577c5346 | [
"MIT"
] | null | null | null | src/server/server.py | ZePaiva/Secure-Hearts | 3a2cde096156c56c29c43b21109e096e577c5346 | [
"MIT"
] | null | null | null | src/server/server.py | ZePaiva/Secure-Hearts | 3a2cde096156c56c29c43b21109e096e577c5346 | [
"MIT"
] | null | null | null | # logging
import logging
import coloredlogs
# server
import socket
import json
import sys
import traceback
# threading
from _thread import *
# croupier
from croupier import Croupier
# cryptography
from server_crypto import *
from utils.server_utils import *
from utils.server_utils import *
# server logging
server... | 43.690909 | 163 | 0.574282 | 11,372 | 0.946484 | 0 | 0 | 0 | 0 | 0 | 0 | 2,817 | 0.234457 |
d11150f9da78258d94fd1eac873f91d70d526a04 | 1,098 | py | Python | alphatwirl/parallel/parallel.py | shane-breeze/AlphaTwirl | 59dbd5348af31d02e133d43fd5bfaad6b99a155e | [
"BSD-3-Clause"
] | null | null | null | alphatwirl/parallel/parallel.py | shane-breeze/AlphaTwirl | 59dbd5348af31d02e133d43fd5bfaad6b99a155e | [
"BSD-3-Clause"
] | 7 | 2018-02-26T10:32:26.000Z | 2018-03-19T12:27:12.000Z | alphatwirl/parallel/parallel.py | shane-breeze/AlphaTwirl | 59dbd5348af31d02e133d43fd5bfaad6b99a155e | [
"BSD-3-Clause"
] | null | null | null | # Tai Sakuma <tai.sakuma@gmail.com>
##__________________________________________________________________||
class Parallel(object):
def __init__(self, progressMonitor, communicationChannel, workingarea=None):
self.progressMonitor = progressMonitor
self.communicationChannel = communicationChannel
... | 32.294118 | 80 | 0.65847 | 917 | 0.835155 | 0 | 0 | 0 | 0 | 0 | 0 | 248 | 0.225865 |
d112e5e4e9404a987fd2539dd0c5729a2d97741e | 210 | py | Python | app/events/client/commands/template.py | Hacker-1202/Selfium | 7e798c23c9f24aacab6f6a485d6355f1045bc65c | [
"MIT"
] | 14 | 2021-11-05T11:27:25.000Z | 2022-02-28T02:04:32.000Z | app/events/client/commands/template.py | CssHammer/Selfium | 7e798c23c9f24aacab6f6a485d6355f1045bc65c | [
"MIT"
] | 2 | 2022-01-24T22:00:44.000Z | 2022-01-31T13:13:27.000Z | app/events/client/commands/template.py | CssHammer/Selfium | 7e798c23c9f24aacab6f6a485d6355f1045bc65c | [
"MIT"
] | 5 | 2022-01-02T13:33:17.000Z | 2022-02-26T13:09:50.000Z | from app.vars.client import client
from app.helpers import Notify, params
from app.filesystem import cfg
@client.command()
async def template(ctx):
notify = Notify(ctx=ctx, title='Template File...')
| 23.333333 | 54 | 0.733333 | 0 | 0 | 0 | 0 | 97 | 0.461905 | 79 | 0.37619 | 18 | 0.085714 |
d113b6f34bb07a1a16e4fef926c78e11ef306ee3 | 129 | py | Python | cwf2neo/tests/__init__.py | sintax1/cwf2neo | 25a8186798a6611f91e4b39052c3baa2023fb5b1 | [
"Apache-2.0"
] | 1 | 2021-06-02T11:44:00.000Z | 2021-06-02T11:44:00.000Z | cwf2neo/tests/__init__.py | sintax1/cwf2neo | 25a8186798a6611f91e4b39052c3baa2023fb5b1 | [
"Apache-2.0"
] | null | null | null | cwf2neo/tests/__init__.py | sintax1/cwf2neo | 25a8186798a6611f91e4b39052c3baa2023fb5b1 | [
"Apache-2.0"
] | 1 | 2021-11-27T00:33:28.000Z | 2021-11-27T00:33:28.000Z | import sys # NOQA
import os
current_path = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, current_path + '/../')
| 21.5 | 57 | 0.72093 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.093023 |
d11621515563b1ecfde422cf5290bbe6f0dd81a9 | 1,799 | py | Python | core/setup.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 89 | 2015-03-26T11:25:20.000Z | 2022-01-12T06:25:14.000Z | core/setup.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 1 | 2015-07-05T03:27:43.000Z | 2015-07-11T06:21:20.000Z | core/setup.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 30 | 2015-04-30T01:35:54.000Z | 2022-01-12T06:19:49.000Z | #!/usr/bin/python2.7
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
import sys
from setuptools import setup
from glob import glob
NAME = "pycopia-core"
VERSION = "1.0"
if sys.platform.startswith("linux"):
DATA_FILES = [('/etc/pycopia', glob("etc/*"))]
else:
DATA_FILES = []
setup (name=NAME, version=VER... | 28.555556 | 86 | 0.619233 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,070 | 0.594775 |
d116b13ce48393f3923096c921dfa4b0c8f125c6 | 6,646 | py | Python | datasets_sysu.py | mpeven/ntu_rgb | 4a8b43c521500907d2f241e4b440381cf8c62350 | [
"MIT"
] | 19 | 2017-12-21T12:06:01.000Z | 2021-03-13T08:15:38.000Z | datasets_sysu.py | 3huo/ntu_rgb | 4a8b43c521500907d2f241e4b440381cf8c62350 | [
"MIT"
] | 2 | 2019-07-26T02:27:32.000Z | 2019-12-13T06:56:22.000Z | datasets_sysu.py | mpeven/ntu_rgb | 4a8b43c521500907d2f241e4b440381cf8c62350 | [
"MIT"
] | 7 | 2018-09-20T06:54:18.000Z | 2021-03-16T09:12:50.000Z | from sysu_dataset import SYSU
import numpy as np
import scipy
import itertools
import cv2
import torch
from torch.utils.data import Dataset
import torchvision.transforms as transforms
from config import *
vox_size=54
all_tups = np.array(list(itertools.product(range(vox_size), repeat=2)))
rot_array = np.arange(vox_... | 32.578431 | 132 | 0.567108 | 5,711 | 0.859314 | 0 | 0 | 0 | 0 | 0 | 0 | 1,209 | 0.181914 |
d1170ce42494e908356aac4f4b85a5adc8b67a14 | 2,814 | py | Python | CNN.py | psmishra7/CryptocurrencyPrediction | 96f85ba45d1acbd531ad86f7f9ba32b9acd3ddaf | [
"MIT"
] | null | null | null | CNN.py | psmishra7/CryptocurrencyPrediction | 96f85ba45d1acbd531ad86f7f9ba32b9acd3ddaf | [
"MIT"
] | null | null | null | CNN.py | psmishra7/CryptocurrencyPrediction | 96f85ba45d1acbd531ad86f7f9ba32b9acd3ddaf | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as numpy
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Conv1D, MaxPooling1D, LeakyReLU, PReLU
from keras.utils import np_utils
from keras.callbacks import CSVLogger, ModelCheckpoint
import h5py
import os
import ... | 33.105882 | 328 | 0.767235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,332 | 0.473348 |
d11727512e7e8babcf124e894f743183a114c424 | 586 | py | Python | wordcloud.py | jim-spyropoulos/NLP-in-Neswpaper-articles | 1a229874f535e198e635d50e5d9bdfc75685feca | [
"Apache-2.0"
] | 1 | 2019-07-25T05:54:10.000Z | 2019-07-25T05:54:10.000Z | wordcloud.py | jJimo/NLP-in-Neswpaper-articles | 1a229874f535e198e635d50e5d9bdfc75685feca | [
"Apache-2.0"
] | null | null | null | wordcloud.py | jJimo/NLP-in-Neswpaper-articles | 1a229874f535e198e635d50e5d9bdfc75685feca | [
"Apache-2.0"
] | 1 | 2022-02-22T13:03:19.000Z | 2022-02-22T13:03:19.000Z | import pandas as pd
import matplotlib.pyplot as plt
from os import path
from wordcloud import WordCloud
#d = path.dirname(__file__)
df=pd.read_csv("train_set.csv",sep="\t")
categories=["Business","Film","Football","Politics","Technology"]
for category in categories:
text=""
for index,row in df.iterrows():
... | 21.703704 | 77 | 0.691126 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.213311 |
d1183372da6062d23499982cf0b0d29bf10d59d1 | 3,260 | py | Python | openqemist/tests/problem_decomposition/dmet/test_dmet_orbitals.py | 1QB-Information-Technologies/openqemist | e2ab887af31d78d03dcb92cfa3a0705b2436823d | [
"Apache-2.0"
] | 35 | 2019-05-31T22:37:23.000Z | 2022-01-06T12:01:18.000Z | openqemist/tests/problem_decomposition/dmet/test_dmet_orbitals.py | rickyHong/1Qbit-QEMIST-repl | 863fafdbc5bcd2c267b6a57dfa06b050aa053a6d | [
"Apache-2.0"
] | 2 | 2021-03-23T22:34:23.000Z | 2021-06-23T13:09:46.000Z | openqemist/tests/problem_decomposition/dmet/test_dmet_orbitals.py | rickyHong/1Qbit-QEMIST-repl | 863fafdbc5bcd2c267b6a57dfa06b050aa053a6d | [
"Apache-2.0"
] | 10 | 2019-06-06T23:14:18.000Z | 2021-12-02T21:56:13.000Z | # Copyright 2019 1QBit
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 36.629213 | 134 | 0.632822 | 1,853 | 0.568405 | 0 | 0 | 0 | 0 | 0 | 0 | 2,223 | 0.681902 |
d1192c11dd7c40a7a80b9ec12ae3bec4e88c356a | 1,684 | py | Python | books/techno/python/programming_python_4_ed_m_lutz/code/chapter_8/13_binding_events/bind.py | ordinary-developer/lin_education | 13d65b20cdbc3e5467b2383e5c09c73bbcdcb227 | [
"MIT"
] | 1 | 2017-05-04T08:23:46.000Z | 2017-05-04T08:23:46.000Z | books/techno/python/programming_python_4_ed_m_lutz/code/chapter_8/13_binding_events/bind.py | ordinary-developer/lin_education | 13d65b20cdbc3e5467b2383e5c09c73bbcdcb227 | [
"MIT"
] | null | null | null | books/techno/python/programming_python_4_ed_m_lutz/code/chapter_8/13_binding_events/bind.py | ordinary-developer/lin_education | 13d65b20cdbc3e5467b2383e5c09c73bbcdcb227 | [
"MIT"
] | null | null | null | from tkinter import *
def showPosEvent(event):
print('Widget ={} X={} Y={}'.format(event.widget, event.x, event.y))
def showAllEvent(event):
print(event)
for attr in dir(event):
if not attr.startswith('__'):
print(attr, '=>', getattr(event, attr))
def onKeyPress(event):
... | 27.16129 | 73 | 0.644893 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 399 | 0.236936 |
d1195e5aa794a4828c802143266203e6d6782d92 | 553 | py | Python | week9/api/migrations/0002_auto_20200324_1713.py | yestemir/web | 5bdead66c26a3c466701e25ecae9720f04ad4118 | [
"Unlicense"
] | null | null | null | week9/api/migrations/0002_auto_20200324_1713.py | yestemir/web | 5bdead66c26a3c466701e25ecae9720f04ad4118 | [
"Unlicense"
] | 13 | 2021-03-10T08:46:52.000Z | 2022-03-02T08:13:58.000Z | week9/api/migrations/0002_auto_20200324_1713.py | yestemir/web | 5bdead66c26a3c466701e25ecae9720f04ad4118 | [
"Unlicense"
] | null | null | null | # Generated by Django 3.0.4 on 2020-03-24 11:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='products',
name='category',
fie... | 23.041667 | 73 | 0.56962 | 460 | 0.831826 | 0 | 0 | 0 | 0 | 0 | 0 | 123 | 0.222423 |
d11976dd8538123b7d77b35efa91d570c64fdb1d | 960 | py | Python | Computer Networks Lab/A11TCP/PeertoPeer/pptcpserv.py | prabu-5701/Third_Year_Lab_Assignments | db0353cff33c9811ec6df13ec982af161de311fe | [
"MIT"
] | 12 | 2020-10-24T17:57:09.000Z | 2021-12-29T07:13:36.000Z | Computer Networks Lab/A11TCP/PeertoPeer/pptcpserv.py | prabu-5701/Third_Year_Lab_Assignments | db0353cff33c9811ec6df13ec982af161de311fe | [
"MIT"
] | null | null | null | Computer Networks Lab/A11TCP/PeertoPeer/pptcpserv.py | prabu-5701/Third_Year_Lab_Assignments | db0353cff33c9811ec6df13ec982af161de311fe | [
"MIT"
] | 16 | 2020-04-21T13:38:07.000Z | 2022-03-20T23:40:37.000Z | '''
NAME: VAIBHAV SUDHAKAR BHAVSAR
TE-B
ROLL NO: 08
ASSIGNMENT NO: 11
PROBLEM STATEMENT:
Write a program using TCP sockets for wired network to implement
a. Peer to Peer Chat (server side)
'''
import socket
import sys
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(('localhost',23000))
sock.listen... | 22.857143 | 106 | 0.696875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 606 | 0.63125 |
d11ca10c2506a5eec12ca314bb1040463209b759 | 2,825 | py | Python | tutos/institutions/views.py | UVG-Teams/Tutos-System | 230dd9434f745c2e6e69e10f9908e9818c559d03 | [
"MIT"
] | null | null | null | tutos/institutions/views.py | UVG-Teams/Tutos-System | 230dd9434f745c2e6e69e10f9908e9818c559d03 | [
"MIT"
] | null | null | null | tutos/institutions/views.py | UVG-Teams/Tutos-System | 230dd9434f745c2e6e69e10f9908e9818c559d03 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from rest_framework import viewsets
from institutions.models import Institution, Career, Course
from institutions.serializers import InstitutionSerializer, CareerSerializer, CourseSerializer
from permissions.services import APIPermissionClassFactory
class InstitutionViewSet(viewse... | 38.175676 | 94 | 0.572743 | 2,528 | 0.894867 | 0 | 0 | 0 | 0 | 0 | 0 | 278 | 0.098407 |
d11e05aec66f3501ed77fd7b7c80b254c9a474b3 | 4,923 | py | Python | vendor/guardian/tests/decorators_test.py | AhmadManzoor/jazzpos | 7b771095b8df52d036657f33f36a97efb575d36c | [
"MIT"
] | 5 | 2015-12-05T15:39:51.000Z | 2020-09-16T20:14:29.000Z | vendor/guardian/tests/decorators_test.py | AhmadManzoor/jazzpos | 7b771095b8df52d036657f33f36a97efb575d36c | [
"MIT"
] | null | null | null | vendor/guardian/tests/decorators_test.py | AhmadManzoor/jazzpos | 7b771095b8df52d036657f33f36a97efb575d36c | [
"MIT"
] | 2 | 2019-11-23T17:47:46.000Z | 2022-01-14T11:05:21.000Z | from django.test import TestCase
from django.contrib.auth.models import User, Group, AnonymousUser
from django.http import HttpRequest
from django.http import HttpResponse
from django.http import HttpResponseForbidden
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404
from guar... | 33.719178 | 79 | 0.630713 | 4,444 | 0.902702 | 0 | 0 | 1,285 | 0.26102 | 0 | 0 | 792 | 0.160878 |
d11ea5562b964e94c6dcce86e39ac739e687f11e | 1,004 | py | Python | default_colours.py | ARCowie28/SyntheticWeather | c1c7c2b0b820d35306891ae52b44cc0240f0323d | [
"BSD-3-Clause"
] | 11 | 2019-03-22T01:33:28.000Z | 2021-04-18T03:58:04.000Z | default_colours.py | ARCowie28/SyntheticWeather | c1c7c2b0b820d35306891ae52b44cc0240f0323d | [
"BSD-3-Clause"
] | 1 | 2019-09-16T13:37:33.000Z | 2019-09-17T13:23:34.000Z | default_colours.py | ARCowie28/SyntheticWeather | c1c7c2b0b820d35306891ae52b44cc0240f0323d | [
"BSD-3-Clause"
] | 6 | 2019-05-05T15:05:01.000Z | 2019-12-04T15:39:58.000Z | # Declare default colours for the code which calls this script.
# import numpy as np
from numpy import array
# Deep blue.
blue = array((25, 100, 200)) / 255
# Pure f***ing blue.
bluest = array((0, 0, 255)) / 255
# Distinguished looking grey.
grey = array((0.3, 0.3, 0.3))
# Also distinguished but contrasts ... | 25.74359 | 64 | 0.621514 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 465 | 0.463147 |
d11eb59a6a47321994cee5f85b00b5df52bdc914 | 1,840 | py | Python | reverb/reverb_types.py | tfboyd/reverb | 3bd2826f23ededd40003bffc86f01162a0feb334 | [
"Apache-2.0"
] | 2 | 2021-10-30T16:59:48.000Z | 2021-11-17T10:21:17.000Z | reverb/reverb_types.py | tfboyd/reverb | 3bd2826f23ededd40003bffc86f01162a0feb334 | [
"Apache-2.0"
] | null | null | null | reverb/reverb_types.py | tfboyd/reverb | 3bd2826f23ededd40003bffc86f01162a0feb334 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 34.074074 | 103 | 0.778804 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 979 | 0.532065 |
d11ede3c3eb4d35af8cddf5255e4407c0eabdb71 | 4,380 | py | Python | ed2d/shaders.py | explosiveduck/cubix | 16e7a298a83fe53174bda8ec77dfcf6869ed5336 | [
"BSD-2-Clause"
] | 1 | 2015-11-02T02:11:18.000Z | 2015-11-02T02:11:18.000Z | ed2d/shaders.py | explosiveduck/cubix | 16e7a298a83fe53174bda8ec77dfcf6869ed5336 | [
"BSD-2-Clause"
] | 29 | 2015-06-09T19:27:49.000Z | 2016-03-08T06:13:24.000Z | ed2d/shaders.py | explosiveduck/cubix | 16e7a298a83fe53174bda8ec77dfcf6869ed5336 | [
"BSD-2-Clause"
] | null | null | null | from ed2d.opengl import gl, pgl
from ed2d import files
from ed2d import typeutils
from gem import vector
class ShaderBase(object):
def create(self):
self.shader = gl.glCreateShader(self.shaderType)
pgl.glShaderSource(self.shader, self.shaderData)
gl.glCompileShader(self.shader)
st... | 30.84507 | 77 | 0.605936 | 4,263 | 0.973288 | 0 | 0 | 0 | 0 | 0 | 0 | 385 | 0.0879 |
d11f4b63fbf5bd854138ff819170bf1b5bcc07d8 | 1,532 | py | Python | poky/meta/lib/oeqa/sdk/cases/gcc.py | buildlinux/unityos | dcbe232d0589013d77a62c33959d6a69f9bfbc5e | [
"Apache-2.0"
] | 1 | 2020-01-13T13:16:52.000Z | 2020-01-13T13:16:52.000Z | poky/meta/lib/oeqa/sdk/cases/gcc.py | buildlinux/unityos | dcbe232d0589013d77a62c33959d6a69f9bfbc5e | [
"Apache-2.0"
] | 3 | 2019-11-20T02:53:01.000Z | 2019-12-26T03:00:15.000Z | sources/poky/meta/lib/oeqa/sdk/cases/gcc.py | zwg0106/imx-yocto | e378ca25352a59d1ef84ee95f3386b7314f4565b | [
"MIT"
] | null | null | null | import os
import shutil
import unittest
from oeqa.core.utils.path import remove_safe
from oeqa.sdk.case import OESDKTestCase
class GccCompileTest(OESDKTestCase):
td_vars = ['MACHINE']
@classmethod
def setUpClass(self):
files = {'test.c' : self.tc.files_dir, 'test.cpp' : self.tc.files_dir,
... | 34.818182 | 107 | 0.611619 | 1,404 | 0.916449 | 0 | 0 | 560 | 0.365535 | 0 | 0 | 335 | 0.218668 |
d1208d36f83d1a05d8b97f40944b08d56a4cd522 | 338 | py | Python | backend/api/routes/__init__.py | senavs/todo-list | 6476805583d0edbb9df85111cfc799a2144e2c54 | [
"Apache-2.0"
] | null | null | null | backend/api/routes/__init__.py | senavs/todo-list | 6476805583d0edbb9df85111cfc799a2144e2c54 | [
"Apache-2.0"
] | null | null | null | backend/api/routes/__init__.py | senavs/todo-list | 6476805583d0edbb9df85111cfc799a2144e2c54 | [
"Apache-2.0"
] | null | null | null | from fastapi import APIRouter
from . import auth, index, list, task
router = APIRouter()
router.include_router(index.router)
router.include_router(auth.router, prefix='/auth', tags=['Authenticate'])
router.include_router(list.router, prefix='/lists', tags=['Lists'])
router.include_router(task.router, prefix='/lists'... | 30.727273 | 73 | 0.754438 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.150888 |
d12140f39c7a66d081a5359972998bfd95ac1b4b | 5,657 | py | Python | datasets/mnist_data.py | shijack/vae-system | 14506b3b5966162a3502b26dd68d1a77ccbcfb34 | [
"MIT"
] | null | null | null | datasets/mnist_data.py | shijack/vae-system | 14506b3b5966162a3502b26dd68d1a77ccbcfb34 | [
"MIT"
] | null | null | null | datasets/mnist_data.py | shijack/vae-system | 14506b3b5966162a3502b26dd68d1a77ccbcfb34 | [
"MIT"
] | null | null | null | # Some code was borrowed from https://github.com/petewarden/tensorflow_makefile/blob/master/tensorflow/models/image/mnist/convolutional.py
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import gzip
import os
import numpy
import tensorflow as tf
from scipy... | 38.482993 | 138 | 0.705851 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,360 | 0.24041 |
d1214c4589f598426173369d768239200b8619fe | 2,079 | py | Python | module/server/view/login/routes.py | antkrit/project | 89172be482a640fe656c45a1c35ea1242cd98347 | [
"MIT"
] | null | null | null | module/server/view/login/routes.py | antkrit/project | 89172be482a640fe656c45a1c35ea1242cd98347 | [
"MIT"
] | 1 | 2021-05-20T18:15:46.000Z | 2021-05-21T14:27:47.000Z | module/server/view/login/routes.py | antkrit/project | 89172be482a640fe656c45a1c35ea1242cd98347 | [
"MIT"
] | null | null | null | """Define the route of the login form"""
from flask import (
render_template,
redirect,
url_for,
request,
current_app,
session,
flash,
)
from flask_login import current_user, login_user, logout_user
from module.server import messages
from module.server.models.user import User
from module.se... | 34.65 | 117 | 0.64406 | 0 | 0 | 0 | 0 | 1,715 | 0.824916 | 0 | 0 | 765 | 0.367965 |
d12155bf89a126b14c330ae2a6b76778e54cc62a | 1,736 | py | Python | true_coders/urls.py | tanvirtareq/clist | 7be17dc463e838778ef5dd6c6bc48eb09a8d98dd | [
"Apache-2.0"
] | 1 | 2021-11-30T23:00:31.000Z | 2021-11-30T23:00:31.000Z | true_coders/urls.py | tanvirtareq/clist | 7be17dc463e838778ef5dd6c6bc48eb09a8d98dd | [
"Apache-2.0"
] | null | null | null | true_coders/urls.py | tanvirtareq/clist | 7be17dc463e838778ef5dd6c6bc48eb09a8d98dd | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import re_path
from true_coders import views
app_name = 'coder'
urlpatterns = [
re_path(r'^settings/$', views.settings, name='settings'),
re_path(r'^settings/(?P<tab>preferences|social|accounts|filters|notifications|lists)/$',
views.settings,
name='settings'),
... | 54.25 | 96 | 0.641129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 818 | 0.471198 |
d123ae3da1f9bbc3e25f9668062bd9940c2f2120 | 991 | py | Python | inkcut-master/inkcut/device/protocols/debug.py | ilnanny/Inkscape-addons | a30cdde2093fa2da68b90213e057519d0304433f | [
"X11"
] | 3 | 2019-03-08T23:32:29.000Z | 2019-05-11T23:53:46.000Z | inkcut-master/inkcut/device/protocols/debug.py | ilnanny/Inkscape-addons | a30cdde2093fa2da68b90213e057519d0304433f | [
"X11"
] | null | null | null | inkcut-master/inkcut/device/protocols/debug.py | ilnanny/Inkscape-addons | a30cdde2093fa2da68b90213e057519d0304433f | [
"X11"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Created on Oct 23, 2015
@author: jrm
'''
from inkcut.device.plugin import DeviceProtocol
from inkcut.core.utils import async_sleep, log
class DebugProtocol(DeviceProtocol):
""" A protocol that just logs what is called """
def connection_made(self):
log.debug("protocol.conn... | 29.147059 | 69 | 0.619576 | 824 | 0.831483 | 0 | 0 | 0 | 0 | 0 | 0 | 339 | 0.342079 |
d123bf2051577f1b1d94b482d255562a77a61f9a | 1,262 | py | Python | config/qtile/Managers/LayoutManager.py | dat-adi/Dotfiles | 7a541aba2bbdd88736bebc9e82f6921ab4a3e03b | [
"Apache-2.0"
] | 2 | 2021-05-06T15:58:29.000Z | 2021-10-02T14:12:08.000Z | config/qtile/Managers/LayoutManager.py | dat-adi/dotfiles | 7a541aba2bbdd88736bebc9e82f6921ab4a3e03b | [
"Apache-2.0"
] | null | null | null | config/qtile/Managers/LayoutManager.py | dat-adi/dotfiles | 7a541aba2bbdd88736bebc9e82f6921ab4a3e03b | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
from libqtile import layout
def get_layouts():
layout_theme = {
"border_width": 2,
"margin": 8,
"border_focus": "#F0F0F0",
"border_normal": "#1D233F",
}
layouts = [
# layout.Bsp(),
# layout.MonadWide(),
# layout.Tile(**layout_... | 26.291667 | 60 | 0.510301 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 314 | 0.248811 |
d126cd392241e8011737fa6ded3a808ff6d9fb33 | 22,200 | py | Python | x.py | douboer/lianghua | ec55208e7aa5f9435ffe59ffa419a2acdc60eeb4 | [
"Apache-2.0"
] | null | null | null | x.py | douboer/lianghua | ec55208e7aa5f9435ffe59ffa419a2acdc60eeb4 | [
"Apache-2.0"
] | null | null | null | x.py | douboer/lianghua | ec55208e7aa5f9435ffe59ffa419a2acdc60eeb4 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf8 -*-
# version 1.11
import tkinter.messagebox,os
from tkinter import *
from tkinter.ttk import *
from tkinter import Menu
import datetime
import threading
import pickle
import time
import tushare as ts
import pywinauto
import pywinauto.clipboard
import pywinauto.application
NUM_OF_STOCKS = 5 # 自定义... | 36.513158 | 137 | 0.532883 | 20,058 | 0.839247 | 0 | 0 | 1,506 | 0.063013 | 0 | 0 | 4,728 | 0.197824 |
d127426de54b0b22ee00ffd0de5d1aed5a26e875 | 2,519 | py | Python | torchbnn/functional.py | Harry24k/bayesian-neural-network-pytorch | d2272f09e0d08c1abe1f53ce6df56b31494d7020 | [
"MIT"
] | 178 | 2019-12-08T14:46:56.000Z | 2022-03-23T04:12:35.000Z | torchbnn/functional.py | Harry24k/bayesian-neural-network-pytorch | d2272f09e0d08c1abe1f53ce6df56b31494d7020 | [
"MIT"
] | 8 | 2019-11-07T05:45:37.000Z | 2020-12-07T11:07:05.000Z | torchbnn/functional.py | Harry24k/bayesian-neural-network-pytorch | d2272f09e0d08c1abe1f53ce6df56b31494d7020 | [
"MIT"
] | 24 | 2020-02-04T12:32:33.000Z | 2022-03-18T13:13:08.000Z | import math
import torch
from .modules import *
def _kl_loss(mu_0, log_sigma_0, mu_1, log_sigma_1) :
"""
An method for calculating KL divergence between two Normal distribtuion.
Arguments:
mu_0 (Float) : mean of normal distribution.
log_sigma_0 (Float): log(standard deviation of normal di... | 34.986111 | 93 | 0.590711 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 930 | 0.369194 |
d12838004d4065065c15278b26ac7643b7d1e6b3 | 8,553 | py | Python | tests/settings/test_custom_metrics.py | proknow/proknow-python | c4ca0be6f606db655b711d3490febdec9c139570 | [
"MIT"
] | 2 | 2019-03-16T21:41:45.000Z | 2022-02-09T16:01:58.000Z | tests/settings/test_custom_metrics.py | proknow/proknow-python | c4ca0be6f606db655b711d3490febdec9c139570 | [
"MIT"
] | 7 | 2019-02-25T15:04:30.000Z | 2021-12-13T15:15:38.000Z | tests/settings/test_custom_metrics.py | proknow/proknow-python | c4ca0be6f606db655b711d3490febdec9c139570 | [
"MIT"
] | 3 | 2020-07-10T14:18:55.000Z | 2021-09-14T09:47:41.000Z | import pytest
import re
from proknow import Exceptions
def test_create(app, custom_metric_generator):
pk = app.pk
# Verify returned CustomMetricItem
params, custom_metric = custom_metric_generator()
assert custom_metric.name == params["name"]
assert custom_metric.context == params["context"]
... | 35.342975 | 129 | 0.70677 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,433 | 0.167544 |
d12936ab2356f3f48183dc8e8ae9b3d0e4578ebf | 10,086 | py | Python | models/script/attention.py | junkunyuan/CSAC | 70d918ed2fe65a0a503b56d66136032031cd67e4 | [
"MIT"
] | 3 | 2022-01-06T06:42:12.000Z | 2022-01-20T04:00:40.000Z | models/script/attention.py | junkunyuan/CSAC | 70d918ed2fe65a0a503b56d66136032031cd67e4 | [
"MIT"
] | null | null | null | models/script/attention.py | junkunyuan/CSAC | 70d918ed2fe65a0a503b56d66136032031cd67e4 | [
"MIT"
] | null | null | null | import torch
from torch import dtype, nn
import torch.nn.functional as F
class PAM_Module(nn.Module):
def __init__(self, num, sizes,mode=None):
super(PAM_Module, self).__init__()
self.sizes = sizes
self.mode = mode
for i in range(num):
setattr(self, "query" + str(i),
... | 41.506173 | 106 | 0.559984 | 8,751 | 0.867638 | 0 | 0 | 0 | 0 | 0 | 0 | 1,748 | 0.17331 |
d129876e7873140e41030905edf7719f9275b25b | 430 | py | Python | src/bpmn_python/graph/classes/events/start_event_type.py | ToJestKrzysio/ProcessVisualization | 9a359a31816bf1be65e3684a571509e3a2c2c0ac | [
"MIT"
] | null | null | null | src/bpmn_python/graph/classes/events/start_event_type.py | ToJestKrzysio/ProcessVisualization | 9a359a31816bf1be65e3684a571509e3a2c2c0ac | [
"MIT"
] | null | null | null | src/bpmn_python/graph/classes/events/start_event_type.py | ToJestKrzysio/ProcessVisualization | 9a359a31816bf1be65e3684a571509e3a2c2c0ac | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Class used for representing tStartEvent of BPMN 2.0 graph
"""
import graph.classes.events.catch_event_type as catch_event
class StartEvent(catch_event.CatchEvent):
"""
Class used for representing tStartEvent of BPMN 2.0 graph
"""
def __init__(self):
"""
Default cons... | 23.888889 | 74 | 0.683721 | 286 | 0.665116 | 0 | 0 | 0 | 0 | 0 | 0 | 242 | 0.562791 |
d12a04518d215e03a7f4e83338618949672d5216 | 389 | py | Python | euler/p001.py | 2Cubed/ProjectEuler | 1702fbc607816544c28a8f2895a82d234226e48b | [
"MIT"
] | 1 | 2016-06-02T11:25:04.000Z | 2016-06-02T11:25:04.000Z | euler/p001.py | 2Cubed/ProjectEuler | 1702fbc607816544c28a8f2895a82d234226e48b | [
"MIT"
] | null | null | null | euler/p001.py | 2Cubed/ProjectEuler | 1702fbc607816544c28a8f2895a82d234226e48b | [
"MIT"
] | null | null | null | """Solution to Project Euler Problem 1
https://projecteuler.net/problem=1
"""
NUMBERS = 3, 5
MAXIMUM = 1000
def compute(*numbers, maximum=MAXIMUM):
"""Compute the sum of the multiples of `numbers` below `maximum`."""
if not numbers:
numbers = NUMBERS
multiples = tuple(set(range(0, maximum, numb... | 21.611111 | 75 | 0.676093 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.372751 |
d12a4a231179a8246d9be0624c4f9ed8ed7b90e3 | 690 | py | Python | scripts/write_kepler_format.py | 0bLondon/VizFinal | 316240e12fc04b269274b53a3bd0a3412886dccf | [
"MIT"
] | null | null | null | scripts/write_kepler_format.py | 0bLondon/VizFinal | 316240e12fc04b269274b53a3bd0a3412886dccf | [
"MIT"
] | null | null | null | scripts/write_kepler_format.py | 0bLondon/VizFinal | 316240e12fc04b269274b53a3bd0a3412886dccf | [
"MIT"
] | 1 | 2021-01-05T21:40:03.000Z | 2021-01-05T21:40:03.000Z | import csv
input_file = 'output.csv'
output_file = 'kepler.txt'
cols_to_remove = [9]
cols_to_remove = sorted(cols_to_remove, reverse=True)
row_count = 0
with open(input_file, "r") as source:
reader = csv.reader(source)
with open(output_file, "w", newline='') as result:
for row in reader:
res... | 28.75 | 70 | 0.54058 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.126087 |
d12a7191b4c49b6eb3dffbf58c4bda9e9deb59fa | 682 | py | Python | src/python/WMCore/WMBS/MySQL/Locations/ListSites.py | hufnagel/WMCore | b150cc725b68fc1cf8e6e0fa07c826226a4421fa | [
"Apache-2.0"
] | 1 | 2015-02-05T13:43:46.000Z | 2015-02-05T13:43:46.000Z | src/python/WMCore/WMBS/MySQL/Locations/ListSites.py | hufnagel/WMCore | b150cc725b68fc1cf8e6e0fa07c826226a4421fa | [
"Apache-2.0"
] | 1 | 2016-10-13T14:57:35.000Z | 2016-10-13T14:57:35.000Z | src/python/WMCore/WMBS/MySQL/Locations/ListSites.py | hufnagel/WMCore | b150cc725b68fc1cf8e6e0fa07c826226a4421fa | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
_ListSites_
MySQL implementation of Locations.ListSites
"""
__all__ = []
from WMCore.Database.DBFormatter import DBFormatter
import logging
class ListSites(DBFormatter):
sql = "SELECT site_name FROM wmbs_location"
def format(self, results):
if len(results) == 0:
... | 19.485714 | 92 | 0.618768 | 508 | 0.744868 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 0.178886 |
d12cbf73d9dbe8b05ab050d9a56ee79d0f5da6e7 | 1,158 | py | Python | accountant.py | MKTSTK/Runover | 95242345e6a472f7741eba13885fa7b850c79d13 | [
"BSD-3-Clause"
] | 15 | 2015-08-07T19:27:32.000Z | 2019-05-24T03:23:01.000Z | accountant.py | webclinic017/Runover | 95242345e6a472f7741eba13885fa7b850c79d13 | [
"BSD-3-Clause"
] | 1 | 2015-08-08T16:07:00.000Z | 2015-08-08T16:07:00.000Z | accountant.py | webclinic017/Runover | 95242345e6a472f7741eba13885fa7b850c79d13 | [
"BSD-3-Clause"
] | 8 | 2015-08-08T00:38:40.000Z | 2021-11-11T11:32:09.000Z | from inside_market import *
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
# the accountant class can do neat things like
#
# 1) Tally up the total pnl of your trade
# 2) plot equity curves
# 3) other neat stuff down the road, probably
class accountant():
def __init__(... | 25.733333 | 67 | 0.654577 | 872 | 0.753022 | 0 | 0 | 0 | 0 | 0 | 0 | 219 | 0.189119 |
d12f9186081828c736de8dcb09176bf8a7fdf2c8 | 584 | py | Python | src/python/test.py | jdrprod/miniBlock | c233dae5380a851e85d78d297e560833b81cf6b8 | [
"MIT"
] | null | null | null | src/python/test.py | jdrprod/miniBlock | c233dae5380a851e85d78d297e560833b81cf6b8 | [
"MIT"
] | null | null | null | src/python/test.py | jdrprod/miniBlock | c233dae5380a851e85d78d297e560833b81cf6b8 | [
"MIT"
] | null | null | null | from cheater import *
from main import *
# new Chain instance with
# mining difficulty = 4
c = Chain(4)
c.createGenesis()
# simulate transactions
c.addBlock(Block("3$ to Arthur"))
c.addBlock(Block("5$ to Bob"))
c.addBlock(Block("12$ to Jean"))
c.addBlock(Block("7$ to Jake"))
c.addBlock(Block("2$ to Camille"))
c.addBl... | 18.83871 | 40 | 0.693493 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 259 | 0.443493 |
d1308da11d5da22dc10b14287bdad38de1760631 | 1,466 | py | Python | Python3/537.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 854 | 2018-11-09T08:06:16.000Z | 2022-03-31T06:05:53.000Z | Python3/537.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 29 | 2019-06-02T05:02:25.000Z | 2021-11-15T04:09:37.000Z | Python3/537.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 347 | 2018-12-23T01:57:37.000Z | 2022-03-12T14:51:21.000Z | __________________________________________________________________________________________________
sample 24 ms submission
class Solution:
def complexNumberMultiply(self, a: str, b: str) -> str:
A = [int(x) for x in a.replace('i','').split('+')]
B = [int(x) for x in b.replace('i','').split('+')]
... | 36.65 | 98 | 0.527967 | 1,116 | 0.761255 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.034106 |
d131ead143f7ae14b44aa50e156995d7274d1c57 | 3,991 | py | Python | mindwavemobile/MindwaveMobileRawReader.py | martinezmizael/Escribir-con-la-mente | f93456bc2ff817cf0ae808a0f711168f82e142ff | [
"MIT"
] | null | null | null | mindwavemobile/MindwaveMobileRawReader.py | martinezmizael/Escribir-con-la-mente | f93456bc2ff817cf0ae808a0f711168f82e142ff | [
"MIT"
] | null | null | null | mindwavemobile/MindwaveMobileRawReader.py | martinezmizael/Escribir-con-la-mente | f93456bc2ff817cf0ae808a0f711168f82e142ff | [
"MIT"
] | null | null | null | import bluetooth
import time
import textwrap
class MindwaveMobileRawReader:
START_OF_PACKET_BYTE = 0xaa;
def __init__(self, address=None):
self._buffer = [];
self._bufferPosition = 0;
self._isConnected = False;
self._mindwaveMobileAddress = address
def connectToMin... | 38.747573 | 106 | 0.636181 | 3,857 | 0.966424 | 0 | 0 | 0 | 0 | 0 | 0 | 751 | 0.188173 |
d131f783f629cb72883f07af0450c47b4a358d42 | 505 | py | Python | docassemble/InterviewStats/snapshot_statistics.py | BryceStevenWilley/docassemble-InterviewStats | e1225001671f83213841d9cc7748cd1fff0f49c5 | [
"MIT"
] | null | null | null | docassemble/InterviewStats/snapshot_statistics.py | BryceStevenWilley/docassemble-InterviewStats | e1225001671f83213841d9cc7748cd1fff0f49c5 | [
"MIT"
] | 8 | 2021-01-14T00:49:44.000Z | 2022-03-30T13:33:43.000Z | docassemble/InterviewStats/snapshot_statistics.py | BryceStevenWilley/docassemble-InterviewStats | e1225001671f83213841d9cc7748cd1fff0f49c5 | [
"MIT"
] | 1 | 2020-11-30T20:59:53.000Z | 2020-11-30T20:59:53.000Z | from docassemble.base.util import variables_snapshot_connection, user_info
__all__ = ['get_stats']
def get_stats(filename: str):
conn = variables_snapshot_connection()
cur = conn.cursor()
# use a parameterized query to prevent SQL injection
query = "select modtime, data from jsonstorage where filenam... | 29.705882 | 79 | 0.710891 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 0.277228 |
d1340b77da734e63775de7b3f26a9ce848c63723 | 2,160 | py | Python | radicalsdk/radardsp.py | moodoki/radical_sdk | 4438678cf73e156e5058ddb035ec8e5875fca84e | [
"Apache-2.0"
] | 7 | 2021-05-20T01:12:39.000Z | 2021-12-30T12:38:07.000Z | radicalsdk/radardsp.py | moodoki/radical_sdk | 4438678cf73e156e5058ddb035ec8e5875fca84e | [
"Apache-2.0"
] | null | null | null | radicalsdk/radardsp.py | moodoki/radical_sdk | 4438678cf73e156e5058ddb035ec8e5875fca84e | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01_radardsp.ipynb (unless otherwise specified).
__all__ = ['cfar_nms', 'range_azimuth_ca_cfar']
# Cell
import numpy as np
from mmwave import dsp
# Cell
def cfar_nms(cfar_in, beamformed_ra, nhood_size=1):
"""non-maxumim suppression for cfar detections"""
def g... | 32.727273 | 95 | 0.539815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 442 | 0.20463 |
d1367794248b2e3c030b18062325fb8aedea6ff8 | 4,020 | py | Python | src/primaires/perso/commandes/prompt/__init__.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | src/primaires/perso/commandes/prompt/__init__.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | src/primaires/perso/commandes/prompt/__init__.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | # -*-coding:Utf-8 -*
# Copyright (c) 2010 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# lis... | 42.765957 | 79 | 0.732587 | 493 | 0.121728 | 0 | 0 | 0 | 0 | 0 | 0 | 3,567 | 0.880741 |
d13730c1037ff6002b629d64c271d177aacb851b | 908 | py | Python | dyndb2csv.py | donwellus/dyndb2csv | 4f4fcb733818b7afed2b4d1c798a5f97825a233d | [
"Apache-2.0"
] | null | null | null | dyndb2csv.py | donwellus/dyndb2csv | 4f4fcb733818b7afed2b4d1c798a5f97825a233d | [
"Apache-2.0"
] | null | null | null | dyndb2csv.py | donwellus/dyndb2csv | 4f4fcb733818b7afed2b4d1c798a5f97825a233d | [
"Apache-2.0"
] | null | null | null | import click
import json
import csv
import sys
@click.command()
@click.argument('input', type=click.File('rb'))
def cli(input):
"""Dynamodb to CSV
Convert the aws dynamodb output (Scalar types, JSON) to CSV.
\b
Process from stdin:
dyndb2csv -
\b
Process from a file:
dyndb2csv... | 19.319149 | 64 | 0.580396 | 0 | 0 | 0 | 0 | 533 | 0.587004 | 0 | 0 | 242 | 0.26652 |
d13741b5a1723b88af21cde7c9133072b2ca56c6 | 2,370 | py | Python | testing/testing-data-gradient.py | jenfly/atmos | c0a733b78749098d8cc2caaaacee245e6aeeac07 | [
"MIT"
] | 16 | 2015-10-08T06:14:35.000Z | 2020-02-12T02:47:33.000Z | testing/testing-data-gradient.py | jenfly/atmos | c0a733b78749098d8cc2caaaacee245e6aeeac07 | [
"MIT"
] | null | null | null | testing/testing-data-gradient.py | jenfly/atmos | c0a733b78749098d8cc2caaaacee245e6aeeac07 | [
"MIT"
] | 3 | 2018-10-16T07:58:14.000Z | 2021-09-17T06:39:00.000Z | import sys
sys.path.append('/home/jwalker/dynamics/python/atmos-tools')
sys.path.append('/home/jwalker/dynamics/python/atmos-read')
import xray
import numpy as np
from datetime import datetime
import matplotlib.pyplot as plt
import pandas as pd
import atmos as atm
import precipdat
import merra
# ---------------------... | 27.55814 | 72 | 0.645148 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 490 | 0.206751 |
d1376d1e03ff5d7a9167c8134995b7b59da1d297 | 1,686 | py | Python | adventofcode/solutions/y2021/d06.py | andreasbjornstrom/adventofcode-python | 71db65568bf0f327dd56e5e1c7488e356a24f403 | [
"MIT"
] | null | null | null | adventofcode/solutions/y2021/d06.py | andreasbjornstrom/adventofcode-python | 71db65568bf0f327dd56e5e1c7488e356a24f403 | [
"MIT"
] | null | null | null | adventofcode/solutions/y2021/d06.py | andreasbjornstrom/adventofcode-python | 71db65568bf0f327dd56e5e1c7488e356a24f403 | [
"MIT"
] | null | null | null | '''
Solution for day 6 of the 2021 Advent of Code calendar.
Run it with the command `python -m adventofcode run_solution -y 2021 6` from the project root.
'''
import time
from adventofcode.types import Solution
class LanternFish:
def __init__(self, timer_til_fork):
self.timer_til_fork = timer_til_fork
... | 27.193548 | 94 | 0.618624 | 350 | 0.207592 | 0 | 0 | 0 | 0 | 0 | 0 | 503 | 0.298339 |
d1388b41170cb3a74153d7fe1845f6ab7af64949 | 4,938 | py | Python | eval_detector.py | arushi1372/caltech-ee148-spring2021-hw02 | 980ffc277fbe2a8c0874034c40e4014e816d400c | [
"MIT"
] | null | null | null | eval_detector.py | arushi1372/caltech-ee148-spring2021-hw02 | 980ffc277fbe2a8c0874034c40e4014e816d400c | [
"MIT"
] | null | null | null | eval_detector.py | arushi1372/caltech-ee148-spring2021-hw02 | 980ffc277fbe2a8c0874034c40e4014e816d400c | [
"MIT"
] | null | null | null | import os
import json
import numpy as np
import matplotlib.pyplot as plt
def compute_iou(box_1, box_2):
'''
This function takes a pair of bounding boxes and returns intersection-over-
union (IoU) of two bounding boxes.
'''
intersection = 0
tlr1, tlc1, brr1, brc1 = box_1[0], box_1[1], box_1[2], ... | 32.27451 | 116 | 0.632442 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,443 | 0.292224 |
d13a70d1c898cfcc6e99db346677e88b8a15d87e | 4,937 | py | Python | enaml/enaml/wx/wx_widget.py | ContinuumIO/ashiba | a93e7785d1fcf397baeb8a0b687a162a2b2aef3d | [
"BSD-3-Clause"
] | 11 | 2015-03-14T14:30:51.000Z | 2022-03-15T13:01:44.000Z | enaml/wx/wx_widget.py | ContinuumIO/enaml | 15c20b035a73187e8e66fa20a43c3a4372d008bd | [
"BSD-3-Clause-Clear"
] | 3 | 2015-01-31T11:12:56.000Z | 2022-03-14T00:53:25.000Z | enaml/enaml/wx/wx_widget.py | ContinuumIO/ashiba | a93e7785d1fcf397baeb8a0b687a162a2b2aef3d | [
"BSD-3-Clause"
] | 4 | 2015-01-27T01:56:14.000Z | 2021-02-23T07:21:20.000Z | #------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | 29.921212 | 79 | 0.538789 | 4,329 | 0.876848 | 0 | 0 | 0 | 0 | 0 | 0 | 2,037 | 0.412599 |
d13bb185fb284c7a1c5cf8f8b572524463eee700 | 276 | py | Python | duo_universal_auth/apps.py | tonningp/django-duo-universal-auth | 4a7dc91c48e0d3c6b11d2b6eebd9cedd83cd3275 | [
"BSD-3-Clause"
] | 1 | 2021-12-26T21:04:16.000Z | 2021-12-26T21:04:16.000Z | duo_universal_auth/apps.py | tonningp/django-duo-universal-auth | 4a7dc91c48e0d3c6b11d2b6eebd9cedd83cd3275 | [
"BSD-3-Clause"
] | null | null | null | duo_universal_auth/apps.py | tonningp/django-duo-universal-auth | 4a7dc91c48e0d3c6b11d2b6eebd9cedd83cd3275 | [
"BSD-3-Clause"
] | 1 | 2021-12-26T21:29:45.000Z | 2021-12-26T21:29:45.000Z | """
Module to register the Django application.
"""
from django.apps import AppConfig
class DuoUniversalAuthConfig(AppConfig):
"""
The specific AppConfig class to register for the Duo Universal
Authentication application.
"""
name = 'duo_universal_auth'
| 19.714286 | 66 | 0.728261 | 187 | 0.677536 | 0 | 0 | 0 | 0 | 0 | 0 | 180 | 0.652174 |
d13c2225b45393822148acad03a1b68ed0f512f8 | 2,170 | py | Python | metaworld/policies/sawyer_push_wall_v2_policy.py | yiwc/robotics-world | 48efda3a8ea6741b35828b02860f45753252e376 | [
"MIT"
] | 681 | 2019-09-09T19:34:37.000Z | 2022-03-31T12:17:58.000Z | metaworld/policies/sawyer_push_wall_v2_policy.py | yiwc/robotics-world | 48efda3a8ea6741b35828b02860f45753252e376 | [
"MIT"
] | 212 | 2019-09-18T14:43:44.000Z | 2022-03-27T22:21:00.000Z | metaworld/policies/sawyer_push_wall_v2_policy.py | yiwc/robotics-world | 48efda3a8ea6741b35828b02860f45753252e376 | [
"MIT"
] | 157 | 2019-09-12T05:06:05.000Z | 2022-03-29T14:47:24.000Z | import numpy as np
from metaworld.policies.action import Action
from metaworld.policies.policy import Policy, assert_fully_parsed, move
class SawyerPushWallV2Policy(Policy):
@staticmethod
@assert_fully_parsed
def _parse_obs(obs):
return {
'hand_pos': obs[:3],
'unused_1': ... | 33.384615 | 90 | 0.542396 | 2,030 | 0.935484 | 0 | 0 | 1,629 | 0.750691 | 0 | 0 | 464 | 0.213825 |
d13cc1f49508348eb5e8055c36f920d35acf4e17 | 12,634 | py | Python | solum/common/clients.py | dimtruck/solum | 7ec547039ab255052b954a102b9765e068a0f871 | [
"Apache-2.0"
] | null | null | null | solum/common/clients.py | dimtruck/solum | 7ec547039ab255052b954a102b9765e068a0f871 | [
"Apache-2.0"
] | null | null | null | solum/common/clients.py | dimtruck/solum | 7ec547039ab255052b954a102b9765e068a0f871 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 - Rackspace Hosting.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 38.054217 | 79 | 0.593795 | 5,968 | 0.472376 | 0 | 0 | 5,255 | 0.415941 | 0 | 0 | 4,079 | 0.322859 |
d13da41b3a4f220e015d9e442ca5b4d723221a8a | 299 | py | Python | xml_to_text.py | EvanHahn/xml-to-text | 4c064e8df978a9f857045e44b6665ce6a5f6f1af | [
"Unlicense"
] | 1 | 2015-01-23T19:28:56.000Z | 2015-01-23T19:28:56.000Z | xml_to_text.py | EvanHahn/xml-to-text | 4c064e8df978a9f857045e44b6665ce6a5f6f1af | [
"Unlicense"
] | null | null | null | xml_to_text.py | EvanHahn/xml-to-text | 4c064e8df978a9f857045e44b6665ce6a5f6f1af | [
"Unlicense"
] | 1 | 2021-05-26T12:34:59.000Z | 2021-05-26T12:34:59.000Z | #!/usr/bin/env python
from sys import argv
from bs4 import BeautifulSoup
def xml_to_text(file):
return BeautifulSoup(file).get_text()
if __name__ == "__main__":
if len(argv) < 2:
print "What file should I get plain text from?"
exit(1)
print xml_to_text(open(argv[1]))
| 21.357143 | 55 | 0.672241 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.240803 |
d13f8e89e4edf3148661b4734118e0ef97c5a8a6 | 832 | py | Python | lib/exabgp/rib/__init__.py | lochiiconnectivity/exabgp | 2cb8a99af89969ff4b0b5561de6168a18179b704 | [
"BSD-3-Clause"
] | null | null | null | lib/exabgp/rib/__init__.py | lochiiconnectivity/exabgp | 2cb8a99af89969ff4b0b5561de6168a18179b704 | [
"BSD-3-Clause"
] | null | null | null | lib/exabgp/rib/__init__.py | lochiiconnectivity/exabgp | 2cb8a99af89969ff4b0b5561de6168a18179b704 | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
"""
rib/__init__.py
Created by Thomas Mangin on 2010-01-15.
Copyright (c) 2009-2015 Exa Networks. All rights reserved.
"""
from exabgp.rib.store import Store
class RIB (object):
# when we perform a configuration reload using SIGUSR, we must not use the RIB
# without the cache, all the updates pr... | 23.111111 | 79 | 0.716346 | 652 | 0.783654 | 0 | 0 | 0 | 0 | 0 | 0 | 291 | 0.34976 |
d13fa1d7b304be490a8f724e164effbbbcceaf63 | 184 | py | Python | tests/issues/yubikey.py | wjlei1990/radical.saga | de022ea4fb29d95e8acffff8a68aa8648de807d4 | [
"MIT"
] | 12 | 2019-04-13T21:41:45.000Z | 2021-08-03T09:43:25.000Z | tests/issues/yubikey.py | wjlei1990/radical.saga | de022ea4fb29d95e8acffff8a68aa8648de807d4 | [
"MIT"
] | 103 | 2019-04-10T14:23:41.000Z | 2022-03-15T19:43:56.000Z | tests/issues/yubikey.py | wjlei1990/radical.saga | de022ea4fb29d95e8acffff8a68aa8648de807d4 | [
"MIT"
] | 7 | 2019-07-11T07:59:56.000Z | 2022-02-02T22:28:24.000Z |
import radical.saga as saga
c = saga.Context ('ssh')
c.user_id = 'dinesh'
s = saga.Session ()
s.add_context (c)
js = saga.job.Service("lsf+ssh://yellowstone.ucar.edu", session=s)
| 15.333333 | 66 | 0.679348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.244565 |