repo_name stringlengths 7 111 | __id__ int64 16.6k 19,705B | blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 5 151 | content_id stringlengths 40 40 | detected_licenses list | license_type stringclasses 2
values | repo_url stringlengths 26 130 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 42 | visit_date timestamp[ns] | revision_date timestamp[ns] | committer_date timestamp[ns] | github_id int64 14.6k 687M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 12
values | gha_fork bool 2
classes | gha_event_created_at timestamp[ns] | gha_created_at timestamp[ns] | gha_updated_at timestamp[ns] | gha_pushed_at timestamp[ns] | gha_size int64 0 10.2M ⌀ | gha_stargazers_count int32 0 178k ⌀ | gha_forks_count int32 0 88.9k ⌀ | gha_open_issues_count int32 0 2.72k ⌀ | gha_language stringlengths 1 16 ⌀ | gha_archived bool 1
class | gha_disabled bool 1
class | content stringlengths 10 2.95M | src_encoding stringclasses 5
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 10 2.95M | extension stringclasses 19
values | num_repo_files int64 1 202k | filename stringlengths 4 112 | num_lang_files int64 1 202k | alphanum_fraction float64 0.26 0.89 | alpha_fraction float64 0.2 0.89 | hex_fraction float64 0 0.09 | num_lines int32 1 93.6k | avg_line_length float64 4.57 103 | max_line_length int64 7 931 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hhr14/Speech2Face | 4,681,514,401,106 | 5017df1f43db3a736bee80de4e1a86b5cdcacb1a | 6b223b0c2575af9edc29d28d3daba21c2e23ff62 | /tools/lib/delf5.py | bcdec884f2a359cbc2654bb2ea86020eaa7fbd9d | [] | no_license | https://github.com/hhr14/Speech2Face | d91fc0cb845e99a6875ba6c0b67e526b8dad7343 | 7371eec10d698ea56ae7f501554f2c62f4da3a4b | refs/heads/master | 2020-08-13T10:16:13.025059 | 2019-12-23T13:32:11 | 2019-12-23T13:32:11 | 214,952,944 | 5 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import sys
a = np.frombuffer(sys.stdin.buffer.read(), dtype='float32')
dim = int(sys.argv[1])
assert a[0] == 0 and a[1] == 0 and a[2] == 0
res = a[5:]
assert len(res) % dim == 0
res = np.reshape(res, (-1, dim))
sys.stdout.buffer.write(res.astype('float32'))
| UTF-8 | Python | false | false | 277 | py | 41 | delf5.py | 39 | 0.642599 | 0.592058 | 0 | 9 | 29.777778 | 59 |
pphowakande/bakround-applicant | 6,055,903,892,107 | cd27d4d78ea6539dcc578816bbb0e8d24ab3890c | 964d79bf9b2ab5b5389514f8cd730f1fefe1ffc8 | /bakround_applicant/services/ondemandviewrefresherservice/consumer.py | ef9a0aa3a74a0889056df295368d619d0a6dcd9a | [] | no_license | https://github.com/pphowakande/bakround-applicant | d216368231d3a998ba12a3c4210d5508e3eb9beb | 6cf5081fe4fd7b4ee7a9b458043ad2513a90560e | refs/heads/master | 2022-01-18T23:03:37.240329 | 2020-02-13T18:24:05 | 2020-02-13T18:24:05 | 240,319,316 | 0 | 0 | null | false | 2022-01-05T08:14:38 | 2020-02-13T17:23:57 | 2020-02-13T18:25:02 | 2022-01-05T08:14:35 | 58,233 | 0 | 0 | 22 | JavaScript | false | false | __author__ = "natesymer"
from ..queue import QueueNames
from bakround_applicant.services.base import BaseConsumer
import django
import time
class Consumer(BaseConsumer):
service_name = "ON_DEMAND_VIEW_REFRESHER_SERVICE"
queue_name = QueueNames.on_demand_view_refresher
def handle_message(self, body):
... | UTF-8 | Python | false | false | 853 | py | 422 | consumer.py | 261 | 0.63306 | 0.623681 | 0 | 25 | 33.12 | 95 |
ad1v7/ternpy | 18,339,510,363,911 | 64e905cb259f4714c53a7012586fe5f9a6cd2e1f | 0273a9c46f1df09b83b45ae24ffc9cc812079ebb | /ternpy/commands/__init__.py | 7d17e5506ace15c30d04127feaa32a2ddc7ab616 | [] | no_license | https://github.com/ad1v7/ternpy | bb13c0723038edf6680405f31884e1011ba63167 | 9cd8745c2dee99f3fa186349b2c94e7b960b6690 | refs/heads/master | 2021-01-25T10:55:45.388544 | 2017-07-20T14:18:04 | 2017-07-20T14:18:04 | 93,890,485 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from .config import *
from .newternary import *
from .extract import *
from .tplot import *
from .getmeta import *
from .hi import *
| UTF-8 | Python | false | false | 133 | py | 17 | __init__.py | 16 | 0.729323 | 0.729323 | 0 | 6 | 21.166667 | 25 |
adrianhust/Santa_hat | 15,659,450,807,464 | dcc60283dc407bb1c42692beb140d7aee47fbddc | 1b81daee37b99f6195268ab9d842ec1172b9a165 | /santa_hat.py | 0f2c4b182ad1271a615057e8a0c9937e502d54f5 | [] | no_license | https://github.com/adrianhust/Santa_hat | 762e304545d85bb7131a0bcbf60d2fff8a893a04 | 05585127a61f20c8606d43c0caa074c45db16d44 | refs/heads/master | 2021-05-14T19:32:57.730587 | 2017-12-27T10:07:39 | 2017-12-27T10:07:39 | 115,505,762 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
from flask import Flask, request, url_for, send_from_directory
from werkzeug import secure_filename
import cv2
import face
import time
ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg', 'gif'])
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = os.getcwd()
app.config['HAT_FI... | UTF-8 | Python | false | false | 1,884 | py | 4 | santa_hat.py | 2 | 0.599257 | 0.585987 | 0 | 60 | 30.4 | 89 |
jancuk/shopcart | 446,676,647,073 | 4c1b17466f14ce2c22625748e5e671c0070296c6 | abebbab13a3cd8f330c99aab6e0b7f80c7ad7f6d | /ecommerce/admin.py | 744198efb4fc664161843763b90093a06b30a7c0 | [] | no_license | https://github.com/jancuk/shopcart | 5769d9d7d037031788e6435f8402b9c2de35a005 | fd410a2aa15e645825ad456d0a0ebb1f1090ad2b | refs/heads/master | 2021-01-10T10:35:47.948273 | 2015-10-22T04:00:38 | 2015-10-22T04:00:38 | 44,721,137 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib import admin
from .models import *
# Register your models here.
class ProductAdmin(admin.ModelAdmin):
list_display = ['title','price','image_tag']
readonly_fields = ('image_tag',)
admin.site.register(Brand)
admin.site.register(Product)
admin.site.register(Category)
admin.site.register(Cart... | UTF-8 | Python | false | false | 352 | py | 9 | admin.py | 6 | 0.755682 | 0.755682 | 0 | 13 | 26.076923 | 48 |
KbHarold/python-challenge | 8,753,143,394,186 | 1e116b5c2fb20e471eee9e5e22614243a16e2f63 | f34c9d599c7bd81f6b730eb64e839cb08b000768 | /PyPoll/main.py | f8f38b97d18a2a6f0cb6283f3069c844e3452a38 | [] | no_license | https://github.com/KbHarold/python-challenge | d2e2146db1f81a92df52f031c68d442d2f18b20d | 03ea523618cb07729dc5db90897bb9242298724f | refs/heads/master | 2020-04-19T00:53:08.572448 | 2019-02-06T00:06:17 | 2019-02-06T00:06:17 | 167,858,430 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import csv
#instructions on where to find the csv and assign it to the name poll_path
poll_path = os.path.join("Resources", "election_data.csv")
# Create variables for output
votes_cast = []
candidates = []
cand_names = []
winner =[]
#Open the CSV file and read the rows in to count the number of votes and ... | UTF-8 | Python | false | false | 3,745 | py | 2 | main.py | 2 | 0.613084 | 0.594927 | 0 | 79 | 46.417722 | 126 |
RajatPuri09/100DaysOfCode | 12,610,024,016,502 | 20846491fdb6ff69e643f5dc3f1f4416034ba075 | 8c06f6d684c37e324dfaed34c53148b5d23a2768 | /Day 10 - Calculator/Calculator.py | 6894839a865dc9e368ee6a42d353992c2671c5ea | [] | no_license | https://github.com/RajatPuri09/100DaysOfCode | 724c2a275691e0e2d48d7726555bed08664ff548 | 2f1d5d710d84764ff6821808e0fa9c49bdeca8f3 | refs/heads/main | 2023-08-13T23:17:27.885793 | 2021-09-17T07:44:45 | 2021-09-17T07:44:45 | 403,476,544 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import art
print(art.logo)
def add(a, b):
return a + b
def subtract(a, b):
return a - b
def multiply(a, b):
return a * b
def divide(a, b):
return a / b
operations = {
"+" : add,
"-" : subtract,
"*" : multiply,
"/" : divide,
}
def calculator():
num1 = float(input("Enter th... | UTF-8 | Python | false | false | 1,055 | py | 12 | Calculator.py | 11 | 0.561137 | 0.554502 | 0 | 53 | 18.924528 | 122 |
peilinsun/filestagram-app | 5,875,515,260,967 | 0628c48ed576c37c1126c69e0ea437ea872a8142 | ca244f5861223821fe92b0c393cac5fdb536e554 | /app/utils/utils.py | e0047645814c8bee8a65b6c5dd90d36d3e3b312a | [] | no_license | https://github.com/peilinsun/filestagram-app | 2277cd368f1a51f800ab1ee095d70791b2cc1995 | 1addd4d5ebc3017ef5d3093811d3662f487f8275 | refs/heads/main | 2023-02-13T15:48:37.452501 | 2021-01-12T09:33:50 | 2021-01-12T09:33:50 | 328,930,874 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask_uploads import UploadSet, ALL, extension
import os
import posixpath
from flask import render_template, session, redirect, url_for, request, abort, current_app, flash, make_response
from math import ceil
# from werkzeug import secure_filename, FileStorage
def paginate(items, page, per_page, error_out=False):... | UTF-8 | Python | false | false | 5,621 | py | 19 | utils.py | 12 | 0.574124 | 0.569318 | 0 | 168 | 32.446429 | 112 |
2575829997/jiaoTongWuLianWang | 11,141,145,194,652 | 1a8306c808a6c7c09f61518ebfbd5eff7889415b | 2e87b5b868a39b8d58b788d7865bfdca6f90cbbc | /dataVisual.py | 308696208b575c4bf79fd7413bbacab70a2f341d | [] | no_license | https://github.com/2575829997/jiaoTongWuLianWang | 542c4b0a90895ee6e079e3561e5cc334c3a7af75 | f56d746753261eb7ee65c24331ec4a5bc75182bc | refs/heads/master | 2022-04-20T17:25:22.607122 | 2020-04-20T15:38:40 | 2020-04-20T15:38:40 | 257,318,567 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import xlrd
from PIL import Image
from PIL import ImageTk
import matplotlib
matplotlib.use('TkAgg')
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
import matplotlib.pyplot as plt
from matplotlib.figure import Figure
import numpy as np
import tkinter
from tkinter import StringVar
i... | UTF-8 | Python | false | false | 3,921 | py | 4 | dataVisual.py | 3 | 0.58759 | 0.54881 | 0 | 107 | 32.962617 | 105 |
karthikpappu/pyc_source | 15,315,853,383,168 | 0250a1c70270f2e3d661a513e271c6243a8a62f4 | 91fa095f423a3bf47eba7178a355aab3ca22cf7f | /pycfiles/collective.advancedsearchtamer-1.0.tar/config.py | af12774c1d6a487ea9adedf4272313269f858038 | [] | no_license | https://github.com/karthikpappu/pyc_source | 0ff4d03e6d7f88c1aca7263cc294d3fa17145c9f | 739e7e73180f2c3da5fd25bd1304a3fecfff8d6e | refs/heads/master | 2023-02-04T11:27:19.098827 | 2020-12-27T04:51:17 | 2020-12-27T04:51:17 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # uncompyle6 version 3.6.7
# Python bytecode 2.4 (62061)
# Decompiled from: Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)]
# Embedded file name: build/bdist.macosx-10.3-i386/egg/collective/ads/config.py
# Compiled at: 2009-01-02 03:03:18
from Products.CMFCore.permissions import se... | UTF-8 | Python | false | false | 824 | py | 114,545 | config.py | 111,506 | 0.740291 | 0.658981 | 0 | 26 | 30.730769 | 104 |
cberardi4/Jobcoin | 5,274,219,847,462 | 0bd3de4e23587312c3c97d3ca6d03bca60990fd8 | 39320e66b1cf33e1af43b97163ac2943de268e67 | /tests/test_address_api.py | 91df76cc01b41f374cc2b636242db5defd5ee9d6 | [] | no_license | https://github.com/cberardi4/Jobcoin | d697b6a15f61a8e585434085d2b0320c09f310fc | b038c89ab300193f5ae2316517cf58ee222674c7 | refs/heads/main | 2023-02-01T00:12:35.410743 | 2020-12-18T19:05:08 | 2020-12-18T19:05:08 | 321,864,096 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pytest
from jobcoin.classes.transaction_api import Transaction_API
from jobcoin.classes.address_api import Address_API
from jobcoin.classes.transaction import Transaction
def test_check_activated_address_invalid():
'''
Test to make sure that the API does not return a known unactivated address
as val... | UTF-8 | Python | false | false | 976 | py | 11 | test_address_api.py | 10 | 0.70082 | 0.70082 | 0 | 29 | 32.655172 | 92 |
ALMPartners/ahjo | 7,060,926,250,833 | 34bf7119c8a24cfd6bcb1d938de39e5ae856cd5b | 89f5c69d2905a5e5381141aad202a87add6d247a | /src/ahjo/database_utilities/conn_info.py | 98cdbb2305f39e281f500bd3896ea53d42e7b7c3 | [
"Apache-2.0"
] | permissive | https://github.com/ALMPartners/ahjo | ad9614363e303f7b768bd3a9ad2aaad1fa17a28f | 5e86f3f0074994b077614f88eda291218e651d67 | refs/heads/master | 2023-06-26T07:23:47.418692 | 2023-06-13T10:44:03 | 2023-06-13T10:44:03 | 210,797,645 | 4 | 1 | Apache-2.0 | false | 2022-12-14T08:15:24 | 2019-09-25T08:45:52 | 2022-12-12T06:56:42 | 2022-12-14T08:15:22 | 234 | 1 | 1 | 0 | Python | false | false | # Ahjo - Database deployment framework
#
# Copyright 2019 - 2022 ALM Partners Oy
# SPDX-License-Identifier: Apache-2.0
"""Utily for extracting connection info from configuration json.
"""
import importlib
from typing import Union
from ahjo.credential_handler import get_credentials
def create_conn_info(conf: dict) ->... | UTF-8 | Python | false | false | 3,341 | py | 87 | conn_info.py | 62 | 0.64801 | 0.644119 | 0 | 87 | 37.402299 | 193 |
VaishnaveeRN18102000/GestureVolumeController | 15,461,882,281,109 | 4d4261dd28d85c82c144356ea6a0aefa7f3c272c | a14cd8c4fd9aad4f19a182e8fc17c1b6754603f3 | /VolumeController.py | 4d2196fcdfc49721b5d0626a34b389ea7f2e61e4 | [] | no_license | https://github.com/VaishnaveeRN18102000/GestureVolumeController | 3ac78c543023c6a3c99718b9892409cf366c7249 | d13f042631da71e2e64682a1ed9e9a30338aeb32 | refs/heads/master | 2023-05-01T00:47:55.698117 | 2021-05-21T07:21:25 | 2021-05-21T07:21:25 | 367,112,979 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2
import numpy as np
import time
from ctypes import cast, POINTER
from comtypes import CLSCTX_ALL
from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume
import HandTracker as ht
wc, hc = 640, 480
cam = cv2.VideoCapture(0)
cam.set(3, wc)
cam.set(4, hc)
pt = 0
boundbox = []
devices = AudioUtilities.GetSpea... | UTF-8 | Python | false | false | 2,124 | py | 2 | VolumeController.py | 1 | 0.609228 | 0.531544 | 0 | 56 | 36.928571 | 102 |
nhanvolac/ThucHanh_Bai3_myoffice | 9,105,330,677,806 | 2a7de2b85f9bde0208237b76d173f8f1c30555c4 | 4b5205e9cc9b5a0f3cc4242242a402ba3821bf1d | /officemaster/apps.py | fce4fc2a91cde557395344ed8861a7881c98348c | [] | no_license | https://github.com/nhanvolac/ThucHanh_Bai3_myoffice | c12701e3706555da7b8c34cd6707b2857335f0c1 | 267e4d7e303692f41aea249c5f2f5de724467a04 | refs/heads/master | 2022-12-14T16:54:56.218834 | 2020-09-12T02:09:53 | 2020-09-12T02:09:53 | 294,851,969 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.apps import AppConfig
class OfficemasterConfig(AppConfig):
name = 'officemaster'
| UTF-8 | Python | false | false | 99 | py | 3 | apps.py | 3 | 0.777778 | 0.777778 | 0 | 5 | 18.8 | 36 |
kanha95/BBC_Crawler | 4,475,355,960,227 | 5c310a68694aa3a72a96880634f2f0c0a7ca285e | 6800086e4735913f42850d0c592c20770448222a | /bbc_crawler.py | 2cd591f207c25461d95aae0c2cb2522ac9a10cd6 | [] | no_license | https://github.com/kanha95/BBC_Crawler | d2ca8e8368d22747f2ce533172dc23a60f2c9cd4 | e352659bc1e9100d1d5c8f8868150d0453e53792 | refs/heads/master | 2020-04-18T13:23:46.703605 | 2019-01-25T16:51:06 | 2019-01-25T16:51:06 | 167,560,566 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import pycurl
#import cStringIO
import json
import ast
import os
import selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
import jellyfish
from pyvirtualdisplay import Display
import csv
# remove this once done
display = Display(visible=0, size=(800, 600))
... | UTF-8 | Python | false | false | 1,761 | py | 4 | bbc_crawler.py | 3 | 0.623509 | 0.59682 | 0 | 65 | 26.092308 | 124 |
akshayc11/cesar_vis | 11,579,231,862,999 | e01b9b8d1b116010f66357ee1c9360f2a5361371 | d398461d893c3f6423a68031b76e7edb5cb441b7 | /downsample_data_streams.py | 005885497a0d1d8a5c12204501e3eb747bf094d6 | [
"Apache-2.0"
] | permissive | https://github.com/akshayc11/cesar_vis | 2d03ab46a3844481bcdc2fde1d2a5834b11c9871 | 0d3d53dbbfec256304a0e468d9848dedf9a54b24 | refs/heads/master | 2021-01-18T01:39:35.461403 | 2013-09-30T22:46:58 | 2013-09-30T22:46:58 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # downsample_data_streams.py
# downsample a synchronized data streams file.
# take 1 out of every N sync points.
from xml.dom import minidom
import argparse
def downsample_data_streams(in_file_name,
out_file_name,
N=150):
print 'parsing...'
in_doc = min... | UTF-8 | Python | false | false | 1,874 | py | 9 | downsample_data_streams.py | 4 | 0.571505 | 0.565101 | 0 | 56 | 32.464286 | 100 |
humoncy/mlhw5 | 9,998,683,869,295 | 92801c4013af9f2292a0195c82c8137f345ba71d | 0e0236ea4a54db4a2b49abb7e0185b20e23d913c | /main.py | e54c4a684461862fdb24ffc5de00748aee0bbf0c | [] | no_license | https://github.com/humoncy/mlhw5 | 1dea77eade2b536f0722745edff42b586ee95d49 | c86b8cb2fd69973745652d3a027654f3ec99840b | refs/heads/master | 2021-05-06T15:45:23.068753 | 2017-12-31T06:45:52 | 2017-12-31T06:45:52 | 113,659,899 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans, SpectralClustering
from kernel_kmeans_ref import KernelKMeans
from kmeans import k_means
from kernel_kmeans import kernel_k_means
from utility import show_cluster
from spectral_clustering import spectral_clustering
if __name__ == "... | UTF-8 | Python | false | false | 2,970 | py | 5 | main.py | 4 | 0.632323 | 0.611448 | 0 | 84 | 34.357143 | 113 |
rchauhan9/imdb-scraper | 4,604,204,987,943 | d694461338c693780b254aab118e88bd181bf7e8 | 8d187459ba2502d1a46c501a05ee8c4bbd4b15ff | /src/gql_client/client.py | 460c68fa40ef3bb4cd2f1604b3ac36cc64e6b67c | [] | no_license | https://github.com/rchauhan9/imdb-scraper | a854bfb5dd3888675c56557e39092a40ad12b54f | f4f07ccf1aea9b4066c373c34d9e22b2a5a67117 | refs/heads/master | 2023-01-12T05:03:22.378062 | 2020-11-19T20:16:33 | 2020-11-19T20:16:33 | 300,712,649 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from gql import gql, Client
from gql.transport.requests import RequestsHTTPTransport
class GQLClient():
"""
A small wrapper class to make executing GraphQL queries and mutations from files easier.
Args:
gql_endpoint: The URI of the GraphQL endpoint the user needs to query.
Attributes:
... | UTF-8 | Python | false | false | 1,385 | py | 27 | client.py | 8 | 0.617329 | 0.616606 | 0 | 43 | 31.232558 | 92 |
HopperElec/HopperBot-Python | 13,408,887,928,092 | c9722a61f6ca5218253d07e1d0b2420819f0f0a1 | f143f2dde58601ca10ccc97237c3214accd83c4f | /Cogs/Shared/AI/generateCounts.py | fb87e1f6163750cda6a0580ba7178d312ebd2760 | [] | no_license | https://github.com/HopperElec/HopperBot-Python | 396f727e36d1440026081b320efbd5f8aac8f966 | 84abe56929e2423c62361a6a9ae0b9526a63a66d | refs/heads/master | 2023-07-12T22:20:38.218196 | 2021-08-07T08:58:50 | 2021-08-07T08:58:50 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Commonly used function for combining lists of lists
def getIn(inside):
return [inner for outer in inside for inner in outer]
# Import required modules
from functools import lru_cache,wraps
from collections import Counter
from nltk import ngrams
from os import listdir
from json import dump as jsonwrite, ... | UTF-8 | Python | false | false | 5,039 | py | 18 | generateCounts.py | 17 | 0.636237 | 0.613415 | 0 | 97 | 49.948454 | 199 |
Jaggusms/CipherSchools_assessment | 13,159,779,843,335 | c4fb60e311187e874ef24122da5d4d6fb4f438bd | 02813a22c7fbd40ee5442e10fc41faaad595a3c5 | /Grocery_Items.py | f613db028a8c39639e91af871fd2cb4ec0877d07 | [] | no_license | https://github.com/Jaggusms/CipherSchools_assessment | 329995f5844250fb814111c8932190efadd43a94 | 6232d0f7ef4dbde0fcfd84b1f074eedb4db2eb6c | refs/heads/main | 2023-03-20T22:36:43.490404 | 2021-03-17T20:29:55 | 2021-03-17T20:29:55 | 348,842,241 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
print("Enter Your budget :",end=" ")
Budget=int(input())
product=[]
quantity=[]
price=[]
left=0
def duplicates(lst, item):
return [i for i, x in enumerate(lst) if x == item]
while(Budget > 0):
print("1.Add an item \n2.Exit \nEnter your choice :",end=" ")
choice=int(input())
if choice==1:
... | UTF-8 | Python | false | false | 1,207 | py | 2 | Grocery_Items.py | 2 | 0.505385 | 0.495443 | 0 | 39 | 28.74359 | 89 |
nihao-hit/jianzhiOffer | 8,753,143,390,063 | a6c784bae4053d08de3b26943c37f9876833ce81 | 5573d2a9f1b83ab67ec416e772b3861192d6f1f6 | /test14.py | 9efa8cd032762609449a75fab90bca2765ea8d79 | [] | no_license | https://github.com/nihao-hit/jianzhiOffer | 9512519428aec51ab53dfb805dfa818af749fc46 | 42a15943394ae533dcd0d5bbf52e4366ab0756ab | refs/heads/master | 2020-03-06T22:40:02.823325 | 2019-04-15T11:58:24 | 2019-04-15T11:58:24 | 127,109,414 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''剪绳子'''
class Solution:
# 方法一:DP,定义函数f(n)是把长度为n的绳子剪成若干段后各段长度乘积的最大值。
# 在剪第一刀的时候,我们有n-1种剪法。f(n) = max(f(i)*f(n-i)),得到递归公式。
# 难点:n=2,n=3都是特例。f(2)!=1,f(3)!=2,
# 当f(2),f(3)作为子问题在递归公式右边的时候,可以选择不剪,以长度作为f(n)值。
def cutRope1(self,n):
'''
:type n:int
:rtype:int
'''
if ... | UTF-8 | Python | false | false | 1,422 | py | 66 | test14.py | 66 | 0.416667 | 0.375439 | 0 | 45 | 24.355556 | 56 |
ashutoshshanker/ops-sysd | 4,818,953,338,063 | d908cf5f15275077f42a49d5d25222212b0e5fb2 | 070f92b0ba1604a9d59ff64edeeb6d1879096a59 | /ops-tests/component/ops-sysd/test_sysd_ct_os_release/test_sysd_ct_os_release.py | c10511925cf4525eaf0c7b3d7716f3ad1bf8b65d | [
"Apache-2.0"
] | permissive | https://github.com/ashutoshshanker/ops-sysd | 03c037513c9f67b7ba085c507108673836896150 | b354f06f6fb3c3140b7f942c3a2391d76f029114 | refs/heads/master | 2020-12-28T20:19:36.009307 | 2016-07-25T23:15:41 | 2016-07-26T00:21:03 | 65,635,839 | 0 | 1 | null | true | 2016-08-13T20:35:47 | 2016-08-13T20:35:47 | 2016-06-06T12:02:47 | 2016-07-28T21:25:34 | 202 | 0 | 0 | 0 | null | null | null | # -*- coding: utf-8 -*-
# (C) Copyright 2015 Hewlett Packard Enterprise Development LP
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.a... | UTF-8 | Python | false | false | 7,083 | py | 30 | test_sysd_ct_os_release.py | 11 | 0.637865 | 0.627418 | 0 | 262 | 26.034351 | 78 |
casamagalhaes/panamah-sdk-python | 5,368,709,134,275 | 7afa4d37d9b7e541beec798c14c5f6e3ce74676e | 9cc66c7d6947fdd64e85fa360bf3d85871af4e68 | /panamah_sdk/nfe.py | cc1a63ba6b9f147372077734428f4cce502bc29f | [
"MIT"
] | permissive | https://github.com/casamagalhaes/panamah-sdk-python | e584b340e56dbebc219c4528d9c60a00bbb8aeee | 6baec7994a5c6b0c3d6b79ddc57ca95b44512388 | refs/heads/master | 2023-08-03T19:55:19.842461 | 2023-07-28T01:26:53 | 2023-07-28T01:26:53 | 182,903,458 | 0 | 0 | MIT | false | 2023-07-28T01:26:55 | 2019-04-23T02:02:12 | 2019-12-16T17:43:51 | 2023-07-28T01:26:53 | 96 | 0 | 0 | 3 | Python | false | false | import re
import os
from dictor import dictor as get_property
from xmltodict import parse as parse_xml_string
from .models.definitions import PanamahLoja, PanamahCliente, PanamahProduto, PanamahVenda, PanamahVendaItem, PanamahProdutoEan
class Nfe:
@classmethod
def parse_xml(cls, filename):
with open(f... | UTF-8 | Python | false | false | 5,391 | py | 26 | nfe.py | 21 | 0.597848 | 0.596179 | 0 | 115 | 45.886957 | 171 |
ayushbhandari02/Data-Structures | 9,766,755,649,485 | e4af7db258292acdb373794d5799512f75a9cda7 | 30eab9afd92f8a7116884cfe4c71d38c1cb47ac3 | /reverse_linked_list.py | ec88ee3364559017080340d5ad1634d873be5236 | [] | no_license | https://github.com/ayushbhandari02/Data-Structures | d456a8817ff1722dbcae996197742bb3cedfadaf | 81c3793232220e5e87ee64687ae7c02233901913 | refs/heads/master | 2020-07-05T21:47:27.612238 | 2019-09-26T06:17:56 | 2019-09-26T06:17:56 | 202,790,053 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Node:
def __init__(self, data):
self.data = data
self.next = None
def insert_at_last(head, data):
if head is None:
head = Node(data)
else:
temp = head
while temp.next:
temp = temp.next
temp.next = Node(data)
def view_list(head):
temp ... | UTF-8 | Python | false | false | 827 | py | 41 | reverse_linked_list.py | 41 | 0.584039 | 0.577993 | 0 | 44 | 17.795455 | 36 |
iuri-pdista/pythonChat | 17,686,675,347,698 | 9c9dba8b7c43c80ccb46f7980fbba8c59e85267c | da6bc095ac2c4c918228d13071779f96dacfd6cb | /server.py | a2544bf271dfd76173712f49ff3a4f459b1e3e15 | [] | no_license | https://github.com/iuri-pdista/pythonChat | d6c1df82bc075231828d5775edd723c0282dac4b | a7dc874c2fcfe0c6af198e5a01f305d0c627dd15 | refs/heads/master | 2022-11-26T15:50:14.935785 | 2020-07-22T19:41:01 | 2020-07-22T19:41:01 | 281,745,973 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import socket
import colorama
try:
serverSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
serverSocket.bind((socket.gethostname(),21000))
serverSocket.listen(3)
except:
print("Could not establish the server")
while True:
clientsocket, address = serverSocket.accept()
print(f"Connec... | UTF-8 | Python | false | false | 719 | py | 2 | server.py | 2 | 0.709318 | 0.682893 | 0 | 20 | 34.85 | 71 |
silvandeleemput/memcnn | 17,738,214,964,666 | c87838540812199492d2412ae2e2dca8fc1476f7 | 6b1677e3d641ed89b834de5ff1cf070997b6cdba | /memcnn/models/affine.py | 0571a25fa65580de22a57ee7df965b9f097aa431 | [
"MIT"
] | permissive | https://github.com/silvandeleemput/memcnn | e3c7639261eead441d84626c78c3d8b7fb2a9627 | a71169b32d4f8568b333d95a4303d8e05d1e1af5 | refs/heads/master | 2023-05-10T17:01:39.711636 | 2023-05-10T08:04:48 | 2023-05-10T08:08:13 | 122,979,177 | 251 | 29 | MIT | false | 2023-05-10T07:50:35 | 2018-02-26T14:11:31 | 2023-05-09T08:14:00 | 2023-05-10T07:50:34 | 408 | 238 | 24 | 14 | Python | false | false | import torch
import torch.nn as nn
import copy
import warnings
from torch import set_grad_enabled
warnings.filterwarnings(action='ignore', category=UserWarning)
class AffineAdapterNaive(nn.Module):
""" Naive Affine adapter
Outputs exp(f(x)), f(x) given f(.) and x
"""
def __init__(self, module):
... | UTF-8 | Python | false | false | 20,317 | py | 55 | affine.py | 35 | 0.54511 | 0.516956 | 0 | 577 | 34.211438 | 137 |
TobyNonnenmacher/GWT_Algorithm | 11,252,814,362,551 | ca5d3dd8a11ac8888bbaa68fd8b9e251e3b5b597 | 30f24f38685717ce0447616974b37e435385b215 | /Toby_GWT_Algorithm/TwosComplement.py | f22f54b4aabc614aa913307659713adbbdd56b63 | [] | no_license | https://github.com/TobyNonnenmacher/GWT_Algorithm | 481b81a3c8923f698127485b5f741a705a4887dd | 83d5ceee1a9a2d54465ec6c70d09106baa4ab553 | refs/heads/master | 2021-01-10T15:16:43.356952 | 2015-12-02T17:08:32 | 2015-12-02T17:08:32 | 45,616,847 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
from __future__ import print_function
def to_twoscomplement(value):
if value < 0:
value = ( 1<<16 ) + value
formatstring = '{:0%ib}' % 16
return formatstring.format(value)
with open("gwt_pll_1000frames.txt") as f:
lines = f.read()
numbers = lines.replace("\n", " ").split("... | UTF-8 | Python | false | false | 632 | py | 10 | TwosComplement.py | 5 | 0.629747 | 0.60443 | 0 | 29 | 20.758621 | 57 |
debasishbai/django_blog | 2,439,541,460,660 | b18c864e4cfbd261383ea87bd2ab1b22e9de2b6c | a312f6097e881b5bccb6210370441fc43638cac8 | /news/news/pipelines.py | 2eb8757d4cbfa77b1efb9e127f80b8aa4b302968 | [
"MIT"
] | permissive | https://github.com/debasishbai/django_blog | 2798e5b57642ccc6767c291631934d6c099dd24e | a304fdc8f029499893d8157dfdd8ae29e79d6545 | refs/heads/master | 2022-11-23T08:50:26.731283 | 2017-04-30T10:34:17 | 2017-04-30T10:34:17 | 81,077,552 | 1 | 0 | MIT | false | 2022-11-22T01:29:50 | 2017-02-06T10:51:29 | 2017-05-04T19:16:07 | 2022-11-22T01:29:47 | 111 | 0 | 0 | 8 | Python | false | false | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import psycopg2
import urlparse
import os
import logging
from datetime import datetime
from scrapy.exceptions import DropItem
im... | UTF-8 | Python | false | false | 3,455 | py | 33 | pipelines.py | 9 | 0.558032 | 0.553111 | 0 | 91 | 36.967033 | 159 |
shkwsk/AtCoder | 9,096,740,744,761 | 8cd418075b2c1323de997e1aad332a0052b57847 | aac8374bea34358f003590ce28ab7d40675ea599 | /practice/other/python3/abc003_2.py | 7454c074ae7c961f72e5b2e4f8478fc65b36309a | [] | no_license | https://github.com/shkwsk/AtCoder | bda3b341706faca6a6449ddbd81a6c13cad0b161 | bcb976f03004a70e6c3dd67b3668b2901de2d5af | refs/heads/master | 2022-11-26T23:32:34.940797 | 2020-08-10T06:06:52 | 2020-08-10T06:06:52 | 268,196,180 | 0 | 0 | null | false | 2020-05-31T11:59:20 | 2020-05-31T02:34:50 | 2020-05-31T03:47:15 | 2020-05-31T11:59:19 | 18 | 0 | 0 | 1 | Python | false | false | def main():
S = list(input())
T = list(input())
AtCoder = ['a','t','c','o','d','e','r']
win = True
for s,t in zip(S,T):
if s == t:
continue
if s == '@' and t == '@':
continue
if s == '@' and t in AtCoder:
continue
if s in AtCoder an... | UTF-8 | Python | false | false | 494 | py | 82 | abc003_2.py | 76 | 0.396761 | 0.396761 | 0 | 22 | 21.454545 | 43 |
RuomeiYan/CCC-My-solutions | 14,121,852,496,029 | ccc53f98d094fb8e2262416387d67e1c869d5656 | 20f35aaf9b3d4f263ed2b98dad3715e397a9ac51 | /2011/11-S1.py | acc98572f0aca01993288f1cd65c6087c91c80fa | [] | no_license | https://github.com/RuomeiYan/CCC-My-solutions | 3639c1161e56bd5484b4e642764060e7b4bff5b2 | f307229d2f8d48035f0d9bc3d772b0158cb7c9f1 | refs/heads/master | 2021-09-04T01:43:18.773418 | 2018-01-14T05:49:44 | 2018-01-14T05:49:44 | 117,403,370 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
n = int(sys.stdin.readline())
t = 0
s = 0
for _ in range(n):
text = sys.stdin.readline()
t += text.count('T') + text.count('t')
s += text.count('S') + text.count('s')
if s >= t:
print('French')
else:
print('English')
| UTF-8 | Python | false | false | 262 | py | 155 | 11-S1.py | 154 | 0.522901 | 0.515267 | 0 | 12 | 19.666667 | 42 |
AtomsForPeace/FishTank | 1,906,965,521,293 | b7f0d98ed3422df1e58747735af123598af24269 | 2e0d72c7fc7f98be7ea177a4258e2aec7f23c8f2 | /FishTank.py | 12557d7d751c8deb20089cb100186ebf6a8aab4d | [] | no_license | https://github.com/AtomsForPeace/FishTank | 8a238f6169b9a8fc1e3f4bd7d9ec1413d9854a4f | 0ae9a8ce50f2c63de4920c44023e2264a5c28382 | refs/heads/master | 2019-07-29T01:25:28.738120 | 2019-03-30T16:10:55 | 2019-03-30T16:10:55 | 23,592,353 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import pygame
import random
pygame.init()
size = width, height = 3850, 1200
blue = 64, 164, 223
screen = pygame.display.set_mode(size)
class Fish:
def __init__(self, rightImage, leftImage):
# loading the two images
self.rightImage = pygame.image.load(rightImage)
self.leftIma... | UTF-8 | Python | false | false | 2,253 | py | 2 | FishTank.py | 1 | 0.594763 | 0.559698 | 0 | 69 | 31.652174 | 76 |
ablange93/sql_task | 15,169,824,511,596 | 5632f70ae956ce10865eb1afa403a94e0a740a9d | ad38bb828a282df890da669943be161535a37f72 | /sql_task/sql_task.py | d08d3620a82e2aad525987f9f127855bc6954a76 | [] | no_license | https://github.com/ablange93/sql_task | a138833d3d0724df0be6c988b9dd84d6746e28d1 | 94055487b9e47f2dca2416ba4dfd431deeddbc70 | refs/heads/master | 2020-05-18T09:47:15.273640 | 2019-05-04T20:22:20 | 2019-05-04T20:22:20 | 184,336,301 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import os
import sqlite3
from sqlite3 import Error
def create_connection(db_file):
# generate database path relative to working directory
current_dir = os.path.dirname(__file__)
database_path = os.path.join(current_dir, db_file)
try:
conn = sqlite3.connect(database_path)
ret... | UTF-8 | Python | false | false | 4,679 | py | 5 | sql_task.py | 3 | 0.571062 | 0.563796 | 0 | 131 | 34.717557 | 114 |
PatriqDesigns/Assignments | 3,264,175,187,672 | 3867627e36cb357aaf3a9db2b676267de4e4db96 | 28a8c69bd8fa0a28cb0d98988fda9ee6241271c8 | /projRC/utils.py | 3f9c22fc67931c63071bc7e0b33395082b1ee3f9 | [] | no_license | https://github.com/PatriqDesigns/Assignments | 9a16698165994567109e53334b779c613d376e92 | f74c86426493934b63cd6a00aa24c087d23791e9 | refs/heads/master | 2020-05-21T15:23:25.782586 | 2019-12-14T13:26:52 | 2019-12-14T13:26:52 | 25,074,143 | 1 | 4 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Contains miscellaneous utilities"""
# Grupo 14:
# 81900 - Nuno Anselmo
# 81936 - Liliana Oliveira
# 82047 - Andre Mendes
import time
DEBUG_LEVEL = 0
def log_message(code, message):
"""Formats and prints the given message"""
print '[' + format_timestamp(time.time()) + ' - ' + code.center(5) + '] ' + str(me... | UTF-8 | Python | false | false | 500 | py | 318 | utils.py | 147 | 0.66 | 0.622 | 0 | 20 | 24 | 92 |
uhayate/django-dev | 11,123,965,302,205 | 50db7603e3a47ea64801d55518ab4464fec1b67a | 8dce1d9105b38a821317f72b0687be5ab42e5a73 | /backend/base/settings.py | 4eba944931889308255200c4f5eaa5e5c5f9cc74 | [] | no_license | https://github.com/uhayate/django-dev | b1df20781ba4de7cdcb0016194e8d8f80f8e200f | 57d26187196095d6dd52f77daf8661b5ad1ac6cd | refs/heads/master | 2016-09-14T16:26:16.453318 | 2016-09-12T08:36:06 | 2016-09-12T08:36:06 | 60,186,707 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # coding:utf-8
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'r5b7tg3wz-##x*mlp(c1#m3$^vjwwr_qig&%(fud=10ga3%&qu'
DEBUG = True
# 数据库设置
# ------------- 开发环境设置 DEBUG = TRUE --------------------
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',... | UTF-8 | Python | false | false | 4,036 | py | 7 | settings.py | 2 | 0.600317 | 0.594509 | 0 | 160 | 22.675 | 73 |
SharpAI/DeepCamera | 19,207,093,766,546 | 176a751de454165c6fd6bb0abafba8c5b87ad143 | 02bde3948681b41ab5b94553cc87ca2bfd38f159 | /src/yolov2_parking/convert.py | 4e75f5dd34159ab0dc3dc656458e471e8f33b1ad | [
"MIT"
] | permissive | https://github.com/SharpAI/DeepCamera | 84829f615a9fe6e3e3d67cb96b3143304ecbad59 | 6375e7c7cfda90345e9182214e9208a42b5254a7 | refs/heads/master | 2023-06-18T05:07:19.163001 | 2023-01-18T18:03:19 | 2023-01-18T18:03:19 | 173,961,960 | 1,548 | 244 | MIT | false | 2022-10-07T18:23:20 | 2019-03-05T14:29:23 | 2022-10-06T08:01:18 | 2022-10-07T18:21:02 | 244,168 | 1,033 | 201 | 11 | JavaScript | false | false | import sys
import numpy
import _convert
from cffi import FFI
ffi = FFI()
# window size 2
# RGB array (3D)
my_input = numpy.array(
[
[[1,2,3],[5,6,7],[4,5,6],[6,4,5]],
[[4,6,3],[5,8,7],[6,3,6],[5,8,5]],
[[3,7,3],[4,5,7],[5,2,5],[4,5,5]],
[[2,8,3],[3,2,7],[1,2,6],[3,1,5]],
], d... | UTF-8 | Python | false | false | 1,711 | py | 491 | convert.py | 304 | 0.608416 | 0.56692 | 0 | 51 | 32.54902 | 96 |
karthikmprakash/Quick-Notes | 9,586,367,034,342 | 7899184891be70aa4a78ec40242fbd6a0bc633a5 | 6097f773a62fef134851491c11c4ab0892755e04 | /website/models.py | 5c06025ec0e90c61cf36199dd07d69ea1309935f | [] | no_license | https://github.com/karthikmprakash/Quick-Notes | d226c9f8152105e5f01058d689c4ee97e85a3f64 | 1c1ed8f0299995d56fd7087ab96ee27c46301ce0 | refs/heads/main | 2023-06-23T14:44:49.016083 | 2021-07-11T15:05:36 | 2021-07-11T15:05:36 | 369,278,747 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from . import db
from flask_login import UserMixin
from sqlalchemy.sql import func # to get date and time
class Note(db.Model):
id = db.Column(db.Integer,primary_key=True)
data = db.Column(db.String(10000))
date = db.Column(db.DateTime(timezone=True),default=func.now())
user_id=db.Column(db.Integer,db.... | UTF-8 | Python | false | false | 747 | py | 6 | models.py | 3 | 0.718876 | 0.700134 | 0 | 16 | 45.75 | 145 |
gavt45/clouddocs-server | 15,822,659,530,450 | 2216f78854ef66123a0f6cfd5f65e3ca1dc0a2d0 | 92b39295fbd0e5f18fd107132de5520ab9330331 | /clouddocs_app/migrations/0008_auto_20201124_1351.py | 0298131da287093ff7c25c7b434bddd9378594cc | [] | no_license | https://github.com/gavt45/clouddocs-server | a9a4145e9bc5dca576b0c50b1e5796657bdadbec | 3f53bce8c6fb6aca5a8868195dfcb5984223f4ff | refs/heads/main | 2023-01-30T14:33:55.493121 | 2020-12-04T04:26:36 | 2020-12-04T04:26:36 | 315,522,057 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.1.3 on 2020-11-24 13:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('clouddocs_app', '0007_auto_20201124_1046'),
]
operations = [
migrations.RemoveField(
model_name='event',
name='id_di... | UTF-8 | Python | false | false | 522 | py | 15 | 0008_auto_20201124_1351.py | 14 | 0.574713 | 0.515326 | 0 | 22 | 22.727273 | 71 |
glow-mdsol/clinical_trials | 6,210,522,741,275 | 3dbab29e9ca7f7065ec916195778de82eeea31d6 | 14fac8b3cec0cdde1e59a43ec04ed46a9c6df429 | /tests/test_structs.py | daaf7eb258e297b6da17654acb8f3988abfbafce | [] | no_license | https://github.com/glow-mdsol/clinical_trials | 1bee3f3a3c55f7b886d1aa92db6ee9f25c6b92bd | 86bfa15010f262ffe925909b77eff5023b20a5b8 | refs/heads/develop | 2022-12-10T04:33:35.829465 | 2021-04-20T19:47:52 | 2021-04-20T19:47:52 | 136,510,299 | 4 | 1 | null | false | 2022-12-08T02:21:14 | 2018-06-07T17:30:20 | 2021-05-10T23:51:22 | 2022-12-08T02:21:14 | 151 | 4 | 0 | 2 | Python | false | false | import os
from unittest import mock
import pytest
from xmlschema import XMLSchema
from clinical_trials import ClinicalStudy
from clinical_trials.structs import ProvidedDocument
SCHEMA_LOCATION = os.path.join(os.path.dirname(__file__), '..', 'doc', 'schema', 'public.xsd')
@pytest.fixture()
def schema():
_schema... | UTF-8 | Python | false | false | 2,675 | py | 32 | test_structs.py | 14 | 0.666168 | 0.645607 | 0 | 67 | 38.910448 | 103 |
AhmedKhaled007/coursaty | 1,623,497,663,768 | 5a2ae248a32bce67c5008385b8af5213eb959f6d | ed4c4fbdbc9bfce61a4e9f4b54a45d9ebf863839 | /courses/migrations/0007_auto_20200207_1313.py | f7df430ab8cc49416a53a3cd7c24b42c73bd5246 | [] | no_license | https://github.com/AhmedKhaled007/coursaty | 7f537118035697c9d99c266c67ab8c208a4645df | 26798b4363a37f22700e34e6ba4f304d982564c1 | refs/heads/master | 2020-12-27T08:03:01.147463 | 2020-02-11T09:16:01 | 2020-02-11T09:16:01 | 237,825,632 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.0.2 on 2020-02-07 11:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('courses', '0006_tracks'),
]
operations = [
migrations.AddField(
model_name='classgroup',
name='days_of_week',
... | UTF-8 | Python | false | false | 742 | py | 62 | 0007_auto_20200207_1313.py | 42 | 0.560647 | 0.521563 | 0 | 25 | 28.68 | 177 |
vikasmech/MotionVectorEstimator | 2,284,922,625,887 | 3accbf38b317028f2558a96dae92966172f9f9fa | ac7d11d74e2e1c958008a546684b7ba2bc66d888 | /imageReader.py | 58d8c577117bde7ee9500cdf61eb54a89da69435 | [] | no_license | https://github.com/vikasmech/MotionVectorEstimator | 2a83c00060f0588469dd0934ec3c3ad7cfbe8228 | 45ec27cf9725aceb8bd32b6bbc4790d7190b309f | refs/heads/master | 2020-03-18T14:07:27.794108 | 2016-06-29T21:34:22 | 2016-06-29T21:34:22 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | __author__ = 'davidsiecinski'
from PIL import Image
def loadImage(filepath):
im = Image.open(filepath)
# im=im.convert('LA')# convert to Black and White
image_array=[]
if list(im.getdata())[0] is list:
for r, b, g in list(im.getdata()):
image_array.append(0.2125*r + 0.7154*g + 0.07... | UTF-8 | Python | false | false | 541 | py | 9 | imageReader.py | 8 | 0.602588 | 0.563771 | 0 | 18 | 28.888889 | 83 |
GustavoSwDaniel/Desafio-Desenvolvedor-Python | 730,144,450,807 | fe97d3b0dd60e713f0eadd28bb44a016c7da35d8 | 6491feffc882a87e84dca6e8f5c20be4d3cd72c2 | /migrations/versions/ff36453c4c77_add_pet_photo_field_in_pets_model.py | 5cc35b931322f212bcdbbcfbf361d6752e5ff3a4 | [] | no_license | https://github.com/GustavoSwDaniel/Desafio-Desenvolvedor-Python | b21074dc12562f6baa62b8c9702e7a69f778467a | 522532c1a1b3154c136ef4f8584a752830c484c1 | refs/heads/master | 2023-06-28T21:04:56.426402 | 2021-08-07T03:55:07 | 2021-08-07T03:55:07 | 391,499,034 | 0 | 0 | null | false | 2021-08-06T16:37:29 | 2021-08-01T01:48:27 | 2021-08-06T05:13:58 | 2021-08-06T16:37:28 | 52 | 0 | 0 | 0 | Python | false | false | """Add pet photo field in Pets model
Revision ID: ff36453c4c77
Revises: 7d6bf0c7c573
Create Date: 2021-08-05 20:46:44.620948
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'ff36453c4c77'
down_revision = '7d6bf0c7c573'
branch_labels = None
depends_on = None
d... | UTF-8 | Python | false | false | 673 | py | 24 | ff36453c4c77_add_pet_photo_field_in_pets_model.py | 20 | 0.682021 | 0.607727 | 0 | 28 | 23.035714 | 77 |
ibis-project/ibis | 18,537,078,856,633 | 47c67649936f3736daeba64fb7993f7800e2d28a | dbe83cf6c2b78a61def862ca19625c2f78268af8 | /ibis/backends/base/sql/alchemy/datatypes.py | e9ba56472daf9ddb4472e03d93977c91c7f2ea47 | [
"Apache-2.0"
] | permissive | https://github.com/ibis-project/ibis | 56a169d75805db7dfd39192cf0562521c405ff1c | 3866492906d731dc170b560e7d7471bd4855169a | refs/heads/master | 2023-09-01T17:07:38.854510 | 2023-09-01T13:52:08 | 2023-09-01T15:32:04 | 34,139,230 | 2,304 | 384 | Apache-2.0 | false | 2023-09-14T21:52:21 | 2015-04-17T20:43:46 | 2023-09-14T08:01:37 | 2023-09-14T21:52:21 | 447,692 | 3,094 | 439 | 91 | Python | false | false | from __future__ import annotations
from typing import TYPE_CHECKING
import sqlalchemy as sa
import sqlalchemy.types as sat
import toolz
from sqlalchemy.ext.compiler import compiles
import ibis.expr.datatypes as dt
from ibis.backends.base.sql.alchemy.geospatial import geospatial_supported
from ibis.common.collections... | UTF-8 | Python | false | false | 9,299 | py | 1,338 | datatypes.py | 1,089 | 0.623078 | 0.60942 | 0 | 319 | 28.15047 | 87 |
jacbeekers/excel2json | 12,378,095,783,515 | ba007e2d971b8ff73b2945fb617b483a06bfa535 | b3daf65781c995b6798033e19db488803f932115 | /excelform2json/utils/check_schema.py | daf76cc6d1ddb523ac242a3b7feaab61ad103bff | [
"MIT"
] | permissive | https://github.com/jacbeekers/excel2json | 1e90cfc26539e1979dce0aa3806f9fc8abe8904a | 393375aefa99545f380df7124d172245e53d3b58 | refs/heads/main | 2023-03-20T07:48:17.599304 | 2021-03-06T19:09:02 | 2021-03-06T19:09:02 | 345,165,468 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
import jsonschema
from lineage_excel2meta_interface.utils import messages
class CheckSchema:
"""
Checks the JSON schema of a given JSON file
"""
code_version = "0.1.0"
def __init__(self):
self.json_file = "not provided"
self.json_data = ""
self.meta_type = "unk... | UTF-8 | Python | false | false | 2,369 | py | 24 | check_schema.py | 7 | 0.572393 | 0.570705 | 0 | 64 | 36.015625 | 85 |
DarioCozzuto/list | 13,305,808,721,585 | c64b4e06735bb715a0b9457e40040f7f34652e16 | 5ef868819ba6bb4ea5dde9a84e6a9fa65b084198 | /type of collection data.py | 93e30c492ac86a19b438918c96529b72e2475e99 | [] | no_license | https://github.com/DarioCozzuto/list | 5ca9c124b00e5731920020effd82ff157405f84a | 8e2846b015ec2e85a4068eed410bca889e4b5f58 | refs/heads/main | 2023-03-07T09:06:58.333157 | 2021-02-21T23:05:00 | 2021-02-21T23:05:00 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #In python there are four collection data types
#List is a collection which is ordered and changeable. Allows duplicate members.
#Tuple is a collection which is ordered and unchangeable. Allows duplicate members.
#Set is a collection which is unordered and unindexed. No duplicate members.
#Dictionary is a collect... | UTF-8 | Python | false | false | 595 | py | 11 | type of collection data.py | 10 | 0.746218 | 0.746218 | 0 | 13 | 43.923077 | 84 |
uriyyo/coding-challenges | 15,908,558,887,625 | cc5c599ed1929a6ecfd62e610006c62aa4801d95 | 00f92127592f423733122a8e4fad4acd037fbceb | /codewars/solutions/python/2 kyu/Regular expression parser/solution.py | 7e99ed01ebfb395673d3c533b67f4df438b0eb88 | [] | no_license | https://github.com/uriyyo/coding-challenges | 8dba7dc7d9ba396b66af72b1fbd0221c67c11b68 | c42de61025003c9b451bcc4ff2bcd1b867ff004e | refs/heads/master | 2020-06-16T18:42:18.607654 | 2020-06-16T07:37:31 | 2020-06-16T07:37:31 | 195,667,266 | 5 | 2 | null | false | 2020-07-17T18:37:45 | 2019-07-07T15:27:02 | 2020-07-17T14:47:32 | 2020-07-17T18:37:44 | 2,893 | 3 | 2 | 0 | Python | false | false | def node(str_method):
return type("Node", (), {'__init__': lambda self, *args: setattr(self, 'args', args), '__str__': str_method})
Normal = node(lambda self: self.args[0])
ZeroOrMore = node(lambda self: f'{self.args[0]}*')
Or = node(lambda self: f'({self.args[0]}|{self.args[1]})')
Any = node(lambda self: ".")
St... | UTF-8 | Python | false | false | 1,645 | py | 1,116 | solution.py | 519 | 0.465046 | 0.459574 | 0 | 67 | 23.567164 | 113 |
pleimann/slack-email-digest | 4,063,039,100,628 | b60b5c033d59096245f5f762c455c7b44d59ec03 | 18ba3372fa1163df76ede8d6e179b6bbcd754cff | /slack_email_digest/HTMLRenderer.py | d861de1766c5b3ed251848cb3ab63560d017b244 | [
"Unlicense"
] | permissive | https://github.com/pleimann/slack-email-digest | 0566623ac575e9a3103f737d42146713f8e057b4 | 6d061aa7c0adaea581c988f24c1bf41b95658449 | refs/heads/master | 2020-05-05T10:49:59.571931 | 2016-08-30T04:22:03 | 2016-08-30T04:22:03 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import datetime
import pprint
import re
import emoji
import jinja2
import pyshorteners
import pytz
from .memoize import memoize1_to_json_file
TEMPLATES = {
'header_text': """\
Slack Digest for {{ date }}{% if parts > 1 %} [Part {{ part + 1 }} of {{ parts }}]{% endif %}\
""",
'full_html': """\
<div style="fo... | UTF-8 | Python | false | false | 15,947 | py | 9 | HTMLRenderer.py | 7 | 0.532626 | 0.525278 | 0 | 417 | 37.184652 | 112 |
lanPN85/ML-Text-Classification | 8,684,423,875,410 | 2421fab7017153b805e5e7f9bafead31762b3073 | 372d105981f2c2d8916136dd9308fa2effcf4ad0 | /models/reuters_[250]/settings.py | dc32f390e931c2c1283c4a28699afb65383731e3 | [] | no_license | https://github.com/lanPN85/ML-Text-Classification | edf3fcc4098f7c9f3b2537e165cde5f15ad1a64d | 13b20badad76843b950bbfdee1c637a0166278c3 | refs/heads/master | 2021-01-22T10:45:51.082193 | 2017-05-14T02:30:41 | 2017-05-14T02:30:41 | 82,030,745 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | LEARNING_RATE = 0.001
N_EPOCH = 200
BATCH_SIZE = 100
VOCABULARY_SIZE = 60000
TITLE_LEN = 30
CONTENT_LEN = 150
TITLE_OUTPUT = 200
CONTENT_OUTPUT = 400
DENSE_NEURONS = [250] # Test values: 250, 500, 1000.
DATASET = 'reuters'
| UTF-8 | Python | false | false | 224 | py | 36 | settings.py | 19 | 0.705357 | 0.53125 | 0 | 10 | 21.4 | 53 |
jerome-f/finemapping-insights | 3,822,520,920,705 | 25b4eff280704508e0cd6f8fc49a03afc6d8dea4 | 2969d8d7f174ff880509d8e2dfd124eec65ee4e7 | /fm_insights/resources/generic.py | c241b2f2f69128b78a3d79f56905955803265bb4 | [] | no_license | https://github.com/jerome-f/finemapping-insights | 5ff9686a0ec61355b0e1ab58eebcee4763bcf0cd | b0608a65a905e1a5c0ea44d1c85204db0fd445f3 | refs/heads/master | 2023-07-16T00:38:17.827171 | 2021-09-06T05:18:43 | 2021-09-06T05:19:58 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | bucket = 'finemapping-insights'
bucket_tmp = 'ukbb-hail-tmp'
POPS = ['BBJ', 'FG', 'UKBB']
| UTF-8 | Python | false | false | 90 | py | 62 | generic.py | 42 | 0.644444 | 0.644444 | 0 | 3 | 29 | 31 |
schmat18/csf | 3,212,635,539,807 | f7496ab81edede3964dfe6618a2af341f4b0dcc7 | 96a10d289e63b4639ba502a6a897b19caa94a851 | /hw1.py | 6d602075f65b6f28cb525fc460545d1abb81b427 | [] | no_license | https://github.com/schmat18/csf | edd29fdad371930069f1f490ab51611b35c5a906 | 6fab072f6af10373ebc50bf4bf155e2599ef048a | refs/heads/master | 2020-03-30T14:57:49.309201 | 2013-12-12T09:57:49 | 2013-12-12T09:57:49 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Name: Matthew schult
# Evergreen Login: schmat18
# Computer Science Foundations
# Programming as a Way of Life
# Homework 1
# You may do your work by editing this file, or by typing code at the
# command line and copying it into the appropriate part of this file when
# you are done. When you are done, running this ... | UTF-8 | Python | false | false | 2,158 | py | 9 | hw1.py | 6 | 0.696015 | 0.677943 | 0 | 77 | 27.038961 | 161 |
personalbrian/self-playing-snake | 10,711,648,467,449 | 51c0f451fe94a893dbf44aefe2a591c821ce2351 | 4cc751e4dc2688af3709c9ed26075f627ea33944 | /venv/Lib/site-packages/pip/_vendor/resolvelib/structs.py | 1ba7793efe6e9ec87425ab582f782c940e80aa98 | [] | no_license | https://github.com/personalbrian/self-playing-snake | 6a485328292d4971636cc4d033839ffc16d7f6ec | db4cf9b88b73c2494c35e599c2c23faaff7a3b73 | refs/heads/main | 2023-04-17T08:11:06.501719 | 2021-05-03T08:06:32 | 2021-05-03T08:06:32 | 362,734,451 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | version https://git-lfs.github.com/spec/v1
oid sha256:835767179488336e9f816d60d3d3a43676e453290b22a11ec78c5add2b0d8b4c
size 4648
| UTF-8 | Python | false | false | 129 | py | 3,892 | structs.py | 3,212 | 0.883721 | 0.472868 | 0 | 3 | 42 | 75 |
hoik92/Algorithm | 15,659,450,775,210 | e8819e5d1a51e2bb1b49e9e3cb44d7f97d743cb5 | ff7e133648566b8a705cb5a214be8a82df5101d9 | /algorithm/work_6/5097_spin.py | aa39d1f87c4584a87d47ce9c9123841c617458b8 | [] | no_license | https://github.com/hoik92/Algorithm | 231433193ecba4a48ef830cab2c5b0115fa7246d | 4085b83a692a211e10503949d4518205d404dcaf | refs/heads/master | 2020-04-27T06:27:06.777255 | 2019-04-18T23:48:30 | 2019-04-18T23:48:30 | 174,108,507 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # import sys
# sys.stdin = open('input5097.txt', 'r')
def isEmpty():
global front, rear
return front == rear
def isFull():
global front, rear, N
return front == (rear + 1) % (N + 1)
def enQueue(i):
global rear, N
if not isFull():
rear = (rear + 1) % (N + 1)
queue[rear] = i
de... | UTF-8 | Python | false | false | 854 | py | 248 | 5097_spin.py | 244 | 0.483607 | 0.461358 | 0 | 41 | 19.853659 | 44 |
amacharla/AirBnB_clone | 188,978,594,988 | e1b1616994ddbaae140683ca39a2f9cec93c9193 | 18c918a2321b5d744767f50592dcc7d0cf9b2c50 | /models/review.py | dc8e26cf34471cb01d131617dcd8d04b2795c540 | [] | no_license | https://github.com/amacharla/AirBnB_clone | fd3aa220a7b0e7b0264fc61d7998816bc3a75d03 | b2c7eb9a8eb9beca88ba7760c120f7e9359844d0 | refs/heads/master | 2021-07-14T02:22:53.536413 | 2017-10-16T07:13:12 | 2017-10-16T07:13:12 | 105,109,925 | 1 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python3
""" Module with `Review` class that inherates from BaseModel """
from models import BaseModel
class Review(BaseModel):
""" Review subclass """
def __init__(self, *args, **kwargs):
""" Init method for `Review` class """
review_attr = {"place_id": "", "user_id": "", "text": ... | UTF-8 | Python | false | false | 468 | py | 27 | review.py | 11 | 0.574786 | 0.57265 | 0 | 17 | 26.529412 | 65 |
sarocu/forecast | 10,960,756,563,265 | 2ec9b68e67d5cab2918700d0a6c67b8e31b4f733 | d11a4c88622424eb6026d8da0bfcba677f27526e | /lib/test_forecast.py | 5ad175d4275197b7cf1847055d3d633dd32ce19e | [] | no_license | https://github.com/sarocu/forecast | 24f190b682e5d2b7996da2a02b670da42507009b | 59a25a83209b4e98dbc9be23118bac35afda77f1 | refs/heads/master | 2021-01-19T02:48:18.184737 | 2016-07-24T23:53:20 | 2016-07-24T23:53:20 | 62,973,818 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from forecast import Forecast
weather = Forecast()
# weather.clean_tmy('../data/golden.csv')
weather.load_tmy('../data/golden_clean.csv')
weather.add_predictor('Dry-bulb (C)').add_predictor('Dew-point (C)')
predictions = weather.auto_regressive(12, 2)
print(predictions)
weather.persist()
| UTF-8 | Python | false | false | 294 | py | 3 | test_forecast.py | 2 | 0.727891 | 0.717687 | 0 | 13 | 21.615385 | 68 |
burhanok/pyimagedata | 14,139,032,367,637 | 3c7350de18dd0999bffd85f7454a3f5247466c6a | fd945519087f965cb13a29ed76c5f9a31fdfb5d0 | /header/aiurls.py | 4e5ba21761d0ab70f2cfb522e3fe659e85e87493 | [] | no_license | https://github.com/burhanok/pyimagedata | 285ac8c9fbe38819aa22864e29eec81280ae313d | f45afedd49c1a0577a4511fb478843d8991100ba | refs/heads/master | 2023-02-07T20:25:08.656799 | 2020-12-25T16:35:49 | 2020-12-25T16:35:49 | 324,395,068 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.urls import path
from . import views
urlpatterns = [
#path("",views.index, name="index"),
path("machinelearning/",views.machinelearning, name="machinelearning"),
path("deeplearning/",views.deeplearning, name="deeplearning"),
path("rflearning/",views.rflearning, name="rflearning"),
path(... | UTF-8 | Python | false | false | 450 | py | 12 | aiurls.py | 10 | 0.72 | 0.72 | 0 | 11 | 39.909091 | 75 |
anandijain/gym-sips | 1,924,145,365,874 | d5bf2b317049743b754937251318917afc5670e6 | 5938753551dbedd3db5908710bec3bc8b8c38389 | /gym_sips/utils.py | 02c1f990ac2e7077582e5004f75cb26f0123ece2 | [] | no_license | https://github.com/anandijain/gym-sips | 3aa14ea9bf62550997e4fff590a6386d747c30ed | 46ff00ed3920ec455fb65bdccf5f5193d545728b | refs/heads/master | 2020-04-23T01:06:58.784374 | 2020-02-23T21:52:46 | 2020-02-23T21:52:46 | 170,803,166 | 0 | 0 | null | false | 2020-02-23T21:52:48 | 2019-02-15T04:45:33 | 2019-11-11T09:23:00 | 2020-02-23T21:52:47 | 169 | 0 | 0 | 0 | Python | false | false | import random
from collections import namedtuple
def act(a):
"""
simple function to easily change the action number into a string
returns string
"""
if a == 0:
return "BOUGHT AWAY"
elif a == 1:
return "BOUGHT HOME"
elif a == 2:
return "SKIP"
else:
return... | UTF-8 | Python | false | false | 1,019 | py | 14 | utils.py | 9 | 0.582924 | 0.578018 | 0 | 42 | 23.261905 | 68 |
egor-bogomolov/optimizations | 10,170,482,590,716 | 116af90f9dec32d510fb75847d77e29a697d3761 | 3b616d8aeaf3589818d87d2706cc18cc8a1cc03d | /hw07/task5.py | 94397e938bbb27b49d4d0f5f6e9873f8538f35ef | [] | no_license | https://github.com/egor-bogomolov/optimizations | a333ec64aa2748e423ad64a4fa587d712423988c | 3517c5839bcadde96b531a428769e51339c7850f | refs/heads/master | 2021-05-07T07:00:14.108134 | 2017-12-02T12:01:25 | 2017-12-02T12:01:25 | 111,784,540 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Задание 7.5
#
# Формат файла:
# n m
# m строк, на i-ой концы i-ого ребра, нумерация с 1
# sigma, n чисел
#
# Пронумеруем ребра числами от 1 до m.
# Запишем требуемое равенство так:
# M * w = sigma
# M -- матрица инцидентности, n строк, m столбцов, M_{i, j} равно 1 если ребро j входит в вершину i, -1 если выходит из
#... | UTF-8 | Python | false | false | 1,434 | py | 12 | task5.py | 11 | 0.586726 | 0.570796 | 0 | 41 | 26.560976 | 119 |
binun/predict | 283,467,875,547 | 1d762fc79d49f05c7410542e2bcd1f858a380127 | 1df0b8f8f85cc2e7e26022716fdecfe0ffdff97e | /predictors/negationPredictor.py | 3eabb4d03c10e1650c62826bdaef7d0939cb3dc5 | [] | no_license | https://github.com/binun/predict | 277eb6a230db37c6b50b29d7d4f3905a4adecfc4 | 4d63706396011e0824fd0bb012e3783b550f4b08 | refs/heads/master | 2020-03-23T16:22:08.894860 | 2018-07-30T13:23:24 | 2018-07-30T13:23:24 | 141,806,365 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
from predictors import Predictor
class negationPredictor(Predictor.Predictor):
def __init__(self, origpred):
nm="neg({0})".format(origpred.name[8:])
dm=origpred.dataManager
hist = origpred.histlen
super().__init__(nm,dm,hist)
self.predictor_=origpred
sel... | UTF-8 | Python | false | false | 1,128 | py | 513 | negationPredictor.py | 32 | 0.632979 | 0.631206 | 0 | 28 | 37.928571 | 97 |
daniel-dondiego/Subject | 12,781,822,680,921 | bc1a0c8b8c5eeb17a27a200804a10f9a83aed0da | 36c4946809f9a1ea5d4adc7e74724d847e1998c6 | /web-server/Modelo/Paises.py | a703f54b9ac1afab8803aec7067d41cfa2cc17c5 | [] | no_license | https://github.com/daniel-dondiego/Subject | 275ba1d7805358c4327baf8e8c64479d39068208 | 7042803e3d54419ed390cc244ecfd5d0bccc9df1 | refs/heads/master | 2021-01-22T07:02:45.754846 | 2015-01-02T05:02:51 | 2015-01-02T05:02:51 | 26,295,343 | 0 | 0 | null | false | 2014-11-13T02:49:48 | 2014-11-06T23:42:44 | 2014-11-11T04:18:33 | 2014-11-12T23:54:20 | 0 | 0 | 2 | 1 | Python | null | null | #Clase que abstrae la informacion de un pais
class Pais(object):
def __init__(self,id,pais,nacionalidad):
'''
Inicializa una instancia de tipo pais.
id: el id del pais en la base de datos
pais: el nombre del pais
nacionalidad: gentilicio de las personas que pertenecen al pais
'''
self.id = id
self.__p... | UTF-8 | Python | false | false | 782 | py | 47 | Paises.py | 25 | 0.675192 | 0.675192 | 0 | 34 | 22 | 65 |
Koliuchiy/myproject | 11,390,253,286,741 | 832285a4ea926f0687d57011d41a05c163a8a227 | 355cc6deca1e19b8a52d208c3b0c8cc3d16e669c | /cart/cart.py | f9bbd74072b80ec1c0402f2fc91aadae0dca7a06 | [] | no_license | https://github.com/Koliuchiy/myproject | 2c2689d5bdd4b79b56e4d59aa126f20aa63dda5a | 1b8d1afafd6d88e0fa2b69bb0c915f8093214869 | refs/heads/master | 2021-01-20T02:04:16.926787 | 2017-05-02T14:13:10 | 2017-05-02T14:13:10 | 89,334,275 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from decimal import Decimal
from django.conf import settings
from shop.models import Article
class Cart(object):
def __init__(self, request):
"""Initialize the cart."""
self.session = request.session
cart = self.session.get(settings.CART_SESSION_ID)
if not cart:
# save... | UTF-8 | Python | false | false | 2,407 | py | 15 | cart.py | 8 | 0.594516 | 0.592023 | 0 | 66 | 35.469697 | 92 |
space-concordia-robotics/robotics-rover | 15,728,170,273,343 | 3240329cd83868a005d80ef0f10d9a88e0a5bdec | 7d81a0a1bed8b1905df709d3cc23553090c6afe6 | /roboticsrov/camera/video_stream.py | 57220a8b84fb65947e1423a5cc8a0459b13a55df | [] | no_license | https://github.com/space-concordia-robotics/robotics-rover | f316839c7ee389364a82e10cb077b87a977886d8 | 5dc616d7aea157f073b893b3d60637ea03c45281 | refs/heads/master | 2021-01-18T13:35:56.137022 | 2016-11-18T20:01:09 | 2016-11-18T20:01:09 | 35,299,274 | 1 | 0 | null | false | 2017-01-27T20:13:21 | 2015-05-08T20:02:54 | 2016-11-18T20:01:10 | 2017-01-27T20:13:08 | 261 | 1 | 0 | 10 | C++ | null | null | import subprocess
from camera_constants import *
class VideoStream:
"""
Video stream that is broadcast on the network on a specified port, using the program mjpg_streamer
Once the stream is up, this can be accessed over http (as an MJPEG) at http://[rover host]:[port]/?action=stream
"""
def __... | UTF-8 | Python | false | false | 1,695 | py | 19 | video_stream.py | 15 | 0.551032 | 0.549853 | 0 | 48 | 34.3125 | 164 |
MuhammadNsearaty/profile-rest-api | 6,176,163,015,649 | 1ed3b5f1a63a1eed23f1825830713f4573624cdc | cfe87bb00d3a1326909266fc5232bf4bf2046ad7 | /planning_app/urls.py | 5e36aa192e1bdb379a3da82774942869f284104d | [
"MIT"
] | permissive | https://github.com/MuhammadNsearaty/profile-rest-api | 0b2b32749de52fd0aa00d6aef9904cc02b455c36 | d44e73551f095c7a149915d3418fb6c3fd14c9e2 | refs/heads/B1 | 2023-07-29T20:18:14.511460 | 2021-09-17T12:42:35 | 2021-09-17T12:42:35 | 343,479,472 | 1 | 2 | MIT | false | 2021-08-13T18:20:25 | 2021-03-01T16:19:00 | 2021-08-13T18:11:06 | 2021-08-13T18:20:24 | 13,022 | 0 | 0 | 0 | Jupyter Notebook | false | false | from rest_framework.routers import DefaultRouter
from planning_app import views
router = DefaultRouter()
# router.register('hotel', views.HotelViewSet, basename='hotels')
# router.register('place', views.PlaceViewSet, basename='places')
router.register('hotels-db', views.HotelDbViewSet, basename='hotels')
router.reg... | UTF-8 | Python | false | false | 529 | py | 71 | urls.py | 44 | 0.78828 | 0.78828 | 0 | 12 | 43.083333 | 86 |
xiaotuzixuedaima/PythonProgramDucat | 19,267,223,293,212 | 7ee331d5cc031c8985dbb23eab1b575f7e082332 | 4acc08d2c165b5d88119df6bb4081bcfaca684f7 | /PythonPrograms/python_program/multiple_dict_item.py | 93f2c60f524b6e1468459571ce4c2215c7b1b064 | [] | no_license | https://github.com/xiaotuzixuedaima/PythonProgramDucat | 9059648f070db7304f9aaa45657c8d3df75f3cc2 | 90c6947e6dfa8ebb6c8758735960379a81d88ae3 | refs/heads/master | 2022-01-16T04:13:17.849130 | 2019-02-22T15:43:18 | 2019-02-22T15:43:18 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #118. multiply all the items in dictionary.??
d={'A':10,'B':10,'C':239}
total =1
for i in d:
total =total *d[i]
print(total)
| UTF-8 | Python | false | false | 131 | py | 543 | multiple_dict_item.py | 537 | 0.610687 | 0.526718 | 0 | 7 | 17.714286 | 46 |
clivejan/python_basic | 2,929,167,708,204 | 56f9ecabe1a4e837adf8c1f9a04b89521d45dbd2 | e017eca53dbe0d35977546df1bb36a59915f6899 | /regular_expressions/dot_star_nongreedy_mode.py | 63dc4b5cb005d6041933f6f2e32e9c6f2816283f | [] | no_license | https://github.com/clivejan/python_basic | 7d14b7335f253658f8814acbdb753a735481e377 | 773de644a87792b872e38017dcac34c1691ccc87 | refs/heads/master | 2020-12-04T17:44:24.737370 | 2020-01-09T14:43:36 | 2020-01-18T03:11:20 | 231,856,419 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import re
non_greedy_regex = re.compile(r'<.*?>')
print(non_greedy_regex.search('<To servve man> for dinner.>').group())
greedy_regex = re.compile(r'<.*>')
print(greedy_regex.search('<To servve man> for dinner.>').group())
| UTF-8 | Python | false | false | 225 | py | 70 | dot_star_nongreedy_mode.py | 69 | 0.666667 | 0.666667 | 0 | 7 | 31.142857 | 70 |
google/EarlGrey | 19,688,130,095,389 | 2f094bffc1c6b7bd3314655827ef11c1797a0923 | e025360a687164f9a6b2a69caefe8d905ad8c30a | /Scripts/rename-ochamcrestIOS.py | 997a2abed976c281fe3194be185cfa4a1637e1db | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | https://github.com/google/EarlGrey | 7a0602cacd1f7d7da9614cc31618b730b071daf8 | c3732d1bcfa6ed7d25f0e091a7571d4bf604379c | refs/heads/master | 2023-08-28T16:28:01.519826 | 2021-08-31T18:16:06 | 2021-08-31T18:16:06 | 51,094,210 | 6,034 | 939 | Apache-2.0 | false | 2023-09-09T20:16:52 | 2016-02-04T17:55:29 | 2023-09-07T07:38:10 | 2023-09-09T20:16:51 | 48,264 | 5,540 | 772 | 228 | Objective-C | false | false | #!/usr/bin/python
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | UTF-8 | Python | false | false | 4,166 | py | 387 | rename-ochamcrestIOS.py | 10 | 0.721315 | 0.718435 | 0 | 109 | 37.220183 | 78 |
w341000/PythonTheWord | 15,487,652,074,368 | 7e2593013ac25d0cd80e42c5e4413348514f3c89 | 9c2a906b8bc2fbeb4fa5b98b68753a8beb0b7c4f | /capt_crack_densenet/realdata.py | 61ea344ab85611b044265795c908fd6aeb14af33 | [] | no_license | https://github.com/w341000/PythonTheWord | 702c7670195b4b1c886198bdc0b388a489b26fe1 | 3150c10b2d8f54a2b42c9baa7fd2aa1caed6235f | refs/heads/master | 2020-03-11T18:08:11.650318 | 2019-11-26T01:44:47 | 2019-11-26T01:44:47 | 130,168,239 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from io import BytesIO
import numpy as np
from PIL import Image,ImageFilter
from capt_crack_densenet.cfg import IMAGE_HEIGHT, IMAGE_WIDTH
woker_number=5
save_path='./pics'
payload = {'callback': 'jQuery110205660534614759527_1508391681367',
'fpdm': '1100172320',
'r':'0.1375104796068471',
'_':'None'}
clolr_map={'00':'... | UTF-8 | Python | false | false | 2,429 | py | 79 | realdata.py | 78 | 0.562783 | 0.506793 | 0 | 75 | 31.333333 | 130 |
mvargas33/CC5401-Tablero-digital | 15,831,249,492,663 | cd28460f7546f1770d4aa607bffb9715110539a5 | db9ba481dc81dd568ef52bd89d7b3f395bd8d692 | /app/migrations/0005_auto_20191204_1006.py | 58dd98cd1c9a9fb83acee56f3f5652fda88b3705 | [] | no_license | https://github.com/mvargas33/CC5401-Tablero-digital | 2659e5d3d55b183ca7ad81196ed868abbebd0c21 | f459add856640123e3604f4dba899255156bbf33 | refs/heads/master | 2022-11-30T04:39:25.265669 | 2020-04-22T18:12:19 | 2020-04-22T18:12:19 | 287,434,465 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 2.2.6 on 2019-12-04 13:06
from django.conf import settings
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('app', '0004_auto_20191117_1853'),
]
operations = [
... | UTF-8 | Python | false | false | 449 | py | 41 | 0005_auto_20191204_1006.py | 20 | 0.625835 | 0.556793 | 0 | 19 | 22.631579 | 66 |
fogleman/Carolina | 1,382,979,514,643 | d58e4876c6cb3a5a1b00f693fab663636ab853dd | cc7cbea13eebc004f22d771be0b0ab7d105ba982 | /generate.py | 5964524b0faf2fe72f01d64bcff328c6651451e1 | [] | no_license | https://github.com/fogleman/Carolina | 1b1b42921b11227822fc89c2ec8a903adcdeb8ad | 0c77536353f28140beaa66ab0fc82da1310e76c0 | refs/heads/master | 2016-09-06T14:38:03.212812 | 2015-12-22T18:42:19 | 2015-12-22T18:42:19 | 36,829,244 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from counties import COUNTIES
from gcode import GCode, pack_gcodes
from math import radians, asinh, tan, sin, cos
from operator import attrgetter
from shapely.geometry import Polygon
from shapely.affinity import translate
import shapefile
SHAPEFILE = 'shapefiles/cb_2013_us_county_5m/cb_2013_us_county_5m.shp'
SCALE = 5... | UTF-8 | Python | false | false | 6,284 | py | 152 | generate.py | 24 | 0.53676 | 0.485041 | 0 | 214 | 28.364486 | 75 |
hdjsjyl/machine_learning_interview | 2,035,814,521,238 | a508e5122fdb6dda26cb7c3ec769d33a5ce79f6e | 36a7fb6642349e4b52776605739e81c0d4fcdca6 | /regularization.py | 9a44ecd8a6b57ad65ad7f9865f6f46180db9d037 | [] | no_license | https://github.com/hdjsjyl/machine_learning_interview | b99ceda7a548cd46af8b0759d00d349a57fde847 | ea6ea02f23f27afceb0caea17a43e994c68e8901 | refs/heads/master | 2022-08-05T10:11:47.704856 | 2020-05-27T05:21:43 | 2020-05-27T05:21:43 | 267,227,419 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import sklearn
import sklearn.datasets
import scipy.io
def get_case_data(number=200):
np.random.seed(6)
x, y = sklearn.datasets.make_moons(number, noise=0.3)
return x, y
def sigmoid(z):
return 1/(1+np.exp(-z))
def model(x, w1, w2, b):
# print(x.s... | UTF-8 | Python | false | false | 2,331 | py | 37 | regularization.py | 36 | 0.513943 | 0.472758 | 0 | 82 | 27.439024 | 124 |
boxter007/boxter007.github.io | 2,164,663,551,882 | 8ab0ba319528ac91777fe5e793d313bc248db685 | 6f3246b73f76805e3161b690ad8498d9050ca311 | /Bingle/compiler.py | 42801e410e3de38e9c889f71a7792fdd424338b0 | [] | no_license | https://github.com/boxter007/boxter007.github.io | 8878e79a9716d873fe3b55fd8602917b4dacf257 | 3b3546e3b1c43a2806670032147835918345cd4e | refs/heads/master | 2022-12-11T14:21:18.831200 | 2019-07-02T04:48:42 | 2019-07-02T04:48:42 | 194,791,868 | 1 | 0 | null | false | 2022-12-08T00:02:41 | 2019-07-02T05:08:39 | 2021-06-10T07:44:01 | 2022-12-08T00:02:41 | 45,989 | 1 | 0 | 3 | JavaScript | false | false | import os, sys, subprocess, tempfile, time
from BackGround import models
import logging
import time
log = logging.getLogger("collect")
class compiler:
code = ""
codetype = "c"
stdin = ""
stdout = ""
user = 0
issue = 0
runtime = 0
def __init__(self,ctype,c,s,i,u):
self.code = c
... | UTF-8 | Python | false | false | 12,414 | py | 243 | compiler.py | 153 | 0.518552 | 0.507601 | 0 | 255 | 46.988235 | 197 |
cocobear/LeetCode_in_Python | 14,267,881,391,326 | 36743880a90b6e46ee7dd937b815396f9d5ab71a | dd84b4d63ac68fd17b88ee9f221a6ec4921af05d | /solutions/0136.single-number/single-number.py | 14f76ed07ca6b23093d3352f8f11c631dab43dce | [
"MIT"
] | permissive | https://github.com/cocobear/LeetCode_in_Python | bf56b5f003c469d64f76643564a2eeca421833da | b4ecd5cb7122467ee479f38497faaabb17e6025e | refs/heads/master | 2021-07-17T05:44:26.129992 | 2021-01-28T12:21:49 | 2021-01-28T12:21:49 | 232,519,839 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #
# @lc app=leetcode id=136 lang=python3
#
# [136] Single Number
#
from __future__ import annotations
# @lc code=start
class Solution:
def singleNumber(self, nums: List[int]) -> int:
res = nums[0]
for i in nums[1:]:
res ^= i
return res
tests = [
([2,2,1], 1),
... | UTF-8 | Python | false | false | 370 | py | 94 | single-number.py | 87 | 0.497297 | 0.445946 | 0 | 21 | 16.571429 | 51 |
OneDayMac/OneDayMac.github.io | 7,447,473,328,779 | 25945ab24b7e6222129e4f7ba7cf23c0e620e302 | 3f2cced782afe3018899f9868260a4b0028cace6 | /update_readme.py | daf90482d130e79190f18c2bac995e6b8d817d39 | [] | no_license | https://github.com/OneDayMac/OneDayMac.github.io | 32babcf0e71c6f83bd19016edbdaeb09cf14b126 | bade9207703721b9cde7432a95477bb8b753a974 | refs/heads/master | 2020-12-27T13:25:11.717375 | 2020-02-28T10:31:25 | 2020-02-28T10:31:25 | 237,917,781 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import fileinput
import re
import sys
fn = "index.md"
regex = r"https:\/\/github\.com\/OneDayMac\/OneDayMac\.github\.io\S+\.tar\.gz"
new_content = sys.argv[-1]
f = open(fn, 'r')
old_content = f.read()
f.close()
output = re.sub(regex, "%s](%s" % (new_content, new_content), old_content)
f = open(fn, 'w')
f.write(outpu... | UTF-8 | Python | false | false | 333 | py | 3 | update_readme.py | 1 | 0.642643 | 0.63964 | 0 | 16 | 19.8125 | 78 |
Yullissa/oj | 18,554,258,743,907 | 9ae0e70214545e0482d5c64ccde69a29d8fd3a9e | 0f0b91b27ea57cfbc58dee21e8aaabd7f10f60d7 | /6.15-6.28/6.28星际穿越.py | 16dcc2e687921e06923f8d0b6ff377c64f1fa1b8 | [] | no_license | https://github.com/Yullissa/oj | 64573d41d6ced8f2dc58012e239257573c520e60 | 09b1daab87b3c4c4375e839d2ccb53b89c3b2ae2 | refs/heads/master | 2020-03-21T05:48:06.579600 | 2018-10-21T06:53:44 | 2018-10-21T06:53:44 | 138,147,083 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import traceback
import math
try:
n = int(input())
if n ==1:
print(0)
else:
for i in range(int(math.sqrt(n)), 0,-1):
if i * i + i <= n:
print(i)
break
except:
traceback.print_exc()
pass
| UTF-8 | Python | false | false | 268 | py | 84 | 6.28星际穿越.py | 83 | 0.447761 | 0.432836 | 0 | 16 | 15.75 | 48 |
iABC2XYZ/abc | 17,901,423,724,023 | 9385af7f1f10337208f60f51f7e1473beddae407 | 67be8d282abd8d7abb92f8227a09cb636f4e4cad | /DM_RFGAP/RFCal.py | 050e6e9390b75842a1a76a359fbb71d304b42320 | [] | no_license | https://github.com/iABC2XYZ/abc | 3b6b1e9fc7c9a472aa6fc8c0bb71188061fb89e0 | 13386cf2079113127a6f44d53beb9153b252fe9a | refs/heads/master | 2020-12-30T11:03:07.611408 | 2017-12-04T04:42:01 | 2017-12-04T04:42:01 | 98,806,854 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Fri Jul 28 17:14:30 2017
@author: A
"""
from ConstPhysics import *
import tensorflow as tf
def CalWavelength(freqMHz):
return tf.div(cLight,freqMHz*1.e6)
| UTF-8 | Python | false | false | 225 | py | 19,148 | RFCal.py | 206 | 0.675556 | 0.604444 | 0 | 13 | 16.153846 | 38 |
gohackfelipe/luiza | 13,348,758,378,612 | bb1e973a8ef7e22ba3dfb545fd0c5bdbb3e6fc9d | 4dbc74a6cd2681e5ddd81beb4ba260108653e680 | /receiver.py | f75e4687d683286f161c0ca219b24f5c40ffd6c3 | [
"MIT"
] | permissive | https://github.com/gohackfelipe/luiza | 6a1d5db7ecb82666f2d3d163012f2a45bd1dfb4c | 503451134b99bb6f331ce3eea9f67a11353aaa26 | refs/heads/master | 2018-02-06T15:35:15.876787 | 2017-07-03T21:18:44 | 2017-07-03T21:18:44 | 95,606,855 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import time
import serial
import config
import util
import sys
import sender
port = serial.Serial()
port.port = config._serial['port']
port.baudrate = config._serial['baudrate']
port.bytesize = config._serial['bytesize']
port.parity = config._serial['parity']
port.stopbits = config._serial['stopbits']
port.xonxoff = ... | UTF-8 | Python | false | false | 1,321 | py | 5 | receiver.py | 5 | 0.588191 | 0.573808 | 0 | 46 | 27.73913 | 65 |
Saif807380/Form-Data-Extractor | 13,924,283,988,987 | 1310f5b6a8cd5a52cd4691a6f310be840b539042 | c1e70416e51d6b592147887a151bf71f3720f815 | /ResumeParser/field_extraction.py | da252de89a6607d2d2bb524139b81b528e6ad8b9 | [] | no_license | https://github.com/Saif807380/Form-Data-Extractor | 2ff366a4369a492d8c542841609baccc0d3e7b7e | 0fa44ce0b489b2c4d768b538614e7ccdc0b9a7b7 | refs/heads/master | 2022-09-14T09:53:21.277096 | 2020-05-31T07:34:13 | 2020-05-31T07:34:13 | 246,602,707 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import logging
from gensim.utils import simple_preprocess
from ResumeParser.lib import *
def candidate_name_extractor(input_string, nlp):
doc = nlp(input_string)
doc_entities = doc.ents
doc_persons = filter(lambda x: x.label_ == 'PERSON', doc_entities)
doc_persons = filter(lambda x: len(x.text.strip().... | UTF-8 | Python | false | false | 1,797 | py | 17 | field_extraction.py | 10 | 0.64719 | 0.642738 | 0 | 44 | 39.840909 | 119 |
allenalvin333/Hackerrank_Python | 15,504,831,978,737 | 7b21e7af1d30630dc0464b1f2f9c4fc2380b2f8d | 8bec345535bb48386669abaeb3ff2ce87450b257 | /Itertools_06.py | 3f0edc0ec1b72b327ddaa2f7a76b937a734d3058 | [
"MIT"
] | permissive | https://github.com/allenalvin333/Hackerrank_Python | c3c362258160d56a2eb828246a36470b9ace9b33 | c5328d265470d4d72f5f5b45961ebceccacc5d5f | refs/heads/master | 2023-07-11T22:57:35.364254 | 2022-11-21T03:53:09 | 2022-11-21T03:53:09 | 288,521,910 | 0 | 0 | MIT | false | 2021-08-06T02:18:42 | 2020-08-18T17:34:52 | 2021-08-04T01:29:20 | 2021-08-06T02:14:38 | 12 | 0 | 0 | 0 | Python | false | false | # https://www.hackerrank.com/challenges/iterables-and-iterators/problem
from itertools import combinations
_, s = int(input()), list(combinations(input().split(), int(input())))
print(len([z for z in s if("a" in z)])/len(s)) | UTF-8 | Python | false | false | 227 | py | 77 | Itertools_06.py | 76 | 0.700441 | 0.700441 | 0 | 6 | 37 | 71 |
Saborage/LowVoltageTool | 3,444,563,823,120 | 7944969167f1bd680c9655396e7b14ac904a5d54 | 63d3b61d3cc502e4d990b25d0ffc0f9d50e5ce35 | /app/wxviews/panels/__init__.py | e17684bf96378dad501613cc2f4278fd42ccbdd3 | [] | no_license | https://github.com/Saborage/LowVoltageTool | aac40cdcfbea2105f10b64964e285c2dce175150 | efd1c1d958d7c8a29904f1b737272cbc3c072b6a | refs/heads/master | 2022-06-26T00:28:06.404954 | 2018-02-06T13:00:47 | 2018-02-06T13:00:47 | 120,452,963 | 1 | 0 | null | false | 2022-06-21T21:16:50 | 2018-02-06T12:28:50 | 2019-12-16T01:57:00 | 2022-06-21T21:16:49 | 3,046 | 1 | 0 | 4 | Tcl | false | false | import wx
from app.wxviews.core.engine import Engine
import wx.lib.floatcanvas.FloatCanvas as FC | UTF-8 | Python | false | false | 96 | py | 36 | __init__.py | 29 | 0.84375 | 0.84375 | 0 | 3 | 31.333333 | 43 |
jacobmee/Eastworld | 6,382,321,420,352 | bf9f239e36dd02a6bf022caf0e232a5f4bcff6b0 | 510b9f9794a0c1b5d821c1e5fd26e6c944e2d198 | /Actions/RaspCarUltrasonicScan.py | ebe1065373afab1b424363f47a551d384a930322 | [] | no_license | https://github.com/jacobmee/Eastworld | d4243f23b9d32c6b5e3843a4aaa5bc1329c99198 | bdd14d3b1512fc5bccf1dfbe64fbf7993e8c0528 | refs/heads/master | 2022-02-10T06:19:09.687879 | 2022-02-02T02:11:48 | 2022-02-02T02:11:48 | 77,199,637 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import time
import threading
import Queue
import math
import RPi.GPIO as GPIO
import logging.config
from Actions.Action import Action
from Actions.RaspCarMovement import *
class RaspUltrasonicScan(Action, threading.Thread):
# HC-SR04, the farest it can get is 4.5m. Pin03 (GPIO02) for "Trig" and Pin05 (GPIO03) fo... | UTF-8 | Python | false | false | 3,622 | py | 31 | RaspCarUltrasonicScan.py | 28 | 0.537548 | 0.508007 | 0 | 120 | 29.191667 | 107 |
seungchan-mok/solvedPS | 16,174,846,883,829 | eaafd3fb395aae723aaa5832e5b2ec7de3c565bd | 770f2a2121c44586b393f0e3de37d069c7a412f0 | /boj_11004.py | 08a29be469259c20a06d9250998f90eb6f6f5f18 | [] | no_license | https://github.com/seungchan-mok/solvedPS | dae18a712d7e59abcacd17dcac880f928dc3d500 | f34a5e12504868f52bf54904b4c57860c65541f5 | refs/heads/main | 2023-06-30T11:29:15.685219 | 2021-07-25T10:40:19 | 2021-07-25T10:40:19 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | n,k = map(int,input().split())
s = list(map(int,input().split()))
s.sort()
print(s[k-1])
| UTF-8 | Python | false | false | 89 | py | 51 | boj_11004.py | 50 | 0.58427 | 0.573034 | 0 | 4 | 21.25 | 34 |
andrewzrant/tql-Python | 8,899,172,246,377 | 639fd714c76f43b4e0e347b9fc363fb14907324c | 59a1bf4b4fd294595be5d5793e608cc6631285a9 | /tql/algo_ml/eda/SimpleEDA.py | 928c3e11042eb1bdb5bd62d7122ec02ae50ec662 | [
"Apache-2.0"
] | permissive | https://github.com/andrewzrant/tql-Python | 1249cfd600c4a04f839334c55fcb5c840907f910 | 0bcf95f0de0506cf8c2f429ead569d16c5a85846 | refs/heads/master | 2020-06-10T18:57:37.888882 | 2019-06-24T10:10:59 | 2019-06-24T10:10:59 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__title__ = 'SimpleEDA'
__author__ = 'JieYuan'
__mtime__ = '2019-04-22'
"""
import pandas as pd
from utils import cprint
class SimpleEDA(object):
"""
1. 缺失值
2. 方差/去重类别数/确定类别特征
"""
def __init__(self, df: pd.DataFrame, exclude=None):
self.d... | UTF-8 | Python | false | false | 1,017 | py | 51 | SimpleEDA.py | 45 | 0.556477 | 0.526425 | 0 | 37 | 25.081081 | 87 |
Jionee/Programmers | 5,652,177,001,905 | ad59f8521a1afe1b153e3a2998fb4ce58b98a891 | 714f03fa7f36cee750d08984b365567c51cf7e22 | /Boj/1920.py | 71c7e6711db0746224c489fc156bb60423c564b7 | [] | no_license | https://github.com/Jionee/Programmers | f301b964e22c8f6f4d84a182d8345a63c0ade6e0 | 291e9f77b462c9482d6781927e495ec865283faa | refs/heads/master | 2023-03-13T18:00:20.526220 | 2022-06-16T10:22:00 | 2022-06-16T10:22:00 | 329,168,518 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
def input():
return sys.stdin.readline().rstrip()
N = int(input())
A = set(list(map(int,input().split(" "))))
M = int(input())
num = list(map(int,input().split(" ")))
#print(A,num)
for n in num:
if n in A:
print(1)
else:
print(0)
| UTF-8 | Python | false | false | 272 | py | 273 | 1920.py | 239 | 0.551471 | 0.544118 | 0 | 16 | 16 | 42 |
DaHuO/Supergraph | 18,811,956,789,335 | 03925d1072342595c24697fb57864a507b61c268 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_2_neat/16_0_2_davidhao3300_pancake.py | edb5b3e57664e7841ebd992a81aac04e0b322714 | [] | no_license | https://github.com/DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | false | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | 2019-02-21T15:42:08 | 2021-03-19T21:55:45 | 38,414 | 0 | 0 | 2 | Python | false | false | with open('pancake.in') as f:
data = f.read().split('\n')
with open('pancake.out', 'w') as f:
for i in range(1, len(data)):
row = data[i]
count = 0
is_plus = True
for c in reversed(row):
if c == '-' and is_plus:
is_plus = False
count += 1
elif c == '+' and not is_plus:
is_plus = True
co... | UTF-8 | Python | false | false | 373 | py | 30,073 | 16_0_2_davidhao3300_pancake.py | 16,513 | 0.541555 | 0.530831 | 0 | 16 | 22.375 | 44 |
Gabrielsuncin/webcrawler-noticias | 9,972,914,083,386 | 548ad3891aca7766a526960983dfc2874aa0f364 | 286610a1b5205d0fbc3630c195fd24cb698ed14d | /noticias/models.py | ccad7859efa23981f4ee1b8249b94cbd8f7a0e14 | [] | no_license | https://github.com/Gabrielsuncin/webcrawler-noticias | 9da52bb3451c5da5bc07c4ed957f418255a92899 | 5e92dbcd047ac8161aaaf3d54f2d681902f655a1 | refs/heads/main | 2023-04-11T20:16:52.721718 | 2021-05-18T21:14:46 | 2021-05-18T21:14:46 | 304,403,221 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db import models
class Jornal(models.Model):
nome = models.CharField(max_length=255, null=False)
slug = models.SlugField()
class Noticia(models.Model):
titulo = models.CharField(max_length=500, null=False)
link = models.URLField()
descricao = models.TextField()
imagem = models.UR... | UTF-8 | Python | false | false | 484 | py | 14 | models.py | 10 | 0.690083 | 0.671488 | 0 | 18 | 25.888889 | 57 |
neoinmatrix/neocode | 5,763,846,158,073 | a0289b7240f5b9d13912e0e646d939aa7797a95e | 2090d2aeb5cc5db1299c346cdde4ee08f323324c | /ml/20170531mr/over/0605trying.py | d862012e0c7a2b4d1dbdbe38057325741e0ebbe8 | [] | no_license | https://github.com/neoinmatrix/neocode | a66eda52e4918350b7cf6f672f19d0a299927386 | 0da5c2ed6cc2be585d84726b9a3da43c2b16740d | refs/heads/master | 2021-01-19T13:18:16.095195 | 2018-03-12T02:31:38 | 2018-03-12T02:31:38 | 82,374,716 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # coding=utf-8
import dataset
import datadeal
import datadraw
import numpy as np
from sklearn.model_selection import KFold
from sklearn.neural_network import MLPClassifier
from sklearn.svm import SVC
from sklearn import metrics
import matplotlib.pyplot as plt
# this is demo about 1.how to get data 2.how test model
d... | UTF-8 | Python | false | false | 4,690 | py | 210 | 0605trying.py | 176 | 0.59339 | 0.552665 | 0 | 159 | 28.503145 | 76 |
karthikpappu/pyc_source | 9,225,589,764,588 | 80d0cd31b58b361a11a203296d550ef6027088cd | 91fa095f423a3bf47eba7178a355aab3ca22cf7f | /pycfiles/smarty-0.3.3-py3.3/cmd_line_parser.cpython-33.py | bf6892e0e09c30d53068bb8f85d1898dbe6dce4c | [] | no_license | https://github.com/karthikpappu/pyc_source | 0ff4d03e6d7f88c1aca7263cc294d3fa17145c9f | 739e7e73180f2c3da5fd25bd1304a3fecfff8d6e | refs/heads/master | 2023-02-04T11:27:19.098827 | 2020-12-27T04:51:17 | 2020-12-27T04:51:17 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # uncompyle6 version 3.7.4
# Python bytecode 3.3 (3230)
# Decompiled from: Python 3.6.9 (default, Apr 18 2020, 01:56:04)
# [GCC 8.4.0]
# Embedded file name: build/bdist.linux-x86_64/egg/smarty/cmd_line_parser.py
# Compiled at: 2014-01-17 04:54:24
# Size of source mod 2**32: 1094 bytes
import argparse, os
parser = argp... | UTF-8 | Python | false | false | 1,331 | py | 114,545 | cmd_line_parser.cpython-33.py | 111,506 | 0.711495 | 0.666416 | 0 | 19 | 69.105263 | 164 |
AlexanderGroeger/KappaCraft | 11,931,419,171,975 | f3e9516e3991e0c67e2b083b0079bcfd725d4311 | 672c538f8dcafb58891b06401f000bd9de86f8d9 | /Loot/loot_api.py | e8a8d1fc5148fe9b030bff07bd4c6f005c21f8f4 | [] | no_license | https://github.com/AlexanderGroeger/KappaCraft | 271c2ac883eac3515ac40e69c2e693703a36fcd0 | 1c563b31fd31d1c72f940bdd1600fcca0e34be79 | refs/heads/master | 2023-03-14T16:44:15.099455 | 2021-03-10T19:59:02 | 2021-03-10T19:59:02 | 264,510,986 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
def Save(data,name):
with open(name, 'w') as fp:
json.dump(data, fp, indent=4)
def NewTable(pools = []):
return {"pools": pools}
def NewPool(rolls = 1,bonusRolls = 1, conditions = [], entries = []):
pool = {
"rolls": rolls,
"bonus_rolls": bonusRolls,
"entries":... | UTF-8 | Python | false | false | 2,978 | py | 45 | loot_api.py | 30 | 0.523506 | 0.518133 | 0 | 93 | 31.021505 | 162 |
chenlei65368/algorithm004-05 | 1,142,461,330,170 | 7b84f12cc3bc09dccf96722948ba189c756846c1 | 9c3bb98eb9d0a587a302bdfa811f7b5c6a5a0a37 | /Week 7/id_510/bit/Leetcode_51_510.py | f4bd0a03a7450f360cc0b67a748a5b55ae089807 | [] | permissive | https://github.com/chenlei65368/algorithm004-05 | 842db9d9017556656aef0eeb6611eec3991f6c90 | 60e9ef1051a1d0441ab1c5484a51ab77a306bf5b | refs/heads/master | 2020-08-07T23:09:30.548805 | 2019-12-17T10:48:22 | 2019-12-17T10:48:22 | 213,617,423 | 1 | 0 | Apache-2.0 | true | 2019-12-17T10:48:24 | 2019-10-08T10:50:41 | 2019-12-08T14:22:35 | 2019-12-17T10:48:23 | 72,897 | 1 | 0 | 0 | Java | false | false | """
n 皇后问题研究的是如何将 n 个皇后放置在 n×n 的棋盘上,并且使皇后彼此之间不能相互攻击。
上图为 8 皇后问题的一种解法。
给定一个整数 n,返回所有不同的 n 皇后问题的解决方案。
每一种解法包含一个明确的 n 皇后问题的棋子放置方案,该方案中 'Q' 和 '.' 分别代表了皇后和空位。
示例:
输入: 4
输出: [
[".Q..", // 解法 1
"...Q",
"Q...",
"..Q."],
["..Q.", // 解法 2
"Q...",
"...Q",
".Q.."]
]
解释: 4 皇后问题存在两个不同的解法。
来源:力扣(LeetCode)
链接... | UTF-8 | Python | false | false | 2,056 | py | 2,256 | Leetcode_51_510.py | 2,024 | 0.510013 | 0.491322 | 0 | 62 | 23.177419 | 118 |
AlbertTLChen/PythonMinecraft | 16,114,717,306,336 | 7915a7e16078293dfe100f0c5e996ca8f07195ba | e885cebb12ff3faee9b2c8d4dd81351bf7cbaf55 | /2-1.py | 7dafa2d3ed7c0e2c64870dea1cdbe8e239834dac | [] | no_license | https://github.com/AlbertTLChen/PythonMinecraft | 885d34fa13893629382004be81820e9a88b70dd3 | 26f57a47e1e9bef9128a1a6ab010cf4f35e68759 | refs/heads/main | 2023-02-22T06:43:57.886109 | 2021-01-26T08:14:49 | 2021-01-26T08:14:49 | 333,015,617 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from mcpi.minecraft import Minecraft
mc= Minecraft.create()
x,y,z= mc.player.getTilePos()
mc.setBlock(x,y,z+1,103)
mc.setBlock(x,y,z-1,103)
mc.setBlock(x-1,y,z,103)
mc.setBlock(x+1,y,z,103)
mc.setBlock(x+1,y,z+1,103)
mc.setBlock(x-1,y,z+1,103)
mc.setBlock(x-1,y,z+1,103)
mc.setBlock(x+1,y,z-1,103)
mc.setBlo... | UTF-8 | Python | false | false | 337 | py | 8 | 2-1.py | 8 | 0.676558 | 0.554896 | 0 | 13 | 24.076923 | 36 |
BirajKhanal/EasyAuction | 14,267,881,390,570 | c525b8a9985bc55e855e49265eefb2c129d97803 | f38722a8618fc908aca5f78fe2c6eb92da7574e4 | /backend/app/modules/user/schemas/notification.py | 11c8e68513f3a112975c64a0e6d2f2618c0243e1 | [] | no_license | https://github.com/BirajKhanal/EasyAuction | b81a5e566ae00605cf1c6fcb655a59f536aa14b1 | 38f24c04c189f676ee9dbcc88cd8dd30b05c2466 | refs/heads/master | 2023-08-14T07:06:24.692944 | 2021-10-06T04:51:11 | 2021-10-06T04:51:11 | 363,978,790 | 0 | 0 | null | true | 2021-05-03T15:39:48 | 2021-05-03T15:39:48 | 2021-05-03T15:02:30 | 2021-05-03T15:02:28 | 0 | 0 | 0 | 0 | null | false | false | from typing import Optional
from pydantic import BaseModel
class NotificationBase(BaseModel):
title: Optional[str]
detail: Optional[str] = ''
sender_id: Optional[int]
reciever_id: Optional[int]
class NotificationCreate(NotificationBase):
title: str
sender_id: int
reciever_id: int
clas... | UTF-8 | Python | false | false | 561 | py | 92 | notification.py | 77 | 0.71123 | 0.71123 | 0 | 32 | 16.53125 | 43 |
BC-COMS-2710/summer21-material | 4,063,039,091,590 | 6e1b27cf9f4c23581cc105b70cfec66ea5999a0f | 6151a3c25988eb4eac0c00289b90b2e42d4960eb | /tutorial/week2/2.2/tests/q2_26.py | 6acbef969f75e4cedf637bd516f8d81ea6ef0b82 | [] | no_license | https://github.com/BC-COMS-2710/summer21-material | 8e3bbbb375433fa0b575cf39eed4bdf2d3b486d3 | f07ffc1595d7a924a5fca0636161ded26b28e655 | refs/heads/master | 2023-05-28T22:52:25.941752 | 2021-06-10T14:44:42 | 2021-06-10T14:44:42 | 353,820,186 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | test = { 'name': 'q2_26',
'points': [0.5, 0.5],
'suites': [ { 'cases': [ {'code': ">>> assert 'days_in_office' in trump_100_days_tweet_df\n", 'hidden': False, 'locked': False},
{ 'code': ">>> # Trump did not Tweet on his 77th day in office;\n>>> assert 77 not in trum... | UTF-8 | Python | false | false | 639 | py | 94 | q2_26.py | 52 | 0.386541 | 0.359937 | 0 | 10 | 62.9 | 177 |
dthermadom/apparate | 979,252,558,742 | fe9728bdaca5fa211b2aaf878dc557beed59e72f | 15514e327d561fc13acf1461a69fd20d3085ac32 | /tests/unittest_helpers.py | 5b335022bc9f7d8203e89f01aa31c22df679455a | [
"BSD-3-Clause"
] | permissive | https://github.com/dthermadom/apparate | 27cbdd86ee6bf97cbb6f4c29d23b518748627d87 | d10859240bf9e7f453dbaa33f029ab0dda4e161e | refs/heads/master | 2022-05-26T12:11:20.897578 | 2020-04-24T06:01:21 | 2020-04-29T09:52:25 | 257,890,244 | 0 | 0 | BSD-3-Clause | true | 2020-04-22T12:08:42 | 2020-04-22T12:08:42 | 2020-04-06T09:48:59 | 2019-10-21T17:25:30 | 67 | 0 | 0 | 0 | null | false | false | def strip_whitespace(string_value):
"""
Return the input string without space, tab,
or newline characters (for comparing strings)
"""
return ''.join(
[c for c in string_value if c != ' ' and c != '\n' and c != '\t']
)
| UTF-8 | Python | false | false | 250 | py | 8 | unittest_helpers.py | 3 | 0.572 | 0.572 | 0 | 8 | 30.25 | 73 |
kingtelepuz5/python3_code | 2,551,210,579,850 | d0c000773df1ce6dbc1a12a54d56a3405536a10f | f3648d48650e56a0647163fa664ae5f7cf4b3ae0 | /drun_kit/respones.py | 8b025c8b8ccad62d159794b7f27023ed646d4915 | [] | no_license | https://github.com/kingtelepuz5/python3_code | 3f6bc5af1620e08f7baecdaf064e7d23464e66ee | 0b4273835aea4dbaaef77a03729bfa6528dbf2ff | refs/heads/master | 2023-05-02T22:35:22.211611 | 2021-05-25T15:55:40 | 2021-05-25T15:55:40 | 348,477,750 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import urllib.request
search_pharse = 'crypto'
with urllib.request.urlopen('https://www.wired.com/') as response:
html = response.read().decode('utf-8') # convert to string
first_pos = html.find(search_pharse)
print(html[first_pos-10:first_pos+10])
| UTF-8 | Python | false | false | 261 | py | 48 | respones.py | 42 | 0.708812 | 0.689655 | 0 | 6 | 42.5 | 66 |
VitaliyRogach/Social_something | 9,809,705,345,729 | 8d1e7e774070f6cb3ab6428f6bfd404d69fda7a8 | 215e6ff2978396f24039862bf7e527073eef3b81 | /instagram/main/models.py | f0e152004f5d57c552aa6c55ba16e11c271a095c | [] | no_license | https://github.com/VitaliyRogach/Social_something | c5ed7d031823843af171f7f5ae7b3dacdbef3201 | 2e83d8edf9c0215e41544b2820de5bf791cf3877 | refs/heads/master | 2023-02-07T16:01:16.044550 | 2021-01-03T08:21:06 | 2021-01-03T08:21:06 | 322,406,425 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.contrib.auth.forms import User
from django.dispatch import receiver
from django.db.models.signals import post_save
from django.urls import reverse
class Profile(models.Model):
user = models.OneToOneField(User, on_delete... | UTF-8 | Python | false | false | 1,173 | py | 11 | models.py | 7 | 0.705575 | 0.698606 | 0 | 35 | 31.8 | 92 |
goxberry/tau2 | 14,740,327,804,343 | 08502b5def84c09f21981bafcfec0150fff75f0f | 471c54686dc6a641fb77e0e9c75c4783ca326e15 | /tools/src/perfexplorer/examples/HardwareCounterBasicAnalysis/getTopX.py | be0bce1366e60d41f93ea792b4f2d18d13707136 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-other-permissive"
] | permissive | https://github.com/goxberry/tau2 | ec63911d3970b5330a798c08941e59bf7ca045d1 | d1f34119dc69ad3eda5c939cddda00a86bb303a3 | refs/heads/master | 2020-06-26T12:39:31.496300 | 2019-07-21T23:17:02 | 2019-07-21T23:22:10 | 199,632,738 | 0 | 0 | NOASSERTION | true | 2019-07-30T10:47:59 | 2019-07-30T10:47:59 | 2019-07-22T07:03:27 | 2019-07-22T07:03:25 | 231,478 | 0 | 0 | 0 | null | false | false | from edu.uoregon.tau.perfexplorer.glue import *
from edu.uoregon.tau.perfexplorer.client import PerfExplorerModel
from edu.uoregon.tau.perfdmf import *
from java.util import *
from java.lang import *
True = 1
False = 0
parameterMap = None
tauData = ""
threshold = 10
functions = "function-list.txt"
gprof = False
def g... | UTF-8 | Python | false | false | 1,509 | py | 1,665 | getTopX.py | 1,103 | 0.741551 | 0.727634 | 0 | 49 | 29.795918 | 91 |
guilatrova/ccb-notificacoes-cpfl | 13,675,175,900,364 | c40d581f163bc61ad31c9aebcc5f4427ca0086b9 | 8a141edccd20920faa5df1e26d95c3347dc4c953 | /src/formatters/HtmlFormatter.py | 9a80330ba60b7aaebe2fa25208cd9ebdc431ba62 | [] | no_license | https://github.com/guilatrova/ccb-notificacoes-cpfl | f2d08638138462a852b1d80ce5fd3bcbf4d42068 | d9607993903e04ef77cd76387158d0cba8c58a2b | refs/heads/master | 2020-04-20T16:49:18.904182 | 2019-02-03T17:41:13 | 2019-02-03T17:41:13 | 168,969,581 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Declara as classes HtmlFormatter"""
import os
try:
from formatters.BaseFormatter import VencimentoFormatter
except ModuleNotFoundError: # For local execution
from src.formatters.BaseFormatter import VencimentoFormatter
TEMPLATES_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "templates")... | UTF-8 | Python | false | false | 3,191 | py | 18 | HtmlFormatter.py | 11 | 0.569771 | 0.56883 | 0 | 94 | 32.925532 | 88 |
sesquideus/asmodeus | 4,724,464,030,083 | db8cc786385e590f6a67c1568e8086ee660a59af | ba1585406af7a75e425b104a3a304ee99c9b11f0 | /core/asmodeus/asmodeus.py | a7ac4de0a22644fe180c9e89117199a5e4c03903 | [
"MIT"
] | permissive | https://github.com/sesquideus/asmodeus | 1ac9dce56b124f2c8318914b0d666a6ea4e079db | cc56357b7fc336e28d19a7297a67890669550be8 | refs/heads/master | 2023-08-03T08:55:51.305957 | 2023-07-25T18:01:14 | 2023-07-25T18:01:14 | 152,603,129 | 4 | 2 | MIT | false | 2023-02-10T23:14:38 | 2018-10-11T14:15:16 | 2022-05-28T06:39:38 | 2023-02-10T23:14:36 | 618 | 4 | 2 | 9 | Python | false | false | import argparse
import sys
import multiprocessing as mp
import logging
import time
from core import dataset, exceptions, configuration
from utilities import colour as c
from models.observer import Observer
log = logging.getLogger('root')
class Asmodeus():
def __init__(self):
self.ok = False
sel... | UTF-8 | Python | false | false | 4,744 | py | 92 | asmodeus.py | 61 | 0.598019 | 0.597175 | 0 | 115 | 40.252174 | 148 |
CG4002-Capstone-Project/internal_comms | 7,017,976,563,692 | 2e670595fe696f9ed76b2ff728b13b79ac8d6df3 | bd7fae7b96f2f7eaef113046f09c066b7283b1b9 | /dnn_utils.py | 30dd3b8de4b1299500cf615b8a79d52a3d998045 | [] | no_license | https://github.com/CG4002-Capstone-Project/internal_comms | 0a613ac8c49b6e8b278fc7dee2424852cc30e7bd | e14ab11b62a07eee8be71eae5e398f45839e5ccc | refs/heads/main | 2023-03-22T01:21:52.122061 | 2021-03-17T09:45:38 | 2021-03-17T09:45:38 | 344,720,952 | 1 | 1 | null | false | 2021-03-15T10:23:57 | 2021-03-05T06:49:26 | 2021-03-14T10:31:14 | 2021-03-15T10:23:56 | 70 | 0 | 0 | 1 | Python | false | false | import warnings
import numpy as np
import torch
import torch.nn as nn
from joblib import load
from scipy import signal, stats
warnings.filterwarnings("ignore")
activities = ["dab", "gun", "elbow"]
n_labels = len(activities)
def scale_data(data, scaler, is_train=False):
"""
data: inputs of shape (num_in... | UTF-8 | Python | false | false | 5,347 | py | 10 | dnn_utils.py | 5 | 0.610623 | 0.595287 | 0 | 226 | 22.659292 | 76 |
CatFelts/Pyfun | 1,443,109,043,572 | e90a2cdaa6018d1a55d4363976bb0f800313e173 | 1cffa4e5afc6776418254d2aa5f13a3ea0af556b | /game.py | 632b7674b7c3290a4e3d95520f9ddce09ce3a037 | [] | no_license | https://github.com/CatFelts/Pyfun | 8b982c7ceccd8d83e178251c2702b8a62d3b86b1 | 5ed479075ecd2d4e39cf81549e8f1708d23deb96 | refs/heads/master | 2021-09-06T11:50:31.807555 | 2018-02-06T07:35:18 | 2018-02-06T07:35:18 | 119,914,336 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pygame
x = pygame.init()
pygame.font.init()
my_font = pygame.font.SysFont('Comic Sans MS', 30)
#color constants
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
PURPLE = (72, 9, 150)
PINK = (239, 19, 221)
YELLOW = (250, 255, 0)
ORANGE = (255, 119, 0)
#FPS
FRAM... | UTF-8 | Python | false | false | 5,052 | py | 2 | game.py | 1 | 0.454869 | 0.435669 | 0 | 146 | 33.60274 | 103 |
jksdf/IV122 | 15,848,429,334,495 | 284b72f269401f3e426c2a3f23009beb42166cc0 | 7fced4cf0f53a6439d3a2110454fbc7210b8ebac | /src/week3/PartB.py | 7b2048093633193d3614835660b9f3642d2f6745 | [] | no_license | https://github.com/jksdf/IV122 | 9d56192ebbebfa1a858309252a10d7d802501691 | f4413bf5dec8d3fe8e762c2ae2a3b2642dcbad4a | refs/heads/master | 2022-12-02T02:59:09.577072 | 2019-05-28T02:31:40 | 2019-05-28T02:31:40 | 171,647,115 | 0 | 0 | null | false | 2022-11-22T03:29:54 | 2019-02-20T09:56:41 | 2019-05-28T02:31:48 | 2022-11-22T03:29:51 | 13,672 | 0 | 0 | 2 | Python | false | false | import math
from Base import Base, AbstractFilenameProvider
from common.math.geometry import deg2rad, rad2deg
from common.turtle.Turtle import Turtle
from week3.common import star, polygon
class PartB(Base):
name = 'B'
def run(self, fnprovider: AbstractFilenameProvider):
fn = fnprovider.get_filename... | UTF-8 | Python | false | false | 2,568 | py | 113 | PartB.py | 58 | 0.547118 | 0.496885 | 0 | 77 | 32.363636 | 107 |
JoaoRicardoSimplicio/market | 618,475,338,747 | ab2868e6e463f8d2c2ee98dc47e8378921a3a343 | 6099ea6ca4a1aa38e6ad9403fb765c90f335ef3f | /stocks/tasks/stock_purchase.py | 349951cadffb28b434e6ad2c13c4aade0f025827 | [] | no_license | https://github.com/JoaoRicardoSimplicio/market | 5d49ed9a2b90fdb911e1e83d545fac859afc208d | fb0e7a0d8efdf286e24c807ff4dd0a89a8f8be0d | refs/heads/master | 2023-03-05T21:28:15.043875 | 2021-02-14T06:16:35 | 2021-02-14T06:16:35 | 323,718,408 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from stocks.queries.stock_queries import StockQueries
from stocks.tasks.stock_information import get_user_information
def buy_stock(stock_code):
data = get_user_information(stock_code=stock_code)
stock = StockQueries(**data)
stock.buy()
def get_stock_purchases(stock_code):
stock = StockQueries(code=... | UTF-8 | Python | false | false | 417 | py | 33 | stock_purchase.py | 24 | 0.748201 | 0.748201 | 0 | 14 | 28.785714 | 71 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.