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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
74c3c58b7c52752273d5091bfab02b92f9e98a85 | 10,549 | py | Python | dgi/code2graph/class_graph_builder.py | konveyor/tackle-data-gravity-insights | 97a3eb6a04a2bca7f7e3422581a8fad055d90c04 | [
"Apache-2.0"
] | 3 | 2022-03-28T20:54:34.000Z | 2022-03-31T15:14:39.000Z | dgi/code2graph/class_graph_builder.py | rofrano/tackle-data-gravity-insights | f734f023dc46ca8e038b5ba8029e5c1177a1d34f | [
"Apache-2.0"
] | 9 | 2022-03-01T13:29:50.000Z | 2022-03-31T13:04:36.000Z | dgi/code2graph/class_graph_builder.py | rofrano/tackle-data-gravity-insights | f734f023dc46ca8e038b5ba8029e5c1177a1d34f | [
"Apache-2.0"
] | 3 | 2022-03-28T14:41:45.000Z | 2022-03-30T19:17:31.000Z | ################################################################################
# Copyright IBM Corporation 2021, 2022
#
# 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.ap... | 40.263359 | 98 | 0.567921 | 9,246 | 0.876481 | 0 | 0 | 151 | 0.014314 | 0 | 0 | 1,952 | 0.185041 |
74c471d1d72ba31b703ea6a15dd25e610bf41cfa | 5,972 | py | Python | evernotecheck.py | scpedicini/evernotecheck | 32663a577d22f2bdb9c9bac9c5f741e40efd18a7 | [
"MIT"
] | null | null | null | evernotecheck.py | scpedicini/evernotecheck | 32663a577d22f2bdb9c9bac9c5f741e40efd18a7 | [
"MIT"
] | null | null | null | evernotecheck.py | scpedicini/evernotecheck | 32663a577d22f2bdb9c9bac9c5f741e40efd18a7 | [
"MIT"
] | null | null | null | import logging
from evernote.api.client import EvernoteClient
from evernote.edam.notestore.ttypes import NoteFilter, NotesMetadataResultSpec
from evernote.edam.error.ttypes import (EDAMSystemException, EDAMErrorCode)
import pickle
import sys
from datetime import datetime
from time import sleep
import os
logger = logg... | 33.550562 | 267 | 0.682853 | 638 | 0.106832 | 0 | 0 | 0 | 0 | 0 | 0 | 1,309 | 0.21919 |
74c5c6595e58e5ebc6c9bd0923ccb47fb28a9fb2 | 3,025 | py | Python | tcfcli/cmds/local/common/options.py | dorasang/tcfcli | a24f14aa5a0281822de580479471bd3e83a8778b | [
"Apache-2.0"
] | 14 | 2019-03-01T09:47:36.000Z | 2019-11-28T01:58:54.000Z | tcfcli/cmds/local/common/options.py | dorasang/tcfcli | a24f14aa5a0281822de580479471bd3e83a8778b | [
"Apache-2.0"
] | 8 | 2019-03-12T10:22:53.000Z | 2020-08-20T08:15:51.000Z | tcfcli/cmds/local/common/options.py | dorasang/tcfcli | a24f14aa5a0281822de580479471bd3e83a8778b | [
"Apache-2.0"
] | 7 | 2019-03-01T09:47:52.000Z | 2020-06-13T12:14:48.000Z | import click
import os
_DEAFULT_TEMPLATE_FILE = 'template.[yaml|yml]'
def get_template_abspath(ctx, param, template_name):
if template_name == _DEAFULT_TEMPLATE_FILE:
template_name = 'template.yaml'
tmp = 'template.yml'
if os.path.exists(tmp):
template_name = tmp
return... | 32.880435 | 125 | 0.551736 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,091 | 0.360661 |
74c605ad56148f8243d56a13d2c1c91bf87be5fb | 1,126 | py | Python | GoPiGo_J/src/server/daemons/server2.py | theplatypus/GoPiGo_Java | 85544c93146d898bf08f0898350a9ef80da6754f | [
"Unlicense",
"MIT"
] | 1 | 2016-01-22T20:35:24.000Z | 2016-01-22T20:35:24.000Z | GoPiGo_J/src/server/daemons/server2.py | theplatypus/GoPiGo_Java | 85544c93146d898bf08f0898350a9ef80da6754f | [
"Unlicense",
"MIT"
] | null | null | null | GoPiGo_J/src/server/daemons/server2.py | theplatypus/GoPiGo_Java | 85544c93146d898bf08f0898350a9ef80da6754f | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/env python
# This is a basic example for a socket server for the GoPiGo.
# This allows the client to connects can be used to respond to the commands and run the GoPiGo
# the socket server is running on Port 5005 on localhost
# Send a single byte command to the server from the client:
#
# fwd #Move forwar... | 31.277778 | 94 | 0.753996 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,026 | 0.91119 |
74c76ee9a4a603fbe963cba6d550995d33315088 | 302 | py | Python | python100/problems/003.py | zerlous/morning-python | 8ef8b5602ece9f74da870f3588ad7c2f734792b3 | [
"MIT"
] | null | null | null | python100/problems/003.py | zerlous/morning-python | 8ef8b5602ece9f74da870f3588ad7c2f734792b3 | [
"MIT"
] | null | null | null | python100/problems/003.py | zerlous/morning-python | 8ef8b5602ece9f74da870f3588ad7c2f734792b3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : zerlous
# @File : 003.py
# @Time : 2019-04-02 23:15
# 一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少?
# x + 100 = m^2 , x + 268 = n^2
# => n^2 - m^2 = 168
# => (m+n)(m-n) = 168
# => 设i = m+n, j = m -n, 则i*j=168
# => m=(i+j)/2, n =(i-j)/2 得i,j均偶数 | 25.166667 | 47 | 0.519868 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 381 | 0.971939 |
74c8da5877fedaee54944d0a1f1f838582ece639 | 2,049 | py | Python | apis/news/query_helper.py | lannguyen0910/SAB | 12c787cf592cb26c2a91829038ad1c2f9bac1f16 | [
"MIT"
] | 3 | 2021-11-03T14:36:53.000Z | 2021-11-18T17:21:28.000Z | apis/news/query_helper.py | lannguyen0910/SAB | 12c787cf592cb26c2a91829038ad1c2f9bac1f16 | [
"MIT"
] | null | null | null | apis/news/query_helper.py | lannguyen0910/SAB | 12c787cf592cb26c2a91829038ad1c2f9bac1f16 | [
"MIT"
] | null | null | null | ERROR_TEXT = "Sources can not be set if country or category is set."
class QueryHelper(object):
def __init__(self, query=None, category=None, country=None,
sources=None, language=None, slack_channel=None):
"""Constructs the query helper object.
Args:
name: string, The... | 49.97561 | 87 | 0.617862 | 1,977 | 0.964861 | 0 | 0 | 0 | 0 | 0 | 0 | 1,543 | 0.75305 |
74c973a8e5ee64795c61fcb8c64b1477242ab749 | 1,666 | py | Python | final_project/accounts/forms.py | W7SP/project_defense | 550152bd82998333444ace099c47feffffb6c3ab | [
"MIT"
] | null | null | null | final_project/accounts/forms.py | W7SP/project_defense | 550152bd82998333444ace099c47feffffb6c3ab | [
"MIT"
] | null | null | null | final_project/accounts/forms.py | W7SP/project_defense | 550152bd82998333444ace099c47feffffb6c3ab | [
"MIT"
] | null | null | null | from django.contrib.auth import forms as auth_forms, get_user_model
from django.core.validators import MinLengthValidator
from final_project.accounts.helpers import BootstrapFormMixin
from final_project.accounts.models import Profile
from django import forms
from final_project.main.validators import validate_only_let... | 29.75 | 76 | 0.67587 | 1,308 | 0.785114 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 0.047419 |
74c9ebcbbf685433e3347e934c9eb9cfdc882fb1 | 1,931 | py | Python | mobile-analytics/visualisations/funnel_plots.py | trangqdo/mobile-analytics | 097bb4596bb11ea186048ba5bc925e84c7fd37cc | [
"Apache-2.0"
] | null | null | null | mobile-analytics/visualisations/funnel_plots.py | trangqdo/mobile-analytics | 097bb4596bb11ea186048ba5bc925e84c7fd37cc | [
"Apache-2.0"
] | null | null | null | mobile-analytics/visualisations/funnel_plots.py | trangqdo/mobile-analytics | 097bb4596bb11ea186048ba5bc925e84c7fd37cc | [
"Apache-2.0"
] | null | null | null | from plotly import graph_objs as go
from stats.funnel import create_funnel_df, group_funnel_dfs
def plot_stacked_funnel(events, steps, col=None, from_date=None, to_date=None, step_interval=0):
"""
Function used for producing a funnel plot
:param events: (DataFrame)
events dataframe
... | 33.293103 | 118 | 0.520974 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 670 | 0.34697 |
74cb877c97af60c6e4b5a8e17a82bc5b28994b1e | 1,016 | py | Python | segregation/tests/test_local_relative_centralization.py | noahbouchier/segregation | 88bd9608251b8bc42eae9265adb7941279b9868c | [
"BSD-3-Clause"
] | 92 | 2019-02-17T02:36:29.000Z | 2022-01-22T04:29:10.000Z | segregation/tests/test_local_relative_centralization.py | noahbouchier/segregation | 88bd9608251b8bc42eae9265adb7941279b9868c | [
"BSD-3-Clause"
] | 128 | 2019-02-22T03:52:40.000Z | 2022-02-28T18:39:01.000Z | segregation/tests/test_local_relative_centralization.py | noahbouchier/segregation | 88bd9608251b8bc42eae9265adb7941279b9868c | [
"BSD-3-Clause"
] | 29 | 2019-02-17T02:36:50.000Z | 2022-03-17T04:15:49.000Z | import unittest
import geopandas as gpd
import numpy as np
from libpysal.examples import load_example
from segregation.local import LocalRelativeCentralization
class Local_Relative_Centralization_Tester(unittest.TestCase):
def test_Local_Relative_Centralization(self):
s_map = gpd.read_file(load_example("... | 29.028571 | 87 | 0.538386 | 803 | 0.790354 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.081693 |
74ce8c8a200f28440567b9bb992acb489cd7d1a9 | 107 | py | Python | office365/sharepoint/utilities/wopi_web_app_properties.py | rikeshtailor/Office365-REST-Python-Client | ca7bfa1b22212137bb4e984c0457632163e89a43 | [
"MIT"
] | 544 | 2016-08-04T17:10:16.000Z | 2022-03-31T07:17:20.000Z | office365/sharepoint/utilities/wopi_web_app_properties.py | rikeshtailor/Office365-REST-Python-Client | ca7bfa1b22212137bb4e984c0457632163e89a43 | [
"MIT"
] | 438 | 2016-10-11T12:24:22.000Z | 2022-03-31T19:30:35.000Z | office365/sharepoint/utilities/wopi_web_app_properties.py | rikeshtailor/Office365-REST-Python-Client | ca7bfa1b22212137bb4e984c0457632163e89a43 | [
"MIT"
] | 202 | 2016-08-22T19:29:40.000Z | 2022-03-30T20:26:15.000Z | from office365.runtime.client_value import ClientValue
class WopiWebAppProperties(ClientValue):
pass
| 17.833333 | 54 | 0.831776 | 49 | 0.457944 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
74cf3cdf2e8551d93b756d1f90473ad3386552cc | 819 | py | Python | python3-ardubus/setup.py | rambo/arDuBUS | d68ec05d75b3f463254039b31c31afec7e752f83 | [
"MIT"
] | 3 | 2016-01-31T21:48:37.000Z | 2021-01-17T00:39:22.000Z | python3-ardubus/setup.py | rambo/arDuBUS | d68ec05d75b3f463254039b31c31afec7e752f83 | [
"MIT"
] | null | null | null | python3-ardubus/setup.py | rambo/arDuBUS | d68ec05d75b3f463254039b31c31afec7e752f83 | [
"MIT"
] | null | null | null | """Packaging script for ardubus"""
import os
import subprocess
import setuptools
GIT_VERSION = 'UNKNOWN'
try:
GIT_VERSION = subprocess.check_output(['git', 'rev-parse', '--verify', '--short', 'HEAD']).decode('ascii').strip()
except subprocess.CalledProcessError:
pass
setuptools.setup(
name='ardubus',
... | 31.5 | 118 | 0.695971 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 305 | 0.372405 |
74cf57d813aedb4d1919443807aec8fd07bf82ec | 6,247 | py | Python | utils/validation.py | gykovacs/ideal_binning_mv | 536ed9f897e5470568b2a2768eb4a119c7df1fff | [
"MIT"
] | null | null | null | utils/validation.py | gykovacs/ideal_binning_mv | 536ed9f897e5470568b2a2768eb4a119c7df1fff | [
"MIT"
] | null | null | null | utils/validation.py | gykovacs/ideal_binning_mv | 536ed9f897e5470568b2a2768eb4a119c7df1fff | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 9 19:49:52 2020
@author: gykovacs
"""
import numpy as np
# dimensionality
n_d = 8
# bins
n_bins = 3
def generate_template():
return np.round(np.random.rand(n_d)*10, decimals=0)
def generate_eqw_binning(t):
t_diff= (np.max(t) - np.min(t... | 19.045732 | 122 | 0.60317 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 343 | 0.054906 |
74cf89eb0f06c514d58868658f9cede0db7a9aaa | 2,210 | py | Python | LeetCode/LC003_bruteForce.py | JeffreyAsuncion/CodingProblems_Python | db71cb46b2579c1c65767a644a0ea989da4fa559 | [
"MIT"
] | null | null | null | LeetCode/LC003_bruteForce.py | JeffreyAsuncion/CodingProblems_Python | db71cb46b2579c1c65767a644a0ea989da4fa559 | [
"MIT"
] | null | null | null | LeetCode/LC003_bruteForce.py | JeffreyAsuncion/CodingProblems_Python | db71cb46b2579c1c65767a644a0ea989da4fa559 | [
"MIT"
] | null | null | null | """
3. Longest Substring Without Repeating Characters
Given a string s,
find the length of the longest substring without repeating characters.
Example 1:
Input: s = "abcabcbb"
Output: 3
Explanation: The answer is "abc", with the length of 3.
Example 2:
Input: s = "bbbbb"
Output: 1
Explanation: The answer is "b", wi... | 25.402299 | 95 | 0.615385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,355 | 0.613122 |
74d068093d0ae6b5a5ba2737ff2398f7a073b853 | 10,913 | py | Python | pattoo/agent.py | palisadoes/pattoo-os | cccf0ddb50a8bb971c0c527b4ea5ef96c6819fac | [
"Apache-2.0"
] | null | null | null | pattoo/agent.py | palisadoes/pattoo-os | cccf0ddb50a8bb971c0c527b4ea5ef96c6819fac | [
"Apache-2.0"
] | null | null | null | pattoo/agent.py | palisadoes/pattoo-os | cccf0ddb50a8bb971c0c527b4ea5ef96c6819fac | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""Pattoo .Agent class.
Description:
This script:
1) Processes a variety of information from agents
2) Posts the data using HTTP to a server listed
in the configuration file
"""
# Standard libraries
import textwrap
import sys
import time
import argparse
import ip... | 24.802273 | 79 | 0.550078 | 8,622 | 0.790067 | 0 | 0 | 0 | 0 | 0 | 0 | 4,931 | 0.451846 |
74d0de2d8da21d05590e9e49b38f27e37b7c316e | 5,359 | py | Python | utils/create_dmg_masks.py | deg4uss3r/xview2-baseline | ae3b63003efe5ffd712a32b0083e044f595f0d3e | [
"BSD-3-Clause"
] | null | null | null | utils/create_dmg_masks.py | deg4uss3r/xview2-baseline | ae3b63003efe5ffd712a32b0083e044f595f0d3e | [
"BSD-3-Clause"
] | null | null | null | utils/create_dmg_masks.py | deg4uss3r/xview2-baseline | ae3b63003efe5ffd712a32b0083e044f595f0d3e | [
"BSD-3-Clause"
] | 1 | 2020-02-13T14:02:26.000Z | 2020-02-13T14:02:26.000Z | #####################################################################################################################################################################
# xView2 ... | 54.131313 | 166 | 0.53816 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,488 | 0.650868 |
74d1fba55e38668fb6474e6c5a72b31dae8639fa | 147 | py | Python | feersum_nlu_util/__init__.py | praekelt/feersum-nlu-api-wrappers | 6580e2bab2c8a764fe868a505330b3fee6029074 | [
"BSD-3-Clause"
] | 9 | 2017-10-10T12:24:23.000Z | 2021-08-18T14:07:51.000Z | feersum_nlu_util/__init__.py | praekelt/feersum-nlu-api-wrappers | 6580e2bab2c8a764fe868a505330b3fee6029074 | [
"BSD-3-Clause"
] | 1 | 2020-12-06T11:03:25.000Z | 2021-04-14T05:21:23.000Z | feersum_nlu_util/__init__.py | praekelt/feersum-nlu-api-wrappers | 6580e2bab2c8a764fe868a505330b3fee6029074 | [
"BSD-3-Clause"
] | 2 | 2019-02-12T08:26:06.000Z | 2022-02-01T09:39:47.000Z | # coding: utf-8
# flake8: noqa
"""
FeersumNLU API Utils
"""
from feersum_nlu_util import transfer
from feersum_nlu_util import image_utils
| 12.25 | 40 | 0.741497 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.421769 |
74d2a0a4ac8360f6243b2b0575a3f4eccdc09c49 | 6,240 | py | Python | generate_playlist.py | renoc/python-rpifo | 8c9fa6eca8129836447f712eb74d660d900a1c84 | [
"0BSD"
] | null | null | null | generate_playlist.py | renoc/python-rpifo | 8c9fa6eca8129836447f712eb74d660d900a1c84 | [
"0BSD"
] | null | null | null | generate_playlist.py | renoc/python-rpifo | 8c9fa6eca8129836447f712eb74d660d900a1c84 | [
"0BSD"
] | null | null | null | from random import randint, shuffle
from time import time
import os
import re
def print_message(message):
print message
class Playlist(object):
MIN_FOLDER_SIZE = 2 # Minmum effective value
dirlist = []
evenly_spaced = True
exclusions = []
extensions = []
filedict = {}
fulldict = ... | 32.842105 | 79 | 0.584776 | 3,531 | 0.565865 | 0 | 0 | 0 | 0 | 0 | 0 | 519 | 0.083173 |
74d30db42e4e43fd40ce31aa9b1b2da29831eebb | 29,244 | py | Python | setup.py | Viech/cynetworkx | 01a37859c67b752392e9e783c949084964eef2cf | [
"BSD-3-Clause"
] | 12 | 2019-07-23T08:07:53.000Z | 2022-03-09T06:13:16.000Z | setup.py | Viech/cynetworkx | 01a37859c67b752392e9e783c949084964eef2cf | [
"BSD-3-Clause"
] | 7 | 2019-08-30T07:00:00.000Z | 2021-12-30T08:02:56.000Z | setup.py | Viech/cynetworkx | 01a37859c67b752392e9e783c949084964eef2cf | [
"BSD-3-Clause"
] | 5 | 2020-10-10T03:40:32.000Z | 2021-11-23T12:28:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup script for cynetworkx
You can install cynetworkx with
python setup.py install
"""
from glob import glob
import os
import sys
if os.path.exists('MANIFEST'):
os.remove('MANIFEST')
from setuptools import setup
from setuptools.extension import Extension
from Cy... | 70.980583 | 155 | 0.752086 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21,605 | 0.738784 |
74d31461bcce0238b0f60063f66c21a9b0d11bb5 | 4,914 | py | Python | tests/master/test_idle_slaves.py | WillChilds-Klein/mistress-mapreduce | c991a502545bd0d3ec4f914cdc63faf6a40e77ae | [
"Apache-2.0"
] | 2 | 2018-12-02T11:10:15.000Z | 2019-02-21T22:24:00.000Z | tests/master/test_idle_slaves.py | WillChilds-Klein/mistress-mapreduce | c991a502545bd0d3ec4f914cdc63faf6a40e77ae | [
"Apache-2.0"
] | 1 | 2019-02-21T22:23:36.000Z | 2019-02-21T22:23:36.000Z | tests/master/test_idle_slaves.py | WillChilds-Klein/mistress-mapreduce | c991a502545bd0d3ec4f914cdc63faf6a40e77ae | [
"Apache-2.0"
] | 3 | 2018-04-26T16:02:10.000Z | 2018-12-02T11:10:16.000Z | # Mrs
# Copyright 2008-2012 Brigham Young University
#
# 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 o... | 26.138298 | 74 | 0.664225 | 182 | 0.037037 | 0 | 0 | 0 | 0 | 0 | 0 | 1,236 | 0.251526 |
74d4070cc857186b6a593db78097011098c36c45 | 2,577 | py | Python | examples/source_TestLibraBot.py | kensoi/libragram | a0119244dceb09edca36b23c95f3e97a28ddae9a | [
"Apache-2.0"
] | null | null | null | examples/source_TestLibraBot.py | kensoi/libragram | a0119244dceb09edca36b23c95f3e97a28ddae9a | [
"Apache-2.0"
] | null | null | null | examples/source_TestLibraBot.py | kensoi/libragram | a0119244dceb09edca36b23c95f3e97a28ddae9a | [
"Apache-2.0"
] | null | null | null | import typing
from libragram import librabot
from libragram.objects.decorators import callback
from libragram.objects.filters import *
bot = librabot(token = "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11", trust_env=True)
class NotCommand(Filter):
def __init__(self, commands: typing.Union[list, set]):
self... | 28.318681 | 104 | 0.668607 | 418 | 0.162016 | 0 | 0 | 1,884 | 0.730233 | 1,680 | 0.651163 | 538 | 0.208527 |
74d43131a7fc8558fde515471cde4f6a43cbcff0 | 4,542 | py | Python | utils.py | brain-bzh/videoannotation | d75d3261967a134854a16956fea602cad51949a2 | [
"MIT"
] | 3 | 2020-02-19T09:54:27.000Z | 2020-10-13T14:02:28.000Z | utils.py | courtois-neuromod/videoannotation | d75d3261967a134854a16956fea602cad51949a2 | [
"MIT"
] | null | null | null | utils.py | courtois-neuromod/videoannotation | d75d3261967a134854a16956fea602cad51949a2 | [
"MIT"
] | 2 | 2020-03-13T12:23:13.000Z | 2021-02-01T16:14:04.000Z | ## Author : Nicolas Farrugia, February 2020
from torchvision.models.detection import fasterrcnn_resnet50_fpn
import torch
from torchvision.io import read_video,read_video_timestamps
import matplotlib.patches as patches
from matplotlib import pyplot as plt
import datetime
import os
def convert_Audio(mediaFile, o... | 31.985915 | 150 | 0.627257 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,518 | 0.333993 |
74d545645521efaf64601d79b9a3ec56f365eb34 | 922 | py | Python | cutterdrcov_plugin/extras.py | Semnodime/CutterDRcov | 7e2efd041662128aaba54dfa6230bedfca36e6fd | [
"MIT"
] | 52 | 2019-03-24T20:33:46.000Z | 2021-11-22T00:21:08.000Z | cutterdrcov_plugin/extras.py | Semnodime/CutterDRcov | 7e2efd041662128aaba54dfa6230bedfca36e6fd | [
"MIT"
] | 8 | 2019-03-24T13:38:08.000Z | 2021-12-13T21:19:59.000Z | cutterdrcov_plugin/extras.py | Semnodime/CutterDRcov | 7e2efd041662128aaba54dfa6230bedfca36e6fd | [
"MIT"
] | 10 | 2019-03-24T14:07:43.000Z | 2021-12-07T08:24:30.000Z | import ntpath
def hex_pad(num, pad):
return "{0:#0{1}x}".format(num, pad + 2)
# https://stackoverflow.com/questions/8384737/extract-file-name-from-path-no-matter-what-the-os-path-format
# cuz windows sucks :( .. hard
def file_name(path):
# There's one caveat: Linux filenames may contain backslashes. So on linu... | 46.1 | 107 | 0.715835 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 710 | 0.770065 |
74d59e48d760c2bdd824f63462307dcc9124fac9 | 131 | py | Python | tfidf_matcher/__init__.py | stungkit/tfidf_matcher | 24182504d21f1eb978839b700f1c402c6288df2f | [
"MIT"
] | 13 | 2020-02-24T18:29:15.000Z | 2021-12-28T09:41:35.000Z | tfidf_matcher/__init__.py | stungkit/tfidf_matcher | 24182504d21f1eb978839b700f1c402c6288df2f | [
"MIT"
] | null | null | null | tfidf_matcher/__init__.py | stungkit/tfidf_matcher | 24182504d21f1eb978839b700f1c402c6288df2f | [
"MIT"
] | 3 | 2020-07-21T04:32:45.000Z | 2021-10-21T11:00:56.000Z | # AUTHOR: Louis Tsiattalou
# DESCRIPTION: Init for tfidf_matcher package.
from .ngrams import ngrams
from .matcher import matcher
| 21.833333 | 46 | 0.801527 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.549618 |
74d5aa0d303e7bb713fa63255c91d0a79ff9c4cc | 17,910 | py | Python | era5dataset/FrontDataset.py | stnie/FrontDetection | 742ebf9619dcde40d42891073739945a05631ea3 | [
"MIT"
] | null | null | null | era5dataset/FrontDataset.py | stnie/FrontDetection | 742ebf9619dcde40d42891073739945a05631ea3 | [
"MIT"
] | null | null | null | era5dataset/FrontDataset.py | stnie/FrontDetection | 742ebf9619dcde40d42891073739945a05631ea3 | [
"MIT"
] | 1 | 2022-01-17T04:58:10.000Z | 2022-01-17T04:58:10.000Z | from typing import final
import numpy as np
import torch
import os
import time
from datetime import datetime
import random
import numbers
from torch.utils.data import Dataset
from .ERA5Reader.readNetCDF import LatTokmPerLon
from .EraExtractors import DefaultEraExtractor
def labelnameToDataname(filename):
retur... | 46.884817 | 365 | 0.599107 | 17,328 | 0.967504 | 0 | 0 | 0 | 0 | 0 | 0 | 3,458 | 0.193076 |
74d7b0958d8d2379fabfb2fe33a6017490b1f91e | 2,865 | py | Python | packages/mccomponents/tests/mccomponents/sample/kernel-orientation/kernelorientation_TestCase.py | mcvine/mcvine | 42232534b0c6af729628009bed165cd7d833789d | [
"BSD-3-Clause"
] | 5 | 2017-01-16T03:59:47.000Z | 2020-06-23T02:54:19.000Z | packages/mccomponents/tests/mccomponents/sample/kernel-orientation/kernelorientation_TestCase.py | mcvine/mcvine | 42232534b0c6af729628009bed165cd7d833789d | [
"BSD-3-Clause"
] | 293 | 2015-10-29T17:45:52.000Z | 2022-01-07T16:31:09.000Z | packages/mccomponents/tests/mccomponents/sample/kernel-orientation/kernelorientation_TestCase.py | mcvine/mcvine | 42232534b0c6af729628009bed165cd7d833789d | [
"BSD-3-Clause"
] | 1 | 2019-05-25T00:53:31.000Z | 2019-05-25T00:53:31.000Z | #!/usr/bin/env python
#
# Jiao Lin <jiao.lin@gmail.com
"""
This test check the "orientation" parameter of kernels.
* Sub-kernels in a "KernelContainer" have the parameter "orientation"
to specify its orientation relative to its parent kernel.
* The root level KernelContainer always has the same coordinate system
... | 27.285714 | 76 | 0.610471 | 1,392 | 0.485864 | 0 | 0 | 0 | 0 | 0 | 0 | 1,555 | 0.542757 |
74d7f5258c12f0959a81cebaa0a5b91827535d65 | 27,239 | py | Python | python-modules/robcoewminterface/robcoewminterface/ewm.py | yschiebelhut/ewm-cloud-robotics | bdf3a6c13850d266b70168912494300c32d4d803 | [
"Apache-2.0"
] | 25 | 2019-07-31T12:50:33.000Z | 2022-01-11T15:53:40.000Z | python-modules/robcoewminterface/robcoewminterface/ewm.py | yschiebelhut/ewm-cloud-robotics | bdf3a6c13850d266b70168912494300c32d4d803 | [
"Apache-2.0"
] | 10 | 2019-07-11T13:12:12.000Z | 2022-03-15T15:46:58.000Z | python-modules/robcoewminterface/robcoewminterface/ewm.py | isabella232/ewm-cloud-robotics | 8210843df323379ded92ec14ec73b1f3ef6b2f41 | [
"Apache-2.0"
] | 23 | 2019-08-07T21:23:38.000Z | 2022-03-08T00:16:10.000Z | #!/usr/bin/env python3
# encoding: utf-8
#
# Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
#
# This file is part of ewm-cloud-robotics
# (see https://github.com/SAP/ewm-cloud-robotics).
#
# This file is licensed under the Apache Software License, v. 2 except as noted
# otherwise in the LIC... | 33.921544 | 98 | 0.598003 | 26,050 | 0.956349 | 0 | 0 | 0 | 0 | 0 | 0 | 9,519 | 0.349462 |
74d9d4320921729eea09ee6fc647c058abfb15da | 71 | py | Python | pm4pymdl/util/parquet_importer/parameters.py | dorian1000/pm4py-mdl | 71e0c2425abb183da293a58d31e25e50137c774f | [
"MIT"
] | 5 | 2021-01-31T22:45:29.000Z | 2022-02-22T14:26:06.000Z | pm4pymdl/util/parquet_importer/parameters.py | Javert899/pm4py-mdl | 4cc875999100f3f1ad60b925a20e40cf52337757 | [
"MIT"
] | 3 | 2021-07-07T15:32:55.000Z | 2021-07-07T16:15:36.000Z | pm4pymdl/util/parquet_importer/parameters.py | dorian1000/pm4py-mdl | 71e0c2425abb183da293a58d31e25e50137c774f | [
"MIT"
] | 9 | 2020-09-23T15:34:11.000Z | 2022-03-17T09:15:40.000Z | from enum import Enum
class Parameters(Enum):
COLUMNS = "columns"
| 14.2 | 23 | 0.71831 | 47 | 0.661972 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.126761 |
74dbc6e6353172f4c10b84fea774baef4a531397 | 95 | py | Python | src/sementeira/iii_controllers/pesquisar_pessoa.py | torraodocerrado/sementeira | 962d15bef63a73493b8cf29a22b656f19aa161ff | [
"Apache-2.0"
] | 2 | 2021-02-25T23:52:40.000Z | 2021-02-25T23:52:42.000Z | src/sementeira/iii_controllers/pesquisar_pessoa.py | torraodocerrado/sementeira | 962d15bef63a73493b8cf29a22b656f19aa161ff | [
"Apache-2.0"
] | null | null | null | src/sementeira/iii_controllers/pesquisar_pessoa.py | torraodocerrado/sementeira | 962d15bef63a73493b8cf29a22b656f19aa161ff | [
"Apache-2.0"
] | null | null | null | from .abstract_query import AbstractQuery
class PesquisarPessoa(AbstractQuery):
pass
| 15.833333 | 41 | 0.778947 | 46 | 0.484211 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
74dbf3662176f3c18f639a38531d9a01acbedb79 | 632 | py | Python | time_struct.py | Kalpavrikshika/python_modules | 9f338ab006dd5653fd7f65ff253bc50e0fd61fc6 | [
"Apache-2.0"
] | 1 | 2018-07-02T03:37:03.000Z | 2018-07-02T03:37:03.000Z | time_struct.py | Kalpavrikshika/python_modules | 9f338ab006dd5653fd7f65ff253bc50e0fd61fc6 | [
"Apache-2.0"
] | null | null | null | time_struct.py | Kalpavrikshika/python_modules | 9f338ab006dd5653fd7f65ff253bc50e0fd61fc6 | [
"Apache-2.0"
] | null | null | null | #gmtime() returns the current time in UTC
#localtime() returns the current time with the current time zone
#struct_time converts to f.p representation
import time
def show_struct(s):
print(' tm_year:', s.tm_year)
print(' tm_mon:', s.tm_mon)
print(' tm_mday:', s.tm_mday)
print(' tm_hour:', s.tm_hour)
... | 30.095238 | 64 | 0.677215 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 278 | 0.439873 |
74dd569b79e52382362c820740fae840ef4bfce6 | 4,121 | py | Python | pyflowline/mesh/tin/create_tin_mesh.py | changliao1025/pyflowline | fb8677c5ebb3d0db8638f7fcc495ffb97376e00f | [
"Unlicense"
] | 4 | 2022-03-23T12:10:20.000Z | 2022-03-29T13:41:16.000Z | pyflowline/mesh/tin/create_tin_mesh.py | changliao1025/pyflowline | fb8677c5ebb3d0db8638f7fcc495ffb97376e00f | [
"Unlicense"
] | 1 | 2022-03-24T16:08:35.000Z | 2022-03-24T16:08:35.000Z | pyflowline/mesh/tin/create_tin_mesh.py | changliao1025/pyflowline | fb8677c5ebb3d0db8638f7fcc495ffb97376e00f | [
"Unlicense"
] | null | null | null | import os, sys
import numpy as np
from osgeo import ogr
from pyflowline.classes.tin import pytin
from pyflowline.formats.convert_coordinates import convert_pcs_coordinates_to_cell
def create_tin_mesh(dX_left_in, dY_bot_in, dResolution_meter_in, ncolumn_in, nrow_in,
sFilename_output_in, sFilename_spatial_reference_... | 29.435714 | 92 | 0.499151 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.089541 |
74ddd9005216a50508d6244b7fa925e4745d61c6 | 1,046 | py | Python | lecturePractice/coordinate.py | serook/mit_edx_i2_cs_python | 34cb08c6f4c5fb0a951d91cbd782f24a76e2479c | [
"Apache-2.0"
] | 1 | 2021-02-17T02:17:29.000Z | 2021-02-17T02:17:29.000Z | lecturePractice/coordinate.py | serook/mit_edx_i2_cs_python | 34cb08c6f4c5fb0a951d91cbd782f24a76e2479c | [
"Apache-2.0"
] | null | null | null | lecturePractice/coordinate.py | serook/mit_edx_i2_cs_python | 34cb08c6f4c5fb0a951d91cbd782f24a76e2479c | [
"Apache-2.0"
] | 1 | 2021-02-17T02:17:31.000Z | 2021-02-17T02:17:31.000Z | class Coordinate(object):
def __init__(self, x, y):
"""
:rtype: object
"""
self.x = x
self.y = y
def getX(self):
# Getter method for a Coordinate object's x coordinate.
# Getter methods are better practice than just accessing an attribute directly
... | 24.325581 | 86 | 0.577438 | 974 | 0.931166 | 0 | 0 | 112 | 0.107075 | 0 | 0 | 411 | 0.392925 |
74dfa0968b1a584e0d2faaacfbe4171a4e652fc1 | 1,415 | py | Python | 450.Delete-Node-in-a-BST.py | mickey0524/leetcode | 6bedeb6ff29b02a97178cca464c5fd639951801f | [
"MIT"
] | 18 | 2018-07-14T12:45:37.000Z | 2022-03-26T14:51:04.000Z | 450.Delete-Node-in-a-BST.py | mickey0524/leetcode | 6bedeb6ff29b02a97178cca464c5fd639951801f | [
"MIT"
] | null | null | null | 450.Delete-Node-in-a-BST.py | mickey0524/leetcode | 6bedeb6ff29b02a97178cca464c5fd639951801f | [
"MIT"
] | 3 | 2019-05-29T04:09:22.000Z | 2021-06-07T23:37:46.000Z | # https://leetcode.com/problems/delete-node-in-a-bst/
#
# algorithms
# Medium (38.78%)
# Total Accepted: 52,907
# Total Submissions: 136,417
# beats 93.27% of python submissions
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = ... | 23.983051 | 53 | 0.504594 | 1,060 | 0.749117 | 0 | 0 | 0 | 0 | 0 | 0 | 430 | 0.303887 |
74e04283616bdcecdb6e7f34d9657947a999aff3 | 8,407 | py | Python | tests/components/test_tasks.py | jbenden/pipeline | 43c5196e466324007cf6e2e173d4610102d6a838 | [
"MIT"
] | null | null | null | tests/components/test_tasks.py | jbenden/pipeline | 43c5196e466324007cf6e2e173d4610102d6a838 | [
"MIT"
] | null | null | null | tests/components/test_tasks.py | jbenden/pipeline | 43c5196e466324007cf6e2e173d4610102d6a838 | [
"MIT"
] | null | null | null | """Testing of class Tasks."""
# pylint: disable=no-self-use, invalid-name
import unittest
from hamcrest import assert_that, equal_to
from spline.components.tasks import Tasks, worker
from spline.components.hooks import Hooks
from spline.components.config import ApplicationOptions
from spline.pipeline import PipelineDa... | 43.559585 | 104 | 0.569406 | 8,078 | 0.960866 | 0 | 0 | 0 | 0 | 0 | 0 | 2,356 | 0.280243 |
74e0e926c6c1b0dd7463e03c1ecc0a04002c96d2 | 9,119 | py | Python | src/utils/stalkMarketGraphs.py | amadea-system/StalkMarketBot | dc43e496e49361fe75ce9b94486981e134edc39e | [
"Apache-2.0"
] | null | null | null | src/utils/stalkMarketGraphs.py | amadea-system/StalkMarketBot | dc43e496e49361fe75ce9b94486981e134edc39e | [
"Apache-2.0"
] | null | null | null | src/utils/stalkMarketGraphs.py | amadea-system/StalkMarketBot | dc43e496e49361fe75ce9b94486981e134edc39e | [
"Apache-2.0"
] | null | null | null | """
Graphing code for Stalk Market Predictions
Part of Stalk Market Bot.
"""
import logging
from io import BytesIO
from typing import TYPE_CHECKING, Optional, Dict, List, Union, Tuple, NamedTuple, Any
import matplotlib.pyplot as plt
from scipy.interpolate import Akima1DInterpolator, pchip_interpolate
import numpy as... | 33.40293 | 160 | 0.605768 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,643 | 0.509157 |
74e246baa4ba88b3c44d649fb3735c42f268b166 | 2,719 | py | Python | addr/parser.py | euske/osmtools | 581da9129f489cb57763578127ead42fa43b5c1f | [
"MIT"
] | null | null | null | addr/parser.py | euske/osmtools | 581da9129f489cb57763578127ead42fa43b5c1f | [
"MIT"
] | null | null | null | addr/parser.py | euske/osmtools | 581da9129f489cb57763578127ead42fa43b5c1f | [
"MIT"
] | 3 | 2015-12-27T22:13:40.000Z | 2019-12-23T14:34:54.000Z | #!/usr/bin/env python
import sys
import xml.parsers.expat
## Parser
##
class Parser(object):
def __init__(self):
self.pos = {}
self.name = {}
self._state = 0
self._expat = xml.parsers.expat.ParserCreate()
self._expat.StartElementHandler = self._start_element
s... | 28.030928 | 70 | 0.515631 | 1,954 | 0.718647 | 139 | 0.051122 | 0 | 0 | 0 | 0 | 295 | 0.108496 |
74e275ec0fee421cce4e54186df885cf8877867b | 83 | py | Python | graphene_django/forms/types.py | mebel-akvareli/graphene-django | 23008ad22094f3e7b8fb26b73811ce49b20cca25 | [
"MIT"
] | 4,038 | 2016-09-18T01:45:22.000Z | 2022-03-31T01:06:57.000Z | graphene_django/forms/types.py | mebel-akvareli/graphene-django | 23008ad22094f3e7b8fb26b73811ce49b20cca25 | [
"MIT"
] | 1,104 | 2016-09-19T20:10:22.000Z | 2022-03-30T17:37:46.000Z | graphene_django/forms/types.py | mebel-akvareli/graphene-django | 23008ad22094f3e7b8fb26b73811ce49b20cca25 | [
"MIT"
] | 791 | 2016-09-18T13:48:11.000Z | 2022-03-29T08:32:06.000Z | from ..types import ErrorType # noqa Import ErrorType for backwards compatability
| 41.5 | 82 | 0.819277 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.614458 |
74e37ad87a05efcc33dc8d935bf247558d91a19e | 434 | py | Python | django_project/stocks/models.py | justinekang/Athena_Stocks | 024826b7cf1bac78c570824b884a3310e5a8120e | [
"MIT"
] | 1 | 2021-09-18T19:49:46.000Z | 2021-09-18T19:49:46.000Z | django_project/stocks/models.py | webclinic017/Athena_Stocks | 548a7ee40e41542b436753ff79f9a46c48312234 | [
"MIT"
] | 23 | 2021-07-06T22:27:47.000Z | 2021-08-13T21:34:55.000Z | django_project/stocks/models.py | webclinic017/Athena_Stocks | 548a7ee40e41542b436753ff79f9a46c48312234 | [
"MIT"
] | 11 | 2021-07-11T05:04:22.000Z | 2021-09-18T19:49:43.000Z | from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
# Create your models here.
#inspired by https://docs.djangoproject.com/en/3.2/topics/db/models/
class Fav_Stocks(models.Model):
user = models.CharField(max_length=100)
stocks = models.TextField()
date... | 36.166667 | 68 | 0.774194 | 229 | 0.52765 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 0.21659 |
74e3c847b45abe7dd310f46f2b20094db76be087 | 9,934 | py | Python | tests/test_functions.py | Qfabiolous/QuanGuru | 285ca44ae857cc61337f73ea2eb600f485a09e32 | [
"BSD-3-Clause"
] | 9 | 2021-05-23T06:30:45.000Z | 2021-12-27T13:33:54.000Z | tests/test_functions.py | cahitkargi/QuanGuru | 9b5c94465cd58bc32f6ff845f29dfdec7e0f9075 | [
"BSD-3-Clause"
] | 26 | 2022-03-18T02:40:54.000Z | 2022-03-25T07:00:25.000Z | tests/test_functions.py | cahitkargi/QuanGuru | 9b5c94465cd58bc32f6ff845f29dfdec7e0f9075 | [
"BSD-3-Clause"
] | 5 | 2021-05-23T06:30:24.000Z | 2022-02-04T02:40:08.000Z | import numpy as np
import pytest
from quanguru.QuantumToolbox import linearAlgebra as la #pylint: disable=import-error
from quanguru.QuantumToolbox import operators as ops #pylint: disable=import-error
from quanguru.QuantumToolbox import functions as fns #pylint: disable=import-error
#testCase = collections.namedtuple(... | 58.781065 | 118 | 0.649487 | 0 | 0 | 0 | 0 | 6,298 | 0.633984 | 0 | 0 | 1,890 | 0.190256 |
74e527a7d122c6ecc18ce4d006746f0a16e5cb57 | 702 | py | Python | src/big_torch/models/shared.py | Denchidlo/big-torch | f5a65e6216e46e6d4fe98670c52618e4cccc8163 | [
"MIT"
] | null | null | null | src/big_torch/models/shared.py | Denchidlo/big-torch | f5a65e6216e46e6d4fe98670c52618e4cccc8163 | [
"MIT"
] | 1 | 2021-11-21T13:11:31.000Z | 2021-11-22T00:18:29.000Z | src/big_torch/models/shared.py | Denchidlo/big-torch | f5a65e6216e46e6d4fe98670c52618e4cccc8163 | [
"MIT"
] | null | null | null | import multiprocessing as mp
POOL = None
def open_pool_session(n_jobs):
global POOL
POOL = mp.Pool(n_jobs).__enter__()
def close_pool_session():
global POOL
POOL.__exit__(None, None, None)
POOL = None
class BasicModelParams:
def __init__(self, layers) -> None:
self.layers = layers... | 21.9375 | 79 | 0.656695 | 473 | 0.673789 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
74e8211474a71b34bfa3a7500bf5a3ef7c8f9bf0 | 700 | py | Python | 2020/day09/two.py | geberl/advent-of-code | 152ac94676830ac920bf06a1a3f1aa88377cd775 | [
"MIT"
] | null | null | null | 2020/day09/two.py | geberl/advent-of-code | 152ac94676830ac920bf06a1a3f1aa88377cd775 | [
"MIT"
] | null | null | null | 2020/day09/two.py | geberl/advent-of-code | 152ac94676830ac920bf06a1a3f1aa88377cd775 | [
"MIT"
] | null | null | null | TARGET = 776203571
data = []
with open("input.txt") as file_handler:
for n, line in enumerate(file_handler):
data.append(int(line.strip()))
def contiguous_sum(index):
c_sum = 0
for i in range(index, len(data)):
c_sum += data[i]
if c_sum == TARGET:
return True, i
... | 24.137931 | 57 | 0.594286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.037143 |
74e8c675fdd045baa869a7b1fb7f3e6afa25b115 | 4,641 | py | Python | week05/hw5p1.py | taoyichen/CS110-Assignments-Python | f2e4e485c820b835981e2e4b8bd0a26cc31cfe73 | [
"MIT"
] | null | null | null | week05/hw5p1.py | taoyichen/CS110-Assignments-Python | f2e4e485c820b835981e2e4b8bd0a26cc31cfe73 | [
"MIT"
] | null | null | null | week05/hw5p1.py | taoyichen/CS110-Assignments-Python | f2e4e485c820b835981e2e4b8bd0a26cc31cfe73 | [
"MIT"
] | 1 | 2020-06-06T08:21:18.000Z | 2020-06-06T08:21:18.000Z | import package_test
from package_test import hw5p2
#import package_test.hw5p2
#package_test.hw5p2.main()
hw5p2.main()
"""
'''
TAO YICHEN
ytao15@binghamton.edu
Lab section: B56
CA name: Paul Maino
Assignment #5 Part 1
Phone: 6079532749
'''
'''
RESTATEMENT:
Display tax for single and married filers given set of incomes... | 31.571429 | 78 | 0.716009 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,574 | 0.985563 |
74e8fba391102d86316280011dd925cbf3994183 | 736 | py | Python | lists.py | RocqJones/python-starter-reference | 0fa4d4ed81aea8cbad1a3f19ff0bbae99ace01fd | [
"MIT"
] | null | null | null | lists.py | RocqJones/python-starter-reference | 0fa4d4ed81aea8cbad1a3f19ff0bbae99ace01fd | [
"MIT"
] | null | null | null | lists.py | RocqJones/python-starter-reference | 0fa4d4ed81aea8cbad1a3f19ff0bbae99ace01fd | [
"MIT"
] | 1 | 2020-07-08T08:26:19.000Z | 2020-07-08T08:26:19.000Z | # A List is a collection which is ordered and changeable. Allows duplicate members.
# Create a list
numbers = [1,2,3,4,5]
fruits = ['Apples', 'Oranges', 'Grapes', 'Peas']
# use a constructor
#numbers2 = list((5,6,7,8,9,10))
print(numbers)
# Get a value
print(fruits[2])
# Change a value
fruits[0] = 'Blueberries'
pri... | 16 | 83 | 0.716033 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 374 | 0.508152 |
74ebb2dd053188f1723fc6d317273465d1b9d65c | 8,096 | py | Python | visualization_and_test/evaluate_prototypes.py | jodaiber/semantic_compound_splitting | 6b6b8aea9c320ef3b26dca4d8345fb9a08950a42 | [
"Apache-2.0"
] | 17 | 2015-10-14T09:44:38.000Z | 2021-02-19T16:45:32.000Z | visualization_and_test/evaluate_prototypes.py | jodaiber/semantic_compound_splitting | 6b6b8aea9c320ef3b26dca4d8345fb9a08950a42 | [
"Apache-2.0"
] | null | null | null | visualization_and_test/evaluate_prototypes.py | jodaiber/semantic_compound_splitting | 6b6b8aea9c320ef3b26dca4d8345fb9a08950a42 | [
"Apache-2.0"
] | 8 | 2015-09-07T16:29:37.000Z | 2020-08-08T05:43:12.000Z | __author__ = 'rwechsler'
import datetime
import time
import cPickle as pickle
from annoy import AnnoyIndex
import gensim
import argparse
import numpy as np
import sys
import random
from scipy import spatial
import multiprocessing as mp
from collections import defaultdict
import codecs
def timestamp():
return datet... | 37.137615 | 217 | 0.700099 | 0 | 0 | 228 | 0.028162 | 0 | 0 | 0 | 0 | 974 | 0.120306 |
74ede2de89dc2c3fd6b6dea5649ebb972c3b175a | 2,722 | py | Python | generated-libraries/python/netapp/disk/storage_ssd_info.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | 2 | 2017-03-28T15:31:26.000Z | 2018-08-16T22:15:18.000Z | generated-libraries/python/netapp/disk/storage_ssd_info.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | generated-libraries/python/netapp/disk/storage_ssd_info.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | from netapp.netapp_object import NetAppObject
class StorageSsdInfo(NetAppObject):
"""
Storage info block for solid-state storage devices.
"""
_percent_spares_consumed = None
@property
def percent_spares_consumed(self):
"""
Percentage of device spare blocks that have been us... | 36.293333 | 104 | 0.653196 | 2,674 | 0.982366 | 0 | 0 | 2,018 | 0.741367 | 0 | 0 | 1,244 | 0.457017 |
74f0d0e289d375ba55597c4169366e6d54f28cd5 | 1,544 | py | Python | team_builder/accounts/models.py | taylorculver/Django_Team_Builder | 62a9e6a37c435876206697f982f66089e2e82b35 | [
"Unlicense"
] | null | null | null | team_builder/accounts/models.py | taylorculver/Django_Team_Builder | 62a9e6a37c435876206697f982f66089e2e82b35 | [
"Unlicense"
] | 7 | 2018-08-08T18:42:36.000Z | 2018-10-01T18:46:40.000Z | team_builder/accounts/models.py | taylorculver/Django_Team_Builder | 62a9e6a37c435876206697f982f66089e2e82b35 | [
"Unlicense"
] | null | null | null | from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
class Profile(models.Model):
"""
Model for user-created Profile
https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-... | 24.507937 | 98 | 0.687824 | 1,099 | 0.711788 | 0 | 0 | 273 | 0.176813 | 0 | 0 | 257 | 0.166451 |
74f235f44770ebb4082a9f693309b40e2e0bc8f1 | 3,907 | py | Python | PIDKiller.py | godoyp/PIDKiller | 94ae8b77b5e5bca0552dee4ecaa1c1da16d3b39e | [
"MIT"
] | null | null | null | PIDKiller.py | godoyp/PIDKiller | 94ae8b77b5e5bca0552dee4ecaa1c1da16d3b39e | [
"MIT"
] | null | null | null | PIDKiller.py | godoyp/PIDKiller | 94ae8b77b5e5bca0552dee4ecaa1c1da16d3b39e | [
"MIT"
] | null | null | null | # Modulos
import PySimpleGUI as Sg
import wmi
from smb.SMBConnection import SMBConnection
from configparser import ConfigParser
from time import sleep
import sys
from multiprocessing import Process, freeze_support
# Variavel de controle do While (sair = 1 finaliza o programa)
sair = 0
# Carrega o arquivo ... | 33.681034 | 114 | 0.594574 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,289 | 0.328827 |
74f2722b6fd0d9275b8a2fdd984c9a1ced8700d9 | 21,298 | py | Python | eventdata/parameter_sources/randomevent.py | ywelsch/rally-eventdata-track | 148fe2ffc90f192a1d3d68c614031e40ecc67eae | [
"Apache-2.0"
] | 33 | 2017-02-22T17:59:46.000Z | 2021-11-02T07:07:40.000Z | eventdata/parameter_sources/randomevent.py | ywelsch/rally-eventdata-track | 148fe2ffc90f192a1d3d68c614031e40ecc67eae | [
"Apache-2.0"
] | 68 | 2017-03-10T12:57:36.000Z | 2021-07-14T14:26:03.000Z | eventdata/parameter_sources/randomevent.py | isabella232/rally-eventdata-track | d7f25419ba3ef554998d89caa3fdb5a2d2100d41 | [
"Apache-2.0"
] | 45 | 2017-02-22T18:03:58.000Z | 2022-01-01T02:18:41.000Z | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this f... | 51.569007 | 196 | 0.621326 | 19,491 | 0.915156 | 0 | 0 | 424 | 0.019908 | 0 | 0 | 6,839 | 0.32111 |
74f27c4a87e0d0092113e2de9c038d951d050bbb | 12,791 | py | Python | modules/zivid/_settings_converter.py | knzivid/zivid-python | 5f05d5c17a6f649e89d58a69d0744c525e02b5eb | [
"BSD-3-Clause"
] | null | null | null | modules/zivid/_settings_converter.py | knzivid/zivid-python | 5f05d5c17a6f649e89d58a69d0744c525e02b5eb | [
"BSD-3-Clause"
] | null | null | null | modules/zivid/_settings_converter.py | knzivid/zivid-python | 5f05d5c17a6f649e89d58a69d0744c525e02b5eb | [
"BSD-3-Clause"
] | null | null | null | """Auto generated, do not edit."""
import zivid
import _zivid
def to_settings_acquisition(internal_acquisition):
return zivid.Settings.Acquisition(
aperture=internal_acquisition.aperture.value,
brightness=internal_acquisition.brightness.value,
exposure_time=internal_acquisition.exposure_ti... | 33.572178 | 130 | 0.787272 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.002658 |
74f423b852ccc3707d9d4c3d66b423e8f820b294 | 11,608 | py | Python | scripts/tracking/main_tracking.py | MaaaasayaK/Self-Supervised-Small-Soccer-Player-Detection-Tracking | 96d87367afdf4cca8aeca3f32c313e8632c70fe4 | [
"MIT"
] | 1 | 2021-08-17T18:22:12.000Z | 2021-08-17T18:22:12.000Z | scripts/tracking/main_tracking.py | cballester/Self-Supervised-Small-Soccer-Player-Detection-Tracking | a5d2d0c31a992919a270bd0e02379844196271f0 | [
"MIT"
] | null | null | null | scripts/tracking/main_tracking.py | cballester/Self-Supervised-Small-Soccer-Player-Detection-Tracking | a5d2d0c31a992919a270bd0e02379844196271f0 | [
"MIT"
] | 1 | 2021-08-19T14:21:52.000Z | 2021-08-19T14:21:52.000Z | import sys
import torchvision
import os
import torch
from tracking_utils import light_track
from natsort import natsorted, ns
import numpy as np
from argparse import ArgumentParser
if __name__ == '__main__':
parser = ArgumentParser()
parser.add_argument('--data_name', type=str, default='issia')
parser.add... | 50.912281 | 139 | 0.67419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,058 | 0.177292 |
74f5824cf904c5800c6d4ef10dc07a58fe417b71 | 7,245 | py | Python | src/analyse/ternary.py | timtroendle/money-land | fe3ed6e531cfe91156886d4fa685a14840749f36 | [
"MIT"
] | null | null | null | src/analyse/ternary.py | timtroendle/money-land | fe3ed6e531cfe91156886d4fa685a14840749f36 | [
"MIT"
] | null | null | null | src/analyse/ternary.py | timtroendle/money-land | fe3ed6e531cfe91156886d4fa685a14840749f36 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
import ternary
import numpy as np
import pandas as pd
import xarray as xr
import matplotlib
import matplotlib.pyplot as plt
from matplotlib import gridspec
import seaborn as sns
TICK_FONT_SIZE = 9
RED = "#A01914"
BLUE = "#4F6DB8"
SEQUENTIAL_PALETTE = sns.light_palette(RED, as_cmap=T... | 35.866337 | 117 | 0.642926 | 225 | 0.031005 | 0 | 0 | 236 | 0.03252 | 0 | 0 | 775 | 0.106793 |
74f5eeb590efc75b4298bcbbba1e165b62b754b6 | 20,491 | py | Python | cogs/game/minigames/black_box/game.py | FellowHashbrown/omega-psi-py | 4ea33cdbef15ffaa537f2c9e382de508c58093fc | [
"MIT"
] | 4 | 2018-12-23T08:49:40.000Z | 2021-03-25T16:51:43.000Z | cogs/game/minigames/black_box/game.py | FellowHashbrown/omega-psi-py | 4ea33cdbef15ffaa537f2c9e382de508c58093fc | [
"MIT"
] | 23 | 2020-11-03T17:40:40.000Z | 2022-02-01T17:12:59.000Z | cogs/game/minigames/black_box/game.py | FellowHashbrown/omega-psi-py | 4ea33cdbef15ffaa537f2c9e382de508c58093fc | [
"MIT"
] | 1 | 2019-07-11T23:40:13.000Z | 2019-07-11T23:40:13.000Z | from discord import Embed
from random import randint
from cogs.errors import get_error_message
from cogs.game.minigames.base_game.game import Game
from cogs.game.minigames.black_box.variables import NUMBERS, SYMBOLS, LEFT, RIGHT, UP, DOWN, GUESS, DIRECT, FINALIZE, HIT, MISS
from cogs.game.minigames.functions import wa... | 43.229958 | 127 | 0.516373 | 19,849 | 0.968669 | 0 | 0 | 0 | 0 | 11,649 | 0.568493 | 6,038 | 0.294666 |
74f9d1119f5a828ec576c313747eb837e48217fb | 3,437 | py | Python | rewrite_example.py | Giangblackk/hacksterio-smart-nids | 283166e8880aaeb280520053b4dcd431d30b3ed3 | [
"MIT"
] | null | null | null | rewrite_example.py | Giangblackk/hacksterio-smart-nids | 283166e8880aaeb280520053b4dcd431d30b3ed3 | [
"MIT"
] | null | null | null | rewrite_example.py | Giangblackk/hacksterio-smart-nids | 283166e8880aaeb280520053b4dcd431d30b3ed3 | [
"MIT"
] | null | null | null | # Steps for offline training:
# 1. load benign pcap file
# 2. extract features
# 3. train feature mapper model and save model
import numpy as np
from kitsune.FeatureExtractor import FE
from kitsune.KitNET import corClust as CC
from kitsune.KitNET import dA as AE
from scipy.stats import norm
from matplotlib import pyplo... | 26.037879 | 85 | 0.609252 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 743 | 0.216177 |
74f9eecab8ce2f291f5fec2748dfb9c29a2b9af0 | 2,003 | py | Python | szz/Commit.py | fastluca/szz-mpi | 3ebc266cb98080f2c7d34ca6cdcc03b6ac0902ae | [
"MIT"
] | 1 | 2019-03-21T23:27:31.000Z | 2019-03-21T23:27:31.000Z | szz/Commit.py | fastluca/szz-mpi | 3ebc266cb98080f2c7d34ca6cdcc03b6ac0902ae | [
"MIT"
] | null | null | null | szz/Commit.py | fastluca/szz-mpi | 3ebc266cb98080f2c7d34ca6cdcc03b6ac0902ae | [
"MIT"
] | 1 | 2019-02-17T12:10:20.000Z | 2019-02-17T12:10:20.000Z | class Commit:
def __init__(self, sha: str, timestamp, author_id: str, committer_id: str, message: str, num_parents: int, num_additions: int, num_deletions: int, num_files_changed: int, files: int, src_loc_added: int, src_loc_deleted: int, num_src_files_touched: int, src_files: str):
self.__sha = sha
... | 27.067568 | 273 | 0.678982 | 2,001 | 0.999001 | 0 | 0 | 986 | 0.492262 | 0 | 0 | 62 | 0.030954 |
74fb274c512334729a04267dec3df32bc39cd9ae | 452 | py | Python | position/urls.py | drowolath/position | 2d27a56732d195003d35762931fd2484ac270501 | [
"BSD-2-Clause"
] | null | null | null | position/urls.py | drowolath/position | 2d27a56732d195003d35762931fd2484ac270501 | [
"BSD-2-Clause"
] | null | null | null | position/urls.py | drowolath/position | 2d27a56732d195003d35762931fd2484ac270501 | [
"BSD-2-Clause"
] | null | null | null | import views
from django.conf.urls import url
urlpatterns = [
url(
r'(?P<latitude>[\d.@+-]+)/(?P<longitude>[\d.@+-]+)',
views.mapit,
name='mapit'),
url(
r'(?P<name>[\alphanum]+)',
views.trackers,
name='named_liveposition'),
url(
r'(?P<imei>\d{15})',
... | 19.652174 | 60 | 0.462389 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 148 | 0.327434 |
74fb6a3fa3da896167c7fb6828069fd1cdde4840 | 249 | py | Python | pure_func.py | TomHam2021/Python2a_week5 | 49678f4e57a5ccdfb9b8312e163ed45b61b8eba1 | [
"MIT"
] | null | null | null | pure_func.py | TomHam2021/Python2a_week5 | 49678f4e57a5ccdfb9b8312e163ed45b61b8eba1 | [
"MIT"
] | null | null | null | pure_func.py | TomHam2021/Python2a_week5 | 49678f4e57a5ccdfb9b8312e163ed45b61b8eba1 | [
"MIT"
] | null | null | null | '''
# funtional programming undviker for-loopar men måste inte inehålla rekursiva anrop
def fib(n, a=0, b=1):
return a if n < 1 else \
b if n < 2 else \
fib(n - 1, b, a + b)
print(fib(100))
# Output: 354224848179261915075
'''
| 19.153846 | 83 | 0.610442 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 250 | 0.996016 |
74fb9b012c42b23d4eedebb4c1b383a5c6b105c8 | 1,268 | py | Python | Codewars/5kyu/buddyPairs.py | Ry4nW/python-wars | 76e3fb24b7ae2abf35db592f1ad59cf8d5f9e508 | [
"MIT"
] | 1 | 2021-06-06T19:55:22.000Z | 2021-06-06T19:55:22.000Z | Codewars/5kyu/buddyPairs.py | Ry4nW/python-wars | 76e3fb24b7ae2abf35db592f1ad59cf8d5f9e508 | [
"MIT"
] | 1 | 2022-01-20T19:20:33.000Z | 2022-01-20T23:51:46.000Z | Codewars/5kyu/buddyPairs.py | Ry4nW/python-wars | 76e3fb24b7ae2abf35db592f1ad59cf8d5f9e508 | [
"MIT"
] | null | null | null | # Attempt
def buddy(start, limit):
add = 0
mDivisorSum = 0
nDivisorSum = 0
if (limit > start):
for n in range(start, limit + 1):
nDivisorSum = 0
# Gets divisors for i
for j in range(1, n // 2 + 1):
if type(n / j) != floa... | 19.507692 | 65 | 0.395899 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 168 | 0.132492 |
74fbcda21347132ff292b55b6df302641ca59260 | 408 | py | Python | uitestcore/custom_assertion.py | talawson05/ui-test-core | 6578398d6cfad97cee552f676a027b8b37755a73 | [
"MIT"
] | 8 | 2019-09-16T14:31:38.000Z | 2022-02-03T21:26:04.000Z | uitestcore/custom_assertion.py | talawson05/ui-test-core | 6578398d6cfad97cee552f676a027b8b37755a73 | [
"MIT"
] | 12 | 2019-09-13T14:47:26.000Z | 2022-01-10T11:24:52.000Z | uitestcore/custom_assertion.py | talawson05/ui-test-core | 6578398d6cfad97cee552f676a027b8b37755a73 | [
"MIT"
] | 4 | 2019-09-16T14:49:53.000Z | 2022-02-02T15:42:01.000Z | """
Create any custom assertion in here
"""
from hamcrest import assert_that, is_
def assert_no_failures(failure_description):
"""
Assert that the string passed is empty representing no failures - to be used in test steps
:param failure_description: a string describing failures in a test step, or empty if... | 31.384615 | 100 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 252 | 0.617647 |
74fc030b30d76aec5a1c6845ceaf50cdeded83c1 | 297 | py | Python | blog/app/__init__.py | kiza054/woodhall-scout-blog-mongodb | 380f181cbe987eda46ed64a774d3188344f4de55 | [
"MIT"
] | null | null | null | blog/app/__init__.py | kiza054/woodhall-scout-blog-mongodb | 380f181cbe987eda46ed64a774d3188344f4de55 | [
"MIT"
] | null | null | null | blog/app/__init__.py | kiza054/woodhall-scout-blog-mongodb | 380f181cbe987eda46ed64a774d3188344f4de55 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_admin import Admin
from flask_login import LoginManager
app = Flask(__name__)
app.config.from_object('config')
admin = Admin(app, name='microblog', template_mode='bootstrap3')
lm = LoginManager()
lm.init_app(app)
lm.login_view = 'login'
from app import views
| 21.214286 | 64 | 0.781145 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.127946 |
74fd94e4feeda1bcbc1a8631162221222bc2c165 | 2,010 | py | Python | bin/run_all_benchmarks.py | finiteautomata/finetune_vs_scratch | 444c9f9f2e1086f833c674e5d819b7a16ff8345a | [
"MIT"
] | 12 | 2021-11-19T18:40:17.000Z | 2022-03-07T10:56:54.000Z | bin/run_all_benchmarks.py | finiteautomata/finetune_vs_scratch | 444c9f9f2e1086f833c674e5d819b7a16ff8345a | [
"MIT"
] | 2 | 2022-02-20T17:28:00.000Z | 2022-03-06T21:34:21.000Z | bin/run_all_benchmarks.py | finiteautomata/finetune_vs_scratch | 444c9f9f2e1086f833c674e5d819b7a16ff8345a | [
"MIT"
] | null | null | null | import os
import re
import fire
import json
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
def run_all(times=10):
models = [
("finiteautomata/robertuito-base-uncased", "robertuito-uncased.json"),
("finiteautomata/robertuito-base-cased", "robertuito-cas... | 34.655172 | 106 | 0.621891 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,029 | 0.51194 |
74fdb498bb4874db8d8ec3451adbf242259fd94c | 1,110 | py | Python | Python/Backspace_String_Compare.py | treethree/LeetCode | 4c6d6e1ee92d87424fe5b9f20b8eef8d34e74761 | [
"Unlicense"
] | null | null | null | Python/Backspace_String_Compare.py | treethree/LeetCode | 4c6d6e1ee92d87424fe5b9f20b8eef8d34e74761 | [
"Unlicense"
] | null | null | null | Python/Backspace_String_Compare.py | treethree/LeetCode | 4c6d6e1ee92d87424fe5b9f20b8eef8d34e74761 | [
"Unlicense"
] | null | null | null | #Approach #1: Build String(Stack)
#Time Complexity: O(M + N), where M, N are the lengths of S and T respectively.
#Space Complexity: O(M + N).
class Solution(object):
def backspaceCompare(self, S, T):
def build(S):
ans = []
for c in S:
if c != '#':
... | 32.647059 | 79 | 0.43964 | 832 | 0.74955 | 0 | 0 | 0 | 0 | 0 | 0 | 285 | 0.256757 |
74fe0f956d636c3650d5cdff79ce6ca98d344de7 | 7,008 | py | Python | hyperion/pdfs/jfa/jfa_total.py | hyperion-ml/hyperion | c4c9eee0acab1ba572843373245da12d00dfffaa | [
"Apache-2.0"
] | 14 | 2021-12-19T04:24:15.000Z | 2022-03-18T03:24:04.000Z | hyperion/pdfs/jfa/jfa_total.py | hyperion-ml/hyperion | c4c9eee0acab1ba572843373245da12d00dfffaa | [
"Apache-2.0"
] | null | null | null | hyperion/pdfs/jfa/jfa_total.py | hyperion-ml/hyperion | c4c9eee0acab1ba572843373245da12d00dfffaa | [
"Apache-2.0"
] | 5 | 2021-12-14T20:41:27.000Z | 2022-02-24T14:18:11.000Z | """
Copyright 2018 Johns Hopkins University (Author: Jesus Villalba)
Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""
import numpy as np
from scipy import linalg as sla
from ...hyp_defs import float_cpu
from ...utils.math import (
invert_pdmat,
invert_trimat,
logdet_pdmat,
vec2symmat,
... | 27.057915 | 88 | 0.516124 | 6,641 | 0.947631 | 0 | 0 | 1,640 | 0.234018 | 0 | 0 | 167 | 0.02383 |
74fee5c75b2916c60cd68cc9f257e9cc4d35e86d | 19,063 | py | Python | dockercask.py | dockercask/dockercask | 75103d683f12c2428783d6c729164f0727157e51 | [
"MIT"
] | 13 | 2016-01-11T05:39:34.000Z | 2020-02-26T03:50:17.000Z | dockercask.py | dockercask/dockercask | 75103d683f12c2428783d6c729164f0727157e51 | [
"MIT"
] | null | null | null | dockercask.py | dockercask/dockercask | 75103d683f12c2428783d6c729164f0727157e51 | [
"MIT"
] | 2 | 2017-04-21T18:44:02.000Z | 2018-04-15T23:38:25.000Z | import os
import shutil
import subprocess
import sys
import random
import threading
import json
import time
import traceback
import signal
BASE_IMAGE = 'archlinux'
USER_HOME_DIR = '~'
HOME_DIR = '~/Docker'
APP_DIR = '~/.local/share/applications'
PULSE_COOKIE_PATH = '~/.config/pulse/cookie'
LOCALTIME_PATH = '/etc/local... | 27.116643 | 79 | 0.544458 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,567 | 0.187116 |
74ff1cb180abc2244375933d5f39c89666c57b20 | 314 | py | Python | Fun Excercise/decorator3.py | NirmalSilwal/Python- | 6d23112db8366360f0b79bdbf21252575e8eab3e | [
"MIT"
] | 32 | 2020-04-05T08:29:40.000Z | 2022-01-08T03:10:00.000Z | Fun Excercise/decorator3.py | NirmalSilwal/Python- | 6d23112db8366360f0b79bdbf21252575e8eab3e | [
"MIT"
] | 3 | 2021-06-02T04:09:11.000Z | 2022-03-02T14:55:03.000Z | Fun Excercise/decorator3.py | NirmalSilwal/Python- | 6d23112db8366360f0b79bdbf21252575e8eab3e | [
"MIT"
] | 3 | 2020-07-13T05:44:04.000Z | 2021-03-03T07:07:58.000Z | def say_hello(hello_var):
print(hello_var)
def say_hi(hi_var):
print(hello_var + " " + hi_var)
return say_hi
say_hi_func = say_hello("Hello") # Print Hello and returns say_hi function which gets stored in say_hi_func variable
say_hi_func("Hi") # Call say_hi function and print "Hello Hi" | 26.166667 | 117 | 0.710191 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 0.44586 |
2d0005654c5252f8fe1a1bf0048e42c68ed61045 | 16,082 | py | Python | ski_conditions/apps/app_scraping/management/commands/do_scraping.py | JKProjects-Org/ski-conditions | e7f9350bb3c290853f49f65e30d495ee0aa3b737 | [
"MIT"
] | 2 | 2019-11-03T16:37:33.000Z | 2020-01-08T19:05:20.000Z | ski_conditions/apps/app_scraping/management/commands/do_scraping.py | JKProjects-Org/ski-conditions | e7f9350bb3c290853f49f65e30d495ee0aa3b737 | [
"MIT"
] | 8 | 2019-11-04T02:49:30.000Z | 2022-02-10T12:22:15.000Z | ski_conditions/apps/app_scraping/management/commands/do_scraping.py | JKProjects-Org/ski-conditions | e7f9350bb3c290853f49f65e30d495ee0aa3b737 | [
"MIT"
] | null | null | null | import json
import re
import requests
from bs4 import BeautifulSoup
from django.core.management.base import BaseCommand
from ski_conditions.apps.app_scraping.models import SkiResort
class AbstractScraper:
def scrape(self):
pass
class AbstractScriptScraper(AbstractScraper):
def _common_scrape(self)... | 37.751174 | 109 | 0.628778 | 15,865 | 0.986507 | 0 | 0 | 0 | 0 | 0 | 0 | 5,497 | 0.341811 |
2d00069adda8a7efef667916f453029310a82aea | 515 | py | Python | CodeChef/Python/arrange.py | dfm066/Programming | 53d28460cd40b966cca1d4695d9dc6792ced4c6f | [
"MIT"
] | null | null | null | CodeChef/Python/arrange.py | dfm066/Programming | 53d28460cd40b966cca1d4695d9dc6792ced4c6f | [
"MIT"
] | null | null | null | CodeChef/Python/arrange.py | dfm066/Programming | 53d28460cd40b966cca1d4695d9dc6792ced4c6f | [
"MIT"
] | null | null | null | facts = [1]
fact = 1
for i in range(1,100001):
fact *= i
fact %= 1000000007
facts.append(fact)
T = int(input())
letters = []
for i in range(0,26):
letters.append(0)
while T > 0:
T -= 1
s = input()
cnt = 0
ans = 1
for i in s:
letters[ord(i)-97] += 1
for ... | 19.074074 | 36 | 0.464078 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2d00f7d06ce5d59e251acaa9db5fafba0b34215b | 356 | py | Python | prettyqt/paths.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 7 | 2019-05-01T01:34:36.000Z | 2022-03-08T02:24:14.000Z | prettyqt/paths.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 141 | 2019-04-16T11:22:01.000Z | 2021-04-14T15:12:36.000Z | prettyqt/paths.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 5 | 2019-04-17T11:48:19.000Z | 2021-11-21T10:30:19.000Z | from importlib import resources
import pathlib
ROOT_PATH = pathlib.Path(resources.files("prettyqt")) # type: ignore
LOCALIZATION_PATH = ROOT_PATH / "localization"
THEMES_PATH = ROOT_PATH / "themes"
RE_LEXER_PATH = (
ROOT_PATH / "syntaxhighlighters" / "pygments" / "regularexpressionlexer.py"
)
ICON_FONT_PATH = R... | 27.384615 | 79 | 0.755618 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 124 | 0.348315 |
2d0218e45fe129209799296000566bde73d084af | 4,380 | py | Python | poptimizer/shared/app.py | poliyev/poptimizer | 71935c4365b0572e65b6d3172f925701dda283db | [
"Unlicense"
] | null | null | null | poptimizer/shared/app.py | poliyev/poptimizer | 71935c4365b0572e65b6d3172f925701dda283db | [
"Unlicense"
] | null | null | null | poptimizer/shared/app.py | poliyev/poptimizer | 71935c4365b0572e65b6d3172f925701dda283db | [
"Unlicense"
] | 1 | 2021-12-02T13:32:44.000Z | 2021-12-02T13:32:44.000Z | """Unit of Work and EventBus."""
import asyncio
import contextlib
from types import TracebackType
from typing import Callable, Generic, Optional, TypeVar
from poptimizer import config
from poptimizer.shared import adapters, domain
EntityType = TypeVar("EntityType", bound=domain.BaseEntity)
class UoW(
contextlib... | 32.686567 | 99 | 0.663242 | 3,354 | 0.669862 | 0 | 0 | 0 | 0 | 1,588 | 0.317156 | 1,601 | 0.319752 |
2d04272c0dbb7d2f3b68496a3df2f8724ac5e827 | 1,372 | py | Python | osh/builtin_misc_test.py | Schweinepriester/oil | 8b0e5c58a825223341896064d63a95c8b57a9c05 | [
"Apache-2.0"
] | 2,209 | 2016-11-20T10:32:58.000Z | 2022-03-31T20:51:27.000Z | osh/builtin_misc_test.py | Schweinepriester/oil | 8b0e5c58a825223341896064d63a95c8b57a9c05 | [
"Apache-2.0"
] | 1,074 | 2016-12-07T05:02:48.000Z | 2022-03-22T02:09:11.000Z | osh/builtin_misc_test.py | Schweinepriester/oil | 8b0e5c58a825223341896064d63a95c8b57a9c05 | [
"Apache-2.0"
] | 147 | 2016-12-11T04:13:28.000Z | 2022-03-27T14:50:00.000Z | #!/usr/bin/env python2
"""
builtin_misc_test.py: Tests for builtin_misc.py
"""
from __future__ import print_function
import unittest
from core import pyutil
from frontend import flag_def # side effect: flags are defined!
_ = flag_def
from osh import split
from osh import builtin_misc # module under test
class Bui... | 28 | 77 | 0.648688 | 1,014 | 0.739067 | 0 | 0 | 0 | 0 | 0 | 0 | 491 | 0.357872 |
2d060e9092d4d4c7bf4bc0ec5921fae018518af1 | 3,670 | py | Python | src/python/dart/service/message.py | RetailMeNotSandbox/dart | 58a05f56c04fadd6741501262d92aeb143cd2f2e | [
"MIT"
] | 18 | 2016-03-03T19:10:21.000Z | 2021-07-14T22:37:35.000Z | src/python/dart/service/message.py | RetailMeNotSandbox/dart | 58a05f56c04fadd6741501262d92aeb143cd2f2e | [
"MIT"
] | 62 | 2016-04-11T15:17:23.000Z | 2017-09-08T17:18:53.000Z | src/python/dart/service/message.py | RetailMeNotSandbox/dart | 58a05f56c04fadd6741501262d92aeb143cd2f2e | [
"MIT"
] | 15 | 2016-03-03T15:38:34.000Z | 2019-03-27T19:33:08.000Z | import os
import boto3
from boto.regioninfo import RegionInfo
from sqlalchemy import text
from dart.model.orm import MessageDao
from dart.context.database import db
from dart.service.patcher import patch_difference
class MessageService(object):
def __init__(self, ecs_task_status_override=None, region='us-east-1')... | 39.462366 | 109 | 0.672207 | 3,452 | 0.940599 | 0 | 0 | 1,643 | 0.447684 | 0 | 0 | 914 | 0.249046 |
2d06a010a220a8f3363a231e8addbcd8ff9894e9 | 770 | py | Python | setPixmap.py | EvaGalois/LinsImgPro | daed9bffcf5bea6bf41f36d21f773be18374f7bc | [
"MIT"
] | 1 | 2020-05-19T08:58:58.000Z | 2020-05-19T08:58:58.000Z | setPixmap.py | EvaGalois/LinsImgPro | daed9bffcf5bea6bf41f36d21f773be18374f7bc | [
"MIT"
] | null | null | null | setPixmap.py | EvaGalois/LinsImgPro | daed9bffcf5bea6bf41f36d21f773be18374f7bc | [
"MIT"
] | null | null | null | import sys
from PyQt5.QtWidgets import QApplication, QWidget, QHBoxLayout, QLabel
from PyQt5.QtGui import QPixmap
class Example(QWidget):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
hbox = QHBoxLayout(self) # 创建布局
lb1 = QLabel(self) # 实例化 QLabel... | 24.83871 | 74 | 0.618182 | 624 | 0.737589 | 0 | 0 | 0 | 0 | 0 | 0 | 256 | 0.3026 |
2d075408ad95df9320ec62cc02811a6bf1787742 | 3,292 | py | Python | tests/test_exporter.py | coderanger/celery-local-exporter | 3db869b7e0ec09309834b8835c619edbe8898504 | [
"Apache-2.0"
] | 3 | 2020-06-30T22:26:18.000Z | 2021-09-27T23:52:11.000Z | tests/test_exporter.py | coderanger/celery-local-exporter | 3db869b7e0ec09309834b8835c619edbe8898504 | [
"Apache-2.0"
] | null | null | null | tests/test_exporter.py | coderanger/celery-local-exporter | 3db869b7e0ec09309834b8835c619edbe8898504 | [
"Apache-2.0"
] | null | null | null | import os
import os.path
import subprocess
import sys
import time
import pytest
import requests
@pytest.fixture
def launch_worker(tmp_path_factory):
procs = []
def _inner(pool="threads", *args):
if procs:
raise ValueError("already started")
os.environ["DATA_FOLDER_IN"] = str(tmp_... | 23.683453 | 80 | 0.559235 | 0 | 0 | 1,376 | 0.417983 | 1,716 | 0.521264 | 0 | 0 | 944 | 0.286756 |
2d07733d95d25265a8538f87085014c15240fde9 | 5,787 | py | Python | third_party/ros_aarch64/lib/python2.7/dist-packages/novatel_msgs/msg/_Ack.py | silverland79/apollo1.0 | 6e725e8dd5013b769efa18f43e5ae675f4847fbd | [
"Apache-2.0"
] | 2 | 2018-01-29T03:10:39.000Z | 2020-12-08T09:08:41.000Z | third_party/ros_aarch64/lib/python2.7/dist-packages/novatel_msgs/msg/_Ack.py | silverland79/apollo1.0 | 6e725e8dd5013b769efa18f43e5ae675f4847fbd | [
"Apache-2.0"
] | null | null | null | third_party/ros_aarch64/lib/python2.7/dist-packages/novatel_msgs/msg/_Ack.py | silverland79/apollo1.0 | 6e725e8dd5013b769efa18f43e5ae675f4847fbd | [
"Apache-2.0"
] | 3 | 2018-01-29T12:22:56.000Z | 2020-12-08T09:08:46.000Z | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from novatel_msgs/Ack.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
class Ack(genpy.Message):
_md5sum = "f84607dc6beaf1cb6772d23af7221bdf"
_type = "novatel_msgs/Ack... | 34.041176 | 145 | 0.693624 | 5,430 | 0.93831 | 0 | 0 | 0 | 0 | 0 | 0 | 2,458 | 0.424745 |
2d079a19d871b67d7ba2ce209923cccc01b9ff8d | 242 | py | Python | ecart/serializer.py | micael-grilo/E-Cart | 76e86b4c7ea5bd2becda23ef8c69470c86630c5e | [
"MIT"
] | 5 | 2016-09-20T21:33:29.000Z | 2018-10-10T06:07:45.000Z | ecart/serializer.py | micael-grilo/E-Cart | 76e86b4c7ea5bd2becda23ef8c69470c86630c5e | [
"MIT"
] | 1 | 2016-05-03T07:54:54.000Z | 2016-05-03T13:16:48.000Z | ecart/serializer.py | micael-grilo/E-Cart | 76e86b4c7ea5bd2becda23ef8c69470c86630c5e | [
"MIT"
] | 3 | 2016-09-18T14:54:49.000Z | 2020-01-08T18:19:51.000Z | import json
class Serializer(object):
"""docstring for Serializer"""
@staticmethod
def dumps(data_obj):
return json.dumps(data_obj)
@staticmethod
def loads(data_string):
return json.loads(data_string)
| 16.133333 | 38 | 0.665289 | 227 | 0.938017 | 0 | 0 | 154 | 0.636364 | 0 | 0 | 30 | 0.123967 |
2d092a4e4e1af0db3f5776c271d8aede971fce4f | 17,330 | py | Python | tests/webservice/test_client.py | 3D-e-Chem/python-modified-tanimoto | 618cc4ae3cb55d9cba2cc297e9c05212353b218e | [
"Apache-2.0"
] | 8 | 2017-05-25T19:40:37.000Z | 2021-06-12T06:59:26.000Z | tests/webservice/test_client.py | 3D-e-Chem/kripodb | 618cc4ae3cb55d9cba2cc297e9c05212353b218e | [
"Apache-2.0"
] | 44 | 2016-02-05T14:02:57.000Z | 2019-07-29T07:58:20.000Z | tests/webservice/test_client.py | 3D-e-Chem/python-modified-tanimoto | 618cc4ae3cb55d9cba2cc297e9c05212353b218e | [
"Apache-2.0"
] | 1 | 2016-05-05T08:47:49.000Z | 2016-05-05T08:47:49.000Z | # Copyright 2016 Netherlands eScience Center
#
# 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 t... | 97.359551 | 3,145 | 0.540969 | 0 | 0 | 0 | 0 | 147 | 0.008482 | 0 | 0 | 12,835 | 0.740623 |
2d0a2f1569fadbc34d20318046924ba2aa98f716 | 2,906 | py | Python | examples/Structural/main.py | HerminioTH/GeoFlow1D | 44a5c11e3297827b265c1ea44bb18256b074fa66 | [
"MIT"
] | 2 | 2020-02-10T11:23:16.000Z | 2020-07-01T20:28:57.000Z | examples/Structural/main.py | HerminioTH/GeoFlow1D | 44a5c11e3297827b265c1ea44bb18256b074fa66 | [
"MIT"
] | null | null | null | examples/Structural/main.py | HerminioTH/GeoFlow1D | 44a5c11e3297827b265c1ea44bb18256b074fa66 | [
"MIT"
] | null | null | null | import geoflow1D
from geoflow1D.GridModule import *
from geoflow1D.FieldsModule import *
from geoflow1D.LinearSystemModule import *
from geoflow1D.GeoModule import *
from geoflow1D.SolverModule import *
import numpy as np
from matplotlib import pyplot as plt
# -------------- PROBLEM ILLUSTRATION -----------------
# ... | 29.653061 | 56 | 0.456986 | 252 | 0.086717 | 0 | 0 | 0 | 0 | 0 | 0 | 1,358 | 0.467309 |
2d0e5939c50882dfd177fbde933852e0ecf02d4f | 1,024 | py | Python | torch2trt/converters/matmul.py | grimoire/torch2trt | bf65d573f69879442d542e16c6280de4a1354d72 | [
"MIT"
] | null | null | null | torch2trt/converters/matmul.py | grimoire/torch2trt | bf65d573f69879442d542e16c6280de4a1354d72 | [
"MIT"
] | null | null | null | torch2trt/converters/matmul.py | grimoire/torch2trt | bf65d573f69879442d542e16c6280de4a1354d72 | [
"MIT"
] | null | null | null | from torch2trt.torch2trt import *
from torch2trt.module_test import add_module_test
import tensorrt as trt
@tensorrt_converter('torch.matmul')
def convert_matmul(ctx):
input_a = ctx.method_args[0]
input_b = ctx.method_args[1]
input_a_trt, input_b_trt = trt_(ctx.network, input_a, input_b)
output = ctx.... | 32 | 83 | 0.6875 | 165 | 0.161133 | 0 | 0 | 743 | 0.725586 | 0 | 0 | 105 | 0.102539 |
2d0f65ea12ba88c4f09486a14c66b101fd4846c7 | 148 | py | Python | src/020-factorial-digit-sum/python/solver.py | xfbs/ProjectEulerRust | e26768c56ff87b029cb2a02f56dc5cd32e1f7c87 | [
"MIT"
] | 1 | 2018-01-26T21:18:12.000Z | 2018-01-26T21:18:12.000Z | src/020-factorial-digit-sum/python/solver.py | xfbs/ProjectEulerRust | e26768c56ff87b029cb2a02f56dc5cd32e1f7c87 | [
"MIT"
] | 3 | 2017-12-09T14:49:30.000Z | 2017-12-09T14:59:39.000Z | src/020-factorial-digit-sum/python/solver.py | xfbs/ProjectEulerRust | e26768c56ff87b029cb2a02f56dc5cd32e1f7c87 | [
"MIT"
] | null | null | null | import math
def solve(m):
f = math.factorial(m)
digit_sum = 0
while f > 0:
digit_sum += f % 10
f //= 10
return digit_sum
| 12.333333 | 25 | 0.547297 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2d1184aa5ea419982c4d302f3708a26aca0b8cd0 | 1,454 | py | Python | ngpy/vector2d.py | liuyxpp/ngpy | 24f4c07e336d255302618ea113ba2e02f60e01b4 | [
"BSD-3-Clause"
] | 1 | 2021-09-06T10:19:55.000Z | 2021-09-06T10:19:55.000Z | ngpy/vector2d.py | liuyxpp/ngpy | 24f4c07e336d255302618ea113ba2e02f60e01b4 | [
"BSD-3-Clause"
] | null | null | null | ngpy/vector2d.py | liuyxpp/ngpy | 24f4c07e336d255302618ea113ba2e02f60e01b4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import math
"""
2D math vector
Since 2011.8.19
AUTHOUR:
Yi-Xin Liu <liuyxpp@gmail.com>
Fudan University
REVISION:
2011.8.22
"""
from persistent import Persistent
class Vector2D(Persistent):
def __init__(self,x=0.0,y=0.0):
self.x=float(x)
self.y=float(y)
def... | 23.836066 | 85 | 0.570151 | 723 | 0.497249 | 0 | 0 | 0 | 0 | 0 | 0 | 231 | 0.158872 |
2d11b724ff940a49feced129c545ac4d65ca924d | 24 | py | Python | pyranges/version.py | biocore-ntnu/pyranges | 5dd7cda7e42051c4b4a75eb6f8650464fb416f7a | [
"MIT"
] | 299 | 2019-03-22T18:28:01.000Z | 2022-03-11T16:14:19.000Z | pyranges/version.py | biocore-ntnu/pyranges | 5dd7cda7e42051c4b4a75eb6f8650464fb416f7a | [
"MIT"
] | 157 | 2019-04-06T18:05:27.000Z | 2022-03-07T14:50:10.000Z | pyranges/version.py | biocore-ntnu/pyranges | 5dd7cda7e42051c4b4a75eb6f8650464fb416f7a | [
"MIT"
] | 33 | 2019-04-12T14:44:53.000Z | 2022-03-16T16:58:06.000Z | __version__ = "0.0.111"
| 12 | 23 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.375 |
2d1213c410c2a6b8aac4888a4f6bc94463fa2640 | 4,538 | py | Python | HayStack_Client/IOTA_Module.py | ConsensusGroup/Haystack | c2d0b8fb7b2064b05a5d256bb949dda9a0ef569d | [
"MIT"
] | 1 | 2019-11-28T08:50:26.000Z | 2019-11-28T08:50:26.000Z | HayStack_Client/IOTA_Module.py | ConsensusGroup/Haystack | c2d0b8fb7b2064b05a5d256bb949dda9a0ef569d | [
"MIT"
] | 3 | 2019-11-22T04:23:47.000Z | 2019-11-30T07:11:24.000Z | HayStack_Client/IOTA_Module.py | ConsensusGroup/Haystack | c2d0b8fb7b2064b05a5d256bb949dda9a0ef569d | [
"MIT"
] | 3 | 2018-03-19T05:20:44.000Z | 2019-11-22T00:56:31.000Z | ####################################################################################
############# The purpose of the module is to handle IOTA interactions #############
####################################################################################
#IOTA library
from iota import TryteString, Address, ProposedBun... | 33.865672 | 124 | 0.666373 | 2,896 | 0.638167 | 0 | 0 | 0 | 0 | 0 | 0 | 843 | 0.185765 |
2d15578f96b8143429650898e1882b35ef941ed3 | 2,412 | py | Python | demo.py | TiagoFilipeSousaGoncalves/code2model-codesprinters | 9f38a994a3a1036916ea82f9523baa8a5eed8226 | [
"MIT"
] | null | null | null | demo.py | TiagoFilipeSousaGoncalves/code2model-codesprinters | 9f38a994a3a1036916ea82f9523baa8a5eed8226 | [
"MIT"
] | null | null | null | demo.py | TiagoFilipeSousaGoncalves/code2model-codesprinters | 9f38a994a3a1036916ea82f9523baa8a5eed8226 | [
"MIT"
] | null | null | null | # Imports
import streamlit as st
import pandas as pd
import difflib
# Load results .CSV
code_simil_results = pd.read_csv('results/resultados.csv')
prog_lang_results = pd.read_csv('results/resultados_language.csv')
# Create a select box to choose the demo
add_selectbox = st.sidebar.selectbox(
"W... | 28.714286 | 98 | 0.620232 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 712 | 0.295191 |
2d1815bfd6d647756ab866fe6efa2fc1a8f472f8 | 15,759 | py | Python | fn_portal/filters/FishAttr_filters.py | AdamCottrill/FishNetPortal | 4e58e05f52346ac1ab46698a03d4229c74828406 | [
"MIT"
] | null | null | null | fn_portal/filters/FishAttr_filters.py | AdamCottrill/FishNetPortal | 4e58e05f52346ac1ab46698a03d4229c74828406 | [
"MIT"
] | null | null | null | fn_portal/filters/FishAttr_filters.py | AdamCottrill/FishNetPortal | 4e58e05f52346ac1ab46698a03d4229c74828406 | [
"MIT"
] | null | null | null | import django_filters
from .common_filters import NumberInFilter, ValueInFilter, GeomFilter, GeoFilterSet
class FishAttrFilters(GeoFilterSet):
"""A filter set that contains filters that are common to all the FN125 child
tables - FN125Lamprey, FN125Tag, Fn126, and FN127. Filtersets for those class
inheri... | 37.255319 | 88 | 0.724475 | 15,649 | 0.99302 | 0 | 0 | 0 | 0 | 0 | 0 | 5,102 | 0.323752 |
2d18e8169c2fc367046cbb04843a2cec05fd504a | 7,162 | py | Python | pcrond/sched.py | luca-vercelli/pcrond | ac5e9b987ae175521144bcf634fcd8316b4b334d | [
"MIT"
] | null | null | null | pcrond/sched.py | luca-vercelli/pcrond | ac5e9b987ae175521144bcf634fcd8316b4b334d | [
"MIT"
] | null | null | null | pcrond/sched.py | luca-vercelli/pcrond | ac5e9b987ae175521144bcf634fcd8316b4b334d | [
"MIT"
] | null | null | null | # most of the code here comes from https://github.com/dbader/schedule
from .job import Job, ALIASES
import logging
import time
logger = logging.getLogger('pcrond')
def std_launch_func(cmd_splitted, stdin=None):
"""
Default way of executing commands is to invoke subprocess.run()
"""
if stdin is None:... | 37.302083 | 103 | 0.562692 | 6,304 | 0.880201 | 0 | 0 | 0 | 0 | 0 | 0 | 3,456 | 0.482547 |
2d1939ff6d648f3379f25ae86317a8339f7cfcc1 | 469 | py | Python | simu/UserAgent.py | TheodoreKrypton/simu-data-catcher | 2625f6d4e33859cf0a7e0df4d190e3219e759228 | [
"MIT"
] | 3 | 2017-09-11T03:13:06.000Z | 2020-08-11T15:15:09.000Z | simu/UserAgent.py | TheodoreKrypton/simu-data-catcher | 2625f6d4e33859cf0a7e0df4d190e3219e759228 | [
"MIT"
] | null | null | null | simu/UserAgent.py | TheodoreKrypton/simu-data-catcher | 2625f6d4e33859cf0a7e0df4d190e3219e759228 | [
"MIT"
] | 6 | 2017-06-08T13:19:50.000Z | 2021-04-20T15:11:28.000Z | import urllib
import re
ptrn = re.compile("<textarea name='uas' id='uas_textfeld' rows='4' cols='30'>(.+?)</textarea>")
with open("user_agent.txt", "w") as fp:
for i in range(12381, 15480):
try:
url = "http://www.useragentstring.com/index.php?id=" + str(i)
html = urllib.urlopen(ur... | 29.3125 | 95 | 0.567164 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.309168 |
2d1ab381951528b1b2a476a21ada75863d82ce29 | 2,436 | py | Python | Bot.py | Grohiik/BotMauData2020 | 7b7eecca1b5fdc73a0e9b3593cea62b2fb1333f8 | [
"MIT"
] | null | null | null | Bot.py | Grohiik/BotMauData2020 | 7b7eecca1b5fdc73a0e9b3593cea62b2fb1333f8 | [
"MIT"
] | null | null | null | Bot.py | Grohiik/BotMauData2020 | 7b7eecca1b5fdc73a0e9b3593cea62b2fb1333f8 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
from secrets import Token as Token
bot = commands.Bot(command_prefix="!")
role_add_channel_id = 750036407757832242
@bot.event
async def on_message(message):
if bot.user == message.author:
return
if message.channel.id == role_add_channel_id:
awai... | 29 | 89 | 0.614122 | 0 | 0 | 0 | 0 | 2,128 | 0.868926 | 1,951 | 0.796652 | 417 | 0.170274 |
2d1abf839257188564b4d1db171a9a9e2fcac08f | 1,572 | py | Python | cms/blocks.py | mitodl/micromasters | 2b1df8ac7c4395cc0a0227d936b3f021f0ae3019 | [
"BSD-3-Clause"
] | 32 | 2016-03-25T01:03:13.000Z | 2022-01-15T19:35:42.000Z | cms/blocks.py | mitodl/micromasters | 2b1df8ac7c4395cc0a0227d936b3f021f0ae3019 | [
"BSD-3-Clause"
] | 4,858 | 2016-03-03T13:48:30.000Z | 2022-03-29T22:09:51.000Z | cms/blocks.py | mitodl/micromasters | 2b1df8ac7c4395cc0a0227d936b3f021f0ae3019 | [
"BSD-3-Clause"
] | 20 | 2016-08-18T22:07:44.000Z | 2021-11-15T13:35:35.000Z | """Page blocks"""
from wagtail.core import blocks
from wagtail.images.blocks import ImageChooserBlock
class CourseTeamBlock(blocks.StructBlock):
"""
Block class that defines a course team member
"""
name = blocks.CharBlock(max_length=100, help_text="Name of the course team member.")
title = bloc... | 30.230769 | 94 | 0.660305 | 1,461 | 0.929389 | 0 | 0 | 0 | 0 | 0 | 0 | 546 | 0.347328 |
2d1d61b3fcb8f382f84576e100b3996770495f89 | 25 | py | Python | env/Lib/site-packages/win32/mapi/__init__.py | Daniel-Key/HearStone-Python | 981584d2b9502319393bd92b48f0ec8d906b4d44 | [
"MIT"
] | null | null | null | env/Lib/site-packages/win32/mapi/__init__.py | Daniel-Key/HearStone-Python | 981584d2b9502319393bd92b48f0ec8d906b4d44 | [
"MIT"
] | 1 | 2020-10-27T14:44:08.000Z | 2020-10-27T14:44:08.000Z | env/Lib/site-packages/win32/mapi/__init__.py | Daniel-Key/HearStone-Python | 981584d2b9502319393bd92b48f0ec8d906b4d44 | [
"MIT"
] | null | null | null | from win32._mapi import * | 25 | 25 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2d1e81bfe87388671566d46153dbbdae8f99b502 | 15,698 | py | Python | zygrader/grader.py | natecraddock/zygrader | 3a1d5c1dbe76c8f76c2a99f271a26b2ec873006a | [
"MIT"
] | 5 | 2019-11-15T17:42:42.000Z | 2021-04-20T19:35:25.000Z | zygrader/grader.py | natecraddock/zygrader | 3a1d5c1dbe76c8f76c2a99f271a26b2ec873006a | [
"MIT"
] | 76 | 2020-02-22T01:42:16.000Z | 2021-04-28T18:47:20.000Z | zygrader/grader.py | natecraddock/zygrader | 3a1d5c1dbe76c8f76c2a99f271a26b2ec873006a | [
"MIT"
] | 2 | 2020-02-21T04:39:38.000Z | 2021-04-20T19:35:20.000Z | """Grader: Menus and popups for grading and pair programming"""
import curses
import getpass
from zygrader import data, ui, utils
from zygrader.config import preferences
from zygrader.config.shared import SharedData
from zygrader.data import model
from zygrader.zybooks import Zybooks
from zygrader.ui import colors
d... | 35.118568 | 90 | 0.647407 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,061 | 0.194993 |
2d205b0c022a8abc4d1eb512a97ffb4ce79cbfb0 | 1,212 | py | Python | jupiter/utils/EmailUtil.py | gaott/jupiter | 29fb266b080e9c8ca921a39e57a5e6a803375746 | [
"Apache-2.0"
] | null | null | null | jupiter/utils/EmailUtil.py | gaott/jupiter | 29fb266b080e9c8ca921a39e57a5e6a803375746 | [
"Apache-2.0"
] | null | null | null | jupiter/utils/EmailUtil.py | gaott/jupiter | 29fb266b080e9c8ca921a39e57a5e6a803375746 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Created on 2013年7月1日
@author: gaott
'''
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from email.utils import COMMASPACE
import smtplib
def sendEmail(body):
strFrom = 'example@gmail.com'
strTo = ['abc@xxx.com','efg@xxx.com']
subject = 'Warn... | 26.347826 | 82 | 0.671617 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 443 | 0.363711 |
2d220d13853eb72792eb10d11e5500d16a8130fd | 3,857 | py | Python | physics/n-body/n-body.py | ludius0/simulations | 3f8992edfef89d0450479647a96b889c6f0f43a3 | [
"MIT"
] | null | null | null | physics/n-body/n-body.py | ludius0/simulations | 3f8992edfef89d0450479647a96b889c6f0f43a3 | [
"MIT"
] | null | null | null | physics/n-body/n-body.py | ludius0/simulations | 3f8992edfef89d0450479647a96b889c6f0f43a3 | [
"MIT"
] | null | null | null | # libs
import pygame
import math
import sys
from random import randrange, seed
from numbers import Real
# simulation settings
G = 1
sum_mass = 50.0
softening = 100 # also function as speed component
seed(1)
# additional settings
COLLIS_MERGE = True
ACTIVE_BORDERS = False
# world objects
NBODIES = 150
BODIES = []
# p... | 29 | 129 | 0.577132 | 1,647 | 0.427016 | 0 | 0 | 0 | 0 | 0 | 0 | 599 | 0.155302 |
2d2277cdda5d2b5e047ce9495c3c9bd5671495c6 | 136 | py | Python | core/handlers/main_db_handler.py | Tampan793/Watermark-Bot | e872f85675e7cdaeeae5efcb1a0af59625d554f5 | [
"MIT"
] | null | null | null | core/handlers/main_db_handler.py | Tampan793/Watermark-Bot | e872f85675e7cdaeeae5efcb1a0af59625d554f5 | [
"MIT"
] | null | null | null | core/handlers/main_db_handler.py | Tampan793/Watermark-Bot | e872f85675e7cdaeeae5efcb1a0af59625d554f5 | [
"MIT"
] | null | null | null | # (c) @M4SK3R1N
from configs import Config
from core.database import Database
db = Database(Config.DATABASE_URL, Config.BOT_USERNAME)
| 19.428571 | 55 | 0.794118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.110294 |
2d23358acadeaa1dff525002691c0097420904a8 | 4,026 | py | Python | src/item/consumables.py | roozhou/botty | a67a87845687cdf6900af10a13dc7170684faa9a | [
"MIT"
] | null | null | null | src/item/consumables.py | roozhou/botty | a67a87845687cdf6900af10a13dc7170684faa9a | [
"MIT"
] | null | null | null | src/item/consumables.py | roozhou/botty | a67a87845687cdf6900af10a13dc7170684faa9a | [
"MIT"
] | null | null | null | from config import Config
from dataclasses import dataclass
from logger import Logger
from d2r_image.data_models import HoveredItem
@dataclass
class Consumables:
tp: int = 0
id: int = 0
rejuv: int = 0
health: int = 0
mana: int = 0
key: int = 0
def __getitem__(self, key):
return supe... | 34.410256 | 97 | 0.664183 | 615 | 0.152757 | 0 | 0 | 626 | 0.155489 | 0 | 0 | 1,068 | 0.265276 |
2d24021470465eba916fd57e573635e8e812a4a2 | 2,612 | py | Python | gorden_crawler/spiders/shopbop.py | Enmming/gorden_cralwer | 3c279e4f80eaf90f3f03acd31b75cf991952adee | [
"Apache-2.0"
] | 2 | 2019-02-22T13:51:08.000Z | 2020-08-03T14:01:30.000Z | gorden_crawler/spiders/shopbop.py | Enmming/gorden_cralwer | 3c279e4f80eaf90f3f03acd31b75cf991952adee | [
"Apache-2.0"
] | null | null | null | gorden_crawler/spiders/shopbop.py | Enmming/gorden_cralwer | 3c279e4f80eaf90f3f03acd31b75cf991952adee | [
"Apache-2.0"
] | 1 | 2020-08-03T14:01:32.000Z | 2020-08-03T14:01:32.000Z | # -*- coding: utf-8 -*-
from scrapy.spiders import Spider
from scrapy.selector import Selector
import re
from scrapy import Request
from gorden_crawler.spiders.shopbop_eastdane_common import ShopbopEastdaneCommon
class ShopBopSpider(ShopbopEastdaneCommon):
#class ShopBopSpider(Spider):
name = "shopbop"
allowe... | 45.824561 | 172 | 0.637825 | 2,397 | 0.917688 | 1,490 | 0.570444 | 0 | 0 | 0 | 0 | 1,034 | 0.395865 |
2d24304d5ecf67d3329a74e6bd41bb16295b32dd | 67 | py | Python | vnpy/api/oanda/workers/__init__.py | WongLynn/vnpy_Amerlin-1.1.20 | d701d8f12c29cc33f58ea025920b0c7240f74f82 | [
"MIT"
] | 11 | 2019-10-28T13:01:48.000Z | 2021-06-20T03:38:09.000Z | vnpy/api/oanda/workers/__init__.py | Rayshawn8/vnpy_Amerlin-1.1.20 | d701d8f12c29cc33f58ea025920b0c7240f74f82 | [
"MIT"
] | null | null | null | vnpy/api/oanda/workers/__init__.py | Rayshawn8/vnpy_Amerlin-1.1.20 | d701d8f12c29cc33f58ea025920b0c7240f74f82 | [
"MIT"
] | 6 | 2019-10-28T13:16:13.000Z | 2020-09-08T08:03:41.000Z | from .transaction import *
from .tick import *
from .order import * | 22.333333 | 26 | 0.746269 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2d25dfe193d9f222df81203587f5dc472c35b589 | 1,104 | py | Python | features/steps/login_steps.py | adrisalas/flask-appointmentsDoctor-TDD-BDD | 1f7c14f83c85144e844f3db9a4fb27eebcf678a2 | [
"MIT"
] | null | null | null | features/steps/login_steps.py | adrisalas/flask-appointmentsDoctor-TDD-BDD | 1f7c14f83c85144e844f3db9a4fb27eebcf678a2 | [
"MIT"
] | null | null | null | features/steps/login_steps.py | adrisalas/flask-appointmentsDoctor-TDD-BDD | 1f7c14f83c85144e844f3db9a4fb27eebcf678a2 | [
"MIT"
] | null | null | null | from behave import given, when, then
@given(u'estoy en la pagina de login')
def flask_setup(context):
context.client.get('/logout') # If you do not check you've already logout, errors may arise
context.page = context.client.get('/login')
assert "Iniciar Sesión".encode("utf-8") in context.page.data
@given(... | 40.888889 | 95 | 0.692935 | 0 | 0 | 0 | 0 | 1,061 | 0.960181 | 0 | 0 | 372 | 0.336652 |
2d2653b77757ecdc03fee246ac217f3cdcfedd54 | 3,679 | py | Python | app/main/views.py | arondasamuel123/FlaskBlog | 33fa1bbc288a831b29a95bfff0b514a8d6f93f4e | [
"MIT"
] | null | null | null | app/main/views.py | arondasamuel123/FlaskBlog | 33fa1bbc288a831b29a95bfff0b514a8d6f93f4e | [
"MIT"
] | null | null | null | app/main/views.py | arondasamuel123/FlaskBlog | 33fa1bbc288a831b29a95bfff0b514a8d6f93f4e | [
"MIT"
] | null | null | null | from . import main
from flask import render_template, url_for,redirect
from app.models import Posts, User, Comment
from flask_login import current_user, login_required
from .forms import PostForm, CommentForm, UpdateBlogForm
from .. import db
from sqlalchemy import desc
from ..requests import get_quotes
from ..email i... | 31.991304 | 130 | 0.668116 | 0 | 0 | 0 | 0 | 3,277 | 0.890731 | 0 | 0 | 536 | 0.145692 |
2d26eedc95197a2362633c769d7c96b7f86fab9b | 2,117 | py | Python | examples/tree_view_example.py | cgpipline/dayu_widgets | 040a09fb9a20ce72997a3fba60e381e3944bff59 | [
"MIT"
] | 157 | 2019-03-10T05:55:21.000Z | 2022-03-31T09:07:00.000Z | examples/tree_view_example.py | cgpipline/dayu_widgets | 040a09fb9a20ce72997a3fba60e381e3944bff59 | [
"MIT"
] | 16 | 2019-07-15T11:30:53.000Z | 2021-12-16T14:17:59.000Z | examples/tree_view_example.py | phenom-films/dayu_widgets | 1eb8fbf2847f9de95af2cd62d5eaec392f1c1e22 | [
"MIT"
] | 56 | 2019-06-19T03:35:27.000Z | 2022-03-22T08:07:32.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###################################################################
# Author: Mu yanru
# Date : 2019.2
# Email : muyanru345@163.com
###################################################################
import examples._mock_data as mock
from dayu_widgets import dayu_theme
f... | 32.569231 | 68 | 0.671233 | 1,335 | 0.630609 | 0 | 0 | 0 | 0 | 0 | 0 | 276 | 0.130373 |
2d281bc3b188a3528fb07c6f83aec0f80d042987 | 385 | py | Python | app/http/pili_service.py | sy264115809/techshow | 7d9c8d003b6a652684b140b601061ac59dc44892 | [
"MIT"
] | null | null | null | app/http/pili_service.py | sy264115809/techshow | 7d9c8d003b6a652684b140b601061ac59dc44892 | [
"MIT"
] | null | null | null | app/http/pili_service.py | sy264115809/techshow | 7d9c8d003b6a652684b140b601061ac59dc44892 | [
"MIT"
] | 1 | 2021-09-14T18:01:39.000Z | 2021-09-14T18:01:39.000Z | # coding=utf-8
from pili import *
from flask import current_app
def _hub():
credentials = Credentials(current_app.config['PILI_ACCESS_KEY'], current_app.config['PILI_SECRET_KEY'])
return Hub(credentials, current_app.config['PILI_HUB_NAME'])
def get_stream(stream_id):
return _hub().get_stream(stream_id)
... | 22.647059 | 107 | 0.755844 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.163636 |
2d28a277601e69e469768302b3fb700a887a42db | 1,131 | py | Python | test/use_case_examples/startUp.py | sbanik1/sheetTrap | 287746bf33b41e7f1066e80ee12bd08f75b155bc | [
"MIT"
] | null | null | null | test/use_case_examples/startUp.py | sbanik1/sheetTrap | 287746bf33b41e7f1066e80ee12bd08f75b155bc | [
"MIT"
] | null | null | null | test/use_case_examples/startUp.py | sbanik1/sheetTrap | 287746bf33b41e7f1066e80ee12bd08f75b155bc | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This code sets the directories for running the test codes
Created on Sat Dec 19 12:51:22 2020
@author: Swarnav Banik
sbanik1@umd.edu
"""
# %% Import all ###############################################################
import sys
import matplotlib.pyplot as plt
# %% Add... | 34.272727 | 85 | 0.542882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 889 | 0.78603 |
2d28c3e225ac0e71c89f1c665bbce426470ea70d | 8,038 | py | Python | tests/basic.py | srobo-legacy/comp-webdis | 5cef63976700ca262a87ed24f10abb908fa434de | [
"BSD-2-Clause"
] | null | null | null | tests/basic.py | srobo-legacy/comp-webdis | 5cef63976700ca262a87ed24f10abb908fa434de | [
"BSD-2-Clause"
] | null | null | null | tests/basic.py | srobo-legacy/comp-webdis | 5cef63976700ca262a87ed24f10abb908fa434de | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
import urllib2, unittest, json, hashlib
from functools import wraps
try:
import bson
except:
bson = None
try:
import msgpack
except:
msgpack = None
host = '127.0.0.1'
port = 7379
class TestWebdis(unittest.TestCase):
def wrap(self,url):
return 'http://%s:%d/%s' % (host, port, url)
def quer... | 29.229091 | 87 | 0.672555 | 7,609 | 0.946629 | 0 | 0 | 2,699 | 0.33578 | 0 | 0 | 2,760 | 0.343369 |