hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | 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 368k ⌀ | 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 4 247 | 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 4 247 | 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.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
36831c603a00768a85c8ba8b8274bcd3f0371013 | 1,945 | py | Python | AspDec/SSCL/word2vec.py | dumpmemory/AspDecSSCL | 004d73d3248e8fdee1336cfc6490ef4872583665 | [
"MIT"
] | 23 | 2020-12-16T15:50:07.000Z | 2022-03-17T05:51:20.000Z | AspDec/SSCL/word2vec.py | dumpmemory/AspDecSSCL | 004d73d3248e8fdee1336cfc6490ef4872583665 | [
"MIT"
] | 3 | 2021-02-01T07:24:35.000Z | 2021-11-24T09:28:35.000Z | AspDec/SSCL/word2vec.py | dumpmemory/AspDecSSCL | 004d73d3248e8fdee1336cfc6490ef4872583665 | [
"MIT"
] | 4 | 2021-05-12T06:49:43.000Z | 2021-10-04T04:41:08.000Z | '''
@author Tian Shi
Please contact tshi@vt.edu
'''
import json
import os
import random
import gensim
import numpy as np
from tqdm import tqdm
def run_word2vec(args):
'''
Run word2vec.
'''
cluster_dir = '../cluster_results'
if not os.path.exists(cluster_dir):
os.mkdir(cluster_dir)
if ... | 24.935897 | 68 | 0.60874 | '''
@author Tian Shi
Please contact tshi@vt.edu
'''
import json
import os
import random
import gensim
import numpy as np
from tqdm import tqdm
def run_word2vec(args):
'''
Run word2vec.
'''
cluster_dir = '../cluster_results'
if not os.path.exists(cluster_dir):
os.mkdir(cluster_dir)
if ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c2d27542ebbc9981ab52262f7a073f4fa9ee3436 | 303 | py | Python | GenerateDatapack.py | edgecdec/TobaccoAwarenessMC | 2fce9181ae3bb8b65dd4dcbfb4f3363e42e3dd90 | [
"MIT"
] | null | null | null | GenerateDatapack.py | edgecdec/TobaccoAwarenessMC | 2fce9181ae3bb8b65dd4dcbfb4f3363e42e3dd90 | [
"MIT"
] | null | null | null | GenerateDatapack.py | edgecdec/TobaccoAwarenessMC | 2fce9181ae3bb8b65dd4dcbfb4f3363e42e3dd90 | [
"MIT"
] | null | null | null | from GenerateFolders import generateFolders
from GenerateFiles import generateFiles
from AddictionHelperGenerator import addictionHelperGenerator
import shutil
generateFolders()
generateFiles()
addictionHelperGenerator()
shutil.make_archive('tobacco_awareness', 'zip', rootdir) | 27.545455 | 61 | 0.864686 | from GenerateFolders import generateFolders
from GenerateFiles import generateFiles
from AddictionHelperGenerator import addictionHelperGenerator
import shutil
from Constants import *
generateFolders()
generateFiles()
addictionHelperGenerator()
shutil.make_archive('tobacco_awareness', 'zip', rootdir) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 22 |
933c5eecbd0001ecf9e6633f65b9d333411d7767 | 1,391 | py | Python | demo_data_format.py | chrisoldnall/PHS-Code | a37bdb10821b40c40ece21451a29b1327ce4585d | [
"MIT"
] | null | null | null | demo_data_format.py | chrisoldnall/PHS-Code | a37bdb10821b40c40ece21451a29b1327ce4585d | [
"MIT"
] | null | null | null | demo_data_format.py | chrisoldnall/PHS-Code | a37bdb10821b40c40ece21451a29b1327ce4585d | [
"MIT"
] | null | null | null | from final_code.fcts_data_formatting import day_to_quarter, import_datasets, time_interval, add_categories, HB_to_areas, extract_data, day_to_quarter
import matplotlib.pyplot as plt
data31, data62, operations, diag, covid = import_datasets(['31DayData', '62DayData', 'cancellations_by_board_november_2021', \
... | 39.742857 | 131 | 0.698778 | from final_code.fcts_data_formatting import day_to_month, day_to_quarter, import_datasets, time_interval, add_categories, \
HB_to_areas, extract_data, day_to_quarter, month_to_quarter
import numpy as np
import matplotlib.pyplot as plt
data31, data62, operations, diag, covid = import_dat... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 22 |
09f57377b2f200c0b923b75e399a536a35973e22 | 152 | py | Python | LinkedClips/__init__.py | NSUSpray/LinkedClips | 8cd0974c42632e9be15a60934d7b3e5fd270c214 | [
"MIT"
] | 5 | 2019-11-27T15:44:28.000Z | 2022-03-21T03:54:44.000Z | LinkedClips/__init__.py | NSUSpray/LinkedClips | 8cd0974c42632e9be15a60934d7b3e5fd270c214 | [
"MIT"
] | null | null | null | LinkedClips/__init__.py | NSUSpray/LinkedClips | 8cd0974c42632e9be15a60934d7b3e5fd270c214 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
| 25.333333 | 40 | 0.802632 | from __future__ import absolute_import
def create_instance (c_instance):
from .LinkedClips import LinkedClips
return LinkedClips (c_instance)
| 3 | 0 | 0 | 0 | 0 | 89 | 0 | 0 | 23 |
c4f014e481ebe1253497317b5cde2d3e85a86be6 | 33,527 | py | Python | graphsense/api/addresses_api.py | iknaio/graphsense-python | b61c66b6ec0bb9720036ae61777e90ce63a971cc | [
"MIT"
] | null | null | null | graphsense/api/addresses_api.py | iknaio/graphsense-python | b61c66b6ec0bb9720036ae61777e90ce63a971cc | [
"MIT"
] | 1 | 2022-02-24T11:21:49.000Z | 2022-02-24T11:21:49.000Z | graphsense/api/addresses_api.py | INTERPOL-Innovation-Centre/GraphSense-Maltego-transform | 2a9b352289ab64903a7012c5d84cb4c6d8172ade | [
"MIT"
] | null | null | null | """
GraphSense API
GraphSense API # noqa: E501
The version of the OpenAPI document: 0.5.1
Generated by: https://openapi-generator.tech
"""
| 36.323944 | 211 | 0.440272 | """
GraphSense API
GraphSense API # noqa: E501
The version of the OpenAPI document: 0.5.1
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from graphsense.api_client import ApiClient, Endpoint as _Endpoint
from graphsense.model_utils import ( # noq... | 0 | 0 | 0 | 32,755 | 0 | 0 | 0 | 339 | 273 |
69378bc6d7659c9fe346d6602e04664de994dad4 | 3,665 | py | Python | bftool/__main__.py | shoriwe/bftool | cb5c84e08f3703ebc86d56ad1cf6a755f7e8e82d | [
"MIT"
] | 2 | 2020-06-16T06:11:19.000Z | 2020-08-26T01:50:19.000Z | bftool/__main__.py | shoriwe/bftool | cb5c84e08f3703ebc86d56ad1cf6a755f7e8e82d | [
"MIT"
] | 18 | 2020-04-27T17:11:35.000Z | 2021-02-21T02:18:17.000Z | bftool/__main__.py | shoriwe/bftool | cb5c84e08f3703ebc86d56ad1cf6a755f7e8e82d | [
"MIT"
] | null | null | null | import argparse
import json
import sys
import bftool
# Default argument capture for the main function
def _get_arguments() -> argparse.Namespace:
"""Default function to prepare the arguments for the `Runner` during it's execution in a terminal
Returns:
- bftool.Arguments with all the configurations... | 46.987179 | 119 | 0.635198 | import argparse
import collections
import json
import random
import string
import sys
import types
import bftool
# Default argument capture for the main function
def _get_arguments() -> argparse.Namespace:
"""Default function to prepare the arguments for the `Runner` during it's execution in a terminal
Retu... | 0 | 0 | 0 | 0 | 0 | 558 | 0 | -28 | 134 |
07ed54bfb2c231467fae4f929f7219986db1ccf4 | 6,998 | py | Python | scripts/visualize.py | Karthikprabhu22/lynx | 2b0124085cc7a5f1eb3d06a89f6c56f02a087e12 | [
"MIT"
] | null | null | null | scripts/visualize.py | Karthikprabhu22/lynx | 2b0124085cc7a5f1eb3d06a89f6c56f02a087e12 | [
"MIT"
] | 4 | 2020-05-06T20:14:01.000Z | 2020-05-07T07:45:12.000Z | scripts/visualize.py | Karthikprabhu22/lynx | 2b0124085cc7a5f1eb3d06a89f6c56f02a087e12 | [
"MIT"
] | 1 | 2020-08-15T05:24:16.000Z | 2020-08-15T05:24:16.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
_logger = logging.getLogger(__name__)
if __name__ == '__main__':
main() | 35.165829 | 97 | 0.615462 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
from pathlib import Path
import sys
import click
import h5py
import yaml
import lynx
import hoover
import pymaster as nmt
from scipy.optimize import minimize
import emcee
import healpy as hp
import matplotlib.pyplot as plt
from matplotlib.patches import ... | 0 | 2,998 | 0 | 0 | 0 | 3,387 | 0 | -24 | 497 |
6763751da420b8743657612a663c583a88edff6e | 1,978 | py | Python | manage.py | lgoodridge/Asteroids-AI | bf6abd2b42db1b13667060c30de13a53aaa05110 | [
"MIT"
] | 4 | 2018-11-06T16:27:11.000Z | 2021-11-12T12:23:54.000Z | manage.py | lgoodridge/Asteroids-AI | bf6abd2b42db1b13667060c30de13a53aaa05110 | [
"MIT"
] | null | null | null | manage.py | lgoodridge/Asteroids-AI | bf6abd2b42db1b13667060c30de13a53aaa05110 | [
"MIT"
] | 1 | 2022-02-25T10:35:34.000Z | 2022-02-25T10:35:34.000Z | """
Script for running management commands for the Asteroids Game / AI.
Usage: python manage.py [--help]
"""
if __name__ == "__main__":
manage()
| 30.90625 | 74 | 0.71638 | """
Script for running management commands for the Asteroids Game / AI.
Usage: python manage.py [--help]
"""
from ai.experiment import merge_experiments
import click
import settings
class TransparentGroup(click.Group):
"""
A Click Group class that passes all provided
arguments to its subcommands without ... | 0 | 1,412 | 0 | 249 | 0 | 0 | 0 | 7 | 159 |
b02bcec7907a8cc2bcaf89b751f1bbc626c8b99d | 7,002 | py | Python | bigfastapi/tutorial.py | danieliheonu/bigfastapi | 483554776195c9f38bb46ba719b613360eda1028 | [
"MIT"
] | 1 | 2022-03-20T21:46:05.000Z | 2022-03-20T21:46:05.000Z | bigfastapi/tutorial.py | danieliheonu/bigfastapi | 483554776195c9f38bb46ba719b613360eda1028 | [
"MIT"
] | null | null | null | bigfastapi/tutorial.py | danieliheonu/bigfastapi | 483554776195c9f38bb46ba719b613360eda1028 | [
"MIT"
] | null | null | null | from fastapi import APIRouter
from fastapi import APIRouter
app = APIRouter(tags=["Tutorials"])
# SAVE TUTORIAL ENDPOINT
# GET TUTORIALS - Can be filtered by category, title or both
# GET TUTORIALS IN GROUPED OF CATEGORIES- Return result as groups of categories
# GET A LIST OF ALL TUTORIAL CATEGORIES
# SEAR... | 37.848649 | 107 | 0.688803 | from operator import or_
import sqlalchemy
from fastapi import APIRouter, HTTPException, status
from fastapi.param_functions import Depends
from fastapi.responses import JSONResponse
from fastapi import APIRouter
import fastapi as _fastapi
import sqlalchemy.orm as _orm
from bigfastapi.db.database import get_db
from big... | 0 | 3,403 | 905 | 0 | 0 | 1,062 | 0 | 225 | 617 |
34e86699e57eaae95439d97b066c5ec26b48ef0f | 1,194 | py | Python | tyc_area.py | skymap/tyc | ba5175c7fa1e45e9c0ea4881d7211ae2ad6d0cc9 | [
"MIT"
] | null | null | null | tyc_area.py | skymap/tyc | ba5175c7fa1e45e9c0ea4881d7211ae2ad6d0cc9 | [
"MIT"
] | null | null | null | tyc_area.py | skymap/tyc | ba5175c7fa1e45e9c0ea4881d7211ae2ad6d0cc9 | [
"MIT"
] | null | null | null | from PIL import Image, ImageDraw
w = 7200
h = 3600
i = 1
j = 0
k = 0
c6 = [(255, 153, 204), (255, 255, 153), (153, 255, 153), (153, 204, 255)]
black = (0, 0, 0)
white = (255, 255, 255)
im = Image.new('RGB', (w, h), white)
draw = ImageDraw.Draw(im)
r = open('index_src.dat', 'r')
src = r.read()
r.close
src ... | 32.27027 | 80 | 0.421273 | from PIL import Image, ImageDraw
w = 7200
h = 3600
i = 1
j = 0
k = 0
c6 = [(255, 153, 204), (255, 255, 153), (153, 255, 153), (153, 204, 255)]
black = (0, 0, 0)
white = (255, 255, 255)
im = Image.new('RGB', (w, h), white)
draw = ImageDraw.Draw(im)
r = open('index_src.dat', 'r')
src = r.read()
r.close
src ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bcf1b868a4a8b6c143f44a61213975d0cf88b939 | 1,839 | py | Python | mail_coupons.py | Coiling-Dragon/Email_scraper | 22dfa6726164bb0f318a883bf48c0198646b5142 | [
"Apache-2.0"
] | null | null | null | mail_coupons.py | Coiling-Dragon/Email_scraper | 22dfa6726164bb0f318a883bf48c0198646b5142 | [
"Apache-2.0"
] | null | null | null | mail_coupons.py | Coiling-Dragon/Email_scraper | 22dfa6726164bb0f318a883bf48c0198646b5142 | [
"Apache-2.0"
] | null | null | null | import imaplib
import email
from email.header import decode_header
import pandas as pd
mails_df = pd.read_csv('mails.csv')
csv_values = mails_df.values
c = 1
with open('mails_with_coupons.csv', 'w', encoding='utf-8') as f:
out_row = 'EMAIL,PASS,COUPONS\n'
f.write(out_row)
for each in csv_val... | 32.263158 | 86 | 0.588363 | import imaplib
import email
from email.header import decode_header
import pandas as pd
mails_df = pd.read_csv('mails.csv')
csv_values = mails_df.values
c = 1
with open('mails_with_coupons.csv', 'w', encoding='utf-8') as f:
out_row = 'EMAIL,PASS,COUPONS\n'
f.write(out_row)
for each in csv_val... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2d32035a799216dbf33bc6c52112336dd2e122a5 | 303 | py | Python | utils/date.py | josylad/RoomScout | a3d067dd67dfdd43702ea2e89064213dbd469157 | [
"MIT"
] | null | null | null | utils/date.py | josylad/RoomScout | a3d067dd67dfdd43702ea2e89064213dbd469157 | [
"MIT"
] | null | null | null | utils/date.py | josylad/RoomScout | a3d067dd67dfdd43702ea2e89064213dbd469157 | [
"MIT"
] | null | null | null |
"""
Input is supposed to be in the format yyyy-mm-dd
if it is not then return false
""" | 23.307692 | 83 | 0.613861 | import datetime
import re
"""
Input is supposed to be in the format yyyy-mm-dd
if it is not then return false
"""
def check_format(input):
if isinstance(input, datetime.date):
return True
else:
return bool(re.match(r"[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]", input)) | 0 | 0 | 0 | 0 | 0 | 158 | 0 | -18 | 66 |
ac6774b8af1cc5195c08280dd7ecab780a9d29fe | 2,322 | py | Python | qs_backend/qs_backend/dal/tests/userstockpref_tests/test_unit_select_userstockpref.py | Praneesh/quickstocks | 2ad4f985b7cc11721209cc81c36937e9cf25fb60 | [
"MIT"
] | 2 | 2016-12-28T18:08:23.000Z | 2017-04-01T18:09:55.000Z | qs_backend/qs_backend/dal/tests/userstockpref_tests/test_unit_select_userstockpref.py | Praneesh/quickstocks | 2ad4f985b7cc11721209cc81c36937e9cf25fb60 | [
"MIT"
] | null | null | null | qs_backend/qs_backend/dal/tests/userstockpref_tests/test_unit_select_userstockpref.py | Praneesh/quickstocks | 2ad4f985b7cc11721209cc81c36937e9cf25fb60 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# __author__ = "Praneesh Kataru"
# __credits__ = []
# __version__ = "0.1.1"
# __maintainer__ = "Praneesh Kataru"
# __email__ = "pranuvitmsse05@gmail.com"
# __status__ = "Prototype"
| 38.065574 | 114 | 0.717054 | #! /usr/bin/env python3
# __author__ = "Praneesh Kataru"
# __credits__ = []
# __version__ = "0.1.1"
# __maintainer__ = "Praneesh Kataru"
# __email__ = "pranuvitmsse05@gmail.com"
# __status__ = "Prototype"
import unittest
from pprint import pprint
from qs_backend.dal.user_stock_pref_dal import UserS... | 0 | 0 | 0 | 1,967 | 0 | 0 | 0 | 40 | 90 |
98c4e07e264eb503bc873002e824f308fbf7f99b | 20,838 | py | Python | deprecated_code/workflows/mpi/imaging-pipelines-mpi.py | ska-telescope/algorithm-reference-library | 1b2c8d6079249202864abf8c60cdea40f0f123cb | [
"Apache-2.0"
] | 22 | 2016-12-14T11:20:07.000Z | 2021-08-13T15:23:41.000Z | deprecated_code/workflows/mpi/imaging-pipelines-mpi.py | ska-telescope/algorithm-reference-library | 1b2c8d6079249202864abf8c60cdea40f0f123cb | [
"Apache-2.0"
] | 30 | 2017-06-27T09:15:38.000Z | 2020-09-11T18:16:37.000Z | deprecated_code/workflows/mpi/imaging-pipelines-mpi.py | SKA-ScienceDataProcessor/algorithm-reference-library | 1b2c8d6079249202864abf8c60cdea40f0f123cb | [
"Apache-2.0"
] | 20 | 2017-07-02T03:45:49.000Z | 2019-12-11T17:19:01.000Z |
# coding: utf-8
# # Pipeline processing using serial workflows.
#
# This is a serial unrolled version of the predict step
# In[1]:
#get_ipython().run_line_magic('matplotlib', 'inline')
import os
import sys
sys.path.append(os.path.join('..', '..'))
from mpi4py import MPI
results_dir = './results/mpi'
#from mat... | 39.61597 | 160 | 0.584029 |
# coding: utf-8
# # Pipeline processing using serial workflows.
#
# This is a serial unrolled version of the predict step
# In[1]:
#get_ipython().run_line_magic('matplotlib', 'inline')
import os
import sys
sys.path.append(os.path.join('..', '..'))
from data_models.parameters import arl_path
from mpi4py import ... | 0 | 0 | 0 | 0 | 0 | 810 | 0 | 434 | 269 |
9994d71687ae7eefbb738f2c4ac54a5aaed706d5 | 1,133 | py | Python | logconfig.py | neitzke/stokes-numerics | 8845aef7598ca245d095cca690bf48568758a8c9 | [
"MIT"
] | 1 | 2020-08-03T16:24:06.000Z | 2020-08-03T16:24:06.000Z | logconfig.py | neitzke/stokes-numerics | 8845aef7598ca245d095cca690bf48568758a8c9 | [
"MIT"
] | null | null | null | logconfig.py | neitzke/stokes-numerics | 8845aef7598ca245d095cca690bf48568758a8c9 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
# to change log level globally, use eg logconfig.loglevel(logging.WARN)
# to change level for an individual module, eg logconfig.loglevel(logging.DEBUG, "framedata")
| 37.766667 | 130 | 0.700794 | from __future__ import absolute_import
import logging
def logconfig(console=True,filename='/tmp/harmonic.log'):
formatter = logging.Formatter('[%(asctime)s] [%(processName)s] [%(name)s] [%(levelname)s] %(message)s', datefmt='%m-%d %H:%M')
root = logging.getLogger('')
root.setLevel(logging.INFO)
i... | 0 | 0 | 0 | 0 | 0 | 867 | 0 | -7 | 67 |
51dc1e8064d7b160d9261339c4c0f6d7a7c1fc43 | 851 | py | Python | src/genie/libs/parser/iosxe/tests/ShowRunPolicyMap/cli/equal/golden_output4_expected.py | nielsvanhooy/genieparser | 9a1955749697a6777ca614f0af4d5f3a2c254ccd | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/ShowRunPolicyMap/cli/equal/golden_output4_expected.py | nielsvanhooy/genieparser | 9a1955749697a6777ca614f0af4d5f3a2c254ccd | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/ShowRunPolicyMap/cli/equal/golden_output4_expected.py | nielsvanhooy/genieparser | 9a1955749697a6777ca614f0af4d5f3a2c254ccd | [
"Apache-2.0"
] | null | null | null | expected_output = {
'policy_map': {
'policy-cbwfq-1': {'class': {
'class-gold': {'bandwidth_percent': '40',
'random_detect': ['dscp-based', 'ecn']},
'class-silver': {'bandwidth_percent': '20',
'random_detect': ['dscp-based', 'ec... | 50.058824 | 74 | 0.415981 | expected_output = {
'policy_map': {
'policy-cbwfq-1': {'class': {
'class-gold': {'bandwidth_percent': '40',
'random_detect': ['dscp-based', 'ecn']},
'class-silver': {'bandwidth_percent': '20',
'random_detect': ['dscp-based', 'ec... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
148aa55044dfa89d96bc3711e30b04ff24054650 | 251 | py | Python | hw4/4.5.py | ArtemNikolaev/gb-hw | b82403e39dc1ca530dc438309fc98ba89ce4337b | [
"Unlicense"
] | null | null | null | hw4/4.5.py | ArtemNikolaev/gb-hw | b82403e39dc1ca530dc438309fc98ba89ce4337b | [
"Unlicense"
] | 40 | 2021-12-30T15:57:10.000Z | 2022-01-26T16:44:24.000Z | hw4/4.5.py | ArtemNikolaev/gb-hw | b82403e39dc1ca530dc438309fc98ba89ce4337b | [
"Unlicense"
] | 1 | 2022-03-12T19:17:26.000Z | 2022-03-12T19:17:26.000Z | # https://github.com/ArtemNikolaev/gb-hw/issues/26
print(multiply())
| 17.928571 | 54 | 0.673307 | # https://github.com/ArtemNikolaev/gb-hw/issues/26
from functools import reduce
def even_100_1000():
return (i for i in range(100, 1001) if i % 2 == 0)
def multiply():
return reduce(lambda a, b: a * b, even_100_1000())
print(multiply())
| 0 | 0 | 0 | 0 | 0 | 103 | 0 | 7 | 68 |
a8dce581227cd102c0aaac141e019905d5830e17 | 1,460 | py | Python | Array/Merge_Without_Extra_Space.py | Pratik110/Python | 033ade0dff3dc3bee91eefb53d7eb87a4f4f003d | [
"MIT"
] | null | null | null | Array/Merge_Without_Extra_Space.py | Pratik110/Python | 033ade0dff3dc3bee91eefb53d7eb87a4f4f003d | [
"MIT"
] | null | null | null | Array/Merge_Without_Extra_Space.py | Pratik110/Python | 033ade0dff3dc3bee91eefb53d7eb87a4f4f003d | [
"MIT"
] | null | null | null | Link = "https://practice.geeksforgeeks.org/problems/merge-two-sorted-arrays-1587115620/1"
Description = "Given two sorted arrays arr1[] and arr2[] of sizes n and m in non-decreasing order." \
"Merge them in sorted order without using any extra space. Modify arr1 so that it" \
"contains the f... | 50.344828 | 266 | 0.595205 | Link = "https://practice.geeksforgeeks.org/problems/merge-two-sorted-arrays-1587115620/1"
Description = "Given two sorted arrays arr1[] and arr2[] of sizes n and m in non-decreasing order." \
"Merge them in sorted order without using any extra space. Modify arr1 so that it" \
"contains the f... | 0 | 0 | 0 | 233 | 0 | 0 | 0 | 0 | 22 |
7ef419f19fd5dd3e6ac9cd2c444b90048270e5da | 825 | py | Python | aws_embedded_metrics/logger/metric.py | 02strich/aws-embedded-metrics-python | 4c5718e580dfb12529673a6b54810adfbfd54242 | [
"Apache-2.0"
] | 130 | 2019-11-18T19:39:55.000Z | 2022-03-28T09:56:25.000Z | aws_embedded_metrics/logger/metric.py | 02strich/aws-embedded-metrics-python | 4c5718e580dfb12529673a6b54810adfbfd54242 | [
"Apache-2.0"
] | 50 | 2019-11-18T22:22:33.000Z | 2022-02-06T11:03:31.000Z | aws_embedded_metrics/logger/metric.py | 02strich/aws-embedded-metrics-python | 4c5718e580dfb12529673a6b54810adfbfd54242 | [
"Apache-2.0"
] | 23 | 2019-11-19T00:06:41.000Z | 2021-12-09T02:01:40.000Z | # Copyright 2019 Amazon.com, Inc. or its affiliates.
# 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... | 37.5 | 74 | 0.718788 | # Copyright 2019 Amazon.com, Inc. or its affiliates.
# 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... | 0 | 0 | 0 | 203 | 0 | 0 | 0 | 0 | 23 |
21a25efbf47ea04a49cca1dc67f47104e5dcf1e5 | 747 | py | Python | setup.py | SPRCSY/tomago-sdk-py | cbeef646d28f29a3dc7c1d48be1e882383948647 | [
"Apache-2.0"
] | null | null | null | setup.py | SPRCSY/tomago-sdk-py | cbeef646d28f29a3dc7c1d48be1e882383948647 | [
"Apache-2.0"
] | null | null | null | setup.py | SPRCSY/tomago-sdk-py | cbeef646d28f29a3dc7c1d48be1e882383948647 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
import io
setup(
name='tomago-sdk-py',
version='1.5.1',
description="Python SDKs for Blockchain.",
long_description=io.open('README.md', encoding='utf-8').read(),
url='https://github.com/arxanchain/tomago-sdk-py/',
download_url=... | 26.678571 | 83 | 0.617135 | #!/usr/bin/env python
from setuptools import setup, find_packages
import io
setup(
name='tomago-sdk-py',
version='1.5.1',
description="Python SDKs for Blockchain.",
long_description=io.open('README.md', encoding='utf-8').read(),
url='https://github.com/arxanchain/tomago-sdk-py/',
download_url=... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a3e15ba80a2347e1590fe3cb20ee82eff35f9dda | 10,519 | py | Python | tools/archive.py | ganadist/r8 | 850b5a4725954b677103a3a575239d0f330c0b0f | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tools/archive.py | ganadist/r8 | 850b5a4725954b677103a3a575239d0f330c0b0f | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tools/archive.py | ganadist/r8 | 850b5a4725954b677103a3a575239d0f330c0b0f | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
try:
except ImportError:
# Not a Unix system. Do what Gandalf tells you not to.
pass... | 40.148855 | 93 | 0.681719 | #!/usr/bin/env python
# Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
import create_maven_release
import gradle
import jdk
import optparse
import os
try:
i... | 0 | 0 | 0 | 0 | 0 | 9,574 | 0 | -55 | 589 |
ef8d700f6c034510e4036e7f091c9874efee9ad5 | 1,320 | py | Python | model_engine/inference.py | OsmosisAI/ModelEngine | e1024a2e384791b623d58383aa93ca566e191092 | [
"Apache-2.0"
] | null | null | null | model_engine/inference.py | OsmosisAI/ModelEngine | e1024a2e384791b623d58383aa93ca566e191092 | [
"Apache-2.0"
] | null | null | null | model_engine/inference.py | OsmosisAI/ModelEngine | e1024a2e384791b623d58383aa93ca566e191092 | [
"Apache-2.0"
] | 1 | 2021-09-22T15:29:30.000Z | 2021-09-22T15:29:30.000Z | # Copyright 2020 BlueChasm LLC dba OsmosisAI.
#
# 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... | 25.384615 | 83 | 0.702273 | # Copyright 2020 BlueChasm LLC dba OsmosisAI.
#
# 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... | 0 | 425 | 0 | 100 | 0 | 0 | 0 | 30 | 159 |
c4106d42cdb85aecc71332cd737e27926f2f5e32 | 3,814 | py | Python | SpinorBECSimulation/CoherentStateChebyshev/chebyshev_functions.py | ZachGlassman/SpinorBECSimulation | 8821a8bc150eda2aa36ce6b39ff178a3ddc99df1 | [
"MIT"
] | null | null | null | SpinorBECSimulation/CoherentStateChebyshev/chebyshev_functions.py | ZachGlassman/SpinorBECSimulation | 8821a8bc150eda2aa36ce6b39ff178a3ddc99df1 | [
"MIT"
] | null | null | null | SpinorBECSimulation/CoherentStateChebyshev/chebyshev_functions.py | ZachGlassman/SpinorBECSimulation | 8821a8bc150eda2aa36ce6b39ff178a3ddc99df1 | [
"MIT"
] | null | null | null | import numpy as np
import math
def alpha_help(a,n):
"""function to compute some approximations
Parameters
----------
a : complex
number
n : int
number
Returns
ln : complex
approximation
"""
if a.real == 0 and a.imag == 0:
if n == 0:
... | 23.115152 | 68 | 0.520713 | import numpy as np
import math
def find_nmax(tot, m):
first = np.mod(tot - abs(m), 2)
return (tot - abs(m) - first) / 2 + 1
def alpha_help(a,n):
"""function to compute some approximations
Parameters
----------
a : complex
number
n : int
number
Returns
ln :... | 0 | 0 | 0 | 0 | 0 | 79 | 0 | 0 | 23 |
4a045d6909aa525ec2c6af87ff3fdbf9a8b3aef3 | 4,996 | py | Python | tests/test_result.py | shawnbrown/squint | a9d326ff8edb2e2b740c4355fd953edd2c0cf114 | [
"Apache-2.0"
] | 3 | 2020-01-11T23:29:15.000Z | 2020-05-30T09:39:15.000Z | tests/test_result.py | shawnbrown/squint | a9d326ff8edb2e2b740c4355fd953edd2c0cf114 | [
"Apache-2.0"
] | 3 | 2019-10-15T13:23:31.000Z | 2020-07-23T22:13:11.000Z | tests/test_result.py | shawnbrown/squint | a9d326ff8edb2e2b740c4355fd953edd2c0cf114 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
| 33.986395 | 87 | 0.571257 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import sys
from .common import unittest
from squint._compatibility.itertools import islice
from squint._utils import IterItems
from squint.result import Result
class TestFetch(unittest.TestCase):
def test_nonmappings(self):
"""Check collection... | 0 | 0 | 0 | 4,677 | 0 | 0 | 0 | 50 | 202 |
74f169df072f3ba8e22ae7cfeb29fb01c317f0cb | 21,254 | py | Python | p2/multiagent/multiAgents.py | patrickmcgrory/cs188 | e5c5995ad187e8edfaf5446dd40e84497461ae90 | [
"BSD-3-Clause"
] | 22 | 2016-03-31T23:04:51.000Z | 2021-11-06T08:45:56.000Z | p2/multiagent/multiAgents.py | naderm/cs188 | e5c5995ad187e8edfaf5446dd40e84497461ae90 | [
"BSD-3-Clause"
] | null | null | null | p2/multiagent/multiAgents.py | naderm/cs188 | e5c5995ad187e8edfaf5446dd40e84497461ae90 | [
"BSD-3-Clause"
] | 39 | 2015-04-12T12:07:06.000Z | 2021-12-01T21:55:04.000Z | # multiAgents.py
# --------------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to
# http://inst.eecs.b... | 36.08489 | 107 | 0.622847 | # multiAgents.py
# --------------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to
# http://inst.eecs.b... | 0 | 0 | 0 | 14,237 | 0 | 331 | 0 | 18 | 297 |
60c7aab9263493986520396ca1327fe5b14d50e6 | 4,151 | py | Python | res_mods/mods/packages/xvm_battle/python/replay.py | peterbartha/ImmunoMod | cbf8cd49893d7082a347c1f72c0e39480869318a | [
"MIT"
] | null | null | null | res_mods/mods/packages/xvm_battle/python/replay.py | peterbartha/ImmunoMod | cbf8cd49893d7082a347c1f72c0e39480869318a | [
"MIT"
] | 1 | 2016-04-03T13:31:39.000Z | 2016-04-03T16:48:26.000Z | res_mods/mods/packages/xvm_battle/python/replay.py | peterbartha/ImmunoMod | cbf8cd49893d7082a347c1f72c0e39480869318a | [
"MIT"
] | null | null | null | """ XVM (c) www.modxvm.com 2013-2017 """
#####################################################################
# imports
from gui.shared import g_eventBus
import xvm_main.python.config as config
import xvm_main.python.minimap_circles as minimap_circles
import xvm_main.python.utils as utils
##########################... | 34.02459 | 115 | 0.607564 | """ XVM (c) www.modxvm.com 2013-2017 """
#####################################################################
# imports
import simplejson
import traceback
import BigWorld
import game
from Avatar import PlayerAvatar
from BattleReplay import BattleReplay, g_replayCtrl
from PlayerEvents import g_playerEvents
from gui.... | 0 | 1,895 | 0 | 0 | 0 | 1,331 | 0 | 51 | 362 |
e2546d8c561e8bcc5bfeb467a3ebf005076c7ed6 | 1,410 | py | Python | 2020/day17.py | tobeannouncd/AdventOfCode | b4fe6e9b10a0dc191429a90ab351806df03bca10 | [
"MIT"
] | null | null | null | 2020/day17.py | tobeannouncd/AdventOfCode | b4fe6e9b10a0dc191429a90ab351806df03bca10 | [
"MIT"
] | null | null | null | 2020/day17.py | tobeannouncd/AdventOfCode | b4fe6e9b10a0dc191429a90ab351806df03bca10 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main()
| 26.111111 | 91 | 0.573759 | from collections import Counter
from itertools import product
import numpy as np
import advent
def main():
data = advent.get_input(2020, 17)
print(solve(data, part=1))
print(solve(data, part=2))
def solve(data, part: int):
grid = np.array([[list(l) for l in data.strip().splitlines()]])
if part... | 0 | 0 | 0 | 0 | 355 | 799 | 0 | 7 | 204 |
9b203be1cdf9d808ea319102ec9e1767a80807ba | 6,471 | py | Python | examples/example_compute_virtualmachine.py | zikalino/AzurePythonExamples | 23f9c173f0736f4e7ff66dde0402ef88da4ccc8f | [
"MIT"
] | 1 | 2020-09-04T14:38:13.000Z | 2020-09-04T14:38:13.000Z | examples/example_compute_virtualmachine.py | zikalino/AzurePythonExamples | 23f9c173f0736f4e7ff66dde0402ef88da4ccc8f | [
"MIT"
] | null | null | null | examples/example_compute_virtualmachine.py | zikalino/AzurePythonExamples | 23f9c173f0736f4e7ff66dde0402ef88da4ccc8f | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
import os
f... | 38.064706 | 165 | 0.532066 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
import os
f... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b7b05e24047747d5379002c2e983d449318e3256 | 1,692 | py | Python | showcase/migrations/0007_auto_20190112_1627.py | aseufert/sporttechiq | 90812142bedf63fed9d1e5f3b246b78299aa45f7 | [
"MIT"
] | null | null | null | showcase/migrations/0007_auto_20190112_1627.py | aseufert/sporttechiq | 90812142bedf63fed9d1e5f3b246b78299aa45f7 | [
"MIT"
] | null | null | null | showcase/migrations/0007_auto_20190112_1627.py | aseufert/sporttechiq | 90812142bedf63fed9d1e5f3b246b78299aa45f7 | [
"MIT"
] | null | null | null | # Generated by Django 2.0 on 2019-01-12 16:27
| 37.6 | 134 | 0.634752 | # Generated by Django 2.0 on 2019-01-12 16:27
from django.db import migrations, models
import showcase.file_size_validator
class Migration(migrations.Migration):
dependencies = [
('showcase', '0006_auto_20190110_0159'),
]
operations = [
migrations.AddField(
model_name='stati... | 0 | 0 | 0 | 1,544 | 0 | 0 | 0 | 33 | 68 |
f83dea9758f213b0e8e2e9abfa0e77a70c0d6852 | 620 | py | Python | analyzer/migrations/0013_auto_20191118_1544.py | elvinaqa/Amazon-Review-Analyzer-Summarizer-Python-NLP-ML- | 6c70e84ffbcb8c8fd65a7fe0847e1f0eb779f759 | [
"Unlicense"
] | 1 | 2020-09-10T11:26:05.000Z | 2020-09-10T11:26:05.000Z | analyzer/migrations/0013_auto_20191118_1544.py | elvinaqa/Amazon-Review-Analyzer-Summarizer-Python-NLP-ML- | 6c70e84ffbcb8c8fd65a7fe0847e1f0eb779f759 | [
"Unlicense"
] | null | null | null | analyzer/migrations/0013_auto_20191118_1544.py | elvinaqa/Amazon-Review-Analyzer-Summarizer-Python-NLP-ML- | 6c70e84ffbcb8c8fd65a7fe0847e1f0eb779f759 | [
"Unlicense"
] | null | null | null | # Generated by Django 2.2.6 on 2019-11-18 11:44
| 24.8 | 123 | 0.593548 | # Generated by Django 2.2.6 on 2019-11-18 11:44
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('analyzer', '0012_auto_20191118_1543'),
]
operations = [
migrations.RenameField(
model_name='product',
... | 0 | 0 | 0 | 490 | 0 | 0 | 0 | 13 | 68 |
1fc8ea8d797d815dbafa96ffd0013142703a6de9 | 50,533 | py | Python | app/libs/opasDocPermissions.py | Psychoanalytic-Electronic-Publishing/OpenPubArchive-Content-Server | 031b79b8e0dd5e1c22e2a51394cab846763a451a | [
"Apache-2.0"
] | null | null | null | app/libs/opasDocPermissions.py | Psychoanalytic-Electronic-Publishing/OpenPubArchive-Content-Server | 031b79b8e0dd5e1c22e2a51394cab846763a451a | [
"Apache-2.0"
] | 115 | 2020-09-02T20:01:26.000Z | 2022-03-30T11:47:23.000Z | app/libs/opasDocPermissions.py | Psychoanalytic-Electronic-Publishing/OpenPubArchive-Content-Server | 031b79b8e0dd5e1c22e2a51394cab846763a451a | [
"Apache-2.0"
] | 2 | 2020-10-15T13:52:10.000Z | 2020-10-20T13:42:51.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
import datetime
import time
import opasConfig
import models
import logging
import localsecrets
# import urllib.parse
# import json
import sys
# from opasAPISupportLib import save_opas_session_cookie
sys.path.append("..") # Adds higher directory to python mo... | 53.304852 | 202 | 0.572517 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
import datetime
import time
import opasConfig
import models
import logging
import localsecrets
# import urllib.parse
# import json
import sys
# from opasAPISupportLib import save_opas_session_cookie
sys.path.append("..") # Adds higher directory to python mo... | 3 | 0 | 0 | 0 | 0 | 11,394 | 0 | 23 | 218 |
40fbb92c604af78ae8abdd9f0581a69abc062ce6 | 399 | py | Python | specdal/operators/__init__.py | EnSpec/specdal.github.io | 4a89f5de6d8feb9472813da9767eafb78c0fe19a | [
"MIT"
] | 13 | 2018-03-09T07:45:29.000Z | 2021-09-15T21:41:28.000Z | specdal/operators/__init__.py | EnSpec/specdal.github.io | 4a89f5de6d8feb9472813da9767eafb78c0fe19a | [
"MIT"
] | 8 | 2018-05-14T14:06:50.000Z | 2021-08-23T09:17:00.000Z | specdal/operators/__init__.py | EnSpec/specdal.github.io | 4a89f5de6d8feb9472813da9767eafb78c0fe19a | [
"MIT"
] | 12 | 2017-08-30T18:06:13.000Z | 2021-06-08T18:54:16.000Z | from os.path import dirname, basename, isfile
import glob
modules = glob.glob(dirname(__file__)+"/*.py")
__all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]
| 33.25 | 93 | 0.784461 | from os.path import dirname, basename, isfile
import glob
modules = glob.glob(dirname(__file__)+"/*.py")
__all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]
from .proximal_join import proximal_join, get_column_types
from .interpolate import interpolate
from .stitch import sti... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 111 |
ac6b1ef8fdf9ff2381db86bc500d15f0ccda651f | 977 | py | Python | 04_jump_the_five/jump.py | dwidmaye/tiny_python_projects | 3b03a667ad2b73d19126732a4018580cfecb35ed | [
"MIT"
] | null | null | null | 04_jump_the_five/jump.py | dwidmaye/tiny_python_projects | 3b03a667ad2b73d19126732a4018580cfecb35ed | [
"MIT"
] | null | null | null | 04_jump_the_five/jump.py | dwidmaye/tiny_python_projects | 3b03a667ad2b73d19126732a4018580cfecb35ed | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Author : Derek Widmayer <dwidmaye@gmail.com>
Date : 2021-01-10
Purpose: Rock the Casbah
"""
import argparse
# --------------------------------------------------
def get_args():
"""Jump the five"""
parser = argparse.ArgumentParser(
description='Jump the five',
for... | 22.72093 | 115 | 0.460594 | #!/usr/bin/env python3
"""
Author : Derek Widmayer <dwidmaye@gmail.com>
Date : 2021-01-10
Purpose: Rock the Casbah
"""
import argparse
# --------------------------------------------------
def get_args():
"""Jump the five"""
parser = argparse.ArgumentParser(
description='Jump the five',
for... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d414981108f85165d9d4ca5669ff02f44bd6cea3 | 8,029 | py | Python | models-tf1/preprocess_data.py | vlada-rozova/bladder-cancer | 05005600948eacf25cd1ae164a2f46ae15ce2cf3 | [
"MIT"
] | 1 | 2022-03-05T02:51:47.000Z | 2022-03-05T02:51:47.000Z | models-tf1/preprocess_data.py | vlada-rozova/bladder-cancer | 05005600948eacf25cd1ae164a2f46ae15ce2cf3 | [
"MIT"
] | null | null | null | models-tf1/preprocess_data.py | vlada-rozova/bladder-cancer | 05005600948eacf25cd1ae164a2f46ae15ce2cf3 | [
"MIT"
] | 1 | 2021-01-22T15:59:08.000Z | 2021-01-22T15:59:08.000Z | import os
import os.path
import glob
import cv2
import numpy as np
import matplotlib.pyplot as plt
IMAGENET_MEAN_BGR = [103.939, 116.779, 123.68]
def load_images(data_path, image_height, image_width, plot=False):
"""
Read an image in BGR,
resize to image_height x image_width,
subtract mean of ImageNet... | 32.905738 | 102 | 0.61116 | import os
import os.path
import glob
import cv2
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
IMAGENET_MEAN_BGR = [103.939, 116.779, 123.68]
def load_images(data_path, image_height, image_width, plot=False):
"""
Read an image in BGR,
resize to image_height x image_width,
subtr... | 0 | 0 | 0 | 0 | 0 | 512 | 0 | -2 | 45 |
6f45aea8b544b9ccd10b35307ac7d38d809c6c2e | 201 | py | Python | Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/python/tvm/relay/nn.py | mengkai94/training_results_v0.6 | 43dc3e250f8da47b5f8833197d74cb8cf1004fc9 | [
"Apache-2.0"
] | 64 | 2021-05-02T14:42:34.000Z | 2021-05-06T01:35:03.000Z | python/tvm/relay/nn.py | ganzhiliang/tvm | b076cad542524cb3744149d953c341b5815f6474 | [
"Apache-2.0"
] | 23 | 2019-07-29T05:21:52.000Z | 2020-08-31T18:51:42.000Z | python/tvm/relay/nn.py | ganzhiliang/tvm | b076cad542524cb3744149d953c341b5815f6474 | [
"Apache-2.0"
] | 51 | 2019-07-12T05:10:25.000Z | 2021-07-28T16:19:06.000Z | # pylint: disable=wildcard-import, unused-import, unused-wildcard-import
"""Neural network related operators."""
# Re-export in a specific file name so that autodoc can pick it up
| 40.2 | 72 | 0.761194 | # pylint: disable=wildcard-import, unused-import, unused-wildcard-import
"""Neural network related operators."""
# Re-export in a specific file name so that autodoc can pick it up
from .op.nn import *
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 22 |
b56bee90b4215634a95bf4e633d4903390ad51f0 | 15,864 | py | Python | tests/cli/publish/test_publish.py | daobook/hatch | 1cf39ad1a11ce90bc77fb7fdc4b9202433509179 | [
"MIT"
] | null | null | null | tests/cli/publish/test_publish.py | daobook/hatch | 1cf39ad1a11ce90bc77fb7fdc4b9202433509179 | [
"MIT"
] | null | null | null | tests/cli/publish/test_publish.py | daobook/hatch | 1cf39ad1a11ce90bc77fb7fdc4b9202433509179 | [
"MIT"
] | null | null | null | import os
import pytest
PUBLISHER_TOKEN = os.environ.get('HATCH_CI_PUBLISHER_TOKEN')
pytestmark = [
pytest.mark.skipif(not PUBLISHER_TOKEN, reason='Publishing tests are only executed within CI environments'),
]
| 32.84472 | 114 | 0.649962 | import os
import secrets
import tarfile
import time
import zipfile
from collections import defaultdict
import httpx
import pytest
from hatch.config.constants import PublishEnvVars
from hatch.utils.ci import running_in_ci
PUBLISHER_TOKEN = os.environ.get('HATCH_CI_PUBLISHER_TOKEN')
pytestmark = [
pytest.mark.ski... | 0 | 3,804 | 0 | 3 | 0 | 11,157 | 0 | 21 | 644 |
f294135649d390d81ded077a590de5d0b88465de | 350 | py | Python | feed/urls.py | DeanBiton/JobSeeker | ed60ec1ab4a047700d72b44d7a042dd834e43abd | [
"MIT"
] | null | null | null | feed/urls.py | DeanBiton/JobSeeker | ed60ec1ab4a047700d72b44d7a042dd834e43abd | [
"MIT"
] | null | null | null | feed/urls.py | DeanBiton/JobSeeker | ed60ec1ab4a047700d72b44d7a042dd834e43abd | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.feed, name='feed'),
path('post/<int:pk>/', views.PostDetailView.as_view(), name='post-detail'),
path('post/<int:pk>/delete/', views.PostDeleteView.as_view(), name='post-delete'),
path('post/new/', views.PostCreateView.as_v... | 31.818182 | 86 | 0.668571 | from django.urls import path
from . import views
urlpatterns = [
path('', views.feed, name='feed'),
path('post/<int:pk>/', views.PostDetailView.as_view(), name='post-detail'),
path('post/<int:pk>/delete/', views.PostDeleteView.as_view(), name='post-delete'),
path('post/new/', views.PostCreateView.as_v... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
60b9ecd703c18e205ce332ad07cdc2632ae08239 | 1,554 | py | Python | button/demo_oled.py | flashypepo/myMicropython-Examples | b2b63df865b5ad471b351ca5f279135025859f5d | [
"MIT"
] | 3 | 2017-09-03T17:17:44.000Z | 2017-12-10T12:26:46.000Z | button/demo_oled.py | flashypepo/myMicropython-Examples | b2b63df865b5ad471b351ca5f279135025859f5d | [
"MIT"
] | null | null | null | button/demo_oled.py | flashypepo/myMicropython-Examples | b2b63df865b5ad471b351ca5f279135025859f5d | [
"MIT"
] | 2 | 2017-10-01T01:10:55.000Z | 2018-07-15T19:49:29.000Z | ''' demo of reading a button
2017-0808 PePo - added OLED display to demo
Adafruit article:
https://learn.adafruit.com/micropython-hardware-digital-i-slash-o/digital-inputs
'''
import machine
import ssd1306
__LED_PIN = const(14) #GPIO14
__BUTTON_PIN = const(12) #GPIO12
#define led to be set on / off by button
led =... | 26.338983 | 81 | 0.647362 | ''' demo of reading a button
2017-0808 PePo - added OLED display to demo
Adafruit article:
https://learn.adafruit.com/micropython-hardware-digital-i-slash-o/digital-inputs
'''
import machine, time
import ssd1306
__LED_PIN = const(14) #GPIO14
__BUTTON_PIN = const(12) #GPIO12
#define led to be set on / off by button... | 0 | 0 | 0 | 0 | 0 | 504 | 0 | 6 | 44 |
0ed30c27d88286245f7f8350be353500778ba256 | 27,161 | py | Python | tests/ope/test_meta_slate.py | han20192019/newRL | 53598edab284b4364d127ec5662137de3f9c1206 | [
"Apache-2.0"
] | 387 | 2020-07-19T14:56:36.000Z | 2022-03-29T15:25:21.000Z | tests/ope/test_meta_slate.py | han20192019/newRL | 53598edab284b4364d127ec5662137de3f9c1206 | [
"Apache-2.0"
] | 89 | 2020-10-04T17:04:42.000Z | 2022-03-27T10:43:15.000Z | tests/ope/test_meta_slate.py | han20192019/newRL | 53598edab284b4364d127ec5662137de3f9c1206 | [
"Apache-2.0"
] | 53 | 2020-08-18T09:52:22.000Z | 2022-03-30T23:16:13.000Z | import itertools
import numpy as np
import pytest
from obp.ope import SlateOffPolicyEvaluation
from obp.types import BanditFeedback
mock_policy_value = 0.5
mock_confidence_interval = {
"mean": 0.5,
"95.0% CI (lower)": 0.3,
"95.0% CI (upper)": 0.7,
}
# define Mock instances
sips = SlateStandardIPSMoc... | 35.644357 | 133 | 0.699385 | from copy import deepcopy
from dataclasses import dataclass
import itertools
import re
from typing import Dict
from typing import Optional
import numpy as np
import pandas as pd
from pandas.testing import assert_frame_equal
import pytest
from obp.ope import SlateIndependentIPS
from obp.ope import SlateOffPolicyEvalua... | 0 | 22,254 | 0 | 0 | 0 | 0 | 0 | 127 | 519 |
ba8e540faa742cb0c08a2833ab89a8271fb5c208 | 6,100 | py | Python | unityparser/view_factory.py | adrianogil/SublimeUnityIntel | b3f3d686654c4dd62b3a792488d63bfd8105ce6a | [
"MIT"
] | null | null | null | unityparser/view_factory.py | adrianogil/SublimeUnityIntel | b3f3d686654c4dd62b3a792488d63bfd8105ce6a | [
"MIT"
] | null | null | null | unityparser/view_factory.py | adrianogil/SublimeUnityIntel | b3f3d686654c4dd62b3a792488d63bfd8105ce6a | [
"MIT"
] | null | null | null | import os, sys
__file__ = os.path.normpath(os.path.abspath(__file__))
__path__ = os.path.dirname(__file__)
__popup_path__ = os.path.join(__path__, 'popup')
# print(__path__)
if __path__ not in sys.path:
sys.path.insert(0, __path__)
if __popup_path__ not in sys.path:
sys.path.insert(0, __popup_path__)
impor... | 37.195122 | 88 | 0.621803 | import os, sys
__file__ = os.path.normpath(os.path.abspath(__file__))
__path__ = os.path.dirname(__file__)
__popup_path__ = os.path.join(__path__, 'popup')
# print(__path__)
if __path__ not in sys.path:
sys.path.insert(0, __path__)
if __popup_path__ not in sys.path:
sys.path.insert(0, __popup_path__)
from ... | 0 | 0 | 0 | 5,328 | 0 | 0 | 0 | 56 | 90 |
0fa697b9befc7417a9ae9af626234a8357c50e5d | 485 | py | Python | operators/utils/http_connection/script.py | thhapke/dilocal | 1d3c1b7b1a4513e9bff7efd77f680f66014ff499 | [
"MIT"
] | null | null | null | operators/utils/http_connection/script.py | thhapke/dilocal | 1d3c1b7b1a4513e9bff7efd77f680f66014ff499 | [
"MIT"
] | null | null | null | operators/utils/http_connection/script.py | thhapke/dilocal | 1d3c1b7b1a4513e9bff7efd77f680f66014ff499 | [
"MIT"
] | null | null | null | # Mock apis needs to be commented before used within SAP Data Intelligence
#from diadmin.dimockapi.mock_api import mock_api
#api = mock_api(__file__)
api.add_generator(gen) | 22.045455 | 74 | 0.740206 | # Mock apis needs to be commented before used within SAP Data Intelligence
#from diadmin.dimockapi.mock_api import mock_api
#api = mock_api(__file__)
import os
import json
import requests
import http.client
from base64 import b64encode
def gen():
#att = {'user':user,'tenant':tenant,'password':api.config.passw... | 0 | 0 | 0 | 0 | 0 | 201 | 0 | -24 | 134 |
41345779e4ff29c248e42e597575a0a23cdd48b2 | 5,772 | py | Python | nessusha/nessusha/Archive/v3.py | SanPersie/NessusHa | c7663d7ff58e3a5eaf25505a862af3d9b9a52f09 | [
"MIT"
] | null | null | null | nessusha/nessusha/Archive/v3.py | SanPersie/NessusHa | c7663d7ff58e3a5eaf25505a862af3d9b9a52f09 | [
"MIT"
] | null | null | null | nessusha/nessusha/Archive/v3.py | SanPersie/NessusHa | c7663d7ff58e3a5eaf25505a862af3d9b9a52f09 | [
"MIT"
] | null | null | null | from tkinter import filedialog
# from tkinter.filedialog import askopenfilename
Tk().withdraw() # we don't want a full GUI, so keep the root window from appearing
filename = filedialog.askopenfilename() # show an "Open" dialog box and return the path to the selected file
filename.replace("/", "\\\\")
raw... | 34.562874 | 119 | 0.472107 | from tkinter import filedialog
from bs4 import *
import re
from pprint import *
import pprint
import xlsxwriter
from tkinter import *
# from tkinter.filedialog import askopenfilename
Tk().withdraw() # we don't want a full GUI, so keep the root window from appearing
filename = filedialog.askopenfilename() #... | 0 | 0 | 0 | 0 | 0 | 5,003 | 0 | -29 | 238 |
4ca8d914db8f80f1a127210560f44c395e212d78 | 1,213 | py | Python | setup.py | avmaint/obs-ws-rc | 8ff2c36bdd2ac1636feabb356864b9ebb20e9b30 | [
"MIT"
] | 38 | 2017-08-07T04:30:28.000Z | 2021-11-03T08:30:47.000Z | setup.py | avmaint/obs-ws-rc | 8ff2c36bdd2ac1636feabb356864b9ebb20e9b30 | [
"MIT"
] | 10 | 2017-09-20T11:21:41.000Z | 2021-09-27T22:56:22.000Z | setup.py | avmaint/obs-ws-rc | 8ff2c36bdd2ac1636feabb356864b9ebb20e9b30 | [
"MIT"
] | 13 | 2017-10-28T20:41:39.000Z | 2020-12-28T02:51:03.000Z | from pathlib import Path
from setuptools import setup
root = Path(__file__).parent.absolute()
with open(str(root / 'README.rst')) as f:
long_description = f.read()
setup(
name='obs-ws-rc',
version='2.3.0',
description=("asyncio-based Python 3.5+ client to obs-websocket "
"plugin ... | 21.280702 | 71 | 0.602638 | from pathlib import Path
from setuptools import setup
root = Path(__file__).parent.absolute()
with open(str(root / 'README.rst')) as f:
long_description = f.read()
setup(
name='obs-ws-rc',
version='2.3.0',
description=("asyncio-based Python 3.5+ client to obs-websocket "
"plugin ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
db570ba3a1be2917db42a3105f080646ef9b30bc | 192 | py | Python | ida/daenerys_utils.py | daenerys-sre/source | e9175407d4f43b33e20a5d7060480a7659535874 | [
"MIT"
] | 296 | 2019-03-19T04:02:41.000Z | 2021-12-15T08:06:35.000Z | ida/daenerys_utils.py | daenerys-sre/source | e9175407d4f43b33e20a5d7060480a7659535874 | [
"MIT"
] | 1 | 2019-04-01T14:13:56.000Z | 2019-04-01T14:14:18.000Z | ida/daenerys_utils.py | daenerys-sre/source | e9175407d4f43b33e20a5d7060480a7659535874 | [
"MIT"
] | 24 | 2019-03-19T09:48:11.000Z | 2021-12-10T14:35:57.000Z | # Daenerys IDA/Ghidra interop framework
# by Elias Bachaalany <elias.bachaalany@gmail.com>
#
# Python utility functions | 21.333333 | 50 | 0.786458 | # Daenerys IDA/Ghidra interop framework
# by Elias Bachaalany <elias.bachaalany@gmail.com>
#
# Python utility functions
import numbers
def is_number(n):
return isinstance(n, numbers.Number) | 0 | 0 | 0 | 0 | 0 | 34 | 0 | -7 | 46 |
ee0c68f70bcd626146ccf821e62ba39daab4b397 | 8,242 | py | Python | py_everything/sencrypt.py | tsukuyomm/py_everything | 1d0578670d5ae28f16711b92a9fc0f2ff5bf6897 | [
"MIT"
] | null | null | null | py_everything/sencrypt.py | tsukuyomm/py_everything | 1d0578670d5ae28f16711b92a9fc0f2ff5bf6897 | [
"MIT"
] | null | null | null | py_everything/sencrypt.py | tsukuyomm/py_everything | 1d0578670d5ae28f16711b92a9fc0f2ff5bf6897 | [
"MIT"
] | null | null | null | '''
Super Encrypt - Encryption Algorithm with 4 key encryption and decryption
__author__ = "PyBash"
__version__ = "v1.0.0"
'''
BASE_LETTERS = 'abcdefghijklmnopqrstuvwxyz'
BASE_SYMBOLS = ' 1234567890!@#$%^&*()-_=+[{]};:\'"<,>.?/`~|\\'
| 35.07234 | 77 | 0.545377 | '''
Super Encrypt - Encryption Algorithm with 4 key encryption and decryption
__author__ = "PyBash"
__version__ = "v1.0.0"
'''
import random
from . import error
BASE_LETTERS = 'abcdefghijklmnopqrstuvwxyz'
BASE_SYMBOLS = ' 1234567890!@#$%^&*()-_=+[{]};:\'"<,>.?/`~|\\'
def genCharKeys():
base = list(BASE_LETTERS)
... | 0 | 0 | 0 | 6,406 | 0 | 1,447 | 0 | -10 | 163 |
39862178fd723b90f84b5890435898f345b96a59 | 4,479 | py | Python | Exercises.py | cnaseeb/Pythonify | c4f2206e660f5edf2b069b6cfb9a4b504cb6c685 | [
"Apache-2.0"
] | null | null | null | Exercises.py | cnaseeb/Pythonify | c4f2206e660f5edf2b069b6cfb9a4b504cb6c685 | [
"Apache-2.0"
] | null | null | null | Exercises.py | cnaseeb/Pythonify | c4f2206e660f5edf2b069b6cfb9a4b504cb6c685 | [
"Apache-2.0"
] | null | null | null | # The code below almost works
name = input("Enter your name")
print("Hello", name)
##2
# This first line is provided for you
hrs = input("Enter Hours:")
# hrs = float(hrs) #use the one in line 9 instead
ratePerHour = input("Enter rate per hour:")
# rateperHour = float(ratePerHour) #use the one in line 9 instead
# y... | 29.084416 | 189 | 0.652154 | # The code below almost works
name = input("Enter your name")
print("Hello", name)
##2
# This first line is provided for you
hrs = input("Enter Hours:")
# hrs = float(hrs) #use the one in line 9 instead
ratePerHour = input("Enter rate per hour:")
# rateperHour = float(ratePerHour) #use the one in line 9 instead
# y... | 0 | 0 | 0 | 0 | 0 | 520 | 0 | 0 | 23 |
9a50bec54ba634d2c7dab08f7f2245948c044388 | 5,352 | py | Python | setup.py | kenzanlabs/spinikube | 07850a30769139c846e187aeeee9f0d24dce897e | [
"Apache-2.0"
] | 113 | 2016-09-03T02:53:37.000Z | 2021-04-20T00:18:49.000Z | setup.py | kenzanlabs/spinikube | 07850a30769139c846e187aeeee9f0d24dce897e | [
"Apache-2.0"
] | 27 | 2016-08-04T20:28:41.000Z | 2018-08-22T10:04:15.000Z | setup.py | kenzanlabs/spinikube | 07850a30769139c846e187aeeee9f0d24dce897e | [
"Apache-2.0"
] | 47 | 2016-08-16T15:34:17.000Z | 2020-06-13T17:57:37.000Z | #!/usr/local/bin/python
import os
import time
o("minikube delete")
o("minikube start --memory 10000 --cpus 4 --disk-size=60g")
#o("kubectl delete namespace spinnaker")
#time.sleep(30)
o("kubectl create namespace spinnaker")
c("applications/kubedash/bundle.yaml")
c("applications/tectonic/pull.yml")
c("applications... | 28.92973 | 302 | 0.678812 | #!/usr/local/bin/python
import os
import time
import collections
import subprocess
def cmdOut(cmd):
return subprocess.check_output(cmd, shell=True).strip()
def poll():
creating = "ContainerCreating"
while creating.find("ContainerCreating") != -1:
creating = cmdOut("kubectl get pods --all-namespaces")
o... | 0 | 0 | 0 | 0 | 0 | 457 | 0 | -7 | 159 |
84581387c769a73a11b21a07890f917ea1153434 | 11,312 | py | Python | Interfaz/UIPyfiles/VistaAnalisisDatos.py | Dumaru/ExcelReports | 989d8864d77e2b84dc73f16205894a6afa8e11ab | [
"MIT"
] | 1 | 2020-10-16T19:54:17.000Z | 2020-10-16T19:54:17.000Z | Interfaz/UIPyfiles/VistaAnalisisDatos.py | Dumaru/ExcelReports | 989d8864d77e2b84dc73f16205894a6afa8e11ab | [
"MIT"
] | null | null | null | Interfaz/UIPyfiles/VistaAnalisisDatos.py | Dumaru/ExcelReports | 989d8864d77e2b84dc73f16205894a6afa8e11ab | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\VistaAnalisisDatos.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtWidgets
# import DATOS IMAGENES_rc
if __name__ == "__main__":
import sys
app = Q... | 57.714286 | 144 | 0.726397 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\VistaAnalisisDatos.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from UI.Recursos import images_rc
class Ui_VistaAnalisisDatos(obje... | 0 | 0 | 0 | 10,715 | 0 | 0 | 0 | 27 | 45 |
541297fe7105352dad73ba97488ae9bb7f7fcee2 | 947 | py | Python | docs/plots/extended/stereographic/mobius_add.py | SsnL/geoopt | 47e7e6b79c177e3172161afaef8424d61b917a7b | [
"Apache-2.0"
] | 438 | 2019-03-05T11:24:03.000Z | 2022-03-31T14:46:42.000Z | docs/plots/extended/stereographic/mobius_add.py | SsnL/geoopt | 47e7e6b79c177e3172161afaef8424d61b917a7b | [
"Apache-2.0"
] | 98 | 2019-03-07T21:38:24.000Z | 2022-03-25T10:48:45.000Z | docs/plots/extended/stereographic/mobius_add.py | SsnL/geoopt | 47e7e6b79c177e3172161afaef8424d61b917a7b | [
"Apache-2.0"
] | 58 | 2019-04-13T04:52:16.000Z | 2022-03-14T09:26:00.000Z | from geoopt import Stereographic
import torch
import matplotlib.pyplot as plt
import seaborn as sns
from matplotlib import rcParams
import shutil
if shutil.which("latex") is not None:
rcParams["text.latex.preamble"] = r"\usepackage{amsmath}"
rcParams["text.usetex"] = True
sns.set_style("white")
x = torch.ten... | 27.057143 | 79 | 0.673706 | from geoopt import Stereographic
import torch
import matplotlib.pyplot as plt
import seaborn as sns
from matplotlib import rcParams
import shutil
if shutil.which("latex") is not None:
rcParams["text.latex.preamble"] = r"\usepackage{amsmath}"
rcParams["text.usetex"] = True
sns.set_style("white")
x = torch.ten... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4d52788cd7cfccd02577ac558846c01bff961277 | 1,560 | py | Python | 2/CH2_NN.py | ys19931127/TensorFlow | 814ae734db5c252ff8dc5a503523b23ea0661ee3 | [
"MIT"
] | 270 | 2016-11-21T13:54:44.000Z | 2022-02-18T01:50:49.000Z | 2/CH2_NN.py | ys19931127/TensorFlow | 814ae734db5c252ff8dc5a503523b23ea0661ee3 | [
"MIT"
] | 12 | 2016-12-28T00:06:09.000Z | 2021-09-29T06:19:24.000Z | 2/CH2_NN.py | ys19931127/TensorFlow | 814ae734db5c252ff8dc5a503523b23ea0661ee3 | [
"MIT"
] | 192 | 2016-11-21T13:54:47.000Z | 2021-11-25T08:33:18.000Z | import tensorflow as tf
import numpy as np
import time
import matplotlib
import matplotlib.pyplot as plt
from sklearn.datasets.samples_generator import make_circles
N=210
K=2
# Maximum number of iterations, if the conditions are not met
MAX_ITERS = 1000
cut=int(N*0.7)
start = time.time()
data, features = make_circ... | 27.857143 | 121 | 0.721154 | import tensorflow as tf
import numpy as np
import time
import matplotlib
import matplotlib.pyplot as plt
from sklearn.datasets.samples_generator import make_circles
N=210
K=2
# Maximum number of iterations, if the conditions are not met
MAX_ITERS = 1000
cut=int(N*0.7)
start = time.time()
data, features = make_circ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1fdce70173b0951074f03a0d68e77c0cc775a0fc | 2,936 | py | Python | ds/graph.py | BaiqiangGit/Data-Structure-and-Algorithms---Python3 | 964a41f210356b8d7b192bf54a2a1eb9a754b19e | [
"Apache-2.0"
] | 2 | 2021-01-14T08:58:05.000Z | 2021-11-25T21:25:16.000Z | ds/graph.py | BaiqiangGit/Data-Structure-and-Algorithms---Python3 | 964a41f210356b8d7b192bf54a2a1eb9a754b19e | [
"Apache-2.0"
] | null | null | null | ds/graph.py | BaiqiangGit/Data-Structure-and-Algorithms---Python3 | 964a41f210356b8d7b192bf54a2a1eb9a754b19e | [
"Apache-2.0"
] | 1 | 2021-01-14T08:58:06.000Z | 2021-01-14T08:58:06.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
## Baiqiang XIA implementation of data structures
## Graph represented as Adjacency List
| 31.913043 | 92 | 0.531676 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
## Baiqiang XIA implementation of data structures
## Graph represented as Adjacency List
class directedGraph(object):
## init
def __init__(self):
self.graph = {} ## adjacency diction
## add Edge
def addEdge(self, fromVertex, toVertex):
... | 0 | 0 | 0 | 2,753 | 0 | 0 | 0 | 0 | 22 |
a84fec674e866f8507cbef9561c482b7154ff4c0 | 244 | py | Python | codeforces/math数学/1000/1359A摸大王.py | yofn/pyacm | e573f8fdeea77513711f00c42f128795cbba65a6 | [
"Apache-2.0"
] | null | null | null | codeforces/math数学/1000/1359A摸大王.py | yofn/pyacm | e573f8fdeea77513711f00c42f128795cbba65a6 | [
"Apache-2.0"
] | null | null | null | codeforces/math数学/1000/1359A摸大王.py | yofn/pyacm | e573f8fdeea77513711f00c42f128795cbba65a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# https://codeforces.com/problemset/problem/1359/A
t = int(input())
for _ in range(t):
n,m,k = list(map(int,input().split()))
winner = min(n//k,m)
second = (m-winner+k-2)//(k-1)
print(winner-second)
| 22.181818 | 50 | 0.598361 | #!/usr/bin/env python3
# https://codeforces.com/problemset/problem/1359/A
t = int(input())
for _ in range(t):
n,m,k = list(map(int,input().split()))
winner = min(n//k,m)
second = (m-winner+k-2)//(k-1)
print(winner-second)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bc3140a00caacc8db57f94c6a0db831bee8d9301 | 244 | py | Python | p16.py | nymoral/euler | 9dcc1bb6c733e3164e06e97f2363993fb932f5fc | [
"MIT"
] | null | null | null | p16.py | nymoral/euler | 9dcc1bb6c733e3164e06e97f2363993fb932f5fc | [
"MIT"
] | null | null | null | p16.py | nymoral/euler | 9dcc1bb6c733e3164e06e97f2363993fb932f5fc | [
"MIT"
] | null | null | null | """
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
What is the sum of the digits of the number 2^1000?
"""
if __name__ == "__main__":
print(sum_digits(2**1000))
| 22.181818 | 65 | 0.618852 | """
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
What is the sum of the digits of the number 2^1000?
"""
def sum_digits(n):
return sum(int(x) for x in str(n))
if __name__ == "__main__":
print(sum_digits(2**1000))
| 0 | 0 | 0 | 0 | 0 | 36 | 0 | 0 | 23 |
8d1c1db8400e459c9493cf2d5adb601c5b5910b4 | 2,083 | py | Python | examples/fitbit_interday/sleep_dataset.py | qcri/tasrif | 327bc1eccb8f8e11d8869ba65a7c72ad038aa094 | [
"BSD-3-Clause"
] | 20 | 2021-12-06T10:41:54.000Z | 2022-03-13T16:25:43.000Z | examples/fitbit_interday/sleep_dataset.py | qcri/tasrif | 327bc1eccb8f8e11d8869ba65a7c72ad038aa094 | [
"BSD-3-Clause"
] | 33 | 2021-12-06T08:27:18.000Z | 2022-03-14T05:07:53.000Z | examples/fitbit_interday/sleep_dataset.py | qcri/tasrif | 327bc1eccb8f8e11d8869ba65a7c72ad038aa094 | [
"BSD-3-Clause"
] | 2 | 2022-02-07T08:06:48.000Z | 2022-02-14T07:13:42.000Z | import os
from tasrif.data_readers.fitbit_interday_dataset import FitbitInterdayDataset
from tasrif.processing_pipeline import SequenceOperator
from tasrif.processing_pipeline.custom import AggregateOperator, CreateFeatureOperator
from tasrif.processing_pipeline.pandas import (ConvertToDatetimeOperator, SetIndexOperat... | 30.188406 | 90 | 0.662506 | import os
from tasrif.data_readers.fitbit_interday_dataset import FitbitInterdayDataset
from tasrif.processing_pipeline import SequenceOperator
from tasrif.processing_pipeline.custom import AggregateOperator, CreateFeatureOperator
from tasrif.processing_pipeline.pandas import (
ConvertToDatetimeOperator,
SetIn... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0 |
c3a0dd529b678d2984acd9b3350424464c379f44 | 311 | py | Python | landing/serializers.py | cactus-computing/product-recommendation | b5d9bb27205a4fb032fd19934ecab56a5a8c6d81 | [
"MIT"
] | null | null | null | landing/serializers.py | cactus-computing/product-recommendation | b5d9bb27205a4fb032fd19934ecab56a5a8c6d81 | [
"MIT"
] | null | null | null | landing/serializers.py | cactus-computing/product-recommendation | b5d9bb27205a4fb032fd19934ecab56a5a8c6d81 | [
"MIT"
] | null | null | null | #from store.models import Store
| 28.272727 | 54 | 0.755627 | from rest_framework import serializers
from landing.models import Contact
import re
from rest_framework.response import Response
#from store.models import Store
class ContactSerializer(serializers.ModelSerializer):
class Meta:
model = Contact
fields = ("name", "email", "phone", "website") | 0 | 0 | 0 | 127 | 0 | 0 | 0 | 41 | 111 |
635c5fa8734b68f1c1a855e1daaac1237bea340e | 17,944 | py | Python | app/searchcom/callbacks.py | tg2648/cu-reports-app | 851388320be9382d56c0dbdc89c26f761b4e3e7e | [
"MIT"
] | null | null | null | app/searchcom/callbacks.py | tg2648/cu-reports-app | 851388320be9382d56c0dbdc89c26f761b4e3e7e | [
"MIT"
] | 1 | 2021-04-20T14:56:31.000Z | 2021-04-20T14:56:31.000Z | app/searchcom/callbacks.py | tg2648/cu-reports-app | 851388320be9382d56c0dbdc89c26f761b4e3e7e | [
"MIT"
] | null | null | null | """
Dash callbacks
Only applicant and posting data depend on the requisition number value
Pipeline and subfield data depend on the posting data
Callback chain:
Requisition number dropdown value changes
-> applicant data and posting data load
---> pipeline and subfield data load
-----> charts and footers load
"""
# T... | 41.730233 | 170 | 0.534329 | """
Dash callbacks
Only applicant and posting data depend on the requisition number value
Pipeline and subfield data depend on the posting data
Callback chain:
Requisition number dropdown value changes
-> applicant data and posting data load
---> pipeline and subfield data load
-----> charts and footers load
"""
# T... | 0 | 14,247 | 0 | 0 | 0 | 1,981 | 0 | 144 | 179 |
6e1f0cddd752d2501ab71db2277d2b19c88f128c | 656 | py | Python | tracks/views.py | daatrujillopu/Sfotipy | b77466b0b04b1f47b02b66a51b00df0be9b136bc | [
"MIT"
] | null | null | null | tracks/views.py | daatrujillopu/Sfotipy | b77466b0b04b1f47b02b66a51b00df0be9b136bc | [
"MIT"
] | null | null | null | tracks/views.py | daatrujillopu/Sfotipy | b77466b0b04b1f47b02b66a51b00df0be9b136bc | [
"MIT"
] | null | null | null | # Create your views here. | 32.8 | 67 | 0.664634 | from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse, Http404
import json
# Create your views here.
from .models import Track
def track_view(request, title):
track = get_object_or_404(Track, title=title)
data = {
'title': track.title,
'order': track.order,... | 0 | 0 | 0 | 0 | 0 | 469 | 0 | 51 | 111 |
f67f538e988db0543b692f179b047d468a68118b | 3,132 | py | Python | apps/cp2k/reframe_cp2k.py | stackhpc/nrel-benchmarks | 07e1078590c1668d3d9da6ab98eccfbbf9c5310a | [
"Apache-2.0"
] | null | null | null | apps/cp2k/reframe_cp2k.py | stackhpc/nrel-benchmarks | 07e1078590c1668d3d9da6ab98eccfbbf9c5310a | [
"Apache-2.0"
] | null | null | null | apps/cp2k/reframe_cp2k.py | stackhpc/nrel-benchmarks | 07e1078590c1668d3d9da6ab98eccfbbf9c5310a | [
"Apache-2.0"
] | null | null | null | """ Performance test using CP2K quantum chemistry and solid state physics software package for atomistic simulations.
See README.md for details.
NB:
- The executable is either cp2k.popt (for MPI only) or cp2k.psmp (for MPI + OpenMP).
- Only the former is currently implemented here.
"""
import reframe... | 41.76 | 125 | 0.604087 | """ Performance test using CP2K quantum chemistry and solid state physics software package for atomistic simulations.
See README.md for details.
NB:
- The executable is either cp2k.popt (for MPI only) or cp2k.psmp (for MPI + OpenMP).
- Only the former is currently implemented here.
"""
import reframe... | 0 | 2,219 | 0 | 0 | 0 | 0 | 0 | 105 | 155 |
9c93d549439c3cccb498a651bfc4df35dba94430 | 1,817 | py | Python | base/config.py | northwestern-mti/CeNDR-1 | 9d8f9d9a9fba7f4304202094c48bc5f80baf8e71 | [
"MIT"
] | null | null | null | base/config.py | northwestern-mti/CeNDR-1 | 9d8f9d9a9fba7f4304202094c48bc5f80baf8e71 | [
"MIT"
] | 2 | 2021-04-21T15:34:04.000Z | 2021-05-04T20:29:39.000Z | base/config.py | northwestern-mti/CeNDR-1 | 9d8f9d9a9fba7f4304202094c48bc5f80baf8e71 | [
"MIT"
] | null | null | null | # Application Configuration
import os
from base.utils.data_utils import json_encoder
# CeNDR Version
APP_CONFIG, CENDR_VERSION = os.environ['GAE_VERSION'].split("-", 1)
if APP_CONFIG not in ['development', 'master']:
APP_CONFIG = 'development'
CENDR_VERSION = CENDR_VERSION.replace("-", '.')
# BUILDS AND RELEASES
... | 30.79661 | 87 | 0.681343 | # Application Configuration
import os
import yaml
from base.utils.data_utils import json_encoder
# CeNDR Version
APP_CONFIG, CENDR_VERSION = os.environ['GAE_VERSION'].split("-", 1)
if APP_CONFIG not in ['development', 'master']:
APP_CONFIG = 'development'
CENDR_VERSION = CENDR_VERSION.replace("-", '.')
# BUILDS A... | 0 | 0 | 0 | 0 | 0 | 56 | 0 | -10 | 45 |
777beac9ae08c62f39158657df84701c5b5b92be | 1,477 | py | Python | recipes/blood_cells/object_detection/train.py | lbolanos/HugsVision | c9b1708928916bc413a795590d731308ea8c582b | [
"MIT"
] | 154 | 2021-08-14T00:09:15.000Z | 2022-03-16T02:42:01.000Z | recipes/blood_cells/object_detection/train.py | lbolanos/HugsVision | c9b1708928916bc413a795590d731308ea8c582b | [
"MIT"
] | 36 | 2021-08-13T23:42:15.000Z | 2022-03-31T03:57:23.000Z | recipes/blood_cells/object_detection/train.py | lbolanos/HugsVision | c9b1708928916bc413a795590d731308ea8c582b | [
"MIT"
] | 12 | 2021-09-04T00:49:35.000Z | 2022-02-24T13:20:54.000Z | import argparse
from hugsvision.nnet.ObjectDetectionTrainer import ObjectDetectionTrainer
parser = argparse.ArgumentParser(description='Object Detection')
parser.add_argument('--name', type=str, default="MyDETRModel", help='The name of the model')
parser.add_argument('--train', type=str, default="./BCCD_COCO/tr... | 43.441176 | 151 | 0.738659 | import argparse
from hugsvision.nnet.ObjectDetectionTrainer import ObjectDetectionTrainer
parser = argparse.ArgumentParser(description='Object Detection')
parser.add_argument('--name', type=str, default="MyDETRModel", help='The name of the model')
parser.add_argument('--train', type=str, default="./BCCD_COCO/tr... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
673d9575322508e179fee0b5f4ca442afccabd22 | 16,575 | py | Python | montepython/PolyChord.py | fkoehlin/montepython_2cosmos_public | 9901eaad8fb2497eb8fd899ec2a40c405e421d98 | [
"MIT"
] | 2 | 2019-02-14T18:44:52.000Z | 2020-04-06T10:25:31.000Z | montepython/PolyChord.py | fkoehlin/montepython_2cosmos_public | 9901eaad8fb2497eb8fd899ec2a40c405e421d98 | [
"MIT"
] | 2 | 2019-07-10T13:49:38.000Z | 2019-08-07T16:00:31.000Z | montepython/PolyChord.py | fkoehlin/montepython_2cosmos_public | 9901eaad8fb2497eb8fd899ec2a40c405e421d98 | [
"MIT"
] | null | null | null | """
.. module:: PolyChord
:synopsis: Interface the PolyChord program with MontePython
This implementation relies heavily on the existing Python wrapper for
PolyChord, called PyPolyChord, which comes with the PolyChord code.
To install PolyChord, download it from
`its GitHub repo <https://github.com/PolyChord/Poly... | 34.245868 | 119 | 0.614057 | """
.. module:: PolyChord
:synopsis: Interface the PolyChord program with MontePython
This implementation relies heavily on the existing Python wrapper for
PolyChord, called PyPolyChord, which comes with the PolyChord code.
To install PolyChord, download it from
`its GitHub repo <https://github.com/PolyChord/Poly... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6ce0196b579de3a6a9f29c8aeebefeb7079eb496 | 607 | py | Python | GameOfLife/__init__.py | JnyJny/GameOfLife | 5df27fa0b288466b779a9a89590b3e9b022583d2 | [
"MIT"
] | 21 | 2016-06-29T20:50:01.000Z | 2022-03-08T03:38:30.000Z | GameOfLife/__init__.py | JnyJny/GameOfLife | 5df27fa0b288466b779a9a89590b3e9b022583d2 | [
"MIT"
] | null | null | null | GameOfLife/__init__.py | JnyJny/GameOfLife | 5df27fa0b288466b779a9a89590b3e9b022583d2 | [
"MIT"
] | 5 | 2016-06-29T20:50:16.000Z | 2021-06-02T10:10:12.000Z | '''Conway's Game of Life
See: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
This particular Game of Life is implemented as a two dimensional
world populated with cells.
'''
__author__ = '\n'.join(["Erik O'Shaughnessy",
'erik.oshaughnessy@gmail.com',
'https://gi... | 27.590909 | 64 | 0.678748 | '''Conway's Game of Life
See: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
This particular Game of Life is implemented as a two dimensional
world populated with cells.
'''
__author__ = '\n'.join(["Erik O'Shaughnessy",
'erik.oshaughnessy@gmail.com',
'https://gi... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c31e92f37d0b6f7546db17b2925dd74a6087d199 | 8,109 | py | Python | mybitbank/libs/entities/coinaccount.py | kahazazzu/mybitbank | 945e604e5fee3914c7c98a25c2c34831ba0ad946 | [
"MIT"
] | 15 | 2015-08-29T12:35:59.000Z | 2018-02-06T06:26:26.000Z | mybitbank/libs/entities/coinaccount.py | FireWalkerX/mybitbank | 945e604e5fee3914c7c98a25c2c34831ba0ad946 | [
"MIT"
] | null | null | null | mybitbank/libs/entities/coinaccount.py | FireWalkerX/mybitbank | 945e604e5fee3914c7c98a25c2c34831ba0ad946 | [
"MIT"
] | 19 | 2015-02-03T21:32:51.000Z | 2021-11-06T12:08:26.000Z | """
The MIT License (MIT)
Copyright (c) 2016 Stratos Goudelis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, me... | 33.7875 | 137 | 0.60735 | """
The MIT License (MIT)
Copyright (c) 2016 Stratos Goudelis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, me... | 0 | 121 | 0 | 6,658 | 0 | 0 | 0 | 70 | 157 |
ced18a94b7867a0d537b815e9378c0be5f8d23c8 | 1,226 | py | Python | week_3/POO_livros.py | angelitabrg/lih_lab_python2 | 88d19d20704552e1a82c29793073e59dcf4b78c6 | [
"MIT"
] | null | null | null | week_3/POO_livros.py | angelitabrg/lih_lab_python2 | 88d19d20704552e1a82c29793073e59dcf4b78c6 | [
"MIT"
] | null | null | null | week_3/POO_livros.py | angelitabrg/lih_lab_python2 | 88d19d20704552e1a82c29793073e59dcf4b78c6 | [
"MIT"
] | null | null | null |
main() | 43.785714 | 145 | 0.614192 | def main(self):
livro1 = Livros_lidos('Eleanor & Park', 'Rainbow Rowell', 2012, 5, 3.99)
livro2 = Livros_lidos('O mito da beleza', 'Naomi Wolf', 1990, 4.5, 3.90)
livro3 = Livros_lidos('21 Lessons for the 21st Century', 'Yuval Noah Harari', 2018, 4.75, 4.17)
livro4 = Livros_lidos('In the Penal Colony', '... | 6 | 0 | 0 | 759 | 0 | 412 | 0 | 0 | 45 |
0d0d20b8d1fe4a06cb81c806169aa0a616284346 | 382 | py | Python | school/simpleApi/migrations/0007_alter_gradeable_student.py | kiarashplusplus/PaperPileSchool | 40f91eea15d743bd22f918cec42e9c778b3d6d7d | [
"MIT"
] | null | null | null | school/simpleApi/migrations/0007_alter_gradeable_student.py | kiarashplusplus/PaperPileSchool | 40f91eea15d743bd22f918cec42e9c778b3d6d7d | [
"MIT"
] | null | null | null | school/simpleApi/migrations/0007_alter_gradeable_student.py | kiarashplusplus/PaperPileSchool | 40f91eea15d743bd22f918cec42e9c778b3d6d7d | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-07-07 22:45
| 20.105263 | 49 | 0.596859 | # Generated by Django 3.2.4 on 2021-07-07 22:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('simpleApi', '0006_auto_20210707_2119'),
]
operations = [
migrations.AlterField(
model_name='gradeable',
name='studen... | 0 | 0 | 0 | 268 | 0 | 0 | 0 | 19 | 46 |
552249907b4b1b3ba5dc30b9255b8c99440d938a | 51 | py | Python | python/191108_python_review/datatype.py | hbyyy/TIL | e89ae2913a8a38eb7f480a9ec2324c3ac11e309e | [
"MIT"
] | null | null | null | python/191108_python_review/datatype.py | hbyyy/TIL | e89ae2913a8a38eb7f480a9ec2324c3ac11e309e | [
"MIT"
] | 1 | 2022-03-26T07:50:54.000Z | 2022-03-26T07:50:54.000Z | python/191108_python_review/datatype.py | hbyyy/TIL | e89ae2913a8a38eb7f480a9ec2324c3ac11e309e | [
"MIT"
] | null | null | null | a = {'a': 1, 'b' : 2}
b = list(a.items())
print(b)
| 12.75 | 21 | 0.431373 | a = {'a': 1, 'b' : 2}
b = list(a.items())
print(b)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
944fe4b4d75c9a0c4096ba02d7a1fe92bd4513de | 2,968 | py | Python | main.py | manacute/Runtime-Terror-C4 | 6c9d9246090c32077bc4425c75e80f485037fe3e | [
"Apache-2.0"
] | null | null | null | main.py | manacute/Runtime-Terror-C4 | 6c9d9246090c32077bc4425c75e80f485037fe3e | [
"Apache-2.0"
] | null | null | null | main.py | manacute/Runtime-Terror-C4 | 6c9d9246090c32077bc4425c75e80f485037fe3e | [
"Apache-2.0"
] | null | null | null | import pygame, sys
from BoardModel import BoardModel
from HelpModel import HelpModel
from MenuModel import MenuModel
'''
CSC290 Group Project
C4: Four In A Row
University of Toronto Mississauga
'''
if __name__ == '__main__':
pygame.init()
pygame.font.init()
screen = pygame.display.set_m... | 31.242105 | 79 | 0.618598 | import pygame, sys
from Move import Move
from BoardModel import BoardModel
from MoveController import MoveController
from HelpModel import HelpModel
from MenuModel import MenuModel
from Model import Model
'''
CSC290 Group Project
C4: Four In A Row
University of Toronto Mississauga
'''
class Game():
'''
Base g... | 0 | 0 | 0 | 2,348 | 0 | 0 | 0 | 22 | 89 |
230a51a7ddf70165298befece4dc77ccda252454 | 24,386 | py | Python | bin/FMU-QSS.gen.py | NREL/SOEP-QSS | 354df458f6eaf13e9f0271eccd747047ab4f0f71 | [
"BSD-3-Clause"
] | 13 | 2017-08-04T15:15:59.000Z | 2022-03-24T06:02:22.000Z | bin/FMU-QSS.gen.py | NREL/SOEP-QSS | 354df458f6eaf13e9f0271eccd747047ab4f0f71 | [
"BSD-3-Clause"
] | 4 | 2021-08-19T01:56:30.000Z | 2021-08-23T01:41:36.000Z | bin/FMU-QSS.gen.py | NREL/SOEP-QSS | 354df458f6eaf13e9f0271eccd747047ab4f0f71 | [
"BSD-3-Clause"
] | 1 | 2017-09-15T17:14:57.000Z | 2017-09-15T17:14:57.000Z | #!/usr/bin/env python
# FMU-QSS Generator
#
# Project: QSS Solver
#
# Language: Python 2.7 and 3.x
#
# Developed by Objexx Engineering, Inc. (https://objexx.com) under contract to
# the National Renewable Energy Laboratory of the U.S. Department of Energy
#
# Copyright (c) 2017-2021 Objexx Engineering, Inc. All rights... | 49.464503 | 204 | 0.580005 | #!/usr/bin/env python
# FMU-QSS Generator
#
# Project: QSS Solver
#
# Language: Python 2.7 and 3.x
#
# Developed by Objexx Engineering, Inc. (https://objexx.com) under contract to
# the National Renewable Energy Laboratory of the U.S. Department of Energy
#
# Copyright (c) 2017-2021 Objexx Engineering, Inc. All rights... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c31cb5968a3e41dcb813778db8984573df0ddd4c | 9,324 | py | Python | src/Mapping/gridmap.py | josiahw/pyrover | c73aabb4b05d047c4a10b832627a0eae70cbe157 | [
"BSD-2-Clause"
] | 6 | 2017-05-23T10:34:07.000Z | 2018-11-27T09:41:13.000Z | src/Mapping/gridmap.py | josiahw/pyrover | c73aabb4b05d047c4a10b832627a0eae70cbe157 | [
"BSD-2-Clause"
] | null | null | null | src/Mapping/gridmap.py | josiahw/pyrover | c73aabb4b05d047c4a10b832627a0eae70cbe157 | [
"BSD-2-Clause"
] | 1 | 2019-07-23T02:36:44.000Z | 2019-07-23T02:36:44.000Z | """
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize cop... | 43.570093 | 152 | 0.593844 | """
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize cop... | 0 | 0 | 0 | 3,895 | 0 | 0 | 0 | -4 | 23 |
40229217811bbae1abcba8967ec11cb22fe0716e | 4,766 | py | Python | database/scores.py | Ollie-Hooper/SpotifySentiment | bafdacd3a6f668c708c67dab40055a3b5629aa87 | [
"MIT"
] | 10 | 2020-05-23T12:01:20.000Z | 2021-07-23T12:58:29.000Z | database/scores.py | Ollie-Hooper/SpotifySentiment | bafdacd3a6f668c708c67dab40055a3b5629aa87 | [
"MIT"
] | 1 | 2021-03-31T19:38:42.000Z | 2021-03-31T19:38:42.000Z | database/scores.py | Ollie-Hooper/SpotifySentiment | bafdacd3a6f668c708c67dab40055a3b5629aa87 | [
"MIT"
] | 4 | 2020-06-19T20:52:04.000Z | 2021-02-11T17:07:06.000Z |
audio_features = ['danceability', 'energy', 'key', 'loudness', 'mode', 'speechiness', 'acousticness',
'instrumentalness', 'liveness', 'valence', 'tempo', 'duration_ms', 'time_signature']
| 34.788321 | 102 | 0.626311 | import pandas as pd
from database.tools import Database, str_list
from app.functions import time_method
audio_features = ['danceability', 'energy', 'key', 'loudness', 'mode', 'speechiness', 'acousticness',
'instrumentalness', 'liveness', 'valence', 'tempo', 'duration_ms', 'time_signature']
def ini... | 0 | 684 | 0 | 0 | 0 | 3,507 | 0 | 38 | 320 |
2a6c9ecec46d0b8f0cd8c8ef989149930ee5589a | 4,698 | py | Python | 2021/Day5_argparse_makefile_docker/Makefile/4_paper2_bib/Fig1gen.py | afarnudi/ScientificSoftwareDevelopment | c70f8b1c80d24dbcca12dbcca3722053954f7eaa | [
"BSD-3-Clause"
] | null | null | null | 2021/Day5_argparse_makefile_docker/Makefile/4_paper2_bib/Fig1gen.py | afarnudi/ScientificSoftwareDevelopment | c70f8b1c80d24dbcca12dbcca3722053954f7eaa | [
"BSD-3-Clause"
] | null | null | null | 2021/Day5_argparse_makefile_docker/Makefile/4_paper2_bib/Fig1gen.py | afarnudi/ScientificSoftwareDevelopment | c70f8b1c80d24dbcca12dbcca3722053954f7eaa | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 8 10:19:43 2021
@author: ali
"""
if __name__ == "__main__":
main()
| 30.309677 | 233 | 0.631332 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 8 10:19:43 2021
@author: ali
"""
import numpy as np
import matplotlib.pyplot as plt
from funcs import calcHelfrichUq
from funcs import calc_Helfrich_curve
from funcs import u_m2_calculator
from funcs import calcNelsonUl
from funcs import calc_nels... | 0 | 0 | 0 | 0 | 0 | 4,180 | 0 | 108 | 244 |
13f21ee9ec6be5b734c4474d2ae83b3205c0edf6 | 9,427 | py | Python | multi_obj_pose_estimation/region_loss_multi.py | HannahHaensen/singleshotpose | 0cf15d500bc07bd113d1330bbf439b06c7b3eb54 | [
"MIT"
] | null | null | null | multi_obj_pose_estimation/region_loss_multi.py | HannahHaensen/singleshotpose | 0cf15d500bc07bd113d1330bbf439b06c7b3eb54 | [
"MIT"
] | null | null | null | multi_obj_pose_estimation/region_loss_multi.py | HannahHaensen/singleshotpose | 0cf15d500bc07bd113d1330bbf439b06c7b3eb54 | [
"MIT"
] | null | null | null | import torch.nn as nn
| 45.322115 | 208 | 0.55341 | import time
import torch
import math
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from utils_multi import *
def build_targets(pred_corners, target, num_keypoints, anchors, num_anchors, num_classes, nH, nW, noobject_scale,
object_scale, sil_thresh, seen):
... | 0 | 0 | 0 | 5,415 | 0 | 3,811 | 0 | -1 | 178 |
711028c668c7cf809b88df63c59f52dd682db445 | 1,783 | py | Python | src/passmanager.py | Nova-Striker/Open-Palm | c7a4b0ae11fc12706bb93deca489ca622295e66d | [
"MIT"
] | 4 | 2020-10-02T05:15:29.000Z | 2020-10-09T16:42:31.000Z | src/passmanager.py | JDeepD/Open-Palm | 894e4e53f5766d98e6f16e54aafd1f5f8f3f7815 | [
"MIT"
] | 5 | 2020-11-20T18:53:05.000Z | 2021-04-08T10:42:54.000Z | src/passmanager.py | Nova-Striker/Open-Palm | c7a4b0ae11fc12706bb93deca489ca622295e66d | [
"MIT"
] | 1 | 2020-10-30T05:42:40.000Z | 2020-10-30T05:42:40.000Z | """This module will deal with password management"""
import csv
def storepass(user, passwd, target="admins.csv"):
"""This function is used for storing user-pass combo
as elements to a csv file. By default, the values will be
stored in `creds/admins.csv`. The csvs will always be
saved in the `creds` ... | 27.859375 | 74 | 0.630959 | """This module will deal with password management"""
import csv
def storepass(user, passwd, target="admins.csv"):
"""This function is used for storing user-pass combo
as elements to a csv file. By default, the values will be
stored in `creds/admins.csv`. The csvs will always be
saved in the `creds` ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9555d4d2d0c4a3b8b918f4cc4516e07e520a98bc | 3,163 | py | Python | webkit/build/rule_binding.py | zachlatta/chromium | c4625eefca763df86471d798ee5a4a054b4716ae | [
"BSD-3-Clause"
] | 1 | 2021-09-24T22:49:10.000Z | 2021-09-24T22:49:10.000Z | webkit/build/rule_binding.py | changbai1980/chromium | c4625eefca763df86471d798ee5a4a054b4716ae | [
"BSD-3-Clause"
] | null | null | null | webkit/build/rule_binding.py | changbai1980/chromium | c4625eefca763df86471d798ee5a4a054b4716ae | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# usage: rule_binding.py INPUT CPPDIR HDIR -- INPUTS -- OPTIONS
#
# INPUT is an IDL file, such as Whatever.idl.
#
# CPPDIR is the dire... | 28.754545 | 80 | 0.68258 | #!/usr/bin/python
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# usage: rule_binding.py INPUT CPPDIR HDIR -- INPUTS -- OPTIONS
#
# INPUT is an IDL file, such as Whatever.idl.
#
# CPPDIR is the dire... | 0 | 0 | 0 | 0 | 0 | 2,324 | 0 | -42 | 157 |
82cadcf5c827cd7c4238ba6a9191950713dbe2fe | 4,162 | py | Python | src/test/python/apache/aurora/client/commands/util.py | wickman/incubator-aurora | 9906d217093568ed4c9cfe620862818f15ce4150 | [
"Apache-2.0"
] | null | null | null | src/test/python/apache/aurora/client/commands/util.py | wickman/incubator-aurora | 9906d217093568ed4c9cfe620862818f15ce4150 | [
"Apache-2.0"
] | null | null | null | src/test/python/apache/aurora/client/commands/util.py | wickman/incubator-aurora | 9906d217093568ed4c9cfe620862818f15ce4150 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2013 Apache Software Foundation
#
# 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 agree... | 30.82963 | 91 | 0.717924 | #
# Copyright 2013 Apache Software Foundation
#
# 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 agree... | 0 | 2,081 | 0 | 1,164 | 0 | 0 | 0 | 163 | 159 |
071c73c6884f4a13b40eb710f548d4aa790d04e8 | 2,088 | py | Python | experiments/dataset_stats/stats_utils.py | Tobias-Fischer/dreyeve | a65342d9c503ce3ec932e2229b90aaeebfd82944 | [
"MIT"
] | 83 | 2017-05-29T04:16:42.000Z | 2022-03-03T08:09:22.000Z | experiments/dataset_stats/stats_utils.py | ashinmarin/dreyeve | d73979d738e706d90a8aa9d696c6e4dcb19c1134 | [
"MIT"
] | 26 | 2017-11-09T23:35:52.000Z | 2022-03-11T03:22:57.000Z | experiments/dataset_stats/stats_utils.py | ashinmarin/dreyeve | d73979d738e706d90a8aa9d696c6e4dcb19c1134 | [
"MIT"
] | 36 | 2017-09-23T02:48:41.000Z | 2022-03-11T01:34:23.000Z | """
Some statistics utils.
"""
import numpy as np
from os.path import join
def expectation_2d(pdf):
"""
Computes the statistical expectation of a pdf defined
over two discrete random variables.
Parameters
----------
pdf: ndarray
a numpy 2-dimensional array with probability for e... | 21.090909 | 83 | 0.604885 | """
Some statistics utils.
"""
import numpy as np
from os.path import join
def expectation_2d(pdf):
"""
Computes the statistical expectation of a pdf defined
over two discrete random variables.
Parameters
----------
pdf: ndarray
a numpy 2-dimensional array with probability for e... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d5835217c99d1b1decaa544b038ac29991c0172b | 824 | py | Python | telemetry/main.py | MovoLovo/Robotics | 5efcf546ad6074595617875db04f402848a796c3 | [
"MIT"
] | null | null | null | telemetry/main.py | MovoLovo/Robotics | 5efcf546ad6074595617875db04f402848a796c3 | [
"MIT"
] | null | null | null | telemetry/main.py | MovoLovo/Robotics | 5efcf546ad6074595617875db04f402848a796c3 | [
"MIT"
] | 1 | 2020-11-16T21:47:21.000Z | 2020-11-16T21:47:21.000Z | #!/usr/bin/env pybricks-micropython
from pybricks.hubs import EV3Brick
from pybricks.ev3devices import (Motor, UltrasonicSensor, GyroSensor)
from pybricks.parameters import Port
# Config
ev3 = EV3Brick()
left_motor = Motor(Port.B)
right_motor = Motor(Port.C)
right_ultra = UltrasonicSensor(Port.S4)
front_ultra = Ult... | 24.969697 | 78 | 0.747573 | #!/usr/bin/env pybricks-micropython
from pybricks.hubs import EV3Brick
from pybricks.ev3devices import (Motor, TouchSensor, ColorSensor,
InfraredSensor, UltrasonicSensor, GyroSensor)
from pybricks.parameters import Port, Stop, Direction, Button, Color
from pybricks.tools import wait, St... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 188 | 66 |
fb424fb1d756cf4cd0f7c5620c5fe0dcc99bab7d | 581 | py | Python | cybot/plug/newmember.py | francis-taylor/Timotty-Bot | 2cf7c9897ed31d26d331594e2578b253e3b970d8 | [
"MIT"
] | 6 | 2017-10-18T14:22:48.000Z | 2017-10-26T15:14:52.000Z | cybot/plug/newmember.py | Fr4ncisTaylor/Timotty | 2cf7c9897ed31d26d331594e2578b253e3b970d8 | [
"MIT"
] | 1 | 2017-10-20T19:16:03.000Z | 2017-10-20T19:16:03.000Z | cybot/plug/newmember.py | Fr4ncisTaylor/Timotty | 2cf7c9897ed31d26d331594e2578b253e3b970d8 | [
"MIT"
] | 7 | 2017-10-18T14:19:52.000Z | 2017-10-22T15:23:33.000Z | #coding:utf-8 -*-
| 27.666667 | 142 | 0.698795 | #coding:utf-8 -*-
import config, metodos
from mensagens import bemvindo
from pprint import *
from metodos import sendMessage
def welcome(msg):
if 'new_chat_member' in msg:
sendMessage(msg['chat']['id'], bemvindo['welcome'].format(msg['new_chat_member']['first_name']),reply_to_message_id=msg['message_id'])... | 0 | 0 | 0 | 0 | 0 | 387 | 0 | 19 | 157 |
9c08c75fac5d3fba256ebb61b6ce5501cf322d19 | 737 | py | Python | networks/encoders/__init__.py | Yaoyi-Li/HOP-Matting | 4ac22d92b5432734ffe416cf2c0a99fb730d0c04 | [
"MIT"
] | 56 | 2020-04-26T16:19:50.000Z | 2021-12-30T07:20:40.000Z | networks/encoders/__init__.py | Yaoyi-Li/HOP-Matting | 4ac22d92b5432734ffe416cf2c0a99fb730d0c04 | [
"MIT"
] | 5 | 2020-04-27T19:17:17.000Z | 2021-07-17T13:55:35.000Z | networks/encoders/__init__.py | Yaoyi-Li/HOP-Matting | 4ac22d92b5432734ffe416cf2c0a99fb730d0c04 | [
"MIT"
] | 11 | 2020-04-29T10:01:35.000Z | 2022-03-31T03:34:50.000Z | import logging
__all__ = ['resnet_localHOP_posEmb_encoder_29']
if __name__ == "__main__":
import torch
logging.basicConfig(level=logging.DEBUG, format='[%(asctime)s] %(levelname)s: %(message)s',
datefmt='%m-%d %H:%M:%S')
resnet_encoder = resnet_encoder_29()
x = torch.randn(... | 28.346154 | 95 | 0.701493 | import logging
from .resnet_enc import ResNet_D, BasicBlock, Bottleneck
from .res_localHOP_posEmb_enc import ResLocalHOP_PosEmb
__all__ = ['resnet_localHOP_posEmb_encoder_29']
def _res_localHOP_posEmb(block, layers, **kwargs):
model = ResLocalHOP_PosEmb(block, layers, **kwargs)
return model
def resnet_loc... | 0 | 0 | 0 | 0 | 0 | 197 | 0 | 69 | 90 |
597ea9e787724f7ec681dab7b426f06cda2a4e67 | 1,057 | py | Python | par_checker_general.py | Yasir323/Data-Structures-and-Algorithms-in-Python | b721d0ca0218b9665d4f6ca0bbfd4417244bcdf0 | [
"MIT"
] | null | null | null | par_checker_general.py | Yasir323/Data-Structures-and-Algorithms-in-Python | b721d0ca0218b9665d4f6ca0bbfd4417244bcdf0 | [
"MIT"
] | null | null | null | par_checker_general.py | Yasir323/Data-Structures-and-Algorithms-in-Python | b721d0ca0218b9665d4f6ca0bbfd4417244bcdf0 | [
"MIT"
] | null | null | null | # Program to check closing of all brackets
print(par_checker('{({([][])}())}')) # True
print(par_checker('[{()]')) # False
| 19.574074 | 52 | 0.522233 | # Program to check closing of all brackets
class Stack:
def __init__(self, items=[]):
self.items = items
def is_empty(self):
return self.items == []
def push(self, item):
self.items.append(item)
def pop(self):
return self.items.pop()
def peek(self):
ret... | 0 | 0 | 0 | 344 | 0 | 514 | 0 | 0 | 69 |
2284af4298e7f6432c522550cff209b741fb1b8e | 65 | py | Python | lib/__init__.py | gideontong/Humingbird | 07f8ef2e52e2212742e80b2cece06566b0ebea86 | [
"MIT"
] | 1 | 2020-07-19T22:16:14.000Z | 2020-07-19T22:16:14.000Z | lib/__init__.py | gideontong/Humingbird | 07f8ef2e52e2212742e80b2cece06566b0ebea86 | [
"MIT"
] | 1 | 2020-07-31T04:43:25.000Z | 2020-07-31T09:16:50.000Z | lib/__init__.py | gideontong/Humingbird | 07f8ef2e52e2212742e80b2cece06566b0ebea86 | [
"MIT"
] | 1 | 2021-03-07T20:09:44.000Z | 2021-03-07T20:09:44.000Z | # from . import Learn | 21.666667 | 22 | 0.753846 | from . import csvTasks
from . import Gender
# from . import Learn | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 |
6146fe70d4b5666a37f29b0b26d9dd1fe27dabca | 17 | py | Python | env-sample.py | peeomid/fbmsgbot-sample-py | 489018ab269f9beb4d38a6157af7f42205cffbfb | [
"MIT"
] | null | null | null | env-sample.py | peeomid/fbmsgbot-sample-py | 489018ab269f9beb4d38a6157af7f42205cffbfb | [
"MIT"
] | null | null | null | env-sample.py | peeomid/fbmsgbot-sample-py | 489018ab269f9beb4d38a6157af7f42205cffbfb | [
"MIT"
] | null | null | null | VERIFY_TOKEN = '' | 17 | 17 | 0.705882 | VERIFY_TOKEN = '' | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
408085c17ca0fc1260b46e80780ea878b34a31c5 | 2,716 | py | Python | generate-html.py | tebeka/py2go-cheatsheet | 14c83850876ef80c36af326ab4fc6f56344781c7 | [
"BSD-3-Clause"
] | 13 | 2017-09-09T08:32:34.000Z | 2022-02-28T04:32:43.000Z | generate-html.py | tebeka/py2go-cheatsheet | 14c83850876ef80c36af326ab4fc6f56344781c7 | [
"BSD-3-Clause"
] | 3 | 2017-11-25T18:48:11.000Z | 2017-12-30T13:00:04.000Z | generate-html.py | tebeka/py2go-cheatsheet | 14c83850876ef80c36af326ab4fc6f56344781c7 | [
"BSD-3-Clause"
] | 2 | 2019-11-03T19:58:17.000Z | 2020-04-28T01:14:17.000Z | #!/usr/bin/env python
import re
find_code = re.compile(r'code: (\w+)').search
table_html = '''
<table class="code table table-sm">
<tbody>
<tr>
<td>{py}</td>
<td>{go}</td>
</tr>
</tbody>
</table>
'''
module_html = '''
<tr>
<td>{task}</td>
<td><a href="https://docs.python.org/3/library/{python}.h... | 24.468468 | 73 | 0.555596 | #!/usr/bin/env python
import html
import re
from subprocess import check_output
import yaml
find_code = re.compile(r'code: (\w+)').search
table_html = '''
<table class="code table table-sm">
<tbody>
<tr>
<td>{py}</td>
<td>{go}</td>
</tr>
</tbody>
</table>
'''
module_html = '''
<tr>
<td>{task}</t... | 0 | 0 | 0 | 0 | 0 | 1,309 | 0 | -6 | 183 |
ad1bb7663f7a9d7fe0f5b7b2838066a4f8f734ea | 9,247 | py | Python | transiter/http/endpoints/systemendpoints.py | jamespfennell/realtimerail | 352dd7d185d3501d28276476e1390d3288735690 | [
"MIT"
] | null | null | null | transiter/http/endpoints/systemendpoints.py | jamespfennell/realtimerail | 352dd7d185d3501d28276476e1390d3288735690 | [
"MIT"
] | null | null | null | transiter/http/endpoints/systemendpoints.py | jamespfennell/realtimerail | 352dd7d185d3501d28276476e1390d3288735690 | [
"MIT"
] | null | null | null | """
Systems
Endpoints for installing, reading, configuring and deleting transit systems.
"""
import flask
system_endpoints = flask.Blueprint(__name__, __name__)
| 37.136546 | 178 | 0.701525 | """
Systems
Endpoints for installing, reading, configuring and deleting transit systems.
"""
import flask
import requests
from transiter import exceptions
from transiter.http import httpmanager, httpviews
from transiter.http.httpmanager import (
http_endpoint,
link_target,
HttpMethod,
HttpStatus,
)
fr... | 0 | 7,924 | 0 | 0 | 0 | 638 | 0 | 221 | 294 |
33ce6abae939c65243a3a41bb7afe2b0e8f4f745 | 234 | py | Python | XCTF/2019 Finals/babytaint/solver.py | PurpEth/solved-hacking-problem | 6f289d1647eb9c091caa580c7aae673e3ba02952 | [
"Unlicense"
] | 1 | 2021-08-24T22:16:41.000Z | 2021-08-24T22:16:41.000Z | XCTF/2019 Finals/babytaint/solver.py | PurpEth/solved-hacking-problem | 6f289d1647eb9c091caa580c7aae673e3ba02952 | [
"Unlicense"
] | null | null | null | XCTF/2019 Finals/babytaint/solver.py | PurpEth/solved-hacking-problem | 6f289d1647eb9c091caa580c7aae673e3ba02952 | [
"Unlicense"
] | null | null | null | # xctf{35eedc512678301f582de3176d1fc81c}
payload = ''
for i in range(16):
payload += 'x%d=["Source"()[%d]];' % (i, i)
payload += 'a=['
payload += ','.join('x%d[0]' % i for i in range(16))
payload += '];"Sink"(a)'
print payload
| 19.5 | 52 | 0.57265 | # xctf{35eedc512678301f582de3176d1fc81c}
payload = ''
for i in range(16):
payload += 'x%d=["Source"()[%d]];' % (i, i)
payload += 'a=['
payload += ','.join('x%d[0]' % i for i in range(16))
payload += '];"Sink"(a)'
print payload
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2c88e07b2599ec87bce1d6dde1049ee4ec409b53 | 512 | py | Python | fbapp/urls.py | lund5000/chirpradio | e084d53e92d897766ac19fe85eeabad68a1d7e39 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2016-01-26T08:09:59.000Z | 2019-03-23T23:27:07.000Z | fbapp/urls.py | lund5000/chirpradio | e084d53e92d897766ac19fe85eeabad68a1d7e39 | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2016-02-16T03:36:14.000Z | 2020-05-04T16:19:00.000Z | fbapp/urls.py | lund5000/chirpradio | e084d53e92d897766ac19fe85eeabad68a1d7e39 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2016-04-16T02:51:35.000Z | 2021-12-06T19:25:15.000Z | from django.conf.urls.defaults import patterns, url
urlpatterns = patterns('',
url(r'^$', 'fbapp.views.canvas', name="fbapp.canvas"),
url(r'^page_tab$', 'fbapp.views.page_tab', name="fbapp.page_tab"),
url(r'^owa$', 'fbapp.views.open_web_app', name="fbapp.open_web_app"),
url(r'^owa/chirpradio\.webapp$',... | 42.666667 | 73 | 0.691406 | from django.conf import settings
from django.conf.urls.defaults import patterns, url
urlpatterns = patterns('',
url(r'^$', 'fbapp.views.canvas', name="fbapp.canvas"),
url(r'^page_tab$', 'fbapp.views.page_tab', name="fbapp.page_tab"),
url(r'^owa$', 'fbapp.views.open_web_app', name="fbapp.open_web_app"),
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 22 |
9e99b9353b020386db6b01e64d0da4bf91fb2d1d | 1,107 | py | Python | handle_image/handle.py | hyjalxl/spidier2 | 3ab1dec50bf03bd673665297147606a418757969 | [
"Apache-2.0"
] | null | null | null | handle_image/handle.py | hyjalxl/spidier2 | 3ab1dec50bf03bd673665297147606a418757969 | [
"Apache-2.0"
] | null | null | null | handle_image/handle.py | hyjalxl/spidier2 | 3ab1dec50bf03bd673665297147606a418757969 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# name=hu_yang_jie
#coding=utf-8
import cv2
import numpy as np
img = cv2.imread("bili.jpg") #
h, w = img.shape[:2] #
cv2.imshow("Origin", img) #
blured = cv2.blur(img,(5,5)) #
cv2.imshow("Blur", blured) #
mask = np.zeros((h+2, w+2), np.uint8) #
#
cv2.floodFill(blured, mask, (w-1,h-... | 25.159091 | 86 | 0.722674 | # coding=utf-8
# name=hu_yang_jie
#coding=utf-8
import cv2
import numpy as np
img = cv2.imread("bili.jpg") #载入图像
h, w = img.shape[:2] #获取图像的高和宽
cv2.imshow("Origin", img) #显示原始图像
blured = cv2.blur(img,(5,5)) #进行滤波去掉噪声
cv2.imshow("Blur", blured) #显示低通滤波后的图像
mask = np.zeros((h+2, w+2), np.uint8) #掩码... | 396 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
57808233141949087e2b74753b28ec52afb50789 | 184 | py | Python | nxturtle/version.py | mar10/nxturtle | 12762ab7e5d95514f189aa715b09750e801293fb | [
"MIT"
] | 1 | 2020-09-02T17:43:58.000Z | 2020-09-02T17:43:58.000Z | nxturtle/version.py | TheVinhLuong102/nxturtle | 12762ab7e5d95514f189aa715b09750e801293fb | [
"MIT"
] | null | null | null | nxturtle/version.py | TheVinhLuong102/nxturtle | 12762ab7e5d95514f189aa715b09750e801293fb | [
"MIT"
] | 3 | 2016-05-16T19:09:27.000Z | 2020-09-02T17:44:01.000Z | """
Package version number.
"""
# We have to put it here, because setup.py (and easy_install) cannot import
# nxturtle before requirements are satisfied.
__version__ = "1.0.4"
| 26.285714 | 77 | 0.706522 | """
Package version number.
"""
# We have to put it here, because setup.py (and easy_install) cannot import
# nxturtle before requirements are satisfied.
__version__ = "1.0.4"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4fc8985147ea244f52071c25c82698f009c5ee2d | 5,398 | py | Python | spira/lne/geometry.py | cloudcalvin/spira | 2dcaef188f2bc8c3839e1b5ff0be027e0cd4908c | [
"MIT"
] | null | null | null | spira/lne/geometry.py | cloudcalvin/spira | 2dcaef188f2bc8c3839e1b5ff0be027e0cd4908c | [
"MIT"
] | 1 | 2021-10-17T10:18:04.000Z | 2021-10-17T10:18:04.000Z | spira/lne/geometry.py | cloudcalvin/spira | 2dcaef188f2bc8c3839e1b5ff0be027e0cd4908c | [
"MIT"
] | null | null | null | # from spira.gdsii.utils import numpy_to_list
| 29.336957 | 79 | 0.559466 | import os
import spira
import pygmsh
import meshio
import inspect
from spira.core.lists import ElementList
# from spira.gdsii.utils import numpy_to_list
from spira import param
from spira.lne.mesh import Mesh
from spira.core.initializer import ElementalInitializer
class __Geometry__(ElementalInitializer):
def _... | 0 | 0 | 0 | 5,060 | 0 | 0 | 0 | 21 | 268 |
183d1196e1f6f1aa96619ac36af307eec5de268e | 3,805 | py | Python | astroquery/utils/tap/conn/tests/DummyConnHandler.py | jmilou/astroquery | 06d6e6740865d0461570390726e1831ea139b558 | [
"BSD-3-Clause"
] | null | null | null | astroquery/utils/tap/conn/tests/DummyConnHandler.py | jmilou/astroquery | 06d6e6740865d0461570390726e1831ea139b558 | [
"BSD-3-Clause"
] | 2 | 2020-10-29T19:55:25.000Z | 2021-05-14T19:17:44.000Z | astroquery/utils/tap/conn/tests/DummyConnHandler.py | mevtorres/localAstroquery | 06d6e6740865d0461570390726e1831ea139b558 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
=============
TAP plus
=============
@author: Juan Carlos Segovia
@contact: juan.carlos.segovia@sciops.esa.int
European Space Astronomy Centre (ESAC)
European Space Agency (ESA)
Created on 30 jun. 2016
"""
| 29.726563 | 78 | 0.600526 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
=============
TAP plus
=============
@author: Juan Carlos Segovia
@contact: juan.carlos.segovia@sciops.esa.int
European Space Astronomy Centre (ESAC)
European Space Agency (ESA)
Created on 30 jun. 2016
"""
from astroquery.utils.tap import taputils... | 0 | 0 | 0 | 3,414 | 0 | 0 | 0 | 43 | 68 |
681fd52b15338d6c2c9dd4b4bdc669825c9b4c27 | 4,658 | py | Python | WeOptPy/algorithms/sa.py | kb2623/WeOptPy | 2e9e75acf8fedde0ae4c99da6c786a712d4f011c | [
"MIT"
] | 1 | 2021-05-12T10:02:21.000Z | 2021-05-12T10:02:21.000Z | WeOptPy/algorithms/sa.py | kb2623/WeOptPy | 2e9e75acf8fedde0ae4c99da6c786a712d4f011c | [
"MIT"
] | null | null | null | WeOptPy/algorithms/sa.py | kb2623/WeOptPy | 2e9e75acf8fedde0ae4c99da6c786a712d4f011c | [
"MIT"
] | null | null | null | # encoding=utf8
"""Simulated annealing algorithm module."""
__all__ = [
'SimulatedAnnealing',
'coolDelta',
'coolLinear'
]
def coolDelta(currentT, T, deltaT, nFES, **kwargs):
r"""Calculate new temperature by differences.
Args:
currentT (float):
T (float):
kwargs (Dict[str, Any]): Additional arguments.
... | 24.515789 | 108 | 0.683985 | # encoding=utf8
"""Simulated annealing algorithm module."""
import numpy as np
from WeOptPy.algorithms.interfaces import Algorithm
__all__ = [
'SimulatedAnnealing',
'coolDelta',
'coolLinear'
]
def coolDelta(currentT, T, deltaT, nFES, **kwargs):
r"""Calculate new temperature by differences.
Args:
currentT ... | 4 | 641 | 0 | 3,130 | 0 | 0 | 0 | 27 | 69 |
ba98afdb26c78c2e50fad1d16a3cc2b5bb4d30d1 | 2,761 | py | Python | bot.py | esjimenezro/trading-bot | bbffd35285da2bafd616b0fcc4e15ae9d250ac45 | [
"MIT"
] | null | null | null | bot.py | esjimenezro/trading-bot | bbffd35285da2bafd616b0fcc4e15ae9d250ac45 | [
"MIT"
] | null | null | null | bot.py | esjimenezro/trading-bot | bbffd35285da2bafd616b0fcc4e15ae9d250ac45 | [
"MIT"
] | null | null | null | import sys
sys.path.append("../config_files")
from settings_project import CONFIG_MYSQL
import numpy as np
import time
#DEFINIMOS FUNCIONES
# CALCULAR MEDIAS MOVILES
# CREAMOS CICLO INFINITO CON PAUSA CADA 10S
while True:
# Cargar datos
datos = load_bitso_data_top500(CONFIG_MYSQL)
# Ordenar datos
d... | 30.01087 | 105 | 0.6092 | import sys
sys.path.append("../config_files")
import mysql.connector
from settings_project import CONFIG_MYSQL
import pandas as pd
import numpy as np
import time
#DEFINIMOS FUNCIONES
def load_bitso_data_top500(CONFIG_MYSQL):
conn = mysql.connector(**CONFIG_MYSQL)
cursor = conn.cursor()
query = """SELECT
... | 8 | 0 | 0 | 0 | 0 | 313 | 0 | -1 | 89 |
711587f58366a89e232d7627e3317ebe481064d0 | 1,812 | py | Python | blog/tests/test_models.py | broadsinatlanta/higashi-hiroshima-tours- | 5ae44056d4cb577eab2e5a0525a330b3ac19e122 | [
"MIT"
] | null | null | null | blog/tests/test_models.py | broadsinatlanta/higashi-hiroshima-tours- | 5ae44056d4cb577eab2e5a0525a330b3ac19e122 | [
"MIT"
] | 14 | 2020-02-12T00:00:09.000Z | 2022-03-11T23:44:27.000Z | blog/tests/test_models.py | broadsinatlanta/higashi-hiroshima-tours- | 5ae44056d4cb577eab2e5a0525a330b3ac19e122 | [
"MIT"
] | null | null | null | # from django.contrib.auth.models import User
| 29.704918 | 101 | 0.662252 | from django.test import TestCase
# from django.contrib.auth.models import User
from blog.models import Post, Comment
import blog.tests.helper as h
class CommentTestCase(TestCase):
def setUp(self):
self.user = h.create_user()
self.post = h.create_post(self.user)
self.comment = h.create_c... | 0 | 0 | 0 | 1,615 | 0 | 0 | 0 | 35 | 114 |
19fb02b9eddeb85e1565a9aaff760be0fe27b29c | 9,391 | py | Python | mud/models/player.py | erwanaubry/alamud_IUT_Escape | cc9e77203245a9b933300edc2efb9bd5fcd8abc3 | [
"Unlicense"
] | null | null | null | mud/models/player.py | erwanaubry/alamud_IUT_Escape | cc9e77203245a9b933300edc2efb9bd5fcd8abc3 | [
"Unlicense"
] | null | null | null | mud/models/player.py | erwanaubry/alamud_IUT_Escape | cc9e77203245a9b933300edc2efb9bd5fcd8abc3 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2014 Denys Duchier, IUT d'Orlans
#==============================================================================
| 35.304511 | 88 | 0.485571 | # -*- coding: utf-8 -*-
# Copyright (C) 2014 Denys Duchier, IUT d'Orléans
#==============================================================================
import mud.game
from .thing import Thing
from .mixins.containing import Containing
from .location import Location
import queue
from tornado.iolo... | 2 | 0 | 0 | 9,027 | 0 | 0 | 0 | 54 | 156 |
ba1d80b3a90811062c59fdbc4b11f2783bbedce3 | 3,057 | py | Python | pipeline.py | alfiopuglisi/pipeline | bb0774cff8845c683f7e38475885a6e74e2d86ee | [
"MIT"
] | 4 | 2021-02-07T23:07:38.000Z | 2021-09-29T09:35:23.000Z | pipeline.py | alfiopuglisi/pipeline | bb0774cff8845c683f7e38475885a6e74e2d86ee | [
"MIT"
] | null | null | null | pipeline.py | alfiopuglisi/pipeline | bb0774cff8845c683f7e38475885a6e74e2d86ee | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Module for pipelining composition.
value >> func1 >> func2 >> func3 ...
Pipelines are expressions whose resulting value can be assigned:
result = value >> func1 >> func2
Rules:
* First value can be any python value
* Functions must be chained with the '>>' operator.
* All fun... | 28.839623 | 90 | 0.66634 | #!/usr/bin/env python
'''
Module for pipelining composition.
value >> func1 >> func2 >> func3 ...
Pipelines are expressions whose resulting value can be assigned:
result = value >> func1 >> func2
Rules:
* First value can be any python value
* Functions must be chained with the '>>' operator.
* All fun... | 0 | 0 | 0 | 686 | 0 | 0 | 0 | -19 | 91 |
0778d7f2ea48b9691400a4b10a602762013b70cf | 2,995 | py | Python | scripts/real/cat_img.py | ZJU-Robotics-Lab/CICT | ff873a03ab03d9113b8db96d26246939bb5da0d4 | [
"MIT"
] | 12 | 2021-02-09T05:08:36.000Z | 2022-02-24T07:51:30.000Z | scripts/real/cat_img.py | ZJU-Robotics-Lab/CICT | ff873a03ab03d9113b8db96d26246939bb5da0d4 | [
"MIT"
] | null | null | null | scripts/real/cat_img.py | ZJU-Robotics-Lab/CICT | ff873a03ab03d9113b8db96d26246939bb5da0d4 | [
"MIT"
] | 6 | 2021-03-30T06:30:13.000Z | 2022-03-01T14:15:00.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from os.path import join, dirname
sys.path.insert(0, join(dirname(__file__), '..'))
sys.path.insert(0, join(dirname(__file__), '../..'))
import cv2
if __name__ == '__main__':
rate = 1.25
rate2 = 1.0
dataset = {}
fps = 30
video_size ... | 34.034091 | 132 | 0.6 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import glob
from os.path import join, dirname
sys.path.insert(0, join(dirname(__file__), '..'))
sys.path.insert(0, join(dirname(__file__), '../..'))
import cv2
import numpy as np
def read_files(index):
file_path = '/media/wang/Data/video/data'+str(index)
... | 0 | 0 | 0 | 0 | 0 | 1,037 | 0 | -13 | 90 |
4f1b4c79fe935ceee776c57b22a97040f332d3db | 512 | py | Python | examples/Gephi_streaming.py | chumpblocckami/Tweet2Graph | eaf986ea83e5a420b26c6417ddca887506814fd4 | [
"MIT"
] | null | null | null | examples/Gephi_streaming.py | chumpblocckami/Tweet2Graph | eaf986ea83e5a420b26c6417ddca887506814fd4 | [
"MIT"
] | null | null | null | examples/Gephi_streaming.py | chumpblocckami/Tweet2Graph | eaf986ea83e5a420b26c6417ddca887506814fd4 | [
"MIT"
] | null | null | null | from gephistreamer import graph
from gephistreamer import streamer
#https://github.com/totetmatt/GephiStreamer
#DA FARE
stream = streamer.Streamer(streamer.GephiWS(hostname="localhost", port=8080, workspace="workspace0"),)
node_a = graph.Node("A",custom_property=1)
node_b = graph.Node("B",custom_property=2)
node_c = gr... | 36.571429 | 102 | 0.791016 | from gephistreamer import graph
from gephistreamer import streamer
#https://github.com/totetmatt/GephiStreamer
#DA FARE
stream = streamer.Streamer(streamer.GephiWS(hostname="localhost", port=8080, workspace="workspace0"),)
node_a = graph.Node("A",custom_property=1)
node_b = graph.Node("B",custom_property=2)
node_c = gr... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ec505f1cf69b1833c3a8ad53a5c963b1d29f8429 | 14,640 | py | Python | tts/src/tts/synthesizer.py | mjsobrep/tts-ros1 | b3829ee93f76a70ff1460f505fd8ba70cf8f8d24 | [
"Apache-2.0"
] | null | null | null | tts/src/tts/synthesizer.py | mjsobrep/tts-ros1 | b3829ee93f76a70ff1460f505fd8ba70cf8f8d24 | [
"Apache-2.0"
] | 11 | 2021-05-11T16:13:36.000Z | 2022-03-25T16:10:26.000Z | tts/src/tts/synthesizer.py | mjsobrep/tts-ros1 | b3829ee93f76a70ff1460f505fd8ba70cf8f8d24 | [
"Apache-2.0"
] | 1 | 2019-11-13T22:03:28.000Z | 2019-11-13T22:03:28.000Z | #!/usr/bin/env python
# Copyright (c) 2018, Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0
#
# or i... | 43.442136 | 119 | 0.60888 | #!/usr/bin/env python
# Copyright (c) 2018, Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0
#
# or i... | 0 | 0 | 0 | 12,441 | 0 | 1,289 | 0 | 0 | 267 |
d25a7bd75d7c54850950a409c269be37acd67a36 | 6,722 | py | Python | wso.py | daakru/BLReLM | ad1001c101821356abff711c1ed4d3178a77baa7 | [
"MIT"
] | null | null | null | wso.py | daakru/BLReLM | ad1001c101821356abff711c1ed4d3178a77baa7 | [
"MIT"
] | null | null | null | wso.py | daakru/BLReLM | ad1001c101821356abff711c1ed4d3178a77baa7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Writable String Object | Stores data to simplify writing outputs.
Created on Sat Nov 28 19:06:09 2020
Version 1.3.0 (debug support) A-05-2021 @ 14:34 UTC -5
Requires: NONE
@author: Kinetos#6935
"""
import argparse
def generate_outfile_parser(description):
"""
Reusable -o and -O ... | 21.476038 | 77 | 0.520678 | # -*- coding: utf-8 -*-
"""
Writable String Object | Stores data to simplify writing outputs.
Created on Sat Nov 28 19:06:09 2020
Version 1.3.0 (debug support) A-05-2021 @ 14:34 UTC -5
Requires: NONE
@author: Kinetos#6935
"""
import argparse
class wso(object):
"""
A class to to simplify writing outputs when... | 0 | 0 | 0 | 4,816 | 0 | 120 | 0 | 0 | 46 |
2078827fc55525f8112757f3bcc7571c050f6d7c | 793 | py | Python | __init__.py | samg11/SpaceX-Launch-Data | ae4d70fc991e4b6a6b0e8b294e8d25e2a1a91f52 | [
"MIT"
] | null | null | null | __init__.py | samg11/SpaceX-Launch-Data | ae4d70fc991e4b6a6b0e8b294e8d25e2a1a91f52 | [
"MIT"
] | null | null | null | __init__.py | samg11/SpaceX-Launch-Data | ae4d70fc991e4b6a6b0e8b294e8d25e2a1a91f52 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
if __name__ == "__main__":
app.run(debug=True, host='0.0.0.0')
| 29.37037 | 94 | 0.672131 | from flask import Flask, render_template, url_for, flash, redirect
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html', script="index.js", name="Home Page")
@app.route('/next')
def next():
return render_template('next.html', script="next.js", name="Next Launch")
... | 0 | 504 | 0 | 0 | 0 | 0 | 0 | 43 | 125 |