blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0950a755da45793890a871da288015d3a797b6da | a5dfe056a94334cf4371fb8fa4561e1c59037249 | /cupcake2/ice2/__init__.py | cdb899d4b8d61a8520e7922eed96f0e554c8357f | [] | permissive | Vikash84/cDNA_Cupcake | 25bb64c13f5ca2e764b71c04b7f3fc9e85159ef6 | 1660160e2424c7780e3091567318a6a499aa4675 | refs/heads/master | 2020-07-07T09:30:38.170248 | 2019-08-19T17:20:19 | 2019-08-19T17:20:19 | 203,315,579 | 2 | 0 | BSD-3-Clause-Clear | 2019-08-20T06:41:34 | 2019-08-20T06:41:32 | null | UTF-8 | Python | false | false | 95 | py | __init__.py | __author__ = 'lachesis'
ICE_PARTIAL_PY = 'run_IcePartial2.py'
ICE_ARROW_PY = 'run_IceArrow2.py' |
fca3f59b408de3a2d42819e9375bd6897604ebf6 | edb9422b98fb41326bb62b50665a7e02d4f1b5c0 | /main.py | 4d30823bff5cf1cc99ec31a4d8a310610f84ad9a | [] | no_license | aybarburak/cse4094-project | 5734ceb31ad13ca4a98b9cf5d21fe78533e90a9b | 11d636459869e408af8cb039e5076c4615e9358d | refs/heads/master | 2020-04-23T06:38:42.028786 | 2019-02-16T08:22:32 | 2019-02-16T08:29:12 | 170,980,077 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,591 | py | main.py | # Marmara University, Computer Engineering Department
# Natural Language Processing, Machine Learning Project
# Burak Aybar 150112001 & Farid Yagubbayli 150113901
import os.path
from sklearn.naive_bayes import MultinomialNB
from sklearn.linear_model.logistic import LogisticRegression
from sklearn.svm.classes import L... |
d2e9b200c74f5b8eebb22ef8c2fb6d953011fbc8 | 680f29feb49a57393ed73ad2fafc46e11204fee5 | /tests/exporters.py | 65fc1001226443f3129ce8ac0bd04631c789821a | [] | no_license | bradtreloar/pxi | 1fc7ce3108b84c243452b9f70539a4f02b851b63 | 0ecd114b3b38b30346818404e5549e14a9f4541b | refs/heads/master | 2022-04-30T21:23:36.170068 | 2022-04-22T01:15:27 | 2022-04-22T01:15:27 | 180,910,220 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,848 | py | exporters.py | import csv
from datetime import date
from decimal import Decimal
import os
import pathlib
from unittest.mock import mock_open, patch
from pxi.models import InventoryItem
import random
from pxi.enum import WebStatus
from pxi.exporters import (
export_downloaded_images_report,
export_price_changes_report,
ex... |
0eccdfde3bc62a8cf805953cbdcd5e12394b1767 | 559336e34b18bce41e594a3ce857149b58daa149 | /data_extraction.py | 8ad02adc1a07f8bb30651366b12f31c3abf579c6 | [] | no_license | amankagarwal/r-UDub | 72553f014de881fc0023e33f2c1b83da317149e7 | 7b059b063cf128c623220f527eaf4f23856c9214 | refs/heads/master | 2020-03-10T20:09:50.843484 | 2018-08-13T16:29:03 | 2018-08-13T16:29:03 | 129,563,167 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,158 | py | data_extraction.py | import requests
from pprint import pprint
import json
# This code currently creates a dictionary out of all the posts (not comments, yet)
# which were posted in between the given timestamps (used the winter quarter timestamps for testing)
# Code takes 12 seconds to run currently, so efficiency is certainly in question... |
3155387f792f7b101384e624e008a6f43543cc16 | 6c2bb23676d81b2c867ed8add71e675f6dd0411f | /Fibonacci.py | 508fd52210f435767c8e068bfff0a6bf14b322c1 | [] | no_license | KaushikGhosh27/Python-programs | fb0bd19b466db11fd2b2247218cc7b7687c05cf8 | 92729ad46f80b9c5f4812b6cb2cb6824118cbcd4 | refs/heads/master | 2022-12-26T20:44:00.865790 | 2020-07-03T21:02:21 | 2020-07-03T21:02:21 | 262,556,256 | 0 | 1 | null | 2020-10-01T04:48:30 | 2020-05-09T11:29:45 | Python | UTF-8 | Python | false | false | 468 | py | Fibonacci.py | def fibo(n):
fno = 0
sno = 1
list = [0,1]
for i in range(n-1): # we have already included two elements in list hence list runs 2 less than n,i.e, but in here since upper limit is not counted thus to run the list two times less than n we use (n-2)
res = fno+sno
fno = sno
sno = res... |
04af086d571a227ed5d9df9b49296240e961cce9 | e3a7fb42812f0f017077ac716fe7e8d0ee8236e3 | /backend/mspsite/test_portal/migrations/0001_initial.py | 7cf03dec57ca386cfb0ac9d876a03dfa8ee14c75 | [] | no_license | apoorvbits7/msp-test | d654e9ab7aba86e4d1ba61e33fdf78e88d53e22e | 285473706a5d413be08e40d9d5c7cdb799dfabd3 | refs/heads/master | 2023-06-10T15:28:10.058865 | 2019-07-14T06:00:13 | 2019-07-14T06:00:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,036 | py | 0001_initial.py | # Generated by Django 2.2.2 on 2019-07-01 16:41
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Candidat... |
2a2b84168dabe0fd7955a3842644d43025c0199f | aff2ff7c15856b503fc538a8cf13c3af37d781e2 | /run.py | 80a392ee07833997d3bfe9306b14e35d7d0d3500 | [] | no_license | antonellopellecchia/gem-test-beam-monitoring | 7f6838d30cb39426f743aa4f420e687e7e940bb4 | 6f0e9051e167ab90a8b6efae00da56b21118d04c | refs/heads/main | 2023-08-27T23:22:15.548439 | 2021-11-14T13:34:46 | 2021-11-14T13:34:46 | 419,557,692 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,904 | py | run.py | #!/bin/python3
import os
import time
import yaml
import argparse
from modules import hv
from modules import scope
import labsetup
lv_supplies = list()
def main():
parser = argparse.ArgumentParser()
parser.add_argument('config', help='configuration file path')
parser.add_argument('run', help='run name')
... |
98a8a52877d49a0294fdbcfc3f006ce7df8f19f4 | 12550c3ce17e2db3c459b022e43a643370f23172 | /kompas/kompas/spiders/kompas_spider.py | 4c544a0d34e67fff47da233a92555b366480415d | [] | no_license | wahyubudiman/mediascraping | cc59b1296d849586454e9446cbe0fd8f1301fe5f | afc44c32b84c44f5ca85caa50d2a614baf1411ab | refs/heads/main | 2023-02-23T23:15:12.407356 | 2021-01-29T08:01:25 | 2021-01-29T08:01:25 | 334,074,324 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,970 | py | kompas_spider.py | import scrapy
import dateparser
from scrapy.selector import Selector
from bs4 import BeautifulSoup
from scrapy.http.request import Request
from kompas.items import KompasItem
class KompasSpider(scrapy.Spider):
name = "kompas"
allowed_domains = ["kompas.com"]
# start_urls = [
# "https://www.kompas.co... |
23cd085b5d56f5bea492db785af0b56282574462 | 69ab1d288eef837e1639a2daad4c63d35620c283 | /check_alcatel_lsp.py | 1cb9b3d0328789a032c44d03a1581ff8bf0bee0d | [] | no_license | nhova/Python-Nagios-Plugins | 8a6b8e27dd423855ee5cc248fe320ad9e65dd8f6 | f15569cd4d71f6075ff35deb800074440baf1a2b | refs/heads/master | 2021-01-21T08:37:11.754447 | 2017-05-19T05:00:45 | 2017-05-19T05:00:45 | 91,633,141 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,247 | py | check_alcatel_lsp.py | #!/usr/bin/env python
import argparse
import nagiosplugin
import logging
import re
from pysnmp.hlapi import *
lsp_name_oid = "1.3.6.1.4.1.6527.3.1.2.6.1.1.4."
lsp_status_oid = "1.3.6.1.4.1.6527.3.1.2.6.1.1.6."
_log = logging.getLogger('nagiosplugin')
lsp_list = []
def get_lsp_list(address, community):
p = re.co... |
704b10f2298f7287425e39e6a1c489b01dd4ae2d | fe553397da2d219db28974c9a619415b3982ac93 | /python/mutually_information_calculator.py | 8a37309dd0cfda59f5397fefd3547c4b6943b2da | [] | no_license | MahmoodabadiHamid/Oil-well-analysis | bd6d0d407f60c3a8f56427593a9247a23c96e57a | bea7fab716fd693f45bf1a3727ad47305c5ed18f | refs/heads/master | 2020-06-23T09:16:11.301005 | 2019-07-24T08:44:56 | 2019-07-24T08:44:56 | 198,581,804 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,677 | py | mutually_information_calculator.py | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import os
def calc_MI(X,Y,bins):
c_XY = np.histogram2d(X,Y,bins)[0]
c_X = np.histogram(X,bins)[0]
c_Y = np.histogram(Y,bins)[0]
H_X = shan_entropy(c_X)
H_Y = shan_entropy(c_Y)
H_XY = shan_entropy(c_XY)
... |
ab0063f0d1226252c4e6fc29e6aabccb4bce53b4 | 3bd6792f9c1ced079c886a8f2f5ad649f981194e | /Aplicaciones/Proyecto/views.py | 5b9c1cd725e928f26e156aae7fc94c3a2f1fd9b9 | [] | no_license | amigleon92/ProyectoIS2 | 6af4f5e2184f73c6c0347f6b2cf8016e8eef9a0b | a54bea249451169d8289e1380ac7a6c7ad233244 | refs/heads/master | 2020-05-31T14:29:05.872017 | 2014-06-21T04:31:05 | 2014-06-21T04:31:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,408 | py | views.py | from django.shortcuts import render
from django.views.generic import TemplateView
from .models import Proyecto
from Aplicaciones.Usuario.models import Usuario
from Aplicaciones.Rol.models import Rol
from Aplicaciones.Login.views import LoginView
from Aplicaciones.Fase.models import Fase
from Aplicaciones.Solicitud_de_C... |
82f723ee5cb08145dd9df80ff5dbaa4a1a1ecfb2 | b610030044f75dfd99a737d60c849c18b5d7ac98 | /main.py | 3395639124575faa0a5dce68fdf2ddc8ccd81296 | [] | no_license | yoga0806/iPAObfuscator | e365b396908d93452023f493c0e50e6c8063bfba | 1b27f6051a87c0f4cff5359f4a3bf7ed311612ff | refs/heads/master | 2022-01-27T21:43:33.462032 | 2019-04-24T02:44:58 | 2019-04-24T02:44:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 873 | py | main.py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import sys, getopt
import bundle
from macho import MachO
def main(argv):
outputfile = ''
try:
opts, args = getopt.getopt(sys.argv[1:], "hi:o:")
except getopt.GetoptError:
print 'test.py -i <inputfile> -o <outputfile>'
sys.exit(2)
for opt, arg in ... |
95a0da38be15cf0b1ab12f2cfce7455b3fd1576f | 57f83cf12391426e48250484f746993c196acd7e | /app.py | b06e1edadabdb4831836b72404be161232d93516 | [] | no_license | Osaroigb/Google-Dinosaur-Bot | 662713e46ee2cc42d8f10f1c9b401088e9d82920 | cf33febb59b051ad800c825e7f612a6381ba9a16 | refs/heads/master | 2023-03-17T00:18:20.681025 | 2021-03-16T22:05:16 | 2021-03-16T22:05:16 | 348,505,216 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,301 | py | app.py | # import required modules
from PIL import ImageOps, ImageGrab
from time import sleep
import numpy as np
import pyautogui
class Coordinates:
# coordinates of replay button to start the game
replay_button = (360, 214)
# this coordinates represent the top-right coordinates
# that will be used to define... |
b5db0f4b5a24e3e214de2f620c755e62c9c13446 | 1b532f79e859705052ec77404fff3d4da5de0029 | /14.py | 020cb8407a3a988be995f10082e467d42e624618 | [] | no_license | salmanchik1/Project_Euler | 270808f6e5785669d970b63cfd111bf7250bfe82 | 1e8a322dbded17366c1b2d841a2645332c9114d6 | refs/heads/master | 2021-07-08T03:23:13.123859 | 2020-11-05T20:49:07 | 2020-11-05T20:49:07 | 203,200,636 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 698 | py | 14.py | # This algorithm is written in Python 3.7
number = int(1e+6)
chain = dict()
max_steps = -1
long_chain_number = -1
def calc(n):
global chain
if str(n) in chain:
return n, chain[str(n)]
if n == 1:
a, b = 1, 0
chain['1'] = 0
return a, b
elif n % 2 == 0:
a, b = calc... |
a8426ea662d1f1c86ec83d7e128624e94837e01a | 9e96ad98ae323318c9ed561a1256aedab3d07ee2 | /gdcdatamodel/__init__.py | 38ec7a6afa2cc9ef1ef1a43849f55f486be9abb9 | [
"Apache-2.0"
] | permissive | NCI-GDC/gdcdatamodel | 5c75492e47effd968b98ebadf72595c454613152 | aee0cda385b11ee527e8ed082e6d07bf0d36d8c3 | refs/heads/develop | 2023-08-31T18:19:01.409475 | 2023-08-24T20:02:33 | 2023-08-24T20:02:33 | 24,822,528 | 29 | 6 | Apache-2.0 | 2023-08-24T20:02:34 | 2014-10-05T18:18:38 | Python | UTF-8 | Python | false | false | 27 | py | __init__.py | from gdcdatamodel import *
|
690339cd592fd96da81847e14a99a2ca702c0474 | 219f1d127207f7507555a2224a1b3184202e0b7f | /views.py | 39f450b60a084cb1c476f00084be5531564ca99f | [] | no_license | MindSparkTm/groupconsecutivenumbers | 50d0981d631ab59689ea610d97979d46676c426b | 0b737a9896f815f1b506381cf3315ae61c932090 | refs/heads/master | 2020-03-23T13:32:34.447360 | 2018-07-19T20:08:35 | 2018-07-19T20:08:35 | 141,624,185 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 967 | py | views.py |
import json
from django.shortcuts import render, redirect, reverse
from django.views.generic import DetailView, ListView, UpdateView, CreateView, View
class consecutivenumber(CreateView):
def get(self, request):
return render(request,'kmd/consecutivenumber.html')
def post(self,request):
... |
51499d29a2b6094dc5085f5713e924c3cfbec8ca | 583ec831d20229938be401537a29c640b631f813 | /rfqsite/migrations/0040_auto_20210108_1345.py | 539ebe58b9d17ea5b8318315ddb9b284aa8a9633 | [] | no_license | pipo07pipo/rfq | 4b50c94eada0d59f7aaf2650c7f29c8e39d58d3d | 92a7a1c9db29752782fadf1b391503d60b587c98 | refs/heads/master | 2023-02-16T13:50:37.652164 | 2021-01-15T09:37:44 | 2021-01-15T09:37:44 | 277,087,904 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 909 | py | 0040_auto_20210108_1345.py | # Generated by Django 3.0.7 on 2021-01-08 06:45
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rfqsite', '0039_delete_customer_part'),
]
operations = [
migrations.AddField(
model_name='rfq',
name... |
2483dc3fbbceda0c801c9e9556f2eb3cc449e849 | 2ba082fab246516636e28507fc8169b529d1367d | /model.py | f0428bee4c7afe6ba1e5c4fc8e19c79d154bd924 | [
"MIT"
] | permissive | hiit-tabata/Behavioral-Cloning | 6aa702048d209f33a2925d7ed83dfd81aa52724b | 5bc576d159f17507731a60119f40eb4fb058eac9 | refs/heads/master | 2021-06-12T14:06:38.351799 | 2017-03-26T08:20:06 | 2017-03-26T08:20:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,387 | py | model.py | # This file is to train the model
# python drive.py model.h5
# Here are some general guidelines for data collection:
#
# two or three laps of center lane driving
# one lap of recovery driving from the sides
# one lap focusing on driving smoothly around curves
# video.py usage
#python video.py run1 --fps 48
import c... |
a3a14103026a5f486f27ffa06e69b1eb0ad472aa | 8a42fc0a988ab3c03a8a74c6c75452acfe289b4d | /final_exam/different_length/utils.py | 451441c39c98428fa1de5e30376388800eea7b87 | [] | no_license | rw1993/PyAr | 5c5d5fc4a90b08b9b4a6e0883141b491ccaf45da | a09bc8ba4cda11f4e4cccdc4b6575b61ae0f18e0 | refs/heads/master | 2021-01-17T17:39:30.240020 | 2017-05-04T06:51:48 | 2017-05-04T06:51:48 | 60,001,886 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 167 | py | utils.py | import pickle
import generate_data
def load_timeserieses(mr, length):
name = generate_data.file_name.format(length, mr)
return pickle.load(open(name, "rb"))
|
a50e780fee7ae481d49f84d4ee4403579c44cde3 | 0caab4d677411b72025242f4924fe83f9f129d84 | /src/osn-data/extract_features_step2/08feature_active_passive.py | 8ff41a43c753378fb229e685eb27b835338b5309 | [] | no_license | cdhahri/hourly | 6577add199ab22a09c8763fec64cc3d3258c0f47 | f503fa3d11c20a3d31af0b4cd27ab25cac58605c | refs/heads/master | 2020-06-10T23:40:59.397780 | 2017-02-24T13:40:26 | 2017-02-24T13:40:26 | 75,843,000 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 699 | py | 08feature_active_passive.py | #!/usr/bin/python3
import json
with open('/vagrant/data/osn-data/ids.json', 'r') as file:
ids = json.load(file)
for user_id in ids:
r = '/vagrant/data/osn-data/tweets_selected/{}.json'.format(user_id)
w = '/vagrant/data/osn-data/features_step2/{}active_passive.json'.format(user_id)
with open(r, 'r') as file... |
013536df89f0cefbd74af917af5e1dfd06d81f14 | 9750d1acbaba5f989aa6289ff458fcb99db3f0de | /models/dilated_densenet.py | 3ffc54e996dfba1d36b37a2d543e2321f344f922 | [] | no_license | shelleyHLX/SBIR | 8dc627fe76a50c959d08905b48cec415eeed5311 | 8b51544f440af895acbdeb718e03dd67826c60ca | refs/heads/master | 2020-03-23T12:37:31.743244 | 2018-07-13T10:21:30 | 2018-07-13T10:21:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,155 | py | dilated_densenet.py | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.model_zoo as model_zoo
from collections import OrderedDict
from torch.autograd import Variable
__all__ = ['DenseNet', 'densenet121', 'densenet169', 'densenet201', 'densenet161']
model_urls = {
'densenet121': 'https://download.py... |
acc0bae03bc229e73ca922ff14e13b45b9fa21eb | e2f901d25b470db6987000b7c250949e532061e1 | /toys/blinker.py | 95e142faa2603485e8265770687bf96b0ea144a8 | [
"MIT"
] | permissive | DenisLila/public | 1a40d83ffc9f85c56af7a15efde67e917b4120f9 | 37a790f5e4681f4c1e7880d9781870caa2b46323 | refs/heads/master | 2021-01-13T14:20:26.432625 | 2018-04-18T22:42:39 | 2018-04-18T22:42:39 | 33,418,468 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 383 | py | blinker.py | # Makes a LED blink on the raspberry pi. Pin 2.
import RPi.GPIO as gio
import time
def runBlinker():
for i in range(10):
for j in range(3):
gio.output(2, 1)
time.sleep(1.0 / 6)
gio.output(2, 0)
time.sleep(1.0 / 6)
time.sleep(0.8)
def setupAndRun(f):
try:
gio.setmode(gio.BCM)
... |
26f60d56f90f5c54d7171e5d146ec3055fd46d74 | 5c3e866420de803746aca2ab6a2738419cf148ec | /psocake/utils.py | 25cbc77220cf5a99a3ec8d2ac0053d3bfbed468a | [] | no_license | lcls-psana/psocake | a7f39a71302cc798969a6762a26203e354b43f60 | 764efbe727a25dc2a8d6fb684b20471e3d9d6310 | refs/heads/master | 2023-06-28T12:16:55.441838 | 2023-06-22T07:02:02 | 2023-06-22T07:02:02 | 85,128,121 | 3 | 17 | null | 2023-06-22T07:02:27 | 2017-03-15T22:41:16 | Python | UTF-8 | Python | false | false | 7,380 | py | utils.py | import json
import psana
import sys
import numpy as np
from numba import jit
import subprocess, os
import string, random
ansi_cmap = {"k": '0;30',
"r": '0;31',
"g": '0;32',
"o": '0;33',
'b': '0;34',
'p': '0;35',
'c': '0;36'}
def highlight(string, status='k', bold=0):
... |
0e3c2e79619ce405f07e7d59aff03d6c9ea3da93 | b71260a254b40a8cb4f4d753c6603dfe88ddc9d1 | /MachineLearningTechniques/hw1/solve_qp.py | 7e7341f75487d40e8480edd725e4270725b11006 | [] | no_license | lincolncosta/LearningFromData | e72656ee268b44671375aed6ef98dc6c8aa34197 | a7ea4744df71acb1bce458509099bc22264e05ed | refs/heads/master | 2021-05-29T08:50:49.087574 | 2015-02-20T14:04:06 | 2015-02-20T14:04:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,714 | py | solve_qp.py | # -*- coding: utf-8 -*-
__author__ = 'wangjz'
from math import pow
from cvxopt import matrix
from cvxopt.blas import dot
from cvxopt.solvers import qp
'''
Solving Question 3
Consider the same training data set as Question 2, but instead of explicitly transforming the input space X to Z,
apply the hard-margin support ... |
84e88b734f9d2204571e712a04c0ea5acb30b65b | a1e98002088582085f0733d7bbe3c6416a28f2ca | /backend/api/views.py | b31d9fb51a7fa75abaf848d6b28e0758a8d0742a | [] | no_license | flannerykj/modules-archive | ff7dbde76ccac873d0a6ed15ad8458d827b9008f | 1c10d04794b497354d976d8bd9814db2bb2b48ad | refs/heads/master | 2020-12-02T16:36:43.702798 | 2017-07-07T16:36:52 | 2017-07-07T16:36:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 660 | py | views.py | from rest_framework.generics import (
ListCreateAPIView, RetrieveUpdateDestroyAPIView)
from .models import Task
from api.serializers import TaskSerializer
from api.permissions import IsOwnerOrReadOnly
class TaskMixin(object):
queryset = Task.objects.all()
serializer_class = TaskSerializer
permission_... |
628e967076e46ad9dfe588f32c0809c2fe137151 | c175489763c747fd7d251fa92046c61e4035638e | /stock_tracker/single_stock_index_tracker.py | 10433e62c5299b2055a622aee3c3fd5848c68173 | [] | no_license | sreekanth-bg/python-snippets | 981531221988c44bb672d8f9b9c23a8e5cc5a81a | 206453cb9ae029d4b9c563f971bf5db254cd9871 | refs/heads/master | 2023-05-14T17:53:48.720779 | 2023-05-06T13:24:21 | 2023-05-06T13:24:21 | 239,736,966 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,993 | py | single_stock_index_tracker.py | # Input days and stock name (only indices) as parameters. Ex: python3 single_stock_index_tracker.py 30 BANKNIFTY
import sys
import os
import datetime as dt
import pandas as pd
import numpy as np
from nsepy import get_history, get_quote
# Clear system; auto detects windows and Linux (os module required)
#os.system('cl... |
06bb14ffb87122f0a8d250aea0f923b3a3acbbce | 66fbb969c8844f6a0db7cf8939c3412516bf54ca | /permutations.py | 61eb545748f480d0b7d0b5dce128cfab3cf60d27 | [] | no_license | chunweiliu/leetcode2 | 67a86d5a0d8c3ffe41f53a46b0e5960edc64c56d | 086b7c9b3651a0e70c5794f6c264eb975cc90363 | refs/heads/master | 2021-01-19T08:13:12.667448 | 2017-04-08T06:02:35 | 2017-04-08T06:02:35 | 87,612,004 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 695 | py | permutations.py | """Permute a list of distinct numbers
[1,2,3] have the following permutations:
[
[1,2,3],
[1,3,2],
[2,1,3],
[2,3,1],
[3,1,2],
[3,2,1]
]
Treat each digit as a head prepend over the permutations of the rest numbers
T(n) = n * T(n-1)
Time: O(n!)
Space: O(n!)
"""
clas... |
a2d8a1dafbd0815c7bf2db6c2ddcd30fdd01242b | 0d4ec25fb2819de88a801452f176500ccc269724 | /text_justification.py | 8dff7143f37cf406a01de8ebf0db9ff63fb24184 | [] | no_license | zopepy/leetcode | 7f4213764a6a079f58402892bd0ede0514e06fcf | 3bfee704adb1d94efc8e531b732cf06c4f8aef0f | refs/heads/master | 2022-01-09T16:13:09.399620 | 2019-05-29T20:00:11 | 2019-05-29T20:00:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,788 | py | text_justification.py | class Solution:
def fullJustify(self, words, maxWidth):
"""
:type words: List[str]
:type maxWidth: int
:rtype: List[str]
"""
def get_repr(line):
n = len(line)
chars = sum([len(w) for w in line])
if n == 1:
spaces = m... |
ce4796ca6869429a3f2cc693f05c3d8246c49961 | 4c82b8f946dd18daea30adf3b2e0d8f20eb0616b | /String_Validators.py | 93e5391c861a64fa9a3cdcde1e589b65c4be746b | [] | no_license | yyzz1010/hackerrank | 2a323e4491e44c9de876fc1dd5e8102d4f66fbbb | 2b0d1faa39cf948f5b38cdbb8c01d92fd14b68f3 | refs/heads/master | 2020-08-04T05:27:09.821959 | 2019-11-26T14:44:46 | 2019-11-26T14:44:46 | 212,022,258 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 987 | py | String_Validators.py | if __name__ == '__main__':
s = input()
boolean_list = []
for word in s:
if word.isalnum():
boolean_list.append(True)
else:
boolean_list.append(False)
print(any(boolean_list))
boolean_list = []
for word in s:
if word.isalpha():
boolean_... |
68773eff6053f1850d6b104ee39c8856c81e5155 | 83c14926b2d786a4b5c3ebf82082c3f913f046b7 | /test.py | a7bd2b120c17e1ceae560b98d05fe37d591948ae | [] | no_license | gisisfun/gis_utils | 16f6fe8512f98017e36526c8353754814615723d | b82d28f87b4bd41dd257a9e8444cf8b26c4bbb50 | refs/heads/master | 2020-12-14T22:35:34.159917 | 2020-06-25T07:41:20 | 2020-06-25T07:41:20 | 234,895,500 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 470 | py | test.py | from util import from_yaml, \
to_yaml, from_geojson_file, \
to_geojson_file, to_shp_file, \
from_shp_file, to_kml_file
print(from_yaml('hello: world'))
json_text = from_yaml('hello: world')
print(to_yaml(json_text))
g_data = from_geojson_file('aus_hex_57km_layer')
print(len(g_data))
to_geojson_file(g... |
96e60fa586650fcf30c457fd6b4311caf6118c43 | 924c7319e264d836c7023b23e0ff460f310b9d5b | /dev_ws/src/lane_detector/setup.py | 6800f39c9f5a2a701d611f0fd221c7080565d375 | [] | no_license | YigithanGediz/lane_follower | 14ff1623d59720d6aee6f376b3c58e5a034a2774 | 2fc1f9c781ad0c7504ac48908a3b00a33774141f | refs/heads/master | 2023-05-11T18:54:57.221976 | 2021-06-02T10:34:51 | 2021-06-02T10:34:51 | 365,825,944 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,463 | py | setup.py | from setuptools import setup
import os
from glob import glob
package_name = 'lane_detector'
setup(
name=package_name,
version='0.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name,... |
6017c20c8d2c358c6c523724a6794c132b932855 | cc82f1ab90880111b2809d2cc49e54dada104c23 | /ds.py | 4044c01f6bfa24955e19433c5b8a29104fa02181 | [] | no_license | AizhanKem/seminar3 | c456d8cee0664a8891b85cc22081190c9adce66b | 927ff347480bfa8cc93544fb344cc612edcce1be | refs/heads/master | 2020-04-27T20:15:38.602787 | 2019-03-09T05:15:22 | 2019-03-09T05:15:22 | 174,651,189 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 738 | py | ds.py | dict = {}
key = "counter"
if key not in dict:
dict[key]=0
dict[key] += 1
from collections import defaultdict
dict = defaultdict(int)
dict['counter']+=1
q = []
q.insert[0,v]
q.pop()
stack = []
stack.append(v)
stack.pop()
from collections import deque
fifo=deque()
fifo.append(l)
fifo.popleft()
lifo = deque()
lifo.app... |
bd5c2a719508d22a6d14b30bbb946b292b835f62 | 3fe4b76e2378de03c11220a82e6b9f0e45b76754 | /target/classes/xyz/corman/minecraft/vexis/vexis.py | 0e619354a1b4b7c1746aa78b904d2fce7215c39f | [] | no_license | Procez/Vexis | 6912c04548b951b79719e05224d682d483f2ea50 | 61623656b83e58ddea58be0adb1aee056a26e56a | refs/heads/master | 2022-12-27T19:21:10.042034 | 2020-05-08T23:35:19 | 2020-05-08T23:35:19 | 230,837,167 | 0 | 0 | null | 2022-12-14T20:23:55 | 2019-12-30T02:59:35 | Python | UTF-8 | Python | false | false | 55,964 | py | vexis.py | from __future__ import nested_scopes, generators, division, absolute_import, with_statement, print_function, unicode_literals
try:
from org.bukkit import Bukkit, ChatColor, OfflinePlayer, Material, Statistic, Location
from org.bukkit.command import CommandSender
from org.bukkit.command.defaults import Bukki... |
b23b5bb047084af6c789eea27314d1c3866a5bed | 1569890fe920dd58e985b07aaf829f7b02af1f9c | /邮件查重系统/app/views/base.py | 52304aa45f29d40b0e269dc0e645b5786a07185a | [
"MIT"
] | permissive | sixyang/Little-Project | dc793c1a9d56aca6e9049e4ea0758118caa8f339 | a44de97cd1cbae9f9930a5599450e495501099d5 | refs/heads/master | 2020-11-24T07:21:46.193542 | 2020-03-09T02:21:31 | 2020-03-09T02:21:31 | 228,025,473 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,022 | py | base.py | from app.utils.auth_func import login_required
from flask import session, render_template, Blueprint,request
from app.models import User
base = Blueprint('base', __name__)
@base.route('/')
@base.route('/home')
def home():
return render_template('home.html', email=session.get('email'))
@base.route('/panel')
@lo... |
e8e9f2676b0758020ae1c3f5f05d8e4d86cd7d47 | ed95c199f8cfbe0c7e68c2a34ac1182583a5f060 | /coreNLP/read.py | 21d1a03e74bfd3aa957591ecef444949c2d17aa5 | [
"MIT"
] | permissive | dunovank/sentiment-analysis | f26eed525bc4c6c9ade1f6f9771e658c21d7d675 | 9669fe172bbc3b1abd9fbdab4e4bb28b17741e22 | refs/heads/master | 2020-07-31T15:55:16.187236 | 2016-04-21T17:57:05 | 2016-04-21T17:57:05 | 210,664,334 | 0 | 1 | MIT | 2019-09-24T17:49:57 | 2019-09-24T17:49:56 | null | UTF-8 | Python | false | false | 479 | py | read.py | import sys
import csv
from lxml import etree
tree = etree.parse(sys.argv[1])
root = tree.getroot()
def polarity(s):
if s == 'Positive':
return 1
elif s == 'Negative':
return -1
elif s == 'Neutral':
return 0
with open(sys.argv[2], 'w') as fout:
writer = csv.writer(fout, delimit... |
80b3eb88efda6693ce5d3c5ed479b2aeaadc77ef | e5679caa3844484947a961294fd10297e9b7b0eb | /nas_down.py | 4261b58ab7050209128acac29bc85281eca0bf14 | [] | no_license | y0ngma/computervision | d0e4de7f4aeba440113cd0b71ae6df64492a419f | b1b196a4319c8b1e3f114fd3b80bbfd074821161 | refs/heads/main | 2023-07-12T18:17:23.423662 | 2021-08-27T07:25:06 | 2021-08-27T07:25:06 | 379,483,562 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,114 | py | nas_down.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import glob, os, sys, shutil
import time, datetime
# import numpy as np
import pandas as pd
import cv2
from myfunctions import zip_with_filecount_suffix, update_log_df, aimmo_xlsx
# NAS_DIR = "//192.168.0.12/homes/brooks/DONJJANG"
# NAS_DIR = "/home/qtumai/jason/nas/datas... |
ffd39dcd2973ac64ec3beaeb5561d3a529340a5a | 8ffa625a556de5da2b185d41d9b42c6e4d8ecf6b | /chapter-09/num_steps.py | f7dfe9abb04a4ea087536df7b292fc6e8cce2d47 | [] | no_license | mjpatter88/ctci | 531645ccf94d5797193018b856ab103cb6f207f5 | 86fd3be3bf12435acf6527dd5e84900a52f78497 | refs/heads/master | 2020-03-27T19:40:15.512100 | 2018-09-10T04:53:54 | 2018-09-10T04:53:54 | 147,004,369 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 599 | py | num_steps.py | from functools import lru_cache
@lru_cache()
def num_steps(num_stairs):
if num_stairs < 0:
return 0
if num_stairs == 0:
return 1
if num_stairs == 1:
return 1
return num_steps(num_stairs-1) + num_steps(num_stairs-2) + num_steps(num_stairs-3)
import unittest
class NumStepsTests... |
da919182e2638de556699f754bab1b595402fc60 | 6de964a2e086ca4f6841f36a654c178112cc1752 | /main.py | 7979d5d131fe67dc3f0f1faec9f59c74681e50dd | [] | no_license | thisisnotruben/ToW-tools | bc890a598a61a2de369428354a1e889051f8fbb9 | f247cc4ce26b591a79259433b92c841bca78267e | refs/heads/master | 2023-02-24T05:09:04.686097 | 2023-02-18T00:48:09 | 2023-02-18T00:48:09 | 237,826,059 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,931 | py | main.py | #!/usr/bin/env python3
import os
import sys
import enum
from core.game_db import GameDB
from core.image_editor import Color, Font
from core.tiled_manager import Tiled
from core.asset_manager import AssetManager
from core.archive_manager import Archiver
from core.game_dialogue import GameDialogue
class Commands(enum... |
26d14020417dd1b6ff217de9268432a269c694f0 | ab4be7a5aa22070a1d315ee887998cded0b6c75e | /ConvertToDictionary.py | e320faffbc104574bbe0be45b193fa7d2941b877 | [] | no_license | mprebello/xymon-haproxy-report | 2d1ba7dcd61dc7a9dcd0fed06c5b9474d7362ddb | c9f857526678aa61e7b449d8bed4e0f5ccbbda05 | refs/heads/master | 2021-05-21T22:44:56.193267 | 2020-04-03T21:18:58 | 2020-04-03T21:18:58 | 252,840,124 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,651 | py | ConvertToDictionary.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
class ConvertToDictionary(object):
def __init__(self, answer):
self.__answer = answer
def convert(self):
header = self.__capture_headers()
converted_to_dictonary= self.__group_by_svc(header)
return converted_to_dictonary
def __capt... |
89d16a869560103f606830f0c864314d625ffeaa | 5a9ed84261332eab29f4ba6c43904bcba7610812 | /set5_1.py | 8968437b0ebd632e620b761c00bdd89723974ce8 | [] | no_license | aswath1711/code-kata | 04da6c9fefcdc68aa0104c10e66babbce83ba112 | e3068a7852354facf498d99c805b38f738b855c6 | refs/heads/master | 2020-05-28T07:37:41.736156 | 2019-05-30T17:44:21 | 2019-05-30T17:44:21 | 188,924,352 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 82 | py | set5_1.py | n,t=input().split()
#print(n*int(t), "\n")
for i in range(int(t)):
print(n) |
702b7c9087537ab2cf2122b56b6991cb49bd29ea | 1c74938181fa93ee69ff45fc94822259ebddf050 | /Pytorch-LinearRegression/pytorch-linear-regression.py | ed9e6f1c742e754bd257c55690361d6f318cc3ed | [] | no_license | nirshad97/PyTorch-Study-Materials | 7720074f2cec82e47d5095103ac575b2df0bf645 | 5f35d574221c5aeb06a1d10541ea6262d7711a30 | refs/heads/main | 2023-05-14T15:40:56.141797 | 2021-06-02T07:45:56 | 2021-06-02T07:45:56 | 372,707,006 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,292 | py | pytorch-linear-regression.py | # Imports
import numpy as np
import torch
# We can define a model as follows
def model(x):
return x @ w.t() + b
# Defining a cost function
def mse(t1, t2):
error = t1 - t2
return torch.sum(error * error)/error.numel()
# Input (temp, rainfall, humidity)
input_array = np.array([[73, 67,... |
d44e34f365bf1f74cbfe7220fcf11e3419cc33a9 | ef9753e4965480806f16eb934f4f149ab13c7638 | /modules/wunderground.py | f827f724d5c8ea8d066e055480cab3d3946c6b11 | [] | no_license | kafitz/phenny | 851ee6f07a1589e1f18780f1eb9420ad5157c59f | ba8bedc9e416d7bf615776156c230437c436fa9b | refs/heads/master | 2021-01-17T12:30:37.476004 | 2013-03-21T23:55:02 | 2013-03-21T23:55:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,401 | py | wunderground.py | #!/usr/bin/env python
"""
wunderground.py - Phenny Weather Module for Interfacing with Wunderground API
Copyright 2008, Sean B. Palmer, inamidst.com
Licensed under the Eiffel Forum License 2.
http://inamidst.com/phenny/
Kyle Fitzsimmons 2013, http://kylefitz.com/
"""
from urllib import quote
import urllib2
from geop... |
8d483ea77060fd77693107bae1788da67a91099e | d58ddf0fd2a1082538c781d735d27154f7793e97 | /tests/test_parse_cupp_output.py | 98c2743485b328f44348704c55814c4f76607f6b | [
"MIT"
] | permissive | HobnobMancer/pyrewton | 54ae5189fe475fd6a802df3320b06c2db111580a | bc69a3b723e57bc5025bf0498b2c7ee6baf23eb8 | refs/heads/master | 2023-05-25T10:18:11.695302 | 2023-04-27T08:06:43 | 2023-04-27T08:06:43 | 243,783,792 | 3 | 0 | MIT | 2023-03-01T11:44:04 | 2020-02-28T14:41:39 | HTML | UTF-8 | Python | false | false | 1,887 | py | test_parse_cupp_output.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author:
# Emma E. M. Hobbs
# Contact
# eemh1@st-andrews.ac.uk
# Emma E. M. Hobbs,
# Biomolecular Sciences Building,
# University of St Andrews,
# North Haugh Campus,
# St Andrews,
# KY16 9ST
# Scotland,
# UK
# The MIT License
"""Tests for parsing output from eCAMI.
T... |
227a48c99711394597cfd1009cfd0adaf59894bd | fec5ad45753f4a55e7653f9cd64bd4a19a2c4de4 | /hamming_dist.py | 6315800e3dd043fd40f503ef06efed8195267a25 | [] | no_license | dezson/leetcoding-july | dce7f6ceb5934db927d82014cf9f9a3804fd4004 | 440fb35605a5c66c40ec42dbd535655e4791b85d | refs/heads/master | 2022-11-22T19:09:57.394262 | 2020-07-29T16:51:31 | 2020-07-29T16:51:31 | 276,682,678 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 766 | py | hamming_dist.py | class Solution:
def hammingDistance(self, x: int, y: int) -> int:
def intoByte(n):
ret = []
while n != 0:
if n % 2 == 0:
ret = [0] + ret
else:
ret = [1] + ret
n = n // 2
retu... |
22399daff3ce7e43c090f1f7e636cb1c308e6bee | 5dc35a39169d191166c44b7ac45389a14e5b0857 | /notifications/rest/segments/list-segment/list-segment.8.x.py | 02c7b551196d64074765da19eb24342a72e21af6 | [
"MIT"
] | permissive | TwilioDevEd/api-snippets | 035b7ceaf9c03c932010919ee1747bf895d4591e | ca6160d8e626bdf137f783324807285bb01d006f | refs/heads/master | 2023-08-17T19:20:35.751733 | 2023-08-04T18:47:58 | 2023-08-04T18:47:58 | 49,965,712 | 267 | 551 | MIT | 2023-09-11T14:04:34 | 2016-01-19T16:21:44 | Java | UTF-8 | Python | false | false | 493 | py | list-segment.8.x.py | #!/usr/bin/env python
# Install the Python helper library from twilio.com/docs/python/install
import os
from twilio.rest import Client
# To set up environmental variables, see http://twil.io/secure
ACCOUNT_SID = os.environ['TWILIO_ACCOUNT_SID']
AUTH_TOKEN = os.environ['TWILIO_AUTH_TOKEN']
client = Client(ACCOUNT_SID... |
87f3d56655ab637ea31801c52b966af4900d60b8 | 41dbaa0d745f9e52231ceb23f59b2b598672da63 | /pyinsteon/handlers/to_device/set_msb.py | 154c3b25abdc35042afce6c07f21f0d86a0bf722 | [
"MIT"
] | permissive | pyinsteon/pyinsteon | bdfbdcaf4f53ea40a6554b6cc5b939df3cd8079d | 3f74aec8491fbc118c4732dbd990d91d31705845 | refs/heads/dev | 2023-08-31T21:24:26.168609 | 2023-08-31T04:26:03 | 2023-08-31T04:26:03 | 147,454,081 | 26 | 24 | MIT | 2023-09-11T23:14:31 | 2018-09-05T03:25:10 | Python | UTF-8 | Python | false | false | 771 | py | set_msb.py | """Set most significant byte for peek/poke commands."""
from ...topics import SET_ADDRESS_MSB
from .direct_command import DirectCommandHandlerBase
class SetMsbCommand(DirectCommandHandlerBase):
"""Set most significant byte for peek/poke commands."""
def __init__(self, address):
"""Init the SetMsbComm... |
99a5ec0ee36afbab6cf5911d31d69cde8062ac83 | b817d88b16dd320446fc08c215411594d7941473 | /auto_rest/views/auto_rest_generator.py | ce628f2a3e49284665b3706ea2a549c9d4943d86 | [
"MIT"
] | permissive | borgespooja/django-auto_rest | ee06a4b7109d95eb08e8e091a5992e94f498bc2f | 5020d0b58816c64e9f8b90cd8bfa5292bd2911fb | refs/heads/master | 2021-01-17T08:05:13.372555 | 2017-03-05T09:36:30 | 2017-03-05T09:36:30 | 83,841,360 | 1 | 0 | null | 2017-03-05T09:36:31 | 2017-03-03T21:07:09 | Python | UTF-8 | Python | false | false | 2,883 | py | auto_rest_generator.py | from auto_rest.auto_serializer import AutoSerializer
from auto_rest.auto_viewset import AutoViewSet
from auto_rest.auto_url import AutoUrl
from django.apps import apps
import django
import argparse
class AutoRest:
"""
Encapsulates the logic for creation of serializers, views and urls.
AutoRest initialize... |
11736c43adf55fff430bf60824da8007d59c6cce | a2e48de6a3a7cb55e1ab8429406f8245b0b3823f | /birdseye/db.py | f781ad7656ecdbb210b31436eb92a81fa86b9a0f | [] | no_license | bugosiphionah/birdseye | f4bb2209e2502e8f3bbbd2b4294e0834364cabf8 | 5c1b5f32896705045a6b0e358b3f3cbc6f784eb4 | refs/heads/master | 2021-07-09T21:09:59.162268 | 2017-10-05T13:48:17 | 2017-10-05T13:48:17 | 106,085,217 | 0 | 1 | null | 2017-10-07T09:15:49 | 2017-10-07T09:15:49 | null | UTF-8 | Python | false | false | 2,889 | py | db.py | from __future__ import print_function, division, absolute_import
from future import standard_library
standard_library.install_aliases()
import json
import os
from humanize import naturaltime
from markupsafe import Markup
from sqlalchemy import Sequence, UniqueConstraint, create_engine, Column, Integer, Text, Foreign... |
9d15c479f6a1c6e5da873c6378cf8238b177cc98 | beba375a0daf47032e782bfab56997f925201258 | /collage/faculty/views.py | 8a97b6619638a5088cbb7c727ba0dfcc3354425c | [] | no_license | nelvinpoulose999/Python-Django | 1195e0e0d9f5ea7e7588377633fc3b7156811e38 | af98b1fc0b155dec08780aa3e0d0786fe6981c6d | refs/heads/master | 2023-04-20T05:20:30.438016 | 2021-04-27T15:33:30 | 2021-04-27T15:33:30 | 362,162,630 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,673 | py | views.py | from django.shortcuts import render,redirect
from .form import FacultyRegisterationform,FacultyLoginForm
# Create your views here.
# Registeration
def get_register(request):
form=FacultyRegisterationform()
context={}
context["form"]=form
if request.method=='POST':
form=FacultyRegisterationform... |
0770d0641c0ef257ba9673da67a0afc5d536ac76 | e07fb7ec25a9a7cab2203e6f3bd07ec6f77ed5c1 | /dash/read_binned_templates.py | 42992f42f58ad2c1a275a6ef5d7eb4b4e88b58e9 | [
"MIT"
] | permissive | Python3pkg/DASH | 24f4df69de77205cb0c05765e88074c654c9cf20 | c8589ade1ecbe96d61850a23aeba631f83688dcc | refs/heads/master | 2021-01-21T17:29:25.224057 | 2017-05-20T10:10:01 | 2017-05-20T10:10:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,358 | py | read_binned_templates.py | import numpy as np
import os
from dash.preprocessing import ProcessingTools, PreProcessSpectrum
from dash.combine_sn_and_host import zero_non_overlap_part, normalise_spectrum
scriptDirectory = os.path.dirname(os.path.abspath(__file__))
def get_templates(snName, snAge, hostName, snTemplates, galTemplates, nw):
snI... |
d39ef0bdf704dc6e26a1c22e5519e5a953c4a4db | d873d529a24a30e2a9fc3e5a15ef6fe595c1423e | /blockchain-env/Lib/site-packages/pubnub/endpoints/objects_v2/channel/remove_channel.py | 2f75a17b7ff53739a50372dffe3fc1ad9fbc9e4b | [
"MIT"
] | permissive | AdityaStark7/blockchain_backend | 2731d733a0029614565b484ec5820d04f615bfe7 | a019dda3bd4160ae962ced5bd95d060ad33f7f07 | refs/heads/main | 2023-08-19T12:26:38.211892 | 2021-10-15T05:31:18 | 2021-10-15T05:31:18 | 385,313,460 | 8 | 1 | MIT | 2021-10-11T17:28:22 | 2021-07-12T16:31:53 | Python | UTF-8 | Python | false | false | 990 | py | remove_channel.py | from pubnub.endpoints.objects_v2.objects_endpoint import ObjectsEndpoint, ChannelEndpoint
from pubnub.enums import PNOperationType
from pubnub.enums import HttpMethod
from pubnub.models.consumer.objects_v2.channel import PNRemoveChannelMetadataResult
class RemoveChannel(ObjectsEndpoint, ChannelEndpoint):
REMOVE_C... |
90909e6ff54c94156defb7a7443a1063a3fc88db | f1abcd9a80b9bef9d8b000822cbe49b00affc012 | /dynamic.py | 93d54eff3e83a0f11f37259575ce69f7be743b84 | [] | no_license | Jullianos/dynamic | 26cf00449f3d985f549842880bbccdcca5ddcd25 | 73fa109a339be97b99219d6caae67a6c00d97649 | refs/heads/master | 2022-12-13T10:35:53.565471 | 2020-09-10T11:24:56 | 2020-09-10T11:24:56 | 294,354,358 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,857 | py | dynamic.py | """
Created by Adrian Kostoski on 14/08/2020
Python script that strips unnecessary files from a ReactJs production build APP and
renames random generated names of static files to more Dynamics friendly filenames,
ready to be uploaded as Dynamics 365 web resources.
REQUIREMENTS:
- Python 3.8+
USAGE:
... |
9cb8fc9ef35e410bf585ecf88655502e6ef3b86c | db64e360f4f0a87d09f8730c9499f40561e38811 | /src/Entities/Player.py | 85956d0bf986a87b4125efe53a706244cb829a43 | [
"MIT"
] | permissive | BobMak/SpaceShooter | 9006f1929e528de9173006c736b9e1876d5f516f | ae2725fee90b01993f71f5a6bbe6d48f89b70704 | refs/heads/master | 2022-09-13T02:53:09.822363 | 2022-09-08T04:53:31 | 2022-09-08T04:53:31 | 116,071,694 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 3,698 | py | Player.py | import pickle
import threading
import pygame
import pygame.gfxdraw as gfx
from Core import Controls, Assets, State
from Core.Mechanics import Animation
from Ships.Ship import Ship
class Player(Ship):
def __init__(self, img, x, y, lives, **kwargs):
super().__init__(img, x, y, **kwargs)
self.ships... |
da6735020c4080370b0a58df73581a0fa9aa33f9 | d41c96aaf5dd0ded6b9e824cfd3128f55f25072c | /setup.py | 21873bd098b14808773f3919e7dd504027b3e0c4 | [
"MIT"
] | permissive | sharadboni/Telepathist | 49773bd20a6d5904c6053365c701dc0eaac23924 | f5ce19ecfc57c1072879ba65ed303848711e2694 | refs/heads/master | 2021-01-17T12:12:08.819731 | 2015-03-08T18:48:41 | 2015-03-08T18:48:41 | 31,860,734 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 281 | py | setup.py | import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == 'win32':
base = 'Win32GUI'
executables = [Executable('Telepathist.py', base=base)]
setup(name='Telepathist',version='0.1',description='Artificial Intelligence Project',executables=executables) |
23135dc9e891d80e2d7fe04d6f2fb9350ee50a91 | 96a34a048c783a75736bf0ec775df22142f9ee53 | /packages/models-library/tests/test_utils_json_schema.py | 7689ff624e73cabc3d790b5d2dcb9d3978d00966 | [
"MIT"
] | permissive | ITISFoundation/osparc-simcore | 77e5b9f7eb549c907f6ba2abb14862154cc7bb66 | f4c57ffc7b494ac06a2692cb5539d3acfd3d1d63 | refs/heads/master | 2023-08-31T17:39:48.466163 | 2023-08-31T15:03:56 | 2023-08-31T15:03:56 | 118,596,920 | 39 | 29 | MIT | 2023-09-14T20:23:09 | 2018-01-23T10:48:05 | Python | UTF-8 | Python | false | false | 5,394 | py | test_utils_json_schema.py | # pylint: disable=redefined-outer-name
# pylint: disable=unused-argument
# pylint: disable=unused-variable
from collections import deque
import pytest
from faker import Faker
from models_library.utils.json_schema import (
InvalidJsonSchema,
JsonSchemaValidationError,
any_ref_key,
jsonschema_validate_... |
6fedf4f27a6470b1e1cdbe1322a25f4872f1956c | 4cb69e2f491be6b5ec432d3064e9bef49014e478 | /face_detection/test.py | 01ef85cc7296023c435dfa5f34df89eb47ac1567 | [
"MIT"
] | permissive | birladeanuadrian/land-drone | ff5288df19c31619e6f6899008ebadbba511c4b2 | 49e021b61c492f409f7dbd9497961ce24a4dc2c6 | refs/heads/master | 2023-01-09T09:54:37.170461 | 2021-01-27T18:21:04 | 2021-01-27T18:21:04 | 196,250,677 | 0 | 0 | MIT | 2023-01-07T08:13:47 | 2019-07-10T17:46:31 | Python | UTF-8 | Python | false | false | 100 | py | test.py | import cv2
import numpy as np
recognizer = cv2.face_FisherFaceRecognizer()
recognizer.train() |
c55dc92012ebe2f3c9f99827c676c55071afc20b | 7cdbca74e85ed4ddb5a47c3e6bdd2dcc3175cb95 | /ropgadget/ropchain/arch/ropmakerx64.py | 302e462fd2434022707d36bf2eae1d3d08516783 | [] | no_license | rwfpl/ROPgadget | 7846c93ddf0f5a674a101299d7250eb1020e3a5a | 2c86043447b33b4369ff68aec1395d0ba7c72f59 | refs/heads/master | 2021-05-03T16:58:39.325649 | 2016-10-26T16:45:07 | 2016-10-26T16:45:07 | 72,023,404 | 6 | 1 | null | 2016-10-26T16:39:43 | 2016-10-26T16:39:43 | null | UTF-8 | Python | false | false | 9,196 | py | ropmakerx64.py | #!/usr/bin/env python2
## -*- coding: utf-8 -*-
##
## Jonathan Salwan - 2014-05-13
## Florian Meier - 2014-08-31 - The 64b ROP chain generation
##
## http://shell-storm.org
## http://twitter.com/JonathanSalwan
##
import re
from capstone import *
class ROPMakerX64:
def __init__(self, binary, gadgets, libo... |
9fda6386602b4afede97ed2e0d97e3016239c3d3 | 9942cfc6bdb757a16aad6c039741fd087e236a0a | /0,4,5 comprahension.py | d9ab688f5d364f31b5966e484102c30d3c42b00d | [] | no_license | malleswar0511/Assignments | a538a4575af60560a7313752e4301d02ac6c2e0a | f2cddb768235bdac638ce8bbd5ce04e060b1ab52 | refs/heads/master | 2023-07-26T21:56:53.579839 | 2023-07-18T16:17:39 | 2023-07-18T16:17:39 | 246,755,648 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 198 | py | 0,4,5 comprahension.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 3 19:56:47 2020
@author: mahi
"""
list1=[12,24,35,70,88,120,155]
print([i for (n,i) in enumerate(list1) if n not in (0,4,5)])
|
715e523fd04b85fd8232031e69e15fb6c7a81a39 | 4024fe239706146a505bfc5451ee36137a2724f3 | /HandTrackingModule.py | 115f3558b41a78e5673bfa3d29da99cc4bc45b1b | [] | no_license | LokeshNakka/PythonRockPaperScissorGame | 50592e092742cc915afe5c4a59010127b92d9695 | 125e54c0af0bcc7bfa6c09302b2fddcda997744f | refs/heads/master | 2023-06-05T18:27:15.076004 | 2021-07-01T10:19:23 | 2021-07-01T10:19:23 | 381,927,783 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,758 | py | HandTrackingModule.py | import cv2
import mediapipe as mp
import time
class HandTrackingUtils:
def __init__(self, mode=False, max_hands=2, min_detection_con=0.5, min_tracking_con=0.5, color='#00000'):
self.color = color
self.static_image_mode = mode,
self.max_num_hands = max_hands,
self.min_detection_conf... |
fc8980b543013b03ccda3a20045013a65c8a42e4 | 1d5002a8f2b30b5990300569199e061815c95f9e | /Projects/proj 4 final.py | 2636a1c3c9db70ff87abd48d543831e16af2748c | [] | no_license | Ragaki01l/EE-381 | d17a42610cf52b0344f26323e6b57b3b98418e83 | a81f7e8c33698eb4bedd174b4651d9b6130dd248 | refs/heads/master | 2020-05-31T05:40:29.863732 | 2019-06-05T07:53:40 | 2019-06-05T07:53:40 | 190,122,902 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,598 | py | proj 4 final.py | # -*- coding: utf-8 -*-
"""
EE 381 Project 4
Name: William Jorgensen
I.D. #: 014721822
Start Date: 3-25-2019
End Date:
Project Description: Simulation of a binomial distribution with bar chat
Exercise 1: P({X=3}) = (5!/((3!)(2!)))(0.7^3)(0.3^2)=.3087
Exercise 2: n = 5, p = 0.7 thus mean is 5(0.7) = 3.5 and
... |
aec5919d5fe06be6adc42d30b8f040de256e691d | c6c385f69b1111f4110309002e849ba0acb44e02 | /defterler/defter4modular.py | 89238d8de9630ad6025e00bb213d6ec4c90a2196 | [] | no_license | serdarbababa/test1 | 530e3757cbf4054a305a6f96eba140eb828008dc | 1b52f3c4729c28df3e1420fec48ae987eb8e84d8 | refs/heads/master | 2020-05-23T03:06:27.979768 | 2019-11-25T18:30:40 | 2019-11-25T18:30:40 | 44,680,576 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,350 | py | defter4modular.py | import numpy as np
from pywt import wavedec
import matplotlib.pyplot as plt
from networkx.drawing.nx_agraph import graphviz_layout
import networkx as nx
import pandas as pd
import seaborn as sns
plt.rcParams['figure.figsize'] = [25, 20]
def genData(param, show = False):
a=[]
if param[0]=="normal":
mu, sigm... |
e39d219080463dd35454fe02b5375f074a1e5192 | 9c29c468f5bb60ed60fbc9cff8d8c9cb8534b526 | /amsn2/gui/front_ends/qt4/ui_contactlist.py | 6a05151d5fce2d608948549dd7f49360eb260871 | [] | no_license | lalitjsraks/amsn2 | 19a4a85d6bbad0d429bc42968263bd0ba3e9418d | 1893e727b7e5935491ba1827c6b457661fe7bb68 | refs/heads/master | 2021-01-17T22:38:33.816847 | 2008-10-07T07:47:30 | 2008-10-07T07:47:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,914 | py | ui_contactlist.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'contactlist.ui'
#
# Created: Mon Oct 6 02:07:09 2008
# by: PyQt4 UI code generator 4.4.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
class Ui_ContactList(object):
def setupUi(self, Con... |
8b4478fa4b4ea65b9be69d759650f3bcfa00ada8 | 39238ea5a7d9d2afbf7e667de5ac1787b0c876d9 | /app/chat_app/serializer.py | 4aa84514691f310fcdbc4966e54b2375f7d30820 | [] | no_license | tejar-008/Riktam-GroupChat | 263d7ed52c0e4ca1daf68135e191921d0fbda272 | ab4cecafeaf15322ad06b49426a90644b283ddcd | refs/heads/master | 2023-06-05T13:27:00.019445 | 2021-06-21T05:19:39 | 2021-06-21T05:19:39 | 378,714,508 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,312 | py | serializer.py | from rest_framework import serializers
from django.contrib.auth import authenticate
from django.utils.translation import ugettext_lazy as _
from .models import Group, GroupMessage
from user_app.serializer import userSerializer
class groupSerializer(serializers.ModelSerializer):
members = userSerializer(read_only=... |
2c13bf972948219ac8f4a36c216d183839bbca76 | 668e5219a68374c14b32b9d22128fdb1aca05c81 | /正则表达式.py | f0b46d0ebe13b22e97db28f65b62756a0f057140 | [] | no_license | 1368334540/Python | c61f595950daa5f223aebd67d12f33a81e23dda0 | 8c5d4d306ae8a0fd74cb26bbdcf0d1d25992d411 | refs/heads/master | 2020-06-19T16:41:32.070938 | 2019-07-23T15:48:36 | 2019-07-23T15:48:36 | 196,729,752 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 136 | py | 正则表达式.py | import re
a="abbaabab"
pat = r"a.*b"
pat1 = r"a.*?b"
result = re.findall(pat,a)
result1=re.findall(pat1,a)
print(result)
print(result1) |
fc8ff58b54b2d8011bbee2ab475766d4fdc65f50 | 52dd0520a701959886a780eba31d7e75063d3c53 | /neuralnetworktesting.py | 3ef80bc9b070434bf996f60ac5969d09a519dc8d | [] | no_license | jaceyca/SentimentAnalysis | 080d9b48d8ffd9839e1964573a608c45f1e339cd | d55ebe217ffab5d8256f05b8557c076f2a0aaac9 | refs/heads/master | 2021-05-09T00:35:45.242532 | 2018-02-12T06:31:36 | 2018-02-12T06:31:36 | 119,750,116 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,038 | py | neuralnetworktesting.py | import numpy as np
import pathlib
from datetime import datetime
# classifiers
from sklearn.ensemble import AdaBoostClassifier, GradientBoostingClassifier, ExtraTreesClassifier, RandomForestClassifier
from sklearn.linear_model import LogisticRegression, PassiveAggressiveClassifier, RidgeClassifier, SGDClassifier
from s... |
a66e02f1efa9be28ed956d373edd8f3748233570 | 53c25a0ae0935cfd000109d39a3f814130ed806b | /dingding/dingtalk_crypto/utils.py | 025aafc82efcec7a35ccdd40ed326af8ab81044c | [] | no_license | gilbert-yuan/odoo_dingding | 67aee7b3a0f61183ea08afa15771cc00071cce9d | 9711a27b5e7308093a90507617e90e0b6a5d0c8f | refs/heads/master | 2021-05-12T17:42:21.352750 | 2019-04-11T03:34:27 | 2019-04-11T03:34:27 | 117,052,025 | 41 | 27 | null | 2019-03-30T08:44:01 | 2018-01-11T04:55:37 | Python | UTF-8 | Python | false | false | 614 | py | utils.py | # -*- coding: utf-8 -*-
import time
import datetime
import StringIO
import random
import string
import contextlib
alpha = string.letters + string.digits
def get_timestamp():
"""
生成现在的Epoch时间
:return: int
"""
now = datetime.datetime.now()
return int(time.mktime(now.timetuple()))
def random_... |
91fdde1807c24a8259a5fc5de75b91c280f8b241 | a44586710c45515f8c97ad95c782dfd438e385f4 | /source/functions.py | 266b564ef6cd09fd0977eca958a28becb7704a5c | [] | no_license | hanmingz/crashCart | e7779b029ec9262b8e5f93c8a094b56fddc65927 | 8bc65712dfd4103525877ab38b5387f840151ba5 | refs/heads/master | 2020-03-31T23:21:36.215508 | 2018-10-14T15:35:20 | 2018-10-14T15:35:20 | 152,652,396 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,516 | py | functions.py | import socket
from parse import *
from getmac import get_mac_address
import mysql.connector
import time
import datetime
import tkinter as tk
def getMac():
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
ip_addr = s.getsockname()[0]
s.close()
ip_field = parse("{}.{}.{}.{}", ip_addr... |
4a853b65d4687db4cee1e3090d0e3bcc72e3d5f3 | ee09e79c11b68e9ee303fa9cd8c9f0e550666ffa | /encdect.py | 3286398a5fceb3f9457a9af5bd3f998e14927dde | [
"MIT"
] | permissive | ketozpw/py-encoding-detect | 6b6fb1f701d7f2215fb65d056435c15de94cc9c0 | 58d8c7fe861c9450aed902f9003ca9c24ac363d4 | refs/heads/main | 2023-02-16T21:15:20.921986 | 2019-09-23T02:14:08 | 2019-09-23T02:14:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,744 | py | encdect.py | class EncodingDetectFile:
ENCODING_ASCII = 'ascii'
ENCODING_UTF_8 = 'utf_8'
ENCODING_UTF_16_BE = 'utf_16_be'
ENCODING_UTF_16_LE = 'utf_16_le'
# http://unicode.org/faq/utf_bom.html#BOM
BOM_UTF_8 = '\xef\xbb\xbf'
BOM_UTF_16_BE = '\xfe\xff'
BOM_UTF_16_LE = '\xff\xfe'
BYTE_EOL = (13,10) # \r\n
UTF_16_NULL_PERC... |
38aaa1f6b0e99ab9f6beb6727658a63662e043f4 | 6c3b41dd71638f6bbd0dbe7553b6ab384c167e22 | /basic/parts/solenoid.py | f4c390e96fe378db96dbf78392cf038fe05c00b5 | [
"MIT"
] | permissive | kotaproj/pi_recipe | 4711ad64f3709e25d987751c1dc9664906d82c54 | ea53a7e26d6c2b83ecf7617b515086b44aeddb23 | refs/heads/main | 2023-06-29T12:03:21.827153 | 2021-08-09T02:22:48 | 2021-08-09T02:22:48 | 367,602,276 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 503 | py | solenoid.py | import sys
import time
from gpiozero import OutputDevice
from gpiozero.pins.pigpio import PiGPIOFactory
# pin settings
SOLENOID_PIN_0 = 21
def main():
# use pigpio
factory = PiGPIOFactory()
sole_pin = OutputDevice(SOLENOID_PIN_0, pin_factory=factory)
args = sys.argv
count = int(args[1])
# pu... |
50db5e8bbd7862cac0f38bb85c779c88a70855c5 | 9131701812d5d9bd4790b09f56f2a578143660d6 | /src/main_project.py | fa1496d38bec5760e75e0cb02735da1bf6e950f9 | [] | no_license | lavakin/kd-tree_for_periodical_data | 2c87439bf20b645bbe005fa8ad0f6def86027d92 | ba49744ee47c5cf7a0644d702dfcfa8026d083f2 | refs/heads/main | 2023-03-30T05:19:20.972143 | 2021-03-31T16:43:22 | 2021-03-31T16:43:22 | 325,111,592 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,419 | py | main_project.py | import numpy as np
import time
import settings
import angle_operations
from sklearn.neighbors import KDTree
def modify_input(vector): # modifies angles, that are not in the range (range given by the median)
non_periodical = vector[len(vector) - 2:]
non_periodical = np.array([x*32 for x in non_periodical]) #*... |
e6a687ec27221aea6cb02749f9a9cc47c283093d | a99dbd44f32b0a8b4cc440b84c63f1b662a04fdd | /setup.py | 2d7533620fc2d9ba905febf00c5d8895755aa347 | [
"Apache-2.0"
] | permissive | modem888/thai2transformers | 48cbda8bd6a47b785c83a450750d911e5f5d4f6e | 04716ecb9a88c1b1ea08d63511265245d53b1eb9 | refs/heads/master | 2023-08-26T11:14:40.202643 | 2021-10-31T16:58:59 | 2021-10-31T16:58:59 | 423,199,517 | 0 | 0 | Apache-2.0 | 2021-10-31T16:24:12 | 2021-10-31T16:24:11 | null | UTF-8 | Python | false | false | 2,154 | py | setup.py | # -*- coding: utf-8 -*-
from setuptools import find_packages, setup
with open('README.md', 'r') as f:
readme = f.read()
requirements = [
"torch>=1.5.0",
"transformers==4.0.0",
"sentencepiece==0.1.96",
"emoji",
"pythainlp>=2.2.4",
"tqdm",
"datasets>=1.2.1",
"sefr_cut",
"seqeval",... |
e5e33d814ca8a6afc9e31ad6947e3c38002cdf28 | 69f4703ce0a2878202fcff98e71e6666fc704fab | /application/hooks/requests.py | 23dcd793f098d0bde7ef4869b2fea2fde628e80f | [] | no_license | braincxx/ncisGRIPP | b399c97fc90dea48b612211443ff46c6564c5397 | 03613ff6dfa3de36c65431f3182fbbbcbd3adfcf | refs/heads/master | 2022-11-26T20:19:23.576660 | 2020-08-08T02:50:41 | 2020-08-08T02:50:41 | 285,849,634 | 0 | 4 | null | 2020-08-07T16:19:50 | 2020-08-07T14:32:57 | null | UTF-8 | Python | false | false | 387 | py | requests.py | from flask import render_template
from werkzeug.exceptions import HTTPException
from app_instance import app
# @app.errorhandler(Exception)
# def handle_exception(error):
# return render_template("errors/generic.html", error=error,
# page=dict(title='Непредвиденная ошибка', heading='Неп... |
a77121d569a46b697ae36a07e40f89f8a1734658 | a123b3abbe2925fcddab4cf510cdfe4cb2471344 | /examples/fosdem_2015/worker.py | d982633713a98fb2f2db17aa772dffbbbc5ff12c | [
"MIT"
] | permissive | olivierh59500/ZeroServices | 995d79bdc7b4ca78178c66e2c4170adb7cd34697 | c6b0bdf755be6bcc0ff6070aabcfb36f0e4c2f37 | refs/heads/master | 2020-05-30T12:16:25.983866 | 2017-03-30T18:32:55 | 2017-03-30T18:33:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 989 | py | worker.py | import asyncio
from zeroservices import ResourceWorker, ZeroMQMedium
from zeroservices.discovery import UdpDiscoveryMedium
class PowerWorker(ResourceWorker):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Process each resource in status building
self.register(se... |
50c994d83f024a7d9f0d481079ecb99610d7a5cb | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02647/s383535809.py | 48d9ddea8e7e41dce87c4c2c58c5c3b4f5080371 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 382 | py | s383535809.py | import math
import numpy as np
n,k=(int(x) for x in input().split())
a = [int(x) for x in input().split()]
for _ in range(k):
new_a = np.zeros(n+1,dtype=int)
np.add.at(new_a, np.maximum(0,np.arange(0, n)-a), 1)
np.add.at(new_a, np.minimum(n,np.arange(0, n)+a+1), -1)
a = new_a.cumsum()[:-1]
if np.... |
fb1fbfe4eea8653cb870d5608f2f94b1597cc5dc | 077ce95fe81ec2c49a0be1b2647d9977c9facaf8 | /semcal/flask_app.py | 995f6063bb6a0b3b29b3d6741c89fcddb498e0ea | [
"MIT"
] | permissive | jamesabel/semcal | 051c0ad59967c4cf2998e9c156b3a52db0f0db68 | b73d8eb9504fa801157c861e6dd5944f0fe6f5dc | refs/heads/master | 2020-05-09T12:43:34.384666 | 2019-04-16T07:07:18 | 2019-04-16T07:07:18 | 181,121,083 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,531 | py | flask_app.py |
import json
import requests
from flask import Flask, Response
app = Flask(__name__)
mime_type = 'text/plain'
@app.route('/')
def root_route():
return Response(response='usage : python.semcal.org/<package>[==<version>]', mimetype=mime_type)
# todo: should this be <package>[==<version>] or <package>[/<versio... |
8314ebe47c2c0837ac4ee0fa5ad8aa10277844ba | c285e2f5621b10628795eaca34ae1c03e452dd5d | /inkybase/admin.py | 628bab66fc38ce75d43de2de2b915b595e68f953 | [] | no_license | Spark-Team-Project-Inksquad/InkBuddy | 4efdf389837464ede44dde905dcd5e0e1e165f05 | 6ff17b28d4765deac1ae84cbf866ce1516051249 | refs/heads/backend-dev | 2022-12-22T23:38:20.829628 | 2019-04-25T05:37:05 | 2019-04-25T05:37:05 | 164,381,664 | 0 | 0 | null | 2022-12-08T01:33:39 | 2019-01-07T05:16:51 | Python | UTF-8 | Python | false | false | 435 | py | admin.py | from django.contrib import admin
# import models
from .models import Account, FavoriteVendor, VendorReview, Document, Order, VendorSpec, Chat, ChatMessage
# Register your models here.
admin.site.register(Account)
admin.site.register(FavoriteVendor)
admin.site.register(VendorReview)
admin.site.register(Document)
adm... |
3b12f2dd50fd7368f6c9e12c82fd71e42314f55e | 19396c8109da5884f2351fa93518aff0d8bb81e6 | /scrapy_words/pipelines/pipelines_request.py | 1ca39d52e68eac7818af37dd86fb3684b076dd5d | [] | no_license | OHS2020064/2020064-words-dictionary | 3797c3429fc8f3bbe399eafe95539ca19cd63b5a | 157dfd6cc84df4427020a9e4a6c0c0e4722859fb | refs/heads/main | 2023-02-25T23:35:47.464868 | 2021-02-03T01:14:24 | 2021-02-03T01:14:24 | 330,590,956 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,450 | py | pipelines_request.py | # -*- 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 json
import grequests
from scrapy_words.configs import scrapy_configs
from scrapy_words.utils.logger_utils import logger... |
018a40d6a4ba5160eaf39679c5620041ed80cdfe | 0657d8214e6b98cba624f9f1a19aa4bae4334c0f | /bmi.py | 7a13bf0ccb58028a8ed4f05478071ef07f4cb1c6 | [] | no_license | Anashua/Project.py | 2c0b787f60341bb9dd78942fcc748cb08dbd0a49 | 0b31f169514018a009e3162f1ea33b877aaafe88 | refs/heads/master | 2023-03-19T21:18:28.335698 | 2021-03-17T04:26:30 | 2021-03-17T04:26:30 | 343,044,331 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,390 | py | bmi.py | def body_mass_index():
def bmi(w, h):
return w / (h ** 2)
def child(hei, wei):
index = bmi(wei, hei)
index = int(index * 10)
val="indeterminate"
category = {range(0, 5): 'Underweight', range(5, 85): 'Healthy weight', range(85, 95): 'At risk of overweight',
... |
278e7bf72d7a601472750ec45c420c412edca25a | 94a2f42c405720106382936de27094f10893a8b9 | /openmmforcefields/tests/test_amber_import.py | 38024c3874da828b37b863be770da35c99723c61 | [
"MIT"
] | permissive | openmm/openmmforcefields | ee04ec380aeb141ab12e0ddae134d729eee465de | 397049805c0f22d74a22ee2d535b3dd9c0e59fea | refs/heads/main | 2023-08-17T11:12:49.195481 | 2023-07-27T21:41:33 | 2023-07-27T21:41:33 | 70,107,487 | 150 | 52 | NOASSERTION | 2023-09-05T23:59:14 | 2016-10-05T23:26:34 | Python | UTF-8 | Python | false | false | 2,094 | py | test_amber_import.py | """
Test AMBER forcefield imports.
"""
import pathlib
from typing import List
import pytest
from openmmforcefields.utils import get_ffxml_path
amber_ffxml_filenames: List[str] = [
'amber/' + file.name for file in pathlib.Path(get_ffxml_path()).glob("amber/*xml")
]
@pytest.mark.parametrize("filename", amber_ffx... |
e7c636ec3b2a0f6e5cf9c56c9034280db90669cf | f198bfd98165001782ba97b0c12cac01453a8309 | /server/handlers/template_handler.py | c63c5bf7b73df367f8c9b8d3dcc7a83571cfe686 | [
"Apache-2.0"
] | permissive | adambyram/bite-project-mod | af120bb3ad2e64dea1dbf85a0b317f10cea21e51 | 1b3a86ed01d7d47d20166d49b090d846cc98aa66 | refs/heads/master | 2021-01-10T20:57:14.547373 | 2012-03-26T18:51:16 | 2012-03-26T18:51:16 | 4,165,080 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,800 | py | template_handler.py | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... |
93952d3acce005e2e78fc42ef2ec94dfb947eeec | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02755/s827566351.py | 92b4fbfb21ab35abe9026d402db69f3278ef2dbd | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | py | s827566351.py | A, B = map(int, input().split())
a_0 = int((25 * A + 1) / 2)
a_1 = int((25 * (A + 1) - 1) / 2)
b_0 = int(10 * B)
b_1 = int(10 * (B + 1) - 1)
if a_0 >= b_0 and a_0 <= b_1:
print(a_0)
elif b_0 >= a_0 and b_0 <= a_1:
print(b_0)
else:
print('-1') |
e18eca2111d5deaa5dcd6f05a72d989efa30f3fe | ae77ee7d11f427cdd7cecf7481833fd7dea717fb | /example/example_Ai_BH_channel.py | fd75e31d88b8852e135f60ef14fdb426f1e1d4df | [] | no_license | XDfield/danmu_wc | b55f836893e610238c827fb685dad6d7cb3f9295 | 7b5c89dfd3b9bf9e1f900d1b7e9fb106d95140e0 | refs/heads/master | 2021-01-25T11:33:59.785068 | 2018-03-01T09:37:29 | 2018-03-01T09:37:29 | 123,410,024 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 451 | py | example_Ai_BH_channel.py | from lxml import etree
from danmu import Danmu
file = 'BH_channel.html'
tree = etree.HTML(open(file, 'r', encoding='utf-8').read())
aids = tree.xpath('//li[@data-aid]')
aid_list = list()
for li in aids:
aid_list.append(li.attrib['data-aid'])
d = Danmu(aid=aid_list)
d.generate_wc(
scale=8,
max_words=2000,
... |
8443bbc29e9a1c18708011884b0f2c355dea2366 | d7c817620ba1e2802fadff8b0b88fc4601a317f9 | /Same_Tree#3/SameTree.py | 94bf63f2aed6a079814eda29312c3e025bfc2ee1 | [] | no_license | AKLeee/LeetCode_OJ | 62fb9064dc9f638d165c2ab1cf494fbadd4d7f7b | 544bdc4d2a0695de9a009e90f541d9ce0ae7e1a6 | refs/heads/master | 2021-05-30T17:06:51.909166 | 2016-02-21T20:50:46 | 2016-02-21T20:50:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,396 | py | SameTree.py | #Given two binary trees, write a function to check if they are equal or not.
#Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None... |
0a0bdc1534a7345973021731e8d8a056c817ca08 | ef6db15efda8b7b472b73ebd6bea3530ab30d45a | /tests/engine/library/test_register_object.py | 1e2c8ea16e2d6dd03c107c0ba7acf8f8f067a827 | [
"BSD-3-Clause"
] | permissive | Denisfench/openclean-core | 57698fc9ac8b1bccc848262721d0e705529cf27f | e3d0e04f90468c49f29ca53edc2feb12465c24d5 | refs/heads/master | 2023-09-01T02:21:35.133098 | 2021-10-04T19:34:57 | 2021-10-04T19:34:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,620 | py | test_register_object.py | # This file is part of the Data Cleaning Library (openclean).
#
# Copyright (C) 2018-2021 New York University.
#
# openclean is released under the Revised BSD License. See file LICENSE for
# full license details.
"""Unit tests for registering objects via the openclean library."""
from openclean.data.mapping import Ma... |
acdedf549e361e049e269e7b453c9bb166799992 | 8cadbf2782eb3241343df2d4bcbde313e130051d | /layer5.py | c90908229a2a9ed5d4fe10ce717f0ef0d790cc3f | [] | no_license | neon-ninja/data_onion | 93b8aab64855e89affab910322e723c158562f65 | 78c2a1265c60883a08f4ea09a52130a37fcd725d | refs/heads/master | 2022-12-19T14:47:00.263512 | 2020-10-05T00:23:53 | 2020-10-05T00:23:53 | 273,383,454 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,226 | py | layer5.py | #!/usr/bin/env python3
import base64
from Crypto.Cipher import AES
from Crypto.Util import Counter
import struct
QUAD = struct.Struct('>Q')
with open("layer5.txt", "r") as f:
encoded = f.read()
decoded = base64.a85decode(encoded, adobe=True)
KEK = decoded[:32]
IV = QUAD.unpack(decoded[32:40])[0]
WRAPPED_KEY ... |
396680b56a1c691ef72c446ae111189b275d00a7 | a560269290749e10466b1a29584f06a2b8385a47 | /Notebooks/py/priyansh2/titanic-machine-learning-from-disaster/titanic-machine-learning-from-disaster.py | cf9f9a760bc4b301a69688b3912db82c4b07cb4d | [] | no_license | nischalshrestha/automatic_wat_discovery | c71befad1aa358ae876d5494a67b0f4aa1266f23 | 982e700d8e4698a501afffd6c3a2f35346c34f95 | refs/heads/master | 2022-04-07T12:40:24.376871 | 2020-03-15T22:27:39 | 2020-03-15T22:27:39 | 208,379,586 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,242 | py | titanic-machine-learning-from-disaster.py | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
# This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load in
import pandas as pd
import numpy as n... |
2a5200465d5287285c3d95494e82a1faa7c9054f | bcfa1ded975f847e9ad09055a65a9f8543ef12a3 | /sem2/agent-based modelling/l1/forest_fire.py | db9e0705592d9833d143b3218a9cdd8d3fbf48a9 | [] | no_license | szkutek/apma | 58a4940c805a076e7d7179c9864cfceb2b58afe5 | f767d131d144bed8f7ff98cc3dfafeedbd5600e9 | refs/heads/master | 2021-09-11T20:49:59.269895 | 2018-01-21T23:18:49 | 2018-01-21T23:18:49 | 105,787,533 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,953 | py | forest_fire.py | import random as rnd
import numpy as np
# 'T' tree; 'X' fire; ' ' empty; '_' burned tree
# 1 tree; 2 fire; 0 empty; 3 burned tree
def forest_fire(p, L, Dir='0', Str=1):
return automaton(start_fire(make_forest(L, p)), Dir, Str)
def make_forest(L=10, p=1.0):
pom = np.zeros([L, L])
for i in range(L):
... |
b3c21bf5f1d88b46494fee4d065fae641e8c28df | ca516eb5e3ee1f393448c40fec08408f464420e5 | /dev_satellite/Demo/marea/urls.py | c3ad6a49f6857d65bd4acb1e43d6f635866c0b03 | [] | no_license | JarlOfCode/IndeFormProject | f0a3938568ad60e6c712ff4f94b87c11673f07fe | 51c09f23432166c7a112f5c909fc95aec2f2af59 | refs/heads/master | 2020-05-02T06:08:36.073397 | 2019-06-24T22:09:25 | 2019-06-24T22:09:25 | 177,787,567 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 274 | py | urls.py | from django.contrib.auth.decorators import login_required
from django.urls import path
from django.views.generic import TemplateView
app_name = 'marea'
urlpatterns = [
path('', login_required(TemplateView.as_view(template_name='marea/home.html')), name='home'),
]
|
d4ab0fe272e86f6f312410c2fbd66903c4d20c36 | b7f60cb71343d92b47510df452cf6cec9000262f | /tkwidgettree/tkwidgettree.py | 351160acfd163e3e42b40457dc691f25cb21fadb | [] | no_license | sthomen/tkwidgettree | b36c0a08d3bdf439da9252fa190e909939e80a6a | fa678753eed3c814883a26fdaba34d22346f4521 | refs/heads/master | 2021-01-19T12:37:14.513005 | 2017-02-21T19:26:04 | 2017-02-21T19:26:04 | 82,327,103 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,797 | py | tkwidgettree.py | # vim:set ts=4 sw=4:
import tkinter as tk
import tkinter.ttk as ttk
class TkWidgetTree(object):
"""
This simple class wraps Tk (and ttk) widgets for easy construction from a dict
tree.
Usage is preferably done through the from_dict static method rather than
initialising the object yourself.
"""
def __init__(... |
ad1c182a55375194b3c6bbae012bb87efbecbd3e | ac5e52a3fc52dde58d208746cddabef2e378119e | /exps-sblp-obt/sblp_ut=3.5_rd=0.8_rw=0.06_rn=4_u=0.075-0.325_p=harmonic-2/sched=RUN_trial=0/sched.py | e5b964d3a1cccca48854e6e561efb77a5f953bb7 | [] | no_license | ricardobtxr/experiment-scripts | 1e2abfcd94fb0ef5a56c5d7dffddfe814752eef1 | 7bcebff7ac2f2822423f211f1162cd017a18babb | refs/heads/master | 2023-04-09T02:37:41.466794 | 2021-04-25T03:27:16 | 2021-04-25T03:27:16 | 358,926,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 547 | py | sched.py | -S 1 -X RUN -Q 0 -L 3 91 300
-S 0 -X RUN -Q 0 -L 3 90 300
-S 0 -X RUN -Q 0 -L 3 69 300
-S 0 -X RUN -Q 0 -L 3 52 200
-S 2 -X RUN -Q 1 -L 2 48 400
-S 2 -X RUN -Q 1 -L 2 46 200
-S 2 -X RUN -Q 1 -L 2 41 300
-S 2 -X RUN -Q 1 -L 2 39 175
-S 3 -X RUN -Q 2 -L 1 36 400
-S 3 -X RUN -Q 2 -L 1... |
bf9e3505405e98bc5c62138f3c7cb32a70ee735a | ad614b900cb50e22f65c8eccf9a1d588deb69c18 | /MyPlane/tempCodeRunnerFile.py | 17c60fb3abd91c2ac930d72ce277d0d29c4057e7 | [] | no_license | chumingzhang/Python | 2c0c082345458cf8a301b61de61b08899a241541 | dc25233a7f8368692b0dc7bbddc7ab3712fb2734 | refs/heads/master | 2021-05-17T07:32:40.027919 | 2020-04-14T05:55:45 | 2020-04-14T05:55:45 | 250,698,795 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 69 | py | tempCodeRunnerFile.py | E:/360MoveData/Users/复仇者/Desktop/大二上/Self-python/MyPlane/ |
64a6b64b1210bd5c4e785e678d9f5bafb194393b | 1c6a4936685ed196070fd21f8f7fdd29c6a8417b | /Tarea1.py | 71782778315ba0949051615ae1511afe4aad5a24 | [] | no_license | ConejaAvalos/Python | 83a3cf29bffaee94a72a0c914b85f0a031ba4fa2 | 5080df98014dd5cf957b9b9c3e7a49b2c0f200a3 | refs/heads/master | 2021-09-07T14:02:41.083588 | 2018-02-24T00:20:05 | 2018-02-24T00:20:05 | 113,401,016 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 364 | py | Tarea1.py |
"""
Regresa palindromo msá grande
Recibe:
tipo (str) - cadena con palindromos
"""
def pal(a):
count=[]
for j in range(len(a)):
for i in range(j,len(a)):
if a[j:i+1] == a[i:j-1:-1]:
count.append(i+1-j)
print("El palindromo tien de numero de letras :", ... |
3b6101eae1491857f40cd1ddad1387c095869865 | 368870f7808f8fbe2de7980c226f072dcf719b43 | /scripts/parse_imdb.py | 376ab778f699710e14c3f29677d85463e89d7c10 | [] | no_license | demimurg/fellini | d7c9e16739ac8ea63bbdada8d13fee00c20d3570 | 219f6034bf25e4ab703d505772478605aa367527 | refs/heads/master | 2023-04-02T08:33:15.126381 | 2021-04-08T14:00:16 | 2021-04-08T14:00:16 | 318,522,125 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,142 | py | parse_imdb.py | import requests
from bs4 import BeautifulSoup
import pandas as pd
from tqdm import tqdm
import os
top250url = lambda tok: "https://imdb-api.com/API/Top250Movies/" + tok
movie_url = lambda tok, idx: "https://imdb-api.com/en/API/Title/" + tok + "/" + idx
reviews_url = lambda idx: "https://www.imdb.com/title/" + idx + "... |
31723fdc308bac2eac314173cf8af313935b1aea | d828dc5fd8aeede2bc7557b8aa3b5e5e62182a2e | /src/main_generate_initial_condition.py | fc9dc8c231b70e3738b45f66c02a5740fe89a66b | [] | no_license | shiernee/Diffusion | e58a9ba2764c0b8115332a4bb300fd26ad7ef4b3 | 62bf057315fe239a1951abc049a8672c4ec085a2 | refs/heads/master | 2023-01-10T06:37:52.509089 | 2020-05-24T15:17:30 | 2020-05-24T15:17:30 | 253,961,786 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,501 | py | main_generate_initial_condition.py | import os
from os import sys, path
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
sys.path.append(path.dirname(path.dirname(path.dirname(path.abspath(__file__)))))
import numpy as np
from pathlib import Path
from src.utils.DataFrame import DataFrame
from Utils.Utils import xyz2r_phi_theta
def cos... |
f0e5fe3dcbebbe2f7deb532c7f76004bd47a361b | f603d96ba9b340fe47ad7a5c6cd50c3eb09ce2c9 | /babysister/frames_reader.py | 8aa098c5b6dca3cf67bb00bab2428187529a45ee | [
"MIT"
] | permissive | tranlethaison/babysister | c8663842160a3707393d27bef8f919c31ef0e6d5 | c80aea96d49aef5ec1d81e97cb07ab5ba68f2f90 | refs/heads/master | 2021-07-06T05:11:38.756967 | 2020-09-18T03:03:11 | 2020-09-18T03:03:11 | 182,605,621 | 5 | 2 | null | 2019-07-23T04:18:56 | 2019-04-22T02:00:02 | Python | UTF-8 | Python | false | false | 2,278 | py | frames_reader.py | """Frames reading routines"""
import glob
import cv2 as cv
class FrameReadError(Exception):
"""Error that will be raised when a frame reader cannot read."""
pass
class ImagesReader:
"""Reader for sequence of frames.
Args:
frames_dir (str): path to folder that contains frames.
im_ex... |
9b241e6645221a3aa47458966a43801acbda75ba | d851544f88511f2a4f8043ad41781ac42139dbb5 | /data_preprocess/kitti_image_dir.py | 6455950704b174c3d27f617a322b459ec8cdac5c | [
"MIT"
] | permissive | overfitover/traffic_lights | cc6f9ecb2bc49d9f3d814c2c78b722e65e6f4ee8 | addf82773a9f1dfc38ccd61f7d9da2ce18318a8c | refs/heads/master | 2020-03-20T03:28:51.990307 | 2019-03-19T13:08:05 | 2019-03-19T13:08:05 | 137,147,598 | 16 | 6 | null | null | null | null | UTF-8 | Python | false | false | 969 | py | kitti_image_dir.py | import os
import glob
def read_data(file):
'''
@description:
:param file: 文件名
:return: 读取的数据
'''
f = open(file)
lines = f.readlines()
return lines
def iterate_data(data_dir):
f_rgb = glob.glob(os.path.join(data_dir, 'images', '*.jpg'))
f_label = glob.glob(os.path.join(data_di... |
e65547255db32e4910818faba79a4747b6616936 | d051f3fe9fda31b72fa0ddce67aa1f4293c7c37c | /infer/correlations/historical_signal_library.py | 2b951ff9e336222722550e5c01a244d53e973121 | [
"BSD-3-Clause"
] | permissive | davmre/sigvisa | 4e535215b6623310d8f5da64258f6fa9a378f9fd | 91a1f163b8f3a258dfb78d88a07f2a11da41bd04 | refs/heads/master | 2021-03-24T10:24:52.307389 | 2018-01-05T19:33:23 | 2018-01-05T19:33:23 | 2,321,239 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,402 | py | historical_signal_library.py | import numpy as np
import os
import cPickle as pickle
import time
from sigvisa import Sigvisa
from sigvisa.utils.fileutils import mkdir_p
from sigvisa.ssms_c import CompactSupportSSM
from sigvisa.models.spatial_regression.SparseGP import SparseGP
from sigvisa.models.spatial_regression.local_gp_ensemble import LocalGPE... |
8770b3a74670a2d8c5289602c9f94091761eb8ea | d2fceafa6de0de6a564a51635828e754edb2a46c | /Similarity.py | c7c95975bacab905fbbfe0f389d62d76db6fd2df | [] | no_license | Hecate-DynMist/Word-Similarity | 4bc1ab9cfd4d0d4427612aa857fcfda8e4122229 | 496a63b0d7a360aa1ae59f8ca2b72a9023a1bb77 | refs/heads/master | 2020-05-05T00:49:05.448954 | 2019-04-12T19:03:14 | 2019-04-12T19:03:14 | 179,542,477 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,287 | py | Similarity.py |
# coding: utf-8
# Init
import pandas as pd
import sys
import time
import synonyms
import flashtext
import time
from flashtext import KeywordProcessor
# define input and output path and read files into pandas dataframe
input_path = '~/Documents/Job/Word-Similarity/Input/'
out_path = '~/Documents/Job/Word-Similarity/... |
f706f6420aa335d112334757caaa8406a3362022 | 33f159315e61dbaf3e032a3dc60261c5232da41f | /plan_management/models.py | 7c00463176e47ed7a077facf0c5a5a38e9e12a14 | [
"MIT"
] | permissive | ssrVktr/rfidstation | 8b70ad95bd9f83584467aae59303c976d4dd647f | 0115290376a5b75a1c7da922df31942c351887e8 | refs/heads/master | 2022-05-06T06:41:35.327692 | 2018-09-28T03:18:04 | 2018-09-28T03:18:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,262 | py | models.py | from django.db import models
from django.contrib.auth.models import User
from django.contrib.contenttypes.fields import GenericRelation
from assets_management.models import Assets
from department.models import Department
from review.models import DepartmentReview
class ApplicationStatus(models.Model):
status = mod... |
61231d79cb9b08941b80b91a902451e945e7c895 | f6aac95b79214a8b74266120f5c98fea94c0d848 | /wordpress_admin.py | 3de5fe55763b17c8bd1e4c04f9ebc075b557a1af | [] | no_license | martinburchell/wordpress_devtools | d274b0f62333cc25145d67b8eaae2bf056332d12 | 8252139d0ff863430170529fdb9a8ba2992fd210 | refs/heads/master | 2021-09-27T00:11:26.275083 | 2021-09-25T22:20:08 | 2021-09-25T22:21:05 | 10,067,030 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,636 | py | wordpress_admin.py | from lxml.cssselect import CSSSelector
import urllib
from web_automation.website import Website
class WordpressAdmin(Website):
def log_in(self):
log_in_page = self.insecure_domain + '/wp-login.php'
fields = self.read_hidden_fields(log_in_page)
fields['log'] = self.login
fields['p... |