hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6ccc8df451a2936e28cf2b4cd839f862b2e3add8 | 888 | py | Python | predictions/views.py | Mustapha-Belkacim/English-Premier-League-predictor | 2950d70e9aa80cc8c39f102029fb460b992f1e36 | [
"MIT"
] | 5 | 2018-02-27T18:03:45.000Z | 2018-07-23T11:40:55.000Z | predictions/views.py | Mustapha-Belkacim/Russia-2018-World-Cup-Predictor | 2950d70e9aa80cc8c39f102029fb460b992f1e36 | [
"MIT"
] | 1 | 2018-12-10T04:33:24.000Z | 2018-12-10T04:33:24.000Z | predictions/views.py | Mustapha-Belkacim/English-Premier-League-predictor | 2950d70e9aa80cc8c39f102029fb460b992f1e36 | [
"MIT"
] | 1 | 2018-02-26T14:23:40.000Z | 2018-02-26T14:23:40.000Z | from django.shortcuts import render
from django.views import View, generic
from .services.predictor import get_results
| 37 | 80 | 0.600225 |
6ccd0655a845c86a3f1d3906dda9691881f8e438 | 100 | py | Python | typeit/sums/__init__.py | avanov/type | dbf2a94de13b592987695b7346f10cbf53acf3af | [
"MIT"
] | 8 | 2018-06-17T16:01:12.000Z | 2021-11-05T23:34:55.000Z | typeit/sums/__init__.py | avanov/type | dbf2a94de13b592987695b7346f10cbf53acf3af | [
"MIT"
] | 71 | 2018-06-23T15:31:56.000Z | 2021-03-09T16:56:50.000Z | typeit/sums/__init__.py | avanov/type | dbf2a94de13b592987695b7346f10cbf53acf3af | [
"MIT"
] | 1 | 2021-11-05T23:34:57.000Z | 2021-11-05T23:34:57.000Z | from .impl import SumType
from .types import Either, Maybe
__all__ = ('SumType', 'Either', 'Maybe') | 25 | 40 | 0.72 |
6ccd2235be6f078c26206338550424d6462f8d27 | 2,599 | py | Python | CICFlowMeter-4.0/bin/utility.py | codingbaobao/React-TorDetection | 20a2b7cbc1b2119f35188be799f8d8e1c8a6fed0 | [
"MIT"
] | null | null | null | CICFlowMeter-4.0/bin/utility.py | codingbaobao/React-TorDetection | 20a2b7cbc1b2119f35188be799f8d8e1c8a6fed0 | [
"MIT"
] | null | null | null | CICFlowMeter-4.0/bin/utility.py | codingbaobao/React-TorDetection | 20a2b7cbc1b2119f35188be799f8d8e1c8a6fed0 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import pickle as pk
import random
from sklearn.metrics import accuracy_score
from sklearn import preprocessing
from sklearn.ensemble import RandomForestClassifier
from sklearn.preprocessing import Imputer
if __name__ == '__main__':
csv_path = '../../TorCSV/CSV/Sce... | 22.798246 | 69 | 0.613313 |
6ccd22609ab3e08378fdd219fad406bb1e80df1a | 7,546 | py | Python | forex_python/bitcoin.py | Otisey/forex-python | a34d074b8ee7411cd2868ea3945793ef43bf7965 | [
"MIT"
] | 505 | 2016-05-21T04:50:19.000Z | 2022-03-29T04:40:36.000Z | forex_python/bitcoin.py | Otisey/forex-python | a34d074b8ee7411cd2868ea3945793ef43bf7965 | [
"MIT"
] | 92 | 2016-05-22T09:26:23.000Z | 2022-02-18T11:26:56.000Z | forex_python/bitcoin.py | Otisey/forex-python | a34d074b8ee7411cd2868ea3945793ef43bf7965 | [
"MIT"
] | 166 | 2016-05-21T04:52:49.000Z | 2022-03-25T03:57:24.000Z | from decimal import Decimal
import simplejson as json
import requests
from .converter import RatesNotAvailableError, DecimalFloatMismatchError
_Btc_Converter = BtcConverter()
get_btc_symbol = _Btc_Converter.get_symbol
convert_btc_to_cur_on = _Btc_Converter.convert_btc_to_cur_on
convert_to_btc_on = _Btc_Converter.con... | 37.542289 | 145 | 0.579777 |
6ccd772b6551e6f64f8a47c7fc86c3a1b0ee9be4 | 10,805 | py | Python | iphone_manager.py | karenleewaddell/iPhone_Manager | ce683c349cbb2ed03cb96b9cf21adc17903bb861 | [
"MIT"
] | 17 | 2019-11-03T22:57:08.000Z | 2021-09-13T14:23:41.000Z | iphone_manager.py | karenleewaddell/iPhone_Manager | ce683c349cbb2ed03cb96b9cf21adc17903bb861 | [
"MIT"
] | null | null | null | iphone_manager.py | karenleewaddell/iPhone_Manager | ce683c349cbb2ed03cb96b9cf21adc17903bb861 | [
"MIT"
] | 5 | 2019-11-03T23:02:00.000Z | 2020-11-10T19:43:12.000Z | # iPhone Manager bot by Oldmole
# No support will be provided, this code is provided "as is" without warranty of any kind, either express or implied. Use at your own risk.
# The use of the software and scripts is done at your own discretion and risk and with agreement that you will be solely responsible for any damage
... | 32.841945 | 150 | 0.69838 |
6cceaf277e8db7db23e8454da2cdbade4678a488 | 1,892 | py | Python | backend/core/migrations/0001_initial.py | EMUNES/hust-mdb | 578a9113bc48e19559bb2e62340d38e40bd6ccd8 | [
"Apache-2.0"
] | 2 | 2021-04-14T02:43:48.000Z | 2021-05-17T06:37:10.000Z | backend/core/migrations/0001_initial.py | EMUNES/hust-mdb | 578a9113bc48e19559bb2e62340d38e40bd6ccd8 | [
"Apache-2.0"
] | null | null | null | backend/core/migrations/0001_initial.py | EMUNES/hust-mdb | 578a9113bc48e19559bb2e62340d38e40bd6ccd8 | [
"Apache-2.0"
] | 1 | 2021-04-14T02:57:15.000Z | 2021-04-14T02:57:15.000Z | # Generated by Django 3.1.7 on 2021-03-09 16:24
from django.db import migrations, models
| 54.057143 | 115 | 0.62315 |
6cd0a9860da602a73497ad759994eead19d6e3b7 | 3,514 | py | Python | announcements/migrations/0001_initial.py | GeoNode/geonode-announcements | 2e2d2b36c7c113f3d67bcb57d9fa8b458fef0d8e | [
"MIT"
] | null | null | null | announcements/migrations/0001_initial.py | GeoNode/geonode-announcements | 2e2d2b36c7c113f3d67bcb57d9fa8b458fef0d8e | [
"MIT"
] | 5 | 2016-02-23T16:51:10.000Z | 2020-02-24T10:18:10.000Z | announcements/migrations/0001_initial.py | GeoNode/geonode-announcements | 2e2d2b36c7c113f3d67bcb57d9fa8b458fef0d8e | [
"MIT"
] | 7 | 2015-02-12T07:06:16.000Z | 2020-02-20T00:46:54.000Z | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 ... | 47.486486 | 117 | 0.566591 |
6cd189a584f06e5a67d45c96e8f7182834beb52a | 1,086 | py | Python | 2021/5/solution2.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | 2 | 2020-12-04T09:45:38.000Z | 2020-12-07T14:06:12.000Z | 2021/5/solution2.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | null | null | null | 2021/5/solution2.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | null | null | null | import re
from dataclasses import dataclass
from collections import defaultdict
from itertools import cycle
lines = []
with open("input.txt") as input_file:
for line in input_file:
match = re.match(r"(\d+),(\d+) -> (\d+),(\d+)", line)
coords = [int(n) for n in match.groups()]
lines.append(... | 24.133333 | 61 | 0.55709 |
6cd18b31f1d34f290e9b9c7833de3af5f36e1b66 | 1,513 | py | Python | academica/migrations/0003_auto_20201220_1016.py | Chaoslecion123/tesis-final-aradiel-2020 | bf6b4b6f08ab11da24bf965433fc36bde2f9606b | [
"MIT"
] | null | null | null | academica/migrations/0003_auto_20201220_1016.py | Chaoslecion123/tesis-final-aradiel-2020 | bf6b4b6f08ab11da24bf965433fc36bde2f9606b | [
"MIT"
] | null | null | null | academica/migrations/0003_auto_20201220_1016.py | Chaoslecion123/tesis-final-aradiel-2020 | bf6b4b6f08ab11da24bf965433fc36bde2f9606b | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-12-20 15:16
from django.db import migrations
| 23.640625 | 49 | 0.497687 |
6cd190831e8896cc6ffcbd5d6642cbfc033e5873 | 721 | py | Python | devday/talk/context_processors.py | jenslauterbach/devday_website | a827c9237e656842542eff07ec9fa7b39716a0ee | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 6 | 2018-09-30T20:18:01.000Z | 2020-03-12T09:03:38.000Z | devday/talk/context_processors.py | jenslauterbach/devday_website | a827c9237e656842542eff07ec9fa7b39716a0ee | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 260 | 2018-09-30T14:17:57.000Z | 2022-03-04T13:48:34.000Z | devday/talk/context_processors.py | jenslauterbach/devday_website | a827c9237e656842542eff07ec9fa7b39716a0ee | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 9 | 2018-09-30T13:17:21.000Z | 2020-10-03T12:55:05.000Z | from event.models import Event
from talk.models import Talk
| 28.84 | 61 | 0.643551 |
6cd3055994e4751ed452fa234135b8dfc679dd87 | 948 | py | Python | analysis/divide.py | chris-wahl/SDSS_QSO | 35807ecbc819d89fd4141748b31ce2a51a1c2d34 | [
"MIT"
] | null | null | null | analysis/divide.py | chris-wahl/SDSS_QSO | 35807ecbc819d89fd4141748b31ce2a51a1c2d34 | [
"MIT"
] | null | null | null | analysis/divide.py | chris-wahl/SDSS_QSO | 35807ecbc819d89fd4141748b31ce2a51a1c2d34 | [
"MIT"
] | null | null | null | from spectrum import Spectrum, align_wavelengths
def divide( numerator: Spectrum, denominator: Spectrum, wl_low: float = None, wl_high: float = None ) -> Spectrum:
"""
Performs a point-by-point division of the numerator spectrum by the denominator spectrum. If wavelength ranges
are not specificed, will u... | 30.580645 | 115 | 0.624473 |
6cd3dd00805335ac69d9b5556c1f245451bbe9aa | 198 | py | Python | Ekeopara_Praise/Phase 1/Python Basic 1/Day14 Tasks/Task4.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 6 | 2020-05-23T19:53:25.000Z | 2021-05-08T20:21:30.000Z | Ekeopara_Praise/Phase 1/Python Basic 1/Day14 Tasks/Task4.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 8 | 2020-05-14T18:53:12.000Z | 2020-07-03T00:06:20.000Z | Ekeopara_Praise/Phase 1/Python Basic 1/Day14 Tasks/Task4.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 39 | 2020-05-10T20:55:02.000Z | 2020-09-12T17:40:59.000Z | '''4. Write a Python program to check whether multiple variables have the same value.'''
var1, var2, var3 = 20, 20, 20
if var1 == var2== var3:
print("var1, var2, and var3 have the same value !") | 49.5 | 88 | 0.681818 |
6cd509e695712b4d2634df653709f63565e266c1 | 1,895 | py | Python | models.py | Nelestya/blog | 4e99ba3789f5214be5fd290801d0fde751e2d99f | [
"MIT"
] | null | null | null | models.py | Nelestya/blog | 4e99ba3789f5214be5fd290801d0fde751e2d99f | [
"MIT"
] | null | null | null | models.py | Nelestya/blog | 4e99ba3789f5214be5fd290801d0fde751e2d99f | [
"MIT"
] | null | null | null | from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from baseapp.models import Recently
# Create your models here.
| 35.092593 | 86 | 0.626913 |
6cd5c125fa085b5e000b2cc8f849565bd1a2bf18 | 156 | py | Python | avython/console/__init__.py | avara1986/avython | a9372865545e55e2e130881b7d743f37d4f415ef | [
"Apache-2.0"
] | null | null | null | avython/console/__init__.py | avara1986/avython | a9372865545e55e2e130881b7d743f37d4f415ef | [
"Apache-2.0"
] | null | null | null | avython/console/__init__.py | avara1986/avython | a9372865545e55e2e130881b7d743f37d4f415ef | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
from __future__ import absolute_import
from avython.console.main import warning_color, show_error, show_warning, check_continue, bcolors
| 31.2 | 97 | 0.839744 |
6cd9738ccb60421cba8abd71ab88a5dfd1c7df96 | 303 | py | Python | django_country/middleware.py | ColorGenomics/django-country | 1d272a196d998e21bb8d407e2657b88211f35232 | [
"Apache-2.0"
] | 4 | 2015-08-23T16:52:13.000Z | 2016-07-16T21:39:59.000Z | django_country/middleware.py | ColorGenomics/django-country | 1d272a196d998e21bb8d407e2657b88211f35232 | [
"Apache-2.0"
] | 2 | 2016-02-04T15:58:06.000Z | 2016-02-04T16:29:18.000Z | django_country/middleware.py | color/django-country | 1d272a196d998e21bb8d407e2657b88211f35232 | [
"Apache-2.0"
] | 2 | 2018-05-15T09:10:03.000Z | 2019-03-08T14:49:44.000Z | # -*- coding: utf-8 -*-
from . import geo
| 23.307692 | 68 | 0.686469 |
6cd9c08fed53bacc9f91d2a45b30a6403b5d3f2d | 9,855 | py | Python | scripts/multimodal_human_provider_node.py | YoanSallami/multimodal_human_provider | 02b07297fd805ed6c4ca63520b6117897d23df3a | [
"BSD-3-Clause"
] | null | null | null | scripts/multimodal_human_provider_node.py | YoanSallami/multimodal_human_provider | 02b07297fd805ed6c4ca63520b6117897d23df3a | [
"BSD-3-Clause"
] | null | null | null | scripts/multimodal_human_provider_node.py | YoanSallami/multimodal_human_provider | 02b07297fd805ed6c4ca63520b6117897d23df3a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import sys
import rospy
import re
import time
import numpy
import argparse
import math
import underworlds
import tf2_ros
from underworlds.helpers.geometry import get_world_transform
from underworlds.tools.loader import ModelLoader
from underworlds.helpers.transformations i... | 41.407563 | 144 | 0.617757 |
6cda2551861539e7955fba8e1b052ccf729d24d4 | 3,171 | py | Python | execute.py | ikeban/InvoicesSender | 7eae2b0b201c91f31ee65bf64779a778d98bfa5e | [
"MIT"
] | null | null | null | execute.py | ikeban/InvoicesSender | 7eae2b0b201c91f31ee65bf64779a778d98bfa5e | [
"MIT"
] | null | null | null | execute.py | ikeban/InvoicesSender | 7eae2b0b201c91f31ee65bf64779a778d98bfa5e | [
"MIT"
] | null | null | null | import code.PdfReader as PdfReaderModule
import code.ExcelReader as ExcelReader
import code.TemplateParser as TemplateParser
import code.PdfAnalyzer as PdfAnalyzer
import code.EmailSender as EmailSender
if __name__ == '__main__':
main()
| 45.3 | 123 | 0.71397 |
6cdb367c92bfbf774391e43f4ed3d4e6b4218ff8 | 1,146 | py | Python | pyclsload/__init__.py | nbdy/pyclsload | 7eafcef6562f5247720a6e634b90dc37bc7ef246 | [
"MIT"
] | null | null | null | pyclsload/__init__.py | nbdy/pyclsload | 7eafcef6562f5247720a6e634b90dc37bc7ef246 | [
"MIT"
] | null | null | null | pyclsload/__init__.py | nbdy/pyclsload | 7eafcef6562f5247720a6e634b90dc37bc7ef246 | [
"MIT"
] | null | null | null | from importlib.util import spec_from_file_location, module_from_spec
from os import listdir
from os.path import join
__all__ = ['load_cls', 'init_cls', 'Cls']
| 27.285714 | 73 | 0.657941 |
6cdc218d274321607edc4aee95141af773ac7b6c | 681 | py | Python | electionleaflets/apps/constituencies/templatetags/constituency_tags.py | electionleaflets/electionleaflets | 4110e96a3035c32d0b6ff3c9f832c5e003728170 | [
"MIT"
] | null | null | null | electionleaflets/apps/constituencies/templatetags/constituency_tags.py | electionleaflets/electionleaflets | 4110e96a3035c32d0b6ff3c9f832c5e003728170 | [
"MIT"
] | 23 | 2015-02-19T14:02:23.000Z | 2015-04-30T11:14:01.000Z | electionleaflets/apps/constituencies/templatetags/constituency_tags.py | electionleaflets/electionleaflets | 4110e96a3035c32d0b6ff3c9f832c5e003728170 | [
"MIT"
] | 2 | 2015-02-02T19:39:54.000Z | 2017-02-08T09:19:53.000Z | from django import template
from django.conf import settings
from leaflets.models import Leaflet
from constituencies.models import Constituency
register = template.Library() | 42.5625 | 84 | 0.785609 |
6cdcdbaf3c47d1cc8b0a7c248d4e481fb6a439cc | 8,439 | py | Python | kolibri_zim_plugin/views.py | endlessm/kolibri-zim-plugin | 1fb4fc26e2c84938f5e134e1e7a9361a4130f30b | [
"MIT"
] | null | null | null | kolibri_zim_plugin/views.py | endlessm/kolibri-zim-plugin | 1fb4fc26e2c84938f5e134e1e7a9361a4130f30b | [
"MIT"
] | 5 | 2021-06-02T19:54:48.000Z | 2022-02-08T18:13:58.000Z | kolibri_zim_plugin/views.py | endlessm/kolibri-zim-plugin | 1fb4fc26e2c84938f5e134e1e7a9361a4130f30b | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import os
import textwrap
import time
import bs4
from django.core.urlresolvers import get_resolver
from django.http import HttpResponse
from django.http import HttpResponseBadRequest
from django.http i... | 34.165992 | 96 | 0.678279 |
6ce066b2522d23ac66096c6f10c531332a69139e | 20,404 | py | Python | advanced lane tracking pipeline.py | mrpalazz/CarND-Advanced-Lane-Lines | 495d1f1025514b519182cc907a02b80592e8ba4f | [
"MIT"
] | null | null | null | advanced lane tracking pipeline.py | mrpalazz/CarND-Advanced-Lane-Lines | 495d1f1025514b519182cc907a02b80592e8ba4f | [
"MIT"
] | null | null | null | advanced lane tracking pipeline.py | mrpalazz/CarND-Advanced-Lane-Lines | 495d1f1025514b519182cc907a02b80592e8ba4f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Nov 22 21:44:55 2017
@author: Mike
"""
import numpy as np
import cv2
import glob
import pickle
import matplotlib.pyplot as plt
from matplotlib.pyplot import *
import os
from scipy import stats
from moviepy.editor import VideoFileClip
from IPython.display im... | 39.619417 | 142 | 0.624926 |
6ce17b5622aced1091b006d9abe3f5934f61119a | 624 | py | Python | homeassistant/components/light/insteon_hub.py | davidedmundson/home-assistant | cd02563552ffc28239fa17c79a5d9bc0013bd5ac | [
"MIT"
] | null | null | null | homeassistant/components/light/insteon_hub.py | davidedmundson/home-assistant | cd02563552ffc28239fa17c79a5d9bc0013bd5ac | [
"MIT"
] | null | null | null | homeassistant/components/light/insteon_hub.py | davidedmundson/home-assistant | cd02563552ffc28239fa17c79a5d9bc0013bd5ac | [
"MIT"
] | 1 | 2018-11-20T17:44:08.000Z | 2018-11-20T17:44:08.000Z | """
homeassistant.components.light.insteon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Support for Insteon Hub lights.
"""
from homeassistant.components.insteon_hub import INSTEON, InsteonToggleDevice
def setup_platform(hass, config, add_devices, discovery_info=None):
""" Sets up the Insteon Hub light platform. """
... | 32.842105 | 77 | 0.677885 |
6ce1cbb5c8180e6b2722e37172b43bc380a6b812 | 3,481 | py | Python | exercises/fit_gaussian_estimators.py | YuvalAvshalom/IML.HUJI | 0afa89c23a1dc6b7c1e321ecd18fb3cb776bd4c7 | [
"MIT"
] | null | null | null | exercises/fit_gaussian_estimators.py | YuvalAvshalom/IML.HUJI | 0afa89c23a1dc6b7c1e321ecd18fb3cb776bd4c7 | [
"MIT"
] | null | null | null | exercises/fit_gaussian_estimators.py | YuvalAvshalom/IML.HUJI | 0afa89c23a1dc6b7c1e321ecd18fb3cb776bd4c7 | [
"MIT"
] | null | null | null | from IMLearn.learners import UnivariateGaussian, MultivariateGaussian
import numpy as np
import plotly.graph_objects as go
import plotly.io as pio
pio.templates.default = "simple_white"
SAMPLES_NUM = 1000
LEFT_CIRCLE = '('
RIGHT_CIRCLE = ')'
COMMA = ', '
GRAPH_SIZE = 500
HEATMAP_SIZE = 700
if __name__ == '__main__... | 35.520408 | 119 | 0.530882 |
6ce39f4772d1be6af817ba65217a2d9af6ad1bac | 562 | py | Python | WEEKS/CD_Sata-Structures/_RESOURCES/CODESIGNAL/digits_product.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_RESOURCES/CODESIGNAL/digits_product.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_RESOURCES/CODESIGNAL/digits_product.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | def digitsProduct(product):
"""
Given an integer product, find the smallest
positive (i.e. greater than 0) integer the
product of whose digits is equal to product.
If there is no such integer, return -1 instead.
Time Complexity: O(inf)
Space Complexity: O(1)
"""
number = 1
... | 25.545455 | 51 | 0.542705 |
6ce5b1fdedad3f99e65e3d1f3574b7a7cc248760 | 715 | py | Python | test/serial-gpu.py | ImperialCollegeLondon/software | e8bdb7935817af0fab4ab84b3cdd0509a8f7ccc8 | [
"BSD-3-Clause"
] | 8 | 2019-03-20T02:54:03.000Z | 2021-08-24T15:26:21.000Z | test/serial-gpu.py | ImperialCollegeLondon/software | e8bdb7935817af0fab4ab84b3cdd0509a8f7ccc8 | [
"BSD-3-Clause"
] | 32 | 2019-03-19T23:34:20.000Z | 2022-03-22T19:10:28.000Z | test/serial-gpu.py | ImperialCollegeLondon/software | e8bdb7935817af0fab4ab84b3cdd0509a8f7ccc8 | [
"BSD-3-Clause"
] | 4 | 2019-03-22T18:14:00.000Z | 2021-12-08T14:49:33.000Z | results = open('test-results-gpu.out', 'a')
results.write('** Starting serial GPU tests **\n')
try:
# Fresnel
#import fresnel
#results.write('Fresnel version : {}\n'.format(fresnel.__version__))
#dev = fresnel.Device(mode='gpu', n=1)
#results.write('Fresnel device : {}\n'.format(dev))
# H... | 31.086957 | 88 | 0.634965 |
6ce68ade0975f3498a289cd7d8896318aa38df5e | 1,027 | py | Python | Curso em Video/Desafio_023.py | tonmarcondes/UNIVESP | a66a623d4811e8f3f9e2999f09e38a4470035ae2 | [
"MIT"
] | null | null | null | Curso em Video/Desafio_023.py | tonmarcondes/UNIVESP | a66a623d4811e8f3f9e2999f09e38a4470035ae2 | [
"MIT"
] | null | null | null | Curso em Video/Desafio_023.py | tonmarcondes/UNIVESP | a66a623d4811e8f3f9e2999f09e38a4470035ae2 | [
"MIT"
] | null | null | null | numero = input('\nInsira um numero de 0 a 9999: \n')
if not numero.isnumeric():
print('Condio invlida, insira apenas nmeros\n')
elif len(numero) == 1:
print('\nA unidade do nmero {} {}\n'.format(numero, numero[-1]))
elif len(numero) == 2:
print('\nA unidade do nmero {} {}'.format(numero, numero[-1... | 48.904762 | 76 | 0.605648 |
6ce7fa57db757c55528fa98bee77cb99fa34cb9a | 4,785 | py | Python | mayan/apps/user_management/links.py | bonitobonita24/Mayan-EDMS | 7845fe0e1e83c81f5d227a16116397a3d3883b85 | [
"Apache-2.0"
] | 343 | 2015-01-05T14:19:35.000Z | 2018-12-10T19:07:48.000Z | mayan/apps/user_management/links.py | bonitobonita24/Mayan-EDMS | 7845fe0e1e83c81f5d227a16116397a3d3883b85 | [
"Apache-2.0"
] | 191 | 2015-01-03T00:48:19.000Z | 2018-11-30T09:10:25.000Z | mayan/apps/user_management/links.py | bonitobonita24/Mayan-EDMS | 7845fe0e1e83c81f5d227a16116397a3d3883b85 | [
"Apache-2.0"
] | 114 | 2015-01-08T20:21:05.000Z | 2018-12-10T19:07:53.000Z | from django.utils.translation import ugettext_lazy as _
from mayan.apps.authentication.link_conditions import condition_user_is_authenticated
from mayan.apps.navigation.classes import Link, Separator, Text
from mayan.apps.navigation.utils import factory_condition_queryset_access
from .icons import (
icon_current_... | 37.093023 | 85 | 0.777011 |
6ce92f7cc60e57aeb3a0f765328c9efb31ca244a | 626 | py | Python | .configs/sonatconfig.py | Armcollector/lockdown-workout | a1c4633c8bd47e399bc7297d77f980542885414e | [
"MIT"
] | null | null | null | .configs/sonatconfig.py | Armcollector/lockdown-workout | a1c4633c8bd47e399bc7297d77f980542885414e | [
"MIT"
] | null | null | null | .configs/sonatconfig.py | Armcollector/lockdown-workout | a1c4633c8bd47e399bc7297d77f980542885414e | [
"MIT"
] | null | null | null | import os
import urllib.parse
basedir = os.path.abspath(os.path.dirname(__file__))
if "DB_CONNECTIONSTRING" in os.environ:
params = urllib.parse.quote_plus(os.environ.get("DB_CONNECTIONSTRING"))
| 28.454545 | 79 | 0.728435 |
6ce9b98de4c25e47cb5bd0d8d6d6881984255a1c | 3,254 | py | Python | hier/search.py | ruslan-ok/ServerApps | 541aa12f1933054a12f590ce78544178be374669 | [
"MIT"
] | 1 | 2021-06-07T02:14:13.000Z | 2021-06-07T02:14:13.000Z | hier/search.py | ruslan-ok/ServerApps | 541aa12f1933054a12f590ce78544178be374669 | [
"MIT"
] | 9 | 2021-08-14T07:53:47.000Z | 2022-03-18T19:07:22.000Z | hier/search.py | ruslan-ok/ServerApps | 541aa12f1933054a12f590ce78544178be374669 | [
"MIT"
] | null | null | null | from django.utils.translation import gettext_lazy as _, gettext
from .utils import get_main_menu_item, APPS
ENTITIES = {
'apart': ('apart', 'apartment'),
'meter': ('meters data', 'execute'),
'bill': ('bill', 'cost'),
'service': ('service', 'key'),
'price': ('tari... | 35.369565 | 165 | 0.497234 |
6ce9ba705ab3634e77b1eb1d8846761d08e2253c | 6,288 | py | Python | utils/asyncTable.py | jiafangjun/DD_KaoRou | aa453db0793cac9202218bc5a28d5bed0ebeea99 | [
"MIT"
] | 108 | 2020-04-28T02:32:14.000Z | 2020-11-23T00:26:52.000Z | utils/asyncTable.py | zhimingshenjun/DD_KaoRou | aa453db0793cac9202218bc5a28d5bed0ebeea99 | [
"MIT"
] | 4 | 2020-04-29T13:05:29.000Z | 2020-05-05T12:00:43.000Z | utils/asyncTable.py | zhimingshenjun/DD_KaoRou | aa453db0793cac9202218bc5a28d5bed0ebeea99 | [
"MIT"
] | 9 | 2020-04-29T17:38:34.000Z | 2020-11-24T07:11:08.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import time
from PySide2.QtWidgets import QWidget, QMainWindow, QGridLayout, QFileDialog, QToolBar,\
QAction, QDialog, QStyle, QSlider, QLabel, QPushButton, QStackedWidget, QHBoxLayout,\
QLineEdit, QTableWidget, QAbstractItemView, QTableWidgetItem, QGrap... | 47.278195 | 132 | 0.578403 |
6ceaac512153bf1998132a4f1961ee9fbc239dba | 554,022 | py | Python | pyuvdata/uvdata/uvdata.py | e-koch/pyuvdata | ac36067f195c75127b28f02479eda1eb7a3400ed | [
"BSD-2-Clause"
] | null | null | null | pyuvdata/uvdata/uvdata.py | e-koch/pyuvdata | ac36067f195c75127b28f02479eda1eb7a3400ed | [
"BSD-2-Clause"
] | null | null | null | pyuvdata/uvdata/uvdata.py | e-koch/pyuvdata | ac36067f195c75127b28f02479eda1eb7a3400ed | [
"BSD-2-Clause"
] | null | null | null | # -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""Primary container for radio interferometer datasets."""
import os
import copy
from collections.abc import Iterable
import warnings
import threading
import numpy as np
from scipy impor... | 43.514138 | 88 | 0.560976 |
6ced9767f09be94c059293ba0ec574ce1794fa54 | 215 | py | Python | 30.strings/16.replace.py | robinson-1985/python-zero-dnc | df510d67e453611fcd320df1397cdb9ca47fecb8 | [
"MIT"
] | null | null | null | 30.strings/16.replace.py | robinson-1985/python-zero-dnc | df510d67e453611fcd320df1397cdb9ca47fecb8 | [
"MIT"
] | null | null | null | 30.strings/16.replace.py | robinson-1985/python-zero-dnc | df510d67e453611fcd320df1397cdb9ca47fecb8 | [
"MIT"
] | null | null | null | # 15. replace() -> Altera determinado valor de uma string por outro. Troca uma string por outra.
texto = 'vou Treinar todo Dia Python'
print(texto.replace('vou','Vamos'))
print(texto.replace('Python','Algoritmos')) | 43 | 96 | 0.734884 |
6ceeb319087817241b31a0ee42e7edc720a5fffe | 573 | py | Python | Aula 13/ex049P.py | alaanlimaa/Python_CVM1-2-3 | 6d9a9bd693580fd1679a1d0b23afd26841b962a6 | [
"MIT"
] | null | null | null | Aula 13/ex049P.py | alaanlimaa/Python_CVM1-2-3 | 6d9a9bd693580fd1679a1d0b23afd26841b962a6 | [
"MIT"
] | null | null | null | Aula 13/ex049P.py | alaanlimaa/Python_CVM1-2-3 | 6d9a9bd693580fd1679a1d0b23afd26841b962a6 | [
"MIT"
] | null | null | null | '''Refaa o DESAFIO 9, mostrando a tabuada de um nmero que o usurio escolher,
s que agora utilizando um lao for.'''
#RESOLUO ALAN
'''mult = int(input(' Digite um nmero para ver sua tabuada: '))
for num in range(1, 11):
rest = num * mult
print('{} X {} = {} '. format(num, mult, rest))'''
#RESOLUO PROFESSOR
from... | 27.285714 | 79 | 0.635253 |
6ceec6d6259423de30eaf0244fd138f63c906931 | 4,710 | py | Python | saleor/api/purchase/serializers.py | glosoftgroup/glosoftgroup-django-pos | b489c402939b9ebabd164c449e7da38fe849d550 | [
"BSD-3-Clause"
] | 2 | 2017-07-11T12:40:59.000Z | 2017-10-18T18:02:46.000Z | saleor/api/purchase/serializers.py | glosoftgroup/glosoftgroup-django-pos | b489c402939b9ebabd164c449e7da38fe849d550 | [
"BSD-3-Clause"
] | 12 | 2017-06-19T07:20:41.000Z | 2022-03-15T19:03:33.000Z | saleor/api/purchase/serializers.py | glosoftgroup/glosoftgroup-django-pos | b489c402939b9ebabd164c449e7da38fe849d550 | [
"BSD-3-Clause"
] | null | null | null | from django.utils.formats import localize
from rest_framework.serializers import (
ModelSerializer,
HyperlinkedIdentityField,
SerializerMethodField,
ValidationError,
)
from rest_framework import serializers
from django.contrib.auth import ... | 25.597826 | 85 | 0.562208 |
6cef339c16f78aea67a5d356f92c9371b336485d | 2,377 | py | Python | beautiful_fields/templatetags/beautiful_fields_tags.py | Excentrics/beautiful-fields | 7117cde6ac5646a5d65e166706b94898946a92b7 | [
"BSD-3-Clause"
] | null | null | null | beautiful_fields/templatetags/beautiful_fields_tags.py | Excentrics/beautiful-fields | 7117cde6ac5646a5d65e166706b94898946a92b7 | [
"BSD-3-Clause"
] | null | null | null | beautiful_fields/templatetags/beautiful_fields_tags.py | Excentrics/beautiful-fields | 7117cde6ac5646a5d65e166706b94898946a92b7 | [
"BSD-3-Clause"
] | null | null | null | from django import template
register = template.Library()
'''
# TEST AND VALIDATION
from django.template.defaultfilters import floatformat, special_floats
from decimal import Decimal as Decimal
vals = [
None,
'',
1,
1.9,
2.0,
0.1385798798,
0.2,
-0.5,
-0.0,
-5.0038,
18343... | 25.836957 | 79 | 0.615482 |
6cf05f1a7f8d9e9c0505d52939240080210e4ca9 | 3,877 | py | Python | tools/collect_bot_info.py | Dalanar/DotA2DraftBot | 6ff222782a6c40d99004eeee101ca912e6e8dd11 | [
"MIT"
] | 1 | 2017-01-12T07:13:28.000Z | 2017-01-12T07:13:28.000Z | tools/collect_bot_info.py | Dalanar/DotA2DraftBot | 6ff222782a6c40d99004eeee101ca912e6e8dd11 | [
"MIT"
] | 2 | 2017-01-02T08:55:13.000Z | 2017-01-10T14:48:56.000Z | tools/collect_bot_info.py | Dalanar/DotA2DraftBot | 6ff222782a6c40d99004eeee101ca912e6e8dd11 | [
"MIT"
] | 1 | 2019-07-04T20:03:22.000Z | 2019-07-04T20:03:22.000Z | import vdf
implemented_bots = set([
'npc_dota_hero_axe',
'npc_dota_hero_bane',
'npc_dota_hero_bounty_hunter',
'npc_dota_hero_bloodseeker',
'npc_dota_hero_bristleback',
'npc_dota_hero_chaos_knight',
'npc_dota_hero_crystal_maiden',
'npc_dota_hero_dazzle',
'npc_dota_hero_death... | 37.640777 | 150 | 0.605107 |
6cf3d683e2db7b466be99b176a67b586108082a3 | 147 | py | Python | maigret/__main__.py | noi4eg/maigret | d3b20e13dfa3df93dea1999201e250d5a7f82ad0 | [
"MIT"
] | 1,156 | 2020-08-30T08:06:59.000Z | 2022-03-31T17:42:14.000Z | maigret/__main__.py | noi4eg/maigret | d3b20e13dfa3df93dea1999201e250d5a7f82ad0 | [
"MIT"
] | 132 | 2020-08-30T13:53:21.000Z | 2022-03-31T18:42:42.000Z | maigret/__main__.py | noi4eg/maigret | d3b20e13dfa3df93dea1999201e250d5a7f82ad0 | [
"MIT"
] | 185 | 2020-08-30T08:15:00.000Z | 2022-03-31T22:49:02.000Z | #! /usr/bin/env python3
"""
Maigret entrypoint
"""
import asyncio
from .maigret import main
if __name__ == "__main__":
asyncio.run(main())
| 11.307692 | 26 | 0.673469 |
6cf481b9e35e180cf91908f12e638fa7c7e6f9dd | 80 | py | Python | 9_POO/generadorPassword/venv/lib/python3.9/site-packages/egcd/__init__.py | igijon/sge_2022 | 48228dad24c3d9fbcd7b0975c28095c40b15c4c3 | [
"MIT"
] | null | null | null | 9_POO/generadorPassword/venv/lib/python3.9/site-packages/egcd/__init__.py | igijon/sge_2022 | 48228dad24c3d9fbcd7b0975c28095c40b15c4c3 | [
"MIT"
] | null | null | null | 9_POO/generadorPassword/venv/lib/python3.9/site-packages/egcd/__init__.py | igijon/sge_2022 | 48228dad24c3d9fbcd7b0975c28095c40b15c4c3 | [
"MIT"
] | null | null | null | """Allow users to access the function directly."""
from egcd.egcd import egcd
| 26.666667 | 51 | 0.7375 |
6cf5c425b9a007093ff73fa1c5872a082b863b03 | 18,872 | py | Python | externals/libbot/bot2-procman/python/src/bot_procman/sheriff_config.py | ericmanzi/double_pendulum_lqr | 76bba3091295abb7d412c4a3156258918f280c96 | [
"BSD-3-Clause"
] | null | null | null | externals/libbot/bot2-procman/python/src/bot_procman/sheriff_config.py | ericmanzi/double_pendulum_lqr | 76bba3091295abb7d412c4a3156258918f280c96 | [
"BSD-3-Clause"
] | null | null | null | externals/libbot/bot2-procman/python/src/bot_procman/sheriff_config.py | ericmanzi/double_pendulum_lqr | 76bba3091295abb7d412c4a3156258918f280c96 | [
"BSD-3-Clause"
] | null | null | null | TokIdentifier = "Identifier"
TokOpenStruct = "OpenStruct"
TokCloseStruct = "CloseStruct"
TokAssign = "Assign"
TokEndStatement = "EndStatement"
TokString = "String"
TokEOF = "EOF"
TokComment = "Comment"
TokInteger = "Integer"
def escape_str(text):
return "".join([ escape_char(c) for c in text ])
def config_from_f... | 34.755064 | 106 | 0.572011 |
6cf6f83b90ce42f51aa9b2b61196aa521afa20ce | 6,286 | py | Python | tests/test_page_objects.py | rinkky/page-objects | 7f0313fb16482a2c8f161472d85d2f0dda6490c2 | [
"X11"
] | 97 | 2015-06-09T06:34:53.000Z | 2020-07-02T08:45:22.000Z | tests/test_page_objects.py | rinkky/page-objects | 7f0313fb16482a2c8f161472d85d2f0dda6490c2 | [
"X11"
] | 7 | 2015-06-17T15:33:15.000Z | 2019-12-02T20:55:38.000Z | tests/test_page_objects.py | rinkky/page-objects | 7f0313fb16482a2c8f161472d85d2f0dda6490c2 | [
"X11"
] | 40 | 2015-04-28T14:31:34.000Z | 2020-06-18T12:53:38.000Z | import inspect
try:
from unittest import mock
except ImportError:
import mock
import pytest
from selenium.webdriver.common.by import By
from selenium.webdriver.remote.webdriver import WebDriver, WebElement
from selenium.common.exceptions import NoSuchElementException
from page_objects import PageObject, Pag... | 34.538462 | 80 | 0.669265 |
6cf7f38147c6ceac137a1dddbaf8ea9d06083c5e | 1,355 | py | Python | flaskr/views/user_profile.py | qbbr/blog-backend-flask | b51555fff2ae1823ea6a61ca8064887e88479445 | [
"MIT"
] | null | null | null | flaskr/views/user_profile.py | qbbr/blog-backend-flask | b51555fff2ae1823ea6a61ca8064887e88479445 | [
"MIT"
] | null | null | null | flaskr/views/user_profile.py | qbbr/blog-backend-flask | b51555fff2ae1823ea6a61ca8064887e88479445 | [
"MIT"
] | null | null | null | from flask import Blueprint, jsonify, request
from flask_jwt_extended import jwt_required, get_jwt_identity
from marshmallow import ValidationError
from flaskr import db
from flaskr.helpers import error_bad_request, error_validation
from flaskr.models import User
from flaskr.schemas import UserProfileSchema
bp = Blue... | 31.511628 | 79 | 0.731365 |
6cf800fcc4613d29a520a2ec5bf292011684a4b3 | 6,394 | py | Python | pointerTable.py | dragonc0/LADXR | 31072400e3f01fdd2449971a8a53d39d6e349abe | [
"MIT"
] | null | null | null | pointerTable.py | dragonc0/LADXR | 31072400e3f01fdd2449971a8a53d39d6e349abe | [
"MIT"
] | null | null | null | pointerTable.py | dragonc0/LADXR | 31072400e3f01fdd2449971a8a53d39d6e349abe | [
"MIT"
] | null | null | null | import copy
import struct
| 39.9625 | 138 | 0.495777 |
6cf92cfddfadd9d50e03585da0f769ea7217673f | 2,092 | py | Python | userbot/modules/spam_protect.py | TAMILVIP007/javes-3.0 | d9238785fa2d79740bbb526aca92455dbccb3838 | [
"MIT"
] | 1 | 2021-05-06T18:30:50.000Z | 2021-05-06T18:30:50.000Z | userbot/modules/spam_protect.py | hellboi-atul/javes-3.0 | 8777d482bd1ee877a96332a2cd84d880c151fa43 | [
"MIT"
] | null | null | null | userbot/modules/spam_protect.py | hellboi-atul/javes-3.0 | 8777d482bd1ee877a96332a2cd84d880c151fa43 | [
"MIT"
] | null | null | null | #Telegram @javes05
import spamwatch, os, asyncio
from telethon import events
from userbot import client as javes, JAVES_NAME, JAVES_MSG
JAVES_NNAME = str(JAVES_NAME) if JAVES_NAME else str(JAVES_MSG)
swapi = os.environ.get("SPAMWATCH_API_KEY", None)
SPAM_PROTECT = os.environ.get("SPAM_PROTECT", None)
SPAMWATCH_SHOUT... | 44.510638 | 174 | 0.502868 |
6cf97a5e7fb1af82d37f64beb54252478889c38a | 2,483 | py | Python | populate_app_db.py | nshams365/item-catalog | 7811cbef335a07791807ea081168dcdc043726da | [
"MIT"
] | null | null | null | populate_app_db.py | nshams365/item-catalog | 7811cbef335a07791807ea081168dcdc043726da | [
"MIT"
] | null | null | null | populate_app_db.py | nshams365/item-catalog | 7811cbef335a07791807ea081168dcdc043726da | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from setup_app_db import Title, User, Base
engine = create_engine('sqlite:///book_catalog.db')
Base.metadata.bind = engine
DBSession = sessionmaker(bind=engine)
session = DBSession()
# Create dummy title
user1 = User(u_name="... | 26.698925 | 232 | 0.730165 |
6cfcc7a76feb1abd43a64d6e085b49c8a70e37fa | 755 | py | Python | coupon/logger.py | thewizardplusplus/coupon | 96ca82a3838c680e588896c50977912cbd2f2258 | [
"MIT"
] | null | null | null | coupon/logger.py | thewizardplusplus/coupon | 96ca82a3838c680e588896c50977912cbd2f2258 | [
"MIT"
] | 22 | 2017-02-14T20:35:40.000Z | 2017-07-01T01:57:15.000Z | coupon/logger.py | thewizardplusplus/coupon | 96ca82a3838c680e588896c50977912cbd2f2258 | [
"MIT"
] | null | null | null | import logging
import termcolor
| 24.354839 | 77 | 0.619868 |
6cff52c06a97dbdd16e1411fdd11b804c3f35e61 | 1,373 | py | Python | autonomia/features/weather.py | jamesperes/autonomiaBot | bbc90497d29fa16a85477281f87ceaeb7c3e55fc | [
"MIT"
] | 8 | 2018-03-22T21:46:30.000Z | 2021-04-07T07:06:05.000Z | autonomia/features/weather.py | jamesperes/autonomiaBot | bbc90497d29fa16a85477281f87ceaeb7c3e55fc | [
"MIT"
] | 42 | 2018-03-23T17:20:38.000Z | 2021-06-02T01:19:51.000Z | autonomia/features/weather.py | jamesperes/autonomiaBot | bbc90497d29fa16a85477281f87ceaeb7c3e55fc | [
"MIT"
] | 3 | 2018-03-26T20:30:53.000Z | 2020-01-18T13:52:32.000Z | import json
from urllib import parse, request
from telegram.ext import CallbackContext, CommandHandler
from telegram.update import Update
from autonomia.core import bot_handler
BASE_URL = "https://query.yahooapis.com/v1/public/yql?"
| 28.020408 | 73 | 0.661326 |
6cffbd65c3259cdce6bb8d63fcc07acc7911f4c6 | 5,733 | py | Python | 21-fs-ias-lec/13-RaptorCode/src/decoder.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 21-fs-ias-lec/13-RaptorCode/src/decoder.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 21-fs-ias-lec/13-RaptorCode/src/decoder.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import numpy as np
import utils
from utils import NUMBER_OF_ENCODED_BITS, VECTORLENGTH, Z, TransmissionPackage
| 36.056604 | 120 | 0.568114 |
9f0096648e2874f2a1dd4b98ee0c9a0e98ee7fdb | 2,006 | py | Python | sleepcounter/hardware_a/mocks.py | daveshed/sleepcounter-hardware-a | 8f8729b9e29b37d3f12b156dfd5b2cb277b1524d | [
"MIT"
] | null | null | null | sleepcounter/hardware_a/mocks.py | daveshed/sleepcounter-hardware-a | 8f8729b9e29b37d3f12b156dfd5b2cb277b1524d | [
"MIT"
] | null | null | null | sleepcounter/hardware_a/mocks.py | daveshed/sleepcounter-hardware-a | 8f8729b9e29b37d3f12b156dfd5b2cb277b1524d | [
"MIT"
] | null | null | null | """Mock hardware implementation"""
import logging
from stage import exceptions
from unittest.mock import Mock
LOGGER = logging.getLogger("mock")
| 23.057471 | 69 | 0.589232 |
9f01d83bfd543dbc5808bc7589718084e0296fe1 | 6,861 | py | Python | my_work/ch2_lists_and_pointer_structures/singly_linked_lists.py | gabrielavirna/PythonDataStructuresAndAlgorithms | d406dc247a8ff2f39ee5aac2a398027298ffbf69 | [
"MIT"
] | 1 | 2019-01-22T04:59:02.000Z | 2019-01-22T04:59:02.000Z | my_work/ch2_lists_and_pointer_structures/singly_linked_lists.py | gabrielavirna/python_data_structures_and_algorithms | d406dc247a8ff2f39ee5aac2a398027298ffbf69 | [
"MIT"
] | null | null | null | my_work/ch2_lists_and_pointer_structures/singly_linked_lists.py | gabrielavirna/python_data_structures_and_algorithms | d406dc247a8ff2f39ee5aac2a398027298ffbf69 | [
"MIT"
] | null | null | null | """
Singly linked lists
-------------------
- is a list with only 1 pointer between 2 successive nodes
- It can only be traversed in a single direction: from the 1st node in the list to the last node
Several problems
----------------
It requires too much manual work by the programmer
It is too error-prone (this is a ... | 29.830435 | 119 | 0.637079 |
9f01e6da899f6d81dfa4b4fe9c15bd9084a5870b | 78 | py | Python | codechef/FLOW004.py | andraantariksa/code-exercise-answer | 69b7dbdc081cdb094cb110a72bc0c9242d3d344d | [
"MIT"
] | 1 | 2019-11-06T15:17:48.000Z | 2019-11-06T15:17:48.000Z | codechef/FLOW004.py | andraantariksa/code-exercise-answer | 69b7dbdc081cdb094cb110a72bc0c9242d3d344d | [
"MIT"
] | null | null | null | codechef/FLOW004.py | andraantariksa/code-exercise-answer | 69b7dbdc081cdb094cb110a72bc0c9242d3d344d | [
"MIT"
] | 1 | 2018-11-13T08:43:26.000Z | 2018-11-13T08:43:26.000Z | for _ in range(int(input())):
n = input()
print(int(n[0])+int(n[-1]))
| 19.5 | 31 | 0.512821 |
9f02328459eb7de455227b7b8b982b827b8b597d | 200 | py | Python | clouds/experiments/__init__.py | jchen42703/reproducing-cloud-3rd-place | 25571f53efd48f68735d7fe2991e3ad783cbd4b1 | [
"Apache-2.0"
] | 1 | 2020-03-22T19:42:38.000Z | 2020-03-22T19:42:38.000Z | clouds/experiments/__init__.py | jchen42703/reproducing-cloud-3rd-place | 25571f53efd48f68735d7fe2991e3ad783cbd4b1 | [
"Apache-2.0"
] | 5 | 2020-03-19T17:50:03.000Z | 2020-03-21T20:10:26.000Z | clouds/experiments/__init__.py | jchen42703/reproducing-cloud-3rd-place | 25571f53efd48f68735d7fe2991e3ad783cbd4b1 | [
"Apache-2.0"
] | null | null | null | from .utils import get_train_transforms, get_val_transforms, \
get_preprocessing, seed_everything
from .train_2d import TrainSegExperiment
from .infer import GeneralInferExperiment
| 40 | 62 | 0.79 |
9f02894ebc954a270f5715baabf264b3e5cc54c2 | 7,513 | py | Python | app.py | gborn/Generating-Multiple-Choice-Questions-From-Any-Text | 521c9297d3115a89e3ff8a74230d3b8390aa57d8 | [
"MIT"
] | 1 | 2022-01-29T04:26:41.000Z | 2022-01-29T04:26:41.000Z | app.py | gborn/Generating-Multiple-Choice-Questions-From-Any-Text | 521c9297d3115a89e3ff8a74230d3b8390aa57d8 | [
"MIT"
] | null | null | null | app.py | gborn/Generating-Multiple-Choice-Questions-From-Any-Text | 521c9297d3115a89e3ff8a74230d3b8390aa57d8 | [
"MIT"
] | null | null | null |
from src.answerkey import AnswerKey
from src.model import Model, unmasker
import streamlit as st
PAGE_CONFIG = {"page_title":"MCQ-App by Glad Nayak","page_icon":":white_check_mark:"}
st.set_page_config(**PAGE_CONFIG)
def render_input():
"""
Renders text area for input, and button
"""
# source of defa... | 98.855263 | 1,344 | 0.763077 |
9f031046a6a5d1910fe9a095791a6d9f8768fb8d | 687 | py | Python | FORTRAN/bardell/linear_buckling_cpanel/verification_cpanel.py | mrosemeier/compmech | f18f6d0471c72b26a3b014d2df41df3463505eae | [
"BSD-3-Clause"
] | 4 | 2019-02-05T06:12:12.000Z | 2022-03-25T14:41:18.000Z | FORTRAN/bardell/linear_buckling_cpanel/verification_cpanel.py | mrosemeier/compmech | f18f6d0471c72b26a3b014d2df41df3463505eae | [
"BSD-3-Clause"
] | null | null | null | FORTRAN/bardell/linear_buckling_cpanel/verification_cpanel.py | mrosemeier/compmech | f18f6d0471c72b26a3b014d2df41df3463505eae | [
"BSD-3-Clause"
] | 2 | 2019-06-05T07:19:35.000Z | 2020-12-29T00:22:18.000Z | from compmech.stiffpanelbay import StiffPanelBay
spb = StiffPanelBay()
spb.a = 2.
spb.b = 1.
spb.r = 2.
spb.stack = [0, 90, 90, 0, -45, +45]
spb.plyt = 1e-3*0.125
spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
spb.model = 'cpanel_clt_donnell_bardell'
spb.m = 15
spb.n = 16
spb.u1tx = 0.
spb.u1rx = 1.
spb... | 16.357143 | 60 | 0.617176 |
9f03f062a720d101370b2aeaa19a382b35aa2aa7 | 2,203 | py | Python | test/unittests/analysis/mri/test_base.py | monashbiomedicalimaging/nianalysis | d69c38eed52ae557a849889930cd659cdb3c6401 | [
"Apache-2.0"
] | 2 | 2019-11-14T01:02:26.000Z | 2022-03-17T01:47:01.000Z | test/unittests/analysis/mri/test_base.py | MonashBI/banana | 37364243b520ab14ac1243005dbd465f824542b4 | [
"Apache-2.0"
] | 18 | 2019-04-03T04:25:55.000Z | 2020-06-08T06:00:56.000Z | test/unittests/analysis/mri/test_base.py | MonashBI/nianalysis | 37364243b520ab14ac1243005dbd465f824542b4 | [
"Apache-2.0"
] | 4 | 2018-05-23T07:13:02.000Z | 2018-08-24T04:05:31.000Z | from banana.analysis.mri.base import MriAnalysis
from banana.utils.testing import AnalysisTester, PipelineTester, TEST_CACHE_DIR
from banana import FilesetFilter
from arcana.repository.xnat import XnatRepo
| 34.968254 | 79 | 0.663187 |
9f05226afec709be950e9d25b3968e7c2da2d83d | 1,290 | py | Python | crypto/classic/subst/vigenere.py | jrlambea/ctf_tools | a563d5b603d87529d494c882e1dc17377c8b904f | [
"MIT"
] | null | null | null | crypto/classic/subst/vigenere.py | jrlambea/ctf_tools | a563d5b603d87529d494c882e1dc17377c8b904f | [
"MIT"
] | null | null | null | crypto/classic/subst/vigenere.py | jrlambea/ctf_tools | a563d5b603d87529d494c882e1dc17377c8b904f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
__author__ = "JR. Lambea"
__copyright__ = "Copyright 2015"
__credits__ = ["JR. Lambea"]
__license__ = "GPL"
__version__ = "1.0.0"
__maintainer__ = "JR. Lambea"
__email__ = "jr.lambea@yahoo.com"
__status__ = ""
import sys
import argparse
if __name__ == "__main__":
main()
| 22.241379 | 140 | 0.651163 |
9f05cb39a0e710373d52bb0986bb7df178e23e03 | 3,465 | py | Python | pip/toto/models/common.py | team-ferret/pip-toto | 7a20c056be0dfcb64b880774c03395c9fe08a438 | [
"MIT"
] | 1 | 2021-03-09T16:46:28.000Z | 2021-03-09T16:46:28.000Z | pip/toto/models/common.py | team-ferret/pip-toto | 7a20c056be0dfcb64b880774c03395c9fe08a438 | [
"MIT"
] | null | null | null | pip/toto/models/common.py | team-ferret/pip-toto | 7a20c056be0dfcb64b880774c03395c9fe08a438 | [
"MIT"
] | null | null | null | """
<Program Name>
common.py
<Author>
Lukas Puehringer <lukas.puehringer@nyu.edu>
Santiago Torres <santiago@nyu.edu>
<Started>
Sep 23, 2016
<Copyright>
See LICENSE for licensing information.
<Purpose>
Provides base classes for various classes in the model.
<Classes>
Metablock:
pretty printed ca... | 27.283465 | 80 | 0.694372 |
9f06666109409538bd3e098b187da1a2987b3910 | 1,034 | py | Python | application.py | ane4katv/python_training | d8ba6dbed0b43402e8b09a5b6cf8de52703e18a1 | [
"Apache-2.0"
] | null | null | null | application.py | ane4katv/python_training | d8ba6dbed0b43402e8b09a5b6cf8de52703e18a1 | [
"Apache-2.0"
] | null | null | null | application.py | ane4katv/python_training | d8ba6dbed0b43402e8b09a5b6cf8de52703e18a1 | [
"Apache-2.0"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
| 32.3125 | 108 | 0.662476 |
9f06cf95ce0ef6f08bed1fb63d57780556f6d2fe | 704 | py | Python | codes/network/__init__.py | upzheng/Electrocardio-Panorama | 258e545b22e910bd75047f9011970ff16c50766f | [
"MIT"
] | 33 | 2021-05-06T06:44:11.000Z | 2022-03-25T06:20:26.000Z | codes/network/__init__.py | upzheng/Electrocardio-Panorama | 258e545b22e910bd75047f9011970ff16c50766f | [
"MIT"
] | 3 | 2021-10-08T09:15:42.000Z | 2022-03-29T02:47:02.000Z | codes/network/__init__.py | upzheng/Electrocardio-Panorama | 258e545b22e910bd75047f9011970ff16c50766f | [
"MIT"
] | 5 | 2021-06-09T11:01:46.000Z | 2022-02-25T13:46:01.000Z | from .model_nefnet import Model_nefnet
from torch.nn import MSELoss, L1Loss, CrossEntropyLoss
from .loss import losswrapper, MSELead
| 27.076923 | 93 | 0.661932 |
9f0810d6e1403ceb89071bec522c48c3ac61b892 | 8,942 | py | Python | guild/deps.py | Jim-Holmstroem/guildai | ed80e307fca20c0d607c600180cdb0854f42021d | [
"Apache-2.0"
] | null | null | null | guild/deps.py | Jim-Holmstroem/guildai | ed80e307fca20c0d607c600180cdb0854f42021d | [
"Apache-2.0"
] | null | null | null | guild/deps.py | Jim-Holmstroem/guildai | ed80e307fca20c0d607c600180cdb0854f42021d | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-2020 TensorHub, 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 writ... | 33.118519 | 85 | 0.630396 |
9f08bf7a9be74e2413c2f47b167c933d97a2d0c1 | 12,770 | py | Python | perm_hmm/policies/belief_tree.py | usnistgov/perm_hmm | b57b3cca51d0d91bde438a62f26c0b0123c26aa5 | [
"Apache-2.0"
] | null | null | null | perm_hmm/policies/belief_tree.py | usnistgov/perm_hmm | b57b3cca51d0d91bde438a62f26c0b0123c26aa5 | [
"Apache-2.0"
] | null | null | null | perm_hmm/policies/belief_tree.py | usnistgov/perm_hmm | b57b3cca51d0d91bde438a62f26c0b0123c26aa5 | [
"Apache-2.0"
] | null | null | null | r"""Provides functions used by strategies that use a tree to select the
permutation.
To compute optimal permutations, we use the belief states
.. math::
b(y^{k-1}) := \mathbb{P}(s_0, s_k|y^{k-1}),
where the :math:`s_k` are the states of the HMM at step :math:`k`, and the
superscript :math:`y^{k-1}` is the sequen... | 46.436364 | 130 | 0.637901 |
9f09542fe4875bd5504e95caec22e4558b8a94ef | 1,424 | py | Python | setup.py | zhul9311/XFNTR | 4f2e58775c6bb0df9a90e2854e7532f15f0e341a | [
"MIT"
] | null | null | null | setup.py | zhul9311/XFNTR | 4f2e58775c6bb0df9a90e2854e7532f15f0e341a | [
"MIT"
] | null | null | null | setup.py | zhul9311/XFNTR | 4f2e58775c6bb0df9a90e2854e7532f15f0e341a | [
"MIT"
] | null | null | null | # All .ui files and .so files are added through keyword: package_data, because setuptools doesn't include them automatically.
import sys
import os
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name = "xfntr",
version = "0.3.0",
autho... | 27.384615 | 125 | 0.558287 |
9f0cf9dacde698a4632f08679730078e59456da8 | 720 | py | Python | scripts/subsample_model_files.py | musicpiano/mlmicrophysics | 720e09b9003285e4e601df8befd58337bee691f5 | [
"MIT"
] | 4 | 2021-01-05T13:18:28.000Z | 2021-09-29T09:53:28.000Z | scripts/subsample_model_files.py | musicpiano/mlmicrophysics | 720e09b9003285e4e601df8befd58337bee691f5 | [
"MIT"
] | 5 | 2020-11-16T15:53:24.000Z | 2021-07-22T20:16:11.000Z | scripts/subsample_model_files.py | musicpiano/mlmicrophysics | 720e09b9003285e4e601df8befd58337bee691f5 | [
"MIT"
] | 4 | 2020-07-08T13:04:44.000Z | 2022-01-09T13:36:55.000Z | import xarray as xr
import argparse
from glob import glob
if __name__ == "__main__":
main() | 37.894737 | 90 | 0.652778 |
9f0ebe9d5e07f84acae7dcbce8b140dde1d99a45 | 7,099 | py | Python | main.py | dddzg/MoCo | 94125b06235032cf74768709bac36e3ffbeb3f7c | [
"MIT"
] | 41 | 2019-12-04T09:56:22.000Z | 2022-02-10T13:07:37.000Z | main.py | dddzg/MoCo | 94125b06235032cf74768709bac36e3ffbeb3f7c | [
"MIT"
] | 5 | 2020-03-17T06:53:33.000Z | 2021-01-16T20:15:14.000Z | main.py | dddzg/MoCo | 94125b06235032cf74768709bac36e3ffbeb3f7c | [
"MIT"
] | 6 | 2019-12-21T06:50:58.000Z | 2021-12-04T20:48:16.000Z | from torchvision import transforms, datasets
from torch.utils.data import DataLoader
import config
from dataset import custom_dataset
import pretrainedmodels as models
import torch
from tqdm import tqdm
from torch.nn import functional as F
import types
from utils import AverageMeter, get_shuffle_idx
import os
from util... | 36.973958 | 114 | 0.612762 |
9f10006267ccc0675cf18d5cd79c4fd8c9f5f569 | 1,957 | py | Python | covid_briefing.py | jron-reb/CA-3 | a278fae6b863d4dc44e6da0c5d1b672e9b93393b | [
"MIT"
] | null | null | null | covid_briefing.py | jron-reb/CA-3 | a278fae6b863d4dc44e6da0c5d1b672e9b93393b | [
"MIT"
] | null | null | null | covid_briefing.py | jron-reb/CA-3 | a278fae6b863d4dc44e6da0c5d1b672e9b93393b | [
"MIT"
] | null | null | null | """
module contains a function that polls the ukcovid api in order to find up to date
information about coronavirus in the UK
"""
import json
import logging
from uk_covid19 import Cov19API
from requests import get
logging.basicConfig(level=logging.DEBUG, filename='sys.log')
def get_covid() -> str:
"""... | 39.938776 | 98 | 0.671947 |
9f109b8c71bc216b9f304425a1fe0bb9187d6712 | 1,187 | py | Python | TaskManage/models.py | CooloiStudio/django-hotel-manager | dce558bfeedbb45e5d58bc875dfa936940d57ed5 | [
"MIT"
] | 1 | 2021-08-07T18:44:32.000Z | 2021-08-07T18:44:32.000Z | TaskManage/models.py | CooloiStudio/django-hotel-manager | dce558bfeedbb45e5d58bc875dfa936940d57ed5 | [
"MIT"
] | null | null | null | TaskManage/models.py | CooloiStudio/django-hotel-manager | dce558bfeedbb45e5d58bc875dfa936940d57ed5 | [
"MIT"
] | 1 | 2017-09-10T07:23:05.000Z | 2017-09-10T07:23:05.000Z | # coding: utf-8
from django.db import models
from django.contrib.auth.models import User
from RoomManage.models import Room, Customs
# Create your models here.
| 27.604651 | 93 | 0.676495 |
9f10e94c964ce66f7a8b92cc263cc90bcb46f403 | 400 | py | Python | test/pypendency/test_parser.py | Taschenbergerm/pypendency | d941f584cabd0e6acc56ec3df43be174198ae4b7 | [
"Apache-2.0"
] | null | null | null | test/pypendency/test_parser.py | Taschenbergerm/pypendency | d941f584cabd0e6acc56ec3df43be174198ae4b7 | [
"Apache-2.0"
] | 1 | 2021-06-23T15:05:40.000Z | 2021-06-23T15:05:40.000Z | test/pypendency/test_parser.py | Taschenbergerm/pypendency | d941f584cabd0e6acc56ec3df43be174198ae4b7 | [
"Apache-2.0"
] | null | null | null | import pathlib
import pytest
from pypendency.parser.yaml import Parser
from pypendency.lexer import LarkRelationLexer
| 23.529412 | 65 | 0.73 |
9f11ad86c1a7f6d1888aeabc2cabec9e7fdb4c14 | 842 | py | Python | tests.py | fredrikaverpil/python-rust | 06bedd1b3bea93af3eaafb0154447a18aba56118 | [
"MIT"
] | 1 | 2021-09-23T19:30:04.000Z | 2021-09-23T19:30:04.000Z | tests.py | fredrikaverpil/python-rust | 06bedd1b3bea93af3eaafb0154447a18aba56118 | [
"MIT"
] | null | null | null | tests.py | fredrikaverpil/python-rust | 06bedd1b3bea93af3eaafb0154447a18aba56118 | [
"MIT"
] | null | null | null | import re
import string
import random
import mylib
# Python ZIP version
# Python REGEXP version
double_re = re.compile(r'(?=(.)\1)')
# Benchmark it
# generate 1M of random letters to test it
val = ''.join(random.choice(string.ascii_letters) for i in range(1000000))
| 21.05 | 74 | 0.693587 |
9f14982bbe3f83710d22b85ba6beb2a13fe3b1e7 | 329 | py | Python | feapder/network/user_pool/__init__.py | ibryang/feapder | 14b1c1e9bd0953ea8af102d6d220fed4b79d0a5c | [
"MIT"
] | 876 | 2021-02-09T11:08:04.000Z | 2022-03-31T21:14:11.000Z | feapder/network/user_pool/__init__.py | ibryang/feapder | 14b1c1e9bd0953ea8af102d6d220fed4b79d0a5c | [
"MIT"
] | 94 | 2021-02-20T07:59:28.000Z | 2022-03-28T09:54:53.000Z | feapder/network/user_pool/__init__.py | ibryang/feapder | 14b1c1e9bd0953ea8af102d6d220fed4b79d0a5c | [
"MIT"
] | 172 | 2021-02-22T08:24:44.000Z | 2022-03-29T08:15:27.000Z | __all__ = [
"GuestUserPool",
"GuestUser",
"NormalUserPool",
"NormalUser",
"GoldUserPool",
"GoldUser",
"GoldUserStatus",
]
from .gold_user_pool import GoldUserPool, GoldUser, GoldUserStatus
from .guest_user_pool import GuestUserPool, GuestUser
from .normal_user_pool import NormalUserPool, No... | 23.5 | 66 | 0.735562 |
9f16a103699a0493911a1bced040dcaaad5e2781 | 5,954 | py | Python | src/rez/cli/memcache.py | maxnbk/rez | 762c5cfce17eabde67eb5582498406eb3544daf0 | [
"Apache-2.0"
] | null | null | null | src/rez/cli/memcache.py | maxnbk/rez | 762c5cfce17eabde67eb5582498406eb3544daf0 | [
"Apache-2.0"
] | null | null | null | src/rez/cli/memcache.py | maxnbk/rez | 762c5cfce17eabde67eb5582498406eb3544daf0 | [
"Apache-2.0"
] | 1 | 2020-09-24T08:33:43.000Z | 2020-09-24T08:33:43.000Z | # Copyright Contributors to the Rez project
#
# 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 ... | 32.714286 | 88 | 0.571213 |
9f16b56179abddee7eeec967dbe0ed0f81253019 | 124 | py | Python | core/data/Cityscape/__init__.py | js-fan/MCIC | a98927e2d88452d96f1fba99a5dc25a5f518caa8 | [
"MIT"
] | 1 | 2021-07-19T21:52:46.000Z | 2021-07-19T21:52:46.000Z | core/data/Cityscape/__init__.py | js-fan/MCIC | a98927e2d88452d96f1fba99a5dc25a5f518caa8 | [
"MIT"
] | null | null | null | core/data/Cityscape/__init__.py | js-fan/MCIC | a98927e2d88452d96f1fba99a5dc25a5f518caa8 | [
"MIT"
] | null | null | null | from .cs_loader import CSPointDataset
from .cs_class_loader import CSClassDataset
from .cs_seed_loader import CSSeedDataset
| 31 | 43 | 0.879032 |
9f16b7604472b4df4adc8e900195443eaeab2e23 | 1,235 | py | Python | lib/sxc/actuator.py | GoogleCloudPlatform/SourceXCloud | c1397e5b9a6989fc4adf54d7957f73a95c5bcdc8 | [
"Apache-2.0"
] | 3 | 2017-11-29T16:15:21.000Z | 2021-10-09T18:32:16.000Z | lib/sxc/actuator.py | GoogleCloudPlatform/SourceXCloud | c1397e5b9a6989fc4adf54d7957f73a95c5bcdc8 | [
"Apache-2.0"
] | null | null | null | lib/sxc/actuator.py | GoogleCloudPlatform/SourceXCloud | c1397e5b9a6989fc4adf54d7957f73a95c5bcdc8 | [
"Apache-2.0"
] | 3 | 2016-07-12T02:10:35.000Z | 2021-03-21T10:24:19.000Z | # Copyright 2015 Google 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 writing, ... | 30.875 | 74 | 0.704453 |
9f16f735c3c599fc2596af8a0c9fd7ff4f482bbc | 2,432 | py | Python | linuxjournalarchiver.py | jcjordyn130/linuxjournalarchiver | b7580cd17c58af7d9bccfa53807cc9ec6581fc0e | [
"BSD-3-Clause"
] | null | null | null | linuxjournalarchiver.py | jcjordyn130/linuxjournalarchiver | b7580cd17c58af7d9bccfa53807cc9ec6581fc0e | [
"BSD-3-Clause"
] | null | null | null | linuxjournalarchiver.py | jcjordyn130/linuxjournalarchiver | b7580cd17c58af7d9bccfa53807cc9ec6581fc0e | [
"BSD-3-Clause"
] | null | null | null | # linuxjournalarchiver - Some hacky code I wrote to archive the Linux Journal.
# Licensed under the BSD-3-Clause license.
from bs4 import BeautifulSoup
import requests
import re
import pathlib
# Download the download page.
print("Downloading magazine list...")
session = requests.session()
# Update the User Agent to c... | 33.315068 | 84 | 0.630345 |
9f1a77ebd61987c0e53368471dad9d42d5b2f750 | 548 | py | Python | mtianyan/listname.py | mtianyan/mtianyan | 6c8f3d2076da4f472f6734714f1352ffaa5264b1 | [
"Apache-2.0"
] | null | null | null | mtianyan/listname.py | mtianyan/mtianyan | 6c8f3d2076da4f472f6734714f1352ffaa5264b1 | [
"Apache-2.0"
] | null | null | null | mtianyan/listname.py | mtianyan/mtianyan | 6c8f3d2076da4f472f6734714f1352ffaa5264b1 | [
"Apache-2.0"
] | 4 | 2020-11-29T14:25:39.000Z | 2021-04-05T07:17:56.000Z | import os.path
filepathlist=[]
filenamelist=[]
getpatch('H:\CodePath\NoteBook\uber_input')
fw = open('data_list.txt','w')
for item in filenamelist:
fw.write(item+'\n')
| 28.842105 | 54 | 0.662409 |
9f1b53d078da5b69adb58ccf7772f687a6128974 | 4,858 | py | Python | artifacts/pull_sources.py | onedata/bamboo | 5f6ce4234a75d150e8c9bfd60054d6a96bfcc3c1 | [
"MIT"
] | null | null | null | artifacts/pull_sources.py | onedata/bamboo | 5f6ce4234a75d150e8c9bfd60054d6a96bfcc3c1 | [
"MIT"
] | null | null | null | artifacts/pull_sources.py | onedata/bamboo | 5f6ce4234a75d150e8c9bfd60054d6a96bfcc3c1 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
"""
Pulls artifacts from external repo using branches defined in branchConfig.yaml
file.
Run the script with -h flag to learn about script's running options.
"""
__author__ = "Michal Cwiertnia"
__copyright__ = "Copyright (C) 2018 ACK CYFRONET AGH"
__license__ = "This software is released under ... | 38.864 | 98 | 0.512762 |
9f1b577bee0eed95315bb683c1d863d69af58309 | 845 | py | Python | setup.py | strath-sdr/rfsoc_notebooks | 9608a77ceb6545e939309ecb1093ee870625e095 | [
"BSD-3-Clause"
] | 8 | 2021-03-01T00:11:28.000Z | 2022-01-25T23:36:21.000Z | setup.py | strath-sdr/rfsoc_notebooks | 9608a77ceb6545e939309ecb1093ee870625e095 | [
"BSD-3-Clause"
] | null | null | null | setup.py | strath-sdr/rfsoc_notebooks | 9608a77ceb6545e939309ecb1093ee870625e095 | [
"BSD-3-Clause"
] | 4 | 2021-03-05T15:58:09.000Z | 2022-01-11T10:28:06.000Z | import os
import shutil
from distutils.dir_util import copy_tree
from setuptools import find_packages, setup
# global variables
nb_dir = os.environ['PYNQ_JUPYTER_NOTEBOOKS']
package_name = 'pystrath_rfsoc'
pip_name = 'pystrath-rfsoc'
data_files = []
# copy common notebooks to jupyter home
copy_common_notebooks()
s... | 23.472222 | 73 | 0.693491 |
9f1b5c4fac93e2e8e19afd05e5185ce9a5959531 | 7,682 | py | Python | test/test_query.py | jayvdb/version-query | e9b7c8887d18441bc3a79205f236d6b20eea2930 | [
"Apache-2.0"
] | null | null | null | test/test_query.py | jayvdb/version-query | e9b7c8887d18441bc3a79205f236d6b20eea2930 | [
"Apache-2.0"
] | null | null | null | test/test_query.py | jayvdb/version-query | e9b7c8887d18441bc3a79205f236d6b20eea2930 | [
"Apache-2.0"
] | null | null | null | """Tests of querying tools."""
import contextlib
import importlib
import io
import logging
import os
import pathlib
import sys
import tempfile
import unittest
from version_query.version import VersionComponent, Version
from version_query.git_query import query_git_repo, predict_git_repo
from version_query.py_query im... | 41.080214 | 96 | 0.669357 |
9f1c2546b04d443c1ae8a04369e0722359f68afc | 728 | py | Python | app/main/forms.py | Ag-nes/Blog | 3c8c3f50b2eb6dffe19392179b4c2fda1718e926 | [
"MIT"
] | null | null | null | app/main/forms.py | Ag-nes/Blog | 3c8c3f50b2eb6dffe19392179b4c2fda1718e926 | [
"MIT"
] | null | null | null | app/main/forms.py | Ag-nes/Blog | 3c8c3f50b2eb6dffe19392179b4c2fda1718e926 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField, SelectField ,SubmitField
from wtforms.validators import input_required
| 31.652174 | 84 | 0.75 |
9f1c5fd349b7d26a420b931b4c0db17b38bcc27d | 647 | py | Python | test/lit/memberfield/__init__.py | sivachandra/gala | 6d7e5fd3cf3c319062a3985dbffd791944e180e9 | [
"Apache-2.0"
] | 4 | 2016-07-16T01:35:30.000Z | 2020-06-18T05:37:33.000Z | test/lit/memberfield/__init__.py | sivachandra/gala | 6d7e5fd3cf3c319062a3985dbffd791944e180e9 | [
"Apache-2.0"
] | 7 | 2015-06-26T19:24:30.000Z | 2015-08-18T18:16:11.000Z | test/lit/memberfield/__init__.py | sivachandra/gala | 6d7e5fd3cf3c319062a3985dbffd791944e180e9 | [
"Apache-2.0"
] | null | null | null | import gdb
derived = gdb.lookup_type("Derived")
for f in derived.fields():
print_field(f)
enum = gdb.lookup_type("EnumType")
for f in enum.fields():
print_field(f)
| 23.962963 | 46 | 0.630603 |
9f1d626a1d893e3b39612703d70895dd7ca60253 | 42,581 | py | Python | source/main.py | psythefirst/bibrarian | 9a88921ee442b44b57d7e1e9d0e8d2d395541653 | [
"MIT"
] | 4 | 2018-07-05T15:48:33.000Z | 2020-01-22T16:59:02.000Z | source/main.py | psythefirst/bibrarian | 9a88921ee442b44b57d7e1e9d0e8d2d395541653 | [
"MIT"
] | null | null | null | source/main.py | psythefirst/bibrarian | 9a88921ee442b44b57d7e1e9d0e8d2d395541653 | [
"MIT"
] | 1 | 2019-05-02T17:18:46.000Z | 2019-05-02T17:18:46.000Z | import argparse
import getpass
import glob
import hashlib
import itertools
import json
import logging
import os
import sys
import threading
import time
import traceback
import subprocess
import urllib
import urllib.request
import urllib.parse
import urwid
import pybtex
import pybtex.database
def OnSelectionHand... | 34.731648 | 129 | 0.552594 |
9f1dd961d3e84df7e11d43cbab3f1cd8de101859 | 11,144 | py | Python | pipeline_scripts/pre_linkage/E_CCS_Households.py | Data-Linkage/ccslink | ee1105888d43c6a2b307deb96ddede34d03a965f | [
"MIT"
] | null | null | null | pipeline_scripts/pre_linkage/E_CCS_Households.py | Data-Linkage/ccslink | ee1105888d43c6a2b307deb96ddede34d03a965f | [
"MIT"
] | null | null | null | pipeline_scripts/pre_linkage/E_CCS_Households.py | Data-Linkage/ccslink | ee1105888d43c6a2b307deb96ddede34d03a965f | [
"MIT"
] | null | null | null | # ----------------------- #
# -------- SETUP -------- #
# ----------------------- #
# Import PySpark, Parameters, File Paths, Functions & Packages
import pyspark
from CCSLink import Parameters
from CCSLink.Parameters import FILE_PATH
from CCSLink import Person_Functions as PF
from CCSLink import Household_Functions as... | 56 | 181 | 0.631551 |
9f1edfe99b6308d3d2554579aa4a79c439a3f872 | 199 | py | Python | abc130/b/b.py | KeiNishikawa218/atcoder | 0af5e091f8b1fd64d5ca7b46b06b9356eacfe601 | [
"MIT"
] | null | null | null | abc130/b/b.py | KeiNishikawa218/atcoder | 0af5e091f8b1fd64d5ca7b46b06b9356eacfe601 | [
"MIT"
] | null | null | null | abc130/b/b.py | KeiNishikawa218/atcoder | 0af5e091f8b1fd64d5ca7b46b06b9356eacfe601 | [
"MIT"
] | null | null | null | n, x = map(int, input().split())
ll = list(map(int, input().split()))
ans = 1
d_p = 0
d_c = 0
for i in range(n):
d_c = d_p + ll[i]
if d_c <= x:
ans += 1
d_p = d_c
print(ans) | 13.266667 | 37 | 0.487437 |
9f2096e503b1764311d574ee845445b547da7b73 | 453 | py | Python | Django/ballon/admin.py | ballon3/GRAD | c630e32272fe34ead590c04d8360169e02be87f1 | [
"MIT"
] | null | null | null | Django/ballon/admin.py | ballon3/GRAD | c630e32272fe34ead590c04d8360169e02be87f1 | [
"MIT"
] | null | null | null | Django/ballon/admin.py | ballon3/GRAD | c630e32272fe34ead590c04d8360169e02be87f1 | [
"MIT"
] | null | null | null | from django.contrib import admin
from ballon.models import Pkg, Resume, Main, Education, Project, Work, Skill, Testimonial, Social, Address
#admin.site.register(Category)
admin.site.register(Resume)
admin.site.register(Main)
admin.site.register(Education)
admin.site.register(Work)
admin.site.register(Project)
admin.si... | 32.357143 | 106 | 0.81457 |
9f21b60bd02c143fea65c9b8b2b327fcc6402878 | 1,316 | py | Python | docs/scripts/add_labels_without_proto.py | daachi/tezos | 00118e91ff13bb54ff658907ed8ffc1c4d3d2266 | [
"MIT"
] | null | null | null | docs/scripts/add_labels_without_proto.py | daachi/tezos | 00118e91ff13bb54ff658907ed8ffc1c4d3d2266 | [
"MIT"
] | 1 | 2022-02-18T09:54:32.000Z | 2022-02-18T09:54:32.000Z | docs/scripts/add_labels_without_proto.py | daachi/tezos | 00118e91ff13bb54ff658907ed8ffc1c4d3d2266 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Add unversioned labels to a page, before each versioned label
## Overview
# This script adds unversioned labels (i.e. Sphinx labels without the _N suffix,
# where N is the name of the protocol) to one doc page before every versioned
# label, unless an unversioned label already exists.
# If i... | 32.097561 | 95 | 0.641337 |
9f26e4475075ee4497350a311fc5dbe71abdd647 | 10,435 | py | Python | ds/eurito_indicators/getters/arxiv_getters.py | nestauk/eurito_indicators | e3dfa783eb0ceb1419cf636dac4e6fdd52268417 | [
"MIT"
] | null | null | null | ds/eurito_indicators/getters/arxiv_getters.py | nestauk/eurito_indicators | e3dfa783eb0ceb1419cf636dac4e6fdd52268417 | [
"MIT"
] | 99 | 2021-02-02T17:11:53.000Z | 2022-03-31T14:36:34.000Z | ds/eurito_indicators/getters/arxiv_getters.py | nestauk/eurito_indicators | e3dfa783eb0ceb1419cf636dac4e6fdd52268417 | [
"MIT"
] | null | null | null | # Get arxiv data
import json
import logging
import os
import pickle
from collections import Counter
from datetime import datetime
from io import BytesIO
from zipfile import ZipFile
import numpy as np
import pandas as pd
import requests
from kaggle.api.kaggle_api_extended import KaggleApi
from eurito_indicators impor... | 28.510929 | 99 | 0.605271 |
9f271d6d4cc41e0b7933872e8c2a90b565c70fe7 | 6,617 | py | Python | StatusWindow.py | BlackXanthus/PyBirch5 | 61a70fe48f859509bd737d2c204882e13c2411c6 | [
"BSD-3-Clause"
] | null | null | null | StatusWindow.py | BlackXanthus/PyBirch5 | 61a70fe48f859509bd737d2c204882e13c2411c6 | [
"BSD-3-Clause"
] | null | null | null | StatusWindow.py | BlackXanthus/PyBirch5 | 61a70fe48f859509bd737d2c204882e13c2411c6 | [
"BSD-3-Clause"
] | null | null | null |
####
#Made reduntant in Alpha 0.4
#
# As this provided no extra functionality from the Channel, and is, in essance,
# simply a speciall channel, various additions were made to Channel.py
# To perform the same function. This has meant less duplication of code.
####
import sys, sip
from PyQt5 import QtCore, QtGui
#fro... | 27.118852 | 107 | 0.716639 |
9f2899e6bed96e2dc652ccce962eaa40f027c29b | 697 | py | Python | utils/config_objects.py | spikingevolution/evolution-strategies | 21f6032df0d5aa5e5dcecedd2520b0492e2361f2 | [
"MIT"
] | null | null | null | utils/config_objects.py | spikingevolution/evolution-strategies | 21f6032df0d5aa5e5dcecedd2520b0492e2361f2 | [
"MIT"
] | null | null | null | utils/config_objects.py | spikingevolution/evolution-strategies | 21f6032df0d5aa5e5dcecedd2520b0492e2361f2 | [
"MIT"
] | null | null | null | from collections import namedtuple
Config = namedtuple('Config', [
'env_id',
'env_seed',
'population_size',
'timesteps_per_gen',
'num_workers',
'learning_rate',
'noise_stdev',
'snapshot_freq',
'return_proc_mode',
'calc_obstat_prob',
'l2coeff',
'eval_prob'
])
Optimizati... | 18.837838 | 47 | 0.649928 |
9f28adf03dedfee3bb16b177af11aae2f63cb4c9 | 1,833 | py | Python | scripts/run_burner_bench.py | joye1503/cocrawler | 39b543320e91477412ab8bfc8402c88c3304c553 | [
"Apache-2.0"
] | 166 | 2016-07-18T19:37:34.000Z | 2022-03-06T18:26:50.000Z | scripts/run_burner_bench.py | joye1503/cocrawler | 39b543320e91477412ab8bfc8402c88c3304c553 | [
"Apache-2.0"
] | 9 | 2016-10-22T18:20:56.000Z | 2021-04-06T05:28:04.000Z | scripts/run_burner_bench.py | joye1503/cocrawler | 39b543320e91477412ab8bfc8402c88c3304c553 | [
"Apache-2.0"
] | 25 | 2017-02-28T19:41:41.000Z | 2021-07-10T11:20:33.000Z | import sys
import logging
import functools
import asyncio
import cocrawler.burner as burner
import cocrawler.parse as parse
import cocrawler.stats as stats
test_threadcount = 2
loop = asyncio.get_event_loop()
b = burner.Burner(test_threadcount, loop, 'parser')
queue = asyncio.Queue()
# Main program:
for i in ra... | 25.458333 | 95 | 0.659574 |
9f2a3bd086cb47aeb604a357b7d551f9109fd29b | 3,362 | py | Python | examples/crankd/sample-of-events/generate-event-plist.py | timgates42/pymacadmin | d4913a45497aebbcf9ba5c28c7b064d6442e0a2e | [
"Apache-2.0"
] | 112 | 2015-05-21T11:28:06.000Z | 2021-11-24T02:21:14.000Z | examples/crankd/sample-of-events/generate-event-plist.py | timgates42/pymacadmin | d4913a45497aebbcf9ba5c28c7b064d6442e0a2e | [
"Apache-2.0"
] | 14 | 2015-05-20T16:41:42.000Z | 2019-08-31T13:06:18.000Z | examples/crankd/sample-of-events/generate-event-plist.py | timgates42/pymacadmin | d4913a45497aebbcf9ba5c28c7b064d6442e0a2e | [
"Apache-2.0"
] | 17 | 2015-06-03T20:51:49.000Z | 2021-12-22T22:58:25.000Z | #!/usr/bin/env python
"""
Generates a list of OS X system events into a plist for crankd.
This is designed to create a large (but probably not comprehensive) sample
of the events generated by Mac OS X that crankd can tap into. The generated
file will call the 'tunnel.sh' as the command for each event; said fail can
... | 31.12963 | 102 | 0.674004 |
9f2c3e9cafb84df9fef985c9eceb7eb2ace5651b | 15,742 | py | Python | submissions/available/NNSlicer/NNSlicer/eval/eval_by_reduced_point.py | ziqi-zhang/fse20 | f3998abda2e40d67989ec113340236f3460f0dc3 | [
"MIT"
] | null | null | null | submissions/available/NNSlicer/NNSlicer/eval/eval_by_reduced_point.py | ziqi-zhang/fse20 | f3998abda2e40d67989ec113340236f3460f0dc3 | [
"MIT"
] | null | null | null | submissions/available/NNSlicer/NNSlicer/eval/eval_by_reduced_point.py | ziqi-zhang/fse20 | f3998abda2e40d67989ec113340236f3460f0dc3 | [
"MIT"
] | 2 | 2020-07-24T20:43:34.000Z | 2020-09-08T07:10:14.000Z | import csv
import random
from functools import partial
from typing import Callable, Optional
from pdb import set_trace as st
import os
import random
import pandas as pd
from typing import Any, Callable, Dict, Iterable, List, Tuple, Union
import numpy as np
import tensorflow as tf
from foolbox.attacks import (
FGSM... | 31.80202 | 84 | 0.59643 |
9f2d370d901cbf43cdc0f855d9288e71744ad5fe | 2,459 | py | Python | PRESUBMIT.py | iamtheonedaone1/n | 985419af32f9bbd3abc934db3edc09523477118a | [
"Apache-2.0"
] | 69 | 2016-01-11T13:22:52.000Z | 2022-03-21T02:13:12.000Z | PRESUBMIT.py | DalavanCloud/caterpillar | 985419af32f9bbd3abc934db3edc09523477118a | [
"Apache-2.0"
] | 57 | 2016-01-13T03:26:49.000Z | 2020-10-15T19:05:11.000Z | PRESUBMIT.py | DalavanCloud/caterpillar | 985419af32f9bbd3abc934db3edc09523477118a | [
"Apache-2.0"
] | 34 | 2016-08-10T23:58:06.000Z | 2021-07-03T22:38:36.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# 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 a... | 36.701493 | 79 | 0.749085 |
9f31226e643782fd28baebd4975c3c71e18371c6 | 794 | py | Python | python_advanced_retake_18_08_2021/fill_the_box.py | ivan-yosifov88/python_oop_june_2021 | 7ae6126065abbcce7ce97c86d1150ae307360249 | [
"MIT"
] | 1 | 2021-08-03T19:14:24.000Z | 2021-08-03T19:14:24.000Z | python_advanced_retake_18_08_2021/fill_the_box.py | ivan-yosifov88/python_oop_june_2021 | 7ae6126065abbcce7ce97c86d1150ae307360249 | [
"MIT"
] | null | null | null | python_advanced_retake_18_08_2021/fill_the_box.py | ivan-yosifov88/python_oop_june_2021 | 7ae6126065abbcce7ce97c86d1150ae307360249 | [
"MIT"
] | null | null | null |
print(fill_the_box(2, 8, 2, 2, 1, 7, 3, 1, 5, "Finish"))
print(fill_the_box(5, 5, 2, 40, 11, 7, 3, 1, 5, "Finish"))
print(fill_the_box(10, 10, 10, 40, "Finish", 2, 15, 30))
| 33.083333 | 91 | 0.536524 |
9f32819e06ea0621caf86c2f15e2ecde23a5a0f6 | 4,759 | py | Python | neurokit2/ecg/ecg_process.py | danibene/NeuroKit | df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a | [
"MIT"
] | null | null | null | neurokit2/ecg/ecg_process.py | danibene/NeuroKit | df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a | [
"MIT"
] | null | null | null | neurokit2/ecg/ecg_process.py | danibene/NeuroKit | df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pandas as pd
from ..signal import signal_rate, signal_sanitize
from .ecg_clean import ecg_clean
from .ecg_delineate import ecg_delineate
from .ecg_peaks import ecg_peaks
from .ecg_phase import ecg_phase
from .ecg_quality import ecg_quality
def ecg_process(ecg_signal, sampling_rate=1000... | 40.675214 | 100 | 0.664425 |
9f33897db986b714f2efcae7ab4c12ac9c297fdd | 457 | py | Python | lab3/lab3a.py | Speedy905/ops435 | ed0fb0d44fbd2d91b26201bdaff06cbb15476e66 | [
"MIT"
] | 1 | 2021-01-30T04:52:17.000Z | 2021-01-30T04:52:17.000Z | lab3/lab3a.py | Speedy905/ops435 | ed0fb0d44fbd2d91b26201bdaff06cbb15476e66 | [
"MIT"
] | null | null | null | lab3/lab3a.py | Speedy905/ops435 | ed0fb0d44fbd2d91b26201bdaff06cbb15476e66 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#Antonio Karlo Mijares
# return_text_value function
# return_number_value function
# Main program
if __name__ == '__main__':
print('python code')
text = return_text_value()
print(text)
number = return_number_value()
print(str(number))
| 18.28 | 34 | 0.702407 |
9f33b1abd556580df9d3863d91371106cc98ca82 | 1,958 | py | Python | sightpy/geometry/sphere.py | ulises1229/Python-Raytracer | ad89b9dabda1c3eeb68af2d3578c3f38dee9f5b9 | [
"MIT"
] | 326 | 2020-08-14T07:29:40.000Z | 2022-03-30T11:13:32.000Z | sightpy/geometry/sphere.py | ulises1229/Python-Raytracer | ad89b9dabda1c3eeb68af2d3578c3f38dee9f5b9 | [
"MIT"
] | 7 | 2020-08-14T21:57:56.000Z | 2021-06-09T00:53:04.000Z | sightpy/geometry/sphere.py | ulises1229/Python-Raytracer | ad89b9dabda1c3eeb68af2d3578c3f38dee9f5b9 | [
"MIT"
] | 37 | 2020-08-14T17:37:56.000Z | 2022-03-30T09:37:22.000Z | import numpy as np
from ..utils.constants import *
from ..utils.vector3 import vec3
from ..geometry import Primitive, Collider
| 37.653846 | 120 | 0.53524 |
9f3474bc67e71222949a710987df560b94e4e15b | 430 | py | Python | src/lib/worker/worker_1.py | sankhaMukherjee/celeryTest | 6c002fe3ab2f6bb5e06a36f98163c3b53f719a91 | [
"MIT"
] | null | null | null | src/lib/worker/worker_1.py | sankhaMukherjee/celeryTest | 6c002fe3ab2f6bb5e06a36f98163c3b53f719a91 | [
"MIT"
] | 1 | 2021-06-01T23:31:02.000Z | 2021-06-01T23:31:02.000Z | src/lib/worker/worker_1.py | sankhaMukherjee/celeryTest | 6c002fe3ab2f6bb5e06a36f98163c3b53f719a91 | [
"MIT"
] | null | null | null | from logs import logDecorator as lD
import json, psycopg2
from lib.celery.App import app
config = json.load(open('../config/config.json'))
logBase = config['logging']['logBase'] + 'lib.worker.worker_1'
| 19.545455 | 62 | 0.637209 |
9f358868f7cc1c35fcff13c6a034e85e0c1f1f16 | 647 | py | Python | chapter-3/foreach.py | outerbounds/dsbook | 411b55c2057a3ba1e1d893cde03d6ec97d529969 | [
"Apache-2.0"
] | 27 | 2021-05-29T14:36:34.000Z | 2022-03-22T10:12:40.000Z | chapter-3/foreach.py | saibaldas/dsbook | be6b4670ed33a2001de8f28f6fb4151111cb26ca | [
"Apache-2.0"
] | null | null | null | chapter-3/foreach.py | saibaldas/dsbook | be6b4670ed33a2001de8f28f6fb4151111cb26ca | [
"Apache-2.0"
] | 6 | 2021-05-29T14:36:40.000Z | 2022-03-09T14:57:46.000Z | from metaflow import FlowSpec, step
if __name__ == '__main__':
ForeachFlow()
| 22.310345 | 63 | 0.599691 |
9f385adb32c54c2cf674753727414734f8446d67 | 2,150 | py | Python | www/wotd/models.py | nullsym/sachiye | f08d890697b7da502e329d40dbf774c4c8af187d | [
"MIT"
] | null | null | null | www/wotd/models.py | nullsym/sachiye | f08d890697b7da502e329d40dbf774c4c8af187d | [
"MIT"
] | null | null | null | www/wotd/models.py | nullsym/sachiye | f08d890697b7da502e329d40dbf774c4c8af187d | [
"MIT"
] | null | null | null | # Imports from our app
from wotd import db, app
# Flask-Login works via the LoginManager class: Thus, we need
# to start things off by telling LoginManager about our Flask app
from flask_login import LoginManager
login_manager = LoginManager(app)
login_manager.init_app(app)
# Password hashing
from werkzeug.security im... | 35.245902 | 79 | 0.709767 |
9f3b23013912e3d6b5ff12494cd3c60f642390af | 316 | py | Python | Aula07/03EstruturaDeRepeticaoFor.py | gutoffline/curso-python-2021 | 4a9a5f11188ad734402d1dafa7ea627179e7079b | [
"MIT"
] | null | null | null | Aula07/03EstruturaDeRepeticaoFor.py | gutoffline/curso-python-2021 | 4a9a5f11188ad734402d1dafa7ea627179e7079b | [
"MIT"
] | null | null | null | Aula07/03EstruturaDeRepeticaoFor.py | gutoffline/curso-python-2021 | 4a9a5f11188ad734402d1dafa7ea627179e7079b | [
"MIT"
] | null | null | null | """
for x in range(10):
print(x)
for x in range(20, 30):
print(x)
for x in range(10,100,5):
print(x)
for x in range(10,1,-1):
print(x)
print(range(10))
"""
frutas = ["ma", "laranja", "banana", "morango"]
for x in range(len(frutas)):
print(frutas[x])
for fruta in frutas:
print(fruta)
| 13.73913 | 49 | 0.582278 |
9f3c05f654e0e6c8154b9b599c1b51c9e8da4e55 | 2,092 | py | Python | twitter_functions.py | SakiFu/Twitter | b7365d91a7321f09cba38320a53f207e9396f81a | [
"MIT"
] | null | null | null | twitter_functions.py | SakiFu/Twitter | b7365d91a7321f09cba38320a53f207e9396f81a | [
"MIT"
] | null | null | null | twitter_functions.py | SakiFu/Twitter | b7365d91a7321f09cba38320a53f207e9396f81a | [
"MIT"
] | null | null | null | import twitter
import util
from config import *
BOSTON_WOEID = 2367105
api = twitter.Api(consumer_key=key,consumer_secret=secret,access_token_key=access_key,access_token_secret=access_secret)
def search(searchTerm):
"""
Print recent tweets containing `searchTerm`.
To test this function, at the command li... | 34.295082 | 124 | 0.732792 |
9f3de39af6b193748d1dcd26db1ccd2c6dfaa504 | 2,830 | py | Python | tests/test_download.py | HeavyTony2/downloader-cli | 215df466e8b2a0d1460a4f2f549ff2fcec0e9e18 | [
"MIT"
] | 301 | 2019-11-12T15:58:14.000Z | 2022-03-23T20:07:32.000Z | tests/test_download.py | HeavyTony2/downloader-cli | 215df466e8b2a0d1460a4f2f549ff2fcec0e9e18 | [
"MIT"
] | 15 | 2019-11-12T23:09:51.000Z | 2022-01-17T13:45:51.000Z | tests/test_download.py | HeavyTony2/downloader-cli | 215df466e8b2a0d1460a4f2f549ff2fcec0e9e18 | [
"MIT"
] | 30 | 2019-11-13T05:16:44.000Z | 2022-03-14T23:00:01.000Z | """Tests various methods of the Download
class.
All the methods that start with test are used
to test a certain function. The test method
will have the name of the method being tested
seperated by an underscore.
If the method to be tested is extract_content,
the test method name will be test_extract_content
"""
from... | 25.495495 | 65 | 0.664311 |