blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 281 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2
values | repo_name stringlengths 6 116 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 313
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 18.2k 668M ⌀ | star_events_count int64 0 102k | fork_events_count int64 0 38.2k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 107
values | src_encoding stringclasses 20
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.02M | extension stringclasses 78
values | content stringlengths 2 6.02M | authors listlengths 1 1 | author stringlengths 0 175 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
683d36009adb3aca93e808e943434e2bc04fe516 | 92993cff825da80a8ff601572a0c52b0b7d3cbde | /algorithms/Svm/ADMM/L1/ADMM_L1_m34.py | 9d9fc819c9303a58aef992c0309a13f479a8c4cf | [] | no_license | yingzhuoy/MRs-of-linear-models | 06e8b1f84b08c6aa77553813824cf35c1806c5a7 | c3df8299e039a12613f2022b370b8c3e9c2dd822 | refs/heads/master | 2023-04-07T23:09:37.736952 | 2021-04-04T05:33:37 | 2021-04-04T05:33:37 | 265,124,549 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,148 | py | import numpy as np
from numpy import linalg
#import cvxopt
#from cvxopt import matrix,solvers
#import scipy.sparse.linalg
from algorithms.clf import Clf
"""
Preconditioned Conjugate Gradient Method
"""
def precond(M, r):
q = M * r
return q
def inner_prod(A, B):
A = np.matrix(A)
B = np.matrix(B)
r... | [
"yingzhuoy@qq.com"
] | yingzhuoy@qq.com |
4fecf8c61e2dfa099ead53088dfe2d445da69530 | 1013a96db28be6e93ef304edf873401922407ff6 | /py_neo.py | b41b9cc83902f07c8d0ccc2c121a6e2933fce2e7 | [] | no_license | kv244/python_graph | 9a49a5ba43c03f0e8904b6fabb144e906677fe56 | 566b26dcebe6f5b59341cf5daf75c78493e3e10e | refs/heads/master | 2022-07-07T02:20:25.207106 | 2020-05-16T12:22:44 | 2020-05-16T12:22:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,049 | py | """This is a web crawler
Which stores data in Neo4J"""
# TODO read python book, data structures
# TODO improve code
# TODO then publish
import urllib.error
import urllib.request
from urllib.parse import urljoin
from bs4 import *
from neo4j import GraphDatabase
# TODO: 2) remove spurious stuff
# TODO: 1) edit creat... | [
"julian.petrescu@live.com.sg"
] | julian.petrescu@live.com.sg |
b5ee9022e2c6f17abaa210a453d9af24a7dc8797 | b0e6d1f323a715663fcd595972ce5ab6e68a50c2 | /Python Course/Learning Python/LeetCode Exercises/binary_search.py | 65ca55a305c7a6d33c2a3936805571789fdab5b7 | [] | no_license | FirdavsSharapov/PythonLearning | fb16036a1f905fc0861e8017516e273529cf6127 | 63bba681dcbda9675f64620d4800cf784911dcf1 | refs/heads/master | 2022-03-13T02:05:37.587374 | 2022-03-10T14:41:30 | 2022-03-10T14:41:30 | 210,236,434 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 732 | py | def binary_search(nums, item):
# first got the len of the array
begin_index = 0
end_index = len(nums)-1
while begin_index <= end_index:
midpoint = begin_index + (end_index - begin_index) // 2
mid_value = nums[midpoint]
if mid_value == item:
return midpoint
... | [
"f.sharapov@yahoo.com"
] | f.sharapov@yahoo.com |
3a7987be8be7fe2b2beef5fcdd555806e3503def | 02d8f219d9555c66b6156b691fdbda9f02b379e9 | /backtracking.py | d548389c7034cd6b5c3c4dc69bf9e39c51c021cb | [] | no_license | aman-parikh/DAA-PROJECT | ab46697e695ca0de7a850c3f8d35553c6909fdb0 | d1486aac0e80c3e3ab23d3e88e0fa4d43d276b78 | refs/heads/main | 2023-04-02T02:21:19.306555 | 2021-04-09T06:08:14 | 2021-04-09T06:08:14 | 355,852,595 | 0 | 0 | null | 2021-04-08T09:59:21 | 2021-04-08T09:59:20 | null | UTF-8 | Python | false | false | 2,085 | py | import math
import pygame
from tkinter import messagebox
from tkinter import *
import tkinter
root = tkinter.Tk()
root.withdraw()
class BACKTRACK:
@staticmethod
def draw_path(end, start, draw, draw_fin_path):
node = end
total_wt = 0
while node:
total_wt += ... | [
"noreply@github.com"
] | noreply@github.com |
a70b34ec60feceb1a77c2fd378dbb3a87121abd9 | fc210e56f3d20947f84039a8ef07107bb11e6b5a | /main_prepare_tfrecords.py | def142e0fa4506356f5c7542938f2e953fb58cde | [] | no_license | ZhouYzzz/RecurrentTracking | 344b5fcb73f04a749f9822ae0b18f8de83ee6308 | 9dfaf2b383b2a0f67272ec090b2a40bb5d1adee4 | refs/heads/master | 2021-09-11T20:47:31.566421 | 2018-04-12T06:50:05 | 2018-04-12T06:50:05 | 112,092,396 | 0 | 1 | null | 2018-03-22T11:39:37 | 2017-11-26T15:07:42 | Python | UTF-8 | Python | false | false | 2,126 | py | """Create TFRecords files from ILSVRC2015"""
import tensorflow as tf
import tempfile, os, argparse
from multiprocessing import Pool
from tqdm import tqdm
from ilsvrc2015 import ILSVRC2015, PHASE
from annotations import parse_annotation_folder
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaults... | [
"zhouyz9608@gmail.com"
] | zhouyz9608@gmail.com |
304f5b58c3d48bcabde5d01bcb1635415e7c3590 | 9bdeffc12343cd5c5e7bf1f4cb8969c72d81c56b | /mpesa_api/urls.py | 70e4b9988c53b2601dbe91606de11fb2948a7016 | [] | no_license | johngaitho05/Mpesa-API-Python | 5fe90d60261e9913d6adfa6bc9fc3028fe6c79e5 | 49314ac3d37be297783a7c6da7a1875ece24e1d0 | refs/heads/master | 2022-02-08T07:44:46.910257 | 2022-01-31T11:05:30 | 2022-01-31T11:05:30 | 222,941,616 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 567 | py | from django.urls import path, include
from . import views
urlpatterns = [
path('access/token', views.getAccessToken, name='get_mpesa_access_token'),
path('online/lipa', views.lipa_na_mpesa_online, name='lipa_na_mpesa'),
# register, confirmation, validation and callback urls
path('c2b/register', views.r... | [
"johngaitho05@gmail.com"
] | johngaitho05@gmail.com |
4f12e4bfc52ce3776f4accdf6925314eb1fa2ec4 | 36745ed5c7d84f83ac4e2cc417ef7b00fcd7b132 | /course_1/exercises/3/main.py | 115a7b4d110f89eada5ca3f19561f421650b4f07 | [] | no_license | UglukFearless/python-learning | 40a2220f5e0fd3b4d9317f0e09c37d8f0ee49ce6 | 1d577dd8989f2c51699f93adb9ae065a1da28b66 | refs/heads/main | 2023-03-21T12:30:31.396417 | 2021-03-15T18:47:31 | 2021-03-15T18:47:31 | 348,085,001 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 368 | py | n = int(input())
resolves = []
count = 0
while count < n:
count += 1
resolves.append(input().lower())
l = int(input())
count = 0
errors = []
while count < l:
count += 1
line = input().lower().split()
for word in line:
if word not in resolves and word not in errors:
errors.ap... | [
"UglukFearless@mail.ru"
] | UglukFearless@mail.ru |
d5d9ed35adc9350ff4b125f70a2e9e14460d1024 | 35b734213c80e27fb54c0dae37ef975788251c42 | /portfolio/views.py | 85347c2959c675422338779601eb33233878c981 | [] | no_license | AKAWOLF13/BLOG | 136f593d6b6c4802fa63d0de8b0cd764faee1b15 | 403187554dcc9551fdadab4bd9c492f19dbebd7a | refs/heads/master | 2023-05-09T23:41:54.620237 | 2019-07-28T14:05:53 | 2019-07-28T14:05:53 | 192,912,918 | 0 | 0 | null | 2023-04-21T20:33:41 | 2019-06-20T12:05:51 | Python | UTF-8 | Python | false | false | 226 | py | from django.shortcuts import render
from .models import Portfolio
def portfolio(request):
portfolios = Portfolio.objects
return render(request, 'portfolio.html', {'portfolios': portfolios})
# Create your views here.
| [
"akawolf13@syuin.ac.kr"
] | akawolf13@syuin.ac.kr |
e375657984ca4c1db8762c48d302ebec2f49cf4e | 151c84658cb860e46493bc176d88c94c52a68910 | /flaskblog/routes.py | 53a83bd00441b33b7f82f93b37191a5c4fd53af4 | [] | no_license | Lam-Git/Flaskblog-master | a70e1f11f0d5a107750607a874e5b605dd5fa3d8 | d5d27998a1d90bcfc2c400be295c380bea72d5ac | refs/heads/master | 2023-03-09T02:58:32.105897 | 2021-02-27T01:57:15 | 2021-02-27T01:57:15 | 342,745,690 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,643 | py | import os
import secrets
from PIL import Image
from flask import render_template, url_for, flash, redirect, request, abort
from flaskblog import app, db, bcrypt
from flaskblog.form import RegistrationForm, LoginForm, UpdateAccountForm, PostForm
from flaskblog.models import User, Post
from flask_login import login_user,... | [
"lsnguyen0@gmail.com"
] | lsnguyen0@gmail.com |
580632b234aa4d793999e6c0fbdd8fc9d61542ea | 08c8807093f643cb8d5541852d4401016d2d32df | /app.py | 69759911398f930d7a46375540a6fd1ca8a3aebb | [] | no_license | JSOO17/Week1 | f4faa11636b343ba317fdb50edf0ac13f78655d3 | 89aaf6bbe099afd84fb8c28efa6a49ef41a754ec | refs/heads/master | 2022-12-25T21:24:00.185818 | 2020-09-29T13:20:01 | 2020-09-29T13:20:01 | 299,149,069 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,859 | py | import csv
def ignore_first(reader) -> list:
data = list(reader)
data.pop(0)
return data
def initialize_reader() -> list:
try:
with open('movie_metadata.csv', encoding="utf8") as f:
reader = ignore_first(csv.reader(f))
except UnicodeDecodeError:
print("could not fetchi... | [
"jaider.osorio@imedicalservices.co"
] | jaider.osorio@imedicalservices.co |
ba1fdaa4fe519e9ca6cbd0e90ace37e7af0347cf | c6df642325e33901eecb3e315d774a1a8900d696 | /cms/migrations/0004_auto_20191025_2125.py | 32187f591a7bff555842feeff2fc2a9543b8e32b | [] | no_license | mousavihasans/humangene | 2dfcc1a7509d127540faca2aa21bdd3f66dba345 | f3977e66d4f452778eaa603eeb986a0560d0c4d0 | refs/heads/master | 2020-06-01T01:43:34.079361 | 2019-11-06T09:38:21 | 2019-11-06T09:38:21 | 190,582,334 | 0 | 0 | null | 2019-10-30T10:46:31 | 2019-06-06T13:02:11 | Python | UTF-8 | Python | false | false | 1,858 | py | # Generated by Django 2.2.1 on 2019-10-25 17:55
import ckeditor.fields
import cms.models
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import utils.intenum
class Migration(migrations.Migration):
dependencies = [
('cms', '0003_auto_20191020_2317'),... | [
"mousavi.sc11@gmail.com"
] | mousavi.sc11@gmail.com |
f75d028f814e2de0126aa8f1b6bc1c8684ada3e8 | 27015b0933608d256b1e3c66acad40707305a0aa | /dns task/constants.py | 0d8bf29defa8b3d39bb7bb3732722afcb0ac9546 | [] | no_license | olyakotelok/Protocols | ca354661413d67eca5b781408118358e19e25492 | 4b67ff7f3458d256af78d5ed6e163afaf816f26e | refs/heads/master | 2022-11-12T07:15:23.306451 | 2020-06-29T13:59:03 | 2020-06-29T13:59:03 | 273,216,163 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | HOST = 'localhost'
PORT = 53
FORWARDER = 'ns1.e1.ru'
TYPES_DICT = {1: 'A', 2: 'NS', 28: 'AAAA', 12: 'PTR'}
REV_TYPES_DICT = {'A': 1, 'NS': 2, 'AAAA': 28, 'PTR': 12}
| [
"noreply@github.com"
] | noreply@github.com |
0af1b00428e976ba359b1a7ffb194f8eae839390 | be50b4dd0b5b8c3813b8c3158332b1154fe8fe62 | /StacksAndQueues/Python/NearestSmallerElements.py | 3d77893e6f926f45de256ee34a8b88f67e31f45a | [] | no_license | Zimmermann25/InterviewBit | a8d89e090068d9644e28085625963c8ce75d3dff | 6d2138e740bd5ba8eab992d9bf090977e077bfc5 | refs/heads/main | 2023-03-24T18:12:48.244950 | 2021-03-24T14:36:48 | 2021-03-24T14:36:48 | 350,835,917 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,238 | py | class Solution:
# @param A : list of integers
# @return a list of integers
def prevSmaller(self, A):
G = [-1] * len(A) # -1, bo to ułatwi trochę
curMin = A[0]
stack = []
for i in range(len(A)-1):
#print(stack)
if stack:
... | [
"noreply@github.com"
] | noreply@github.com |
22ee2e1bbc4a99b2d9a06e52db94b5e02d44b2b0 | 1bae950b23b703affeda87792f198a1c94caff7d | /ptvs/basic/ch18pack/hello.py | 5aa89e6f636459ba6630c76906b540f7a402bc76 | [] | no_license | xwen586/python | 1f7b486bd7eb5c35f176f4ba0fb9213d1ffce523 | 3b2b77aad5494cd4f2a4853def566fa4413346f6 | refs/heads/master | 2020-04-12T09:19:11.533910 | 2019-02-14T13:18:02 | 2019-02-14T13:18:02 | 162,398,875 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 176 | py | class hello:
"""description of class"""
def say(self):
print("Hello Setup!")
if __name__ == '__main__':
print("Hello World!")
h = hello()
h.say()
| [
"xwen586@sohu.com"
] | xwen586@sohu.com |
9b4a4205e03cccfbdc33ac81bc959da4c660fb3b | 7e4ca815fa4776d41b2b46cdcada077149d72899 | /course4/week4/graph.py | bf67b3634a527b2d80808c968688486839d57ed2 | [] | no_license | kcollett1/Stanford_Algorithms | 1a95e0ec12737f50926c23aede08fb246f719935 | cdab3757ebb6c6a85ee4f9c630c00ad0b3fa24aa | refs/heads/master | 2022-04-21T05:55:55.988759 | 2020-04-20T14:57:53 | 2020-04-20T14:57:53 | 257,314,127 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,161 | py |
'''
this is my implementation of a DIRECTED graph as an adjacency list. vertices are added
to the graph from input containing the vertex num and a list of vertices connected to it.
also implemented is Kosaraju's 2 pass algorithm to compute the strongly connected
components (SCC) of a directed graph, us... | [
"collettikatrina@gmail.com"
] | collettikatrina@gmail.com |
00f656ed86d27c9407dcdbf26a2b2ff4ab79cf4e | dec4e79d9ba5a8169915524be6977843129a8f00 | /super/migrations/0006_auto_20200617_0936.py | 0c53f8db79748f1beead560d872ad83ab218eac6 | [] | no_license | kabo-g/Olympic | a4e836e8ceb40ba31419954214282d7885ddc973 | 00aef8ac14ba1f6fb075a99e2412ef9928be2810 | refs/heads/master | 2022-11-11T05:18:50.774897 | 2020-07-04T10:40:42 | 2020-07-04T10:40:42 | 277,087,858 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 417 | py | # Generated by Django 3.0.6 on 2020-06-17 09:36
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('super', '0005_news'),
]
operations = [
migrations.RenameModel(
old_name='News',
new_name='Article',
),
migra... | [
"kabogalefete@gmail.com"
] | kabogalefete@gmail.com |
a5af234b3d731319deefda3f9ed9ab9841d03b77 | f0cf255909a354f502758dc66caa325e91b674ec | /user/apps.py | 15183b14f75c608f267fdd435de61e7d7f812c1f | [] | no_license | lit-fatfish/Bsite | 77bffc074706f74bc4c339e5d40149e3252ff4aa | 6c1d360fc96015a8bb927ebfe082ebf7e0bd45c3 | refs/heads/master | 2021-04-22T15:46:23.497912 | 2020-06-20T09:10:43 | 2020-06-20T09:10:43 | 249,859,874 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 202 | py | from django.apps import AppConfig
class UserConfig(AppConfig):
name = 'user'
verbose_name = '用户'
def ready(self):
super(UserConfig, self).ready()
from . import signal
| [
"416983839@qq.com"
] | 416983839@qq.com |
9ac8bef25fad412e65b90347792d00761570953c | e6ca4ea74d194bb7cfe1d026dcf033cbfa8300a8 | /62. 不同路径.py | 52c9d42dd43899db244f0fe33aa4c7b197455363 | [] | no_license | Lebhoryi/Leetcode123 | cb3a2dce4d1784859e1973b8486a2c055beaa9bc | b68616ad10a1f839f4f760d15b14b864d5d059e2 | refs/heads/master | 2021-08-27T20:43:02.638060 | 2021-08-21T01:22:01 | 2021-08-21T01:22:01 | 172,526,336 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 648 | py | # coding=utf-8
'''
@ Summary: dp, dp[i][j] = dp[i-1][j] + dp[i][j-1]
@ Update:
@ file: 62. 不同路径.py
@ version: 1.0.0
@ Author: Lebhoryi@gmail.com
@ Date: 2/21/20 10:03 PM
'''
def uniquePaths(m: int, n: int) -> int:
# # 空间复杂度 n^2
# dp = [[0] * n for _ in range(m)]
# for i in range(m):
# for... | [
"Lebhoryi@gmail.com"
] | Lebhoryi@gmail.com |
335d06fb4639a2da5946b9c9ca879fe53921aca5 | 0ae534591bdc621ff7f506de4b4b30de9103fb9d | /src/archive/stationonecodes.py | 2621815c58c1c75273ddf83f4deca259672fdd6f | [] | no_license | HoratioLi/foslATE | a649f0be6dd41c93cdfab9d7d3a00bb95ea76723 | f3ab674ec63bbde5bf98f81a68e6bf8ae7429df3 | refs/heads/master | 2020-07-01T19:19:10.271412 | 2016-11-21T08:42:50 | 2016-11-21T08:42:50 | 74,263,953 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 371 | py | '''
Created on 13-08-2012
@author: Michael Akilian
'''
#=========================
# STATION 1 FAIL CODES
#=========================
UNLOCK_EFM_FAIL = 0
PROGRAM_CC_FAIL = 1
PROGRAM_EFM_FAIL = 2
MCU_CURRENT_FAIL = 3
LED_SINGLE_FAIL = 4
LED_SIX_FAIL = 5
SELF_ACCEL_FAIL = 6
LOW_POWER_FAIL = 7
FINAL_FLASH_FAIL = 8
RSSI_FA... | [
"horatioli@fossil.com"
] | horatioli@fossil.com |
d6eca7216853fee034424f9f3e1ab9aa40824df7 | 016d5aad5434feb5ecbf601d7464e7bf85ca2bbf | /civicconnect/migrations/0001_initial.py | 0c80f1654114159aa40399487906decb01297363 | [] | no_license | neilmenon/civicconnect | 3dc306c7955baa8ad7b054163ebb513c0b4659e1 | 754047ea64ede3741acd6aaefa69df0da6d36fe2 | refs/heads/master | 2023-01-20T22:08:21.041473 | 2020-11-22T05:03:45 | 2020-11-22T05:03:45 | 317,316,454 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,820 | py | # Generated by Django 3.1.1 on 2020-10-18 22:55
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Topic',
fields=[
... | [
"nkm5gz@virginia.edu"
] | nkm5gz@virginia.edu |
e590827103ae0c0f08215f39a83b5736da9f1605 | 421a8178ed92dfbdfdc7ea6d997524a273e8fba5 | /Week1Day2/Text Alignment.py | f912828feb4f2d1631a7518f3c92d24d92430eeb | [] | no_license | farhan1ahmed/Training | 40505b4fd0b402a4bb0618f8c52ed2c08f2aee72 | f7810e667a9625a692662b73dfba132513b2bc54 | refs/heads/master | 2022-12-11T14:39:31.706109 | 2020-06-07T19:09:27 | 2020-06-07T19:09:27 | 232,877,730 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 783 | py | #Replace all ______ with rjust, ljust or center.
thickness = int(input()) #This must be an odd number
c = 'H'
#Top Cone
for i in range(thickness):
print((c*i).rjust(thickness-1)+c+(c*i).ljust(thickness-1))
#Top Pillars
for i in range(thickness+1):
print((c*thickness).rjust(thickness*2-(thickness+1)//2)+(c*th... | [
"farhan1ahmed@hotmail.com"
] | farhan1ahmed@hotmail.com |
ff31f02e03ea22e1c5f6a1b9ee0b90c7c5af7b98 | 16ff1b0128506cc5cd5a5f85d5539ec486824f77 | /scripts/alembic_freeze.py | 8e8b9e80ed645d3b3b831874b01d11f8dc194622 | [
"MIT"
] | permissive | code-watch/meltano | ed7a2fc1789ba1b7eacd567d881f9fc6ba0559db | 2afff73ed43669b5134dacfce61814f7f4e77a13 | refs/heads/master | 2022-07-29T13:17:44.019800 | 2020-06-30T23:44:12 | 2020-06-30T23:44:12 | 276,368,442 | 0 | 1 | MIT | 2020-07-01T12:48:23 | 2020-07-01T12:12:24 | Python | UTF-8 | Python | false | false | 335 | py | #!/usr/bin/env python3
from pathlib import Path
from alembic.script import ScriptDirectory
from meltano.migrations import MIGRATION_DIR, LOCK_PATH
scripts = ScriptDirectory(str(MIGRATION_DIR))
with LOCK_PATH.open("w") as lock:
HEAD = scripts.get_current_head()
lock.write(HEAD)
print(f"Meltano database froze... | [
"mbergeron@gitlab.com"
] | mbergeron@gitlab.com |
4bc55c6b685bc80a4aae415b71b7fb0645f10a5a | 380a47268c5975473a2e7c38c747bc3bdbd981b1 | /benchmark/third_party/transformers/examples/research_projects/adversarial/utils_hans.py | e54792ad2f82b91a560f56cdc19020ad25b1b2c2 | [
"Apache-2.0"
] | permissive | FMInference/FlexGen | 07aa9b1918c19b02077e13ad07e76840843810dd | d34f7b4b43ed87a374f394b0535ed685af66197b | refs/heads/main | 2023-07-24T02:29:51.179817 | 2023-07-21T22:38:31 | 2023-07-21T22:38:31 | 602,270,517 | 6,821 | 411 | Apache-2.0 | 2023-07-07T22:59:24 | 2023-02-15T21:18:53 | Python | UTF-8 | Python | false | false | 11,761 | py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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 cop... | [
"sqy1415@gmail.com"
] | sqy1415@gmail.com |
bcdd85a3ed8af68cb0db7988caed6866557c1a53 | aaec91eb381f7a565457644ae3decf394f01c5ed | /pubwork/demo/learner/demo_webdriver.py | 0d3a8b4a14febaff89051cba92b80bb3a6acfba7 | [] | no_license | plutoese/pubwork | c5dd6f908599dcb05ae5b50435a34d269391ff61 | 0649e0ab098c1f7099d98b7fd981425b24fddf3e | refs/heads/master | 2021-01-12T01:07:03.096016 | 2017-12-24T05:05:19 | 2017-12-24T05:05:19 | 78,340,295 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 87 | py | import webbrowser
webbrowser.open('http://docs.python.org/lib/module-webbrowser.html') | [
"glen.zhang7@gmail.com"
] | glen.zhang7@gmail.com |
413da12fae267071b1dbfa9ca3c2fc0495b14b9e | 65d844f57c93b97459ba58a7f8d31fcddaef2c57 | /example/train_multi_task.py | 8ca016de299fe5216290169295f8f39fb5af5857 | [
"Apache-2.0"
] | permissive | tonywenuon/keras_dialogue_generation_toolkit | 797411838e8213422cce4f5ac94f4e98e56cc912 | 75d82e7a281cd17a70bd9905fcebf2b906a6deec | refs/heads/master | 2023-04-04T14:39:10.117825 | 2021-03-29T11:25:23 | 2021-03-29T11:25:23 | 215,433,666 | 24 | 2 | null | 2023-03-24T22:45:14 | 2019-10-16T01:55:53 | Python | UTF-8 | Python | false | false | 16,211 | py | import os, sys, time, math
project_path = os.path.sep.join(os.path.abspath(__file__).split(os.path.sep)[:-2])
if project_path not in sys.path:
sys.path.append(project_path)
import tensorflow as tf
import keras
import argparse
import numpy as np
from copy import deepcopy
from keras.callbacks import ModelCheckpoint... | [
"you@example.com"
] | you@example.com |
09e6bc03c3a701ff1bfbec140086deac1a4a854e | 535651edc45f41dd4c57539ed6f76f26856e12f3 | /Total Code/MC Simulation Code/MonteCarloControl.py | 5d74fef480b2cfab6fddd72de67be14a3d2c2631 | [] | no_license | Dedwards841/PPTSimulationAndViewer | e154c914092dc33a5987bf2de76dbc5d603324fd | 4e6242c41a52e22633cb5c0b46fd957afc64ca9a | refs/heads/master | 2020-05-14T06:50:29.177224 | 2019-04-16T18:55:21 | 2019-04-16T18:55:21 | 181,708,528 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,439 | py | import numpy as np
import subprocess
import scipy
import matplotlib.pyplot as plt
import scipy.misc as mpimg
import matplotlib.colors as colours
import matplotlib.patches as mpatches
import os
def getDat(file, wavelength, start):
readin = open(file)
lines = readin.readlines()[start:]
toReturn = 0.0
try:
for lin... | [
"noreply@github.com"
] | noreply@github.com |
a508e75bc7b12d906fb95cd239f5fb1f0de0807c | 1dc086115cca625bc7fbf527e33c903fe6144e37 | /chris_ulanowicz/assignments/django/semi_restful_routes/apps/semi_restful/migrations/0001_initial.py | 70a76986ed2e874c6d6c3d03c8a1ac6c19770629 | [] | no_license | CodingDojoDallas/python_march_2017 | cdf70587dc6f85963e176c3b43057c7f7a196a97 | 31f9e01c011d049999eec4d231ff1a4520ecff76 | refs/heads/master | 2021-01-17T14:34:33.601830 | 2017-05-15T20:05:02 | 2017-05-15T20:05:02 | 84,091,494 | 4 | 14 | null | 2017-05-15T20:05:03 | 2017-03-06T15:49:18 | Python | UTF-8 | Python | false | false | 840 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-21 18:56
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Produc... | [
"src3collector@gmail.com"
] | src3collector@gmail.com |
43b3cbd48a03294aea79ae3c9ce101d34b108e76 | a8e3c2e8f6c8ec07d37a199fef4821828852bbdc | /lesson2_netmiko/ex6a.py | 8d78e1a87005b598a99ac0e4bea71b6e8f9401e7 | [
"Apache-2.0"
] | permissive | anejolazaro70/python_july19 | 9a392fabeb4965b161ff6e238d11fdfcbeac3647 | d4fd2f0d00d22f2f103ef9fe9c289c8b0651b454 | refs/heads/master | 2020-06-20T07:53:42.498899 | 2019-11-17T08:41:41 | 2019-11-17T08:41:41 | 197,049,427 | 0 | 0 | Apache-2.0 | 2019-07-15T19:09:21 | 2019-07-15T18:11:49 | Python | UTF-8 | Python | false | false | 575 | py | #!/usr/bin/python
from datetime import datetime
from netmiko import ConnectHandler
from pprint import pprint
from getpass import getpass
password=getpass()
device={"host": "cisco4",
"username": "user",
"password": password,
'secret': password,
"device_type": "cisco_ios",
"session_lo... | [
"anejo.lazaro70@gmail.com"
] | anejo.lazaro70@gmail.com |
b82292526d12840745f7a813829afbfd6e146306 | a8fff8e93f31eaeeeca32138d0d7a0280ecbc5a1 | /com/example/testCNN/00SimpleCNN.py | acfb88c412f2c5ecdb05deddd72e5583ccdc5612 | [] | no_license | angel1288/tensorflow0921 | 9d7fa51a28efc410149fa42ce8d580dd94fed5c4 | c9ae989d4f266b3d023492ec3109c3be36e1fb8c | refs/heads/master | 2021-07-02T01:48:36.507182 | 2017-09-22T08:13:52 | 2017-09-22T08:13:52 | 104,326,319 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,974 | py | # coding=utf-8
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
# 获取数据集
mnist = input_data.read_data_sets('MNIST_data/', one_hot=True)
sess = tf.InteractiveSession()
# 定义权重函数
def weight_varible(shape):
# 给权重制造一些随机噪声打破完全对称,截断的正态分布噪声
init = tf.truncated_normal(shape, stddev=0.... | [
"1531915260@qq.com"
] | 1531915260@qq.com |
81cdcfe92fc5bf55a123313bcb72f6397eed45b6 | 28e128e814ebd94c89fa1778019af6104e706237 | /convert.py | 2d41357e63f28c161039c7de61b2e3648918a909 | [] | no_license | hxsylzpf/neo-meguro-line | 7fd9497f76c16837209b19ca841d5cc09cfb401b | 6195533ed60a04dd808c7170e385cd9db6d57e25 | refs/heads/master | 2021-06-10T20:55:19.096317 | 2016-11-25T15:41:37 | 2016-11-25T15:41:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,324 | py | import cv2
import numpy as np
import argparse
import base64
from googleapiclient import discovery
from oauth2client.client import GoogleCredentials
def get_vision_service():
credentials = GoogleCredentials.get_application_default()
return discovery.build('vision', 'v1', credentials=credentials)
def detect_f... | [
"uiureo@gmail.com"
] | uiureo@gmail.com |
2f4ad34593d619afe4392bde5ef7782179948d56 | fd69d76dcfe60b97ca02eb853e3f2cd2b68d990e | /tree/serialize_deserialize.py | 34c503596f178063464a9402d8208b4a6238f7eb | [] | no_license | Levalife/DSA | f3204946c9225f0472ec8470c0fbe29357559f35 | 4e5a94ba94fa5be01f4760a2651001426b3ef973 | refs/heads/master | 2023-01-23T03:51:48.864888 | 2020-11-27T13:58:04 | 2020-11-27T13:58:04 | 298,612,309 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,766 | py | # -*- coding: utf-8 -*-
class Tree:
def __init__(self, root=None):
self.root = root
class Node:
def __init__(self, value, parent=None, left=None, right=None):
self.value = value
self.left = left
self.right = right
self.parent = parent
'''
10
... | [
"levushka14@gmail.com"
] | levushka14@gmail.com |
fdefb509489057fa295e11720c34278da23aee3e | a1b3797565edcae1364916da8c0d8bb1de8d2d00 | /sdk/python/pulumi_kubernetes/certificates/v1beta1/_inputs.py | de0f35bd2535c0e101d9a52b50db5222427086ba | [
"Apache-2.0"
] | permissive | Teshel/pulumi-kubernetes | 2316ab3ddb374717322423d24191aa272a963049 | 8d007166d0e8968fcabaeecd0cee13f9c08d97f1 | refs/heads/master | 2021-06-27T02:04:28.125052 | 2021-05-28T13:51:14 | 2021-05-28T13:51:14 | 231,344,409 | 0 | 0 | Apache-2.0 | 2020-01-02T09:01:22 | 2020-01-02T09:01:21 | null | UTF-8 | Python | false | false | 18,361 | py | # coding=utf-8
# *** WARNING: this file was generated by pulumigen. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from ... import me... | [
"noreply@github.com"
] | noreply@github.com |
5c064fb27f4e1f5959994430e93a3a4ee5d91147 | 72fcc9b617014484a1c021fa90af57b457aba5ba | /06.BinarySearchTree/01.ConstructionConversion/3_construct_bst_from_preorder.py | a4d96db9559efa2c78f1ee3b4a74ff5d091c6804 | [] | no_license | shindesharad71/Data-Structures | 249cb89fc3b54a3d8a67e4e9db832e256d072ee6 | a7cd247228a723e880bccd3aa24c072722785f6d | refs/heads/main | 2023-07-24T21:01:08.070082 | 2021-09-03T04:02:05 | 2021-09-03T04:02:05 | 370,706,713 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,468 | py | # Construct BST from given preorder traversal
# https://www.geeksforgeeks.org/construct-bst-from-given-preorder-traversa/
# A O(n^2) Python3 program for
# construction of BST from preorder traversal
# A binary tree node
class Node:
# A constructor to create a new node
def __init__(self, data):
self... | [
"shindesharad71@gmail.com"
] | shindesharad71@gmail.com |
9e4ebb7bb3ece18681a32f13e3172dd0796e4e5a | 5a255ee5fd8e72bb5e19bb2f305286c6cd0f573d | /route/qiniu/fop.py | 350b28577497422d780528b1bea37f4326847af7 | [] | no_license | HNUST-CS/angle-street | 646628fb1566de2c1244e2a468de768f8a62488e | 9e8381bec70bd8a503b7125d943c4c7c4ea77106 | refs/heads/master | 2020-04-09T10:36:06.040474 | 2015-03-03T04:33:41 | 2015-03-03T04:33:41 | 31,420,384 | 12 | 8 | null | null | null | null | UTF-8 | Python | false | false | 946 | py | # -*- coding:utf-8 -*-
class Exif(object):
def make_request(self, url):
return '%s?exif' % url
class ImageView(object):
mode = 1 # 1或2
width = None # width 默认为0,表示不限定宽度
height = None
quality = None # 图片质量, 1-100
format = None # 输出格式, jpg, gif, png, tif 等图片格式
def make_reques... | [
"hi@hi-hi.cn"
] | hi@hi-hi.cn |
5ad6b50d507fa3f6a5f4c0d582deefc664338deb | 3e4b890366d58b6bede0443b281892ae773cd9a1 | /Flask-User-starter-app/app/settings.py | da4f36f82549257415b25876a461c0c16ff20e3f | [
"BSD-2-Clause"
] | permissive | manu3333/Proyecto | 42dd841d317116c652fe180dec1006d1803bdec3 | f7629c1e2bbe6c07f322d30237933cd03a1efcd5 | refs/heads/master | 2020-05-20T18:24:47.625772 | 2017-04-25T21:21:23 | 2017-04-25T21:21:23 | 84,499,879 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,099 | py | # Settings common to all environments (development|staging|production)
# Place environment specific settings in env_settings.py
# An example file (env_settings_example.py) can be used as a starting point
import os
# Application settings
APP_NAME = "BigDBee"
APP_SYSTEM_ERROR_SUBJECT_LINE = APP_NAME + " system error"
... | [
"emmanuel.nieves3@upr.edu"
] | emmanuel.nieves3@upr.edu |
d80ded76b732c6905d63ab10812102879d84c783 | 05f58b8bdef5e19c295421468fad2d2cec64ac2f | /my-recipessg/main.py | e5bd67882b98520826964615a13ae39eec18d648 | [] | no_license | thordur03/VEF--Verk4 | a40521029e90c9cc2859d2b93164dc62e7b47d7b | 4de2275b473c37a998c8226c2705d7cf20da1b8d | refs/heads/master | 2021-07-14T16:44:00.443774 | 2020-03-31T11:19:13 | 2020-03-31T11:19:13 | 249,011,515 | 0 | 0 | null | 2021-06-02T21:54:39 | 2020-03-21T16:05:59 | HTML | UTF-8 | Python | false | false | 1,698 | py | import os
import codecs
from datetime import datetime
from jinja2 import Environment, PackageLoader
from markdown2 import markdown
POSTS = {}
for markdown_post in os.listdir('content'):
file_path = os.path.join('content', markdown_post)
with open(file_path, 'r') as file:
POSTS[markdown_post] = markdo... | [
"noreply@github.com"
] | noreply@github.com |
4a2f8d6c9ed2d00e8ed94eef8b4bce6ebb50a686 | 4518ce1ee32ffbd4004df6865f557c5a3909c135 | /awards/migrations/0004_reviews.py | 6c70e3944ef1fceffaca5ddef335e41ee17a2d17 | [
"MIT"
] | permissive | petermirithu/Grant_py | d9a04dee7fc0ae80e55a15b073e6b24108b23555 | 0e2e8d2a01c361583853e4d06fc4ede45e3741f8 | refs/heads/master | 2022-12-14T19:04:42.503002 | 2020-01-09T17:45:00 | 2020-01-09T17:45:00 | 231,231,593 | 1 | 0 | MIT | 2022-12-08T03:22:31 | 2020-01-01T15:20:26 | Python | UTF-8 | Python | false | false | 962 | py | # Generated by Django 2.2.8 on 2020-01-03 15:11
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('awards', '0003_auto_2020... | [
"pyra_m.k@yahoo.com"
] | pyra_m.k@yahoo.com |
f2bb9616ac45278832dfc75c62148d1217f0bf70 | 13102a790732ddd3cedb9d6cf0cb813d6f2a895c | /k번째수.py | 9ce4b8c35dc7c7359c98ba4f00bdad5c4a43b5c6 | [] | no_license | MsSeonge/infrun-C-CodingTest | 72d3769189b8124de13c11af678a459e348b52d2 | 2cb5e6b96bb1a4aa527c15ed58eef4340a5e8976 | refs/heads/main | 2023-01-23T22:35:26.726890 | 2020-12-10T23:33:31 | 2020-12-10T23:33:31 | 319,673,505 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 373 | py |
import sys
sys.stdin = open("input.txt", "rt")
TestCase = int(input())
for i in range(1,TestCase+1):
N, s, e, k = map(int, input().split())
List = list(map(int,input().split()))
sortedList = List[s-1:e]
sortedList.sort()
#print("#"+str(i)+" "+str(sortedList[k-1]))
#
#내가해야하는 출력방식
print... | [
"srkim0371@gmail.com"
] | srkim0371@gmail.com |
059e8d97f0b62ea4ab980bb45f12a01bacc68228 | 6dd08ec6b4f6351de8450a3d7e592fd6b4994119 | /cbase/server/cbase-1.8.1/testrunner/pytests/spatialcompaction.py | 190ff0ff033f2e8af6e3946146558e06a12e1206 | [] | no_license | zhgwenming/appstack | d015e96b911fe318f9fba1bdeeea9d888d57dfba | 8fe6c1dfc2f5ed4a36c335e86ae28c17b3769276 | refs/heads/master | 2021-01-23T13:30:19.507537 | 2015-11-09T06:48:35 | 2015-11-09T06:48:35 | 7,576,644 | 1 | 2 | null | 2016-01-05T09:16:22 | 2013-01-12T15:13:21 | C | UTF-8 | Python | false | false | 1,569 | py | import unittest
import uuid
import logger
from membase.helper.spatial_helper import SpatialHelper
class SpatialCompactionTests(unittest.TestCase):
def setUp(self):
self.log = logger.Logger.get_logger()
self.helper = SpatialHelper(self, "default")
self.helper.setup_cluster()
def tear... | [
"zhgwenming@gmail.com"
] | zhgwenming@gmail.com |
f22dc825cf7dbb473a0783088cb661e8971a18f1 | e7569ef74265f999fbeac9c2ffcf07e0b3a40e31 | /backend/manage.py | 1075829ba9e9ee42d33260f3b64a0950aae35882 | [] | no_license | crowdbotics-apps/now-prediction-25146 | 2d1999c58cbba61e719475f7c0c61d3222f484f4 | 562f8e2892c11e982a24231e6831d1b7df2ce43c | refs/heads/master | 2023-03-27T00:05:11.957207 | 2021-03-20T15:04:59 | 2021-03-20T15:04:59 | 349,755,728 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 640 | py | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'now_prediction_25146.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
1cfc2dab392b886beb2af8648c295931c76df682 | cc12cce1a4d99bc59fddcf51095fd64307c8a108 | /math_with_ai.py | 18bc2a038cc4565bcc2d9a241ed85f4411d37856 | [] | no_license | 28ananthaprakash/math_with_dl | 47c7eeca8aee13ff03c8b5c56da2faf9faedfdf8 | 4a49a1a2582c682c7423f46fd6cd03ce78291945 | refs/heads/master | 2020-11-30T03:51:51.261408 | 2019-12-26T16:22:12 | 2019-12-26T16:22:12 | 230,293,288 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,343 | py | # -*- coding: utf-8 -*-
'''
Author : Ananthaprakash T
'''
# Commented out IPython magic to ensure Python compatibility.
from __future__ import absolute_import, division, print_function, unicode_literals
#import tensorflow as tf
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
import matplotlib.pyplot as pl... | [
"noreply@github.com"
] | noreply@github.com |
4b1b47754908d1408d23be833869d656231ec113 | 06035a291e5f258bc876f48d68675e2a74904810 | /Practical one/q1_fahrenheit_to_celsius.py | 84540365c959349c7ea1aa13ea49a0f266b5c14c | [] | no_license | casanova98/Project-201501 | 16aec68c4d7155af5fd859e0dcf5c104316e8913 | b4444e3f5f598442f33bea61ab428df0680382b3 | refs/heads/master | 2016-09-06T14:03:32.788647 | 2015-02-09T12:25:43 | 2015-02-09T12:25:43 | 29,722,688 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 232 | py |
#q1_fahrenheit_to_celsius.py
answer = input("Enter the temperature you want in Celsius!")
x = float(answer)
celsius = round((5/9) * (x - 32), 1)
print("The temperature from Fahrenheit to Celsius to 1 decimal place is", celsius)
| [
"ngin.cheongjun.dennis@dhs.sg"
] | ngin.cheongjun.dennis@dhs.sg |
160c5656998950b55f1360a6571e4b94d5292381 | ae02333b17aa88d0fcb5de6a8d2d7147e96ae8af | /ex058.py | ec76451878c474cb0caa5280f4dcaadccbcc49fc | [] | no_license | jefersonmz78/cursoemvideo | 474a0a215e24b73f40039bbe2198c7071efc553d | 02ce7ff19f7ed4d851dfe429052e50ce751b84f0 | refs/heads/master | 2020-04-25T03:05:08.159564 | 2019-02-25T08:20:30 | 2019-02-25T08:20:30 | 172,463,507 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 600 | py | from random import randint
comptador = randint(1 , 10)
print('Sou seu computador... Acabei de pensar em um número entre 0 e 10.')
print('Será que você consegue adivinhar qual foi? ')
acertou = False
palpites = 0
while not acertou:
jogador = int(input('Qual é seu palpite?'))
palpites += 1
if jogador... | [
"noreply@github.com"
] | noreply@github.com |
a5b26ad6de430de847e567b26e6d1de1326c9bf7 | 26a7bbd02ba6d5ae63d832b24ecb663e57adc630 | /Script.py | d3ddfb3e15cf149f68c752e6c1770eec035c5a9d | [] | no_license | Jiayin-Gu/PNsimulator | 5a834ae9c2405088defd9347fbcd592d74f80275 | 29898722a2aa9cab86918eb1e1b4288bcea09dd7 | refs/heads/master | 2020-06-17T08:44:29.898982 | 2019-07-11T17:40:04 | 2019-07-11T17:40:04 | 195,866,969 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,220 | py | import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
import math
def shockley_curve(v, I_s):
return I_s*(np.exp(v)-1)
def I_V():
data=np.loadtxt("I_V.out")
V=data[:, 0]
I=data[:, 1]
popt, pcov=curve_fit(shockley_curve, V, I, p0=(0-I[0]))
I_s=popt[0]
v=np.linspace(V[0], V... | [
"gujiayin1234@163.com"
] | gujiayin1234@163.com |
50ba2bc284a62190ba066af555bbcb93d4bf0af2 | 428c34158ae663c01bc3e621dd240a6e63a0447a | /build/rosserial/rosserial_embeddedlinux/catkin_generated/pkg.develspace.context.pc.py | 412aaa4e9f310c62a9cbcc7e433dc8c2add7d629 | [] | no_license | GTRIInternship2016/WaterGun2016 | dd05b1c0fc94184655c3d2fbdcc4f796df6b8b13 | acc43c42bb79cc197ed4495cfb50a888992052b4 | refs/heads/master | 2021-01-20T20:18:35.312890 | 2016-07-05T14:53:54 | 2016-07-05T14:53:54 | 60,801,323 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 390 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "rosserial_embeddedlinux"
PROJECT_SPAC... | [
"andrewgmorris10@gmail.com"
] | andrewgmorris10@gmail.com |
6fde9b8be97e5708a6527dfe8dbc75db6bc87ca1 | 53c797550d72ee589db19d309714d466068390c7 | /python/python36/redis-client/set_redis_key.py | e9b15d49f38fc32785f7f0d26efce48c307336bd | [] | no_license | kaitezhan/Demos | d3f777f4c07c56ab66370822ec89856ea1893e11 | 4760a3c7a82d75a0092be92713e8e47e42cd5eb9 | refs/heads/master | 2020-03-28T05:39:53.191944 | 2018-09-06T07:11:01 | 2018-09-06T07:11:01 | 147,789,679 | 1 | 0 | null | 2018-09-07T07:47:53 | 2018-09-07T07:47:53 | null | UTF-8 | Python | false | false | 1,196 | py | import redis
from util.DateUtil import *
def get_timestamp(dateStr):
# dateStr=time.strftime("%Y-%m-%d %X", time.localtime())
# str to date
# dateStr = "1988-05-08 10:11:22"
date = time.strptime(dateStr, "%Y-%m-%d %H:%M:%S")
return time.mktime(date)
def set_register_verify_code(mobile, code):
... | [
"rzhang@mo9.com"
] | rzhang@mo9.com |
3fcd7c9b969639b7019ef3cb8fba77564639c55f | dc36d91239a5e8dd811d73ed97d124f6c34111ca | /s1d2/pp2.py | 4f652e3f57e3b953f3c608cc6f2ff6615f99808f | [] | no_license | wuzijie/AliMusicTrendPredict | e5ad53810d0e93b19ef66978de4caf8a1e51565e | f2b5fc078960631fbe888e1150ab4bbbc2204e96 | refs/heads/master | 2021-05-03T09:24:48.349553 | 2016-06-19T14:09:37 | 2016-06-19T14:09:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,083 | py | #-*- coding:utf8 -*-#
"""
---------------------------------------
*功能:
*保存:
---------------------------------------
"""
import os
import csv
import time
from collections import defaultdict
####################### date ####################################################
# map date into num
# date
print ""
print "===s... | [
"xiaoyulink@gmail.com"
] | xiaoyulink@gmail.com |
d00d3f541c8395b11d28df9673b9cc4eb0aeb4f1 | ba92fb06223819fde44f65228b9f8de077bb39ca | /api.py | f43d75a2962ff7e85eba018bc0b3f6d3461684c0 | [] | no_license | nagapoornima22/flask_database | cb40b58703a8e6deb182ea476d06be252a1eeb85 | 221b10b7071e38118876cb1f97bae388b732aae7 | refs/heads/master | 2021-03-15T11:02:24.023241 | 2020-03-12T13:50:06 | 2020-03-12T13:50:06 | 246,846,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,847 | py | from flask import *
import sqlite3
app = Flask(__name__)
@app.route("/")
def index():
return render_template("index.html");
@app.route("/add")
def add():
return render_template("add.html")
@app.route("/savedetails", methods=["POST", "GET"])
def saveDetails():
msg = "msg"
if req... | [
"noreply@github.com"
] | noreply@github.com |
38e55d3c7addb06f9d23b8a798f8bf6d50a16b9b | 7cfacd2dfe0840028705459956562f63f039f0a5 | /imageviewer.py | 08c23d4c019cb46bc37422073dc951b830e6e960 | [
"MIT"
] | permissive | PhantomJoker07/BastardSword | 83a00b03ccdb9d3f8b3af82a03227399d80720d7 | 62b9832136c05516c14c7acd65c2edcba3cfb0d0 | refs/heads/main | 2023-05-20T01:42:44.032668 | 2021-06-13T01:50:19 | 2021-06-13T01:50:19 | 375,856,717 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 576 | py | import matplotlib
import matplotlib.pyplot as plt
import sys
import numpy as np
import struct
def draw_image(fileName):
with open(fileName, 'rb') as file:
width, height = struct.unpack('ii', file.read(4*2))
image_data_bytes = file.read((width*height*4) * 4)
image_data_float = struct.unpack(... | [
"noreply@github.com"
] | noreply@github.com |
708f82e61a7c65cd898662f411ee77cbf31cccc9 | b098afc69ec619b3d7944de81a7dd43bc1934f71 | /python list assignment.txt | 00dbc6e3c5f0684be1ee537ef7a3829244aaf433 | [] | no_license | TracyBaraza/python | 5f344f3f5c7a6dfee8241709446171aa5d563d40 | f1fc4884d7d25f39dcc939fdb4e29cb9671e01e9 | refs/heads/master | 2020-04-28T13:04:30.124463 | 2019-03-25T17:11:48 | 2019-03-25T17:11:48 | 175,296,915 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,218 | txt | Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> x=[0,1,2,3,4,5,6,7,8,9]
>>> x
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>>
>>>
>>> x.append(10)
>>> x
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>>>
>>>
>>> x.... | [
"barazatracy16@gmal.com"
] | barazatracy16@gmal.com |
c5c35f369f7ff3081e674a64bf478670c5236b72 | 1872b9b47b6b6271f38960d650a3103bfa9de7a5 | /download_json.py | 13762d01e1800e0d2455e4f864f5c891a5de3e50 | [] | no_license | M4ttoF/AccessEarth-Tool | 161d28c943171189692f0985ab445bff4068bf79 | bcef025eeaea8604e50ca6b97c402765b14a00ba | refs/heads/master | 2020-03-22T11:51:20.231655 | 2018-07-20T19:42:15 | 2018-07-20T19:42:15 | 140,000,163 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,933 | py | # Access Earth Scraper
# Matthew Farias
'''
payload={'key1': 'value1', 'key2': 'value2'}
#r = requests.post("https://httpbin.org/post")
r = requests.post("https://httpbin.org/post", data = payload)
print(r.text)
'''
import time
import requests
import urllib
from selenium import webdriver
from selenium.webdriver.com... | [
"ezioblade64@gmail.com"
] | ezioblade64@gmail.com |
971d10a6fcb13e8b7c795ff0cf4df44c33d76326 | 94c65dadc70f7864cab7cc5fa365cc772ca44127 | /gym/test.py | 75abd17ec04e85973ce2491193b3df8c436ffba1 | [
"MIT"
] | permissive | shihaocao/swarm | 0227a7909b6285ca8916683b5db5c0dd5ba47641 | c5e5162aba43060eb01963671aa458d3cd173975 | refs/heads/main | 2023-02-25T14:42:39.713455 | 2021-01-26T02:59:38 | 2021-01-26T02:59:38 | 325,425,395 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 375 | py | import numpy as np
a = np.arange(16).reshape((4,4))
b = np.arange(16).reshape((4,4))
c = np.bitwise_and(a,b)
d = np.array(c, dtype=bool)
e = np.clip(c, 0, 1)
e = (e-1)*-1
print(a)
print(b)
print(c)
print(d)
print(e)
# print(e.flatten().append(1))
yeet = np.arange(24).reshape((2,3,4))
print('firts')
print(yeet)
print... | [
"shehowcow@gmail.com"
] | shehowcow@gmail.com |
7ee7f2e7f0034ad78299103059e5d41c7e5251e8 | 47ff744da519c525cccfad1d8cead74f7e2cd209 | /uge4/.history/exercise_20200220124148.py | f126b64625bf836dfaac34c1d4c008fc555bbe88 | [] | no_license | Leafmight/Python | f6098395a7a13dd6afe6eb312a3eb1f3dbe78b84 | d987f22477c77f3f21305eb922ae6855be483255 | refs/heads/master | 2020-12-21T14:21:06.802341 | 2020-05-22T10:21:37 | 2020-05-22T10:21:37 | 236,457,255 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 588 | py | import numpy as np
filename = './befkbhalderstatkode.csv'
dd = np.genfromtxt(filename, delimiter=',', dtype=np.uint, skip_header=1)
neighb = {1: 'Indre By', 2: 'Østerbro', 3: 'Nørrebro', 4: 'Vesterbro/Kgs. Enghave',
5: 'Valby', 6: 'Vanløse', 7: 'Brønshøj-Husum', 8: 'Bispebjerg', 9: 'Amager Øst',
10: 'A... | [
"jacobfolke@hotmail.com"
] | jacobfolke@hotmail.com |
dc9289d234825789dfd30143764b5bf441e87b50 | a7cca49626a3d7100e9ac5c2f343c351ecb76ac7 | /playbooks/tests/led_toggle.py | f8079be0655d96fcf02c841fe646899d740a03c0 | [
"MIT"
] | permissive | Carglglz/upydev | 104455d77d64300074bda54d86bd791f19184975 | 529aa29f3e1acf8160383fe410b5659110dc96de | refs/heads/master | 2023-05-24T18:38:56.242500 | 2022-10-21T14:03:17 | 2022-10-21T14:03:17 | 199,335,165 | 49 | 9 | MIT | 2022-10-21T14:03:18 | 2019-07-28T20:42:00 | Python | UTF-8 | Python | false | false | 142 | py | import time
for i in range(5):
print(f"This is a loaded script: {i}")
led.on()
time.sleep(0.5)
led.off()
time.sleep(0.5)
| [
"carlosgilglez@gmail.com"
] | carlosgilglez@gmail.com |
dcff227305bc074d0d32949ae48b052c1608a805 | dd3bbd4e7aaee7a8a5f26b927ce28ac472c855a5 | /eggs/Products.CMFPlone-4.1-py2.7.egg/Products/CMFPlone/skins/plone_scripts/getNotAddableTypes.py | d9e66131d0c1fb846122cf94e88d8368a72a9d1e | [] | no_license | nacho22martin/tesis | ea0a822f8bdbdef6f13f41276ecd4d6e85427ca5 | e137eb6225cc5e724bee74a892567796166134ac | refs/heads/master | 2020-12-24T13:20:58.334839 | 2013-11-09T12:42:41 | 2013-11-09T12:42:41 | 14,261,570 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 307 | py | ## Script (Python) "getNotAddableTypes"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
# customize this script to filter addable portal types based on
# context, the current user or other criteria
return ()
| [
"ignacio@plone.(none)"
] | ignacio@plone.(none) |
65fe23396445e2b18d34f02b0fd23adca93486a9 | 028b11cb029d20d46e683f718dff18c39fc2c89b | /app/core/sentiment_analysis.py | 3434b40d6031954bfaf1ead528802f0e3b88478c | [] | no_license | demid5111/smart-detector | 390d392beb460044db563092be01e062eac8ef41 | 7673b7d3ba3fc545bf6a8b11c5f91538e947a8a7 | refs/heads/master | 2022-12-13T16:39:29.913612 | 2021-01-07T13:22:38 | 2021-01-07T13:22:38 | 211,321,632 | 0 | 1 | null | 2022-12-10T03:53:54 | 2019-09-27T13:07:51 | JavaScript | UTF-8 | Python | false | false | 593 | py | import json
from requests import post
from app.constants import SENTIMENT_TOKEN
def analyze_sentiments(text):
data = {
'txt': text,
'lang': 'rus'
}
url = 'https://tt-api.tech/1.0/sentiment'
headers = {
'Authorization': 'Token {}'.format(SENTIMENT_TOKEN),
'Content-Type... | [
"vlzemskovs@gmail.com"
] | vlzemskovs@gmail.com |
859189dfd335cbf552d601b7f074a5040f3b71b9 | d1f8aef0e3da67555b6b7d57ac9bec0b94e12cc5 | /dragex/interfaces/__init__.py | d85a2f6ea8e655ceea1d1c1ab049f645c0717c72 | [] | no_license | victorhook/dragex | d3593f0c12fc2cbdbccc14a085f70e493f3b8f05 | 6c06740230f7513318abe79c78cb6d4369ba3e68 | refs/heads/master | 2023-06-02T03:58:54.061938 | 2021-06-17T19:06:24 | 2021-06-17T19:06:24 | 370,010,180 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 160 | py | from .drawable import Drawable # noqa
from .game_object import GameObject # noqa
from .screen import Screen # noqa
from .sprite_image import SpriteImage # noqa
| [
"victorkrook96@gmail.com"
] | victorkrook96@gmail.com |
7bffb66e5f552e2e744965e1073430a1c8eaf3b7 | 1b60858c303bd7d88dae82b8db56273c326ddb44 | /tests/swagger_client_tests/test_processor_status_snapshot_entity.py | 5f4fb8dda20bf1e9f698019dba23303937af0daf | [
"Apache-2.0"
] | permissive | tspannhw/nipyapi | 1ba076ef669493bad20681579891eea1d43f4fc8 | 30cdd028cf68cc4316b54a23bfa1f0397de3ae23 | refs/heads/master | 2021-07-19T14:37:22.993682 | 2017-10-29T18:52:31 | 2017-10-29T18:52:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,475 | py | # coding: utf-8
"""
NiFi Rest Api
The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, ... | [
"dchaffey@hortonworks.com"
] | dchaffey@hortonworks.com |
6376173684ca6c0c3673e550b76f8e8902209e9e | f00c4e3772815fbb570d85b4f91ea0d01606f22c | /Ultrasonic_sensor(hc-sr04).py | 9268171d7053810c8388bbee641a9b7df2a79d5d | [] | no_license | ElangoCS/Python-GPIO | 79e2d8564b2bee6202e55231718e2d57ebdbcdf9 | 0738a881493953fe837c7d13b75bd1880dceb58e | refs/heads/master | 2021-06-21T07:48:36.118318 | 2017-07-06T11:03:23 | 2017-07-06T11:03:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 848 | py | import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO_TRIGGER = 18
GPIO_ECHO = 24
GPIO.setup(GPIO_TRIGGER, GPIO.OUT)
GPIO.setup(GPIO_ECHO, GPIO.IN)
def distance():
GPIO.output(GPIO_TRIGGER, True)
time.sleep(0.00001)
GPIO.output(GPIO_TRIGGER, False)
StartTime = time.time()
StopT... | [
"noreply@github.com"
] | noreply@github.com |
dbc90486c2ba02f3081ea0d35e68d3fc519f2ff6 | fbb678e76f9d9bc96b86c068c724824143da9440 | /integration-tests/monkeyrunnerTestSuite.py | b9374572e102990fb5735a85b1c956380dcf5865 | [
"Apache-2.0",
"MIT"
] | permissive | d53dave/DSLFY-Android | eed20220aeb162b1c7fe70a7899e2568f2de4247 | 596d994bc322f47a3a6e7df60ef9d8a24254e996 | refs/heads/master | 2021-01-24T15:06:43.900932 | 2015-11-19T05:58:53 | 2015-11-19T05:58:53 | 44,204,117 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 980 | py | # Imports the monkeyrunner modules used by this program
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
# Connects to the current device, returning a MonkeyDevice object
device = MonkeyRunner.waitForConnection()
# Installs the Android package. Notice that this method returns a boolean, so you can test... | [
"dave@d53dev.net"
] | dave@d53dev.net |
23e5821fb9cdd44921d93fab7017629fb41feacd | 7ced125aede70be9ba86c2b9677fa6d832f2d0cc | /fc_django/product/models.py | 702e711e55356a255617b839a1270ad940722d5e | [] | no_license | paulracooni/tutorial.django | f98ff72d3f635c615778fbed4e31444ed4e414f5 | 027b2f5a5393d6051c4d70c68405bb8580b4fdb1 | refs/heads/master | 2022-10-17T01:34:55.153096 | 2020-06-15T04:41:24 | 2020-06-15T04:41:24 | 270,183,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 602 | py | from django.db import models
# Create your models here.
class Product(models.Model):
name = models.CharField(max_length=256, verbose_name="상품명")
price = models.IntegerField(verbose_name="상품가격")
description = models.TextField(verbose_name="상품설명")
stuck = models.IntegerField(verbose_name="재고")
regist... | [
"paulracooni@gmail.com"
] | paulracooni@gmail.com |
56b8f12831c451169abfb43ee9bf0bf5db45e2ec | 5231eb9d9ca8019f22b6895a4af78d9cbb98b6b7 | /Search&Train/MyDataset.py | 401c178af56f97600ae86da60655396655ec31a3 | [] | no_license | LuPaoPao/NAS-HR | b2c5b259cb7eae35cd30568df278f9bae94944f2 | 8baf8aa5c1a476bfedb6f2bead172d701ac371af | refs/heads/main | 2023-07-10T03:18:23.489754 | 2021-08-21T13:45:54 | 2021-08-21T13:45:54 | 314,416,217 | 27 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,757 | py | # -*- coding: UTF-8 -*-
import numpy as np
import os
from torch.utils.data import Dataset
import cv2
import csv
import scipy.io as scio
import torchvision.transforms.functional as transF
import torchvision.transforms as transforms
from PIL import Image
def transform(image):
image = transF.resize(image,... | [
"noreply@github.com"
] | noreply@github.com |
da5f875d6ad92fb09e0281b4cd2eaf5ec54ecfc4 | 1974b3e9c5f2f677833e1608a41281f377fd331c | /dltesthttp_xuyalin2/www/testcase/webservice/ts_ws_orders/getOrderLog.py | f1dc05383ce69ec78eba00680612de440006ef31 | [] | no_license | xyl00755/pythonLearning | ed0f540b61247c3560f347853da5886b2e2ba25d | c6aecff86ff34dcd7358d98201627ff84e9bf2cf | refs/heads/master | 2021-01-13T08:19:25.171016 | 2016-12-16T05:43:10 | 2016-12-16T05:43:10 | 71,764,553 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,736 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
0255.获取订单跟踪信息
http://127.0.0.1:8280/mallws/orders/getOrderLog.json
{
"token": "57469529686440a88fedb0bed51ba5d0", // 必须 token
"orderNo":"123123123" // 必须 订单号
}
{
"code": 200,
"description": "执行成功!",
"model": {
... | [
"xuyalin@danlu.com"
] | xuyalin@danlu.com |
98a3c195c87915e43e11852d4486b660239d5853 | 95a8145495409d3a82237476367e618221056ad0 | /17_avg.py | 509eed1fe2a2a1bdd8892a7ea0c08f0f2e79d544 | [] | no_license | mal1kofff/python | 6b31a9d6c37a4e4e51aa825d893994ac8e88a23b | 703f2917563e9b29574ace6d6a6cdc94fcec7d3c | refs/heads/main | 2023-06-07T00:26:06.080508 | 2021-07-01T13:10:40 | 2021-07-01T13:10:40 | 380,209,906 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 493 | py | """Напишите программу, которая считывает с клавиатуры два числа a и b, считает и
выводит на консоль среднее арифметическое всех чисел из отрезка [a; b][a;b], которые кратны числу 3."""
a = int(input())
b = int(input())
summa = 0
count = 0
for i in range(a,b+1):
if i % 3 == 0:
summa += i
count +=1
... | [
"maratmalikov506@gmail.com"
] | maratmalikov506@gmail.com |
cdc0cefbdd696f4dc3322a0f5eef9cf4ed2e1010 | cb61d79d96d99849e9f1d4c46f32111c6ec96212 | /backend/app/app/api/api_v1/endpoints/queue.py | 310a4bf6c743d6bd4f0db15d986ce962c95ca9b0 | [] | no_license | yeongjonglim/QueueDown | b45983864872313d96bf203dd03c861abd2ae4a3 | 5120c49d36bb4b25aa756cf56d723e139e6a9d4e | refs/heads/master | 2023-01-30T05:29:55.211702 | 2020-12-19T14:12:00 | 2020-12-19T14:12:00 | 322,863,198 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,784 | py | from typing import Any, List, Union
from fastapi import APIRouter, Depends, HTTPException
from sqlalchemy.orm import Session
from app import crud, models, schemas
from app.api import deps
router = APIRouter()
@router.get("/", response_model=List[schemas.Queue])
def read_today_queue(
*,
db: Session = Depend... | [
"yeongjong.lim@gmail.com"
] | yeongjong.lim@gmail.com |
bdc99781f9f9f4ea21043b1516f2b060769b59d5 | 972c8a10d076b72f4322d374152e2b7d9fe80866 | /ucf_gans/cgan_ucf.py | a19e916bd8882349c961f3e177be75b4b8d6e85e | [
"MIT"
] | permissive | tanlinc/opticalFlowGAN | 635e9ccadfd9810902a9fdfa329c78cc52be2f68 | f568e531265029f2f25f223ee92e1f53c0bb52f6 | refs/heads/master | 2020-03-21T07:22:16.724179 | 2018-12-12T15:23:02 | 2018-12-12T15:23:02 | 138,276,406 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,783 | py | import os, sys
sys.path.append(os.getcwd())
import time
import numpy as np
import tensorflow as tf
import tflib as lib
import tflib.ops.linear
import tflib.ops.conv2d
import tflib.ops.batchnorm
import tflib.ops.deconv2d
import tflib.save_images
import tflib.plot
import tflib.UCFdataDesktop as UCFdata
MODE = 'wgan-g... | [
"tanja.linkermann@gmx.de"
] | tanja.linkermann@gmx.de |
233ec5dea016aaed9a4e3806be808fb6146f17d6 | f878c9cb88878e6c38b9724b8a159131b66a2d15 | /Python/022.py | a31a3a4d6a1d8e9078e852c9b91efc5a68b2abd4 | [] | no_license | ronek22/ProjectEuler | bcfd2b7392585653303f1183b945f2fd95798f9d | 9f9c5a723eae7c6c44a067eb3600932d9c3241e6 | refs/heads/master | 2020-12-02T21:22:39.044656 | 2018-10-08T22:11:05 | 2018-10-08T22:11:05 | 96,303,548 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 413 | py | '''Names scores'''
def ch2int(c):
#only works for big letters
return ord(c)-64
f = open('p022_names.txt', 'r')
txt = f.read()
content = []
for name in txt.split(','):
content.append(name[1:len(name)-1]) # delete quotation marks
f.close()
i=1
total = 0
content.sort()
for name in content:
suma = 0
f... | [
"jronek3010@gmail.com"
] | jronek3010@gmail.com |
892240b89878f59a82d0472a0bc8a32e40a03383 | 8d1a638f7ea0d694558cfe238bb7bed260d2d50c | /Pypoll_Challenge.py | ecca1bc100c1e5c140a01b7124158eb4c4491f1c | [
"MIT"
] | permissive | Bettinadavis11/Election_Analysis | 1fc79d5b57c31c409dfc2bee0558f5cac76cd0a8 | 2ff3dad50ba12e3f9c718be17da14d8e319094b9 | refs/heads/main | 2023-06-23T15:59:57.946596 | 2021-07-13T21:31:47 | 2021-07-13T21:31:47 | 383,615,486 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,271 | py | # -*- coding: UTF-8 -*-
"""PyPoll Homework Challenge Solution."""
# Add our dependencies.
import csv
import os
# Add a variable to load a file from a path.
file_to_load = os.path.join("Resources", "election_results.csv")
# Add a variable to save the file to a path.
file_to_save = os.path.join("analysis", "election_an... | [
"bettinadavis1978@gmail.com"
] | bettinadavis1978@gmail.com |
fc9a98ef9d50ff78217956a8266a6c2d94e05061 | f67aa51d4afcdb2f31b78032dc910094ec310295 | /2. Python Code/node_tag_audit.py | c7c180574df2c7cce567eab1f29a792c8d6595be | [] | no_license | johncgr/data-wrangle-OpenStreetMap-data | a7e7bc1b0979d897eda55db35678f56b545f8f64 | 90e3aaf0113c312d7caa4a5c0b5978c09a464340 | refs/heads/master | 2016-09-16T11:58:28.772831 | 2015-06-10T20:53:38 | 2015-06-10T20:53:38 | 36,739,086 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,943 | py | # -*- coding: utf-8 -*-
"""
Created on Wed Feb 25 09:41:27 2015
@author: john
"""
import xml.etree.ElementTree as ET
import time
import re
#time of program start
start = time.time()
#error logging function
def add_error(log, key, error_msg):
if key in log:
log[key].append(error_msg)
else:
log... | [
"you@example.com"
] | you@example.com |
2ece6df10ac7d93cf7b3f26b7e9a110fe96f2098 | ad02044b8e3923b8138d5b35c5f168693b018844 | /pygl/action.py | 0b74718862f531ebf3960c0ef0eb4fb899b1a8c4 | [] | no_license | darkodraskovic/pygl | 3d804690873b77d742f49ad98359843cc041637f | f3ad0cee90d48f7157dc854e84c1abba628e3239 | refs/heads/master | 2022-12-26T14:54:41.150930 | 2020-05-03T08:35:19 | 2020-10-06T19:35:00 | 258,969,238 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,465 | py | import pygame
key_event_types = [pygame.KEYDOWN, pygame.KEYUP]
mbutton_event_types = [pygame.MOUSEBUTTONUP, pygame.MOUSEBUTTONDOWN]
ACTIONDOWN = pygame.USEREVENT
ACTIONUP = pygame.USEREVENT + 1
key_actions = {}
mbutton_actions = {}
pressed = {}
def bind_key(key, action):
key_actions[key] = action
pressed[... | [
"darko.draskovic@gmail.com"
] | darko.draskovic@gmail.com |
90f6b044e0738dd4144dea41df919f7fe76752a2 | 167c6226bc77c5daaedab007dfdad4377f588ef4 | /python/ql/test/2/library-tests/PointsTo/import_time/module.py | 0e14ce6e5d765b8d724c6890d6495ef311dde746 | [
"MIT",
"LicenseRef-scancode-python-cwi",
"LicenseRef-scancode-other-copyleft",
"GPL-1.0-or-later",
"LicenseRef-scancode-free-unknown",
"Python-2.0"
] | permissive | github/codeql | 1eebb449a34f774db9e881b52cb8f7a1b1a53612 | d109637e2d7ab3b819812eb960c05cb31d9d2168 | refs/heads/main | 2023-08-20T11:32:39.162059 | 2023-08-18T14:33:32 | 2023-08-18T14:33:32 | 143,040,428 | 5,987 | 1,363 | MIT | 2023-09-14T19:36:50 | 2018-07-31T16:35:51 | CodeQL | UTF-8 | Python | false | false | 152 | py |
import sys
os_test = sys.platform == "linux2"
version_test = sys.version_info < (3,)
if version_test:
version_2 = True
else:
version_3 = False | [
"mark@hotpy.org"
] | mark@hotpy.org |
e8813cd668f7ed59984bd897bab0933c4ba2a92a | 8a36ddf6a9f2f6c00ff7d3db72fe7a6f88ead7a2 | /weather/weather.py | f53c89e3bc9040f4b89115a55e4788b9c56e3dde | [] | no_license | pccode21/PyQt5 | 5d5b79f55d6165d03d58768bf30f25382ac7812b | f0af930b1338d0472aacbd3cab65be009bddd96e | refs/heads/master | 2020-12-03T11:07:44.226390 | 2020-02-19T05:29:09 | 2020-02-19T05:29:09 | 231,293,179 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,490 | py | from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from MainWindow import Ui_MainWindow
from datetime import datetime
import json
import os
import sys
import requests
from urllib.parse import urlencode
# OPENWEATHERMAP_API_KEY = os.environ.get('b020112734ca76c7df0ccad361a58fa3')
"""
... | [
"16007005@qq.com"
] | 16007005@qq.com |
3ce222a6e33b8b2660952cbd65794fc78e3e8ad2 | 2be3bb6c9357fac21fa55aa5dd5a8495c73230c2 | /URI/1175.py | bf0eebeec4b598ff8d392401b090aaba32d8c35e | [] | no_license | GabrielRCAmaral/Brincando-de-Python | c1c24dc681eda608d7d4d8e88d7cefc12e323d6c | 32d05b639644bf19e98e51d551b081b7ee7853bc | refs/heads/master | 2020-07-09T20:54:06.424440 | 2020-01-30T01:18:47 | 2020-01-30T01:18:47 | 204,081,497 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | # -*- coding: utf-8 -*-
lista=[]
for i in range(20):
lista.append(float(input()))
lista.reverse()
for i,item in enumerate(lista):
print 'N[%i] = %i'%(i,item)
| [
"gabriel.r.c.amaral@gmail.com"
] | gabriel.r.c.amaral@gmail.com |
7c76835603d90ac7c8e51e9c8be02a23b28636b1 | a5dd6bcb59130979624c0274a91bb1566421dbc4 | /thor/config.py | f0faee12c5842bbacca47f5949d4fa2242d68ec3 | [
"BSD-3-Clause"
] | permissive | mjuric/thor | 62563455526eaec09c96341ac239a5985824f24b | 4e2403bf9c08e998ccd7a277583b0e550b9d3a67 | refs/heads/main | 2023-04-21T02:22:17.359744 | 2021-05-19T20:12:56 | 2021-05-19T20:12:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,027 | py | import numpy as np
__all__ = ["Config"]
class Config:
"""
Config: Holds configuration settings.
Of interest to the user are two main attributes:
columnMapping : This dictionary should define the data
column names of the user's data relative to the
internally used nam... | [
"moeyensj@gmail.com"
] | moeyensj@gmail.com |
a791fa74bde3613ce81e2a52d148ac6000fe7861 | eaf4bd214daf6b97acaba867fd25508a3e733e1e | /TopCoder/09.NumberMagicEasy.py | 2a14b5578f3fb898a3c5ea4c449f427d607b9458 | [
"MIT"
] | permissive | DevStarSJ/algorithmExercise | 5303240aef0747fc04be08306cbed5e1ce1b5615 | 66b42c54cdd594ff3f229613fd83446f8c1f9153 | refs/heads/master | 2021-08-07T14:14:49.440613 | 2021-02-02T22:39:21 | 2021-02-02T22:39:21 | 89,350,903 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 975 | py | class NumberMagicEasy:
taros_card = [
[1,2,3,4,5,6,7,8],
[1,2,3,4,9,10,11,12],
[1,2,5,6,9,10,13,14],
[1,3,5,7,9,11,13,15]
]
def the_number(self, answer):
all_answer = [x for x in range(1, 17)]
for i, a in enumerate(answer):
go = self.yes if a == '... | [
"sj@zigbang.com"
] | sj@zigbang.com |
f15bf56cb4b49a2fab0cc07880d2db8d7ba04ce5 | 83d570e832e3c4fcf5f553e3d59eec55b7fb6592 | /HW5/submit/layers.py | 2ec8bf2b5c9235bfe67852d8912f37f44cfa974c | [
"MIT"
] | permissive | JavisDaDa/COMP540ML | 7091058b54814da82398c28b32b361cb58a3e51d | 9c50a7d0fcca02050e0269bf4337fe6caa3c65db | refs/heads/master | 2022-06-10T06:29:56.227219 | 2020-05-07T18:10:53 | 2020-05-07T18:10:53 | 262,089,841 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,851 | py | import numpy as np
def affine_forward(x, theta, theta0):
"""
Computes the forward pass for an affine (fully-connected) layer.
The input x has shape (m, d_1, ..., d_k) and contains a minibatch of m
examples, where each example x[i] has shape (d_1, ..., d_k). We will
reshape each input into a vector of dimen... | [
"35616267+JavisDaDa@users.noreply.github.com"
] | 35616267+JavisDaDa@users.noreply.github.com |
85eb6f1af285279eae63abc914777b8fbc4c45eb | d76b8deea36c183e95421f2f2ad2525adaaaec4f | /templatetags/myfilters.py | bf08da9db1a96d72956481977ede138c7a127ecd | [] | no_license | ycjungSubhuman/PulseCodeSite | 05a22e187d8c678d556734ffd081d48330b4e095 | 53d0948732d7601af6e3cdc2d03db7f5aa1839cc | refs/heads/master | 2021-01-10T01:12:14.027870 | 2016-02-22T13:16:37 | 2016-02-22T13:16:37 | 50,154,548 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 180 | py | from django import template
register = template.Library()
@register.filter(name='addclass')
def addclass(value, arg):
return value.as_widget(attrs={'class': arg})
| [
"jung3519@gmail.com"
] | jung3519@gmail.com |
2a888daeb38afc4c8af2361b163cba41b855ad4a | 26290096884d3f0c65b733cd8c5b783578296be1 | /bert/bert.py | 2acc78c472fa612cf8dc5e3c4d4c7b3f2269a9f9 | [] | no_license | ymiwm/BERT_Sentimental_Analysis | 31fb07ab5a9b979a491177f2b98f715fc70abc01 | dbe0d2df55ebd5071758dda68fc02988892c44ce | refs/heads/master | 2020-12-05T02:46:49.786749 | 2020-01-05T23:38:45 | 2020-01-05T23:38:45 | 231,985,324 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 484 | py | from torch import nn
from .modeling_bert import BertModel
import torch
class Model(nn.Module):
def __init__(self):
super(Model, self).__init__()
self.bert = BertModel.from_pretrained("bert-base-multilingual-cased")
self.linear = nn.Linear(768, 1)
def forward(self, bert_ids):
... | [
"ymiwm0322@gmail.com"
] | ymiwm0322@gmail.com |
968e1fb40f87ecf9c1f2826e6d0e9fb1a407b3bb | d7944b542887eca9b2d88aabd20ef77bd5f29440 | /proyecto/settings/base.py | 9ba1371270889a1f043a12447e3c8dae52b587b2 | [] | no_license | leoliam/Proyecto-Auditoria | 0f7fff23bbf7285e1955f71f95c955489fb9083f | 42f81ab6990de8275d0b7a02616a44463931b4a1 | refs/heads/master | 2021-01-22T12:02:51.809715 | 2014-12-16T06:29:58 | 2014-12-16T06:29:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,495 | py | from unipath import Path
BASE_DIR = Path(__file__).ancestor(3)
SECRET_KEY = '%3$0qcuk&fbp4dgc*)na5yuexbmb@in%63+jnup%e0v12xukl9'
DJANGO_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.st... | [
"liamcaleb.asr@gmail.com"
] | liamcaleb.asr@gmail.com |
ff56a783aef1342c75d6f0497b505cbb1604bb8e | adc5a8c08790bc3c577c9288f2c9ff1bcf4aaf49 | /face_recognition_facenet/main.py | 138e38907db06f82b0933eacdec39ef49c01f5aa | [] | no_license | ml19siea/MSc-project | d99d293cf6b9c3076e7bedd53b9ee9537202c68e | b116c25336ad73718dee078addf99213c61eeaee | refs/heads/main | 2023-07-17T08:02:40.240181 | 2021-08-20T00:56:57 | 2021-08-20T00:56:57 | 398,104,231 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,863 | py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import cv2
import numpy as np
import facenet
import detect_face
import os
import time
import argparse
import pickle
from PIL import Image
import tensorflow.compat.v1 as tf
import imutils
# Construct the argument... | [
"ml19siea@leeds.ac.uk"
] | ml19siea@leeds.ac.uk |
11663c0f28cb942a4a9a90c69f77584703d14b96 | 5633afdce5fb2209f130bb0cd2c478a35bd75957 | /168-理解function.py | 62a304b055863e54e0b2122b6167d3374a9902b5 | [] | no_license | weiyinfu/learnKeras | 36a68e7f9966bf2ac53bb4767b3754864fe6087d | c011005bf760053e9085a0171702e54d19cafebc | refs/heads/master | 2023-03-06T18:06:32.811186 | 2021-02-22T06:05:57 | 2021-02-22T06:05:57 | 147,919,920 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 638 | py | import keras.backend as K
import keras
import tensorflow as tf
"""
keras的function可以方便的求某几个数字的值
"""
input = keras.layers.Input((None,))
output = tf.multiply(input, input)
output2 = keras.layers.multiply([input, input])
called_count = K.variable(0.0)
f = K.function([input], [output, output2, called_count], [K... | [
"weiyinfu.weiyinfu@bytedance.com"
] | weiyinfu.weiyinfu@bytedance.com |
6734fc2c2acc7eca9fe0f2156adafb6e9cfc7ce9 | 5093a9f3cd76ce41b8327e3eb02243154df66b3f | /princeton_env/bin/wheel | 8a4e95ebc7c5ac0509271a2cf2d5d3e11bd351e2 | [] | no_license | aarusso/U19-pipeline_python | fb58eed341fb538cf26f6bcfb796fcfdf0299332 | 6c529d8c7b18c698729a481f6db4db73c459a03d | refs/heads/master | 2022-04-16T15:46:26.957756 | 2020-04-14T17:32:39 | 2020-04-14T17:32:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 290 | #!/Users/shanshen/Dropbox/Vathes/princeton/pipelines/U19_pipeline_python/princeton_env/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from wheel.cli import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"shenshanpku@gmail.com"
] | shenshanpku@gmail.com | |
348970a0f4e5c0d7929ac752e3078f95f5443c3a | 6e5ab77fee1fb4a0310213dd8c6dd8601828b1b9 | /Algorithm/Swea/D1_6230.py | 11bc95295c19530488c6fba37d18d628e6562027 | [] | no_license | hongyong3/TIL | 36d031c0da9e3e6db3eebb977bd3e12df00a849f | 7f1492128e957a78fc95b255f4f7f2978161e471 | refs/heads/master | 2023-08-19T09:16:03.231757 | 2023-08-18T09:38:47 | 2023-08-18T09:38:47 | 162,100,258 | 1 | 0 | null | 2023-02-11T00:52:32 | 2018-12-17T08:42:42 | Jupyter Notebook | UTF-8 | Python | false | false | 263 | py | data = [88, 30, 61, 55, 95]
for i in range(5):
if data[i] >= 60:
print("{}번 학생은 {}점으로 {}입니다.".format(i + 1, data[i], "합격"))
else:
print("{}번 학생은 {}점으로 {}입니다.".format(i + 1, data[i], "불합격")) | [
"chy66822495@gmail.com"
] | chy66822495@gmail.com |
dd2ea4300de0af50d1e600dafe93b0d42b1d093a | 6ae3b4c229e09007bd594db825a21112c373c3e9 | /src/plugins/generate_text/generate_chains_db.py | e6c90f51a0ea718165e1b279e87af43ccdc17428 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | wlstrickland/botty-bot-bot-bot | ae5fd6df23732df97eb440cc87e62ddec26f99fb | 4d582adf6ca564b2dd384415a9ee98a0a4b92f70 | refs/heads/master | 2021-01-16T22:20:29.252957 | 2016-04-25T04:32:57 | 2016-04-25T04:32:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,101 | py | #!/usr/bin/env python3
import os, re, json
import sqlite3
from markov import Markov
SQLITE_DATABASE = os.path.join(os.path.dirname(os.path.realpath(__file__)), "chains.db")
CHAT_HISTORY_DIRECTORY = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "@history")
def server_text_to_sendable_te... | [
"azhang9@gmail.com"
] | azhang9@gmail.com |
7f2b66954f9309fbedabb6c9335ea38682a883a7 | 5a9c7f5af16698df95204850b499a219ab0e79b0 | /python/ray/tests/test_output.py | 2eba788b87d2dd36bbc9de15025762852c136067 | [
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | neigh80/ray | 89e25a0fdc031cb0e150899ea02602f693dc6648 | 5a7c5ab79cc5e963e37ae8226bc8f3e636a0cdb3 | refs/heads/master | 2023-03-10T21:33:16.195709 | 2022-05-05T23:37:39 | 2022-05-05T23:37:39 | 227,317,505 | 0 | 1 | Apache-2.0 | 2023-03-04T08:59:16 | 2019-12-11T08:46:07 | Python | UTF-8 | Python | false | false | 14,754 | py | import subprocess
import sys
import pytest
import re
import signal
import time
import os
import ray
from ray._private.test_utils import (
run_string_as_driver_nonblocking,
run_string_as_driver,
)
@pytest.mark.skipif(sys.platform == "win32", reason="Failing on Windows.")
def test_spill_logs():
script = "... | [
"noreply@github.com"
] | noreply@github.com |
a810fbc6fe8c290cc29df424fcd6670a5f136340 | a68785e2ea1f057252dd1947eaf81cc6eba12fe6 | /manage.py | c38af92c557805c37b63c99bee26e7b4364acb97 | [] | no_license | uzumakikirin/vyashgaming | 5454d4da428221fc73692c03965188f1f51296ef | 756bf963bb15f791061543fed1df77463dd73746 | refs/heads/master | 2022-12-12T00:27:50.395199 | 2019-04-06T17:28:02 | 2019-04-06T17:28:02 | 179,779,566 | 0 | 0 | null | 2022-12-08T01:21:50 | 2019-04-06T02:24:23 | JavaScript | UTF-8 | Python | false | false | 543 | py | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'vyashgaming.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. ... | [
"uzumakikirin@gmail.com"
] | uzumakikirin@gmail.com |
73330b8c4ae30abe3eb91652a4e959fafd3b10ec | 8f9fd335a67a780175a50e09e2f67b37dde5ef4b | /django_practice/urls.py | 19cfcaa6e5a0a25ec4911cf0d74f9ffea34321ad | [] | no_license | MyronOuyang/DjangoPractice | 109b1fdc8321a504dfc10018feda723b56c370b8 | a261cca724d4fecdb579a3a92592d93a5225129b | refs/heads/master | 2022-09-16T06:29:01.533657 | 2020-06-01T18:37:54 | 2020-06-01T18:37:54 | 267,379,811 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,845 | py | """django_practice URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Cla... | [
"myronouyang@gmail.com"
] | myronouyang@gmail.com |
3d611b2e3932f660deb170ecddfe59c95901930e | a27c12df228407937301878c081450555623d3ba | /motion dec.py | 6912c2ac8756db4883ae38d33df4ee4c070d83df | [] | no_license | Andy-jg/raspberry-3b-opencv3.2.0-motion | f037725c9fa6cd34c54294efc2a1d69e0cccac83 | 10ad23484af22528c3b4ded7815ed51230163556 | refs/heads/master | 2020-05-26T15:13:26.163984 | 2017-03-15T01:58:19 | 2017-03-15T01:58:19 | 85,009,937 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,814 | py | # import the necessary packages
import argparse
import datetime
import imutils
import time
import cv2
# construct the argument parser and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-v", "--video", help="path to the video file")
ap.add_argument("-a", "--min-area", type=int, default=5... | [
"noreply@github.com"
] | noreply@github.com |
5a3ff1c8ef0a9cb4c95ba96ba406cfb4f3cc10e6 | 6f2f521f407b76e9efc40d9b55f1ff9e090f0c72 | /extract/admin.py | d3a0838ea908aa075a8d7a76d71107daecc69574 | [] | no_license | yeahdef/bloomextract | 3ea04333c47d351c5cd231241dfae330a4ae1f68 | 9517680f6b79e7c0ace734901462b58d7817d3f0 | refs/heads/master | 2021-01-18T22:35:34.473371 | 2016-05-03T22:25:49 | 2016-05-03T22:25:49 | 38,942,500 | 0 | 1 | null | 2015-07-12T22:20:51 | 2015-07-11T22:26:56 | Python | UTF-8 | Python | false | false | 167 | py | from django.contrib import admin
from extract.models import Product, Category
# Register your models here.
admin.site.register(Product)
admin.site.register(Category)
| [
"joeyliechty@gmail.com"
] | joeyliechty@gmail.com |
e634d25b606b0e29a87126e3be0f570d8eea761a | b32df2ffae14c3ca8083f36f93165c220aef5e44 | /blueoil/__init__.py | a5ce8e74f89c2ccaf0d33d978fd32d2513272f60 | [
"Apache-2.0"
] | permissive | blue-oil/blueoil | 213659909b6eac26dd249f878a03ed732b639539 | 0c9160b524b17482d59ae48a0c11384f1d26dccc | refs/heads/master | 2023-01-24T05:10:54.825811 | 2021-04-22T08:46:56 | 2021-04-22T08:46:56 | 153,597,157 | 252 | 111 | Apache-2.0 | 2021-05-10T05:02:45 | 2018-10-18T09:19:36 | Python | UTF-8 | Python | false | false | 709 | py | # -*- coding: utf-8 -*-
# Copyright 2020 The Blueoil Authors. 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
#
# Unles... | [
"noreply@github.com"
] | noreply@github.com |
9a5868d1d8b3a08f300c8b9926680fcdd8806c42 | 1d78e7a8de21b281e9a27098392aea63896fd1fd | /es2file.py | b70d653bebe68eec17b667cf1ba907a73014fe00 | [] | no_license | haojiliang/elasticsearch2file | e257a629209395583beea1732c5a97a6f8675a5f | 346389b0886ef2eb3d3999e978b4bbab2de53278 | refs/heads/master | 2021-09-04T17:21:46.511003 | 2018-01-20T09:26:02 | 2018-01-20T09:26:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,252 | py | import json
import os
import sys
import urllib2
reload(sys)
sys.setdefaultencoding('utf-8')
class exportEsData():
def __init__(self, url, siteid, startdate, enddate, scroll):
self.url = '%s/_search' % (url)
self.siteid = siteid
self.startdate = startdate
self.enddate = enddate
self.scroll = scroll
self.r... | [
"noreply@github.com"
] | noreply@github.com |
59c3fd7c83f8eb2ab7e4119df939087c196bd6e2 | 83ce49f99ac592fd282b9fc22331404478574af0 | /tests/testWriteOutStatusListener.py | d270b756a6b5842054961987c863ed5e15dab168 | [
"MIT"
] | permissive | groceryheist/UWBotThings | 86f028336bd45f2b0586330fcada6e91f94a265f | 1729e10f8689f1964db311084642a89ba5005d42 | refs/heads/master | 2021-01-23T02:35:08.351571 | 2015-01-17T00:03:22 | 2015-01-17T00:03:22 | 26,033,768 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 53 | py | import unittest
import sys
sys.path.append('../data') | [
"groceryheist@gmail.com"
] | groceryheist@gmail.com |
0f1207a68c78b37550df565c7f56a91f48dc945b | 6c1dbe0c1179d6f908ba9e110e0ead633ab1d52d | /naive_bayes/naive_bayes.py | 8b17918b4a80b76d7572f8f55421fec3ed6ce5f6 | [] | no_license | leohentschker/Machine-Learning | 9694964294a4a0e353e077563fa2cc82dbe043bb | 7311d5cad07227a1279d97822257f122fe3b542d | refs/heads/master | 2021-05-04T11:35:24.061230 | 2016-12-25T17:15:59 | 2016-12-25T17:15:59 | 48,345,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,020 | py | import csv
import copy
import random
import numpy as np
import math
def load_test_data(test_file_path):
"""
Read in the data in the correct format
"""
lines = csv.reader(open(test_file_path, "rb"))
unformatted_data_set = list(lines)
# map the data to floats for calculation purposes
... | [
"leohentschker@college.harvard.edu"
] | leohentschker@college.harvard.edu |
61fff39fec3f955634e1aee39a5f7ebf58424b5e | d52d3ab219e3d7b44a2f117482da1b649365c79a | /scripts/combine_caffe_model/combine_distill_faceRecognition_param.py | 188a089b3207975c860386fd975d0270c2caf9d2 | [
"BSD-3-Clause",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-generic-cla"
] | permissive | nbadalls/caffe-server | 949949295f98aa51fff93d98ddb4e2338d76b0b8 | 11c5dbea5134d7c4b234645e4fb597ec2eeb5527 | refs/heads/master | 2020-03-18T11:26:16.475558 | 2018-09-26T08:31:11 | 2018-09-26T08:31:11 | 134,671,222 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,151 | py | # -*- coding: utf-8 -*-
"""
Created on Wed Jul 11 10:52:53 2018
@author: minivision
"""
from __future__ import print_function
import sys
sys.path.append('/home/minivision/SoftWare/caffe-server/python')
import caffe_pb2
from combine_model_param import *
from layer_lib import *
import time
import os
from getPatchInfoFun... | [
"1277046020@qq.com"
] | 1277046020@qq.com |
f018fcf4181c5fd67b0cda79b34881187b20e51f | 9e5978c120d84c2af7ef04f9119a94d2e3edccc2 | /TGCN/load_data1.py | 607c234574531bf0dc8c71d7a929b98c7c62ec49 | [] | no_license | fengmaochairman/CorrelationNet_DP_taix-demand | 5482760e54edb19d215f7ff0e3ef79fa693e6644 | db75ebde9fbb25029366c6ee71e6b89cead507d9 | refs/heads/master | 2020-09-25T12:22:07.122632 | 2020-05-22T08:07:04 | 2020-05-22T08:07:04 | 225,878,295 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,156 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 10 15:15:50 2018
@author: Administrator
"""
import numpy as np
import pandas as pd
from pandas import to_datetime
import scipy.sparse as sp
import os
# read data of one day and one direction
def read_file(path, filename):
calfile = os.path.join(path, filename)
o... | [
"58518044+fengmaochairman@users.noreply.github.com"
] | 58518044+fengmaochairman@users.noreply.github.com |
132233e2f673ca46ed09870bc39f3069ada4e184 | d79c4fa73bd26550cfaa5d1a3259b20bda1fba46 | /Tests/Services/test_distance_service.py | 79975e946cb9b7d65f9ff492746e0f981a60d6c6 | [] | no_license | dev-11/coding-test | 37e8372b4eff1b6d5c9b0bd2c0c13f88d0940736 | 7bd56b00d48a0419206b99170075fe34183830ee | refs/heads/master | 2021-07-11T02:49:44.832998 | 2021-03-28T12:08:47 | 2021-03-28T12:08:47 | 233,877,609 | 0 | 0 | null | 2020-01-14T15:52:20 | 2020-01-14T15:52:19 | null | UTF-8 | Python | false | false | 2,074 | py | import unittest
from Services import DistanceService
from Tests.TestEnvironment import get_test_stores
class DistanceServiceTests(unittest.TestCase):
def test_get_stores_within_range_returns_every_store_in_one_mile_range(self):
a = [51.460903, -0.301702]
stores = get_test_stores()
servi... | [
"otto@masterbranch.io"
] | otto@masterbranch.io |
4aa2a44af09dce4919240097d2cf50df5c2286cc | 56f155db28b5703786a08fef0ecf821aefb6ffe5 | /lib/testmill/test/test_images.py | f43dc574d9685d3d89f1196cbad690c754365c2e | [
"Apache-2.0"
] | permissive | h4ckl4bm3/testmill | 595c30facec943b3593febe080b1e6602e82dee2 | 607d5622f14785e1b2f785e162ae862c5e638c5f | refs/heads/master | 2021-05-27T08:58:17.899271 | 2013-04-10T15:40:12 | 2013-04-10T15:41:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,035 | py | # Copyright 2012-2013 Ravello Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | [
"geertj@gmail.com"
] | geertj@gmail.com |
af062882db668d2127cd9f91c3691c449ef42328 | 12c41119156dd3783c3801e07f5f973289f26bb0 | /aliyun-python-sdk-green/aliyunsdkgreen/request/v20170823/DescribeWebsiteScanResultRequest.py | f09d346c2c80b7eb9219b58dbf61434df7b191ec | [
"Apache-2.0"
] | permissive | toywei/aliyun-openapi-python-sdk | bfe0893da38af9b222ce072fd7587d5b6cdce204 | ce8f683e3201fca8c473512267f50a34f71e31d3 | refs/heads/master | 2020-08-07T23:42:00.053692 | 2019-10-08T08:50:21 | 2019-10-08T08:50:21 | 213,626,962 | 1 | 0 | NOASSERTION | 2019-10-08T11:43:15 | 2019-10-08T11:43:15 | null | UTF-8 | Python | false | false | 2,640 | py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
94a57d37ee01ad48525f12206f52a6d3317127e3 | 04164e028417ff8472b9f2bfec0ec45b0888f743 | /development/pysrc/extract.py | 1b6bc09351d99ac31b3285f0ed8f27a28be337e3 | [] | no_license | Huaguiyuan/quantum-honeycomp | c2b810ff5f5e25d41b1f0c1c1ff7ae500b04dc31 | 50deb0e59fffe4031f05094572552ca5be59e741 | refs/heads/master | 2020-03-22T19:09:58.148862 | 2018-07-08T19:51:58 | 2018-07-08T19:51:58 | 140,510,217 | 1 | 2 | null | 2018-07-11T02:20:32 | 2018-07-11T02:20:32 | null | UTF-8 | Python | false | false | 2,779 | py | # routines to extract channels from a matrix
from __future__ import division
import numpy as np
def spin_channel(m,spin_column=None,spin_row=None,has_spin=True):
"""Extract a channel from a matrix"""
if not has_spin: return m # return initial
if (spin_row is None) or (spin_column is None): return m # return init... | [
"jose.luis.lado@gmail.com"
] | jose.luis.lado@gmail.com |
431bf55da258a58f0591e70b0994f0d2e973bae0 | fc6f4aecaa611c1eb8fb9f7b7eb681673fed8dbe | /is13/data/sougou/dataset2/is13/examples/my-elman-forward.py | 48faffad5b5ef0c83b7b01c3dadbc0685f351632 | [] | no_license | WUT-IDEA/domain-ner | 3d27a25887b48b9074b08bd717932a380d5f01e5 | 685f4ffd387f0fa6d83734af3c7d3ac4d7c142fc | refs/heads/master | 2020-03-09T17:56:09.797419 | 2018-04-10T14:47:06 | 2018-04-10T14:47:06 | 128,920,023 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 9,042 | py | import numpy
import time
import sys
import subprocess
import os
import random
import time
from theano import tensor as T
from prepare_data_for_rnn import label2idx, dictionary2, get_datalist,my_evaluate
from elman import model
from tools import shuffle, minibatch, contextwin,writelist,listmax,saveIntoFile,get_word_po... | [
"ziwuyoulin@foxmail.com"
] | ziwuyoulin@foxmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.